The book you are looking for is Interstellar Pig by William Sleator. Originally published in 1984 it has since received a sequel in 2002, Parasite Pig.
Barney's boring seaside vacation suddenly becomes more interesting when the cottage next door is occupied by three exotic neighbors who are addicted to a game they call "Interstellar Pig"
Some cool young adult neighbors befriend him. He hangs out with them (two or three guys and a girl) over the summer, and they gain his trust.
Then unexpected neighbors arrive, three of them; two total studs and a fine chick (Manny, Joe, and Zena), all apparently in their early twenties. Barney, who is probably on the path to blindness with all the time on his hands to pound his pud, can’t help but become ecstatic when they seemingly want to hang out with him, though he quickly realizes that they simply using him as a tool to assist in some sort of treasure hunt.
Goodreads, Interstellar Pig review, Chris
He agrees to a play a cool game they talk about, but the game ends up being an altered reality. The people are actually aliens, and they turn into insects. He also turns into an insect (or a slug), and that's how they have to play this game of survival.
Barney realizes that the game is real, the clock is running, and his neighbors—aliens in disguise—will do anything to get the Piggy. Each tries to bribe him with a unique incentive, similar to the Judgement of Paris, but Barney turns them down. Unfortunately by doing so, he's just entered the real game as a player representing the human race.
As Barney hurries to select his weapons and equipment before a horde of aliens descend on his cottage, he makes the startling discovery that he shares a psychic link to the Piggy. The Piggy tells him that it created the game so that it could be loved and appreciated, despite its tendency to detonate whole planets (and their surrounding solar systems) from time to time when it hiccups. Barney concludes that the object of the game is backwards, and it is only the possessor of the Piggy that will be blown up.
Minutes before his home is destroyed, Barney concocts a plan to pass the Piggy off to another player convincingly enough so that it won't arouse suspicion. He tells the carnivorous lichen where to find the Piggy. However, as they approach it he realizes that the same logical inconsistency exists with the Piggy's version of the story. He decides that the only explanation that makes sense is that the Piggy created both stories in order to learn about new people. He abandons the Piggy and lets the lichen board their spaceship home, drawing off the other alien players. Once they depart, no damage is done to either the lichen or to Earth.
Wikipedia, Interstellar Pig
A better description of the aliens is given further down the Wikipedia page where it also mentions Barney turning into a Lichen.
The lichen, who take off with the Piggy in the conclusion, are a race of carnivorous pseudo-sentient fungi. They are composed of masses of single-celled organisms who "cannot lie", which Barney uses to his advantage. He transforms into a lichen during combat and asks the neighboring lichen if it has ever seen the end of a game of Interstellar Pig. It denies this, and Barney concludes that no alien race has ever seen the ending - so the "timer" controlled by the Piggy might not even exist. In essence, the game would continue forever, allowing the Piggy to travel from species to species.