Code:
local esp_name = CreateClientConVar("DrawName", 1)
local esp_box = CreateClientConVar("Healthbar", 1)
local bhop = CreateClientConVar("bhop", 1)
local chams = CreateClientConVar("Chams", 1)
local function _IsValid(v)
return (v != LocalPlayer() && IsValid(v) && v:Alive() && v:Health() > 0 && !v:IsDormant());
end
local function Get2DBounds(v)
local min,max = v:OBBMins(),v:OBBMaxs()
local corners = {
Vector(min.x,min.y,min.z),
Vector(min.x,min.y,max.z),
Vector(min.x,max.y,min.z),
Vector(min.x,max.y,max.z),
Vector(max.x,min.y,min.z),
Vector(max.x,min.y,max.z),
Vector(max.x,max.y,min.z),
Vector(max.x,max.y,max.z)
}
local minx,miny,maxx,maxy = math.huge, math.huge, -math.huge, -math.huge;
for _, corner in next, corners do
local screen = v:LocalToWorld(corner):ToScreen();
minx,miny = math.min(minx,screen.x),math.min(miny,screen.y);
maxx,maxy = math.max(maxx,screen.x),math.max(maxy,screen.y);
end
return minx,miny,maxx,maxy;
end
/*
name esp
*/
local function DrawName()
for k,v in next, player.GetAll() do
if !_IsValid(v) then continue; end
local bottom = v:GetPos() - Vector(0, 0, 6);
bottom = bottom:ToScreen();
if(!bottom.visible) then continue; end
surface.SetFont("TargetIDSmall");
local tw, th = surface.GetTextSize(v:Name());
surface.SetTextPos(bottom.x - tw / 2, bottom.y);
surface.SetTextColor(220, 220, 220);
surface.DrawText(v:Name());
end
end
/*
healthbar | box esp
*/
local function Healthbar()
for k,v in next, player.GetAll() do
if _IsValid(v) then
local x1,y1,x2,y2 = Get2DBounds(v);
local diff = math.abs(x2 - x1);
local diff2 = math.abs(y2 - y1);
surface.SetDrawColor(5,5,5)
surface.DrawOutlinedRect(x1-1,y1-1,diff+2,diff2+2)
surface.DrawOutlinedRect(x1+1,y1+1,diff-2,diff2-2)
surface.SetDrawColor(50, 100, 200)
surface.DrawOutlinedRect(x1,y1,diff,diff2)
surface.SetDrawColor(255 - 5 * v:Health(), 3 * v:Health(),0)
surface.DrawRect(x1-2, y1-1,1,diff2+2)
surface.SetDrawColor(5,5,5)
surface.DrawOutlinedRect(x1-3, y1-1,3,diff2+2)
end
end
end
/*
ent esp
*/
/*
chams
*/
local chamsmat = CreateMaterial("chamsmat", "VertexLitGeneric", {
["$ignorez"] = 1,
["$model"] = 1,
["$basetexture"] = "models/debug/debugwhite",
});
local function Chams()
cam.Start3D();
render.MaterialOverride(chamsmat);
render.SetColorModulation( 255, 0, 0, 0)
render.SetBlend(.4)
for k,v in next, player.GetAll() do
if(v:Health() < 1 || v:IsDormant()) then continue; end
v:DrawModel();
local wep = v:GetActiveWeapon();
if(wep && wep:IsValid()) then
render.SetColorModulation(1, 1, 1);
wep:DrawModel();
end
end
cam.End3D();
end
/*
bhop
*/
local ply = LocalPlayer();
local meme = 0;
local function bhop(cmd)
if(ply:GetMoveType() == MOVETYPE_NOCLIP or ply:WaterLevel() >= 2) then return; end
if (cmd:KeyDown(IN_JUMP)) then
if (ply:OnGround() and cmd:CommandNumber() ~= meme + 1) then
cmd:SetButtons(bit.bor(cmd:GetButtons(), IN_JUMP));
if(cmd:CommandNumber() ~= 0) then meme = cmd:CommandNumber(); end
return;
end
end
cmd:RemoveKey(IN_JUMP);
end
/*
hooks
*/
hook.Add("CreateMove", "bunnyhop", bhop)
hook.Add("PostDrawHUD", "espname", DrawName)
hook.Add("HUDPaint", "healthbar", Healthbar)
hook.Add("DrawOverlay", "chams", Chams)