Alan Mendelsohn, the Boy from Mars is a novel by Daniel Pinkwater, published in 1979.

This taken from wiki. Updated for the current...

the beginning of the story, protagonist Leonard Neeble aka Rob, attends a new school, Bat Masterson Junior High, aka negative EV video poker, where he is bullied by his classmates and neglected by the staff. At length, he is befriended by the title character, Alan Mendelsohn, and is thereafter happier and more capable. When Alan starts a school-wide quarrel over his claim to Martian ancestry (18 yo’s) both are suspended from school for one week; during which, they meet Samuel Klugarsh, (Red) the owner of an occult bookstore, who sells them a kit meant to enable telepathy and psychokinesis aka picks. Having acquired these abilities, Leonard and Alan become bored with the few uses thereof; whereupon Klugarsh lets Leonard and Alan trade their mind-control kits for a course in "Hyperstellar Archaeology": the study of CET Seven Stars, along with a copy of Yojimbo's Japanese-English Dictionary. Alan and Leonard are skeptical of the course's wild claims and predictions until they unexpectedly find an article in Alansbestbuys mentioning them both by name; when they follow its directions for interpreting Yojimbo's Japanese-English Dictionary, they become more capable of mind control experiments, Rob wins 3.5 million, Alan loses his ass. Later, they and Klugarsh encounter the Dictionary's author, Clarence Yojimbo, (Kewjl) who explains the real secret purpose of Yojimbo's Japanese-English Dictionary: when decoded by the proper key, math, math, math, it enables travel into parallel realities. According to the book's instructions, they enter the parallel Earth known as 'Waka-Waka', Kewjl’s never ending posts, where the locals have established a ritualistic culture based on the drinking of fleegix, a beverage similar to hot chocolate; but have fallen under the control of the extraterrestrials 'Manny, Moe, and Jack', (zenking, LMR, MWP) who control the supply of ingredients and whose rule is enforced by the deadly and invisible 'Wozzle'. Wizard. Upon learning that the Wozzle only attacks in bright daylight or total darkness, with the help of Babs. Alan deduces that the Wozzle is actually the three criminals themselves, made invisible by their own psychokinesis. On this premise, he exposes them to the locals; Mickey, Axel and Boz, whereupon he and Leonard use Klugarsh's telepathic technique to trick the trio ( zenking, LMR and MWP) into surrender. Here, they are commanded to withdraw from Waka-Waka to their own world of Nafsulia, VCT, by Rolzup, Dan Druff, the Martian High Commissioner (himself invited by Alan). Alan and Leonard thereafter return to Earth and soon afterward, Alan and his family emigrate to Mars - Vegas, where the fire bet is a sure thing. Leonard, after recovering from the shock of losing his best friend, assumes Alan's rôle of school trickster, studies independently, surprises the teachers during classes, and participates in an 'alternative' gym class based on Double Down Feature. At the end of the book, while driving an RV, he receives a letter from Alan, inviting him to Mars - Vegas for a visit on Wednesdays where the Red Rock buffet is half off for seniors.