Can anyone please help me fix this so that the cash is given AFTER the purchase?? Because riht now, it gives it before...
-- Yep, it's in a LocalScript, in case anyone asks buybutton = script.Parent msp = game:GetService("MarketplaceService") id = 19251916 p = game.Players.LocalPlayer buybutton.MouseButton1Click:connect(function () msp:PromptPruductPurchase(p,id) p.leaderstats.Diamonds = p.leaderstats.Diamonds + 1000 end)
You have to use the ProcessReceipt function to make sure that the user has purchaced it. With the script you have, Its going to prompt it and just give the 'diamonds' even if they hit cancel.