he uses his awesomeness and by some unknown reason he also knows how to speak beastie(like he knew how to speak to the cannibals). he tells the beastie to swim to the surface and spit him out then he tells it that davy jones is just using it as a weapon and it goes to eat davy jones. while jones is distracted by the kraken, jack goes to port royal and jumps through the window of the lords office, steals the heart and hitches a ride to tia dalma to ask of his crew. nobody is there(they've already left with barbossa to go to the world's end) so he goes to find the flying dutchman. after ordering jones not to chase after his soul anymore, he orders jones to let bootstrap free and then he kills him and them tells the crew to take him to the end of the map. he meets up with will, eliz, tia dalma, and to his surprise, he sees barbossa is captaining the ship. he says "I thought i killed ya, mate. Did you get your monkey back, eh?" The monkey swoops down off a rope and lands on his shoulder. Jack just shrugs it off and tells the crew of the dutchman to go under the sea and never return. He takes bootstrap to will, they hug and he's introduced to elizabeth. they all live happy together.
i was just bored so that's probably nothing like what's really going to happen. but it was fun to write. 😄