The Code is the seventh episode of season 5 of The Amazing World of Gumball. It is the 163rd episode overall.
The family go without wi-fi after Mr. Robinson changes the passcode, so Gumball tries to recover it.
The episode begins with Gumball and Darwin wanting to watch a cat video, but the video is not loading. Anais then comes into the room and asks her brothers whether they're having problems with the wi-fi; she gets a response from Gumball that confirms that he is indeed having problems with the Internet. At that moment, Richard walks into the room dressed as a dark elf stating that he was booted off his online game, and then he promptly asks if the wi-fi is working properly. When his children confirm that the wi-fi is down, Richard reveals that he stole the Robinsons' password several years ago, and that the Wattersons have been using their wi-fi since.
After being shamed by his children for such actions, Richard leaves to the kitchen to grab a soda from the refrigerator; meanwhile, the children struggle to find some new source of entertainment. An indeterminate period of pondering later, Gumball recalls another form of entertainment: books. Gumball picks up a dictionary, and he and Darwin pursue to get some entertainment value out of it; it doesn't take long, however, for the two to realize that they're quite bored by it. Anais then suggest that the duo try to imitate the internet in some other fashion.
Darwin uses cardboard and some pictures to try to recreate the Elmoreflix experience of staring at thumbnails for hours. Shortly after, Gumball kicks a package box to his brother into the living room to imitate the email system; when Darwin opens up the package, he gets a "video" (some crudely drawn pictures) of his dad suffering from a lawn chair accident, and he proceeds to chuckle at them. Later in the day, Gumball receives an "email" from Darwin revealing that Gumball accidentally sent the "video" to his father in the hospital. Promptly, Darwin then "video-calls" (carries around cardboard cutout of a video-chatting interface) his distressed pal, advising him to apologize to their father only for Richard to burst into the room laughing about the message he received, clueless on the fact the message was mocking him.
Trying to re-create the online gaming experience, Gumball and Darwin play a game of Scrabble while dishing out insults akin to the insults typically heard in an online video game. Once Gumball scores 32 points with the word "Xenopus", Darwin concludes that Scrabble is a terribly boring game and that only the insults made it interesting.
Some time passes, and Larry is seen joyously humming around Food N' Stuff until he notices all the negative reviews left on some of the products. It turns out all the reviews were a result of the Watterson brothers' vain attempt to troll him. Once thrown out of the store, Gumball believes he can change his IP address by rebooting his router, but the process of rebooting just results in him banging himself in the head repeatedly with a piece of scrap wood.
The next day at school, Gumball walks into the cafeteria shouting that he has just arrived. The cat is trying to emulate the Elmore Plus experience, and Darwin points out that Gumball would need to be jealously looking at other people's photos in order to have the full experience. Shortly after Gumball's awkward attempt to imitate Internet lingo, the boys find a seat next to Ocho; the two then proceed to pester Ocho to grab his attention. When they realize that they can't get a thumbs up from Ocho due to his lack of thumbs, Gumball tries to get a "like" out of the spider by pretending to be a sick boy; when that fails, Gumball and Darwin try to "poke" him for attention. Pestered enough, Ocho explains he isn't in the mood for shenanigans because of his sick grandma; Gumball "likes" that, but since it is not the Internet, Ocho doesn't take that very well, and begins to deliberate on ways to "delete" his two friends in real life. Scared for their lives, Gumball and Darwin make a run for it.
Desperate, the two brothers sit on their front lawn crowdfunding so that they can afford their own internet. Anais scoffs at her older brothers' sad attempt to basically beg for money; her mood quickly changes, however, once she hears her father calling her so that he can take her to the park. Anais insists that Gumball and Darwin hack Mr. Robinson themselves and get the internet back as Richard relies on the Internet for parenting tips, and without the internet, he struggles to parent properly.
Gumball and Darwin are booted into cyberspace where they advance to the Robinson household. However, they are denied access into the area, so the two try to enter via his backdoor. Despite some difficulties with getting the window to maximize, the two manage to get in, but it is at this moment where the firewall activates. Realizing that they must act quickly, Gumball determines that the two should use a Trojan horse to get past the security.
Although the brothers manage to get into Mr. Robinson's files, the anti-virus detects them; in order to avoid detection, the two compress their files into some of the folders. Once they both successfully evade the anti-virus and decompress their files, the two realize that they must get Mr. Robinson to accept cookies.
Their attempts to have Mr. Robinson accept the Internet cookies prove fruitless, so the two prepare to use worms. Before they can begin using worms, Anais calls out the boys, bringing attention to the fact they were never in cyberspace, and their adventure was all in their heads. Not amused, Anais decides to pull out Mr. Robinson's laptop and handle the problem herself. Once the laptop is opened, though, she realizes that Mr. Robinson never changed his password, and that he has simply been using up all the bandwidth with useless toolbars. Quickly, Anais tries to remove all of the toolbars before Mrs. Robinson spots them; she manages to complete the task with just enough time for her and her brothers to escape.
Once home, the children are excited to use the internet again. These dreams, however, are quickly dashed once the home runs out of electricity.