Ok so my script is supposed to change the leaderstats of your cash when you buy a dev product
local plr = script.Parent.Parent.Parent.Parent.Parent local link = game:GetService("MarketplaceService") deb = 0 script.Parent.MouseButton1Click:connect(function() local marketId = 20383718 --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.Cash.Value = plr.leaderstats.Cash.Value + 1000 --Alter what stat you would like to increase or decrease after the player has purchased. wait(1) deb = 0 end end end end)
It works fine but the money isnt real money here is where it really stores money https://gyazo.com/66bf6d65944ea3c5bf03a2367ab18e2f
I want to make it so that way if any player buys it money gets added
Closed as Not Constructive by Goulstem
This question has been closed because it is not constructive to others or the asker. Most commonly, questions that are requests with no attempt from the asker to solve their problem will fall into this category.
Why was this question closed?