This is how Optimus and Twilight's sacrifice goes in Dark Awakening.
[Optimus and Twilight get ready to make their sacrifice]
Optimus Prime: Optimus Prime and Princess Twilight Sparkle to Autobot fleet. Return to Cybertron. That is our final command.
Twilight Sparkle: And I'm going to have Ryan as the Element of Magic.
[The Autobot fleet heeds their call and return to Cybertron]
Quintesson Judge #1: What?
Quintesson Judge #2: The Autobot fleet is escaping.
Quintesson Judge #3: And their flagship is on a collision trajectory with the detonator!
Quintesson Judge #2: Direct all firepower on that flagship. Obliterate it!
[The ship remains undamaged. Inside the ship, Optimus and Twilight remain in their seat even as the explosions blow chunks of Optimus' body away]
[The Quintessons watch]
Quintesson Judge #1: It's not stopping.
Quintesson Judge #2: No Autobot or pony could survive that.
[We see Optimus and Twilight. An explosion is about to happen]
Optimus Prime: Until all... are... one.
Twilight Sparkle: May friendship guide you to the path of heroism.
[She closes her eyes as Optimus hugs her]
[The ship collides with the detonator asteroid planet and explodes with Twilight and Optimus and the Quintessons]
[The explosion makes a nova as Ryan feels her presence]
[The Autobot fleet flees]
[We see our heroes seeing the nova]
Kup: Goodbye, old friends.
[Applejack, Pinkie Pie, Rarity, Fluttershy, and Rainbow Dash look on in dismay and start to cry. Arcee and Wheelie comfort them as Ultra Magnus and Rodimus Prime look out to deep space]
Ultra Magnus: This nova will be their memorial.
Rodimus Prime: I don't know if Ryan and I will ever be the leaders you two were, but for sure... we're gonna try.
Ryan F-Freeman: I hope so, Prime. Codylight as well.
[The Autobot fleet continues to return to Cybertron and an image of Prime and Twilight wipes in across the stars]
Rodimus Prime: [offscreen] So long, Prime and Twilight.
Ryan F-Freeman: [offscreen] Goodbye, Optimus and Twilight.
Narrator: But is this really the end of Optimus Prime and Princess Twilight Sparkle? Find out in tomorrow's exciting episode, The Return of Optimus Prime and Twilight Sparkle.
[A spark appears in the the distance as the episode ends]
[We see Ryan with Rodimus before transforming]
Narrator: The Transformers will return after these messages.