Leaderstats:
game.Players.PlayerAdded:Connect(function(player) local leaderstats = Instance.new("Folder") leaderstats.Name = "leaderstats" leaderstats.Parent = player
local clicks = Instance.new("IntValue")
clicks.Name = "Clicks"
clicks.Value = 0
clicks.Parent = leaderstats
local rebirths = Instance.new("IntValue")
rebirths.Name = "Rebirths"
rebirths.Value = 0
rebirths.Parent = leaderstats
local gems = Instance.new("IntValue")
gems.Name = "Gems"
gems.Value = 0
gems.Parent = leaderstats
end)
Clicking button:
local button = script.Parent local player = game.Players.LocalPlayer local clicks = player:WaitForChild("leaderstats"):WaitForChild("Clicks") local rebirths = player:WaitForChild("leaderstats"):WaitForChild("Rebirths") local Amount = script.Parent.Amount.Value
script.Parent.MouseButton1Click:Connect(function() clicks.Value = clicks.Value + Amount if rebirths.Value > 0 then clicks.Value = clicks.Value + Amount + rebirths.Value end end)
Amount is 1.

7 comments
where is ,,player"?
and where do i put it? Sry for bothering you but i just dont know, i started scripting a week ago.
plus my leaderstats ain't in local script
oh u were talking bout this. Ok, where do i put it then if not in local script of my button? *other button that i gave scripts to, cuz i gave scripts for clicking button not gamepass button btw *
ok i htink that in normal script, but where is ,,player"?
player will be different, I can't exactly answer where your 'player' is. go up the frames, to the screen gui, and past the player gui is the player. depending on where you put your script, it will change how many 'parents' you would need to write
Tysm