I don’t know if it is even a thing, but that issue leaves me with a decision of 2, either disable the donation board leaderboard or remove skip stage button. I am using @Yeah_Ember’s donation board.
This is the script for my skip stage button:
local MarketplaceService = game:GetService("MarketplaceService")
local Players = game:GetService("Players")
local productId = 1912899950
local function onProductPurchased(receiptInfo)
local player = Players:GetPlayerByUserId(receiptInfo.PlayerId)
if not player then
warn("Player not found")
return Enum.ProductPurchaseDecision.NotProcessedYet
end
local leaderstats = player:FindFirstChild("leaderstats")
if not leaderstats then
warn("Leaderstats not found for ", player.Name)
return Enum.ProductPurchaseDecision.NotProcessedYet
end
local stage = leaderstats:FindFirstChild("Stage")
if not stage then
warn("Stage not found for ", player.Name)
return Enum.ProductPurchaseDecision.NotProcessedYet
end
local currentStage = stage.Value
local nextCheckpoint = workspace.Checkpoints:FindFirstChild(tostring(currentStage + 1))
if nextCheckpoint then
local character = player.Character
if character and character:FindFirstChild("HumanoidRootPart") then
local targetPosition = nextCheckpoint.Position + Vector3.new(0, 5, 0)
character:SetPrimaryPartCFrame(CFrame.new(targetPosition))
print("Player", player.Name, "teleported to stage", currentStage + 1)
else
warn("Character or HumanoidRootPart not found for ", player.Name)
end
else
warn("Next checkpoint not found for stage", currentStage + 1)
end
return Enum.ProductPurchaseDecision.PurchaseGranted
end
MarketplaceService.ProcessReceipt = onProductPurchased
How can I remove the ProcessReceipt function from this script and keep the script functional?
This is the module where pretty much everything goes on just in case if it is necessary: