#i want the function to only work when you actually buy the prompt

6 messages · Page 1 of 1 (latest)

fervent shoal
#

local productId = 2148122000
local player = game.Players.LocalPlayer
function success()
for i = 1,10 do
wait()
print("+1")
script.Parent.Parent.Parent:FindFirstChild("Ksbutton"):FindFirstChild("Click"):FireServer()
end
script.Enabled = false
wait()
script.Enabled = true
end
script.Parent.MouseButton1Click:connect(function() --DONT CHANGE THIS
game:GetService("MarketplaceService"):PromptProductPurchase(player, productId)
game:GetService("MarketplaceService").PromptProductPurchaseFinished:Connect(function()
print("no way p2w")
success()
end)
end)

spice tartan
fervent shoal
#

i mean when you close the prompt

#

and you didnt buy it

#

you still get it

fervent shoal
#

A