There has to be a better way to do it. also Is there an easier way to do this? I thought perhaps you could make a table for it, but my friend said tables are system resource heavy.
function playerLevel()
if player_Experience >= 0 then
if player_Experience < 10 then
player_level = 1
end
elseif player_Experience >= 10 then
if player_Experience < 20 then
player_level = 2
end
--[[ elseif player_Experience >= 20 and < 40 then
player_level = 3
elseif player_Experience >= 40 and < 70 then
player_level = 4
elseif player_Experience >= 70 and < 120 then
player_level = 5
elseif player_Experience >= 120 and < 180 then
player_level = 6
elseif player_Experience >= 180 and < 240 then
player_level = 7
elseif player_Experience >= 240 and < 310 then
player_level = 8
elseif player_Experience >= 310 and < 390 then
player_level = 9
elseif player_Experience >= 390 and < 400 then
player_level = 10
elseif player_Experience >= 400 and < 510 then
player_level = 11
elseif player_Experience >= 510 and < 640 then
player_level = 12]]
end
end