Hello. I am trying to make a bhopping control script that allows the player to greatly increase speed when they are jumping.
This is my current script:
player.CharacterAdded:Wait()
local accel = 0
local humanoid = player.Character:WaitForChild("Humanoid")
humanoid.Jumping:Connect(function(isJumping)
if isJumping then
accel += 5
-- TODO MAKE THE PLAYER MOVE FORWARD WHEN THEY JUMP
character.PrimaryPart:ApplyImpulse(Vector3.new(workspace.CurrentCamera.CFrame.LookVector.X,0.5,workspace.CurrentCamera.CFrame.LookVector.Z)* accel*5)
wait(0.1)
end
end)
game["Run Service"].RenderStepped:Connect(function()
if humanoid.MoveDirection.Magnitude > 0 then
if accel < 50 then
accel += 0.08 + accel*1.1
else
accel = 50
end
else
--[[
if humanoid.WalkSpeed > 16 then
if accel < -20 then
accel = -20
else
accel -= humanoid.WalkSpeed*2
end
else
humanoid.WalkSpeed = 16
accel = 0
end]]
accel = 0
humanoid.WalkSpeed = 16
end
if humanoid.WalkSpeed > 32 then
humanoid.WalkSpeed = 32
else
humanoid.WalkSpeed += accel/100
end
player.PlayerGui.ScreenGui.TextLabel.Text = math.round(humanoid.WalkSpeed*100)/100 .. ', ' .. math.round(accel*100)/100
end)
This works for regular acceleration, but I would like to make HL1/Evade/Nico’s nextbots style bhopping where jumping increases your speed past the normal limit, and you can sort of “aim” where you move by moving your mouse.
Thanks.