Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
-1

hello ,Would this script work correctly?

Asked by 7 years ago

Would this script work? It's supposed to give you cash ( Cash1) when you purchase the developer product.

local mpService = game.GetService("MarketplaceService")
local RS = game:GetService("ReplicatedStorage")
local Cash1 = RS.CashAmounts.Cash1

mpService.ProcessReceipt = function(purchaseInfo)
local plr = game.Players.GetPlayerByUserId(purchaseInfo.PlayerId)
if purchaseInfo.ProductId == 55131820 then
--The value will be incremented...
local Cash = plr.leaderstats.Cash
Cash.Value = Cash.Value + Cash1.Value
end
return Enum.ProductPurchaseDecision.PurchaseGranted
end

1
I don't know. Why won't you try it out? ChristianSenpaii 29 — 7y
0
You can test it buy purchasing it in studio(Free + Unlimited Rebuys) xEmmalyx 285 — 7y
0
Because I'm at school and my laptop doesn't support Studio, So I can't. IfIWasntSoSwag 98 — 7y

Answer this question