Long story short, im making a game where theres a level up system based on kills and I use the script
local maxlevel = 100
game.Players.PlayerAdded:connect(function(player)
local stats = Instance.new("IntValue", player)
stats.Name = "leaderstats"
local level = Instance.new("IntValue", stats)
level.Name = "Level"
level.Value = 1
local exp = Instance.new("IntValue", stats)
exp.Name = "Exp"
exp.Value = 0
while wait() do
local extralevel = level.Value
local expneed = ((extralevel * 2) - 1) * 50
if level.Value < maxlevel then
if exp.Value >= expneed then
level.Value = level.Value + 1
exp.Value = exp.Value - expneed
end
end
end
end)
2 questions: 1, I made a working gui version of displaying the level, HOWEVER it wont update when you level up it works the first time but wont no more, help, to go along with the leveling up. 2, Using this script how would I make it so if you kill someone you get exp?

1 comment
Can you show the script for the gui. Also you can use the Died Event on Humanoids to get Exp on kill