Story
Every hundred years, a comet passes over the Mushroom Kingdom and rains down magical stars and stardust. Princess Peach invites Mario to her castle to join in the festivities and receive a special gift. As the citizens of the kingdom are celebrating the centennial event, Bowser attacks the Toads with his airships and freezes them in crystals. He "invites" Peach to the creation of his new galaxy and warps into space with her castle to the center of the universe. When Mario tries to save her, a Magikoopa (possibly Kamek) throws a spell at Mario sending him to a small planetoid and knocking him out.
When Mario later wakes up on the small grassy planet, he meets three Star Bunnies, who promise to tell Mario where he is if he can catch them. When he does so, they transform back into Lumas and take him to meet Rosalina, who tells Mario that the universe is in great peril after Bowser attacked her ship — the Comet Observatory — and stole the Power Stars, including seven Grand Stars. Without these, the Comet Observatory is doomed. Rosalina asks him to rescue the Grand Stars in order to defeat Bowser, who took Peach to the center of the universe. Mario then starts his journey across the galaxies, freeing Power and Grand Stars. Once five of the Grand Stars are collected, the Comet Observatory becomes a starship and takes Mario to the center of the universe.
Here he defeats Bowser in his brand-new galaxy, retrieves the last Grand Star, and rescues Princess Peach. Without this Grand Star, the sun of Bowser's near-complete galaxy undergoes a supernova and becomes a supermassive black hole. Everything in the universe begins to be pulled into it. The Lumas from the Comet Observatory, including the Luma who had faithfully accompanied Mario through his journey, throw themselves into the black hole in order to neutralize it. The Lumas attack the black hole's singularity, and it soon disintegrates in a massive explosion. Mario appears in front of Rosalina, who had somehow managed to save him from the cataclysm. She tells him that this is not the end, but a new beginning for the universe, and that the universe is an endless cycle, one that never repeats itself exactly the same way.
Mario later awakens in the Mushroom Kingdom near Peach's Castle. He sees everyone he's met throughout his adventure (friend and foe alike) celebrating the festival, while Bowser and Peach lie next to him confused. When he looks in the air, he notices the reconstructed galaxy. "Welcome! Welcome new galaxy!" Mario exclaims, as the camera zooms out into space, revealing that the universe has been reset. If Mario continues, Rosalina states to the player that if he collects all 120 Power Stars, Mario can travel to a new world. If Mario collects 120 stars, a special cut scene plays after the credits. Rosalina and a group of Lumas appear on the planet Mario started on at the beginning of the game. Rosalina says "I will watch over you from beyond the stars," and flies off to the Comet Observatory. The white Luma is shown to be alive as if nothing happened, now residing on the small Gate planet, inside a destroyed Starshroom that is covered in moss.
Enter the Small House
The player must head to the Deep Dark Galaxy and choose a level where the cannon can be used. Next the player should take Mario / Luigi to the shrinking planet (Located in Deep Dark's sky). Next, Mario / Luigi must kneel and enter the door of the house with the blue roof (achieved by holding down the Z button and walking into the doorway). Mario / Luigi should now be inside the house. Once inside, the player can see the inner walls of the house as well as the coins that are hidden inside the planet. The house's walls aren't solid from the inside, so to leave the house, Mario / Luigi simply have to walk out.
Enter the Starshroom
In the level Kamella's Airship Armada in the Space Junk Galaxy, Mario/Luigi starts out on a yellow Starshroom, facing a red one. The player has to stand in the middle of the yellow one, then run at the red one and do a long jump. If they hit a certain point on the red Starshroom, they will be thrust back to the yellow one and end up inside it. When this happens, it will be impossible to access first-person view. However, if the player jumps around while inside then this view may be accessed. There is no way to exit the Starshroom; the level must be exited for the player to escape.
Use Flying Luigi to Go to the Planet of Trials
On the Comet Observatory, the player can use the flying power-up to go to the Trial Galaxy planet using this glitch. The player must be Luigi. He must break open the crystal with the Red Star in the Garage, but must not use it and go to the Trial Galaxy planet. Luigi must go to one of the three ends and run, then long jump in the middle of the two other sides, and Luigi will fall out of the planet's gravity field. The player must use the spin to navigate as Luigi falls to the observatory, and touch the Red Star without landing on the observatory itself, then continue falling until Luigi is lifted back to the planet. The game will not allow Luigi to fly on this planet, but the music will still play for the power-up and the suit will still be the color of the power-up.
Rising Dry Bones
To do this glitch the player must go to Dusty Dune Galaxy, then to the mission called Sun Baked Sand Castle. After the player ground pounds the button in order to raise the tower, the player then aims the cursor at the Dry Bones and holds down A to stun it (while the tower is still rising). The Dry Bones will keep rising until the player stops stunning it.
Invincible Koopa Troopa Shell
To do this glitch the player must go to Sea Slide Galaxy, to the mission Faster Than a Speeding Penguin. The player must go to the island with red Koopa Troopa and collect its shell, then return to the racing penguins. There should be a Green Koopa Troopa. If Mario touches it while holding the shell, he won't take damage.
Flinging Mario
There are two ways that the player can fling Mario to both the Toy Time Galaxy and the Dusty Dune Galaxy.
To do this in the Toy Time Galaxy, the player must start the mission Fast Foes of Toy Time and go to one of the Tox Boxes and land in the hole. It makes Mario lose a life, but it flings Mario and falls in the level. It can also fling the camera when Mario gets squished by the Tox Boxes when doing this glitch.
To do this in the Dusty Dune Galaxy, the player must start the level Blasting Through the Sand. When the player goes to the planet that has the switch, Mario must ground pound it and wait. Mario should jump several times and when time runs out, Mario will be flung into the sky.