Here's how Stardust's goodbye and the happy ending goes in Stardust: The Wish Creator.
[We see Stardust floating down]
Smudger: Hey, Stardust is there! He's coming down!
[the Crusaders then catch him]
Apple Bloom: Stardust?
Sweetie Belle: Are you alright?
Stardust: [wakes up] Sweetie Belle!
Scootaloo: You're okay! You're okay!
Apple Bloom: Yer' the best!
Stardust: No guys, you're the best.
Brian: He's right. He made your wishes come true.
Sweetie Belle: And you brought our sisters back to us.
Stardust: Sleepy, very sleepy.
Scootaloo: Already?
Apple Bloom: Ya' have to?
Stardust: Yes.
Apple Bloom: Ah' wish ya' didn't have ta'.
Sweetie Belle: Please don't.
Scootaloo: Yeah.
Stardust: I have to. But I do have one last request. I'd like to hear Rarity's song again.
Rarity: Okay.
Zoe Trent: Why, how about I assist you?
Stardust: That'll make me happy.
Gail Trent: I could sing it too.
Fluttershy: I'd be willing to sing it too.
[They all start singing and the rest joined in]
[soon Stardust starts to get very sleepy but before he can turn into a cocoon again, the Crusaders hug him (knowing this is their last night with him) and he happily returns the hug]
Stardust: Thank you everyone, I'd never wish for everything better.
[he then turns back into his cocoon, then he goes into the ground to sleep in his 10 month slumber once again]
CMC: BYE!!!
Smudger: You were the best Dragony I could ever meet!
Button Mash: It was fun while it lasted.
Babs Seed: Yeah. It sure was.
[Then the ground lights up]
Mako: Heh?
The CMC: Stardust, our hearts, that's where you'll be.
[We see the Dazzlings]
Sonata Dusk: Is this an illusion?!
Adagio Dazzling: You're just seeing things!
Aria Blaze: Yeah, but we don't get any wishes!
Sonata Dusk: Yeah, Stardust is now asleep!
Adagio Dazzling: Will you 2 just shut up?!
Aria Blaze: You shut up!
Adagio Dazzling: You're dead! [tackles Aria]
Sonata Dusk: Hey, wait for me! [joins in]
[the 3 are now in a rumble and then Aria and Adagio pop out as Sonata continues]
Adagio Dazzling: Hope she gets a concussion.
[back with our heroes]
[It is now day]
Pepper Clark: So what are you 2 gonna do now?
Tinkerputt: We've decided to stay here in Dragony land.
Marry: And we know our true place. We'll give you a ride back to town.
Shining Armor: Thank you.
James: Rarity, your comet wish!
Rarity: [gasp] (takes out her trinket) Oh no! We were so caught up in everything last night, I forgot to close the last panel!
Sweetie Belle: Now you won't get your wish.
Rarity: It doesn't matter. I will always have you. [hugs her sister]
Little Bear: You know guys. This adventure is similar to when we first met Jirachi.
Duck: Yeah!
Hen: It actually was!
Owl: I was about to suggest it, myself.
Glaceon: Who's Jirachi, Little Bear?
Little Bear: He's a part of the Legendary Pokémon, Glaceon. And he's said to have the power to grant wishes, and he only awakens every thousand years.
Emily: But unfortunately when we first met Jirachi, he can only teleport things. Not grant wishes, and causes him lots of trouble.
Duck: And he's already now fast asleep.
Cat: And I bet Jirachi is dreaming about us right now.
Smudger: [clears his throat]
Duncan: Smudger?
Smudger: Girls. [takes a deep breath] I'm sorry, I'm really sorry. I know I shouldn't been mean to you, or Stardust. I know you don't like me for being rude to him, I was just worried he might put a dark spell on you. And that he's cool. And now, I think you're right. I am a generator. I hope you can forgive me. Will you still play with me?
Apple Bloom: Of course we can.
Scootaloo: Indeed.
Sweetie Belle: You are no generator. And we'll play with you, anyway you want. Right, Barney?
[But Barney is no where to be seen]
Sweetie Belle: Barney?
Penny Ling: Whoa! Why'd he go?
Kipper: He was here just a moment ago.
Skyla: Barney, wouldn't just leave.
Nyx: Yeah!
[they all look around and then Eevee sees something]
Eevee: Barney!
[they look back and see Barney (who has turned back into his doll form) sitting on the steps to Tinkerputt and Marry's bus]
Stardust: Girls! We will always be brothers and sisters, forever, and ever!
Apple Bloom: Thank ya' Stardust!
Sweetie Belle: Thank you, so much!
Scootaloo: We love you.
Brian: Come on, everyone. Let's go home.
[As everyone hops on the bus Barney winks at the audience as the screen goes black]
[The film ends with "Make a Wish"]