Advertisement
Guest User

Gmod Bhop Script -> lua

a guest
Jul 11th, 2016
3,718
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.73 KB | None | 0 0
  1. local bhop = false
  2. LocalPlayer():SetWalkSpeed(0)
  3. hook.Add("Think", "bhop", function()
  4. if bhop then
  5.      if (input.IsKeyDown( KEY_SPACE ) ) then
  6.         if LocalPlayer():IsOnGround() then
  7.             RunConsoleCommand("+jump")
  8.             HasJumped = 1
  9.         else
  10.             RunConsoleCommand("-jump")
  11.             HasJumped = 0
  12.         end
  13.     elseif bhop and LocalPlayer():IsOnGround() then
  14.         if HasJumped == 1 then
  15.             RunConsoleCommand("-jump")
  16.             HasJumped = 0
  17.         end
  18.     end
  19. end
  20. end)
  21.  
  22. concommand.Add("bhop_toggle", function()
  23. if bhop then
  24.     bhop = !bhop
  25.     LocalPlayer():ChatPrint("BHop turned OFF")
  26. else
  27.     bhop = !bhop
  28.     LocalPlayer():ChatPrint("BHop turned ON")
  29. end
  30. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement