James is seen walking around a room with paintings in light of Rod Serling's Night Gallery and tries to introduce the show but Emily and Lady interrupt telling James to tell the viewers the show is scary but James ignores and we watch the first part.
Thomas falls asleep at work, dreaming of donuts. When he wakes up to get one to eat, he finds out from Percy and Stepney that the remaining donuts have already been eaten. Thomas then declares that he'd sell his soul for a doughnut, causing the Devil (in the form of Edward) to appear. After signing a contract, Thomas is given his doughnut, with the provision that as soon as it's finished, the Devil will own his soul. However, Thomas finds a loophole: if he doesn't finish the doughnut, he's safe. Thomas openly mocks this loophole, to which the Devil promises that he will go to Hell eventually. One evening, Thomas goes down to the kitchen, and without realizing it, eats the last of the doughnut. As expected, the Devil comes to take Thomas's soul, but Rosie asks him to hold a trial, which the Devil agrees to. However, Thomas must spend the day in Hell being severely tortured. Aside from being chopped into pieces, the Blue Demon in the Ironic Punishment Division laughingly plans to feed Thomas all the donuts in the world (this plan backfires when Thomas gleefully keeps eating, much to the confusion of the demon). Back on Earth, Emily already has the trial area set up and hires Derek to defend Thomas.
The Devil and Derek barter on specific terms before the trial begins: The Devil agrees to Derek's request for bathroom breaks, and Derek agrees that the Devil can choose the jury. The Devil's jury includes Benedict Arnold, Lizzy Borden, Richard Nixon (still alive at the time), John Wilkes Booth, Blackbeard the Pirate, John Dillinger, and the 1976 Philadelphia Flyers. The Devil gives the evidence of the contract Thomas signed, pledging his soul for a donut. Derek counters with the definition of a contract according to the dictionary, stating it as something that is unbreakable. Realizing that he's put his foot in his mouth, Derek asks to be excused to the bathroom. When he doesn't return immediately, Emily finds the bathroom window open and Derek long gone.
As the judge prepares to sentence Thomas, Emily shows the jury a photo album showing their wedding day, where Thomas's eating of the whole wedding cake sent them to the emergency room. On the back of a photograph, it is revealed that in a statement of love to Emily, Thomas pledged his soul to her. This causes the jury to declare Thomas's deal with the Devil to be revoked. However, the Devil is not willing to let Thomas best him. With a zap of his power, the Devil turns Thomas's face into a doughnut.
The next morning, Thomas can't stop eating parts of his head. As he decides to go to work, Rosie cautions him to stay home...because standing outside the house are the Sodor Police Department, waiting to rip apart his doughnut-made face and enjoy it with their morning coffee.
Terror at 5½ FeetEdit
James has a nightmare where the bus crashes and wakes up very paranoid. James and Rosie then get on the bus on one rainy morning with The Fat Controller on the bus. Rosie informs everyone that James is acting paranoid, and asks that they act nice to him, causing everyone to laugh at him instead. In the middle of the ride, Bart hears tapping on the window, but it is only Donald, who says he had to kill his mule
and needs a ride. James's nightmare then comes true when a gremlin is attacking the bus James keeps trying to warn everyone but everytime anyone but James looks the gremlin hides and it even causes Bertie to destroy Hiro's AMC Gremlin. James then becomes very annoying and it causes The Fat Controller to close the window, and forces James to sit next to Boco the exchange diesel. James eventually gets the emergency flares and throws one at the gremlin, knocking it off the bus, only to be picked up by Edward. After arriving safely to the school, everyone notices severe damage done to the outside of the bus. James stopped the gremlin from destroying the bus, but with no one as an alibi, he is declared insane for his behavior and is sent to the New Bedlam Insane Asylum for the rest of his life. On the way, James begins to relax at the thought of never having to worry about the gremlin. At that moment, the gremlin shows up at ambulance's back window and shows James, Edward's severed face, causing him to scream uncontrollably.
James brings us to the famous Dogs playing Poker picture (Thomas is frightened at this painting) explaining they had a story to go with it, but it was "far too intense". So they had to put a random story about vampire engines together.
The family are watching TV to find out a vampire engine has been attacking engines and this convinces Rosie vampires are real. The family are then invited to Diesel's mansion for dinner in Pennsylvania. There it is obvious that Diesel is a vampire (with Splatter acting as Reinfield) but no one believes Rosie. James and she find Diesel's secret lair while cleaning themselves from spilling "punch" (really blood) on themselves, which can be easily accessed by staircase. The vampires in the lair awaken, causing the two to flee. James notices a "Super Happy Fun Slide" commenting "Maybe I shouldn't... But when am I going to be here again?", and pulls it, turning the stairs into a slide.
James slides right into the clutches of a vampire woman while the rest of undead surround him.. Diesel suddenly arrives transforming from a bat and stands over James menacingly (despite not knowing his name: "Well if it isn't little..um...engine.") before biting him. Rosie makes it back to her parents and warns them, but they don't believe her when Diesel appears with a clearly bitten James, Who drones in a zombie tone that nothing happened to him. Later that night at the home. James, now a vampire, visits Rosie's window. Showing her that hes bitten and vamped some of the Sodor engines (Henry, Duck and Billy), with Rosie being next. Just as he about to bite her, Thomas, hearing the noise bursts into the room stopping him. This quickly reveals to the family that hes become a vampire while James changes into a bat and flees into the night. Rosie tells her parents the only way to get James back is to kill Diesel. They sneak back into his castle and stake Diesel in his coffin (though not before Diesel briefly comes back to life and fires Thomas).
The family are then eating dinner and Rosie finds out that her whole family are vampires and that Emily is the real head vampire ("I have a life outside of home, you know."). The family go to attack her...then turn to the screen, saying Happy Halloween while going through a Charlie Brown Christmas Special ending parody.