Code:
--[[
COOLHACK V4.2.7
Created by cdriza and Im TyleR-theon and originally released at MPGH.
Current Version: 4.2.7
--]]
throwtables = table.Copy
local _getMathState = throwtables(math)
g_pGetTimers = throwtables(timer)
local pPrediction = 0.014936835835683586
target = nil
_R = debug.getregistry()
FiringBullets = _R.Entity.FireBullets
local gayang2
boners = {}
function _R.Entity.FireBullets(ent, bullet)
if !boners[LocalPlayer():GetActiveWeapon():GetClass()] and bullet.Spread then
boners[LocalPlayer():GetActiveWeapon():GetClass()] = bullet.Spread * -1
end
return FiringBullets(ent, bullet)
end
function attack()
local getGarryState = LocalPlayer
getGarryState():ConCommand("+attack")
g_pGetTimers.Simple(0.01, function()
getGarryState():ConCommand("-attack")
end )
end
function friendly_cansee(g_pEnt)
local tr = {}
tr.start = LocalPlayer():GetShootPos()
tr.endpos = g_pEnt:GetPos() + Vector(0, 0, 5)
tr.filter = {LocalPlayer(), g_pEnt}
tr.mask = MASK_SHOT
local trace = util.TraceLine(tr)
if trace.Fraction == 1 or trace.Entity == g_pEnt then
return true;
else
return false;
end
end
espbones = {
{ S = "ValveBiped.Bip01_Head1", E = "ValveBiped.Bip01_Neck1" },
{ S = "ValveBiped.Bip01_Neck1", E = "ValveBiped.Bip01_Spine4" },
{ S = "ValveBiped.Bip01_Spine4", E = "ValveBiped.Bip01_Spine2" },
{ S = "ValveBiped.Bip01_Spine2", E = "ValveBiped.Bip01_Spine1" },
{ S = "ValveBiped.Bip01_Spine1", E = "ValveBiped.Bip01_Spine" },
{ S = "ValveBiped.Bip01_Spine", E = "ValveBiped.Bip01_Pelvis" },
{ S = "ValveBiped.Bip01_Spine4", E = "ValveBiped.Bip01_L_UpperArm" },
{ S = "ValveBiped.Bip01_L_UpperArm", E = "ValveBiped.Bip01_L_Forearm" },
{ S = "ValveBiped.Bip01_L_Forearm", E = "ValveBiped.Bip01_L_Hand" },
{ S = "ValveBiped.Bip01_Spine4", E = "ValveBiped.Bip01_R_UpperArm" },
{ S = "ValveBiped.Bip01_R_UpperArm", E = "ValveBiped.Bip01_R_Forearm" },
{ S = "ValveBiped.Bip01_R_Forearm", E = "ValveBiped.Bip01_R_Hand" },
{ S = "ValveBiped.Bip01_Pelvis", E = "ValveBiped.Bip01_L_Thigh" },
{ S = "ValveBiped.Bip01_L_Thigh", E = "ValveBiped.Bip01_L_Calf" },
{ S = "ValveBiped.Bip01_L_Calf", E = "ValveBiped.Bip01_L_Foot" },
{ S = "ValveBiped.Bip01_L_Foot", E = "ValveBiped.Bip01_L_Toe0" },
{ S = "ValveBiped.Bip01_Pelvis", E = "ValveBiped.Bip01_R_Thigh" },
{ S = "ValveBiped.Bip01_R_Thigh", E = "ValveBiped.Bip01_R_Calf" },
{ S = "ValveBiped.Bip01_R_Calf", E = "ValveBiped.Bip01_R_Foot" },
{ S = "ValveBiped.Bip01_R_Foot", E = "ValveBiped.Bip01_R_Toe0" },
}
aimmodels = {
["models/combine_scanner.mdl"] = "Scanner.Body",
["models/hunter.mdl"] = "MiniStrider.body_joint",
["models/combine_turrets/floor_turret.mdl"] = "Barrel",
["models/dog.mdl"] = "Dog_Model.Eye",
["models/antlion.mdl"] = "Antlion.Body_Bone",
["models/antlion_guard.mdl"] = "Antlion_Guard.Body",
["models/antlion_worker.mdl"] = "Antlion.Head_Bone",
["models/zombie/fast_torso.mdl"] = "ValveBiped.HC_BodyCube",
["models/zombie/fast.mdl"] = "ValveBiped.HC_BodyCube",
["models/headcrabclassic.mdl"] = "HeadcrabClassic.SpineControl",
["models/headcrabblack.mdl"] = "HCBlack.body",
["models/headcrab.mdl"] = "HCFast.body",
["models/zombie/poison.mdl"] = "ValveBiped.Headcrab_Cube1",
["models/zombie/classic.mdl"] = "ValveBiped.HC_Body_Bone",
["models/zombie/classic_torso.mdl"] = "ValveBiped.HC_Body_Bone",
["models/zombie/zombie_soldier.mdl"] = "ValveBiped.HC_Body_Bone",
["models/combine_strider.mdl"] = "Combine_Strider.Body_Bone",
["models/lamarr.mdl"] = "HeadcrabClassic.SpineControl",
}
me = LocalPlayer()
fags = throwtables(player)
function getplayers()
target = nil
for k, v in SortedPairsByMemberValue(fags.GetAll()) do
if v ~= me then
if v:IsValid() then
if not v:IsDormant() then
if v:Alive() then
if v:Health() > 0 then
if v:Team() ~= TEAM_SPECTATOR then
if not v:InVehicle() then
if !friendly_cansee(v) then continue end
target = v
end
end
end
end
end
end
end
end
end
fag = me
function CoolHack_ponybot_cdESP()
for k,v in next, player.GetAll() do
local min = (v:GetPos() + Vector(0, 0, 1)):ToScreen()
local max = (v:GetPos() + Vector(0, 0, 70)):ToScreen()
local hit = (min.y - max.y)
local wid = (hit / 2.5)
if v != fag and v:Alive() and v:Health() > 0 then
local ESP = (v:EyePos()):ToScreen()
draw.DrawText(v:Name(), "DebugFixedSmall", ESP.x -25, ESP.y -56, team.GetColor(v:Team()), TEXT_ALIGN_LEFT, TEXT_ALIGN_LEFT)
draw.DrawText("Rank: "..v:GetUserGroup(), "DebugFixedSmall", ESP.x -25, ESP.y -44, Color(255, 255, 255, 255), TEXT_ALIGN_LEFT, TEXT_ALIGN_LEFT)
if(v:GetActiveWeapon():IsValid()) then
draw.DrawText("Weapon: " ..v:GetActiveWeapon():GetClass(), "DebugFixedSmall", ESP.x -25, ESP.y -32, Color(255, 255, 255, 255), TEXT_ALIGN_LEFT, TEXT_ALIGN_LEFT)
end
cam.Start3D()
cam.IgnoreZ(true)
render.MaterialOverride(Material("models/debug/debugwhite"))
render.SuppressEngineLighting( true )
local col = Color(0, 110, 255)
render.SetColorModulation(col.r/255, col.g/255, col.b/255)
v:DrawModel()
render.SetColorModulation( 1, 1, 1 )
render.SuppressEngineLighting( false )
render.MaterialOverride(0)
cam.IgnoreZ(false)
cam.End3D()
end
end
end
function CoolHack_Aimb0t()
getplayers()
if ( target != nil ) then
local GetPosition = (target:GetAttachment(target:LookupAttachment("eyes")).Pos - fag:GetShootPos()):Angle()
GetPosition = GetPosition - Angle((fag:GetVelocity() * pPrediction))
fag:SetEyeAngles(GetPosition)
attack()
end
end
function AddSecretHook(ht, hn, hf)
local nhn = util.CRC(hn)
hook.Add(ht, nhn, hf)
end
AddSecretHook("HUDPaint", "CoolHack_ESP", CoolHack_ponybot_cdESP)
AddSecretHook("Think", "CoolHack_AIMBOT", CoolHack_Aimb0t)