Hello, my friend and I have had trouble trying to fix a 'Skip Stage' script.
There is a separate LocalScript in the GUI that works fine- however the following code seems to have an error that doesn't display in the output.
If you can spot it, please tell me or leave me some tips on how to prevent this further. Thanks.
local MarketplaceService = game:GetService("MarketplaceService")
MarketplaceService.ProcessReceipt = function(receiptInfo)
local players = game.Players:GetPlayers()
local currency = "Stage"
local done = 0
for i,v in pairs(game.Players:GetChildre()) do
if i.userId == receiptInfo.PlayerId then
if receiptInfo.ProductId == 976013381 or 976013480 or 976016228 or 976018199 and done == 0 then
done = 1
i.leaderstats.Stage.Value = i.leaderstats.Stage.Value + 1
i.Character.Humanoid.Health = 0
done = 0
return Enum.ProductPurchaseDecision.PurchaseGranted
end
end
end
end

4 comments
Hello, I found the script quite unhelpful. What is the reason for -1? It didn't seem to help but thanks for your time.
It works for me you must not have a working checkpoint system
Hello, thanks for your response. Please send me a video with you using said script and it working accurately. Thanks.
Text me on discord FreedomDucky#0001