Here's how Twilight returns back to a unicorn and the ending goes in Wrath of the Country.
Little Bear: Twilight, look!
["Entei's last stand" begins playing]
[A Glow around Twilight is circled around and vanishes and her wings are gone!]
Hen: Your wings! They're gone!
Twilight: I know. Because I now realize that I can use them whenever I feel like it.
Brian: Twilight, I'm sorry I kissed you, and shared some romantic feelings about you.
Thomas: You what?
Sylveon: It's a long story.
Twilight: And I'm sorry too, Brian. Truth is I had some romantic feelings about you too. I thought you were handsome and cool just like Thomas. But I feel like that staying as best friends would be a whole lot better.
Brian: Yeah, friends are nice.
[They soon smile at each other and hugged]
Thomas: So, you guys think you might stay a little longer.
Trax: I don't think so, OpThomas. Since our planet has finally returned after the war. We shall rebuild it, and your's. But to be honest, I think it's time for us to go home.
[Soon, the Insect Boys transform back into their bug modes, and the Trainbots use Lockdown's ship. And they fly up to Cybertrain, as it begins to move out of Earth]
Edd: Hey, Cera. I was wondering. What did you do to Triek's body and horns?
Cera: Oh. [holds out a big jar full of ashes] See for yourself.
Eddy: Uh, Cera. That's a jar of ashes.
Cera: Not just any ashes. These are Tirek's ashes.
Edd: You creamted him?!
Cera: Yeah, that way, there is nothing left of his DNA for possible ressurection. And I will personally hand-deliver these ashes straight to his parents and they can decide what to do with them. I'm just glad I won't have to deal with this pyschopath anymore.
Eddy: Same here, Cera. Same here.
Optimus: [narrating] Today, we were at our finest hour. Thomas, Princess Celestia's student, and my apprentice has turned on us. But was managed to turn back to our side, and we have sucessfully managed to kill Megatrain for good, and destroying the mad goddess "Angel Death". But even though that some of the villains have survived and ran away, Tirek has finally been destroyed, and defeated for good.
Ember: [lefts up Gabby] I'm proud of you. [strokes her mane] You did good.
Optimus: [continues narrating] And now, the secret of the Trainsformers has finally been revealed, and we must help them restore their world. As well as our's. I am Optimus Prime, and I send this message to other Trainbots, that it's time for you, to come home.
[Then it goes back to Patchy]
Patchy: Well, pretty good story, Eh, kids? I found Encino. But, it's all tiny. Somebody must have...Ahhhhhhh! Ahhhh! Ahhhhhh!
Norbluckfive's mother: Sorry, sir. But, our son Norbluckfive was messing with his shrink-a-tron again.
Patchy: No, no, no, no! I want Encino full size again! There's no place like home. There's no place like home.
Norbluckfive's mother: Ok, hand it over, Nobluckfive.
Norbluckfive's mother: We'll fix your town, Beardy.
Patchy: Beardy? Arrr! Arrr! Arrrr! Arrrrrrrrrrrrrrrrrrrrrrrrrrrgh! Ahhhhhhhhh! Ahhhhhhhhh! Well, Look's like everything's back to the right size, eh, Potty? Potty?
Patchy: Well, kids, I'm a little busy right now, but, be sure to come back real soon for more of your old pal Patchy. Ow! And some more of our heroes Chronicles. Potty, will you get off of me!
[And then the film ends with "Rainbow" by Sia]