Spongebob and Friends battle The Goblin King

In this possible future adventure from the Spongebob series, Spongebob reunites with Scooby Doo for a visit to a Halloween Carnival, but Master Xehanort lurks in the shadows, still obsessed with turning Spyro into the 13th Seeker of Darkness. To do so, he has tricked a stage magician, the Amazing Krudsky, into stealing the staff of the Goblin King, who is Jack Skellington's personal second-in-command of Halloween Town and a distant relative to Maleficent. With the powers of the staff, Krusky revives Sarah Ravencroft, Simone Lenoir, Queen La, and Tarakudo to help him in destroying the real and spirit worlds. Can Spongebob and Scooby Doo save the universe from Krudsky's madness, or will they be forced to battle their friends, who have been turned into...(gulp) Monsters?!

Plot
The [http://en.wikipedia.org/wiki/Mystery,_Inc. Mystery, Inc.] gang visit a Halloween carnival on Halloween night. When the magician "The Amazing Krudsky" (voiced by Wayne Knight) does not allow Scooby to see his show, Shaggy and Scooby expose Krudsky as a fraud. Later, the rebellious fairy Princess Willow (voiced by Hayden Panettiere) enters Krudsky's tent, where he secretly reveals his wishes to become a real magician. The fairy inadvertently causes Krudsky to notice an entry on the Goblin Scepter in a spell book. The goblin scepter can be combined with fairy magic to control Halloween. Krudsky then gets an idea to obtain the scepter and rule the world with it. The fairy decides to toy with him, but while flying, the fairy accidentally slams her small body against a metal chair knocking her out; Krudsky then crushes her with his flyswatter. When he notices her cry of pain from being crushed, he sees that she is a real fairy, kidnaps her, and absorbs her magical powers, becoming a real magician.

Meanwhile, Shaggy and Scooby trick-or-treat all night. Their last stop is a spooky looking house which claims to be a "genuine magic shoppe". However, a very loud thunderstorm also begins, frightening our heroes. Inside, they meet the kind Mr. Gibbles (voiced by Wallace Shawn), who reveals that magic really does exist. At that moment, Willow enters, being chased by Krudsky. Krudsky captures the Princess, turns Gibbles into a rabbit, and steals the magic equipment before leaving. Mr. Gibbles explains to an astonished Shaggy and Scooby that Krudsky, after capturing the good magic of the princess, will now want the bad magic held in the scepter of the Goblin King, which will cause an imbalance in the supernatural order. Shaggy and Scooby must go into the world of magic via the Grim Reaper Railway, get the scepter before Krudsky can, and return home before sunrise or else they will be trapped in the magic world forever. Before they depart, Gibbles gives them magic cards that perform spells just by reading the inscription on each one. However, they have to be saved for emergencies because each card can only be used once and each spell is temporary. To make it less suspicious-looking, Shaggy and Scooby are magically disguised by being transformed into monster-like versions of themselves.

While looking for Shaggy and Scooby, Fred, Daphne, and Velma see Krudsky conversing with the Goblin King through a mirror where the Goblin King (voiced by Tim Curry) agrees to exchange his scepter for Willow at midnight at a clock tower. The three decide to go the tower and set a trap for the King and Krudsky. In the magic world, Shaggy and Scooby go to a bar owned by a werewolf and find that everyone is afraid of the Goblin King and will not help them. The Goblin King's two bumbling henchmen, Glob and Glum (voiced by James Belushi and Larry Joe Campbell), attempt to capture Scooby and Shaggy, but they are saved by Jack O'Lantern (voiced by Jay Leno), a living pumpkin who leads them to three witches while running away from the Headless Horseman. Along the way, they avoid the Headless Horseman (who was Jack's former body) by heading across a covered bridge which the Headless Horseman can't cross. The three of arrive at the Witches' Hut where they meet the Grand Witch (voiced by Lauren Bacall) and her two fellow witches (voiced by Grey DeLisle and Russi Taylor). The witches send Shaggy and Scooby on a ride on their flying broomstick named Broomy towards the Goblin King's castle, but they are shot down by Glob and Glum by a goblin gun-like cannon.

Landing in a fairy village, Shaggy and Scooby find three fairies who help them to the Goblin King's castle entrance. Using a potion from the witches (made from someone called Scratch), Shaggy and Scooby disguise themselves as Daphne and Velma in order for Glob and Glum to let them into the castle. Only a few minutes away from midnight, Shaggy and Scooby try to run off with the scepter, but are caught and sent to the dungeon by the Goblin King who heads off to meet with Krudsky. At the clock tower, Krudsky and the Goblin King are almost through with their trade when Fred, Daphne, and Velma release a trap and run off with the princess.

But the trap only catches the Goblin King and Krudsky takes the scepter turning himself into the new Goblin King. After turning the Goblin King into a goose, Krudsky and his goblin army capture Fred, Daphne, and Velma, and he uses his powers to turn Fred into a vampire, Daphne into a witch and Velma into a werewolf respectively. At that moment, Scooby, Shaggy, and Jack O'Lantern arrive having been saved from the dungeon before sunrise by the fairies and Broomy. Jack sacrifices himself to strip Krudsky of the staff which Scooby uses to break Krudsky's spells restoring his friends and the Goblin King, to normal. The goblin king, revealed to be Willow's father, punishes her for the trouble she caused and admits he's relieved to have her back. Mr. Gibbles brings Jack back to life with the Goblin King's help. The Goblin King then takes Krudsky prisoner for his crimes and his treachery as he returns to the magic world along with the goblin army, Willow, Jack, Broomy, and Mr. Gibbles. To keep the balance between the worlds, the Goblin King also uses one final spell to erase the memory of the events from Fred, Daphne, and Velma's minds, though Scooby and Shaggy are allowed to keep their memory as they have proven their courage.