At the Chum Bucket, Plankton is on a wagon preparing for another attempt to steal the Krabby Patty Secret Formula. He is pushed into the Krusty Krab and reveals from underneath the blanket covering the wagon a skunk (which he named Mr. Stinky) to everyone there. The customers think the skunk to be just a cat, but Plankton sets Stinky off by scaring him with a bee. All of the customers, Squidward, SpongeBob, and Mr. Krabs frantically leave the Krusty Krab due to the stink. Mr. Krabs knows that Plankton is in the Krusty Krab alone and takes one of SpongeBob's arms to use as a nose plug and heads inside. Mr. Krabs heads into his office to find Plankton surrounded the safe with dynamite. Unfortunately for Plankton, the safe has another safe inside and Mr. Krabs crushes Plankton with his fist and is tossed out of the window by SpongeBob. Mr. Stinky is removed from the restaurant by the HAZMAT Unit and sent away back up to the surface in a basket lifted up by balloons, only for the little number of balloons to bring him back down toward Bikini Bottom, causing the people to run away. Mr. Krabs, worried something like that will happen again, wants SpongeBob to take the secret formula home with him while he makes adjustments to his safe. However, the two of them didn't know Plankton was listening to everything with is severed antenna.
Later at closing time, SpongeBob tries to sneak home with the formula but is greeted by Plankton. The two of them talk for a little bit until SpongeBob excuses himself to go home. The next morning, SpongeBob is seen talking to Gary entrusting the safety of the secret formula to him. Plankton is spying on them and watches as SpongeBob leaves. Plankton then disguises himself as a door-to-door salesman selling snail products. However, Gary closes the door on him and Plankton angrily walks off. Moments later, Plankton is disguised as a Sweetie Patrol Girl and tries to sell cookies to Gary, but Gary ends up putting the sofa with Plankton on it outside. Plankton throws down the cookies in a fit of anger and gets blown up as a result, making a mental note that nitroglycerin is not a good substitute for vanilla extract.
Plankton finally manages to get inside SpongeBob's house by distracting Gary with a fake cut-out of himself. Plankton searches through SpongeBob's house tearing up everything in sight until he is confronted by Gary. Gary manages to beat up Plankton until Plankton escapes through Gary's shell thinking the secret formula is inside. Gary's eyeball starts to chase Plankton throughout his shell. SpongeBob eventually comes home and is horrified by the condition of his house. However, he is glad that the secret formula is safe (which was on top of his television the entire time). SpongeBob notices something is wrong with Gary and decides to take him to the vet. Back inside Gary's shell, Plankton makes it to the center of the shell and appears to have gotten the secret formula. However, it turns out that Plankton was hallucinating the entire time due to the fumes from Gary's shell and runs off into the sunset with what he believes to be the formula (which was actually SpongeBob's grocery list).