When a player dies 3 times or more, He gets a opinion to buy products, those products are, skipping one stage, skipping 3 stages or skipping 5 stages. This is an obby btw.
These are the ID and names
20372350 Skip 1 stage!
20372370 Skip 3 stages
20372379 Skip 5 stages!
local plr = script.Parent.Parent.Parent.Parent.Parent
local link = game:GetService("MarketplaceService")
deb = 0
script.Parent.MouseButton1Click:connect(function()
local marketId = 20372350
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
deb = 0
end
end
end
end) |