This is what i have on a server script. I have an error on line 3
local marketserv = game:GetService("MarketplaceService")
marketserv.ProccessReceipt:connect(function(purchaseinfo)
local plr1 = game.Players:GetPlayerByUserId(purchaseinfo.PlayerId)
local cash = plr1.leaderstats.Cash
if purchaseinfo.ProductId == 270172519 then
cash.Value = cash.Value + 100
end
end)

3 comments
this still doesn't give the player money
can you use prints to find where the problem is?
not even the function fires