My HUDs Bar Won't reset to 0!

[lua]local UpKeep = 100
local exp = LocalPlayer():GetNWInt(“Exp”)
local cur = LocalPlayer():GetNWInt(“Level”)
local new = (UpKeep4(ply:GetNWInt(“Level”) + 1) + ply:GetNWInt(“Level”)UpKeep)
local w = ScrW()-2
local EXP = w
((exp-cur)/(new-cur))
local red = Color(255,0,0,175)
draw.RoundedBox( 2, 0, ScrH()-20, ScrW(), 20, color_black)//bottom outline
draw.RoundedBox(4, 2, ScrH()-18, EXP, 16,red)//bottom inline[/lua]

How would I make it go back to the beginning of the bar instead of staying as it is?

You could reset the experience points to 0 and have it so the amount needed was only for the gap between levels. If you aren’t increasing the level NWInt could be the problem.

Isn’t that someone else’s code? Correct me if I’m wrong but I’m sure I’ve come across it once.

Its Entoros Exp Mod code but it doesnt quite work for what im doing.

Doesn’t really make sense to use a NWInt here, as the player is the only one who has to know the variable.

[LUA]
Width = Width of choice
CurrentEXP = Current amount of EXP
EXPNeeded = EXP that is needed
RealWidth = Width * (CurrentEXP / NeededEXP)
[/LUA]
Use this instead of the formula you use