leaderstat script
local Players = game.Players
Players.PlayerAdded:Connect(function(player)
local Folder = Instance.new("Folder", player)
Folder.Name = "leaderstats"
local Speed = Instance.new("IntValue", Folder)
Speed.Name = "Walkspeed"
local Character = player.Character or player.CharacterAdded:Wait();
local Humanoid = Character:FindFirstChild('Humanoid');
Speed.Value = Humanoid.WalkSpeed
Humanoid.Changed:Connect(function() -- listens to change and updates leaderstats
Speed.Value = Humanoid.WalkSpeed
end)
end)
Script that gives player +1 walkspeed every second
local Players = game.Players
Players.PlayerAdded:Connect(function(player)
local Character = player.Character or player.CharacterAdded:Wait();
local Humanoid = Character:FindFirstChild('Humanoid');
while true do
wait(1)
Humanoid.WalkSpeed = Humanoid.WalkSpeed + 1
end
end)