SpongeBob fell into despair/Help came from Tempest Shadow, Grubber and company

Here is how help came from Tempest Shadow and company in The Overlord's Revenge.

Meanwhile, SpongeBob was about to give up after failing his attempt again.

SpongeBob SquarePants: This is hopeless, I've failed protecting Twilight and the princesses again.

Laval: Come on, SpongeBob. You'll get over the mistakes, we can still win this.

SpongeBob SquarePants: We can't.

Gandalf: Come now, SpongeBob. We can still work together to save the future.

SpongeBob SquarePants: But that won't work that way.

Emmett Brickowski: What are you talking about? It was your idea.

Plankton: But you said that teamwork...

SpongeBob SquarePants: Forget everything I ever told you. All right, Guys? Let's face it. I just make things worse. That plan is a guaranteed failure. (sighs) Just like me.

Gandalf: You listen to me, my boy. I've made a living out of being a failure. And you, SpongeBob, are not a failure!

Mr. Krabs: It's true, me boy, you've done so many good things.

SpongeBob SquarePants: Oh, yeah? Okay, show me one thing I've done right.

Spike: You did saved us and the princesses.

Lloyd Garmadon: And if it wasn't for you, Princess Celestia, Princess Luna and Princess Cadance would've been petrified right about now.

Batman: Kid, say the word and we'll follow you into battle.

Rockhoof: We believe in you, SpongeBob.

Spongebob Squarepants: (feeling much better) Thanks, guys. I feel better already, but how're we gonna stop the Overlord and the Storm King now?

Tempest Shadow: I can help with that.

The voice belongs to Tempest Shadow, she came along with her company.

Rarity: (when she notice Capper) Well, look what the cat dragged in with Tempest!

Queen Novo: Why exactly are you here, Tempest, haven't you even caused enough trouble with the Storm King?

Tempest Shadow: Yes, Grubber and I were banished by the Storm King. We're truly sorry for what damage we caused in your kingdom, Queen Novo.

Grubber: We got nowhere else to go, except with each other.

Then, Stygian came up to Tempest and vouch for her.

Stygian: I believe you.

Tempest Shadow: Really, why?

Stygian: Because that's what friends do for each other, Tempest. No matter what cruelty you once did, it's never too late for a second chance of forgiveness. Princess Twilight Sparkle, Sunset Shimmer and Starlight Glimmer once inspire me and the Pillars to understand the Magic of Friendship.

Tempest Shadow: Whoa, I never actually thought of it that way.

Grubber: Me either.

Stygian: (notice her broken horn) If it'll help, perhaps my magic can restore your horn.

Tempest Shadow: Can you really do that?

Stygian: Of course, but I can't do this alone. Star Swirl, Sunset, Starlight, I'll need help.

Star Swirl the Bearded: I'd thought you'd never ask, Stygian. Sunset, Starlight, are you two ready?

Sunset Shimmer: I'm ready.

Starlight Glimmer: Let's do this.

So with every amount of their magic, Tempest's horn has been restored.

Stygian: How're you feeling?

Tempest Shadow: I feel whole again. (using her horn) Thank you, Stygian, Sunset, Starlight, for being my friends.

Starlight Glimmer: You're welcome, Tempest.

Tempest Shadow: Actually, Tempest Shadow isn't my real name.

Pinkie Pie: Oh, what is it!?

Tempest Shadow: (whispering her ear) It's "Fizzlepop Berrytwist".

Pinkie Pie: Best name ever! We're coming, Princesses!

Then, everyone and everypony cheered.

Pinkie Pie: As soon as we bake up a plan!

So, everyone and everypony begin to make plan to rescue Twilight and the princesses. As for Machia, she stole the blueprints for the Super Iron Doom.