Did I put the PurchaseGranted - line in the correct place in this script?
I am generally new to developer products, that is why I wnat to know if I put the PurchaseGranted - line in the correct place.
local plr = script.Parent.Parent.Parent.Parent.Parent local link = game:GetService("MarketplaceService") deb = 0 script.Parent.MouseButton1Click:connect(function() local marketId = 43143148 --ID OF YOUR DEVELOPER PRODUCT link:PromptProductPurchase(plr,marketId) link.ProcessReceipt = function(receiptInfo) if Enum.ProductPurchaseDecision.PurchaseGranted and receiptInfo.PlayerId == plr.userId then if deb == 0 then deb = 1 plr.leaderstats.Snowflakes.Value = plr.leaderstats.Snowflakes.Value + 5000 --Alter what stat you would like to increase or decrease after the player has purchased. wait(1) deb = 0 end return Enum.ProductPurchaseDecision.PurchaseGranted end end end)