Optimus lets Thomas and his friends stay/Midnight Sparkle (Bad Clone)'s death

This is how Optimus lets Thomas and his friends stay and Midnight Sparkle (Bad Clone)'s death goes in Thomas' Adventures of Transformers Prime Beast Hunters: Predacons Rising.

Optimus Prime: Thomas, you and your friends and the ponies will stay here on Cybertron as your home.

Thomas: Thank you, Optimus.

Optimus Prime: You are welcome.

Pinkie Pie: We're gonna be the first ponies to live on Cybertron.

Applejack: Yee-haa!

Rainbow Dash: Awesome!

Rarity: That is fabulous.

Fluttershy: I for once agree.

Optimus Prime: Everyone, there is something Twilight and I must tell you.

Evil Ryan: What is it, Optimus?

Optimus Prime: In order to both protect the Allspark and secure Unicron's defeat, it was necessary for me to empty the vessel's contents.

Thomas: Into where?

Optimus Prime: The Matrix of Leadership and Twilight's horn. As such, my own Spark can no longer be separated from the multitude of others within me. And the very same thing has happened to Twilight. And the reason why I brought Twilight with me was that I wanted to test her and see if she had the capabilities of a Prime.

Ratchet: Are you telling us...that you and Twilight are now..one with the Allspark?

Smokescreen: That's what you say when someone kicks the.

Ultra Magnus: To not return the Allspark to the well would be to prevent future generations of new life from existing on Cybertron.

Optimus Prime: My quest must be completed with Twilight.

Ratchet: Optimus, I didn't return to save a life only to lose the one I care most about.

Thomas: Ratchet's restored planets. He'll find a way to save you and Twilight!

Rainbow Dash: We can turn to Vector Sigma, just like me and Arcee did before.

Optimus Prime: Because the Matrix must now be relinquished with the Allspark, it cannot be restored or passed down to another. But while this may very well mark the end of the age of Primes, leadership can be earned with or without the Matrix, and, in my view.. you have each acted as a Prime.

Knock Out: Well, I never really had the best role models.

Thomas: Twilight... I'm gonna miss you.

Twilight Sparkle: I will too. And all my friends. But I have a few things to say. If evil once again rises in the face of friendship, you can still use it's magic to conquer it. I am also giving the Autobots the chance to use friendship to fight any wrong and turn it into a right and making Thomas the new Element of Magic. It has been an honor being an element bearer, Celestia's student and the Princess of Friendship for such a long time.

[Twilight and her friends have one last hug together]

Twilight Sparkle: Optimus, can I at least say goodbye to my friends before I become one with the Allspark?

Optimus Prime: As even Megatron has demonstrated on this day, every sentient being possesses the capacity for change. I ask only this of you, fellow Autobots keep fighting the noblest of fights.

Bumblebee: You can count on us to keep the peace.

[Arcee, Ratchet, Bulkhead, Bumblebee, Wheeljack, Knock Out, Smokescreen, Ultra Magnus, Rainbow Dash, Pinkie Pie, Rarity, Applejack, Fluttershy, and everyone else watch sadly as Optimus Prime and Twilight Sparkle fly to Primus]

Optimus Prime: Above all, do not lament our absence for in my spark and Twilight's heart, I know that this is not the end but merely a new beginning simply put, another transformation and friendship.

[everyone watches in amazement as Sparks fly out of Primus, including Optimus Prime's Spark and Twilight's heart]

Ryan F-Freeman: Megatron will come see Optimus on Earth again. This time, in a new body.

Crash Bandicoot: You're right, Ryan. Who did you and Brutalight create?

Ryan F-Freeman: Brutan Sparkman.

Cody Fairbrother: Who is Brutan Sparkman?

Brutan Sparkman: It is me, Cody.

Crash Bandicoot: Everyone. Let's go home. To Earth.

[Midnight (Bad Clone) grabs Ryan]

Ryan F-Freeman: Hey! What are you doing!?

Midnight Sparkle (Bad Clone): You could help me understand all the magic.

Sci-Ryan: He is learning about magic. [points Sci-Twi's amulet at her] Any last words?

[Ryan tickles Midnight (Bad Clone)]

Midnight Sparkle (Bad Clone): [giggling]

Ryan F-Freeman: You surrender?

[Midnight Sparkle (Bad Clone) laughs and nods]

Sci-Twi: How did you survive? Ryan and Sunset help me defeat you at the Friendship Games.

[Crash shrugs]

Midnight Sparkle (Bad Clone): [while still laughing] You... Ha-ha! And your friends... Ha-ha-ha! Can never truly... Ha-ha-ha-ha-ha! Defeat me!

Crash Bandicoot: You're a part of Sci-Twi, Midnight. She can use her form for battling bad guys and you'll be a hero. You'll be back, and THIS time, you will become Sci-Twi's good self, you bring back Twilight and have ALL the magic.

[Sci-Ryan absorbs Midnight (Bad Clone) into the amulet]

Sci-Ryan: There. All better.

Thomas: Twilight will be back, Ryan. I am certain.

Ryan F-Freeman: I thought I was made of sterner stuff, Thomas. Twilight can help you fit in at CHS in Thomas' Human Adventure. [starts crying] TWILIGHT!!!

Starlight Glimmer: Ryan? Are you crying?

Ryan F-Freeman: [sniffs] I'm fine! I thought Twilight and I were the same. But, she became one with the Allspark and it TORE OUR FRIENDSHIP APART!

Starlight Glimmer: Don't say that. If you keep this up, you'll end up like I did.

Crash Bandicoot: What is Ryan doing, Starlight?

Ryan F-Freeman: I have to go back in time and stop Prime from filling Twilight's horn with the Allspark so there will be NO WAY for Unicron to change it!

[Optimus's Spark and Twilight's heart fly to Ryan]

Ryan F-Freeman: Huh?

Twilight Sparkle: [voice] Ryan. Listen to me. If one friendship dies, the result could be disastrous.

Ryan F-Freeman: Twilight? Optimus? How can I hear you?

Optimus Prime: [voice]