One of Ness' party member prayed for help. Each prayer had people everywhere send their power to damage Giygas. The last prayer was directed to you, The Player, an extradimensional being, in order to kill Giygas.
They still had to survive long enough to Pray 9 times though.
--
My Little Phineas and Ferb: Summer is Magic!