hey guys, do you have an opinion on an easier way to do this script ? where i down need to repeat it every line on a new level reached to change hp? Thanks!
while true do
wait(.5)
if player.Points.Level.Value == 1 then
player.character.Humanoid.MaxHealth = player.Health.StoredMaxHealth.Value +1
else
if player.Points.Level.Value == 2 then
player.character.Humanoid.MaxHealth = player.Health.StoredMaxHealth.Value +2
else
if player.Points.Level.Value == 3 then
player.character.Humanoid.MaxHealth = player.Health.StoredMaxHealth.Value +3
else
if player.Points.Level.Value == 4 then
player.character.Humanoid.MaxHealth = player.Health.StoredMaxHealth.Value +4
else
if player.Points.Level.Value == 5 then
player.character.Humanoid.MaxHealth = player.Health.StoredMaxHealth.Value +5
else
if player.Points.Level.Value == 6 then
player.character.Humanoid.MaxHealth = player.Health.StoredMaxHealth.Value +6
else
if player.Points.Level.Value == 7 then
player.character.Humanoid.MaxHealth = player.Health.StoredMaxHealth.Value +7
else
if player.Points.Level.Value == 8 then
player.character.Humanoid.MaxHealth = player.Health.StoredMaxHealth.Value +8
else
if player.Points.Level.Value == 9 then
player.character.Humanoid.MaxHealth = player.Health.StoredMaxHealth.Value +9
else
if player.Points.Level.Value == 10 then
player.character.Humanoid.MaxHealth = player.Health.StoredMaxHealth.Value +10
else
if player.Points.Level.Value == 15 then
player.character.Humanoid.MaxHealth = player.Health.StoredMaxHealth.Value +15
else
if player.Points.Level.Value == 20 then
player.character.Humanoid.MaxHealth = player.Health.StoredMaxHealth.Value +20
else
if player.Points.Level.Value == 25 then
player.character.Humanoid.MaxHealth = player.Health.StoredMaxHealth.Value +25
else
if player.Points.Level.Value == 30 then
player.character.Humanoid.MaxHealth = player.Health.StoredMaxHealth.Value +33
else
if player.Points.Level.Value == 35 then
player.character.Humanoid.MaxHealth = player.Health.StoredMaxHealth.Value +38
else
if player.Points.Level.Value == 40 then
player.character.Humanoid.MaxHealth = player.Health.StoredMaxHealth.Value +43
else
if player.Points.Level.Value == 45 then
player.character.Humanoid.MaxHealth = player.Health.StoredMaxHealth.Value +48
else
if player.Points.Level.Value == 50 then
player.character.Humanoid.MaxHealth = player.Health.StoredMaxHealth.Value +55
else
if player.Points.Level.Value == 55 then
player.character.Humanoid.MaxHealth = player.Health.StoredMaxHealth.Value +60
else
if player.Points.Level.Value == 60 then
player.character.Humanoid.MaxHealth = player.Health.StoredMaxHealth.Value +65
else
if player.Points.Level.Value == 65 then
player.character.Humanoid.MaxHealth = player.Health.StoredMaxHealth.Value +70
else
if player.Points.Level.Value == 70 then
player.character.Humanoid.MaxHealth = player.Health.StoredMaxHealth.Value +75
else
if player.Points.Level.Value == 75 then
player.character.Humanoid.MaxHealth = player.Health.StoredMaxHealth.Value +80
else
if player.Points.Level.Value == 80 then
player.character.Humanoid.MaxHealth = player.Health.StoredMaxHealth.Value +85
else
if player.Points.Level.Value == 85 then
player.character.Humanoid.MaxHealth = player.Health.StoredMaxHealth.Value +90
else
if player.Points.Level.Value == 90 then
player.character.Humanoid.MaxHealth = player.Health.StoredMaxHealth.Value +95
else
if player.Points.Level.Value == 95 then
player.character.Humanoid.MaxHealth = player.Health.StoredMaxHealth.Value +100
else
if player.Points.Level.Value == 100 then
player.character.Humanoid.MaxHealth = player.Health.StoredMaxHealth.Value +110
else
if player.Points.Level.Value == 105 then
player.character.Humanoid.MaxHealth = player.Health.StoredMaxHealth.Value +120
else
if player.Points.Level.Value == 110 then
player.character.Humanoid.MaxHealth = player.Health.StoredMaxHealth.Value +130
else
if player.Points.Level.Value == 115 then
player.character.Humanoid.MaxHealth = player.Health.StoredMaxHealth.Value +140
else
if player.Points.Level.Value == 120 then
player.character.Humanoid.MaxHealth = player.Health.StoredMaxHealth.Value +150
else
if player.Points.Level.Value == 125 then
player.character.Humanoid.MaxHealth = player.Health.StoredMaxHealth.Value +160
else
if player.Points.Level.Value == 130 then
player.character.Humanoid.MaxHealth = player.Health.StoredMaxHealth.Value +170
else
if player.Points.Level.Value == 135 then
player.character.Humanoid.MaxHealth = player.Health.StoredMaxHealth.Value +180
else
if player.Points.Level.Value == 140 then
player.character.Humanoid.MaxHealth = player.Health.StoredMaxHealth.Value +190
else
if player.Points.Level.Value == 150 then
player.character.Humanoid.MaxHealth = player.Health.StoredMaxHealth.Value +195
else
if player.Points.Level.Value == 151 then
player.character.Humanoid.MaxHealth = player.Health.StoredMaxHealth.Value +196
else
if player.Points.Level.Value == 152 then
player.character.Humanoid.MaxHealth = player.Health.StoredMaxHealth.Value +197
else
if player.Points.Level.Value == 153 then
player.character.Humanoid.MaxHealth = player.Health.StoredMaxHealth.Value +198
else
if player.Points.Level.Value == 154 then
player.character.Humanoid.MaxHealth = player.Health.StoredMaxHealth.Value +199
else
if player.Points.Level.Value == 155 then
player.character.Humanoid.MaxHealth = player.Health.StoredMaxHealth.Value +200
end
end
end
end
end
end
end
end
end
end
end
end
end
end
end
end
end
end
end
end
end
end
end
end
end
end
end
end
end
end
end
end
end
end
end
end
end
end
end
end
end
end
end
end)
end)

6 comments
lol
dear lord
Use elseif
yeah i can use elseif but id rather have something that could not make me type all this out lol
elseif would remove all the ends
I am really looking for a function basically on level.Changed:Connect, but also if there is something like MaxHealth.Value = level.Value + 100 * 1.1 or something