This is the script :
game.Players.PlayerAdded:connect(function(Player)
local Data = Instance.new("IntValue",Player)
Data.Name = "Data"
local XP = Instance.new("IntValue",Data)
XP.Name = "XP"
XP.Value = 0
local Level = Instance.new("IntValue",Data)
Level.Name = "Level" ------- It's name is Level
Level.Value = 1
XP.Changed:connect(function() XPChange(Player,XP,Level) end)
end)
function XPChange(Player,XP,Level)
if XP.Value >= Level.Value*150 then
XP.Value = 0
Level.Value = Level.Value+ 1
end
if Level.Value == 100 and XP.Value ==15000 then
--How do i make it so if the XP is 15000 they can't level up if they reach the maxXP
end
end

3 comments
Tip: to save it, use datastores.
Yeah, I didn't include that because OP didn't ask for it.
This works, thanks and i already have a DataStore script :)