I think he’s going to realize the pirates are always going to hate him or want to backstab him, and side with the kids at the end. The mint will end up getting destroyed in the chaos, KB calls in the lady from Episode 3 to alert the Alliance to arrive and help wipe out Brutus and his forces, and “The Supervisor” is revealed to be the not-so-dead but still very old Captain Tak who has been the one to ensure At Attin remains ignorant of the fact the Old Republic is gone so that he can live life in luxury and peace.
Jod kills Captain Tak and his droid forces and gets branded a hero by the people of At Attin. He plays it up as if he was the one who saved the kids, and the kids realize the full truth is never going to get out so they just go along with it. Jod is handsomely rewarded by the Alliance for his role in liberating At Attin. In the final scene, Wim confronts Jod before the latter leaves the planet, and Jod explains that while the treasure of At Attin was his primary goal, he never truly wanted the kids hurt and is glad they survived and are home safe. Wim still feels betrayed, saying, “it really isn’t like the stories, is it?” Jod pauses, says, “not all of it, no. But some of it is, believe me.” He lifts the lightsaber, reconsiders, then puts it back in his hilt and pulls out his knife instead and hands it to Wim. “Not a toy, understand? (Wim nods) When you’re older, and if you’ve got the craving for another adventure, find me, challenge me for the position of Captain, and no matter the victor, you and I can set off on another adventure. Deal?” “Deal.” Jod and SM-33 bid Wim farewell and the other kids arrive just in time to wave goodbye as Jod and SM-33 take off in the Onyx Cinder into space.
So some level of Treasure Island influence with the final scene but still its own thing. That’s how I would do the ending.