While Rick is inside the machine, he tasks Summer with defending the arcade from the terrorists by "doing a Die Hard".
The episode returns to the intergalactic arcade , where Morty is playing the life-simulator game Roy: A Life Well Lived . When alien terrorists attack and cause a power surge, Morty’s consciousness is shattered and distributed across all 5 billion non-player characters (NPCs) within the game.
Rick enters the game as Roy to convince the NPCs—who each represent 1/5 billionth of Morty—that they are part of a larger consciousness and must leave the planet in spaceships to "re-assemble".
One fragment, Marta, represents Morty’s rebellious side and his desire for Rick’s genuine love. In the end, she stays behind in the simulation to live a full life, while the rest of Morty returns to the real world, notably more "subservient" to Rick than before. The B-Plot: "Doing a Die Hard"