on the first line, it is supposed to be like this
game.Players.PlayerAdded:connect(function(player)
I missed out the s in Players XD, I don't mind people borrowing this script and feel free to give credit :D
game.Playes.PlayerAdded:connect(function(player) local leaderstats = Instance.new("BoolValue",player) -- Creating the leaderstats leaderstats.Name = "leaderstats" local Level = Instance.new("IntValue",leaderstats) -- Making a Value called Level Level.Value = 1 Level.Name = "Level" local XP = Instance.new("IntValue",leaderstats) -- Making a Value called XP XP.Value = 0 XP.Name = "XP" end) XP.Changed(connect(function() if XP.Value => Level.Value*15 then -- Everytime your level is increased, it would be harder to level up Level.Value = Level.Value + 1 -- It adds 1 to your level XP.Value = 0 -- It resets your XP
I have a question. Why did you use "BoolValue" instead of using a folder? when creating the leaderstats.
local leaderstats = Instance.new("Folder",player) leaderstats.Name = "leaderstats"