local mps = game:GetService("MarketplaceService")
mps.ProcessReceipt = function(receiptInfo)
if receiptInfo.ProductId == 1327541228 then -- Replace the id
local player = game.Players:GetPlayerByUserId(receiptInfo.PlayerId)
local Player = game.Players.FindFirstChild(player.Name)
local Stats = Player:WaitForChild("leaderstats")
local Donated = Stats.Donated
Donated.Value = Donated.Value + 1000
print("Completed")
return Enum.ProductPurchaseDecision.PurchaseGranted
elseif receiptInfo.ProductId == 1327541229 then -- Replace the id
local player = game.Players:GetPlayerByUserId(receiptInfo.PlayerId)
local Player = game.Players.FindFirstChild(player.Name)
local Stats = Player:WaitForChild("leaderstats")
local Donated = Stats.Donated
Donated.Value = Donated.Value + 5000
print("Completed")
return Enum.ProductPurchaseDecision.PurchaseGranted
end
end
COMMUNITY QUESTION
My Product handler wont work it didn't even print the Completed help?
0 answers
No public answers were preserved for this question.
This discussion is preserved as it was. New answers, comments, and votes are closed.
