Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- Ground0 Cheats
- Coded by cdriza and Q2F2/Cave
- Credits:
- cdriza - Almost all of the code
- Q2F2/Cave - Localization + other small snippets
- Im Friendly - Movement fix + some of the esp code
- Update log:
- v1 - gHook
- v1.1 - add silent aim + move-fix
- v1.2 - fix move-fix
- v1.3 - add menu + anti-anti-aim
- v1.4 - add anti-aim
- v1.5 - random changes
- v1.6 - autostrafe + bhop fixes
- v1.7 - added comments
- v1.8 - added permanent nospread
- v1.9 - added experimental fakelag
- v2.0 - fixed fakelag, improved aimbot speeds, anti-anti-aim rewrite
- v2.1 - SPECIAL MPGH EDITION LOLOLOLO
- */
- local _R = debug.getregistry() // get the registry
- // nice localization cdriza
- // why thank you
- local vAngle = _R.Vector.Angle
- local vLength = _R.Vector.Length
- local vDistance = _R.Vector.Distance
- local vToScreen = _R.Vector.ToScreen
- local aForward = _R.Angle.Forward
- local pGetShootPos = _R.Player.GetShootPos
- local pGetActiveWeapon = _R.Player.GetActiveWeapon
- local pNick = _R.Player.Nick
- local pEyePos = _R.Player.EyePos
- local pTeam = _R.Player.Team
- local pInVehicle = _R.Player.InVehicle
- local pIsBot = _R.Player.IsBot
- local pAlive = _R.Player.Alive
- local eIsOnGround = _R.Entity.IsOnGround
- local eHealth = _R.Entity.Health
- local eIsPlayer = _R.Entity.IsPlayer
- local eLocalToWorld = _R.Entity.LocalToWorld
- local eGetPos = _R.Entity.GetPos
- local eOnGround = _R.Entity.OnGround
- local eOBBCenter = _R.Entity.OBBCenter
- local eDrawModel = _R.Entity.DrawModel
- local eWaterLevel = _R.Entity.WaterLevel
- local eGetMoveType = _R.Entity.GetMoveType
- local eGetClass = _R.Entity.GetClass
- local eLookupBone = _R.Entity.LookupBone
- local eGetVelocity = _R.Entity.GetVelocity
- local eHealth = _R.Entity.Health
- local eGetMaxHealth = _R.Entity.GetMaxHealth
- local eSetPoseParameter = _R.Entity.SetPoseParameter
- local eEyeAngles = _R.Entity.EyeAngles
- local eGetAttachment = _R.Entity.GetAttachment
- local eLookupAttachment = _R.Entity.LookupAttachment
- local eOBBMaxs = _R.Entity.OBBMaxs
- local wClip1 = _R.Weapon.Clip1
- local wGetNextPrimaryFire = _R.Weapon.GetNextPrimaryFire
- local cGetForwardMove = _R.CUserCmd.GetForwardMove
- local cGetSideMove = _R.CUserCmd.GetSideMove
- local cGetViewAngles = _R.CUserCmd.GetViewAngles
- local cSetViewAngles = _R.CUserCmd.SetViewAngles
- local cSetForwardMove = _R.CUserCmd.SetForwardMove
- local cSetSideMove = _R.CUserCmd.SetSideMove
- local cGetMouseX = _R.CUserCmd.GetMouseX
- local cGetMouseY = _R.CUserCmd.GetMouseY
- local cGetButtons = _R.CUserCmd.GetButtons
- local cSetButtons = _R.CUserCmd.SetButtons
- local cRemoveKey = _R.CUserCmd.RemoveKey
- local cKeyDown = _R.CUserCmd.KeyDown
- local cCommandNumber = _R.CUserCmd.CommandNumber
- local cvGetBool = _R.ConVar.GetBool
- local iIsMouseDown = input.IsMouseDown
- local iIsKeyDown = input.IsKeyDown
- local fExists = file.Exists
- local uJSONToTable = util.JSONToTable
- local uCRC = util.CRC
- local uTraceLine = util.TraceLine
- local eTickInterval = engine.TickInterval
- local mRandom = math.random
- local mAbs = math.abs
- local mAngleDifference = math.AngleDifference
- local mClamp = math.Clamp
- local mNormalizeAngle = math.NormalizeAngle
- local dSimpleText = draw.SimpleText
- local sSetDrawColor = surface.SetDrawColor
- local sDrawOutlinedRect = surface.DrawOutlinedRect
- local tGetColor = team.GetColor
- local hAdd = hook.Add
- local pGetAll = player.GetAll
- local bBor = bit.bor
- local tCopy = table.Copy
- local vCreate = vgui.Create
- local tRandom = table.Random
- local sFind = string.find
- local tostring = tostring
- local next = next
- local Vector = Vector
- local IsEntity = IsEntity
- local IsValid = IsValid
- local Color = Color
- local MsgC = MsgC
- local Lerp = Lerp
- local pcall = pcall
- local CurTime = CurTime
- local IsFirstTimePredicted = IsFirstTimePredicted
- local pLocalPlayer = LocalPlayer() // localize us!
- __gcopy = __gcopy || tCopy(_G) // get the existing _G copy, or make a new one!
- __rcopy = __rcopy || tCopy(_R) // get the existing registry copy, or make a new one!
- __gbackup = __gbackup || tCopy(GAMEMODE) // get the existing GAMEMODE copy, or make a new one!
- local gHook = {} // make our table!
- gHook.AASwitch = false // setup switch
- gHook.CurTime = 0 // set proper curtime var
- gHook.FLQueue = 0 // setup fakelag queue
- gHook.SendPacket = false // set can we fakelag var
- gHook.Dickwrap = nil // no copied dickwrap table right now
- gHook.Aimbotting = false // set are we aimbotting var
- gHook.NoSpread = false // set can we nospread var
- gHook.MenuOpen = false // set menuopen var
- gHook.Insert = false // set delete var
- gHook.Insert2 = false // set delete2 var
- gHook.FakeAngle = Angle() // make the fake angle
- gHook.Attacking = false // we aren't attacking
- gHook.Target = nil // add a nil target
- gHook.Settings = { // table for storing our settings
- Aimbot = {
- bEnabled = false, // aimbot enabled var
- bAntiAntiAim = true, // anti-anti-aim var
- bNoSpread = true, // aimbot nospread var
- bTeam = false, // ignore team var
- bSilent = false, // silent aimbot var
- bAutoShoot = false, // autoshoot var
- bLegit = false, // legit aimbot var
- },
- Visuals = {
- bEnabled = false, // visuals enabled var
- bName = false, // name esp var
- bBox = false, // box esp var
- bHealth = false, // health esp var
- bTeam = false, // team color esp var
- bWatermark = false, // watermark var
- },
- Misc = {
- bBunnyHop = false, // bhop var
- bAutoStrafe = false, // broken autostrafe var
- },
- HvH = {
- bAntiAim = false, // aa var
- bJitter = false, // jitter aa var
- bFakeLag = false, // fakelag var
- },
- }
- gHook.Cones = {} // weapon cone storage table
- _R.Entity.FireBullets = function(pEnt, bul)
- local pWep = pGetActiveWeapon(pLocalPlayer) || NULL // get our active weapon
- 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
- 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
- gHook.Cones[eGetClass(pWep)] = bul.Spread * -1 // set the weapon cone for this weapon!
- end
- return __rcopy.Entity.FireBullets(pEnt, bul) // return the copy
- end
- function gHook.Notify(strMsg)
- end
- gHook.Notify("Loading!") // we are loading!
- local suc, err = pcall(require, "dickwrap") // pcall it
- if suc and !err then
- gHook.Notify("Found dickwrap module, NoSpread is now enabled.") // notification
- gHook.NoSpread = true // we can nospread!
- require("dickwrap") // require it
- gHook.Dickwrap = tCopy(dickwrap) // copy the table
- _G["dickwrap"] = nil // set it to nil, anti-cheat proofing!
- else
- gHook.Notify("The dickwrap module wasn't installed correctly, NoSpread is now disabled.") // notification
- end
- err = nil // set it to nil, incase you didn't have dickwrap installed and it was something, it would break this check
- local suc, err = pcall(require, "bsendpacket") // pcall it
- if suc and !err then
- gHook.Notify("Found dickwrap module, NoSpread is now enabled.") // notification
- gHook.SendPacket = true // we can fakelag!
- require("bsendpacket") // require it
- bSendPacket = true // initial true statement
- else
- gHook.Notify("The dickwrap module wasn't installed correctly, NoSpread is now disabled.") // notification
- end
- function gHook.AntiAntiAim(pEnt)
- end
- function gHook.CheckVis(vecPos, pEnt)
- end
- function gHook.GetPos(pEnt)
- end
- function gHook.CheckValid(pEnt)
- end
- function gHook.OpenMenu()
- end
- function gHook.FindTarget()
- end
- function gHook.Attack(cmd)
- end
- function gHook.Silent(cmd)
- end
- function gHook.FixMove(cmd, bAntiAim)
- end
- function gHook.GetSpread(cmd, angPos)
- end
- function gHook.Aimbot(cmd)
- end
- function gHook.NoSpread(cmd) // ok not removing
- 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
- local angSpread = gHook.GetSpread(cmd, cGetViewAngles(cmd)) // if so compensate the spread for our current view angles
- angSpread.x, angSpread.y = mNormalizeAngle(angSpread.x), mNormalizeAngle(angSpread.y) // normalize spread angles
- cSetViewAngles(cmd, angSpread) // then set our view angles!
- end
- end
- function gHook.HvH(cmd) // HUGE AA, NOT REMOVING IT'S TOO P
- local angAAP = gHook.Settings.HvH["bJitter"] && mRandom(-180, 180) // random angles
- local angAAY = gHook.Settings.HvH["bJitter"] && mRandom(-360, 360) // random angles
- cSetViewAngles(cmd, Angle(angAAP, angAAY, 0)) // set the angles
- if (angAAP > 89 || angAAP < -89) then // check if we need to do a different movement fix
- gHook.FixMove(cmd, true) // do antiaim movement fix
- else
- gHook.FixMove(cmd) // regular movement fix
- end
- end
- function gHook.Bhop(cmd)
- if (gHook.Settings.Misc["bAutoStrafe"] && cKeyDown(cmd, IN_JUMP)) then // broken autostrafe
- if (cGetMouseX(cmd) > 0) then // broken
- cSetSideMove(cmd, 1000000) // autostrafe
- else
- cSetSideMove(cmd, -1000000) // how to
- end
- end
- end
- function gHook.GetCol(pEnt)
- end
- function gHook.Visuals() // hah get owned
- if (!gHook.Settings.Visuals["bEnabled"]) then return end // check if visuals are enabled, if not then return nothing and do nothing
- for iPlayerIndex,pEnt in next, pGetAll() do // make a loop with all the players
- 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
- end
- if (gHook.Settings.Visuals["bWatermark"]) then // check if the watermark var is enabled
- dSimpleText("Ground0 Cheats", "Trebuchet18", 50, 12, Color(0, 0, 255), TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER) // draw the watermark
- end
- end
- function gHook.Menu() // SECRET ZEDHACK MENU CODES HERE
- end
- function gHook.CreateMove(cmd)
- gHook.Silent(cmd) // call silent aimbot code
- gHook.Aimbot(cmd) // call aimbot
- gHook.NoSpread(cmd) // call nospread
- gHook.HvH(cmd) // call hvh features (anti-aim, jitter aa)
- gHook.Bhop(cmd) // call bhop
- end
- function gHook.DrawOverlay()
- gHook.Visuals() // do the visuals (ESP and stuff)
- end
- function gHook.Think()
- gHook.FindTarget() // find aimbot targets
- gHook.OpenMenu() // check if the menu can be opened
- end
- function gHook.CalcView(p, origin, a, fov)
- local view = {} // make a new viewtable
- view.angles = gHook.FakeAngle // set the fake angle so we don't look like we're jittering with silent aim and anti aim
- view.origin = origin // set the origin
- view.fov = fov // set the fov
- return view // return it
- end
- function gHook.Move()
- if (IsFirstTimePredicted()) then // if it's the first time being predicted
- gHook.CurTime = CurTime() + eTickInterval() // set the proper curtime to regular curtime + the tick interval
- end
- end
- function gHook.AddHook(strHookType, funcHook) // don't steal my fuckin sick gamemode hooks dude
- gHook.Notify("Hooking " .. strHookType) // notify that this is being hooked
- if (GAMEMODE[strHookType] && __gbackup[strHookType]) then // check if it's a valid hook
- GAMEMODE[strHookType] = function(self, ...) // detour it
- funcHook(...) // call our function
- __gbackup[strHookType](self, ...) // call the gamemode function
- end
- end
- end
- // insert detouren here
- gHook.AddHook("CreateMove", gHook.CreateMove) // hook createmove
- gHook.AddHook("DrawOverlay", gHook.DrawOverlay) // hook drawoverlay
- gHook.AddHook("Think", gHook.Think) // hook think
- gHook.AddHook("CalcView", gHook.CalcView) // hook calcview
- gHook.AddHook("Move", gHook.Move) // hook move
- gHook.Notify("Loaded!") // loaded message
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement