Advertisement
Guest User

Ground0 Cheats leak, get owned cdriza

a guest
Sep 8th, 2015
866
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 11.87 KB | None | 0 0
  1. /*
  2. Ground0 Cheats
  3.  
  4. Coded by cdriza and Q2F2/Cave
  5.  
  6. Credits:
  7. cdriza - Almost all of the code
  8. Q2F2/Cave - Localization + other small snippets
  9. Im Friendly - Movement fix + some of the esp code
  10.  
  11. Update log:
  12. v1 - gHook
  13. v1.1 - add silent aim + move-fix
  14. v1.2 - fix move-fix
  15. v1.3 - add menu + anti-anti-aim
  16. v1.4 - add anti-aim
  17. v1.5 - random changes
  18. v1.6 - autostrafe + bhop fixes
  19. v1.7 - added comments
  20. v1.8 - added permanent nospread
  21. v1.9 - added experimental fakelag
  22. v2.0 - fixed fakelag, improved aimbot speeds, anti-anti-aim rewrite
  23. v2.1 - SPECIAL MPGH EDITION LOLOLOLO
  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 pGetActiveWeapon = _R.Player.GetActiveWeapon
  39. local pNick = _R.Player.Nick
  40. local pEyePos = _R.Player.EyePos
  41. local pTeam = _R.Player.Team
  42. local pInVehicle = _R.Player.InVehicle
  43. local pIsBot = _R.Player.IsBot
  44. local pAlive = _R.Player.Alive
  45.  
  46. local eIsOnGround = _R.Entity.IsOnGround
  47. local eHealth = _R.Entity.Health
  48. local eIsPlayer = _R.Entity.IsPlayer
  49. local eLocalToWorld = _R.Entity.LocalToWorld
  50. local eGetPos = _R.Entity.GetPos
  51. local eOnGround = _R.Entity.OnGround
  52. local eOBBCenter = _R.Entity.OBBCenter
  53. local eDrawModel = _R.Entity.DrawModel
  54. local eWaterLevel = _R.Entity.WaterLevel
  55. local eGetMoveType = _R.Entity.GetMoveType
  56. local eGetClass = _R.Entity.GetClass
  57. local eLookupBone = _R.Entity.LookupBone
  58. local eGetVelocity = _R.Entity.GetVelocity
  59. local eHealth = _R.Entity.Health
  60. local eGetMaxHealth = _R.Entity.GetMaxHealth
  61. local eSetPoseParameter = _R.Entity.SetPoseParameter
  62. local eEyeAngles = _R.Entity.EyeAngles
  63. local eGetAttachment = _R.Entity.GetAttachment
  64. local eLookupAttachment = _R.Entity.LookupAttachment
  65. local eOBBMaxs = _R.Entity.OBBMaxs
  66.  
  67. local wClip1 = _R.Weapon.Clip1
  68. local wGetNextPrimaryFire = _R.Weapon.GetNextPrimaryFire
  69.  
  70. local cGetForwardMove = _R.CUserCmd.GetForwardMove
  71. local cGetSideMove = _R.CUserCmd.GetSideMove
  72. local cGetViewAngles = _R.CUserCmd.GetViewAngles
  73. local cSetViewAngles = _R.CUserCmd.SetViewAngles
  74. local cSetForwardMove = _R.CUserCmd.SetForwardMove
  75. local cSetSideMove = _R.CUserCmd.SetSideMove
  76. local cGetMouseX = _R.CUserCmd.GetMouseX
  77. local cGetMouseY = _R.CUserCmd.GetMouseY
  78. local cGetButtons = _R.CUserCmd.GetButtons
  79. local cSetButtons = _R.CUserCmd.SetButtons
  80. local cRemoveKey = _R.CUserCmd.RemoveKey
  81. local cKeyDown = _R.CUserCmd.KeyDown
  82. local cCommandNumber = _R.CUserCmd.CommandNumber
  83.  
  84. local cvGetBool = _R.ConVar.GetBool
  85.  
  86. local iIsMouseDown = input.IsMouseDown
  87. local iIsKeyDown = input.IsKeyDown
  88. local fExists = file.Exists
  89. local uJSONToTable = util.JSONToTable
  90. local uCRC = util.CRC
  91. local uTraceLine = util.TraceLine
  92. local eTickInterval = engine.TickInterval
  93. local mRandom = math.random
  94. local mAbs = math.abs
  95. local mAngleDifference = math.AngleDifference
  96. local mClamp = math.Clamp
  97. local mNormalizeAngle = math.NormalizeAngle
  98. local dSimpleText = draw.SimpleText
  99. local sSetDrawColor = surface.SetDrawColor
  100. local sDrawOutlinedRect = surface.DrawOutlinedRect
  101. local tGetColor = team.GetColor
  102. local hAdd = hook.Add
  103. local pGetAll = player.GetAll
  104. local bBor = bit.bor
  105. local tCopy = table.Copy
  106. local vCreate = vgui.Create
  107. local tRandom = table.Random
  108. local sFind = string.find
  109.  
  110. local tostring = tostring
  111. local next = next
  112. local Vector = Vector
  113. local IsEntity = IsEntity
  114. local IsValid = IsValid
  115. local Color = Color
  116. local MsgC = MsgC
  117. local Lerp = Lerp
  118. local pcall = pcall
  119. local CurTime = CurTime
  120. local IsFirstTimePredicted = IsFirstTimePredicted
  121.  
  122. local pLocalPlayer = LocalPlayer() // localize us!
  123.  
  124. __gcopy = __gcopy || tCopy(_G) // get the existing _G copy, or make a new one!
  125. __rcopy = __rcopy || tCopy(_R) // get the existing registry copy, or make a new one!
  126. __gbackup = __gbackup || tCopy(GAMEMODE) // get the existing GAMEMODE copy, or make a new one!
  127.  
  128. local gHook = {} // make our table!
  129. gHook.AASwitch = false // setup switch
  130. gHook.CurTime = 0 // set proper curtime var
  131. gHook.FLQueue = 0 // setup fakelag queue
  132. gHook.SendPacket = false // set can we fakelag var
  133. gHook.Dickwrap = nil // no copied dickwrap table right now
  134. gHook.Aimbotting = false // set are we aimbotting var
  135. gHook.NoSpread = false // set can we nospread var
  136. gHook.MenuOpen = false // set menuopen var
  137. gHook.Insert = false // set delete var
  138. gHook.Insert2 = false // set delete2 var
  139. gHook.FakeAngle = Angle() // make the fake angle
  140. gHook.Attacking = false // we aren't attacking
  141. gHook.Target = nil // add a nil target
  142.  
  143. gHook.Settings = { // table for storing our settings
  144. Aimbot = {
  145. bEnabled = false, // aimbot enabled var
  146. bAntiAntiAim = true, // anti-anti-aim var
  147. bNoSpread = true, // aimbot nospread var
  148. bTeam = false, // ignore team var
  149. bSilent = false, // silent aimbot var
  150. bAutoShoot = false, // autoshoot var
  151. bLegit = false, // legit aimbot var
  152. },
  153.  
  154. Visuals = {
  155. bEnabled = false, // visuals enabled var
  156. bName = false, // name esp var
  157. bBox = false, // box esp var
  158. bHealth = false, // health esp var
  159. bTeam = false, // team color esp var
  160. bWatermark = false, // watermark var
  161. },
  162.  
  163. Misc = {
  164. bBunnyHop = false, // bhop var
  165. bAutoStrafe = false, // broken autostrafe var
  166. },
  167.  
  168. HvH = {
  169. bAntiAim = false, // aa var
  170. bJitter = false, // jitter aa var
  171. bFakeLag = false, // fakelag var
  172. },
  173. }
  174.  
  175. gHook.Cones = {} // weapon cone storage table
  176.  
  177. _R.Entity.FireBullets = function(pEnt, bul)
  178. local pWep = pGetActiveWeapon(pLocalPlayer) || NULL // get our active weapon
  179.  
  180. 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
  181.  
  182. 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
  183. gHook.Cones[eGetClass(pWep)] = bul.Spread * -1 // set the weapon cone for this weapon!
  184. end
  185.  
  186. return __rcopy.Entity.FireBullets(pEnt, bul) // return the copy
  187. end
  188.  
  189. function gHook.Notify(strMsg)
  190.  
  191. end
  192.  
  193. gHook.Notify("Loading!") // we are loading!
  194.  
  195. local suc, err = pcall(require, "dickwrap") // pcall it
  196.  
  197. if suc and !err then
  198. gHook.Notify("Found dickwrap module, NoSpread is now enabled.") // notification
  199. gHook.NoSpread = true // we can nospread!
  200. require("dickwrap") // require it
  201. gHook.Dickwrap = tCopy(dickwrap) // copy the table
  202. _G["dickwrap"] = nil // set it to nil, anti-cheat proofing!
  203. else
  204. gHook.Notify("The dickwrap module wasn't installed correctly, NoSpread is now disabled.") // notification
  205. end
  206.  
  207. err = nil // set it to nil, incase you didn't have dickwrap installed and it was something, it would break this check
  208.  
  209. local suc, err = pcall(require, "bsendpacket") // pcall it
  210.  
  211. if suc and !err then
  212. gHook.Notify("Found dickwrap module, NoSpread is now enabled.") // notification
  213. gHook.SendPacket = true // we can fakelag!
  214. require("bsendpacket") // require it
  215. bSendPacket = true // initial true statement
  216. else
  217. gHook.Notify("The dickwrap module wasn't installed correctly, NoSpread is now disabled.") // notification
  218. end
  219.  
  220. function gHook.AntiAntiAim(pEnt)
  221.  
  222. end
  223.  
  224. function gHook.CheckVis(vecPos, pEnt)
  225.  
  226. end
  227.  
  228. function gHook.GetPos(pEnt)
  229.  
  230. end
  231.  
  232. function gHook.CheckValid(pEnt)
  233.  
  234. end
  235.  
  236. function gHook.OpenMenu()
  237.  
  238. end
  239.  
  240. function gHook.FindTarget()
  241.  
  242. end
  243.  
  244. function gHook.Attack(cmd)
  245.  
  246. end
  247.  
  248. function gHook.Silent(cmd)
  249.  
  250. end
  251.  
  252. function gHook.FixMove(cmd, bAntiAim)
  253.  
  254. end
  255.  
  256. function gHook.GetSpread(cmd, angPos)
  257.  
  258. end
  259.  
  260. function gHook.Aimbot(cmd)
  261.  
  262. end
  263.  
  264. function gHook.NoSpread(cmd) // ok not removing
  265. 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
  266. local angSpread = gHook.GetSpread(cmd, cGetViewAngles(cmd)) // if so compensate the spread for our current view angles
  267. angSpread.x, angSpread.y = mNormalizeAngle(angSpread.x), mNormalizeAngle(angSpread.y) // normalize spread angles
  268. cSetViewAngles(cmd, angSpread) // then set our view angles!
  269. end
  270. end
  271.  
  272. function gHook.HvH(cmd) // HUGE AA, NOT REMOVING IT'S TOO P
  273.  
  274. local angAAP = gHook.Settings.HvH["bJitter"] && mRandom(-180, 180) // random angles
  275. local angAAY = gHook.Settings.HvH["bJitter"] && mRandom(-360, 360) // random angles
  276. cSetViewAngles(cmd, Angle(angAAP, angAAY, 0)) // set the angles
  277.  
  278. if (angAAP > 89 || angAAP < -89) then // check if we need to do a different movement fix
  279. gHook.FixMove(cmd, true) // do antiaim movement fix
  280. else
  281. gHook.FixMove(cmd) // regular movement fix
  282. end
  283.  
  284. end
  285.  
  286. function gHook.Bhop(cmd)
  287.  
  288.  
  289. if (gHook.Settings.Misc["bAutoStrafe"] && cKeyDown(cmd, IN_JUMP)) then // broken autostrafe
  290. if (cGetMouseX(cmd) > 0) then // broken
  291. cSetSideMove(cmd, 1000000) // autostrafe
  292. else
  293. cSetSideMove(cmd, -1000000) // how to
  294. end
  295. end
  296.  
  297. end
  298.  
  299. function gHook.GetCol(pEnt)
  300.  
  301. end
  302.  
  303. function gHook.Visuals() // hah get owned
  304. if (!gHook.Settings.Visuals["bEnabled"]) then return end // check if visuals are enabled, if not then return nothing and do nothing
  305.  
  306. for iPlayerIndex,pEnt in next, pGetAll() do // make a loop with all the players
  307. 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
  308.  
  309. end
  310.  
  311. if (gHook.Settings.Visuals["bWatermark"]) then // check if the watermark var is enabled
  312. dSimpleText("Ground0 Cheats", "Trebuchet18", 50, 12, Color(0, 0, 255), TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER) // draw the watermark
  313. end
  314. end
  315.  
  316. function gHook.Menu() // SECRET ZEDHACK MENU CODES HERE
  317.  
  318. end
  319.  
  320. function gHook.CreateMove(cmd)
  321. gHook.Silent(cmd) // call silent aimbot code
  322. gHook.Aimbot(cmd) // call aimbot
  323. gHook.NoSpread(cmd) // call nospread
  324. gHook.HvH(cmd) // call hvh features (anti-aim, jitter aa)
  325. gHook.Bhop(cmd) // call bhop
  326. end
  327.  
  328. function gHook.DrawOverlay()
  329. gHook.Visuals() // do the visuals (ESP and stuff)
  330. end
  331.  
  332. function gHook.Think()
  333. gHook.FindTarget() // find aimbot targets
  334. gHook.OpenMenu() // check if the menu can be opened
  335. end
  336.  
  337. function gHook.CalcView(p, origin, a, fov)
  338. local view = {} // make a new viewtable
  339.  
  340. view.angles = gHook.FakeAngle // set the fake angle so we don't look like we're jittering with silent aim and anti aim
  341. view.origin = origin // set the origin
  342. view.fov = fov // set the fov
  343.  
  344. return view // return it
  345. end
  346.  
  347. function gHook.Move()
  348. if (IsFirstTimePredicted()) then // if it's the first time being predicted
  349. gHook.CurTime = CurTime() + eTickInterval() // set the proper curtime to regular curtime + the tick interval
  350. end
  351. end
  352.  
  353. function gHook.AddHook(strHookType, funcHook) // don't steal my fuckin sick gamemode hooks dude
  354. gHook.Notify("Hooking " .. strHookType) // notify that this is being hooked
  355.  
  356. if (GAMEMODE[strHookType] && __gbackup[strHookType]) then // check if it's a valid hook
  357. GAMEMODE[strHookType] = function(self, ...) // detour it
  358. funcHook(...) // call our function
  359. __gbackup[strHookType](self, ...) // call the gamemode function
  360. end
  361. end
  362. end
  363.  
  364. // insert detouren here
  365.  
  366. gHook.AddHook("CreateMove", gHook.CreateMove) // hook createmove
  367. gHook.AddHook("DrawOverlay", gHook.DrawOverlay) // hook drawoverlay
  368. gHook.AddHook("Think", gHook.Think) // hook think
  369. gHook.AddHook("CalcView", gHook.CalcView) // hook calcview
  370. gHook.AddHook("Move", gHook.Move) // hook move
  371. gHook.Notify("Loaded!") // loaded message
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement