This is how Unicron revives and upgrades Megatron and Unicron's deal with Midnight Sparkle (Bad Clone) goes in Thomas' Adventures of Transformers Prime Beast Hunters: Predacons Rising.
Unicron: Megatron. Megatron! Megatron!
[Transformers Prime Beast Hunters theme song plays]
Megatron: I do not understand. Why am I not one with the Allspark? Do I yet live?
Unicron: You do not, yet you cannot join the Allspark because my life blood once flowed through your veins.
Megatron: Dark Energon.
Unicron: It binds you to my Anti-spark.
Megatron: Optimus Prime used the Matrix of Leadership, Twilight used the Magic of the Alicorn, and Ryan used his Keyblade to imprison you within the Earth's core. So how is it that you speak to me now?
Unicron: The foolish Prime, Princess, and Ryan rendered only my material form dormant. But my energy form was roused from slumber when I sensed the awakening of an ancient rival across the cosmos.
Megatron: Primus. So, it would seem that Optimus and Ryan succeeded in restoring Cybertron after my demise.
Unicron: I now wish to finish what I began eons ago, and for that, my Anti-spark requires a vessel.
Megatron: So I will live again?
Unicron: Only to serve me. Your husk will simply be an instrument of my will.
Megatron: And I have also have something else to tell you. A Train-Prime named OpThomas Prime exists and seeks to spread friendship wherever he goes.
Unicron: And who else has got my life blood?
Megatron: An evil clone of that techno-organic, Ryan F-Freeman. He calls himself Evil Ryan now.
[Unicron uses his power to upgrade Megatron and they fly out of the ocean.]
Megatron: Super-luminous space drive. Impressive.
Unicron: One of many upgrades that I've made to your limited corporeal form and wholly necessary to reach Cybertron.
Megatron: So... we are to rule together, as one?
[Unicron zaps Megatron which makes him scream in pain]
Unicron: You will rule nothing! I travel to Cybertron for one reason only-to destroy Primus personally.
Megatron: But... to destroy Primus... is to destroy Cybertron!
Unicron: Thus will begin a new age-the age of chaos!
[Meanwhile, Romeo is making something]
Dr. Cortex: What are you up to, brother?
Romeo (PJ Masks): I'm going to create an evil clone of Midnight Sparkle using a sample of her DNA.
[He puts it into a cloning device and the clone is created]
Romeo (PJ Masks): Midnight Sparkle, I am Romeo. Your master. You will obedient to all villains.
Midnight Sparkle (Bad Clone): [uses her magic to knock Cortex and Romeo into a wall, rendering them unconscious] I am commanded by no one! I pursue the understanding of magic alone.
[She flies away only to run into Unicron]
Unicron: Hey! Watch where you're... [gasps]
[In Megatron's mind]
Megatron: Midnight Sparkle? But how?
Unicron: Must be that PJ Mask villain and Cortex.
Megatron: Romeo. Midnight Sparkle was not created by a villain like other clones were. She was created when Human Twilight Sparkle created a device that could contain magic and unleashed it on herself in the final event of the Friendship Games. But Dark Ryan and Daydream Shimmer turned her back to normal.
Unicron: Dark Ryan?
Megatron: Ryan turned into him when Mal possessed him. And the techno-organic can now turn into him when needing to overcome a tough challenge.
Unicron: Who did Sunset see defeat Midnight?
Megatron: She helped Dark Ryan and his brother defeat her.
Megatron: Light Cody Fairbrother. Also a creation of the amulet-contained magic.
Unicron: Midnight Sparkle, I presume.
Midnight Sparkle (Bad Clone): Megatron?
Unicron: Megatron is here but he's not here. I am Unicron. I have come here to find Primus and his associate, Ryan so I can have Sunset as a villain for Makuta.
Midnight Sparkle (Bad Clone): [shakes his hand] Midnight Sparkle. I wish to gather enough magic so that I can finally learn what it is capable of.
Ryvine Sparkle: Unicron?
Unicron: Ah. Isn't that surprising? A villain who knows my name. Midnight Sparkle, I want to make a deal with you.
Midnight Sparkle (Bad Clone): And that would be?
Ryvine Sparkle: What will it be? Conquer the world? Destroy Primus? Free ice cream?
Unicron: Destroy Primus.
Ryvine Sparkle: In order to destroy Primus, is to destroy Cybertron.
Unicron: Thus will begin the age of chaos. [to Midnight (Bad Clone)] Midnight Sparkle, if you help me destroy Primus, in return, I will help you understand all the magic you want.
[Midnight (Bad Clone) thinks]
Midnight Sparkle (Bad Clone): Deal.
Ryvine Sparkle: Yes! Score! Thanking you. You won't regret it. [laughs crazily like Midnight]
[Unicron hugs Ryvine]
[In Megatron's mind]
Megatron: Ryvine? Alive?