Advertisement
Guest User

nerves

a guest
Nov 26th, 2014
191
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 5.77 KB | None | 0 0
  1. //== Because Trollaux can't make a half decent base I decided to make this. ==//
  2. //==                   I don't care what you do with this                   ==//
  3.  
  4.  
  5. --// A couple notes //--
  6.  
  7. //== I made a CreateMove example that snaps your aiming angles to 0, 0, 0 ==//
  8. //== I made a HUDPaint example that draws the name of your cheat in the top left corner ==//
  9. //== I will add a ESP, Aimbot and menu example later == //
  10. //== The HUDPaint and CreateMove hooks can be detected easily == //
  11.  
  12. local A = {} // Localized table for our cheat, we'll put our functions and variables in here for tidiness
  13.  
  14. // A.Variables [table]
  15. // Purpose: Store useful variables we'll use later in the cheat
  16. // Process: Create table, specify what we would like inside the table
  17.  
  18. A.Variables = {
  19.     stringexample = "string example", // First index of our A.Variables table is a string
  20.     boolexample = true, // Second one is a bool, you can either do true or false
  21.     floatexample = 1, // Third one is a float, can be any number
  22.     GlobalColor = Color( 153, 0, 0, 255 ), // Fourth index is our color we are going to be using in the hack.
  23.     CheatName = "OurCheat" // Fifth index is a string, the name of our cheat. Change if you want.
  24. }
  25.  
  26. // A.PrintChat [function]
  27. // Purpose: Print stuff in chat for us, useful for notifying the user
  28. // Process: Adds to chat the text with the color GlobalColor, concate the
  29. //          string, then we put inside our two brackets the variable
  30. //          CheatName, revert back to white color, then use txt for
  31. //          the remainder of the string
  32.  
  33. function A.PrintChat( txt ) // Create the function, accept the argument txt
  34.     chat.AddText( A.Variables.GlobalColor, "[", A.Variables.CheatName, "] ", Color( 255, 255, 255, 255 ), txt ) // Use the function AddText in the library chat to print things into chat
  35. end
  36.  
  37. // A.PrintConsole [function]
  38. // Purpose: Print stuff in console like hooks added and other various things so debugging is easier
  39. // Process: Same process as A.PrintChat, except we use a gray color and we use the newline character
  40. //          at the end of the string so the messages don't overlap
  41.  
  42. function A.PrintConsole( txt ) // Create the function, accept the argument txt
  43.     MsgC( Color( 112, 128, 144 ), "[", A.Variables.CheatName, "] ", txt .. "\n" ) // Use the function MsgC in the global table to create a message in console
  44. end
  45.  
  46. // A.RandomString [function]
  47. // Purpose: Makes us a random string that we use later in the A.AddHook function
  48. // Process: Make a localized variable that is a blank string, create a for loop
  49. //          and add onto our str string with a random letter/number/character,
  50. //          as many times as it is specified in our first argument amt
  51.  
  52. function A.RandomString( amt )
  53.     local str = "" // Localized blank string
  54.         for i = 1, amt do // For loop starting at 1 ending at amt, run the for loop
  55.             str = str .. string.char( math.random( 97, 122 ) ) // Add onto str a random letter/number/character
  56.         end // end our for loop
  57.     return str // return our string full of random letters/numbers/characters, exit the scope
  58. end
  59.  
  60. // A.HookFunction [function]
  61. // Purpose: Make hooks with randomly generated names so anticheats cant use hook.GetTable[ "CreateMove" ][ "Aimbot" ]
  62. // Process: Make a localized variable that gets a random string of 15 length from our function A.RandomString, then we
  63. //          create our hook with hook.Add. After doing that we print in console using A.PrintConsole that we hooked a
  64. //          function with the type of the hook and the name of the hook
  65.  
  66. function A.HookFunction( typ, func )
  67.     local str = A.RandomString( 15 ) // Grab a random string of 15 length from A.RandomString
  68.     hook.Add( typ, str, func ) // Note: hook.Add can be detected VERY EASILY, I recommend you dig around some other cheats to see how they hook things
  69.     A.PrintConsole( "Hooked a function with the type: " .. typ .. " with the name: " .. str ) // Print in console that we hooked a function
  70. end
  71.  
  72. // A.CreateMove [function] [hooked]
  73. // Purpose: Help us make things like bunny hop automation, aimbots, spinbots and other fun stuff
  74. // Process: Store our angle in the user command with the angle we specified using the function SetViewAngles
  75.  
  76. function A.CreateMove( cmd )
  77.     cmd:SetViewAngles( Angle( 0, 0, 0 ) ) // Stores the angle 0, 0, 0 in the user command which gets sent to the server later
  78. end
  79.  
  80. // A.HUDPaint [function] [hooked]
  81. // Purpose: Our function we draw our ESP and other various stuff in
  82. // Process: Uses the function DrawText in the draw library to make text.
  83. //          We are using the text of our variable A.VariableA.CheatName,
  84. //          using the font Default with the location on our screen of
  85. //          X: 10 Y: 10 with the color A.VariableA.GlobalColor
  86.  
  87. function A.HUDPaint()
  88.     local CheatName = A.Variables.CheatName // We could localize the other things like GlobalColor if we wanted to, for now I'll just localize A.VariableA.CheatName
  89.     draw.DrawText( CheatName, "Default", 5, 5, A.Variables.GlobalColor ) // Use the function DrawText from the draw library with our specified arguments
  90. end
  91.  
  92. function A.HookedFunctionsCreateMove( cmd )
  93.     A.CreateMove( cmd ) // Call our function A.CreateMove with one argument being pushed, which is the user command set of functions
  94. end
  95.  
  96. A.HookFunction( "CreateMove", A.HookedFunctionsCreateMove ) // Hook the function A.HookedFunctionsCreateMove with CreateMove which calls all our functions that need to be ran every tick and pushes into them the user command set of functions
  97.  
  98. function A.HookedFunctionsHUDPaint()
  99.     A.HUDPaint() // Call our function A.HUDPaint
  100. end
  101.  
  102. A.HookFunction( "HUDPaint", A.HookedFunctionsHUDPaint ) // Hook the function A.HookedFunctionsHUDPaint with HUDPaint which runs everything fast but not every tick
  103.  
  104. A.PrintChat( "Cheat successfully loaded!" ) // Print in chat that the cheat has been loaded
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement