Guest User

ghook/ground0 cheats

a guest
Sep 13th, 2015
614
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 38.80 KB | None | 0 0
  1. /*
  2.     Ground0 Cheats
  3.    
  4.     Coded by cdriza and Q2F2/Cave
  5.  
  6.     Credits:
  7.         cdriza - Almost everything
  8.         Q2F2 - Localization & help
  9.         Im Friendly - Silent Aim, some of the ESP, and help
  10.         2cash - AAA stuff
  11.  
  12.     Update log:
  13.     v1 - gHook
  14.     v1.1 - add silent aim + move-fix
  15.     v1.2 - fix move-fix
  16.     v1.3 - add menu + anti-anti-aim
  17.     v1.4 - add anti-aim
  18.     v1.5 - random changes
  19.     v1.6 - autostrafe + bhop fixes
  20.     v1.7 - added comments
  21.     v1.8 - added permanent nospread
  22.     v1.9 - added experimental fakelag
  23.     v2.0 - fixed fakelag, improved aimbot speeds, anti-anti-aim rewrite
  24. */
  25.  
  26. local _R                = debug.getregistry() // get the registry
  27.  
  28. // nice localization cdriza
  29. // why thank you
  30.  
  31. local vAngle            = _R.Vector.Angle
  32. local vLength           = _R.Vector.Length
  33. local vDistance         = _R.Vector.Distance
  34. local vToScreen         = _R.Vector.ToScreen
  35. local aForward          = _R.Angle.Forward
  36.  
  37. local pGetShootPos      = _R.Player.GetShootPos
  38. local pGetFriendStatus  = _R.Player.GetFriendStatus
  39. local pGetActiveWeapon  = _R.Player.GetActiveWeapon
  40. local pNick             = _R.Player.Nick
  41. local pEyePos           = _R.Player.EyePos
  42. local pTeam             = _R.Player.Team
  43. local pInVehicle        = _R.Player.InVehicle
  44. local pIsBot            = _R.Player.IsBot
  45. local pAlive            = _R.Player.Alive
  46.  
  47. local eIsOnGround       = _R.Entity.IsOnGround
  48. local eHealth           = _R.Entity.Health
  49. local eIsPlayer         = _R.Entity.IsPlayer
  50. local eLocalToWorld     = _R.Entity.LocalToWorld
  51. local eGetPos           = _R.Entity.GetPos
  52. local eOnGround         = _R.Entity.OnGround
  53. local eOBBCenter        = _R.Entity.OBBCenter
  54. local eDrawModel        = _R.Entity.DrawModel
  55. local eWaterLevel       = _R.Entity.WaterLevel
  56. local eGetMoveType      = _R.Entity.GetMoveType
  57. local eGetClass         = _R.Entity.GetClass
  58. local eLookupBone       = _R.Entity.LookupBone
  59. local eGetVelocity      = _R.Entity.GetVelocity
  60. local eHealth           = _R.Entity.Health
  61. local eGetMaxHealth     = _R.Entity.GetMaxHealth
  62. local eSetPoseParameter = _R.Entity.SetPoseParameter
  63. local eInvalidateBoneCache = _R.Entity.InvalidateBoneCache
  64. local eEyeAngles        = _R.Entity.EyeAngles
  65. local eGetAttachment    = _R.Entity.GetAttachment
  66. local eLookupAttachment = _R.Entity.LookupAttachment
  67. local eOBBMaxs          = _R.Entity.OBBMaxs
  68.  
  69. local wClip1            = _R.Weapon.Clip1
  70. local wGetNextPrimaryFire = _R.Weapon.GetNextPrimaryFire
  71. local wGetActivity      = _R.Weapon.GetActivity
  72.  
  73. local cGetForwardMove   = _R.CUserCmd.GetForwardMove
  74. local cGetSideMove      = _R.CUserCmd.GetSideMove
  75. local cGetViewAngles    = _R.CUserCmd.GetViewAngles
  76. local cSetViewAngles    = _R.CUserCmd.SetViewAngles
  77. local cSetForwardMove   = _R.CUserCmd.SetForwardMove
  78. local cSetSideMove      = _R.CUserCmd.SetSideMove
  79. local cGetMouseX        = _R.CUserCmd.GetMouseX
  80. local cGetMouseY        = _R.CUserCmd.GetMouseY
  81. local cGetButtons       = _R.CUserCmd.GetButtons
  82. local cSetButtons       = _R.CUserCmd.SetButtons
  83. local cRemoveKey        = _R.CUserCmd.RemoveKey
  84. local cKeyDown          = _R.CUserCmd.KeyDown
  85. local cCommandNumber    = _R.CUserCmd.CommandNumber
  86.  
  87. local cvGetBool         = _R.ConVar.GetBool
  88.  
  89. local iIsMouseDown      = input.IsMouseDown
  90. local iIsKeyDown        = input.IsKeyDown
  91. local fExists           = file.Exists
  92. local uJSONToTable      = util.JSONToTable
  93. local uCRC              = util.CRC
  94. local uTraceLine        = util.TraceLine
  95. local eTickInterval     = engine.TickInterval
  96. local mRandom           = math.random
  97. local mAbs              = math.abs
  98. local mAngleDifference  = math.AngleDifference
  99. local mClamp            = math.Clamp
  100. local mNormalizeAngle   = math.NormalizeAngle
  101. local dSimpleText       = draw.SimpleText
  102. local sSetDrawColor     = surface.SetDrawColor
  103. local sDrawOutlinedRect = surface.DrawOutlinedRect
  104. local tGetColor         = team.GetColor
  105. local hAdd              = hook.Add
  106. local pGetAll           = player.GetAll
  107. local bBor              = bit.bor
  108. local tCopy             = table.Copy
  109. local vCreate           = vgui.Create
  110. local tRandom           = table.Random
  111. local sFind             = string.find
  112.  
  113. local tostring          = tostring
  114. local next              = next
  115. local Vector            = Vector
  116. local IsEntity          = IsEntity
  117. local IsValid           = IsValid
  118. local Color             = Color
  119. local MsgC              = MsgC
  120. local Lerp              = Lerp
  121. local pcall             = pcall
  122. local CurTime           = CurTime
  123. local IsFirstTimePredicted = IsFirstTimePredicted
  124.  
  125. local pLocalPlayer      = LocalPlayer() // localize us!
  126.  
  127. __gcopy = __gcopy || tCopy(_G) // get the existing _G copy, or make a new one!
  128. __rcopy = __rcopy || tCopy(_R) // get the existing registry copy, or make a new one!
  129. __gbackup = __gbackup || tCopy(GAMEMODE) // get the existing GAMEMODE copy, or make a new one!
  130.  
  131. local gHook             = {} // make our table!
  132. gHook.AASwitch          = false // setup switch
  133. gHook.CurTime           = 0 // set proper curtime var
  134. gHook.FLQueue           = 0 // setup fakelag queue
  135. gHook.SendPacket        = false // set can we fakelag var
  136. gHook.Dickwrap          = nil // no copied dickwrap table right now
  137. gHook.Aimbotting        = false // set are we aimbotting var
  138. gHook.NoSpread          = false // set can we nospread var
  139. gHook.MenuOpen          = false // set menuopen var
  140. gHook.Insert            = false // set delete var
  141. gHook.Insert2           = false // set delete2 var
  142. gHook.FakeAngle         = Angle() // make the fake angle
  143. gHook.Attacking         = false // we aren't attacking
  144. gHook.Target            = nil // add a nil target
  145. gHook.LastAng           = 540 // last yaw ang for aa
  146.  
  147. gHook.Settings          = { // table for storing our settings
  148.     Aimbot = {
  149.         bEnabled = false, // aimbot enabled var
  150.         bAntiAntiAim = true, // anti-anti-aim var
  151.         bNoSpread = true, // aimbot nospread var
  152.         bTeam = false, // ignore team var
  153.         bFriends = false, // ignore friends var
  154.         bSilent = false, // silent aimbot var
  155.         bAutoShoot = false, // autoshoot var
  156.         bLegit = false, // legit aimbot var
  157.     },
  158.    
  159.     Visuals = {
  160.         bEnabled = false, // visuals enabled var
  161.         bName = false, // name esp var
  162.         bBox = false, // box esp var
  163.         bHealth = false, // health esp var
  164.         bTeam = false, // team color esp var
  165.         bWatermark = false, // watermark var
  166.     },
  167.    
  168.     Misc = {
  169.         bBunnyHop = false, // bhop var
  170.         bThirdperson = false, // thirdperson var
  171.     },
  172.    
  173.     HvH = {
  174.         bAntiAim = false, // aa var
  175.         bJitter = false, // jitter aa var
  176.         bFakeLag = false, // fakelag var
  177.     },
  178. }
  179.  
  180. gHook.Cones             = {} // weapon cone storage table
  181.  
  182. _R.Entity.FireBullets = function(pEnt, bul)
  183.     local pWep = pGetActiveWeapon(pLocalPlayer) || NULL // get our active weapon
  184.    
  185.     if (!bul.Spread || !IsValid(pWep)) then return __rcopy.Entity.FireBullets(pEnt, bul) end // if the bullet doesn't have spread or the weapon isn't valid, return the copy and do nothing more
  186.    
  187.     if (!gHook.Cones[eGetClass(pWep)] || gHook.Cones[eGetClass(pWep)] != bul.Spread) then // if we don't have the cone or the old cone differs from the new cone
  188.         gHook.Cones[eGetClass(pWep)] = bul.Spread * -1 // set the weapon cone for this weapon!
  189.     end
  190.    
  191.     return __rcopy.Entity.FireBullets(pEnt, bul) // return the copy
  192. end
  193.  
  194. function gHook.Notify(strMsg)
  195.     MsgC(Color(0, 0, 255), "[gHook] ", Color(255, 255, 255), strMsg .. " \n") // message
  196. end
  197.  
  198. gHook.Notify("Loading!") // we are loading!
  199.  
  200. local suc, err = pcall(require, "dickwrap") // pcall it
  201.  
  202. if suc and !err then
  203.     gHook.Notify("Found dickwrap module, NoSpread is now enabled.") // notification
  204.     gHook.NoSpread = true // we can nospread!
  205.     require("dickwrap") // require it
  206.     gHook.Dickwrap = tCopy(dickwrap) // copy the table
  207.     _G["dickwrap"] = nil // set it to nil, anti-cheat proofing!
  208. else
  209.     gHook.Notify("The dickwrap module wasn't installed correctly, NoSpread is now disabled.") // notification
  210. end
  211.  
  212. err = nil // set it to nil, incase you didn't have dickwrap installed and it was something, it would break this check
  213.  
  214. local suc, err = pcall(require, "bsendpacket") // pcall it
  215.  
  216. if suc and !err then
  217.     gHook.Notify("Found dickwrap module, NoSpread is now enabled.") // notification
  218.     gHook.SendPacket = true // we can fakelag!
  219.     require("bsendpacket") // require it
  220.     bSendPacket = true // initial true statement
  221. else
  222.     gHook.Notify("The dickwrap module wasn't installed correctly, NoSpread is now disabled.") // notification
  223. end
  224.  
  225. function gHook.AntiAntiAim(pEnt)
  226.     local angPitch = eEyeAngles(pEnt).p
  227.     local angYaw = eEyeAngles(pEnt).y
  228.  
  229.     angYaw = mNormalizeAngle(angYaw)
  230.     angYaw = mClamp(angYaw, -180, 180)
  231.  
  232.     if (angPitch > 89) then
  233.         angPitch = 180 - angPitch
  234.     elseif (-89 > angPitch) then
  235.         angPitch = -88
  236.     end
  237.  
  238.     eSetPoseParameter(pEnt, "aim_pitch", angPitch)
  239.     eSetPoseParameter(pEnt, "aim_yaw", angYaw)
  240.     eInvalidateBoneCache(pEnt)
  241. end
  242.  
  243. function gHook.CheckVis(vecPos, pEnt)        
  244.     local tblTraceData = {
  245.         ["start"] = pGetShootPos(pLocalPlayer), // the start of our trace is at our eye position!
  246.         ["endpos"] = vecPos, // the end position is the place we want to see is visible
  247.         ["filter"] = pLocalPlayer, // filter out us, we don't want it returning true because we were in the way!
  248.         ["mask"] = MASK_SHOT // set the mask to mask_shot
  249.     }
  250.  
  251.     if (gHook.Settings.Aimbot["bAntiAntiAim"]) then // if the anti-anti-aim variable is enabled
  252.         gHook.AntiAntiAim(pEnt) // now is the perfect time to anti-anti-aim them!
  253.     end
  254.    
  255.     local pTrace = uTraceLine(tblTraceData) // make a trace with our trace data
  256.     return (pTrace.Fraction == 1 || pTrace.Entity == pEnt) // if it reached the destination or the entity at the end was the target, return true!
  257. end
  258.  
  259. function gHook.GetPos(pEnt)
  260.     local vecPos // localize the position variable
  261.      
  262.     if (eLookupAttachment(pEnt, "forward") != 0 && gHook.CheckVis(eGetAttachment(pEnt, eLookupAttachment(pEnt, "forward")).Pos, pEnt)) then // if it has the forward attachment and the forward attachment is visible
  263.         vecPos = eGetAttachment(pEnt, eLookupAttachment(pEnt, "forward")).Pos // set the position to that attachment
  264.         vecPos = vecPos + (eGetVelocity(pEnt) * eTickInterval()) // predict the target pos
  265.         vecPos = vecPos - (eGetVelocity(pLocalPlayer) * eTickInterval()) // predict our pos
  266.        
  267.         return vecPos // return it, do nothing else
  268.     end
  269.      
  270.     vecPos = eGetPos(pEnt) + eOBBCenter(pEnt) // if it doesn't have the forward attachment, get the center
  271.     vecPos = vecPos + (eGetVelocity(pEnt) * eTickInterval()) // predict the target pos
  272.     vecPos = vecPos - (eGetVelocity(pLocalPlayer) * eTickInterval()) // predict our pos
  273.    
  274.     return vecPos // return it
  275. end
  276.  
  277. function gHook.CheckValid(pEnt) // huge valid check
  278.     if (!pEnt || !IsEntity(pEnt) || !IsValid(pEnt) || pEnt == pLocalPlayer || !pAlive(pEnt) || 0 >= eHealth(pEnt) || pInVehicle(pEnt) || pTeam(pEnt) == TEAM_SPECTATOR || !gHook.CheckVis(gHook.GetPos(pEnt), pEnt)) then return false end
  279.     if (gHook.Settings.Aimbot["bTeam"] && pTeam(pEnt) == pTeam(pLocalPlayer)) then return false end
  280.     if (gHook.Settings.Aimbot["bFriends"] && pGetFriendStatus(pEnt) == "friend") then return false end
  281.      
  282.     return true
  283. end
  284.  
  285. function gHook.OpenMenu()
  286.     if (iIsKeyDown(KEY_DELETE) && !gHook.MenuOpen && !gHook.Insert) then // check if the delete key (menu toggle key) is down, the menu isn't opened, and we weren't pressing delete before
  287.         gHook.Insert = true // we are now pressing delete, set this to true
  288.         gHook.Menu() // open the menu!
  289.     elseif (!iIsKeyDown(KEY_DELETE) && !gHook.MenuOpen) then // now we need a way to set the delete pressing var to false, if the delete key isn't pressed and the menu isn't opened
  290.         gHook.Insert = false // we aren't pressing delete and the MENU ISN'T OPEN
  291.     end
  292.    
  293.     if (iIsKeyDown(KEY_DELETE) && gHook.Insert && gHook.MenuOpen) then // if the delete key is down, delete var is true, and the menu is open
  294.         gHook.Insert2 = true // set delete2 var to true
  295.     else
  296.         gHook.Insert2 = false // else set it to false
  297.     end
  298.  
  299.     // DELETE2 VAR IS TO MAKE SURE THE MENU DOESN'T CLOSE WHEN YOU OPEN IT, IF WE DIDN'T HAVE THIS IT WOULD JUST START OPEN AND CLOSE SPAMMING AS SOON AS YOU OPENED IT!
  300. end
  301.  
  302. function gHook.FindTarget()
  303.     gHook.Target = nil // set the last target to nil
  304.     local iMaxIndexes = #pGetAll() // get the amount of players
  305.    
  306.     for iPlayerIndex = 1, iMaxIndexes do // loop through them all
  307.         local pEnt = pGetAll()[iPlayerIndex] // get the actual entity of the player
  308.         if (gHook.CheckValid(pEnt)) then gHook.Target = pEnt else continue end // if its a valid aimbot target, set the target to that entity else check the next player
  309.     end
  310. end
  311.  
  312. function gHook.Attack(cmd)
  313.     if (gHook.Attacking) then // if we're already attacking
  314.         cRemoveKey(cmd, IN_ATTACK) // stop attacking
  315.         gHook.Attacking = false // set attacking to false
  316.     else
  317.         cSetButtons(cmd, bBor(cGetButtons(cmd), IN_ATTACK)) // if we aren't attacking, start attacking
  318.         gHook.Attacking = true // set attacking to true
  319.     end
  320. end
  321.  
  322. function gHook.Silent(cmd)
  323.     if (gHook.Settings.Aimbot["bSilent"] || gHook.Settings.HvH["bAntiAim"] || gHook.Settings.Aimbot["bNoSpread"]) then // check if silent or anti aim is enabled or nospread
  324.         gHook.FakeAngle = gHook.FakeAngle + Angle(cGetMouseY(cmd) * 0.023, cGetMouseX(cmd) * -0.023, 0) // if they are, make the fakeangle the last fakeangle + the current mouse pos
  325.         gHook.FakeAngle.p = mClamp(gHook.FakeAngle.p, -89, 89) // clamp pitch
  326.         gHook.FakeAngle.y = mNormalizeAngle(gHook.FakeAngle.y) // normalize yaw
  327.     else
  328.         gHook.FakeAngle = cGetViewAngles(cmd) // just set it to regular view angles, we don't need to do anything with it!
  329.     end
  330. end
  331.  
  332. function gHook.FixMove(cmd, bAntiAim) // NO CLUE WHAT THIS DOES, NOT MINE!
  333.     local vecFix = Vector(cGetForwardMove(cmd), cGetSideMove(cmd), 0)
  334.     vecFix = aForward(vAngle(vecFix) + cGetViewAngles(cmd) -Angle(0, gHook.FakeAngle.y, 0)) * vLength(vecFix)
  335.      
  336.     if (bAntiAim) then
  337.         cSetForwardMove(cmd, vecFix.x)
  338.         cSetSideMove(cmd, vecFix.y * -1)
  339.         return
  340.     end
  341.      
  342.     cSetForwardMove(cmd, vecFix.x)
  343.     cSetSideMove(cmd, vecFix.y)
  344. end
  345.  
  346. function gHook.GetSpread(cmd, angPos)
  347.     if (!gHook.Dickwrap || !gHook.NoSpread) then return angPos end // check if we don't have dickwrap installed
  348.     local pWep = pGetActiveWeapon(pLocalPlayer) or NULL // get the players active weapon or nothing if nothing is equipped
  349.     local vecSpread // localized spread var, we'll use this later
  350.      
  351.     if (!IsValid(pWep)) then return angPos end // if the weapon isn't valid (NULL) then return the unpredicted position and do nothing more
  352.      
  353.     if (gHook.Cones[eGetClass(pWep)]) then // do we have this weapons spread?
  354.         local pCone = gHook.Cones[eGetClass(pWep)] // if so get the cone
  355.    
  356.         if (type(pCone) == "number") then // if it's a number it needs to be a vector!
  357.             vecSpread = Vector(-pCone, -pCone, 0) // make it a vector
  358.         elseif (type(pCone) == "Vector") then // but if it's a vector
  359.             vecSpread = pCone // don't do anything to it!
  360.         end
  361.  
  362.         return vAngle(gHook.Dickwrap.Predict(cmd, aForward(angPos), pCone)) // use dickwrap's prediction to predict the spread, don't do anything else
  363.     end
  364.    
  365.     return angPos // if we don't have the cone return the unpredicted position
  366. end
  367.  
  368. function gHook.CanFire()
  369.     if (!gHook.CurTime || gHook.CurTime == 0) then return false end // if we don't have the curtime variable, don't check anything!
  370.     local pWep = pGetActiveWeapon(pLocalPlayer) or NULL // get the players active weapon or nothing if nothing is equipped
  371.      
  372.     if (!IsValid(pWep)) then return false end // if the weapon isn't valid (NULL) then return false, you can't fire nothing!
  373.     return (wGetActivity(pWep) != ACT_RELOAD && gHook.CurTime > wGetNextPrimaryFire(pWep)) // return false if we are reloading or we can't fire or true if we can do both
  374. end
  375.  
  376. function gHook.Aimbot(cmd)
  377.     if (gHook.Settings.Aimbot["bEnabled"] && gHook.Target != nil && gHook.CanFire()) then // check if the aimbot var is enabled, the target is valid, and we can fire
  378.         if (cCommandNumber(cmd) == 0 && !gHook.Settings.Misc["bThirdperson"]) then  // don't aimbot on extra mouse samples
  379.             gHook.Aimbotting = false // we aren't aimbotting!
  380.  
  381.             if (gHook.Settings.Aimbot["bSilent"] || gHook.Settings.HvH["bAntiAim"] || gHook.Settings.Aimbot["bNoSpread"]) then // check if silent aim or anti aim is enabled or nospread
  382.                 cSetViewAngles(cmd, gHook.FakeAngle) // if so set it to our good and dandy fake angle
  383.             end
  384.  
  385.             return
  386.         end
  387.  
  388.         local angOView = cGetViewAngles(cmd) // old view angles
  389.         local iOSideMove = cGetSideMove(cmd) // old side movement
  390.         local iOForwardMove = cGetForwardMove(cmd) // old forward movement
  391.         gHook.Aimbotting = true // we are aimbotting
  392.        
  393.         local angPos = vAngle(gHook.GetPos(gHook.Target) - pGetShootPos(pLocalPlayer)) // get their pos
  394.         angPos.p = mNormalizeAngle(angPos.p) // normalize
  395.         angPos.y = mNormalizeAngle(angPos.y) // normalize
  396.         angPos.r = 0 // set the roll to 0, we don't want our screen flipped!
  397.  
  398.         if (gHook.Settings.Aimbot["bNoSpread"]) then // check if nospread is enabled
  399.             angPos = gHook.GetSpread(cmd, angPos) // get spread angs
  400.             angPos.p = mNormalizeAngle(angPos.p) // normalize
  401.             angPos.y = mNormalizeAngle(angPos.y) // normalize
  402.             angPos.r = 0 // no more roll pls
  403.         end
  404.  
  405.         cSetViewAngles(cmd, (gHook.Settings.Aimbot["bLegit"] && Lerp(0.1, cGetViewAngles(cmd), angPos)) || angPos) // set our view angles
  406.  
  407.         local iDiff = mAbs(mAngleDifference(angPos.p, cGetViewAngles(cmd).p)) + mAbs(mAngleDifference(angPos.y, cGetViewAngles(cmd).y)) // get angle difference
  408.  
  409.         if (gHook.Settings.Aimbot["bAutoShoot"] && 5 > iDiff) then // check if autoshoot is enabled + check that we are near the players head, if we have legit aimbot enabled we could be ages away from the persons head, why shoot at the air?
  410.             gHook.Attack(cmd) // attack!
  411.         end
  412.        
  413.         if (gHook.Settings.Aimbot["bSilent"]) then // check if silent aimbot is enabled
  414.             gHook.FixMove(cmd) // fix movement
  415.         end
  416.        
  417.         return // return nothing and do nothing more, we don't want to say we're not aimbotting or setting our angles to the fake angle!
  418.     end
  419.    
  420.     gHook.Aimbotting = false // we aren't aimbotting!
  421.  
  422.     if (gHook.Settings.Aimbot["bSilent"] || gHook.Settings.HvH["bAntiAim"] || gHook.Settings.Aimbot["bNoSpread"]) then // check if silent aim or anti aim is enabled or nospread
  423.         cSetViewAngles(cmd, gHook.FakeAngle) // if so set it to our good and dandy fake angle
  424.     end
  425. end
  426.  
  427. function gHook.NoSpread(cmd)
  428.     if (gHook.Settings.Aimbot["bNoSpread"] && cKeyDown(cmd, IN_ATTACK) && !gHook.Aimbotting && cmd:CommandNumber() != 0) then // check if nospread is enabled, we're holding down attack, and we aren't aimbotting
  429.         local angSpread = gHook.GetSpread(cmd, cGetViewAngles(cmd)) // if so compensate the spread for our current view angles
  430.         angSpread.x, angSpread.y = mNormalizeAngle(angSpread.x), mNormalizeAngle(angSpread.y) // normalize spread angles
  431.         cSetViewAngles(cmd, angSpread) // then set our view angles!
  432.     end
  433. end
  434.  
  435. function gHook.AntiAim(cmd)
  436.     if (gHook.Settings.HvH["bAntiAim"] && !iIsMouseDown(MOUSE_LEFT) && !gHook.Aimbotting && eGetMoveType(pLocalPlayer) != MOVETYPE_FLY && eGetMoveType(pLocalPlayer) != MOVETYPE_NOCLIP) then // LOADS OF CHECKS
  437.         if (cCommandNumber(cmd) == 0 && !gHook.Settings.Misc["bThirdperson"]) then return end
  438.  
  439.         if (gHook.Settings.HvH["bJitter"]) then // check if jitter is enabled
  440.             local angAAP = gHook.Settings.HvH["bJitter"] && mRandom(-180, 180) // random angles
  441.             local angAAY = gHook.Settings.HvH["bJitter"] && mRandom(-360, 360) // random angles
  442.             cSetViewAngles(cmd, Angle(angAAP, angAAY, 0)) // set the angles
  443.  
  444.             if (angAAP > 89 || angAAP < -89) then // check if we need to do a different movement fix
  445.                 gHook.FixMove(cmd, true) // do antiaim movement fix
  446.             else
  447.                 gHook.FixMove(cmd) // regular movement fix
  448.             end
  449.         else
  450.             gHook.LastAng = gHook.LastAng + 1 // lastang = lastang + 1
  451.  
  452.             if (gHook.LastAng > 550) then // if it's bigger than 550
  453.                 gHook.LastAng = 540 // set it to 540
  454.             end
  455.  
  456.             if (gHook.AASwitch) then // if the switch is true
  457.                 cSetViewAngles(cmd, Angle(180, gHook.LastAng, 0)) // set it to 180
  458.                 if (gHook.SendPacket) then // if we have the bsendpacket module
  459.                     bSendPacket = true // set bsendpacket to true
  460.                 end
  461.             else // else
  462.                 cSetViewAngles(cmd, Angle(-180, gHook.LastAng, 0)) // set it to -180
  463.                 if (gHook.SendPacket) then // if we have the bsendpacket module
  464.                     bSendPacket = false // set bsendpacket to false
  465.                 end
  466.             end
  467.  
  468.             gHook.AASwitch = !gHook.AASwitch // set sideways switch
  469.             gHook.FixMove(cmd, true) // fix our movement!
  470.         end
  471.     end
  472. end
  473.  
  474. function gHook.FakeLag(cmd)
  475.     if (gHook.Settings.HvH["bFakeLag"] && gHook.SendPacket) then // check if its enabled and we have the bsendpacket module
  476.         if (cCommandNumber(cmd) == 0 || (gHook.Settings.HvH["bAntiAim"] && !gHook.Settings.HvH["bJitter"])) then return end // don't fakelag on extra mouse samples
  477.  
  478.         gHook.FLQueue = gHook.FLQueue + 1 // add one createmove tick to the queue
  479.              
  480.         if (gHook.FLQueue >= 0) then // if it's bigger than 0 or it is 0
  481.             if (6 > gHook.FLQueue) then // and 6 (fakelag amount) is bigger than the queue
  482.                 bSendPacket = false // don't send packet
  483.             else // else
  484.                 bSendPacket = true // send packets
  485.             end
  486.         else
  487.             bSendPacket = true // send packets
  488.         end
  489.      
  490.         if (gHook.FLQueue >= 15) then // if it's bigger than 15 (max fakelag amount)
  491.             gHook.FLQueue = 0 // reset queue
  492.         end
  493.     else // if it's not enabled
  494.         gHook.FLQueue = 0 // set the queue to nothing
  495.         if (gHook.SendPacket) then bSendPacket = true end // if we have the bsendpacket module, we could've fakelagged earlier and had bsendpacket set to false so start sending packets
  496.     end
  497. end
  498.  
  499. function gHook.Bhop(cmd)
  500.     if (gHook.Settings.Misc["bBunnyHop"] && eGetMoveType(pLocalPlayer) != MOVETYPE_FLY && eGetMoveType(pLocalPlayer) != MOVETYPE_NOCLIP) then // check if the bhop var is enabled, and make sure we aren't flying or noclipping
  501.         if (eIsOnGround(pLocalPlayer) && cKeyDown(cmd, IN_JUMP)) then // check if we're on the ground and pressing jump
  502.             cSetButtons(cmd, bBor(cGetButtons(cmd), IN_JUMP)) // set jump key
  503.         else
  504.             cRemoveKey(cmd, IN_JUMP) // stop jumping in the air!
  505.  
  506.             if (gHook.Settings.Misc["bAutoStrafe"] && cKeyDown(cmd, IN_JUMP)) then // broken autostrafe
  507.                 if (cGetMouseX(cmd) > 0) then // broken
  508.                     cSetSideMove(cmd, 1000000) // autostrafe
  509.                 else
  510.                     cSetSideMove(cmd, -1000000) // how to
  511.                 end
  512.             end
  513.         end
  514.     end
  515. end
  516.  
  517. function gHook.GetCol(pEnt)
  518.     if (pTeam(pEnt) == pTeam(pLocalPlayer)) then // if it's us
  519.         return Color(15, 255, 23) // then color should be green
  520.     else
  521.         return Color(255, 7, 2) // else it should be red
  522.     end
  523. end
  524.  
  525. function gHook.Visuals()
  526.     if (!gHook.Settings.Visuals["bEnabled"]) then return end // check if visuals are enabled, if not then return nothing and do nothing
  527.  
  528.     for iPlayerIndex,pEnt in next, pGetAll() do // make a loop with all the players
  529.         if (pEnt == pLocalPlayer || !pAlive(pEnt) || 0 >= eHealth(pEnt)) then continue end // if the player == you or the player isn't alive, don't draw and check another player
  530.        
  531.         local iMax = eOBBMaxs(pEnt) // max pos
  532.         local vecTop = vToScreen(eGetPos(pEnt) + Vector(0, 0, iMax.z)) // top pos
  533.         local vecBottom = vToScreen(eGetPos(pEnt)) // bottom pos
  534.         local iMiddle = vecBottom.y - vecTop.y // middle pos
  535.         local iWidth = iMiddle / 4 // width pos
  536.            
  537.         if (gHook.Settings.Visuals["bName"]) then // check if the name esp var is enabled
  538.             dSimpleText(pNick(pEnt), "Trebuchet18", vecTop.x, vecTop.y - 10, color_white, TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER) // draw that text
  539.         end
  540.            
  541.         if (gHook.Settings.Visuals["bBox"]) then // check if the (bounding) box esp var is enabled
  542.             sSetDrawColor((gHook.Settings.Visuals["bTeam"] && tGetColor(pTeam(pEnt))) || gHook.GetCol(pEnt)) // set the draw color
  543.             sDrawOutlinedRect(vecTop.x - iWidth, vecTop.y, iWidth * 2, iMiddle) // draw box
  544.             sSetDrawColor(Color(0, 0, 0)) // set to black draw color
  545.             sDrawOutlinedRect(vecTop.x - iWidth - 1, vecTop.y - 1, iWidth * 2 + 2, iMiddle + 2) // draw outline
  546.             sDrawOutlinedRect(vecTop.x - iWidth + 1, vecTop.y + 1, iWidth * 2 - 2, iMiddle - 2) // draw outline
  547.         end
  548.            
  549.         if (gHook.Settings.Visuals["bHealth"]) then // check if the health esp var is enabled
  550.             dSimpleText(eHealth(pEnt) .. " HP", "Trebuchet18", vecTop.x, vecBottom.y + 10, Color(0, 255, 0), TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER) // draw the player's health
  551.         end
  552.     end
  553.  
  554.     if (gHook.Settings.Visuals["bWatermark"]) then // check if the watermark var is enabled
  555.         dSimpleText("Ground0 Cheats", "Trebuchet18", 50, 12, Color(0, 0, 255), TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER) // draw the watermark
  556.     end
  557. end
  558.  
  559. function gHook.Menu() // not listing for this massive menu codes, 2long
  560.     gHook.MenuOpen = true
  561.  
  562.     local main = vCreate("DFrame")
  563.     main:SetSize(790, 600)
  564.     main:SetTitle("")
  565.     main:Center()
  566.     main:MakePopup()
  567.     main:ShowCloseButton(false)
  568.     main.Paint = function(self)
  569.         draw.RoundedBox(0, 0, 0, self:GetWide(), self:GetTall(), Color(255, 255, 255))
  570.         local colGradient = Color(0, 0, 170)
  571.    
  572.         for i = 0, 40 do
  573.             surface.SetDrawColor(colGradient)
  574.             colGradient.b = colGradient.b - 1
  575.             surface.DrawLine(0, i, 790, i)
  576.         end
  577.        
  578.         surface.SetDrawColor(colGradient)
  579.        
  580.         surface.DrawRect(0, 31, 5, self:GetTall() - 31)
  581.         surface.DrawRect(0, self:GetTall() - 5, self:GetWide(), self:GetTall())
  582.         surface.DrawRect(self:GetWide() - 5, 31, 5, self:GetTall())
  583.        
  584.         draw.SimpleText("Ground0 Cheats", "Trebuchet24", self:GetWide() / 2, 20, Color(255, 255, 255), TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER)
  585.     end
  586.    
  587.     local aimbot = vCreate("DButton", main)
  588.     aimbot:SetSize(196, 40)
  589.     aimbot:SetPos(5, 41)
  590.     aimbot:SetText("")
  591.     aimbot.Paint = function(self)
  592.         draw.RoundedBox(4, 0, 0, self:GetWide(), self:GetTall(), Color(75, 75, 75))
  593.         surface.SetDrawColor(70, 70, 70)
  594.         surface.DrawOutlinedRect(0, 0, self:GetWide(), self:GetTall())
  595.         draw.SimpleText("Aimbot", "Trebuchet18", self:GetWide() / 2 - 22, self:GetTall() / 2 - 7, color_white)
  596.     end
  597.    
  598.     local visuals = vCreate("DButton", main)
  599.     visuals:SetSize(196, 40)
  600.     visuals:SetPos(201, 41)
  601.     visuals:SetText("")
  602.     visuals.Paint = function(self)
  603.         draw.RoundedBox(4, 0, 0, self:GetWide(), self:GetTall(), Color(75, 75, 75))
  604.         surface.SetDrawColor(70, 70, 70)
  605.         surface.DrawOutlinedRect(0, 0, self:GetWide(), self:GetTall())
  606.         draw.SimpleText("Visuals", "Trebuchet18", self:GetWide() / 2 - 22, self:GetTall() / 2 - 7, color_white)
  607.     end
  608.    
  609.     local misc = vCreate("DButton", main)
  610.     misc:SetSize(196, 40)
  611.     misc:SetPos(397, 41)
  612.     misc:SetText("")
  613.     misc.Paint = function(self)
  614.         draw.RoundedBox(4, 0, 0, self:GetWide(), self:GetTall(), Color(75, 75, 75))
  615.         surface.SetDrawColor(70, 70, 70)
  616.         surface.DrawOutlinedRect(0, 0, self:GetWide(), self:GetTall())
  617.         draw.SimpleText("Misc", "Trebuchet18", self:GetWide() / 2 - 9, self:GetTall() / 2 - 7, color_white)
  618.     end
  619.    
  620.     local hvh = vCreate("DButton", main)
  621.     hvh:SetSize(192, 40)
  622.     hvh:SetPos(593, 41)
  623.     hvh:SetText("")
  624.     hvh.Paint = function(self)
  625.         draw.RoundedBox(4, 0, 0, self:GetWide(), self:GetTall(), Color(75, 75, 75))
  626.         surface.SetDrawColor(70, 70, 70)
  627.         surface.DrawOutlinedRect(0, 0, self:GetWide(), self:GetTall())
  628.         draw.SimpleText("HvH", "Trebuchet18", self:GetWide() / 2 - 9, self:GetTall() / 2 - 7, color_white)
  629.     end
  630.    
  631.     local aim_enable = vCreate("DCheckBoxLabel", main)
  632.     aim_enable:SetPos(7, 85)
  633.     aim_enable:SetText("Enabled")
  634.     aim_enable:SetVisible(false)
  635.     aim_enable:SetValue(gHook.Settings.Aimbot["bEnabled"])
  636.     aim_enable:SizeToContents()
  637.     aim_enable.OnChange = function(self)
  638.         gHook.Settings.Aimbot["bEnabled"] = tobool(self:GetChecked())
  639.     end
  640.  
  641.     local aim_aaa = vCreate("DCheckBoxLabel", main)
  642.     aim_aaa:SetPos(7, 105)
  643.     aim_aaa:SetText("Anti Anti-Aim")
  644.     aim_aaa:SetVisible(false)
  645.     aim_aaa:SetValue(gHook.Settings.Aimbot["bAntiAntiAim"])
  646.     aim_aaa:SizeToContents()
  647.     aim_aaa.OnChange = function(self)
  648.         gHook.Settings.Aimbot["bAntiAntiAim"] = tobool(self:GetChecked())
  649.     end
  650.    
  651.     local aim_nospread = vCreate("DCheckBoxLabel", main)
  652.     aim_nospread:SetPos(7, 125)
  653.     aim_nospread:SetText("NoSpread")
  654.     aim_nospread:SetVisible(false)
  655.     aim_nospread:SetValue(gHook.Settings.Aimbot["bNoSpread"])
  656.     aim_nospread:SizeToContents()
  657.     aim_nospread.OnChange = function(self)
  658.         gHook.Settings.Aimbot["bNoSpread"] = tobool(self:GetChecked())
  659.     end
  660.    
  661.     local aim_team = vCreate("DCheckBoxLabel", main)
  662.     aim_team:SetPos(7, 145)
  663.     aim_team:SetText("Ignore Team")
  664.     aim_team:SetVisible(false)
  665.     aim_team:SetValue(gHook.Settings.Aimbot["bTeam"])
  666.     aim_team:SizeToContents()
  667.     aim_team.OnChange = function(self)
  668.         gHook.Settings.Aimbot["bTeam"] = tobool(self:GetChecked())
  669.     end
  670.  
  671.     local aim_friends = vCreate("DCheckBoxLabel", main)
  672.     aim_friends:SetPos(7, 165)
  673.     aim_friends:SetText("Ignore Friends")
  674.     aim_friends:SetVisible(false)
  675.     aim_friends:SetValue(gHook.Settings.Aimbot["bFriends"])
  676.     aim_friends:SizeToContents()
  677.     aim_friends.OnChange = function(self)
  678.         gHook.Settings.Aimbot["bFriends"] = tobool(self:GetChecked())
  679.     end
  680.    
  681.     local aim_silent = vCreate("DCheckBoxLabel", main)
  682.     aim_silent:SetPos(7, 185)
  683.     aim_silent:SetText("Silent Aim")
  684.     aim_silent:SetVisible(false)
  685.     aim_silent:SetValue(gHook.Settings.Aimbot["bSilent"])
  686.     aim_silent:SizeToContents()
  687.     aim_silent.OnChange = function(self)
  688.         gHook.Settings.Aimbot["bSilent"] = tobool(self:GetChecked())
  689.     end
  690.    
  691.     local aim_auto = vCreate("DCheckBoxLabel", main)
  692.     aim_auto:SetPos(7, 205)
  693.     aim_auto:SetText("AutoShoot")
  694.     aim_auto:SetVisible(false)
  695.     aim_auto:SetValue(gHook.Settings.Aimbot["bAutoShoot"])
  696.     aim_auto:SizeToContents()
  697.     aim_auto.OnChange = function(self)
  698.         gHook.Settings.Aimbot["bAutoShoot"] = tobool(self:GetChecked())
  699.     end
  700.  
  701.     local aim_legit = vCreate("DCheckBoxLabel", main)
  702.     aim_legit:SetPos(7, 225)
  703.     aim_legit:SetText("Legit Mode")
  704.     aim_legit:SetVisible(false)
  705.     aim_legit:SetValue(gHook.Settings.Aimbot["bLegit"])
  706.     aim_legit:SizeToContents()
  707.     aim_legit.OnChange = function(self)
  708.         gHook.Settings.Aimbot["bLegit"] = tobool(self:GetChecked())
  709.     end
  710.    
  711.     local vis_enabled = vCreate("DCheckBoxLabel", main)
  712.     vis_enabled:SetPos(7, 85)
  713.     vis_enabled:SetText("Enabled")
  714.     vis_enabled:SetVisible(false)
  715.     vis_enabled:SetValue(gHook.Settings.Visuals["bEnabled"])
  716.     vis_enabled:SizeToContents()
  717.     vis_enabled.OnChange = function(self)
  718.         gHook.Settings.Visuals["bEnabled"] = tobool(self:GetChecked())
  719.     end
  720.    
  721.     local vis_name = vCreate("DCheckBoxLabel", main)
  722.     vis_name:SetPos(7, 105)
  723.     vis_name:SetText("Name ESP")
  724.     vis_name:SetVisible(false)
  725.     vis_name:SetValue(gHook.Settings.Visuals["bName"])
  726.     vis_name:SizeToContents()
  727.     vis_name.OnChange = function(self)
  728.         gHook.Settings.Visuals["bName"] = tobool(self:GetChecked())
  729.     end
  730.    
  731.     local vis_box = vCreate("DCheckBoxLabel", main)
  732.     vis_box:SetPos(7, 125)
  733.     vis_box:SetText("2D Box ESP")
  734.     vis_box:SetVisible(false)
  735.     vis_box:SetValue(gHook.Settings.Visuals["bBox"])
  736.     vis_box:SizeToContents()
  737.     vis_box.OnChange = function(self)
  738.         gHook.Settings.Visuals["bBox"] = tobool(self:GetChecked())
  739.     end
  740.    
  741.     local vis_health = vCreate("DCheckBoxLabel", main)
  742.     vis_health:SetPos(7, 145)
  743.     vis_health:SetText("Health ESP")
  744.     vis_health:SetVisible(false)
  745.     vis_health:SetValue(gHook.Settings.Visuals["bHealth"])
  746.     vis_health:SizeToContents()
  747.     vis_health.OnChange = function(self)
  748.         gHook.Settings.Visuals["bHealth"] = tobool(self:GetChecked())
  749.     end
  750.  
  751.     local vis_team = vCreate("DCheckBoxLabel", main)
  752.     vis_team:SetPos(7, 165)
  753.     vis_team:SetText("Team Color ESP")
  754.     vis_team:SetVisible(false)
  755.     vis_team:SetValue(gHook.Settings.Visuals["bTeam"])
  756.     vis_team:SizeToContents()
  757.     vis_team.OnChange = function(self)
  758.         gHook.Settings.Visuals["bTeam"] = tobool(self:GetChecked())
  759.     end
  760.  
  761.     local vis_watermark = vCreate("DCheckBoxLabel", main)
  762.     vis_watermark:SetPos(7, 185)
  763.     vis_watermark:SetText("Watermark")
  764.     vis_watermark:SetVisible(false)
  765.     vis_watermark:SetValue(gHook.Settings.Visuals["bWatermark"])
  766.     vis_watermark:SizeToContents()
  767.     vis_watermark.OnChange = function(self)
  768.         gHook.Settings.Visuals["bWatermark"] = tobool(self:GetChecked())
  769.     end
  770.    
  771.     local misc_bhop = vCreate("DCheckBoxLabel", main)
  772.     misc_bhop:SetPos(7, 85)
  773.     misc_bhop:SetText("Bunny Hop")
  774.     misc_bhop:SetVisible(false)
  775.     misc_bhop:SetValue(gHook.Settings.Misc["bBunnyHop"])
  776.     misc_bhop:SizeToContents()
  777.     misc_bhop.OnChange = function(self)
  778.         gHook.Settings.Misc["bBunnyHop"] = tobool(self:GetChecked())
  779.     end
  780.  
  781.     local misc_thirdperson = vCreate("DCheckBoxLabel", main)
  782.     misc_thirdperson:SetPos(7, 105)
  783.     misc_thirdperson:SetText("ThirdPerson")
  784.     misc_thirdperson:SetVisible(false)
  785.     misc_thirdperson:SetValue(gHook.Settings.Misc["bThirdperson"])
  786.     misc_thirdperson:SizeToContents()
  787.     misc_thirdperson.OnChange = function(self)
  788.         gHook.Settings.Misc["bThirdperson"] = tobool(self:GetChecked())
  789.     end
  790.  
  791.     local hvh_antiaim = vCreate("DCheckBoxLabel", main)
  792.     hvh_antiaim:SetPos(7, 85)
  793.     hvh_antiaim:SetText("Anti-Aim")
  794.     hvh_antiaim:SetVisible(false)
  795.     hvh_antiaim:SetValue(gHook.Settings.HvH["bAntiAim"])
  796.     hvh_antiaim:SizeToContents()
  797.     hvh_antiaim.OnChange = function(self)
  798.         gHook.Settings.HvH["bAntiAim"] = tobool(self:GetChecked())
  799.     end
  800.    
  801.     local hvh_jitter = vCreate("DCheckBoxLabel", main)
  802.     hvh_jitter:SetPos(7, 105)
  803.     hvh_jitter:SetText("Jitter Anti-Aim")
  804.     hvh_jitter:SetVisible(false)
  805.     hvh_jitter:SetValue(gHook.Settings.HvH["bJitter"])
  806.     hvh_jitter:SizeToContents()
  807.     hvh_jitter.OnChange = function(self)
  808.         gHook.Settings.HvH["bJitter"] = tobool(self:GetChecked())
  809.     end
  810.  
  811.     local hvh_fakelag = vCreate("DCheckBoxLabel", main)
  812.     hvh_fakelag:SetPos(7, 125)
  813.     hvh_fakelag:SetText("FakeLag")
  814.     hvh_fakelag:SetVisible(false)
  815.     hvh_fakelag:SetValue(gHook.Settings.HvH["bFakeLag"])
  816.     hvh_fakelag:SizeToContents()
  817.     hvh_fakelag.OnChange = function(self)
  818.         gHook.Settings.HvH["bFakeLag"] = tobool(self:GetChecked())
  819.     end
  820.  
  821.     local function SetVis(strGroup, bVis)
  822.         if (strGroup == "aimbot") then
  823.             aim_enable:SetVisible(bVis)
  824.             aim_aaa:SetVisible(bVis)
  825.             aim_nospread:SetVisible(bVis)
  826.             aim_team:SetVisible(bVis)
  827.             aim_friends:SetVisible(bVis)
  828.             aim_silent:SetVisible(bVis)
  829.             aim_auto:SetVisible(bVis)
  830.             aim_legit:SetVisible(bVis)
  831.         elseif (strGroup == "visuals") then
  832.             vis_enabled:SetVisible(bVis)
  833.             vis_name:SetVisible(bVis)
  834.             vis_box:SetVisible(bVis)
  835.             vis_health:SetVisible(bVis)
  836.             vis_team:SetVisible(bVis)
  837.             vis_watermark:SetVisible(bVis)
  838.         elseif (strGroup == "misc") then
  839.             misc_bhop:SetVisible(bVis)
  840.             misc_thirdperson:SetVisible(bVis)
  841.         elseif (strGroup == "hvh") then
  842.             hvh_antiaim:SetVisible(bVis)
  843.             hvh_jitter:SetVisible(bVis)
  844.             hvh_fakelag:SetVisible(bVis)
  845.         end
  846.     end
  847.    
  848.     aimbot.DoClick = function()
  849.         SetVis("aimbot", true)
  850.         SetVis("visuals", false)
  851.         SetVis("misc", false)
  852.         SetVis("hvh", false)
  853.     end
  854.    
  855.     visuals.DoClick = function()
  856.         SetVis("aimbot", false)
  857.         SetVis("visuals", true)
  858.         SetVis("misc", false)
  859.         SetVis("hvh", false)
  860.     end
  861.    
  862.     misc.DoClick = function()
  863.         SetVis("aimbot", false)
  864.         SetVis("visuals", false)
  865.         SetVis("misc", true)
  866.         SetVis("hvh", false)
  867.     end
  868.    
  869.     hvh.DoClick = function()
  870.         SetVis("aimbot", false)
  871.         SetVis("visuals", false)
  872.         SetVis("misc", false)
  873.         SetVis("hvh", true)
  874.     end
  875.    
  876.     main.Think = function()
  877.         if (input.IsKeyDown(KEY_DELETE) && !gHook.Insert2) then
  878.             main:Remove()
  879.             gHook.MenuOpen = false
  880.         end
  881.     end
  882. end
  883.  
  884. function gHook.CreateMove(cmd)
  885.     gHook.Silent(cmd) // call silent aimbot code
  886.     gHook.Aimbot(cmd) // call aimbot
  887.     gHook.NoSpread(cmd) // call nospread
  888.     gHook.AntiAim(cmd) // call antiaim
  889.     gHook.FakeLag(cmd) // call fakelag
  890.     gHook.Bhop(cmd) // call bhop
  891. end
  892.  
  893. function gHook.DrawOverlay()
  894.     gHook.Visuals() // do the visuals (ESP and stuff)
  895. end
  896.  
  897. function gHook.Think()
  898.     gHook.FindTarget() // find aimbot targets
  899.     gHook.OpenMenu() // check if the menu can be opened
  900. end
  901.  
  902. function gHook.CalcView(ply, pos, angle, fov, nearZ, farZ)
  903.     local view = {} // make a new viewtable
  904.    
  905.     view.angles = gHook.FakeAngle // set the fake angle so we don't look like we're jittering clientside with silent aim and anti aim
  906.     view.origin = gHook.Settings.Misc["bThirdperson"] && pos - gHook.FakeAngle:Forward() * 100 || pos // set the origin
  907.  
  908.     return view // return it
  909. end
  910.  
  911. function gHook.Move()
  912.     if (IsFirstTimePredicted()) then // if it's the first time being predicted
  913.         gHook.CurTime = CurTime() + eTickInterval() // set the proper curtime to regular curtime + the tick interval
  914.     end
  915. end
  916.  
  917. function gHook.AddHook(strHookType, funcHook)
  918.     gHook.Notify("Hooking " .. strHookType) // notify that this is being hooked
  919.  
  920.     if (GAMEMODE[strHookType] && __gbackup[strHookType]) then // check if it's a valid hook
  921.         GAMEMODE[strHookType] = function(self, ...) // detour it
  922.             __gbackup[strHookType](self, ...) // call the gamemode function
  923.             local retable = {funcHook(...)} // thank you
  924.             if (retable) then return unpack(retable) end // razor
  925.         end
  926.     end
  927. end
  928.  
  929. function GetConVarString(cvar)
  930.     if (cvar == "sv_allowcslua" or cvar == "sv_cheats") then // YOU
  931.         return "0" // SIMPLY
  932.     end
  933.  
  934.     if (cvar == "host_timescale") then // CANNOT
  935.         return "1.0" // TOUCH
  936.     end
  937.  
  938.     if (cvar == "host_framerate") then // THIS
  939.         return "0" // AMAZING
  940.     end
  941.  
  942.     return __gcopy["GetConVarString"](cvar) // CHEAT
  943. end
  944.  
  945. function GetConVarNumber(cvar)
  946.     if (cvar == "sv_allowcslua" or cvar == "sv_cheats") then // check if it's one of these
  947.         return 0 // nope
  948.     end
  949.  
  950.     if (cvar == "host_timescale") then // host_timescale?
  951.         return 1.0 // NOPE
  952.     end
  953.  
  954.     if (cvar == "host_framerate") then // HOST_FRAMERATE?!?!?!?
  955.         return 0 // and i'm like "can't touch this"
  956.     end
  957.  
  958.     return __gcopy["GetConVarNumber"](cvar) // return regular
  959. end
  960.  
  961. function GetConVar(cvar)
  962.     if (cvar == "sv_allowcslua" or cvar == "sv_cheats" or cvar == "host_framerate") then // check if its one of these
  963.         return __gcopy["GetConVar"]("cl_voicedistance") // crossing my fingers, it should be set to 0
  964.     end
  965.  
  966.     if (cvar == "host_timescale") then // check if it's host_timescale
  967.         return __gcopy["GetConVar"]("r_drawothermodels") // return r_drawothermodels, it should always be set to 1
  968.     end
  969.  
  970.     return __gcopy["GetConVar"](cvar) // return regular
  971. end
  972.  
  973. function file.Open(name, mode, path)
  974.     if (sFind(name, "g0.lua") or sFind(name, "gHook.lua") or sFind(name, "dickwrap")) then // is it one of the cheat's files?
  975.         return nil // can't touch this
  976.     end
  977.  
  978.     return __gcopy["file"].Open(name, mode, path) // return regular, not one of our names
  979. end
  980.  
  981. function file.Exists(name, path)
  982.     if (sFind(name, "g0.lua") or sFind(name, "gHook.lua") or sFind(name, "dickwrap")) then // it better not be our cheat names!
  983.         return false // if it is, return false, we don't want them to know we exist
  984.     end
  985.  
  986.     return __gcopy["file"].Exists(name, path) // return regular, not one of our names
  987. end
  988.  
  989. function debug.getinfo(func, fields) // detour debug.getinfo
  990.     if func == GetConVarString or func == GetConVarNumber or func == GetConVar or func == file.Open or func == file.Exists or func == debug.getinfo then // check if it's a function we've detoured
  991.         local tbl = __gcopy["debug.getinfo"](__gcopy["debug.getinfo"], fields) // get the dgi table
  992.         tbl.func = func // bypass some more (rare) checks
  993.         return tbl // return it
  994.     end
  995.  
  996.     return __gcopy["debug"].getinfo(func, fields) // not a detoured func, return regular
  997. end
  998.  
  999. GAMEMODE["ShouldDrawLocalPlayer"] = function(...)
  1000.     return gHook.Settings.Misc["bThirdperson"] // if thirdperson is enabled, show us
  1001. end
  1002.  
  1003. gHook.AddHook("CreateMove", gHook.CreateMove) // hook createmove
  1004. gHook.AddHook("DrawOverlay", gHook.DrawOverlay) // hook drawoverlay
  1005. gHook.AddHook("Think", gHook.Think) // hook think
  1006. gHook.AddHook("CalcView", gHook.CalcView) // hook calcview
  1007. gHook.AddHook("Move", gHook.Move) // hook move
  1008. gHook.Notify("Loaded!") // loaded message
Advertisement
Add Comment
Please, Sign In to add comment