HELP:
When i press on this GUI, it gives me 100K+ Cash, when it's only supposed to give 2? It's very weird and i do not seem to really know what the problem is
EXTRA HELP:
If you want to be even cooler and help me even more, the GUI is visible to everyone?
SCRIPT:
local Player = game.Players.LocalPlayer
while true do
wait()
if Player.leaderstats.Cash.Value >= 50 then
script.Parent.Visible = true
script.Parent.Activated:Connect(function()
Player.leaderstats.Cash.Value = Player.leaderstats.Cash.Value + 2
end)
end

2 comments
is the parent a textbutton?
It's because the part where you connect to Activated is in the while loop which means you'll get thousands of connections which means +2*Amount of Connections