GMOD Auto-hop script help

Hey I just started a bhop server and I cant find a working auto-jump script anywhere. (where you hold space and it autojumps)
I was just wondering if anyone can help me and give me a script.

-Thanks



local bhopEnabled = CreateClientConVar("bhop_enabled", 0, true, false)

hook.Add("CreateMove", "bhopYo", function(ucmd)
	if !bhopEnabled:GetBool() then return end
	
	if ucmd:KeyDown(IN_JUMP) and IsValid(LocalPlayer()) and LocalPlayer():GetMoveType() != MOVETYPE_NOCLIP and LocalPlayer():Alive() then
		local buttons = ucmd:GetButtons()
		if !LocalPlayer():IsOnGround() then
			buttons = bit.band(buttons, bit.bnot(IN_JUMP))
		end
		ucmd:SetButtons(buttons)
	end	
end)


You should try google before asking.

Thank you :slight_smile:

[editline]9th May 2014[/editline]

“and I cant find a working auto-jump script anywhere” I have googled it.

You clearly didn’t.


(User was banned for this post ("Don't be an asshole / LMGTFY link" - Swebonny))

Well I did… and I didnt want a double jump script…

fuuuuk my bad. Sry :=)

Thank you! But is there a way to make it so people don’t have to activate it themselves?


local bhopEnabled = CreateClientConVar("bhop_enabled", 1, true, false)




hook.Add("CreateMove", "bhopYo", function(ucmd)

	if ucmd:KeyDown(IN_JUMP) and IsValid(LocalPlayer()) and LocalPlayer():GetMoveType() != MOVETYPE_NOCLIP and LocalPlayer():Alive() then
		local buttons = ucmd:GetButtons()
		if !LocalPlayer():IsOnGround() then
			buttons = bit.band(buttons, bit.bnot(IN_JUMP))
		end
		ucmd:SetButtons(buttons)
	end	
end)


Thank you !!! - Sorry if this is trouble but how can I make so when people do /r or !r it restarts there bhop time and spawns them at the start?