Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

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

Asked by 3 years ago

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

Log in to vote
0
Answered by 3 years ago

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

0
Thank you so much, I really appreciate your help! shieldmr3 2 — 3y
Ad

Answer this question