SCRIPTS:
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
end)
ClickButton:
local player = game.Players.LocalPlayer
local clicks = player:WaitForChild("leaderstats"):WaitForChild("Clicks")
local rebirths = player:WaitForChild("leaderstats"):WaitForChild("Rebirths")
script.Parent.MouseButton1Click:Connect(function()
if rebirths.Value (put a greater than sign here) 1 then
clicks.Value = clicks.Value + (rebirths.Value * 2)
end
if rebirths.Value (put a less than sign here) 2 then
clicks.Value = clicks.Value + 1
end
end)
Button1 - LocalScript:
local player = game.Players.LocalPlayer
local rebirths = player:WaitForChild("leaderstats"):WaitForChild("Rebirths")
local clicks = player:WaitForChild("leaderstats"):WaitForChild("Clicks")
script.Parent.MouseButton1Click:Connect(function()
if clicks.Value (add greater than sign here) 100 then
script.Parent.Text = "+1 REBIRTH | COST 100 CLICKS"
rebirths.Value = rebirths.Value + 1
clicks.Value = clicks.Value - clicks.Value
end
if clicks.Value (add less than sign here) 100 then
script.Parent.Text = "Not enough clicks!"
wait(1)
script.Parent.Text = "+1 REBIRTH | COST 100 CLICKS"
Hope you guys enjoyed this video dont forget to like and sub!