Well i want to keep the health the same it's the very bottom function i feel like i have to change something i this function can you tell me what? Sorry i didn't word correctly i meant like the health changes everytime they l evel up but then when they die it goes back to 100
game.Players.PlayerAdded:connect(function(player)
stat = Instance.new("IntValue", player)
stat.Name = "leaderstats"
Gold = Instance.new("IntValue", stat)
Gold.Name = "Gold"
Exp = Instance.new("IntValue", stat)
Exp.Name = "XP"
Level = Instance.new("IntValue", stat)
Level.Name = "Level"
Level.Value = 0
xpTotal = 11 * Level.Value
player.leaderstats.XP.Changed:connect(function()
if Exp.Value > 11 * Level.Value then
Level.Value = Level.Value + 1 --add a level
Exp.Value = Exp.Value - xpTotal --If its greater than five carry over
end
if Exp.Value == 10 * Level.Value then
Level.Value = Level.Value + 1 -- add a level
Exp.Value = 0 --if it = 4 then Send exp to zero
end
end)
player.leaderstats.Level.Changed:connect(function()
playa = player.Character or player.CharacterAdded:wait()
playa.Humanoid.MaxHealth = Level.Value * 10 + 100
playa.Humanoid.Health = playa.Humanoid.MaxHealth
end)
end)

2 comments
We need more detail. What about it are you trying to keep the same. What are you trying to do, what is your code doing, what do you think it should do, why do you think it should do something. This is all info you should at least try to provide..
Poorly worded question, gave very little details. -1 rep.