This is how Optimus and Twilight leave Equestria goes in My Little Pony Transformers: Age of Extinction.
[Optimus and Twilight land]
Pinkie Pie: Twilight, you're alright!
Optimus Prime: [to the Dinobots] Brave warriors, you are free.
Crosshairs: I'll ride with you anytime, Spike.
Optimus Prime: This Seed belongs to our creators, whoever they are. There remains a price on mine and Twilight's heads. We'll endanger you all by staying here. We will take the Seed and hide it where it can never be found.
Twilight Sparkle: Will we ever see our friends again?
Optimus Prime: Twilight Sparkle, I do not know. But whenever they look to the stars, let them think of one them as our magic. [to Jazz, Ratchet, Ironhide, Bumblebee, Malfunction, Sideswipe, Drift, Crosshairs, and Hound] Defend these Equines, Autobots, as they have you. Defend all they can be.
[They fly into space as the others watch, Malfunction the saddest of all]
Optimus Prime: (voice) There are mysteries to the universe we were never meant to solve. But who we are and why we are here are not among them. Those answers we carry inside. I am Optimus Prime, and this message is to my creators: Leave planet Equestria alone. ‘Cause Twilight and I are coming…for you.
[Optimus and Twilight
[The credits roll as Battle Cry plays]