Here's my code so far -
ShekelsGiven = 100 ProductID = 31831485 game:GetService("MarketplaceService").ProcessReceipt = function(receiptInfo) for i, player in ipairs(game.Players:GetChildren()) do if player.userId == receiptInfo.PlayerId then if receiptInfo.ProductId == ProductID then if receiptInfo.CurrencyType == Enum.CurrencyType.Robux then player.ShopValues.Shekels.Value = player.ShopValues.Shekels.Value + ShekelsGiven end end end end return Enum.ProductPurchaseDecision.PurchaseGranted end
Thanks for reading.
You would do this:
local ShekelsGiven = 100 game:GetService("MarketplaceService").ProcessReceipt = function (receiptInfo) for i, player in ipairs(game.Players:GetChildren()) do if player.userId == receiptInfo.PlayerId then -- check which product was purchased if receiptInfo.ProductId == productId then if receiptInfo.CurrencyType == Enum.CurrencyType.Robux then player. leaderstats.Shekels.Value = player. Leaderstats.Shekels.Value + ShekelsGiven end end end end return Enum.ProductPurchaseDecision.PurchaseGranted end)
Change Shekels in leaderstats to whatever you have as the leaderstats value for storing the points. Place this code in a Server Script as only the server can process receipts.