this is my script
game.Players.PlayerAdded:Connect(function(plr) local stats = Instance.new("IntValue",plr) stats.Name = "leaderstats" local Gold = Instance.new("IntValue",stats) Gold.Name = "Gold" Gold.Value = 0 local XP = Instance.new("IntValue",stats) XP.Name = "XP" XP.Value = 0 local lvl = Instance.new("IntValue",stats) lvl.Name = "lvl" lvl.Value = 0 XP.Changed:connect(function() lvl.Value = math.floor(XP.Value/100) lvl.Changed:Connect(function() local char = Player.Character or Player.CharacterAdded:wait() local Humanoid = char:WaitForChild("Humanoid") Humanoid.MaxHealth = 100 + (lvl.Value * 10) Humanoid.Health = Humanoid.MaxHealth end) end) end)