(Open on an overhead shot of the Flynn-Fletcher house. We see, Phineas and the gang in their skateboarding gear.)
Phineas: Okay, guys, now you try it. (Isabella jumps over a hydrant on her skateboard.) Nice! (Baljeet does it next.) Very smooth, Baljeet! (A skateboard with no rider bumps into the hydrant.) What's the problem, Buford?
Buford: Well, you know, the sun was in my eyes.
Isabella: Buford, what's with the lack of effort?
Buford: I'm just tryin' to be careful.
Phineas: You?
Buford: Yeah, we're outta credit at the emergency room. My mom said if I break one more bone, she's gonna break the rest of them! Fairly sure that was hyperbole, besides, look how hard that hydrant is!
Baljeet: Well, maybe we could make our own fire hydrants out of soft foam rubber.
Phineas: Hey, that's a great idea! Ferb, I know what we're gonna do today!
Ferb: Seriously? That's it? A soft fire plug?
Phineas: Well, yeah, attached to a giant revolving treadmill with a giant soft neighborhood containing soft obstacles.
Ferb: Oh, yeah, okay.
Baljeet: Where is Perry?
Isabella: What did you say?
Baljeet: I was just asking where Perry is.
Isabella: Oh.
Baljeet: What did you think I said?
Isabella: Uh, well, I thought you said...uh...nevermind. It was too weird.

(Cut to Perry in the bathroom. He climbs into the tub with his fedora and floaties on. He rotates the showerhead and a wall raises up. He turns the showerhead on and it speeds into the opening. Cut to outside. The bathtub comes out of the roof. The tub speeds along the road before coming to a traffic signal. A hot tub carrying Peter the Panda and two ladies speeds by. The light turns green. He speeds into the OWCA Plumbing Supply building. Cut to inside. It looks like a garage with the lair monitor inside.)
Doo bee doo bee doo bah
Doo bee doo bee doo bah
Doo bee doo bee doo bah
Major Monogram: Ooh, ooh, oh, get it off! G-Get it off! Ooh! Uh, just walked through a spiderweb. Don't you just hate that? Ya spend the rest of the day worried there's a spider on ya. (shudders) Gives me the willies. Anyhoo, our sources tell us there's a cowboy hat in front of Doof's building. Normally, that wouldn't be of any interest to us, since this is the week of the Danville Hootenanny, but it is a rather large hat and, in spite of its name, the Danville Hootenanny is a dignified affair. I wish I had more information, but Carl said there was a big bee by the surveillance equipment. So get out there, Agent P! Ooh! Carl, is there... (turns around revealing a huge tarantula on his back) is there a spider on my head?
Carl: (offscreen) No, sir. There's no spider...on your head.

Narrator: Meanwhile, at the Danville Space Laboratory...
(The sign reads "Danville Space Labrador".)
Sign Painter: Laboratory?! (makes angry noises, throws his hat to the ground and stomps on it)

(Cut to inside the Danville Space Laboratory where Linda, Jack Johnson, Candace, and Jeremy are taking a tour.)
Linda: Oh, Jack, it sure was nice of you to show Candace and me around. This satellite stuff is very interesting.
Jack: No problem, Linda. I'm flattered you'd be interested in our humble facility, considering your background in astrophysics.
Linda: Oh, yeah, uh, listen, that's kind of a secret, so don't—
Jack: Oh, I'm sorry.
Candace: So what does your father do here?
Jeremy: Oh, he's part of a team that makes and manages recognizant satellites. They actually had a couple of rovers on Mars earlier this summer. But they suddenly stopped working. You wouldn't know anything about that, would you?
Candace: (nervously) Uh, how would I...heh heh...what do you mean? Heh heh.
Jeremy: All right...Your Highness.
Candace: (gasp) Who told?
Jeremy: Stacy.

(Cut to Agent P parachuting to:)
Doofenshmirtz Evil Incorporated!
(Perry approaches Doof, who is sitting outside.)
Doofenshmirtz: Uh, Perry the Platypus, I bet you're wondering why I'm cowering outside my lab. Well, day started like any other day. You know, "how am I going to take over the Tri-State Area?" But I suddenly remembered a movie that I saw long ago at a drive-in.

(Doofenshmirtz watching a movie with gigantic kittens climbing on buildings.)
Doofenshmirtz: (voiceover) It was called Night of the Felis. I knew right away that the old masters were onto something. Imagine taking something cute and enlargening it to frightening proportions. Brilliant! But in order to take over the Tri-State Area, I had to study with some other types of small animals, preferably, something that could fly. And I vowed to get right to soon as the movie was over. The first thing I needed to do was create an inator that would make things larger.
Doofenshmirtz: (in flashback) Eh?
Doofenshmirtz: (voiceover) I tried it out on my cowboy hat. It was a success! My ten-gallon hat had turned into a 2,000-gallon-hat!
(The hat falls off the balcony, Doofenshmirtz jumps off the hat and clutches to the balcony.)
Doofenshmirtz: (in flashback) Whoa! (crash!) Well, that's the end of that hat.
Doofenshmirtz: (voiceover) Next, I had to genetically modify a mouse so it could fly.
(In flashback, Doof takes a mouse. The mouse bites Doof offscreen.)
Doofenshmirtz: (in flashback) Ow!
Doofenshmirtz: (voiceover) Then I decided it would be easier to just use a bat. So I ordered a retired stunt-bat from a low-budget bat circus that had recently gone belly-up. You know...the economy. I was on the precipice of Tri-State Area domination. At last, I had the ultimate creepy soldier! (Derek the bat squeaks) And then I remembered, I had a very mild phobia of bats.
(Doofenshmirtz's eyes pop, literally, and he runs away from the bat.)
Doofenshmirtz: (in flashback) Aaaah!!! Get away get away get away!!!
Doofenshmirtz: (voiceover) I also had a mild phobia of shellfish.
(At the 'Shellfish Needs' restaurant.)
Waitress: (in flashback, offscreen) Here's your order, sir.
Doofenshmirtz: (in flashback, offscreen) Aaaah!!! Get away get away get away!!!
Doofenshmirtz: (voiceover) But bats are worse.
Doofenshmirtz: (in flashback) Scram, you flying gerbil! (Derek squeaks) Amscray! (Derek squeaks) You're making me miss the hootenanny!
Norm: (in flashback) Sir, I found your radio. It was embedded in the dashboard of your car.
Doofenshmirtz: (in flashback) Norm, don't just stand there! Do something about this bat! (The radio is thrown, and misses.) Really? That's your solution? Throw a radio at it? Whoa whoa! (cut to Norm about to throw a crowbar) Don't throw that! That's imitatable.
Norm: (in flashback, picking up the inator) What if I hit it with this?
Doofenshmirtz: (in flashback) No no! Don't shoot it with that! That's my—
(Derek gets hit with the inator.)
Doofenshmirtz: (voiceover) And I thought the bat was scary before when he was...tiny.
(End flashback.)
Doofenshmirtz: It was at that point that Norm and I decided to come out here. Plus the bat kinda looks like my cousin, Narthelliot, which, as you can imagine is weird for me. Isn't that about right, Norm?
Norm: (crashed through a hole in the wall) It's even more horrible than it looks!

(Cut to the backyard, where a giant foam wheel is.)
Phineas: Everybody got their helmets and boards?
Isabella: Yeah!
Buford: I'm ready!
Baljeet: I am ready!
Phineas: Okay, Ferb, fire it up! We're going to Foamtown!
Isabella: Woo! Woohoo! Yeah!
(Song: "Foam Town")
There's nothin' that I found
As good as goin' round and round
In Foamtown. (In Foamtown.)
I used to skin my knees,
But here it doesn't matter where I fall.

You'll never get scarred
Cuz nothing's really hard
In Foamtown.
So take a rollin' ride
On a squeezable urban sprawl.
Come on down to Foamtown. (In Foamtown.)

There's no bruises or concussions,
There's no painful repercussions,
There's no braces, there's no bandages,
No hospital stay.
If you jump and try to land it,
You can eat it or face-plant it
And you know that your insurance plan will not have to pay.
Come on down to Foamtown. (Come on down
To Foamtown,
Come on down.)
Just come on down to Foamtown. (Come on down
To Foamtown)
(Come on down!)
Come on down to Foamtown!

(Cut back to Danville Space Laboratory.)
Jack: And over here are the models of our robotically-operated rovers: the Mars rover, the Moonrover, and this is the Irish Rover.
Candace: You sent a rover to Ireland?
Jack: Well, we had to test it somewhere.

(Song: "Irish Rover")
In a land afar in Castlebar,
Many months ago,
We sent an Irish Rover
To look around, you know.
With a too-ra-loo-ra-fiddle-dee-dee
And a too-ra-fiddle-dee-doh
In a land afar in Castlebar,
Many months ago.

Jack: It took a couple of months, but we're finally starting to get some really great pictures back.

(Cut back to D.E.I.)
Doofenshmirtz: Thank you for the blanket, Perry the Platypus.
Vanessa: (offscreen) Dad?
Doofenshmirtz: Vanessa? Oh, no! Vanessa, get out of there! (Crawling inside) There's a huge bat on the loose!
Vanessa: Really? (Sees Derek shrieking.) Wow, cool! It looks like your cousin, Narthelliot.
Doofenshmirtz: No sudden movements or loud noises, Vanessa!
Vanessa: Dad, relax. It's just a bat. They just eat bugs.
Doofenshmirtz: But it's a very big bat!
Vanessa: Now, come on. J-Just stand up. It's time to face your fear.
Doofenshmirtz: Well, okay. (Derek snarls at Doofenshmirtz and grabs him in his mouth.)
Vanessa: (hitting Derek) No no no! Bad bat! Spit him out!!
(Derek spits Doof out, who is now covered in bat saliva.)
Doofenshmirtz: Oh, gross! (Derek grabs Doofenshmirtz with his feet and flies away.) Oh, yeah, this is much better!
Vanessa: Dad!! Oh, hey, Perry. I was wondering if you could help me. (Perry grabs his jetpack and activates it.) Thanks, Perry. You're a peach.
(A bat-looking man appears next to Vanessa.)
Bat-Looking Man: So, what'd I miss?
Vanessa: Oh, hey, Narthelliot! We were just talking about you.

(Cut back to Danville Space Laboratory.)
Jack: Of course, even better than using a rover, we have these. We call them global surveillance satellites. No matter where you are on Earth, there's always one of these flying above you in orbit, streaming live video to us here.
Woman at Monitor: That's right. Here's the outside of our building right now. And we can look up any location instantly. The Eiffel Tower, the Taj Mahal...
Linda: So you could look down on anybody's backyard and see what they're doing?
Jeremy: Pretty cool, huh?
Candace: Wow, that's gotta be handy for something.
Jeremy: And (points to Candace in anticipation of her busting idea)
Candace: What?
Jeremy: Really? Alright.

(Cut to the Giant Tire Place. Derek flies through the big tire around and around with Doofenshmirtz still in his clutches.)
Doofenshmirtz: Whoa! Oh, I get it! This is what it does! Flying through a hoop! That's what I get...for buying a bat...from a defunct...bat circus!

(Cut to the Danville Space Laboratory cafeteria.)
Jeremy: So, having fun yet?
Candace: Oh, you know I am. (Sips her drink)
Jeremy: You know, my dad goes on and on about the cafeteria here, and I think he's right. This food is...
Candace: (does a spit take and gasps) I've got an idea! My brothers are probably building something in our backyard right now, and we can use the surveillance satellite to catch them doing it! (runs off) Come on!
Jeremy: I was wondering how long that would take.

(Cut to the big monitor from earlier. Candace sits in the now empty chair with a sign saying "Out to Lunch.")
Candace: Just lemme punch in my address... (The backyard and Foamtown appears onscreen.) Omigosh, I knew it! Look at that thing!!
Jeremy: Wow! What is it?
Candace: it's an eye-in-the-sky bust! Come on, let's go get my mom! (they walk off)

(Cut to Foamtown.)
Phineas: Okay, Ferb, turn it off. Let's take a little break. (Ferb pulls the lever and the wheel stops rolling. Buford falls off of the wheel landing on his back.) You okay, Buford?
Buford: I'm havin' the time of my life! Is anybody else hungry?!
Isabella: I am!
Phineas: C'mon! Let's go see what's in the kitchen. (The gang jump off the wheel.)

(Cut to above the house. Derek and Doof fly up to Foamtown.)
Doofenshmirtz: Oh no! Oh no no no! Not again!!! (bang!) Ow, my head! (bang!) Ow, my head again! (bang!) Ow! Now I forgot math! (bang!) Ow! There goes social studies! (bang!) Oh, good, they're back! (Doofenshmirtz's head crashes into the giant bolt revealing the cogs, which loosen and cause Foamtown to roll away.)

(Cut back to the Danville Space Laboratory as Candace and Linda arrive just as Foamtown rolls away.)
Candace: This way, Mom! (motions toward the screen) See for yourself!
Linda: Oh, wow! It's our house! (the screen shows the empty backyard and the kids) And you can see the boys! And their little skateboards! (waves) Hi, boys!
Candace: They can't hear you, you know.
Linda: I know. (keeps waving) Hi! Whoo-hoo!

(Cut to the empty backyard.)
Phineas: Hey, Foamtown's gone.
Buford: You say that like it doesn't happen every day.
Baljeet: And you say that like an angry old prospector.
Buford: What does that even mean?!
Baljeet: (walks away) I stand by that metaphor.

(Cut to a desert where the Old Coot and his donkey are standing.)
Old Coot: Finally, Daisy, we're here. Our new home! Lotsa elbow room and no one to bother us! The last frontier! A place where a man and his donkey can— (Foamtown unravels.) Dangit! Come on, Daisy, we're headin' west.

(Cut to the Millennium Gateway Arch in St. Louis, Missouri. Derek and Doofenshmirtz fly around the arch. Perry jets in.)
Doofenshmirtz: Perry the Platypus, welcome to St. Louis! Now do something about this bat, please! (Perry shoots the inator at Derek and it shrinks back to its original size, leaving Doofensmirtz hanging in midair, then falling.) Aah!! Well, at least I lost my fear of bats!! (Doofenshmirtz crashlands into a shellfish restaurant.)
Waitress: (offscreen) Oh, it's you again.
Doofenshmirtz: (offscreen) Aaaah!! Go away go away go away!!!
Waitress: (offscreen) Oh, just stop it.

End credits

There's nothin' that I found
As good as goin' round and round
In Foamtown. (In Foamtown.)
I used to skin my knees,
But here it doesn't matter where I fall.

You'll never get scarred
Cuz nothing's really hard
In Foamtown.
So take a rollin' ride
On a squeezable urban sprawl.
(Come on down)
To Foamtown.

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