Restraining SpongeBob

Restraining SpongeBob is the twenty-eighth episode of the eight season and the three hundred and twenty-second episode of the series. In this episode, a fed-up Squidward resorts to legal action to keep SpongeBob away.

Plot
At home, Squidward wakes up from bed and is increasingly annoyed by SpongeBob sharpening his trusty spatula. As he walks to the Krusty Krab, SpongeBob annoys him by repeatedly asking if he can walk with him. SpongeBob continues to be annoying, especially when he can't seem to figure out the mustard dispenser is empty, with its sound effects causing a patron to think Squidward has a farting problem.

An irritated Squidward enters the kitchen to get it through to SpongeBob. Eventually, he leans on the grill, and accidentally burns his right tentacle. When SpongeBob tries to put the fire out with a bucket of water, he accidentally spills it onto the floor, causing Squidward to slip.

As Squidward flies through the air, SpongeBob tries to catch him in a jellyfishing net, but it breaks, and accidentally dropping Squidward into the deep fryer. The more SpongeBob tries to help him by running over to the deep fryer, by pulling out a fried Squidward, the more he accidentally bungles things, and further injures Squidward by tripping over a mop. After accidentally tripping over the mop, SpongeBob now lands into the order window, causing Squidward to flip right out of the basket, and knocking out a customer's Krabby Patty. The customer now accidentally bites into Squidward's own flesh, results in causing a scream, and now freaks out.

The customer now throws Squidward back to SpongeBob, and lands into the mouth by bouncing right off. When Squidward crashes into a soda machine, breaking it, Mr. Krabs now comes out of the office crying, and SpongeBob goes over to him and asks if he's all right. Squidward screams and runs from him, hiding behind a table. When SpongeBob gets closer, Squidward resorts to climbing the walls and ceiling of The Krusty Krab to get away from him.

The next day, Squidward gives SpongeBob a "gift": a restraining order, which his three lawyers from the law offices of Harry, Combover, and Bald, explain to him. SpongeBob is not to come within 15 feet of Squidward or he'll go to jail. SpongeBob is confused at first, but when he realizes that he can't prepare Krabby Patties if he's in jail, he is struck with fear and does everything he can to avoid coming within 15 feet of Squidward. Unfortunately, the window from which SpongeBob gives orders to Squidward is within the 15 feet range, so the cash register and the counter are moved to the right, by the restroom door. SpongeBob tries to give the orders to Squidward by means of a pole, but Squidward ignores it. Mr. Krabs sees the restraining order is hindering business, so he tells SpongeBob he has to think of another way. Patrick is tiptoeing to Squidward. Squidward tries to ignore him, but it doesn't work. Patrick tries to tell Squidward he now has a hat. Mr. Krabs reveals that he hired Patrick as a middle man: SpongeBob prepares the food, then Patrick gives the order to Squidward. Squidward won't stand it so he marches over to Mr. Krabs and complains to him that this will not stand. Mr. Krabs tells Squidward to get used to Patrick working at the Krusty Krab; unless he wants to talk to SpongeBob, which annoys Squidward.

Unfortunately, Patrick asks Squidward if he can watch him work. Squidward refuses, but he continues to watch. He soon follows Squidward everywhere, and his stupidity soon gets on Squidward's nerves. Squidward's break arrives and he decides to play his clarinet. He soon finds out that Patrick used it as a toilet plunger. Squidward's break is over and he returns to working. He turns around and his nose gets stuck in Patrick's mouth. Squidward gets flung across the room, which causes him to suffer an allergic reaction when his face is smashed into a seaberry pie. When Squidward enters the kitchen, Patrick mistakes him for a monster and attacks him, thinking he's going to hurt SpongeBob. Seeing his two friends fighting, SpongeBob wants to help, but is afraid of violating the restraining order. His desire to help his friends wins out, and he steps in between them, explaining to Patrick that Squidward isn't a monster. Squidward angrily takes the restraining order from SpongeBob, who begs him for mercy. Instead of sending SpongeBob to jail, Squidward crosses out "SpongeBob SquarePants" on the restraining order and replaces it with "Patrick Star." The episode ends with Patrick laughing hysterically, believing that he doesn't care at all.