This is how The Overlord's defeat goes in My Little Pony Transformers Prime: Twilight's Kingdom.
[Twilight realizes something]
Twilight Sparkle: Together! I think we have to do this together!
[The Mane Six turn the keys and the box opens, releasing a bright light. The Mane Six gain Rainbow Power and fly up to the Overlord. The Overlord tries to blast the Rainbow Powered Mane Six, but it has no affect]
The Overlord: How is this possible?! You have no magic!
Twilight Sparkle: You're wrong, Overlord! I may have given you my Alicorn magic, but I carry within me the most powerful magic of all!
[The Mane Six fire a rainbow beam at the Overlord which overpowers him]
[The Overlord feels the magic he stole coming out of him and he changes from his dark purple dragon form to his possessed Garmadon form to his Golden Master form to his first form and finds himself in a cell in Tartarus]