Advertisement
Guest User

aHop v0.4b

a guest
Jul 15th, 2013
223
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.30 KB | None | 0 0
  1. /*
  2.  
  3.     aHop.lua
  4.    
  5.     Advanced bunnyhop v1.0
  6.    
  7.     "Simple, yet effective."
  8.    
  9. */
  10.  
  11. /************************************/
  12.  
  13. local Enabled = true
  14. local Jumps = 0
  15. local aHop = {}
  16.  
  17. /*
  18.  
  19.     Helper functions
  20.        
  21. */
  22.  
  23. function aHop.AddHook( Type, Function )
  24.     Name = "[aHop] - " .. math.random( 1, 10000 )
  25.     hook.Add( Type, Name, Function )
  26. end
  27.  
  28. function aHop.AddCommand( Name, Function )
  29.     concommand.Add( Name, Function )
  30. end
  31.  
  32. /*
  33.  
  34.     Core functions
  35.    
  36. */
  37.  
  38. function aHop.toggleBunnyhop()
  39.     Enabled = !Enabled
  40.     if Enabled == true then
  41.         chat.AddText( Color( 255, 0, 0 ), "[aHop v1.0] ", Color( 255, 255, 255 ), "Bunnyhop enabled." )
  42.     else
  43.         chat.AddText( Color( 255, 0, 0 ), "[aHop v1.0] ", Color( 255, 255, 255 ), "Bunnyhop disabled." )
  44.     end
  45. end
  46.  
  47. function aHop.bunnyHop( cmd, u )
  48.     if Enabled then
  49.         if !LocalPlayer():IsOnGround() then
  50.             cmd:SetButtons( bit.band( cmd:GetButtons(), bit.bnot( IN_JUMP ) ) )        
  51.             Jumps = Jumps + 1
  52.         end
  53.     end
  54. end
  55.  
  56. /*
  57.  
  58.     Hooks and command adding.
  59.    
  60. */
  61.  
  62. aHop.AddCommand( "aHop", aHop.toggleBunnyhop )
  63. aHop.AddHook( "CreateMove", aHop.bunnyHop )
  64. chat.AddText( Color( 255, 255, 50 ), "[aHop v1.0] ", Color( 255, 255, 255 ), "Loaded script!" )
  65. chat.AddText( Color( 255, 50, 255 ), "[aHop v1.0] ", Color( 255, 255, 255 ), "Type 'aHop' in console to toggle the script." )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement