Gary the snail digs up a treasure chest in the yard—inside is a magic bottle, and rubbing it releases the Flying Dutchman along with a shower of doubloons scattered across Bikini Bottom. The Dutchman, furious about the disturbance, takes Gary as an indentured crew member for eternity. SpongeBob sets out across seven worlds to collect letter tiles spelling his name—nine per world—leading to treasures that, according to a Squidward book on defeating evil spirits, are the Dutchman's old personal possessions and the only things capable of weakening him enough for a fair fight.