From the Super Mario Wiki
A Freeze Gun is a handheld weapon capable of encasing its target in a shell of ice. Darth Koopa and Mouser both use the Freeze Gun in one episode of The Super Mario Bros. Super Show!:"Star Koopa". Considering the episode's theme, the effects of the Freeze Gun may be a reference to the freezing with carbonite used in Star Wars.
Darth Koopa, who appeared to have been defeated by Mario in a Lightplunger duel, pulls out his own Freeze Gun at the last second and uses it to freeze him. Princess Toadstool demands for Darth Koopa to defrost Mario, but he instead freezes her along with Luigi and Toad.
After bringing Mario's group aboard Koop Star, Darth Koopa orders Mouser to defrost the heroes using a Heat Gun. When Mario attempts to fight back, Mouser threatens to permanently freeze Mario with his Freeze Gun, convincing him to stand in one spot.