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 do not have second thoughts.
[The Autobot fleet heeds their call and return to Cybertron]
Quintesson #1: What?
Quintesson #2: The Autobot fleet is escaping.
Quintesson #3: And their flagship is on a collision trajectory with the detonator!
Quintesson #2: Direct all firepower on that ship. Obliterate it!
[They fire at the ship]
[The ship remains undamaged]
[The Quintessons watch]
Quintesson #1: It's not stopping.
Quintesson #2: No Autobot or pony could survive that.
[We see Optimus and Twilight]
Optimus Prime: Until all... are... one.
Twilight Sparkle: May friendship guide you to the path of heroism.
[The ship explodes with Twilight and Optimus and the Quintessons]
[The explosion makes a nova]
[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 begin sobbing over the deaths of their friends. 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 I'll ever be the leader you two were, but for sure... I'm gonna try.
[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.
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]