This is the plot of the movie Super Mario Silver Spurs 2: Adventures Beyond.
Episode 1: Cosmic Chaos
First, we see Jumpman leaping through a construction site, trying to save Pauline. It looks very natural, but as soon as a barrel hits him, everything freezes. Upon zooming out, we realize that it was all a normal game of Donkey Kong, and Gumball and Darwin were playing it. Gumball is proud of himself for beating Darwin's high score, and the latter is jealous. They meet up with Mario and Sonic outside, so they can head to an Interuniversal Republic council meeting.
At the meeting, Rosalina, leader of the republic, announces that ever since Mephiles the Dark was locked up in a maximum-security prison, things have been going quite well. The only thing they need to worry about for now is protecting the republic from incoming and potential threats -- which is why she founded the Multiversal Guardians. With that, she closes the meeting, as a shady figure watches from above.
The figure retreats through a portal to a hidden fortress and removes his hood, revealing Count Bleck. He pulls out some stolen files explaining the Dark Star, and chuckles a bit, saying, "They'll never know what hit them."
Meanwhile, Ash Ketchum and his friends Iris and Cilan are walking through the woods with their Pokèmon. They chat about their experiences over the past few weeks, but they are interrupted by a strange dark orb. The Dark Star zooms past them and into a portal; Ash and the others decide to follow it.
In the Grand Metropolis Zone, Mario is having coffee with Sonic, Luigi, and Pac-Man as they ponder the Guardians' next move as a group. Suddenly, the Dark Star shows up and strikes them, creating a few clones led by Cosmic Mario. The Dark Star creates an energy barrier around the heroes, who are forced to watch as their clones run free and wreak havoc on the streets. It is only when they escape through portals and the police are after them that it pushes them away and vanishes. Mario tries to prove their innocence, but the officers think they used magic to create disguises. They arrest Mario, Luigi, Sonic, and Pac-Man, taking them to jail.
Ash, Iris, and Cilan see all of this, and try to sneak into the prison to break them out. Once they do, the seven of them retreat to the nearest dimension hopper and take off. However, Metal Sonic 3.0 zooms over and tries to shut it down, causing them to fall through a portal and crash land in a blocky world.
As they look around, they realize it is very dark. They begin to seek shelter, but are surrounded by cube-ish zombies, who are staggerring towards them from every corner...
Episode 2: Demons Within
Mario and co. try to fend off the zombies, but to no avail. Steve charges in and defeats the zombies, and guides the heroes to his mansion. He questions them at first, but Mario tells him what's been happening, and Steve agrees to help them.
In Elmore, Gumball, Darwin, and Anais hear the news about the Grand Metropolis incident, and decide to look for people who can help them out. Anais, thanks to her knowledge of physics, is able to create a portal to a distant dimension known only as "20XX".
After they step in, they come across Mega Man and Proto Man, who are fighting each other. Gumball asks if they've seen any clones running around, and Mega Man replies that he only knows about Copy Robot. However, he and Proto join them to search for Mario.
We see Kirby and Meta Knight in Dream Land, relaxing on opposite sides of a resort, at least until Galacta Knight swoops in. He explains he's working for Count Bleck, and demands to know the whereabouts of Knuckles the Echidna. After realizing that they won't answer, he challenges them to a battle, which he loses. Galacta Knight flees through a portal, and Kirby grabs a Warp Star to chase after him, with Meta Knight in tow.
Mario, Luigi, Sonic, Pac-Man, Steve, Ash, Cilan, and Iris go around the Overworld looking for obsidian, so they can build a Nether Portal and find an easy dimensional route. After finding all the pieces they need, they craft the portal and step inside, dodging Ghast fireballs as soon as they arrive. They fight Zombie Pigmen and Blazes that are guarding the Nether fortress, eventually finding a small portal to the Mushroon Kingdom.
Gumball, Darwin, Anais, Mega Man, and Proto Man break into a secret base where various portal devices are hidden. Mega Man grabs one, and they go through several worlds before being stopped by Count Bleck and Metal Sonic 3.0, who use the Dark Star to create Cosmic Clones of them. He sends them through a portal.
Kirby and Meta Knight swerve around structures in Ooo, eventually meeting up with Finn and Jake, who follow them to track down Galacta Knight. They soon find him in a Pac-Maze, where they chase him all around until they reach a portal at the edge.
Everyone meets up in front of Bowser's Castle, where Bleck reveals the reason he has been creating these clones: he wants to build a task force capable of blowing away the Interuniversal Republic. Mario and the others fight him, eventually beating the count. Bleck orders the Dark Star to take him to his fortress, but it zaps him, bringing him under its total control. Dark Bleck guides it through another porfal, leaving the Guardians wondering what the Dark Star's true motives are.
Episode 3: Pitch Black
Mario and his allies decide to find a way to stop the Dark Star -- but first, they need to convince Bowser to help them out. After doing so, they take one of his airships to the Dark Doom Pit. The heroes split up and go on separate missions to gather all the resources they need, eventually meeting up at the center of the pit, where they find a hole in the ground.
They jump in and enter an intricate maze of darkness, which they must manuever through to find the Dark Star. When they finally confront it, it sends Cosmic Mario out to distract them while it retreats to higher ground. Mario defeats his clone and leaps up further, fighting Metal Sonic 3.0 and Galacta Knight along the way. He finally comes face to face with Dark Bleck, who almost kills him until Sonic, Gumball, Kirby, Pac-Man, Mega Man, Finn, and Steve show up to help him. After the Dark Star is defeated, it is shattered into several pieces, which are left behind (perhaps unwisely).
Rosalina congratulates the Guardians for their effort, and rewards them with a promotion to the council. They accept this offer, but they know that someone will find the Dark Star fragments and use them to attack the Interuniversal Republic. For now, however, they'll wait and see.
In a post-credit scene, we see a small girl with hair styled like devil horns inspecting the fragments. Mandy smirks maliciously, having finally found a new opportunity for world domination...