This is how the Indominus Rex freed the eight Legendary Pokémon in War of the Apocalypse.
(The Indominus Rex rams the door. Meanwhile all the villains watches the Indominus Rex in the captive room where they kept Legendary Pokémon)
Foolscap: Oh, no!
Attila: How is that blasted beast doing that?!
Hun: It enter the captive room!
King Nixel: Oh, no! The captive room has eight Legendary Pokémon we captured them!
Major Nixel: Do something!
Shredder: Stop it before it frees all Legendary Pokémon!
(The Indominus Rex roars, attacks and defeats the Nixels, Team Rocket Grunts, Rahzar, Tiger Claw, Fishface, Bebop and Rocksteady. It steps on the machine and frees Kyurem, it flies up transforming into White Kyurem unleashing Ice Burn and freezes one of the propellers on the Tandem Rotors. It swirls out of control and crashes into the machine and exploded as Indominus Rex makes a run for it, the orbs shuts off and frees Groudon, Kyogre, Tornadus, Thundurus, Articuno, Zapdos & Moltres. The Bird Trio, Tornadus, Thundurus and Kyurem flies off while Groudon walks and Kyogre swims to escape)
Major Nixel: The Hybrid Dinosaur frees the Legendary Pokémon we've captured!
Dr. Eggman: I can't believe this!
Bowser: Indominus Rex! How could you?!
Adagio Dazzle: Great! First Indominus got loose! Now it free eight Legendary Pokémon we capture them! Without our army of Legendary Pokémon, Tino will never join us!
King Nixel: Enough, we need a Plan!
Mr. Ross: We'll recapture them and control them again!