If you need further explanation, feel free to ask
local MS = game:GetService("MarketplaceService") local Players = game:GetService("Players") local function processRecipt (receiptInfo) local plr = Players:GetPlayerByUserId(receiptInfo.PlayerId) if not plr then return Enum.ProductPurchaseDecision.NotProcessedYet end if plr then print(receiptInfo.CurrencySpent) print(receiptInfo.CurrencySpent) game.Players:GetPlayerByUserId(receiptInfo.PlayerId):FindFirstChild("leaderstats").Donation.Value = game.Players:GetPlayerByUserId(receiptInfo.PlayerId):FindFirstChild("leaderstats").Donation.Value + receiptInfo.CurrencySpent end return Enum.ProductPurchaseDecision.PurchaseGranted end MS.ProcessReceipt = processRecipt()