A cargo ship drops batteries into the ocean. Plankton finds them and uses them to power his giant robot and robot army and takes the safe with the Krabby Patty secret formula. He also takes the map to the key and the two copies of it that opens the safe. SpongeBob and his friends have to stop him, defeat his robot minions and family members, retrieve the batteries, and find the three keys before he does to get the formula back. They fight Plankton in the Dutchman's Triangle, but he survives his defeat and retreats. The gang then fight two of Plankton's family members, who also have giant robots, in other areas. After getting the first two keys and batteries, they go back to the Krusty Krab and fight Plankton again. After he is defeated, they retrieve the last battery and find the last key under the doormat and use it to open the safe. In the bottle was a note saying the formula is in Mr. Krabs' pocket the whole time and it is. Squidward was shocked that they've been through this for nothing. That night, when SpongeBob and Patrick were watching TV in Patrick's house, SpongeBob wonders where the batteries went and was amazed that Patrick's TV is working so well. It is then revealed that the batteries were powering the TV from the outside.