debounces = { }runspeed = { }jumppower = { }runstatus = { }jumpstatus = { }startconfig = { runstat = 0, jumpstat = 0, runspd = -10,jumppwr = -10, runstatfornxtlvl = 10, jumpstatfornxtlvl = 10, maxrunspd = 200, maxjumppwr = 75}--[[startconfigrunstat = 0startconfigjumpstat = 0startconfigrunspd = -10startconfigjumppwr = -10startconfigrunstatfornxtlvl = 10startconfigjumpstatfornxtlvl = 10startconfigmaxrunspd = 200startconfigmaxjumppwr = 75--]]function getPlayerNum(player) local curPlayerNum = nil local p = game.Players:GetChildren() for i = 1,#p do if p[i] == player then curPlayerNum = i end end return curPlayerNumendfunction onRunning(player, speed) local playernum = getPlayerNum(player) print(player.Name, playernum) if speed > 0 then if runstatus[playernum] >= startconfig.runstatfornxtlvl then runstatus[playernum] = 0 runspeed[playernum] = runspeed[playernum] + 0.1 end player.Character.Torso.BodyVelocity.velocity = Vector3.new(player.Character.Torso.CFrame.lookVector.x, 0, player.Character.Torso.CFrame.lookVector.z) else player.Character.Torso.BodyVelocity.velocity = Vector3.new(0,0,0) endendfunction onJumping(player) local playernum = getPlayerNum(player) print(player.Name, playernum) if jumpstatus[playernum] >= startconfig.jumpstatfornxtlvl then jumpstatus[playernum] = 0 if jumppower[playernum] < startconfig.maxjumppwer then jumppower[playernum] = jumppower[playernum] + 0.1 end end player.Character.Torso.Velocity = player.Character.Torso.Velocity + Vector3.new(0, jumppower, 0)endfunction onRespawned(player) if player.Character~=nil then player.Character:findFirstChild("Humanoid").Running:connect(function(speed) onRunning(player, speed) end) player.Character:findFirstChild("Humanoid").Jumping:connect(function() onJumping(player) end) end local bv = Instance.new("BodyVelocity") bv.maxForce = Vector3.new(1e+010, 0, 1e+010) bv.velocity = Vector3.new(0,0,0) bv.Parent = player.Character.Torsoendfunction onEntered(newPlayer) newPlayer.Changed:connect(function(prop) if prop == "Character" then onRespawned(newPlayer) end end) local p = game.Players:GetChildren() for i = 1,#p do if p[i] == player then localplayer = i end end table.insert(debounces, localplayer, false) table.insert(runspeed, localplayer, startconfig.runspd) table.insert(jumppower, localplayer, startconfig.jumppwr) table.insert(runstatus, localplayer, startconfig.runstat) table.insert(jumpstatus, localplayer, startconfig.jumppwr)endfunction onLeaving(player) local p = game.Players:GetChildren() for i = 1,#p do if p[i] == player then localplayer = i end end table.remove(debounces, localplayer) table.remove(runspeed, localplayer) table.remove(jumppower, localplayer) table.remove(runstatus, localplayer) table.remove(jumpstats, localplayer)endgame.Players.PlayerAdded:connect(onEntered)game.Players.PlayerRemoving:connect(onLeaving)