**Im not very good at scripting so I don't know what is wrong with this script. **
game.Players.PlayerAdded:connect(function(player)
local leaderstats = Instance.new("Model")
leaderstats.Name = "leaderstats"
leaderstats.Parent = player
local LVL = Instance.new("IntValue")
LVL.Name = "Level"
LVL.Value = 1
LVL.Parent = leaderstats
local EXP = Instance.new("IntValue")
EXP.Name = "EXP"
EXP.Value = 0
EXP.Parent = leaderstats
end)
EXP.Changed(connect(function(Value)
if EXP.Value == Level.Value * 50 then
Level.Value = Level.Value + 1
EXP.Value = 0
end)
For example you need 50 XP To level up to level 2, 100 XP to level up to 3, 150 XP to level up to 4 and so on.
Also, how do i make it so if the player has 51 XP, the level will still go up, I had trouble doing it.
Thanks for the help.
PhotonLightning

2 comments
I've written what I believe to be the solution you're looking for on a similar question page: https://scriptinghelpers.org/questions/38264/how-would-i-make-this-script-give-1-level-whenever-the-exp-reaches-100#40643 - let me know if you have any questions.
Note: You'll have to increase the max experience each time on your own (if you do want max experience to increase each level up). It shouldn't be hard, just use whatever algorithm you think suites it best and throw it back into the function.