So I made a script that when you click on a button in a GUI it would let you buy the gamepass but if someone did buy the gamepass I want them to be teleported to the game "3650823073" the problem is I don't know how to make it verify if someone bought the gamepass or not because right now it would teleport people instantly even if they didn't buy the gamepass. Thanks for the help!
script.Parent.MouseButton1Click:connect(function()
game:GetService("MarketplaceService"):PromptGamePassPurchase(game.Players.LocalPlayer, 4725748)
game:GetService("TeleportService"):Teleport(3650823073)
end
end)

5 comments
Thanks for the help!
Anytime
I just tried it out and it didn't work.
edited the question, try the new script
Still doesn't work but I fixed it myself below, Thanks anyways.