Check Rank Everytime Players Level Up

how to check player’s rank every time they level up? everytime i level up, i get a nil value because the hud just draw one time only and i need to reload the game to make the current rank appear in the hud…thanks in advance :godzing:


function HUD()

	local ranktag
	local currentlvl = tonumber(Client:GetNWInt("playerLvl"))

	if(currentlvl < 5) then
		ranktag = "Learning"
	elseif(currentlvl  > 5 and currentlvl < 10) then
		ranktag = "Beginner"
	elseif(currentlvl > 10 and currentlvl < 15) then
		ranktag = "Rookie"
	elseif(currentlvl > 15 and currentlvl < 20) then
		ranktag = "Regular"
	elseif(currentlvl > 20 and currentlvl < 25) then
		ranktag = "Good"
	elseif(currentlvl > 25 and currentlvl < 30) then
		ranktag = "Skilled"
	elseif(currentlvl > 30 and currentlvl < 35) then
		ranktag = "Amazing"
	elseif(currentlvl > 35 and currentlvl < 40) then
		ranktag = "Awesome"
	elseif(currentlvl > 40 and currentlvl < 45) then
		ranktag = "Boss"
	elseif(currentlvl > 45 and currentlvl < 50) then
		ranktag = "Elite"
	elseif(currentlvl > 50 and currentlvl < 55) then
		ranktag = "Professional"
	elseif(currentlvl > 55 and currentlvl < 60) then
		ranktag = "WTF"
	elseif(currentlvl > 60 and currentlvl < 65) then
		ranktag = "Brutal"
	elseif(currentlvl > 65 and currentlvl < 70) then
		ranktag = "Glorious"
	elseif(currentlvl > 70 and currentlvl < 75) then
		ranktag = "Unbeatable"
	elseif(currentlvl > 75 and currentlvl < 80) then
		ranktag = "Unbelievable"
	elseif(currentlvl > 80 and currentlvl < 85) then
		ranktag = "Hacker"
	elseif(currentlvl > 85 and currentlvl < 90) then
		ranktag = "Insane"
	elseif(currentlvl > 90 and currentlvl < 95) then
		ranktag = "Legendary"
	elseif(currentlvl > 95 and currentlvl < 100) then
		ranktag = "The Real Sanic"
	elseif(currentlvl > 100 and currentlvl < 105) then
		ranktag = "MLG"
	elseif(currentlvl > 105 and currentlvl < 110) then
		ranktag = "2exp4me"
	elseif(currentlvl > 110 and currentlvl < 115) then
		ranktag = "One Step To God"
	elseif(currentlvl > 115) then
		ranktag = "God"
	end


	draw.SimpleText("Rank : "..ranktag,"Roboto", 84, 65,Color(255,255,255,255), 0, 4)



end
hook.Add("HUDPaint", "DisplayHud", HUD)

bump

Tried putting the vars outside of the hud?