I've been searching on how can I make a script so that when you buy the gamepass, it gives you the tool, but then you have to purchase it again to get something.
An example is: If you made a nuke game pass, when you purchase it, it nukes the place, but when you rejoin the game or finish the nuke, you have to buy it again to do another nuke.
-- So does anyone knows how to do it please? thank you! Here are the scripts that I use:
script.Parent.MouseButton1Click:Connect(function() game:GetService("MarketplaceService"):PromptGamePassPurchase(game.Players.LocalPlayer,123456789) end)
local player = game.Players.LocalPlayer local ownsGamepass = game:GetService("MarketplaceService"):UserOwnsGamePassAsync(player.UserId,13572006)
if ownsGamepass then local Sword= game:GetService("ReplicatedStorage"):WaitForChild("Sword"):Clone() Sword.Parent = player.Backpack end