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.
This is a repost due to me getting no other answer then a troll.
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

1 comment
Please message me via Discord FreedomDucky#0001 Ill figure out the problem the script is perfect