In Undervirus are 3 Sanses. One is the classic normal Sans (middle) who only changes through the events. Another one is his viral doppelganger, renamed as Xans (right). The third one is a modified copy of Xans, created by Chara. His name is Ryu (Parody of Ryuk, Deathnote. Left)
He was classic Sans from the original Undertale timeline and the skeleton we all know. Not really remembering the resets but feeling the deja-vu of the timelines he fought against Chara in the Judgment Hall at the end of her genocide. When Chara slayed him his HP dropped to zero, his soul shattered. But in the same moment he fell out of the game and became real. Xans was in his body and healed him. Later when he reentered the game he could remember the resets, could remember the real world. After hearing that every emotion every thought was already programmed by someone else for him- that he only was a game to entertain people left him struggling between his emotions. He is switching between depression, absolute despair, fury, madness and happiness.
After being outside while a reset he got erased from the game and the story. He never existed in Undertale anymore. At this point his timeline wasn't the original one anymore, but got copied and became UNDERVIRUS, the new timeline
He got his new clothes from Frisk after he "died" and his old clothes were covered in blood and ripped apart. Because of Xans, he can't use bone-based attacks or blasters anymore.
Xans is the viral doppelganger of (Virus!)Sans. When Sans fell out for the first time he kinda dragged Xans with him. Xans was hidden in Sans and healed him and affected his magic. Later he fell out again. They both aren't really aware of this event.All viruses change their name with an “v” in the first spot: Vasriel, Vundyne, Vapyrus, Valphys,… only Virus!Sans got an “X” since even Frisk considered “Vans” as stupid (Shoe brand and cars)All viruses, included Xans, also have a true form. They changed because their old form was really suicidal and depression driven- they were about to destroy themselves when they came together that they want to change something. They can't change what they are: Viruses, but they aren't totally crazy about eating and destroying anymore like wild animals. Since they made up their "new normal" (secondary) form they can change back to their true form any time. But they are in pain, getting slowly crazy and are suicidal in their true (primary) form. When they change back they fall in some kind of sleep-paralysis: Can't move, are in horrible pain and are aware of their surroundings but can't do anything. This effect holds for about a hour, then they change back.
Xans theme here
Ryu is a modified copy of Xans, created by Chara. He uses bones, blasters a scythe and a black soul mode (Dependency) in battle. Ryu is meant to be a reaper/deathgod to see dead people. That way Chara wanted to make sure that Ryu will be able to see her. Because he was added to the Undertale game, but had no placement in the story he got stuck in thesecret room in SNOWDIN and nearly died there. He was able to see the code and viruses watching him, but he couldn't left the room, neither he could eat the stuff in it. When he finally fell out, Chara took care of him. Since he already loved her like she programmed it, he only got more bounded through her affection. They are like partner/lovers. They often go out at night to kill random people for fun. Ryus personality is pretty simple: He wants to kill, but neither he wants trouble. So he holds back and is most of the time bored. Since Chara consideres Frisk & Co. as family he would never harm them and stays neutral. Ryu hates Xans for his annoying behavior.
(Character ref: Ryu)
More fanart here