From the Super Mario Wiki
The power-draining machine is a machine owned by Grubba allowing him to transfer power from others to himself that appears in Paper Mario: The Thousand-Year Door. He used it to suck power from Prince Mush, KP Pete, and Bandy Andy. It is powered by the Gold Star, which floats at the machine's top in a revolving apparatus. The machine itself takes the form of a large golden cage, connected by various wires to a glowing green power core. When it is used by Grubba to power up into Macho Grubba, the spinning cage that houses the Gold Star spins faster and power flows through the wires faster.