So I'm new at scripting, and was hoping someone could help me. I want to make it so every twenty kills you get one more level up, and I also need to set up a level cap of fifty, please help if you can. I tried adding in a part of the script so that if your level goes past 50 it gets set to 50 again, but it didn't work. Is what I want even possible? My friend made me the level script for the game, here it is;

function onPlayerEntered(newPlayer)

--dont edit between these lines
----------------------------------------
local stats = Instance.new("IntValue")
stats.Name = "leaderstats"
----------------------------------------
local level = Instance.new("IntValue")
level.Name = "Level" --change this to the name of ur stat (like money)
level.Value = 1 --change this to how much cash/stuff the player starts out with.

--again dont edit below here

level.Parent = stats
stats.Parent = newPlayer

end

game.Players.ChildAdded:connect(onPlayerEntered)

5 comments

2

This script doesn't handle increasing the level.

1

All this does is create the leaderboard. This does nothing to increase the level.

0

Alright, thanks guys. Didn't even know if what I needed was possible, I'll get my friend to make a script to work with the level increase. Thanks again.

2

Ooooorrrrrrrr you could learn to script and make it yourself?

0

Hes making scripts for me and then explaining how they work, him making scripts for me to use is also giving him something to teach me.