(Open on the Flynn-Fletcher house. We hear the standard opening guitar riff. Pan left to reveal it is being played by Danny Jacob.)
Danny Jacob: Dude, somebody's gotta play it, right?

(Cut to Candace's alarm clock waking her up. She turns it off and gets out of bed.)
Candace: You know, universe? If you're gonna give me practically unbustable brothers, you could have at least made them not morning people. Yeah, I see ya down there. Hey, where's Perry?

(Cut to Agent P's lair. Perry enters clearly very tired and chattering wearily.)
Major Monogram: Sorry you had to pull that all-nighter, but we really appreciate you filling in for Agent Q. With most everyone at Agent-Con this week, we're, uh, a little shorthanded.
(Cutaway to Agent-Con with every agent, including Peter the Panda, Pinky the Chihuahua and Lyla Lolliberry waiting in line for registration.)
Lyla: Yet again, I am the only girl.
(Cut back to the lair.)
Major Monogram: Anyway, Agent P, Doofenshmirtz has been experimenting with energy fields and it's starting to get dangerous. It knocked out our microwave oven. Get out there, Agent P, and right that ridiculous wrong. (Perry gets up and tiredly walks to his spy car. Monogram holds up a breakfast burrito on a plate.) This breakfast burrito is like a bean and cheese icicle except that it's larger and wrapped in a tortilla.
(Perry gets in his car and turns autopilot on.)

(Cut to the backyard.)
Isabella: Hey, Phineas! Whatcha doin'?
Phineas: Hey, Isabella! You're just in time to help us build a zip-line tennis game across town for the ultimate game of sky tennis!
Ferb: Or skennis for short.
Phineas: Now that you're here, we can play doubles for twice the fun!
Buford: I'll be the judge of that.
Phineas: Perfect! 'Cause we need you to be the line judge.
Buford: Judge? Cool! Do I get one of those powdered wigs?
Baljeet: No.
Buford: Ah, I'll do it anyway.

(Cut to:)
Doofenshmirtz Evil Incorporated!

(The spy car makes its landing in the building.)
Norm: Woof! Woof! Intruder approaching! Woof! Woof, woof!
Doofenshmirtz: Good boy! I love this new guard dog software. It's about time, Perry the Platypus. I was beginning to think you found another evil scientist to fight. Oop!
Perry: Zzzzzzzzzz...
Doofenshmirtz: Oh, what a little angel. I'll just have to tell you my evil plan subliminally, like, like when people listen to foreign language CDs in their sleep. I did that once and now I can totally speak Portuguese to sleeping people. Anyway, recently, I was musing to myself about how lucky my brother, Roger, is.

(Flashback to Doof playing darts with his brother's face as the bullseye.)
Doofenshmirtz: (voiceover) Luck is called "stinkelkrampen" in Drusselstein and it turns out I never have any of the good kind. Turns out that every object has a positive or negative energy field. I harness that positive and negative energy and created...
(End flashback)

Doofenshmirtz: ...the Stinkelkrampen-inator!
Perry: (yawns) Zzzzzzzzz...
Doofenshmirtz: Shh shh shh shh shh. You see, what I'll do is I'll zap myself with good luck and then I'll go zap Roger with bad luck, then I will ascend to become the Mayor of Danville and then I will rule the ENTIRE TRI-STATE...
Perry: (yawns) Zzzzzzzzz...
Doofenshmirtz: I will rule the entire Tri-State Area. Aw, man, Norm, I told you, on the paper! On the paper! (Cut to reveal that Norm is drawing on the wall) Bad dog!

(Cut back to the backyard.)
Phineas: Looking good, guys! All we need to do is hammer in this last nail and we'll be ready to go. (The gang gets zapped by the Stinkelkrampen-inator and the top of the hammer falls off.) Huh, that's odd. Glad I always carry a spare. (The hammer falls off and hits Ferb's shoe.) Whoa! Good thing you're wearing your steel-tip sneakers.
Ferb: Actually, today I'm not. (beat) Ouch.

(Cut back to Doof and the still sleepy Perry.)
Doofenshmirtz: And that is how the bad luck setting works. Except, of course, I won't be shooting random blasts off the balcony. Now, check out the good luck settings. And, again, I won't be just shooting it off the balcony like this. (He shoots it.)

(Cut to Candace at her vanity.)
Candace: Time to embark on my daily 500-brush-stroke marathon to manageable hair. (She gets zapped.) One...What the—? (Takes out a protractor to measure her hair.) A perfect 40º angle? (smiles) I can't believe it! A perfect hair day! I finally got my PHD!
Lawrence: (carrying pillows) Oh, that's wonderful, honey. Not a single day goes by when I don't appreciate my PHD.
Candace: That's great, Dad, but I'm not talking about a degree.
Lawrence: Oh, neither am I.
Candace: Time to take my perfect hair to a bust show. (Cut to downstairs. Her phone rings.) Hello? You're kidding! I won a random contest to sing backup for Love Händel at the Danville 24 Hour Music Awards?! Sweet! Perfect hair day? Backup singer for Love Händel? That could only mean... Wait. Lemme try one last thing. (Falls backwards. Wide shot to reveal she landed on two pillows. She gasps.) Pillows magically appear to break my fall! It's true! I'm finally having good luck!
Lawrence: I was using my PHD. My Pillow Hurling Dexterity.
Candace: Meh. Still lucky. (gasp) I'll actually be able to bust Phineas and Ferb today! Oh, wait. Mom's at that weekend-long plant-potting retreat. (Her phone rings.) Hi, Mom! The seminar's over already?
(Cut to Linda.)
Linda: Yeah, apparently, you just put some dirt in a pot. I don't know why I cleared my whole schedule.
(Cut back to Candace.)
Candace: Great! See you at four! (off the phone) Yes! Today is the day that I bust Phineas and Ferb! Woohoo!

(Cut back to the backyard. The structure falls apart.)
Phineas: I just don't get it. Everything we try to do either falls apart, breaks, or somehow ends up backwards.
Baljeet: I know this goes completely against all logic and therefore makes it totally out of character for me to say, but I think you may have been cursed with bad luck.
Phineas: (gasp) Bad luck?!
(Dramatic organ music plays. Zoom in on Phineas' face. Whip pan right to reveal Danny Jacob now playing the keyboard.)
Danny Jacob: Dude, I call 'em like I see 'em.
(Whip back to the gang.)
Phineas: Hmm, bad luck. That's a new one!
Isabella: It happens. There's not much you can do about it.
Phineas: No! There is something we can do about it! If we can create algorithms to predict bad luck, we can make allowances for it and still have fun!
Baljeet: Just like the failsafe systems on space capsules or airplanes!
Phineas: Exactly! We'll make having bad luck fun!
Isabella: Cool!

(Cut to somewhere downtown. Doof is standing by his van with a still sleeping Perry in a little red wagon holding his inator.)
Doofenshmirtz: Okay, it's time to go. Luck and cover. (He shoots himself with the inator and chuckles.) Good stinkelkrampen tickles! (gasp) Look, a penny! It's working! Aw, man, tails! Well, you know the rules, Heinz. Turn it over for the next person.
Man: I say, a lucky penny! Thanks for the flip, old bean. Here is a thousand dollars!
Doofenshmirtz: (squeals) It worked! Hee hee! Ooh, time to give Roger a dose of bad stinkelkrampen he'll never forget!

(Cut back to the backyard, where the gang is on top of the structure.)
Phineas: Okay, team, all failsafe systems are in place. Go! Yeah!
(Cut to the roof of a building where identical twin sports announcers are placed.)
Sports Announcer #1: What a great day for sky tennis, huh, Markus?
Markus: Or "skennis" as the locals call it, Mark.
(Cut back to the action.)
Mark: (voiceover) Phineas and the gang have the ball in play so here we go!
Markus: (voiceover) Lob to Phineas and Ferb as Phineas sets up for a powerful return! Ooh, looks like Baljeet is set up perfectly for—
(Baljeet's zipline snaps and he falls.)
Markus: Oh no!
Mark: What rotten luck! Let's just hope Baljeet survives the fall. But Isabella is right there with the save!
Markus: (voiceover) And apparently, so is Baljeet. A beautiful airbag maneuver, Mark, which bounces him right back into the game.

(Cut to Doof's van. He places the sleeping platypus in his seat.)
(Song: The Good Life (instrumental))
Doofenshmirtz: Down you go, Perry the Sleepapus. (He turns on the ignition.) And away we go! (All the traffic lights turn green.) Sweet!
Food Truck Lady: Free samples?
Doofenshmirtz: (takes some) Thank you! Mmm, mmm, I could get used to this good luck thing. It's better than having a genie. That was a mistake.
(Cutaway to a genie after he's transformed Doof into a giant wiener.)
Wienershmirtz: That wasn't a wish! It's just a song! It's not even a song! It's a jingle!!
(End cutaway.)
Doofenshmirtz: Ugh. Y'ever try to sue a genie? Oh, you're asleep. W-Well, let's try to see what kind of tunes are on the FM dial.
(Song: Dancing in the Sunshine)
The sun is shining down on me
(Dancing in the sunshine)
Every day a jubilee,
Swingin' from a cherry tree. Doofenshmirtz: (while the song plays) Hey, I love this song! I guess I shouldn't be surprised at this point, but what the hey?

(Cut to a montage of Lucky Candace as the song continues.)

What has this day got in store?
(Dancing in the sunshine)
Above the clouds I'm gonna soar
And then I'm gonna eat a s'more.

Whoa-oh-oh-oh, dancing in the sunshine,
Whoa-oh-oh-oh, dancing in the sunshine.

Smiles stretching miles long
(Dancing in the sunshine)
Got my fav'rite flip-flops on,
My SPF is super strong.

My hair blows in the summer breeze,
(Dancing in the sunshine)
I'm groovin' with some retirees
With cartoon bandage on my knee.

Whoa-oh-oh-oh, dancing in the sunshine,
Whoa-oh-oh-oh, dancing in the sunshine,
Whoa-oh-oh-oh, dancing in the sunshine,
Whoa-oh-oh-oh, dancing in the sunshine.


(Cut to City Hall. The van pulls up.)
Doofenshmirtz: I love it when the song ends right as you reach your destination! Not to mention the free cans of almond brittle that I got during the chorus. (Cut to inside City Hall.) Well, hello, Roger.
Roger: Hello, Heinz. What can I do for you?
Doofenshmirtz: Well, little brother, you have had nothing but good luck your whole life, and I'm here to even things up for once!
Roger: Oh, Heinz, the power of positive stinkelkrampen is the result of hard work, strong networking and thoughtful actions in matters both business and personal.
Doofenshmirtz: Pfft! I prefer to inator my way to success...just like I wrote in my book! Available in dollar bins everywhere!

(Cut back to the game.)
Mark: Now let's see what Ferb can do with Isabella's blistering smash. Wow! I've never seen a racket spontaneously become unstrung!
Markus: Ferb's shot is headed straight for Isabella and she...
(One of the wires snaps.)
Mark: (voiceover) Oh, that is a tough break! She's flying right past the gap. This is absolutely amazing!
(Cut back to the roof.)
Janitor: Hey, do you guys have a permit to do sports commentary on this roof?
Markus: We...totally have one.
Mark: We do.
Markus: (getting out of his chair)It's in the production truck downstairs.
Mark: (also getting out of his chair) Which totally exists. Let's get outta here!

(Cut to the living room where Candace is sitting in her chair reading a book.)
Linda: (offscreen) I'm home!
Candace: Hi, Mom!
(Cut to the front door where Linda is carrying a familiar looking potted plant and a bag of mulch.)
Linda: I know you wanna drag me to the backyard right now, Candace, but can it wait until I repot my new plant?
Candace: (offscreen, sarcastically) No prob, Mom, Take your time.
Linda: Oooookay....Uh, thanks, hon. I—Oof! (She bumps into a jacket and a fedora drops onto the potted plant revealing itself to be none other than Planty the Potted Plant himself!) Oh, how cute! My new plant looks like a little secret agent! Huh. How about you guard this alcove, Mr. Secret Agent Plant. (giggles)
(Planty goes down the alcove into Agent P's lair.)
Major Monogram: Sorry, Planty the Potted Plant, but apparently your cover's been blown. I'm afraid you'll have to be repotted with another family.
(Planty wilts sadly.)

(Cut back to City Hall.)
Doofenshmirtz: Alright, Roger, prepare to suffer the bad luck of the dra— (Roger gets up from his desk) Hey, hey, hey! Hey, wait! Wait a minute! You're s'posed to stay still for a good inatoring!
Roger: Aw, but I just realized I haven't said hello to your little platypus friend.
Doofenshmirtz: Careful. He gets a little testy if you wake him up from his nap too soo— (The floor creaks and Perry suddenly wakes up.) Uh oh.
(Perry attacks Doof.)
Roger: Aw, yes. I'm not a morning person either.

(Cut to the backyard.)
Phineas: Great game, guys!
Candace: (from below) Hello, brothers! (cut to her with a pie) I made you a pie...for your Bust Day!
Phineas: Well, that can't be right. (takes out a flyer) Bus Day isn't until next week. (Cut to the flyer which reads: "Celebrate Bus Day Next Week" with a yellow bus with a happy face on it) Guess she's getting a head start.

(Cut back to City Hall where Perry is beating the youknowwhat out of Doof. Doof throws his inator away and Perry destroys the pack on his back.)
Doofenshmirtz: Oh no. Now my luck's gonna go back to normal...which is, of course, bad!

(Cut back to the backyard, where Candace is inexplicably dancing with her pie, oblivious to the rays revolving around her and the kids.)
Candace: Just take your time, it's not like the earth is gonna open up and s-wallow it, (chuckles, tosses pie in the air) not today! (splat!) Oof. (gasps) Oh no! That means... (runs into the house) MOOOOM!!! MOM MOM MOM MOM!
(The earth opens up and swallows the structure.)
Phineas: And right after Candace said that couldn't happen.
Buford: Yeah. That's borderline creepy.
Linda: Candace, you still haven't explained why you're covered with pie.
Candace: Oh, just come on, this will explain everything! A-bu-bu-wuh?
Phineas: Hi, Mom!
Candace: A-bu-bu-bu-bu-bu-bu-bu...but...

(Cut to Doof outside City Hall.)
Doofenshmirtz: Well, my luck may be back to normal buit at least I still have an entire trunk full of delicious almond brittle. (Opens a can and fake snakes pop out.) Ugh. Mental note: Never accept canned confections from a guy in a clown suit.

End credits

My hair blows in the summer breeze,
(Dancing in the sunshine)
I'm groovin' with some retirees
With cartoon bandage on my knee.

Whoa-oh-oh-oh, dancing in the sunshine,
Whoa-oh-oh-oh, dancing in the sunshine,
Whoa-oh-oh-oh, dancing in the sunshine,
Whoa-oh-oh-oh, dancing in the sunshine.