"Bart the Bad Guy" is the fourteenth episode of Season 31.
Plot
Bart performs a stunt, and Millhouse is accidentally injured.
When Bart visits him, he is visited by the actor of one of the characters in an action movie, Airshot. Bart pretends to be Millhouse and while Airshot is drunk and asleep, he discovers the sequel that is not produced yet, and he watches the movie.
He then discovers that since only he knows what happens, he can use that to manipulate every person he knows into doing things for him.
He names himself "spoiler boy" and also uses that to make every person in the town to build him a giant tree house for him.
His parents are concerned and they put him in a VR experience with the help of movie executives.
In the VR experience, the villain Chinnos (parody of Thanos) asks him to tell the ending of the movie, so he can destroy the heroes, and Bart refuses, destroying Chinnos with his virtual slingshot.
After that, he calls himself a hero, thinking the VR experience was real, and he stops the people from building the tree house. Returning Skinner's wig and gives back all the stuff Comic Book Guy had given to him. While at the premiere of the movie people spoil the movie for everyone on their phones.
At the end of the episode, Bart and other citizens (except for Homer, who doesn't care) are very happy for the true positive movie.