Can anyone help me figure out what wrong with this script Also there are no error message so I don't know what wrong with this?
local plr = script.Parent.Parent.Parent.Parent
local link = game:GetService("MarketplaceService")
deb = 0
script.Parent.MouseButton1Click:connect(function()
local marketId = 21059858
link:PromptProductPurchase(plr,marketId)
link.ProcessReceipt = function(receiptInfo)
if Enum.ProductPurchaseDecision.PurchaseGranted and receiptInfo.PlayerId == plr.userId then
if deb == 0 then
deb = 1
plr.leaderstats.Stage.Value = plr.leaderstats.Stage.Value + 1
wait(1)
deb = 0
end
end
end
end)
setup()
