A/N: Thanks to dtill359 for suggestions on how to make this a better story. So, here's the edited one:

It was a sunny Thursday morning in the village of Danville. Phineas Flynn and Ferb Fletcher are lying side-by-side under the shade of their pine tree in their backyard, pondering on what to do today, a daily occurrence for the two boys. Phineas looks over at his stepbrother, who is reading his book.

"Hey, Ferb, what do you wanna do today?" Phineas asks. Ferb shrugs and turns the page. Phineas' face lights up, having an idea.

"THAT'S IT! I KNOW WHAT WE'RE GONNA DO TODAY! We're gonna write our own novel!" Phineas exclaims, shooting up from his spot on the ground. "Hey, where's Perry?" he asks, looking around the backyard for his semi-aquatic mammal companion, only to not see him anywhere. Phineas and Ferb head inside to go to their computer in their room. Meanwhile, Perry whips on his brown fedora and slips away in secrecy to his lair. He slides down a system of tubes until he plops into a plastic chair, where a man on a screen is awaiting Perry's arrival to give him his daily orders.

"Ah, Agent P. We actually have no idea what Doofenshmirtz is up to, but we think it's something evil. He's been seen moving big inventions to his storage unit. CARL! PUT UP THE PICTURE OF DOOF'S STORAGE!" Major Monogram calls.

"Yes, sir," Carl, the unpaid intern, says, as he pulls up an image of Doofenshmirtz Abandoned Self Storage on the screen in front of Agent P.

"So, yeah, go out and put a stop to whatever evil deed he has planned today. The entire Tri-State area rests in your paws... or flippers? Whatever," Monogram says as Perry salutes and dashes to his platypus shaped hovercraft, which launches into the sky. Perry is heading straight for Doofenshmirtz Evil Inc. But, remembering the words of Major Monogram, turns around to head back to town.

Perry arrives at Doofenshmirtz Abandoned Self Storage as Doofenshmirtz arrives with another load of inventions to be moved into the storage unit. Doofenshmirtz spots the platypus. "How'd a platypus get in here?" he asks, seeing Perry without his fedora. Perry whips back on his fedora as Doofenshmirtz points and shouts, "PERRY THE PLATYPUS!?". Doofenshmirtz turns around and heads back to his truck. He then backs his truck back into the storage facility. He then unloads one of his old inventions.

"I don't know why Monogram sent you here, I'm not doing anything evil. I'm just moving my old inventions. Vanessa is having some friends over for her movie night and I don't need any of my inventions in the way," Doofenshmirtz says. "Hey, will you be a pal and lend me a paw with these?" asks Doofenshmirtz. Perry shrugs as he walks up to the truck and begins to help Doofenshmirtz unload the inventions. Suddenly, as Perry and Doofenshmirtz are moving the Mind-Control-Inator, Doofenshmirtz accidentally drops an end, causing a green beam of light to zap Perry, causing him to fly through the air, hitting the other inventions piled in the back of the room.

"Perry?" Doofenshmirtz asks seeing Perry lying on the floor. Perry gets up from the ground. Suddenly, Doofenshmirtz gets a devilish idea. He picks up Perry and throws him in shotgun of Doof's truck. Doofenshmirtz drives through town, where he confronts his brother, Roger Doofenshmirtz, at City Hall.

"Hello, Heinz," Roger says.

"No time for chit chat, Roger. Where is it?" asks Heinz Doofenshmirtz.

"Where is what?" Roger asks.

"The deed to the Tri-State Area, duh," Heinz says.

"And why should I sign it over to you?" asks Roger, crossing his arms.

"Because, I hypnotized this poor, little platypus, and if you don't sign over the deed, he will be hypnotized forever," Heinz says.

"Forever?" asks Roger, with inflection in his voice. "That's a new low, even for you,".

"Yes, we got a deal or what?" asks Heinz.

"Nope," Roger scoffs. Doofenshmirtz glares, as his brother, Roger, walks away. Doofenshirtz whispers something to the hypnotized anthropomorphic platypus agent in his arm and sets him on the ground. Heinz then gets out a controller and controls Perry with it, like a video game, leading Perry into City Hall to begin his "evil" plan. Being uable to see inside City Hall, therefore being unable to control him inside the building, Doofenshmirtz follows behind Perry.

Meanwhile, back at the Flynn-Fletcher home, Phineas and Ferb are in their room, working on their novel. Candace, Phineas' biological sister, and Ferb's stepsister, barges into their room.

"What're you two doing?" she asks.

"Just writing a novel," Phineas responds. "Now, Ferb, where should our 'unlikely hero' be?".

"How about at an Irish Pub?" Ferb asks in his English accent.

"We need to make it appealing to kids, Ferb," Phineas says. Casndace scoffs as she turns around to leave the boy's room.

"Have fun with your non-bustable activity," she says closing the door. At the O.W.C.A. Headquarters, an alarm is going off.

"What's going on?!" Monogram asks approaching Carl.

"It seems Perry is helping Doofenshmirtz take over the Tri-State Area!" Carl says.

"Great Googly Moogly! Send in Peter the Panda!" demands Monogram. "He's our last hope!".

"Paging Peter the Panda," Carl says.

Back at City Hall, Perry and Doofenshmirtz are both roaming the halls of the establishment, trying to find the room having the deed. They enter the room in which the deed is in and Perry grabs it. The two enter the Mayors Office, where Roger is hard at work at the desk. Doofenshmirtz reaches into the wagon he was pulling behind him and pulls out his old De-Volitionator.

"Hey, Roger," Doof says and Roger looks up from his paperwork. "Catch!". Heinz tosses the De-Volitionator helmet, which lands on Rogers head. The helmet locks onto his head and powers on. Heinz Doofenshmirtz clicks on a button which switches the controls from the mind-control-inator to the De-Volitionator. With the controller, Heinz makes Roger sign the deed over to him. Heinz picks up the deed and jumps excitement.

"YES! I AM NOW THE RULER OF THE TRI-STATE AREA!" says Heinz. Back at O.W.C.A., Carl is looking on the monitor which has "ALERT" written in big, red letters across it.

"What is it, Carl?" Monogram asks.

"It seems with the help of Perry being hypnotized, Doofenshmirtz successfully got the deed to the Tri-State area signed over to him," Carl says

"Great Googly Moogly. Well, Peter the Panda is arriving soon. He'll know what to do," Monogram says.

"Why did it take so long for him to get here?" asks Carl.

"He's from Seattle. On the other side of the country," Monogram explains.

"Oh," Carl says.

Back at City Hall, Heinz is busy coming up with new laws.

"How does 'Everyone must wear a labcoat and black, collared shirt or be banished'?" asks Heinz to Perry, who is still hypnotized. Suddenly, Peter the Panda smashes through the window and lands on the ground safely. Doofenshmirtz shoots up and his eyes grow wide. "PETER THE PANDA!?" he shouts. Peter slowly walks up to Heinz.

"Your arrival here is unexpected, and by 'unexpected', I mean, well, unexpected, actually. Why are you here?" Heinz asks. Peter lunges forward and kicks Heinz's nose.

"Ok, first off, OW! And secondly, WHAT IN THE HECK WAS THAT FOR?!" Heinz shouts as he picks himself up from the ground. Peter steps on a button on the remote, which blows it up.

"Hmm, it has been brought to my attention that maybe I shouldn't have put the self-destruct button on the remote," Heinz says. Now that the remote is blown up, Perry and Roger are no longer hypnotized. Roger is in a supply closet when he comes to, having no recollection of what happened. "I have no idea why I'm in here,". Back in the Mayor's Office, Peter, Perry, and Heinz are in the midst of a battle. Suddenly, Heinz stops and holds his hand out in front of the two agents, who also stop.

"You guys are forgetting one thing! Thanks to Perry the Platypus here, the deed was signed over to me. Now that i'm ruler, I have made new laws for the Tri-State Area. One of them is 'Any foiling of the rulers evil plans will result in permanent banishment of the Tri-State Area'," says Heinz. Peter takes off his fedora and reaches into it to pull out a pocket lighter. Peter then grabs the deed out of Heinz's hand and burns it.

"Well, there's more where that came from. You see, I had a feeling you'd burn it, so I made 100 copies!" Heinz says. Perry makes his chattering noise and points behind the desk. Heinz walks over and sees a pile of ash from all the copies of the deeds.

"Well, now that all copies are burned, there is no ruler if the Tri-State Area," Heinz says. The door to the Mayor's Office flies open, and Roger enters.

"That's where your wrong, brother," he says.

"What?" asks Heinz.

"You see, the deed I 'signed' over to you, was merely a fake, so i'm still the rightful ruler of the Tri-State Area," Roger says.

"You know eventually I will become ruler, even if it takes me to the last day of summer, right?" asks Heinz

"Yes, I know," Roger says. Perry and Peter make a beeline to the exit.

"Curse you Peter the Panda! And you too, Perry the Platypus, even though you had very little to do with my defeat!" Heinz shouts as the two agents exit the building.

Back at the Flynn-Fletcher home, Phineas and Ferb are finishing their final chapter.

"And Chapter 20 is done," Phineas says."Now we can self-publish it," he continues. Candace suddenly bursts into the room, startling the two boys, dragging her mom behind her.

"Look mom!" Candace says, pointing to the computer.

"Ah, so this is your story you guys are writing? Glad you're using your imaginations," Linda Flynn-Fletcher says. She hands the boys $200 to help with self-publishing.

"What is going on in here?" asks Lawrence Fletcher, Ferb's biological father, and Phineas and Candace's stepfather as he enters the room as well, crowding Phineas and Ferb.

"The boys finished writing a story," Linda says.

"Ah, I used to write stories back in my day. Of course I never could publish them, since I could never make it past Chapter 1," Lawrence says. Candace growls and stomps her right foot out of anger.

"You guys never get busted!" Candace snarls at the boys, shaking her fist, full of fury.

"You want me to bust them for writing a story? Candace, that's a bit cruel," Linda says. Candace sighs. "I know,".

"Now, who wants pie?" asks Linda.

"I do!" the whole family says in unison. Everyone begins to exit the boys' room as Perry enters the boy's room.

"Oh, there you are, Perry!" Phineas says. Once again, Perry had stopped the perilous deeds of Dr. Heinz Doofenshmirtz and saved not just all of Danville, but the entire Tri-State Area. Doof was once again foiled by an anthropomorphic platypus wearing a fedora. Doofenshmirtz vowed to take over the Tri-State Area, even if it took all summer. Well, that's not happening as long as Perry the Platypus has anything to say about it. Or chitter? Or... whatever!

THE END.

A/N: The above Phineas and Ferb fanfiction is the entry to the Writers Anonymous "Never in a Million Years Challenge", in which we have to write a story about a character doing something they'd never plausibly do in a million years. I thought "Perry would never help Doof take over the Tri-State Area, Right?". Then I also realized my username is PhineasFlynn24, yet I have no Phineas and Ferb fanfictions. So there you have it. Hope you enjoyed. Please let me know how much you liked or disliked it. Your opinion matters very much to me. Title is reference to "Doomsday", a villain appearing in American comic books published by DC Comics.