function LevelNotify(lvl)
Player.PlayerGui.LevelNotify.LevelUp:Fire(lvl)
end
function onLevelUp(lvl)
LVL_HUE = math.clamp(tonumber(lvl), 1, 100) / 100 * 0.8333333333333334
Info.XP.Bar.Level.Text = "LEVEL " .. lvl
Info.XP.Bar.BackgroundColor3 = Color3.fromHSV(LVL_HUE, 1, 0.19607843137254902)
Info.XP.Bar.Fill.BackgroundColor3 = Color3.fromHSV(LVL_HUE, 1, 1)
end
Database.Notify.OnClientEvent:connect(function(action, ...)
local vars = {
...
}
if action == "new tp" then
onPointsAdded(vars[1])
elseif action == "new level" then
onLevelUp(vars[1])
LevelNotify(vars[1])
elseif action == "new xp" then
onXPChange(vars[1])
end
end)
onLevelUp(sendControl("get level"))
onPointsAdded(sendControl("get tp"))
onXPChange(sendControl("get xp"))
Im trying to make it so it doesnt loop, it only does the lvlnotify fire each time ur at a new level.

3 comments
and then have a remote update the client side for all stats instead of 1 remote per stat
it should update whenever theres an xp change or anything
doesnt have to be in a module tho but its just better there