|
| 11 Nov 2016 06:20 PM |
plr = game.Players.LocalPlayer XP = plr.leaderstats:WaitForChild("XP") LVL = plr.leaderstats:WaitForChild("Level") XPNEEDED = game.Players.LocalPlayer.leaderstats.Level.Value * 10
while wait() do if XP.Value >= XPNEEDED then XP.Value = XP.Value - XPNEEDED LVL.Value = LVL.Value + 1 end end
How can make this not a loop?
Advertisement : Bloxikin time |
|
|
| Report Abuse |
|
|
| 11 Nov 2016 06:33 PM |
local plr=game.Players.LocalPlayer local XP=plr.leaderstats:WaitForChild("XP") local LVL=plr.leaderstats:WaitForChild("Level") local XPNEEDED=game.Players.LocalPlayer.leaderstats.Level.Value*10
local function checker() if XP.Value>=XPNEEDED then XP.Value=XP.Value-XPNEEDED LVL.Value=LVL.Value+1 end end XP.Changed:connect(checker)
|
|
|
| Report Abuse |
|