A pirate named Burger-Beard (Antonio Banderas) travels to the island of Bikini Atoll to obtain a magical book that makes any text written upon it come true. The book tells the story of SpongeBob SquarePants, a childlike sea sponge who loves his job as a fry cook at the Krusty Krab fast food restaurant and faithfully guards the secret Krabby Patty formula from Plankton, owner of the Chum Bucket and business rival to Mr. Krabs, SpongeBob and Squidward’s boss.
The Krusty Krab is attacked by Plankton; after a military battle with giant foods and condiments, Plankton feigns surrender: he uses a decoy of himself to offer the greedy Mr. Krabs a fake penny, which he hides inside to gain access to Krabs’ vault. The Plankton decoy distracts Mr. Krabs by crying outside the restaurant so he can gloat about his victory. Plankton steals the formula, leaving a fake in its place; however, just as he is about to escape, SpongeBob catches him and they both have a tug-o-war over the formula, which magically vanishes before either can claim it.