Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

how to make a one time use gamepass like a nuke?

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

1 answer

✓ Accepted answer

It needs to be a product, not a game pass.

1 comment

0

Thank you so much, I really appreciate your help!

This discussion is preserved as it was. New answers, comments, and votes are closed.