Mr. Krabs is holding a yard sale with items found in the trash, when SpongeBob and Patrick stop by to visit. SpongeBob finds and buys a soda drinking hat for $10. Later, Krabs is confronted by a group of rich collectors, who inform him that the soda drinking hat he is in possession of is extremely valuable, and offer to pay him up to one million dollars for it. Mr. Krabs goes to SpongeBob and desperately tries to get him to give the hat back, but to no avail. Mr. Krabs then concludes that he will have to "scare" the hat off of SpongeBob.
That night, Mr. Krabs draws an obviously fake ghost on a piece of paper and puts it through SpongeBob's window using a fishing rod. SpongeBob thinks it's a real ghost, and Mr. Krabs tells him that the hat is cursed, and must be returned to its deceased original owner. When SpongeBob asks the name of the owner, Mr. Krabs hastily makes up the name. However, Mr. Krabs' plan backfires when there turns out to be an actual dead person with that name, and that SpongeBob buried the hat in this grave.
Mr. Krabs goes to the cemetery, where he gets scared and hides behind a headstone, when along comes Squidward bringing flowers to a grave labeled "Squidward's Hopes and Dreams" and remarks "What a baby."
Mr. Krabs then proceeds to remember things SpongeBob has said to him, and uses that information to find and then defile Smitty's grave and take the hat. However, Smitty and the others buried in the cemetery suddenly come to life, and attempt to get the hat back. Mr. Krabs grabs the head of an undead swordfish, and uses that as his sword. He fights the undead skeleton warriors all night, eventually defeating them all and escaping with the hat. He then goes to the collectors and tells them that he got the hat back, but the collectors laugh at him telling him that they found a warehouse full of soda drinking hats and that it's now worthless. The collectors see SpongeBob wearing a clapping hat and they chase him, offering to pay one billion dollars for his hat. Mr. Krabs starts crying, and Squidward, who was seen bringing flowers to the grave of "Squidward's Hopes And Dreams" in the graveyard, says "What a baby."
When Mr. Krabs gets the "million dollar" hat, he goes back to his back yard where the previous buyers of the hat are all gathered, later to find none of them are interested in buying the hat at all. This is unrealistic that they would all still be waiting for him to return having known that the hat is now worthless.
This is one of the few episodes where a character other than SpongeBob plays a major role.
The name of the episode is a reference to the saying "One man's trash is another man's treasure," coincidentally, The French narrator says exactly the same phrase at the beginning of the episode.
This is one of the few episodes where Spongebob plays a minor role.
When the undead army appears, Mr. Krabs describes the many gruesome things zombies are known for doing in many stories and films depicting them.
When SpongeBob gives Mr. Krabs a bill, and then goes home to search for more money, he comes back with 2 bills in his hand.
When Mr. Krabs is standing infront of smitty's grave it says " Smitty Werben Man Jensen" but, according to the name, Mr. Krabs told SpongeBob it really should be "Smitty Werben Jager Man Jensen." The illustrater forgot the word "Jager."
When one fish tries to buy an umbrella from Mr. Krabs and is discovered to have holes in it, Mr. Krabs states that it was from the queen of Switzerland. It's illogical that Mr. Krabs (or the fish) know anything about Switzerland, being in the tropical Pacific Ocean.
In Indonesia, Krabs' line, which is "Of course I am!" changed to "Doomed me!"
Also, one of the collectors didn't say "Now that's worth a million dollars." He says "Now that's worth a billion dollars."