The Kingdom of Harmony

Summary
Lord Tirek escapes from Tartarus and plans on draining all of Equestria of its' magic, Celestia enlists Discord to go stop him, but when Eggman teams up with Tirek in order to finally take down Sonic, Celestia, Luna and Cadance may have to give their power to the Mane Six in order to save everyone.

Differences

 * Discord doesn't betray his friends to join Tirek, though he ends up getting his magic drained much eariler due to this.
 * Since Applejack, Rarity, Pinkie Pie, Fluttershy and Rainbow Dash are also alicorns in this timeline, they join Twilight in keeping Celestia, Luna and Cadance's magic safe.
 * Applebloom, Scootaloo, Sweetie Belle, Nyx, Snowdrop, Sunset Shimmer and Trixie Lulamoon end up joining Spike and Discord when Tirek suggests a trade following his battle with the Mane Six, in addition, Celestia, Luna and Cadance are never sent to Tartarus.

Transcript
[In the Badlands, Sonic was chasing Eggman, who was Eggmobile]

Sonic: You can't lose me, Egghead!

Dr. Eggman: EggMAN! You know my name is Dr. Eggman! You do that on purpose!

Sonic: Do what, Egghead?

[The chase continues, but Sonic is eventually forced to stop, teetering on the edge of a cliff]

Sonic: Who-o-oa!

[Sonic manages to get back to safety. The camera zooms out to reveal Dr. Eggman way up above.]

Dr. Eggman: It all ends here, old friend. Prepare to be destroyed by Burnbot!

[The camera shifts to reveal Burnbot.]

Sonic: So what, he's gonna burn me with flamethrowers or something?

Dr. Eggman: Flamethrower? Well... no...

Sonic: Oh, uh, acid? Incendiary grenades?!

Dr. Eggman: No no no, the li- claws! He has claws! Very painful claws!

Sonic: Then you should have called him "Clawbot" or "The Lacerator" or "Pinch-a-tron 9000." But "Burnbot"? I mean, that's just false advertising!

Dr. Eggman: I name the robots, Sonic! Burnbot, attack!

[Burnbot jumps down and starts speeding towards Sonic. Sonic runs in the same direction, keeping directly across from Burnbot. Overhead, Tails flies by in his plane.]

Tails: Blue Leader, this is Yellow Sky. I have eyes on Burnbot. He's on the move! Over.

Sonic: Thanks, Tails. Initiate "Speeding Swing Surprise."

[Tails dives his plane into the canyon, sending Eggman into a spin. Tails activates his Enerbeam. Sonic and Burnbot leap at each other as the scene goes into slow motion. Tails flies by, throwing the beam to Sonic. Sonic catches the beam, swings around on it, and delivers a kick to Burnbot, launching him into the cliff where he explodes. Sonic lands on the other side of the cliff]

Sonic: Nice try Egghead!

Dr. Eggman: [angrily] This isn't over, I'll be back, with a new robot, and next time it'll have a accurate name! [flies away]

Tails: Well, that's done, what now?

Sonic: Let's get to the Crystal Empire, the others are pratically gonna be there already.

Tails: Okay!

[Sonic jumps onto the Tornado and they fly towards the Crystal Empire, soon arriving right as the Mane Six, Spike and the rest of Team Sonic got off the train]

Spike: Seems like only yesterday I was saving this place from being totally destroyed. Hey, you guys remember that?

Rainbow Dash: You only mentioned it about fifteen times on the train here.

Rarity: [sarcastically, to Rainbow Dash] Yes, and we never hear a peep out of you about your exploits.

Rainbow Dash: Heh, point taken.

[Sonic and Tails ran towards the group]

Sonic: Hey guys, sorry we're late, just had to deal with Eggman real quick.

Amy Rose: Did it go well?

Tails: Pretty much.

Twilight Sparkle: I'm glad you and your friends wanted to come Sonic.

Applejack: Though, I'll be honest, I don't think it's gonna be that exciting.

Fluttershy: Yeah, we pretty much just have to smile and wave as the dignitaries arrive.

Blaze: How is that bad, you get to smile and wave like a princess.

Silver: How exactly is that different than smiling and waving like not a princess?

Rainbow Dash: It isn't.

Cream: Is there something?

Knuckles: Yeah, you and the others have kinda been worried since we got on the train.

Twilight Sparkle: Well, we've just been feeling a little unsure about things lately.

Pinkie Pie: It doesn't exactly seem that our new roles as princesses equate to all that much.

Rouge: That's just silly. You've got very important roles in Equestria.

Shadow: Princess Celestia wouldn't have asked you six to come today if she didn't think so.

Twilight Sparkle: I guess you're right.

Amy Rose: Of course we are. Now hurry along! You don't want to risk having those important roles diminished because you were tardy for your regal meet-and-greet.

[fanfare]

Flash Sentry: The Duke and Duchess of Maretonia!

Spike: That was it? Princess Celestia had you six come all the way to the Crystal Empire just to do that? I mean, whoa, really regal and important! [laughs nervously]

[thwack]

[doors open]

Duke of Maretonia: Your highness. Thank you for understanding our desire to keep the number of those privy to these confidential discussions to a minimum.

Twilight Sparkle: Of course.

[doors open and close]

Pinkie Pie: So, is there anything else I can do to assist with their visit?

Princess Cadance: I'm sorry, girls, but their visit is already over.

Twilight Sparkle: Oh.

Princess Luna: Something wrong?

Twilight Sparkle: I guess we just don't really understand why we're here.

Applejack: Yeah, I mean, couldn't one of the royal guard have unfurled the banner?

Princess Celestia: Having all nine of us in the Empire to greet them lets the dignitaries know that their visit is considered an important one.

Princess Cadance: Plus, it gives me an opportunity to see my favorite sister-in-law and her friends.

[Princess Cadance goes over to Twilight]

Twilight Sparkle: And we're happy to see you. All of you.

[Princess Celestia and Princess Luna look at each other, worried about the Mane Six. Princess Cadance hugs her]

Princess Cadance: But...?

Twilight Sparkle: But we... well...

Fluttershy: It's just that Princess Luna raises the moon.

Pinkie Pie: Princess Celestia raises the sun.

Rarity: [to Cadance] You protect the Crystal Empire.

Applejack: And all we've done so far is... smile and wave.

[Twilight Sparkle]

It isn't that we're ungrateful

For all the things that we've earned,

[Rarity]

For all the journeys we have taken,

All the lessons that we have learned

[Rainbow Dash]

But we wonder where we're going now,

What our role is meant to be

[Fluttershy]

We don't know how to travel

To a future that we can't see

[Pinkie Pie]

We have our horns and wings, we wear these crowns

We're princesses, this is true

[Applejack]

But it's still unclear to us

Just what are we meant to do

[Twilight Sparkle, Applejack, Fluttershy, Pinkie Pie, Rarity and Rainbow Dash]

We wanna have a purpose

Wanna do all that we can

We wanna make a contribution

We want to be a part of the plan

[Princess Celestia]

Your destiny's uncertain

And that's sometimes hard to take

But it will become much clearer

With every new choice you make

[Princess Luna]

Patience is never easy

I understand wanting more

I know how hard it is to wait

To spread out your wings and soar

[Princess Cadance]

But you stand here for a reason

You're gifted and you are strong

Those crowns are upon your heads because

You belong

[Princesses Celestia, Luna, and Cadance]

Know that your time is coming soon

As the sun rises, so does the moon

As love finds a place in every heart

You are princesses; you'll play your part

[Princess Luna]

We understand you wanting more

A chance to shine, a chance to soar

[Princess Cadance]

Soon will come the day it turns around

[Princesses Celestia, Luna, and Cadance]

Know that your time is coming soon

As the sun rises, so does the moon

As love finds a place in every heart

You are princesses; you'll play your part

[Princess Celestia]

You are princesses; you'll play your part

[Princess Celestia hugs Twilight as the song ends]

Princess Celestia: Your time will come girls.

[They leave as Team Sonic come out and go over to the Mane Six]

[Meanwhile, in Canterlot, Rare Find was walking down allyway when he ran into someone]

Rare Find: Very sorry. [chuckles] You came out of nowhere.

???: [heavy breathing]

Rare Find: [worried] Are you friend or foe?

Lord Tirek: "Is he friend or is he foe?", the pony wonders. I can assure you... I am no friend. I am Lord Tirek, and I will take what should have been mine long ago.

[Tirek drains Rare Find's magic, causing his eyes to become colorless and his cutie mark to vanish. Elsewhere, Celestia wakes up startled]

Princess Celestia: [gasps]

Princess Luna: [enters the room] Sister, are you alright?!

Princess Celestia: I've just had the most terrible dream.

Princess Luna: Why do you think I'm here? You know as well as I that this was not a dream, but a vision.

Princess Celestia: Then we haven't much time. The stronger he becomes, the more we are all in danger.

[The scene cuts to Celestia explaining Tirek's origins]

Princess Celestia: [narrating] Tirek and his brother Scorpan came here from a distant land, intent on stealing Equestrian magic. But Scorpan soon came to appreciate the ways of Equestria, even befriending a young unicorn wizard.

Princess Luna: [narrating] Scorpan urged his brother to abandon their plans. When Tirek refused, Scorpan alerted us to Tirek's intentions.

Princess Celestia: [narrating] Scorpan returned to his own land, and Tirek was sent to Tartarus for his crimes. But it appears he has found a way to escape.

Princess Luna: We believe it happened when Cerberus left his post at the gates.

Rarity: But that was a long time ago.

Twilight Sparkle: Why is he just now starting to steal magic?

Princess Celestia: His time in Tartarus left him very weak. He has just now gained enough strength to use his dark powers.

Princess Luna: But with each passing moment, he grows stronger still.

Princess Cadance: And I know just the princesses who can stop him.

Rainbow Dash: Yes. We'll find him and–

Princess Celestia: No, Twilight. I'm afraid I must call in another to stop Tirek. Discord.

Twilight Sparkle/Applejack/Fluttershy/Pinkie Pie/Rarity/Rainbow Dash/Princess Luna/Princess Cadance: [gasps]

[the scene cuts to Ponyville]

Knuckles: ...As in Discord Discord?

Twilight Sparkle: Yes!

Cream: I don't think it's that big of a surprise. He can be very helpful.

[beat]

Applejack: He can sense when there's a magical imbalance.

Pinkie Pie: The next time Tirek steals magic, Discord will be able to track him down!

Tails: So what are you six supposed to do in the meantime?

Twilight Sparkle: [sighs] Nothing. Unless of course one of you need us to smile and wave.

[The Mane Six walk away]

Spike: Where are you going?

Rarity: To the Castle of the Two Sisters.

Fluttershy: We're not really needed anywhere else.

Twilight Sparkle: Yeah, might as well catch up on some of my reading.

Shadow: You want some company?

Sonic: It has been a while since we visited the castle. Might be fun!

Twilight Sparkle: Maybe we could use a little company right now.

[The Mane Six and Team Sonic race into the castle]

Twilight Sparkle: We came as quickly as we could! Is something wrong? Is it Tirek?

Sonic: If it is then speak away.

Princess Celestia: I'm afraid I put too much trust in Discord and the effect that friendship would have upon him.

Knuckles: Huh? Have you not heard from him since he left?

Princess Celestia: No, I fear he may have betr-

Vector: Guys! Sorry to interrupt. [appears with Espio, Charmy and a weakened Discord] But we may have a problem...

[everyone gasps]

Discord: I'm so sorry. I couldn't stop him. The alicorn amulet, he somehow found it.

Twilight Sparkle: [gasps]

Applejack: But where could he have found that?!

Rainbow Dash: Yeah, didn't Zecora take that thing when Trixie tried using it?!

Sonic: Yeah, but then again, Metal Sonic had it when me, Amy, Silver and Blaze fought him.

Twilight Sparkle: He did?! Why didn't you tell anyone?

Sonic: Eh, guess it slipped my mind...

[As they are talking about this, Tirek appears at a magic show and drains the magic from all the unicorns there, turning into his second form]

Princess Luna: That must mean... [gasps] Eggman must've somehow got the Amulet back and joined forces with Tirek.

Twilight Sparkle/Amy Rose: [gasps]

Sonic: Not really a surprise, I mean, this is the same guy that teamed up with a changeling queen we're talking about.

Shadow: Is there a way we can defeat him?

Princess Celestia: We don't know, Tirek has stolen enough magic that he now has the strength to steal flight as well. Without Pegasi to control the weather, there will be no rain in Equestria.

Rainbow Dash: [gasps] That's terrible!

[As they are talking about this, Tirek appears at an area and the Wonderbolts fly towards him to stop him, but Tirek holds the Wonderbolts in place and drains their magic. The Wonderbolts fall to the ground as Tirek leaves]

Silver: Well that's just great, we're gonna have serious problems if he has an amplifier like the Alicorn Amulet along with Discord's magic.

Espio: You won't need to worry about that amulet anymore. The gem on it shattered after he drained Discord.

Charmy: Yeah, we barely made it out of there to take Discord here at his request.

Applejack: Wait, Discord asked to be brought here?

Vector: Yes.

Cream: What do we do?

Princess Celestia: We must act quickly, there is word he has gone after Earth Ponies as well. Without their strength, they will not be able to tend the land.

Princess Luna: Ponies will no longer be in control of their world. That power will belong solely to Tirek.

Pinkie Pie: That doesn't sound good...

[As they are talking about this, Tirek appears at the farms and drains the Earth Ponies of their magic]

Sonic: Well, me and the others are gonna go bring Discord to Ponyville for protection, Tails, contact the rest of the team, we're gonna need everyone on this.

Tails: On it Sonic!

[Team Sonic and Discord run out the castle back to Ponyville]

Princess Celestia: There is no doubt that Tirek is after Alicorn magic. With it still in us, we will not be able to stop him from taking it.

Princess Luna: Once it is in his possession, his power will know no bounds, and all hope will be lost.

Princess Celestia: But there is one solution. It is only by making this sacrifice that Equestria and the lands beyond it might be saved. We must rid ourselves of our magic before Tirek has the chance to steal it from us.

[the Mane Six look at each other]

Princess Luna: Tirek is set on possessing Alicorn magic. When he comes for us, we cannot have what he is looking for.

Twilight Sparkle: I'm more than willing to do my part and give up my magic.

Rarity: Twilight.

Rainbow Dash: I mean, we've have only been alicorns for what- a year or so, I suppose giving it up wouldn't do no harm.

Princess Luna: You misunderstand. Our magic cannot just disappear into thin air. Someponies must keep it safe.

Fluttershy: Well, who would that be?

Princess Cadance: Those someponies are you, girls.

Mane Six: [shocked] Us?!

Twilight Sparkle: Why?

Princess Celestia: We do not believe that Tirek is aware that six new Alicorn princesses exist in Equestria. If we transfer our magic to you six, Tirek will not know where it has gone.

Princess Cadance: Do you understand what we're asking of you?

Twilight Sparkle: Yes. It's just...

Fluttershy: We're only now learning how to control our own Alicorn magic.

Rarity: To take on even more–

Pinkie Pie: Would more than likely, I don't know, overload us or something?

Rainbow Dash: That and we may have problems controlling it.

Applejack: Agreed.

[Cadance comes over]

Princess Cadance: Twilight, you and your friends represent the Elements of Harmony. If there are anyponies who can do this, it's you girls.

Rainbow Dash: I don't know...

Twilight Sparkle: Taking on this task will be one of the most difficult things we'll ever do.

Pinkie Pie: Yeah, though I think with the help of Sonic and–

Princess Celestia: I'm sorry, Princesses of Harmony, but you must keep your new abilities a secret. I fear that your friends being aware of your new powers could put them at great risk. Do you still think you can take on this responsibility?

[the Mane Six look at each before nodding]

Rainbow Dash: I guess we have no other choice...

Rarity: If keeping all the alicorn magic within oursevles is the only way...

Pinkie Pie: Then we're up for it!

Fluttershy: I mean, we have always done great things.

Applejack: This is the role we are meant to play as princesses of Equestria!

Twilight Sparkle: We will not fail to do our duties!

Princess Celestia: Then we must begin at once.

[Princess Celestia, Princess Luna, and Princess Cadance surround the Mane Six and begin the magic transference]

[As the Princesses transfer their magic to the Mane Six, Tirek drains more magic and transforms into his third form]

Dr. Eggman: You are truly looking genius there Tirek, I'm impressed.

Tirek: I am nearly in full power. All I need is Alicorn magic. [leaves to steal the Alicorn magic]

Metal Sonic: [to Eggman] Are you certain this monster will keep to his promise Master?

Dr. Eggman: Of course he will! With his help, Eggmanland might finally come to be! [laughs evilly before his magic detector goes nuts] Huh? That's weird, why is my magic detector going berserk?

[Princess Celestia, Princess Luna, and Princess Cadance lay on the floor after transferring their magic to the Mane Six and look at them]

[The Mane Six are overwhelmed by the Alicorn Magic and their eyes turn clear white while their manes and tails start flowing. Princess Celestia, Princess Luna, and Princess Cadance continue the transferrence. The Mane Six eventually calm down and their eyes return to normal as their manes and tails stop flowing, Twilight runs to Princess Celestia and embraces her as she stands. Twilight then sees Celestia's cutie mark gone and Princess Luna and Princess Cadance see their cutie marks are gone]

Princess Celestia: [out of breath] It is done.

The Mane Six vs. Tirek/Tirek's Trade
[We see the Mane Six practicing their magic]

Fluttershy: Are you sure this is safe?

Twilight Sparkle: Trust me, we can do this.

Pinkie Pie: If you say so.

[The Mane Six teleport outside the Castle of the Two Sisters]

Twilight Sparkle: See! Ha! What did I say girls, perfectly controlled teleportation–

[The Mane Six then start teleporting to various locations]

Twilight Sparkle: [growls]

Rarity: Well, that just happened.

Lord Tirek: Princesses of Harmony!

Twilight Sparkle: [gasps] Tirek!

Applejack/Fluttershy/Pinkie Pie/Rarity/Rainbow Dash: [gasps]

Lord Tirek: You have something that belongs to me!

[The Mane Six fly past Tirek very fast, impressing him. Twilight glares at him]

Lord Tirek: You're going to give me what I want.

[Tirek prepares to suck out the Alicorn Magic from the Mane Six when they fly away]

[The Mane Six arrive at the Golden Oak Library and Twilight uses the telescope to see Tirek]

Applejack: Well, that was close.

Twilight Sparkle: Yeah, as long as he doesn't see us, we'll be-

[Tirek spots them anyway]

Rarity: Oh no...

[Tirek fires a beam at her location, Fluttershy grabs Owlicious and the Mane Six get out of the library as the beam hits it, destroying it, sending the Mane Six flying in the process]

Mane Six: [gasps, Twilight was nearly in tears]

[Fluttershy let Owlicious fly away while Twilight angrily flies at the Overlord and fires a big beam of Magic at him. Tirek creates a shield around him and gets pushed back by the blast. Tirek gets up and glares at Twilight, who lands near him, her friends following pursuit]

Lord Tirek: Now I understand what your fellow princesses have done.

Applejack: Uh, whatever happened to-

Twilight Sparkle: You would've done the same thing!

Rainbow Dash: Alright, fair enough!

[The Mane Six and Tirek get into a fight showing equally matched strength, speed, and agility, Team Sonic and the Chaotix watch nearby, eventually flying down once they finish]

Tails: Girls, thank goodness you're alright!

Sonic: Yeah, and oh man! That was CRAZY! Nice job!

Twilight Sparkle: Thanks. [looks at Tirek]

Lord Tirek: It appears we are at an impasse.

Pinkie Pie: No we weren't, we were literally sending you to Kingdom Come!

Lord Tirek: Whatever, anyways, how about a trade?

[Tirek brings out Celestia, Luna, Cadance, Spike, Discord, Applebloom, Scootaloo, Sweetie Belle, Nyx, Snowdrop, Sunset and Trixie]

Lord Tirek: Their release for all the Alicorn magic in Equestria.

Mane Six/Team Sonic/Chaotix: [gasps]

Princess Celestia: Girls!

Princess Luna: You can't!

Princess Cadance: You mustn't!

Lord Tirek: What's it going to be, Princesses?

[The Mane Six look at their friends, not knowing what to do]

Sunset Shimmer: Don't do it, girls!

Trixie Lulamoon: We aren't worth it!

Discord: Oh, but you are. I am too, after all, Fluttershy was one of the two people that taught me that friendship is magic.

Cream: Poor Mr. Discord...

Lord Tirek: Enough! I want an answer, and I want it now!

Tails: We can't let him get away with this, can we?

Knuckles: Hmm, even my attacks would be useless, I can't believe that dirtbag!

[Twilight looks at her friends before finally making a decision]

Twilight Sparkle: We'll give you our magic, in exchange for our friends.

[Everyone gasps]

Sonic: Are you crazy?!

Shadow: He'll be unstoppable if he gets your magic!

Twilight Sparkle: I know, but it's the only way...

Rainbow Dash: But Twilight I-

Twilight Sparkle: Look, I know you're all worried, but we don't know what he'll do to them if we refuse.

Pinkie Pie: [gasps] Fair enough.

Fluttershy: Looks like we have no choice then...

Rarity: If it's the only to save our friends.

Applejack: Then it's worth the sacrafice...

Rainbow Dash: Yeah... Enough said.

Twilight Sparkle: Alright Tirek, now release them!

Lord Tirek: As you wish.

[Lord Tirek releases everyone except Discord]

Twilight Sparkle: All of our friends.

Lord Tirek: What?! After the amount of torture he put you through, you call him a friend?

Fluttershy: Well, yeah...

Pinkie Pie: Sure, he turned us into his queens of chaos when we first fought him.

Rarity: But he really has changed since then.

Lord Tirek: You can't be serious...

Twilight Sparkle: RELEASE HIM OR YOU'RE GETTING NOTHING!

Lord Tirek: Okay okay, if that's what you want. Spoiled sport.

[Lord Tirek releases Discord]

Discord: [thankful] Thank you Twilight...

Lord Tirek: Now, where was I? Oh yeah, your turn!

[Tirek sucks out the Mane Six's magic]

Lord Tirek: Yes. Yes!

[Tirek finishes sucking out their magic, entering his final form and warping away while the Mane Six collapse]

Silver: Girls, you alright?!

Fluttershy: Don't worry, we'll live!

Spike: Girls, why did you do that?

Twilight Sparkle: It was for your own safety.

Amy Rose: What do we do now?

Blaze: Hard to say really!

[Just then, Big, Omega, Marine, Emerl, Cosmo, Gamma, Gmerl, Tikal and Sticks show up]

Emerl: Guys, thank heavens you're alright!

Rouge: Save the hero speechs for later, we have bigger problems now!

Cosmo: We know, we saw everything.

Knuckles: We've got no other choice, we got to defeat Tirek now before he destroys the planet!

???: Running into battle when he's in his strongest form will just get you killed Knucklehead!

[everyone gasps when they see Dr. Eggman, Metal Sonic, Scratch, Grounder, Coconuts, Decoe, Bocoe, Bokkun, Orbot and Cubot in the Death Egg Robot, alive and well]

Sonic: Eggman?!

Dr. Eggman: [laughs as he jumps out] I'm like a bad rash, you can't get rid of me!

Tails: But how did you-

Dr. Eggman: It's simple, Tirek missed me!

[A flashback shows a door opening up on the Death Egg Robot to let Tirek's beam fly through it without destroying it, though it ends up hitting Eggman's lair in the process]

Dr. Eggman: As usual, I used my brains and showed that laser the door!

Discord: Huh, that's actually somewhat clever.

Decoe: Even more brilliant was the way Dr. Eggman faked a explosion using a smokescreen.

Bocoe: While the smoke was hiding us, we warped away to a safe part of Equestria.

Dr. Eggman: Yeah, anyways, here. [passes Twilight the medallion Tirek gave him] Tirek lied to me when he said that this medallion was given as a sign of gratitude and loyalty, but no one betrays Dr. Eggman and gets away with it!

[A rainbow light glows on the medallion, surprising everyone]

Applejack: You think that might be the last one we need?

Amy Rose: Yeah!

Twilight Sparkle: We have to get to the chest.

Sonic: Yeah, let's go!

Dr. Eggman: Wait, if Tirek finds out you have all six keys, he'll try to destroy you! Ugh, if only we had the seven Chaos Emeralds.

[Team Sonic get out the Emeralds, surprising Eggman]

Dr. Eggman: What's this? But how? Even with the Emeralds' power, the chances for victory are slim. It would take a miracle!

Sonic: Just leave that to us, Doc...

Twilight Sparkle: Sonic, no!

Sonic: Relax Twi, we're just gonna buy you some time, that way you can unlock the chest faster! Trust me, this is the most powerful opponant we've ever faced, so we'll only defeat him if we all work together!

Twilight Sparkle: [sighs] Alright, I trust you.

[The Mane Six race towards the Tree of Harmony]

Sonic: [determined] Time for Super Sonic!

[Team Sonic uses the Chaos Emeralds to enter their super forms, now it was their turn to battle Tirek in order to distract him]

Super Sonic: You ready guys?

Super Shadow: All set!

Super Amy: The rest of you, get somewhere safe!

Spike: Right!

[Celestia, Luna, Cadance, Spike, Discord, Applebloom, Scootaloo, Sweetie Belle, Nyx, Snowdrop, Sunset, Trixie, Espio, Vector, Charmy, Big, Omega, Marine, Emerl, Cosmo, Gamma, Gmerl, Tikal, Sticks, Eggman, Metal Sonic, Scratch, Grounder, Coconuts, Decoe, Bocoe, Bokkun, Orbot and Cubot run towards somewhere safe]

[The Mane Six reached the Tree of Harmony, where the medallion turned into the last key they needed, Twilight put it in the chest and tried to turn it but thenrealizes something]

Twilight Sparkle: Together! I think we have to do this together!

[The Mane Six turn the keys and the box opens, releasing a bright light. The Mane Six gain Rainbow Power and fly out of the cave]

[Outside, Tirek was battling Team Sonic, but they were getting pretty tired]

Lord Tirek: Fighting me is useless now you pests!

Super Tails: We're weren't trying to fight you...

Super Cream: Not at all!

Burning Blaze: In fact, we were trying to distract you.

Super Rouge: Because now you've got bigger problems!

[Suddenly, the Rainbow Powered Mane Six show up]

Lord Tirek: [gasps] WHAT WERE YOU DOING?!

Super Knuckles: Giving us a fighting chance.

Super Silver: Which worked perfectly, might I add.

[Team Sonic joins up with the Mane Six as Tirek tries to blast them, but it has no affect]

Lord Tirek: How is this possible?! You have no magic!

Twilight Sparkle: You're wrong, Tirek! We may have given you our Alicorn magic, but we carry within us the most powerful magic of all!

[The Mane Six fire a rainbow beam at Tirek which overpowers him]

[Tirek screams as he feels the magic he stole coming out of him and he canges back into his first formh his first form before finding himself in a cell in Tartarus]

Lord Tirek: Oh crud!

[The Mane Six then return the magic to every pony. Twilight and Rarity return the Unicorn magic to the Unicorns, Rainbow Dash and Fluttershy return the Pegasus magic to the Pegasi, and Applejack and Pinkie Pie return the Earth Pony magic to the Earth Ponies, while the Alicorn magic returns to Celestia, Luna and Cadance, with everyone else's magic returning shortly after]

[Everyone cheers]

Discord: Much better!

Nyx: Everyone has their magic back!

Snowdrop: They did it!

Sunset Shimmer: Yeah, that's a relief.

[Just then, the Tree of Harmony launches the chest and its keys toward Ponyville, where it sinks into the ground. Mere seconds later, a great crystal castle rises out of the ground from where the chest landed]

[Everyone stare at the castle wide-eyed, while Team Sonic and the Mane Six return to normal]

Rarity: Sweet Celestia! Are you all seeing what I'm seeing?

Amy Rose: Yeah... What is it?

Sonic: It's an castle.

Twilight Sparkle: But... whose is it?

Princess Celestia: I believe it is yours, Princesses of Harmony.

[The Mane Six are suprised]

[Everyone enters the castle while Eggman and his minions wait outside]

Princess Celestia: You six have been wondering what you are meant to do as princesses. Do you know now?

Rainbow Dash: Yeah, after all this time.

Rartiy: We think we finally understand.

Pinkie Pie: As princesses, we believe we have the power to spread the magic of friendship across Equestria.

Fluttershy: That is the role we are meant to have in our world!

Applejack: The role we choose to have!

Twilight Sparkle: Afterall, we couldn't defeat Tirek individiually – it took all six of us to unlock the chest!

Princess Celestia: Then it is unlikely you are meant to take on this task alone.

Main cast: [gasping in awe]

Pinkie Pie: Wowee!

Tails: Amazing!

Princess Celestia: Twilight Sparkle, Applejack, Fluttershy, Pinkie Pie, Rarity and Rainbow Dash, you are now the princesses of Friendship, Honesty, Kindness, Laughter, Generosity and Loyalty respectivly. But what are the Princess of Harmony without their friends?

[Team Sonic and the others smile]

Sonic: I knew you could do it girls!

Amy Rose: We're all very proud of you.

Discord: Wait a minute, where's my throne?!

Fluttershy: I don't think you're quite there yet.

Discord: [chuckles] Yes, well, I suppose not.

[Twilight Sparkle]

Each one of us has something special

That makes us different, that makes us rare

[Fluttershy]

We have a light that shines within us

That we were always meant to share

[All]

And when we come together

Combine the light that shines within

There is nothing we can't do

There is no battle we can't win

When we come together

There'll be a star to guide the way

It's inside us every day

See it now! See it now!

Let the rainbow remind you

That together we will always shine

Let the rainbow remind you

That forever this will be our time

[mandolin solo]

[Twilight Sparkle]

Let the rainbow remind you

That together we will always shine

[Outside, Dr. Eggman was talking to his minions]

Cubot: You've gotta admit, that castle sure is beautiful.

Dr. Eggman: Indeed so, I'm impressed, granted, I helped someone nearly destroy the world, but it was all worth it! I got great fighting data from the Mane Six that I can use for my robots!

Orbot: About that... When we faked our deaths, Tirek's laser went and hit your evil lair. All of your remaining robots were destroyed.

Dr. Eggman: [dumbfonded] Well, there's always next season. [walks away as the episode ends]

Recap
"Last time on Sonic Adventures in Equestria, the Mane Six began to wonder if they even have a purpose as princesses since their role in Equestria is still unclear, though these thoughts would have to be put on hold when Celestia and Luna discover that the villain Lord Tirek has escaped from Tartarus and is now draining magic from the citizens to make himself more powerful, Cadance suggested they send the Mane Six after him, but Celestia sended Discord instead due due to his ability to sense magical imbalances caused by Tirek's activity, while Discord brags to Team Sonic and the Mane Six about his mission, Tirek arrived at Eggman's lair, though in a effort to save his life, Eggman offered to join Tirek as his chief henchman, after Tails reminds them about the chest that appeared after they returned the Elements to the Tree of Harmony, the Mane Six and the others tried desperately to open the chest but their attempts, some funnier than others, failed miserably, meanwhile, Discord confronted Tirek who teased him with having freedom over friendship, though tempted to go back to his old ways, Discord ultimately decided not to betray his friends' trust, unfortunatly, Tirek revealed that he aqquired the Alicorn Amulet from Eggman and drained Discord of his magic, though the Chaotix were able to get him out of his predicament before anything else happened, meanwhile, Twilight's friends remember how they were challenged in regards to their core Element of Harmony, and were able to help another, receiving an item in return. They gather these items, which transform into five of the six keys needed to open the box, though since Twilight hasn't faced a challenge similar to theirs yet, she can't provide the last key, the question on how they're gonna get the last key is interrupted when they're called back to Canterlot, where they finally realize that not only has Tirek taken Discord's magic, but Eggman is helping him as well, knowing that he'll go after alicorn magic once he's powerful enough, the princesses plan to rid themselves of their magic before Tirek gets the chance to steal it, will the princesses' plan work, and or will Tirek prevail, find out next on Sonic Adventures in Equestria."

Trivia

 * Dr. Eggman replaces Discord as the ally Tirek betrays later on, though Eggman purposely joined Tirek in order to finally destroy Sonic, even going as far as to give him the Alicorn Amulet.
 * The Alicorn Amulet, which was seen on Magic Duel and Three's a Crowd, returns here, this time used by Tirek until he drains Discord's magic, where it's destroyed for good, this was because Eggman was able to get the Alicorn Amulet during the events of The Princesses of Harmony.