Gives player 100 cash when they buy the developer product. Why doesn't it work?
local MarketPlaceService = game:GetService("MarketplaceService") local ProductId = 85734826 local Cash = 100 MarketPlaceService.ProcessReceipt = function(receiptInfo) for i, player in ipairs (game.Players:GetChildren()) do if player.userId == receiptInfo.PlayerId then if receiptInfo.ProductId == ProductId then player.leaderstats.Money.Value = player.leaderstats.Money.Value + Cash end end end return Enum.ProductPurchaseDecision.PurchaseGranted end