~ I'm still new at scripting and I still don't know much. What I'm trying to accomplish is every time I click a button I would get 10 gold. The upgrade button cost 10 gold and if I buy it i get more gold per taps. How do I make it so every time I click the upgrade button, the price of the upgrade will increase as well as the amount of gold per taps. For example: Upgrade - 10 gold, 2 gold per taps Upgrade - 15 gold, 3 gold per taps Upgrade - 20 gold, 4 gold per taps ect ect
Here is my code so far:
local button = script.Parent
local player = game.Players.LocalPlayer
local gold = player:WaitForChild("leaderstats").Gold
local cost = 10
local boost = 1
local tap = player.PlayerGui:WaitForChild("Main").MainFrame.NOOB
button.MouseButton1Click:connect(function()
if gold.Value >= cost then
gold.Value = gold.Value - 10
tap.MouseButton1Down:connect(function()
gold.Value = gold.Value + boost
end)
end
end)
Thanks.

4 comments
The upgrade button works. I just want the upgrade to be become more expensive and have more value every time I click the upgrade button.
Updated the answer.
You wouldn't want to use a single button -- it would make it so that you wouldn't be able to continue buying the upgrade. As it now stands, each time you click the button you lose 10 gold and gain 1. You'll want to use two buttons.
Ok