A/N: I haven't had practice at writing Phineas and Ferb fics, but I became inspired to write this while working on a Kim Possible fic. Enjoy!
I.
"Hey, where's Perry?" Phineas asked after deciding what he and his stepbrother Ferb would be doing today.
Perry, meanwhile, had wandered out to the front yard. Seeing no one was around, he quickly pulled a fedora out of nowhere and placed it on his head. He then jumped up, opened the mailbox and climbed in. With a spin of the mailbox's flag, the inside of the box acted like an elevator and deposited the monotreme into his lair. Sitting at his desk, he was quickly greeted by the image of his boss, Major Monogram.
"Ah, there you are, Agent P" the major said "We've been monitoring Doofenshmirtz' activity and it seems he has been buying up lots of copies of 'Evil Digest' magazine. That can only spell trouble. Get on it, Agent P. Monogram out".
After saluting, Perry was off.
"Can I stop painting your car now, Sir?" came the voice of Carl the intern.
"Quiet Carl!" Monogram said to the offscreen intern "You're still on probation for that time you turned evil!"
"I said I was sorry!" Carl whined.
II.
Perry arrived at Doofenshmirtz Evil Incorporated in record time. Bursting through the window, he was prepared to confront his nemesis, only to have a mechanical claw launched out of nowhere and grab him, pinning his arms to his side.
"Ah, I was expecting you, Perry the Platypus" Heinz Doofenshmirtz said as he walked out of the shadows.
The secret agent growled at his enemy.
"I suppose you're wondering what my latest scheme is, right? Hee, hee. Well, I'll tell you" Doofenshmirtz said before getting solemn "You see, I've been wondering why none of my plans to take over the tri-state area have succeeded. So, I decided to take the "How To Know If You're Evil' test in 'Evil Digest'. It was then I received the biggest shock of my evil career. I got...four out of ten.
Perry looked at his enemy confused.
"Yes" Doofenshmirtz went on "I hate to admit it, but I'm not…evil enough. But, I intend to rectify that! Behold!"
With a clap of his hands, a light came on, revealing a large machine with a tube on top and a helmet-like device connected to it.
"I give you the Attitudinator!" Doofenshmirtz said proudly "This device will suck all the good out of me, leaving nothing but pure evil! And then, nothing should be able to stop me from taking over the tri-state area!"
Perry sneered. This was probably his nemesis's biggest plan yet. He had to do something. Studying his surroundings, he soon spotted the controls for the claw holding him. It was then he noticed Doofenshmirtz putting on the helmet of his machine. He had to act fast. Tossing his fedora into the air, he caught it in his mouth and hurled it at the controls. Spinning at high velocity, the hat struck the button, causing the claw to release him. Like a boomerang, his hat came back to him and landed neatly on his head. He then raced towards Doofenshmirtz just as he was about to activate his machine.
"Get ready to see the most evil mind in the entire tri-state are-OOF!" before Doofenshmirtz could finish his monologue, Perry had delivered a powerful kick to his stomach, knocking him away from the Attitudinator.
Getting off the floor, Doofenshmirtz grabbed a screwdriver and pointed it at Perry. The platypus quickly produced a screwdriver of his own. Using the tools as makeshift swords, the two started dueling; thrusting, paring, and blocking. Finally, Perry knocked Doofenshmirtz's screwdriver out of his hand, holding his own up to the villain's chest in victory.
But Doofenshmirtz had one last plan up his sleeve. Reaching behind him, he grabbed the tool box from which he procured the screwdriver and threw it at the platypus, knocking him back right and into the Attitudinator, causing the helmet to fall on the monotreme's head and the machine to activate.
Perry shuttered as the Attitudinator vibrated and blue mist filled the tube on top. A few seconds later, it stopped and Perry fell to the floor.
"Uh, are you okay, Perry the Platypus?" Heinz asked as he approached his foe.
In response, Perry chittered softly. As he got up, the chittering grew louder. Soon, he was facing Doofenshmirtz; his eyes narrowed and his hands rubbing together, and his chittering sounded like…a cackle.
"Perry the Platypus" Doofenshmirtz said in awe "Are you…evil?"
The platypus nodded in response, his cackling chatter continuing.
"Well, that's great!" Doofenshmirtz said enthusiastically "We can be a team! You can be my sidekick!"
The platypus sneered in response.
"What?" Doofenshmirtz said in disbelief "Being my sidekick would be great. You'd get better pay than you do for mister goody-good".
Before Doofenshmirtz could go on, Perry delivered a powerful punch to his chest, knocking him down. The platypus then hit the control panel, trapping Doofenshmirtz in the same claw that he used on him.
Using the materials in Doofenshmirtz's lab, Perry set to work constructing something while his enemy watched. Soon, a large, tower-like machine was in the middle of the lab.
"Perry the Platypus, what is that?" Doofenshmirtz asked.
In response, Perry pulled out a diagram. Using a stick, he pointed at a picture of the tower emitting waves, then to another picture of people acting goofy.
"Oh, I get it" Doofenshmirtz said with realization "You plan to use that machine to numb the minds of everyone within the tri-state area".
The platypus shook his head.
"Wait, not the tri-state area?" Doofenshmirtz said confused "Then what?"
Using his stick, the platypus pointed at a picture of the earth.
"Wait, the world?!" Doofenshmirtz cried in disbelief "That's crazy talk, Perry the Platypus!"
Ignoring his captive, Perry walked over to his machine and prepared to start it up. Meanwhile, Doofenshmirtz struggled to get out the claw. He had to show Perry the Platypus what it really meant to be evil. That's when he came up with an idea. Shaking his foot, he loosened his shoe and tossed it at the control panel where it landed directly on the button, releasing him.
Doofenshmirtz then rushed at Perry, but when he was within a few feet, the platypus whirled around and punched him in the face.
"Wow, you're not easy to sneak up on, are you Perry the Platypus?" the scientist said as he rubbed his face.
Perry then reached into his hat and pulled out a blaster which he pointed at Doofenshmirtz and fired. The mad scientist quickly ducked behind a table which Perry disintegrated, then behind a chair, which was also disintegrated, then he leaped behind a huge machine.
"Wow, you're good at being evil, Perry the Platypus" Doofenshmirtz said, only to duck as another laser blast came at him "A little too good. Well, there can be only one ruler of the tri-state area".
Disregarding the doctor, Perry turned back to his machine as he prepared to turn it on. It was then that Doofenshmirtz slapped the Attitudinator's helmet on the platypus's head.
"Good thing I put in a reverse setting" Doofenshmirtz said as the machine activated.
Perry shuttered as the Attitudinator vibrated and the blue mist flowed out of the tube. The platypus then fell off the machine and collapsed to the floor.
"There, that's more like it" Doofenshmirtz said in satisfactory "And now, Perry the Platypus, I will use your machine to take over the tri-state area!"
With his mind now back to normal, Perry knew what he had to do. Leaping up, he punched Doofenshmirtz away from the machine. He then began looking for the self-destruct button but couldn't find it.
"Ha!" Doofenshmirtz said in triumphant "You didn't build it with a self-destruct button!"
Perry thought for a minute and came to a realization. He may not have built this thing with a self-destruct button, but it still had one flaw. Jumping to the ground, the platypus used enormous strength to tip the machine.
"Wait, what are you doing?" Doofenshmirtz said in distress as the machine fell towards him.
Within moments, the machine Perry had built crashed to the floor, knocking into the Attitudinator, causing it to explode too.
His work done, Perry deployed his hang glider and leapt off the ledge.
"Curse you, Perry the Platypus!" Doofenshmirtz yelled in defeat.
III.
Back at Perry's lair, he was once again in conference with Major Monogram.
"Another job well done, Agent P" Monogram said "I also want to say it's good to have you back on the side of good".
Saluting his boss, Perry left his lair to resume his civilian cover.
"Oh, sure" Carl said in disbelief offscreen "When he turns evil, he doesn't get probation".
"That's because it wasn't his fault he became evil, Carl" Monogram said.
"It wasn't my fault, either!" the intern cried.
"That's a pitiful excuse, Carl" the major said.