Im testing the new Developer Products feature in roblox, Im a basic scripter i cant make big scripts. I need help with this one :
local buyButton = game.Workspace.StarterGui.ShopMain.MoneyButton
local productId = 19232057
buyButton.MouseButton1Click:connect(function()
game:GetService("MarketplaceService"):PromptProductPurchase(game.Players.LocalPlayer, productId)
end)
buyButton.MouseButton1Click:connect(function()
local stats = user:findFirstChild("leaderstats")
if stats ~= nil then
local cash = stats:findFirstChild("Money")
cash.Value = cash.Value +100
end
Im trying to make a gui button that gives you 100+ Money. The Gui button its ok but i dont know if the script will work correctly.
the productId is 19232057 and the Leaderstat is "Money"
Please help :D
