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

Can anyone help figure out what wrong with this Developer Product Shop?

Asked by
faruque 30
9 years ago

I'm very new Developer Products so if anyone can help me I will very much appreciate it.

local plr = game.Players.LocalPlayers
local link = game:GetService("MarketplaceService")
deb = 0


script.Parent.MouseButton1Click:connect(function()
local marketId = 20954837
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.KOs.Value = plr.leaderstats.KOs.Value + 10 
wait(1)
deb = 0
end
end
end
end)

Answer this question