From the Super Mario Wiki
Mighty Tonic is an item found in Super Paper Mario. It can be purchased in Notso's shop in Flopside for 70 coins. When used, the hero's attack power will be doubled for a certain period of time. How long the effect lasts is determined by how much the player can shake the Wii Remote up and down vertically. This effect can last anywhere from 25 (minimum) to 40 (maximum) seconds.