From the Super Mario Wiki
In The Adventures of Super Mario Bros. 3 episode "Recycled Koopa", Mario and Luigi, needing to clean up all of the mutating garbage Bowser was dumping on Brooklyn, decided to build the Trash Smasher to help them clean up. Luigi wound up using the Trash Smasher alone to clean Brooklyn though, as Mario, while adding the finishing touches to the Trash Smasher, was himself mutated into a Koopa Zombie due to the exposure of King Koopa's litter.
Using the Trash Smasher, Luigi was able to clean all of Brooklyn and change all its Koopa Zombified-human inhabitants back to normal, as well as give the inhabitants of Brooklyn various appliances, which the Trash Smasher converted garbage into.
With all King Koopa's trash recycled into household appliances and Mario changed back to normal, Mario and Luigi boarded the Trash Smasher, which sprouted whirling helicopter blades, and began to fly after Bowser and his Doomship; with Mario, Luigi and the Trash Smasher chasing him, the Koopa King quickly maneuvered his Doomship and tried to escape from his pursuers.