(Scene opens at the Flynn-Fletcher house. Cut to the backyard where Phineas and Ferb are surrounded by lots of leftover parts.)
Phineas: Ferb, we've got a lot of leftover parts from the last time we used leftover parts. There must be something we can do with them, you know, besides hodgepodges or art pieces.
Buford: Whoa, dudes, what's with all the junk in your backyard? It's like an obstacle course back here!
Phineas: That's it! I know what we're gonna do today!
Buford: What'd I say?
Phineas: You said obstacle course, of course!
Buford: Oh, I meant to say chili cook off.
Baljeet: Are you meaning to tell me we have never made an obstacle course this entire summer?
Phineas: Ferb?
Ferb: I'm filled with remorse
That we haven't, of course,
Even thought of building an obstacle course.
Phineas: Then let's build one and make it our new tour de force!
Ferb: That is a plan I can clearly endorse.
Phineas: Of course!
Baljeet: Of course!
Phineas: Of course!
Buford: Of course! I'm puttin' an end to this before it breaks into song! Where's Perry??

(Cut to Agent P falling into a secluded area. He uses a rod to divine the OWCA location on a scale model of Danville, accidentally setting it on fire, and exits but not before extinguishing the fire. He drops into a hole and falls into his lair.)
Major Monogram: Morning, Agent P. There are pretty suspicious goings-on...going on at the Doofenshmirtz building. We have reports that the building has been rotating all morning, so either he's got something evil up his sleeve, or he's turning it into an expensive romantic restaurant with an impressive which case, I would like a reservation for 6:00 pm. Either way, I'm gonna need you to get over there. (Perry leaves. Monogram looks aside.) Okay, he's gone. One, a-two, a-one-two-three. (Puts on a Major-General's hat and several agents appear and he sings to the tune of "The Major-General's Song" from The Pirates of Penzance.)
I am the very model of a modern Major Monogram
I've information vegetable and animal and hologram

(Cut to the movie theater. The title Gluttony Games is shown on the marquee. A bunch of people, including Stacy and Candace, walk out of the theater.)
Candace: Wow, Gluttony Games is totally bloated with mindless mayhem! And the two girls, they were so brave and fearless!
Stacy: We would make an awesome team, you and me!
Candace: (high fives Stacy) You and me, baby! Of course, we'd have to learn to shoot a bow and arrow, and build a rope bridge...
(Cross-dissolve to the girls walking to the Flynn-Fletcher house, where Candace is still talking, unaware of the big project in the backyard.)
Candace: ...and catch two leaves between two pieces of wax paper and choose matching backpacks and sharpen a hatchet, (opening the gate) and we'll live on nothing but—
Candace and Stacy: Holy cannoli!
Candace: What in the world is going on here?! PHINEAS AND FERB!!!!
Phineas: Ladies and gentlemen, boys and girls, babies and slightly smaller babies, welcome to the Phineas and Ferb Ultimate Obstacle Course! The first team that makes it all the way to the end (you know, alive and stuff) will win this nifty trophy! So are you ready to get muddy?
Candace: That tears it! Those two are so—
Stacy: Hang on, Candace! We can win this!
Candace: Yeah, we ca— Wait, what?
Stacy: I want that trophy!
Candace: Why?
(Cutaway to Dr. Hirano with Ginger putting up a trophy on display as Stacy watches.)
Dr. Hirano: Very good, Ginger. We'll put it up here with the rest of your awards. I'm...still saving a place for your trophy, Stacy. You know, just in case.
Stacy: Uhhhhhhhhhhhhhhhhhhhhhhhh...
(Cut back to Stacy and Candace.)
Stacy: ...hhhhhhhhhhhhhhhhhhhhhhhhhhhh... Candace, we'd make an awesome team!
Candace: Alright, I'll do it!
Stacy: For the trophy!
Candace: And for whatever it was you were thinking about just now.

(Cut to Doofenshmirtz Evil Inc. A taxi drops off Perry as he watches it rotate. He walks into the revolving door. The building rotates again. A pizza guy runs into the building and bumps into the side. Perry comes out of the elevator and sees the building rotate again in confusion. He knocks on Doof's door.)
Doofenshmirtz: Hmm, I wonder who that could be. (opens the door and gasps) Perry the Platypus? Well, come on in. Wipe your feet if you don't mind. I just mopped the floor. (Perry steps onto the welcome mat, which traps him.) Ha ha! Gotcha! That's what you get for having manners! Hee hee hee! Now, I bet you're wondering why my building has been turning 90 degrees every now and then. Well, that's because I was just testing out my 90-Degree-Turn-inator!! Eh, you like it? Y'know, it turns things. But only 90 degrees at a time. You see, back in Drusselste—y'know what? Just watch this documentary.

(Cut to a black and white newsreel.)
Newsreader: This Week in History! Dateline: 1602. The mayors of Gimmelshtump and Stumblegimp prepare to sign a treaty declaring they are sister cities. However, while reaching for his quill, the Mayor of Gimmelshtump accidentally turned 90 degrees. Since showing your side to another is considered a Stumblegimpian insult, the Mayor of Stumblegimp was forced to follow tradition. (The Mayor of Stumblegimp takes off his shoe and sock and slaps it in the Mayor of Gimmelshtump's face.) And so, war was declared. Gimmelshtump had no choice but to retaliate. The war escalated and raged on for 50 years. Finally, the only way to end this senseless feud was for the Mayor of Gimmelshtump to perform the Stumblegimpian humiliating Dance of Contrition.

(Song: "Humiliating Stumblegimp Dance of Contrition")
If you ever insult a Stumblegimpian
By turning slightly to the side,
You can vin back zeir trust in ze end.
Now place six chickens on your head
Then you try to eat ze featherbed
Put a jelly donut into your pants.
Und dance!

Write a letter to a chimpanzee,
Paint a portrait underneath the sea,
Move to France and refuse to speak French.
You think I vill speak French?! I vill not speak French!

Juggle piglets with an angry cook,
Split an atom in a breakfast nook,
Zen he vill know you're a mensch.
Now go sit down on zis bench!
'Cause you're tired!!

Newsreader: And so, the Mayor of Stumblegimp was appeased. And, once again, all was right between the two cities...or was it? The End!
(End newsreel.)

Doofenshmirtz: And the Stumblegimp Humiliating Dance of Contrition is just as much a tradition now as it was in the '40s...when this newsreel was made about the 1600s. You see, Perry the Platypus, my brother, the Mayor's gonna meet the present day Mayor of Stumblegimp. And I plan to zap Roger with my 90-Degree-Turn-inator. It will turn him 90 degrees, which will insult Mayor...uh...Whatshisname. Something with waffles. He'll have to sing that whole song, and when the people of Danville see him eat a featherbed or put a donut in his pants, he'll be forced to step down as mayor and I will step into his place, 100% donut-pant-free! Unless, you know, something like last week happens again.

(Cut back to the backyard. The teams for the obstacle course are assembled, with the Candace and Stacy on the Red Team, Isabella and Ginger on the Green Team, and Buford and Baljeet on the Black & Blue Team.)
Phineas: And finally, our third team, Candace and Stacy!
(The crowd cheers. )
Candace: We are so ready!
(Stacy looks aside and sees her little sister with Isabella. Ginger looks back and smiles and gives a thumbs up. Stacy makes the "I'm watching you" gesture.)
Isabella: What was that about?
Ginger: Oh, that's our secret code for "I love you, sis"...I think.
Phineas: Good luck, contestants! And watch out for giant worms! On your marks...
Candace: Wait, what?
Phineas: Get set...
Candace: Did he say, "Giant worms"?
Phineas: Go!
(The platforms the teams are standing on lower and they fall into their respective colored ducky-floats and slide down some water. The Black & Blue team get swallowed by the giant worm that Phineas warned about.)
Buford: Aaaah! Giant worm!!!
Phineas: Well, it looks like Buford and Baljeet are out of the race. Sorry, guys. You know what they say: Giant worms can do whatever they want.
(The remaining teams fall down a pinball-themed waterfall complete with appropriate sound effects. The teams get washed up on a beach.)
Phineas: Both remaining teams have made it to the beach! Nice job, ladies, but you may wanna get to cover.
Candace: Cover?
Phineas: (activating a water balloon launcher) Fire!
Isabella: Incoming!
Stacy: Water balloons!
Phineas: Just look at them go!
Stacy: Get off the beach! Get off the beach!!
(Candace and Stacy get hit by two water balloons and end up lying on their backs.)

(Cut back to D.E.I. where Doof is rolling his inator on the balcony.)
Doofenshmirtz: Ah, yes! The horse-drawn coach has arrived and Mayor...Wafflesomething is walking up to Roger.
(Cut to City Hall where Roger is greeting his visitor.)
Roger: Heheh, Mayor Chickenen, it is so good to finally meet you.
Doofenshmirtz: Chicken and waffles! That's why I had "waffles" stuck in my head. That was it. (walks up to the inator)! (fires the inator)
Roger: (holding out his hand) It is indeed a rare pleasure to— (He gets zapped and rotates 90 degrees east.)
Mayor Chickenen: Huh? What is the meaning of this? I will have to declare war now!
Roger: Maybe not. Pstt!
Melanie: What happened?
Roger: Get the Dance of Contrition team out here pronto!
(Melanie whistles.)
Doofenshmirtz: Yeah, baby! It worked! And now for the humiliatioooonnnn!

(We hear disco music in the background and everyone does a more contemporary dance style.)

Dance of contrition
Humiliatin' dance of contrition
(Everybody dance!)
Dance of contrition
Humiliatin' dance of contrition
(Everybody dance!)
(Everybody dance!)
(Everybody dance!)
Dance of contrition
Humiliatin' dance of contrition
(Everybody dance!)

(Cut to Doofenshmirtz seemingly holding up a pair of binoculars.)
Doofenshmirtz: Wait, th-th-th-that's not the Stumblegimp Humiliating Dance of Contrition! (he lowers his hands to reveal there's nothing in them and sighs) One day, I gotta ask Norm what he did with my binoculars.

(Cut back to the obstacle course.)
Phineas: It looks like Isabella and Ginger are way out front!
Candace: Hurry, Stace! They're getting away!
Phineas: Watch your step, ladies! That's mud down there! Baljeet's suggestion!
(Cut to Buford and Baljeet still inside the giant worm.)
Buford: Really?
Baljeet: I knew we would not make it that far.
(The worm chomps and swallows them.)
Buford: Well, not with an attitude like that!
Candace: We'll see who gets mud in his face, Smart Guy! (She starts to step on a platform, but it moves and she falls downs screaming and lands with a splat.)
Phineas: Good thing mud's good for the skin!
(Cut to Candace in the mud.)
Candace: Blehhhhh...
Phineas: (next to a giant fan) Let's dry 'em off, Ferb!
(The giant fan turns on. Cut to Team Green.)
Isabella: Hold on to something, Ginger! We're almost there!
(Cut to muddy Candace. She spits out some mud and the mud gets blown off.)
Candace: Hey, he's right, my skin feels so soft. Come on, Stace!
(Candace and Stacy jump onto a platform, then try to jump onto the next one before almost being blown away by the fan. They hold onto a pipe, which lifts them into the air.)
Phineas: Whoa! Nice hang time!
(Team Red lands onto a wooden suspension bridge. They see Team Green blowing in the wind.)
Isabella: I regret nothing!
Candace: That puts us in the lead! Woohoo! (A pie flies into her face.) Pie? Really?
(Dozens of pies splat into them making them go backwards. Team Green runs ahead.)
Phineas: And Isabella and Ginger take the lead!

(Cut back to City Hall.)
Mayor Chickenen: Wonderful! The new improved Dance of Contrition always makes me want to shake a leg!
Roger: Fantastic.
(Doof runs down in between them.)
Doofenshmirtz: Whoa whoa whoa! That was not nearly humiliating enough! Where was the part about bowing and pulling your shirt up over your face and juggling piglets? Where were the piglets?!
Mayor Chickenen: Oh, we haven't done that since the '40s when we made that newsreel about the 1600s. Things have changed. (He hums and dances.)
Doofenshmirtz: So what's your point?

(Cut back to the obstacle course where Team Green rolls on a log shaped like corn.)
Phineas: We're nearing the finish line, and here comes Team Ginger and Isabella, with Candace and Stacy in hot pursuit! And now, ladies, who's up for some popcorn?
(Some butter gets sprayed, and flamethrowers appear popping the corn. Team Green fall off the log and land in the mud.)
Candace: We're the last ones standing!
Candace and Stacy: Yay!
Stacy: Woohoo!
(A finish line banner lowers.)
Phineas: Candace and Stacy win! (A giant gorilla hand appears out of nowhere and slaps them off the log.) Sorry. Forgot about the giant gorilla hand. My bad. Remember, everyone's a winner, but only one team gets a trophy!
(A trophy gets lowered down and Stacy grabs it.)
Candace: Stacy, we won!
Ginger: Congratulations, Stacy!
Stacy: Ha! Now I'm like you! I have a trophy!
Ginger: But, Stacy, I won all those trophies just trying to impress you.
Stacy: Really?
Ginger: Yeah! You're the coolest big sister a girl could ever have! How can I compete?
Stacy: Well, I am pretty cool.
(The giant worm with Buford and Baljeet still inside appears and Buford steals the trophy away.)
Buford: I'll take that! Giant worms can do whatever they want! (They disappear.)
Candace: (stands up) That does it, it's busting time!
(Candace stomps off in anger, leaving Stacy, Ginger and Isabella shocked.)

(Cut to the kitchen where muddy Candace walks through the door.)
Candace: (in a stern voice) Mother? May I please speak with you?
Linda: (flatly) Oh, boy...

(Cut back to City Hall where Doofenshmirtz gets zapped and turns 90 degrees east.)
Mayor Chickenen: Oh, how rude! (Takes off his shoe and sock and slaps the sock onto Doofenshmirtz.)
Doofenshmirtz: Oh, give it a rest! (grunts) I must've left it in random fire mode.

(Cut to the balcony, where Perry, still trapped in the welcome mat, loosens a thread with his teeth and escapes, and jumps up and hits the self-destruct button. It fires and explodes. Cut to an airplane.)
Pilot: Uh, welcome to Flight J2261 to New York. (The ray bounces off the plane, which rotates 90 degrees.) Uh, hey, who wants to go to Alabama?
(Cut to the obstacle course. The ray hits a camera, which rotates and hits a beam carrying the jumbotron with the image of Phineas and Ferb resting under the tree. The screen lowers to the ground)

(Cut to the kitchen, throughout this, the screen outside the window lowers down, obscuring the window's entire view of the obstacle course. Candace and Linda barely notice)
Candace: Mom! (closes eyes) Take a look outside the window!
Linda: Candace, what's gotten into you?
Candace: Look!!!
Linda: (turns around and sees the image of Phineas and Ferb under the tree outside) Hi, boys!
Candace: (her eyes open) What...? (looks out the window) But-but -- !
Linda: Really, Candace? This is getting old. (walks away)
Candace: But....but......but....

End credits

Write a letter to a chimpanzee,
Paint a portrait underneath the sea,
Move to France and refuse to speak French.
You think I vill speak French?! I vill not speak French!

Juggle piglets with an angry cook,
Split an atom in a breakfast nook,
Zen he vill know you're a mensch.
Now go sit down on zis bench!
'Cause you're tired!!

Community content is available under CC-BY-SA unless otherwise noted.