From the Super Mario Wiki
In Super Paper Mario, Private Koopa was seemingly among the Koopa Troop members organized by Bowser for his raid on Princess Peach's Castle; this meeting of the Koopa Troop was subsequently interrupted by the appearance of Mario, Luigi and later, Count Bleck (the first two under the belief that Bowser had already abducted Peach, and the last of whom had already beaten Bowser toward abducting Peach, respectively). After knocking Mario unconscious, Count Bleck proceeded to transport everyone present at Bowser's meeting to Bowser and Princess Peach's "wedding". Among the captive yet cheering crowd, Private Koopa bore witness to Count Bleck and Nastasia's marrying of Bowser and Princess Peach and the summoning of the Chaos Heart.
Private Koopa was subsequently transported into Count Bleck's realm, where he and his unnamed Hammer Bro Captain wandered around aimlessly, eventually stumbling upon an unconscious Princess Peach. After Peach was awakened, the Hammer Bro left Private Koopa to guard her while he went to search for what remained of the Koopa Troop, most of whom had been brainwashed by Nastasia. Unfortunately, as they attempted to find their way out of Castle Bleck, Private Koopa and Princess Peach were discovered by Nastasia, who proceeded to brainwash Private Koopa, making him wear sunglasses and spiked bangles. It is unknown what happened to Private Koopa at the end of the game but it is likely he was changed back to normal at the end.