Code isn't working, it is a script in ServerScriptService. it is supposed to award cash upon purchase of Developer Product (not in leaderstats, it can be seen at the bottom at the screen using a text label) and wins which is in leaderstats. Can someone take a look at the code? Thanks!
local mps = game:GetService("MarketplaceService")
mps.ProcessReceipt = function(receiptInfo)
if receiptInfo == 1208410513 then
local player = game.Players:GetPlayerByUserId(receiptInfo.PlayerId)
player.Cash.value = player.Cash.value + 100
return Enum.ProductPurchaseDecision.PurchaseGranted
end
if receiptInfo == 1342774613 then
local player = game.Players:GetPlayerByUserId(receiptInfo.PlayerId)
player.Cash.value = player.Cash.value + 1000
return Enum.ProductPurchaseDecision.PurchaseGranted
end
if receiptInfo == 1342770170 then
local player = game.Players:GetPlayerByUserId(receiptInfo.PlayerId)
player.Cash.value = player.Cash.value + 300
return Enum.ProductPurchaseDecision.PurchaseGranted
end
if receiptInfo == 1342771507 then
local player = game.Players:GetPlayerByUserId(receiptInfo.PlayerId)
player.Cash.value = player.Cash.value + 500
return Enum.ProductPurchaseDecision.PurchaseGranted
end
if receiptInfo == 1343023770 then
local player = game.Players:GetPlayerByUserId(receiptInfo.PlayerId)
player.leaderstats.Wins.value = player.leaderstats.Wins.value + 30
return Enum.ProductPurchaseDecision.PurchaseGranted
end
if receiptInfo == 1343022593 then
local player = game.Players:GetPlayerByUserId(receiptInfo.PlayerId)
player.leaderstats.Wins.value = player.leaderstats.Wins.value + 10
return Enum.ProductPurchaseDecision.PurchaseGranted
end
end

6 comments
Missing ProductId after receiptInfo. "receiptInfo.ProductId"
You mean at line 3, that gives me a syntax error? Syntax Error: (3, 42) Expected ')' to close '(' at column 30), got '.'
If you mean after every if receiptInfo then I also tried just tried that, and it still doesn't work.
no he meant only in line 4, 9, 14, 19, 24, and 29
Yeah that's what I meant by my third comment, I had removed it from line 3 because of the syntax error but let me try the modified code you sent me.
It works, thank you so much! I have accepted your answer.