Did I put the PurchaseGranted - line in the correct place in this script?
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.
01 | local plr = script.Parent.Parent.Parent.Parent.Parent |
02 | local link = game:GetService( "MarketplaceService" ) |
04 | script.Parent.MouseButton 1 Click:connect( function () |
05 | local marketId = 43143148 |
06 | link:PromptProductPurchase(plr,marketId) |
07 | link.ProcessReceipt = function (receiptInfo) |
08 | if Enum.ProductPurchaseDecision.PurchaseGranted and receiptInfo.PlayerId = = plr.userId then |
11 | plr.leaderstats.Snowflakes.Value = plr.leaderstats.Snowflakes.Value + 5000 |
15 | return Enum.ProductPurchaseDecision.PurchaseGranted |