This is as a local script
-- Buy Product Script --
--GetService--
local Players = game:GetService('Players').LocalPlayer
local plr = game.PlayersLocalPlayer
local leaderboard = plr:WaitForChild("leaderstats")
local Cash = leaderboard:WaitForChild("Cash")
--local plr = Players.LocalPlayer -- LocalPlayer can only be used in a LocalScript
--VARS--
local ItemId = 328586978 --Put DevProduct Id Here
--Buy Screen Pops Up--
game.Workspace.AllowThirdPartySales = true
script.Parent.MouseButton1Click:Connect(function()
--Prompt Purchase Screen--
Cash:PromptProductPurchase(plr, ItemId)
end)
How do I make it where if it went through, than it will add cash?
I added this under --Prompt Purchase Screen---
Cash.Value + 250
