Poof is upset his parents want him to take the lead role in the school play called "Mr. Cookie", but he quickly changes his mind after his new crush, Goldie Goldenglow gets the female lead role, but to get the role, he has to beat his arch-nemesis Foop, who also fell for Goldie.
At Timmy's place, Cosmo is helping Poof with his acting, as he is very fond of acting since he played "Table #3" in his school, but Poof doesn't care about the play. Dad tells Timmy he got the role of Pencil #2 on the Pencil Nexus Play. So at Spellementary, Foop is mad at Mrs. Powers for making everyone rehearse, and Poof agrees. Due to this, they begin a sort of friendship, which ends shortly after Mrs. Powers introduces a new student: Goldie Goldenglow, which both Foop and Poof fall for. They both try to impress her, but end up frustrating each others attempts. So they find an opportunity to get a kiss from Goldie on the school play after they learn she is the lead female role.
So both audition, Foop recites a scene giving some personal twists (CRASH! DOOM! DEATH! ETC!) and Poof simply says his name twice, winning the Mr. Cookie role. Foop gets to be Poof's understudy and therefore, tries to make Poof injure himself, throwing him some cobras (which end up biting him), throw in him a giant doughnut (which bounces and falls on him), but ends up getting injured himself. He then orders an ill gnome online and tries to make Poof fall ill too, but falls ill himself. In the end, Foop poofs Mrs. Powers into a volcano and makes his own personal changes to the script, changing it to: Mr. Cookie CRUMBLES. Poof (and Dad mistaking the magic bus for the Pencil Nexus bus) go to the School for the big night. Poof reads the script on the premier night and fakes gnomeonia, and Goldie suggests him to rest while Foop plays Mr. Cookie. He is very happy at first, but then realizes he will have to face all the traps he planned for Poof.
Poof is gleefully enjoying Foop getting injured on the backstage, so Foop poofs him all the way to Jupiter, were an alien eats his magic rattle. Wanda is worried, as Poof was supposed to be the lead role. Foop is trying to remember all his booby traps, but forgets most of them, and most important, he forgets the giant monster he planed for Poof, when suddenly Dad pops and says his Pencil Nexus Play line and then goes away, Timmy was very confused about it. At Jupiter, Poof tackles the alien and gets his rattle and Poof's back to the play to play Table #3, Foop's part. He defeats the monster by just showing his "handsomeness" and frees Goldie from the tower, and she kisses his cheek, making him very happy, and the crowd cheers.
Mrs. Powers comes back from the volcano and carries Foop away from the play. Dad goes backstage to congratulate the crew and mistakes Timmy for a workmate. Then Poof invites Goldie out for ice cream, and at the parlour Foop tries to blow up a bomb, but the cobras he freed before come get him and the bomb blows up in his face.