--[[
Skeleton esp
by Aria
]]--
local SpookyMat = Material("skeleton2.png", "nocull")
local function DrawBones(ent)
surface.SetMaterial( SpookyMat )
local Min = ent:GetPos()
local Max = Min + Vector( 0, 0, ent:OBBMaxs().z )
Max = Max:ToScreen()
Min = Min:ToScreen()
local Height = -(Max.y - Min.y)
local Width = Height*.5
surface.SetDrawColor( 255, 255, 255, 100 )
surface.DrawRect( Min.x - Width*.5, Max.y, Width, Height )
surface.SetDrawColor( 255, 255, 255, 255 )
surface.DrawTexturedRect( Min.x - Width*.5, Max.y, Width, Height )
surface.SetDrawColor( 0, 0, 0, 255 )
surface.DrawOutlinedRect( Min.x - Width*.5 - 1, Max.y - 1, Width + 2, Height + 2 )
end
hook.Add("HUDPaint", "esp", function()
local players = player.GetAll()
for i = 1, #players do
if players[i] != LocalPlayer() then
DrawBones( players[i] )
end
end
end)
local function DrawBone(b1, b2)
surface.DrawLine(b1.y, b1.x, b2.y, b2.x);
end
local fake = Angle(0,0,0); -- don't know why some bones fuck up like this but ok
local function boneesp(ply)
local cur = nil;
local ths = nil;
local real, lcal;
for i = ply:GetBoneCount() - 1, 0, -1 do
real, lcal = ply:GetBonePosition(i);
if(lcal == fake) then continue; end
cur = (real):ToScreen();
for k,v in pairs(ply:GetChildBones(i)) do
real, lcal = ply:GetBonePosition(v);
if(lcal == fake) then continue; end
ths = (ply:GetBonePosition(v)):ToScreen();
DrawBone(cur, ths);
end
end
end
dismay.AddHook("HUDPaint", "fuck", function()
surface.SetDrawColor(255,0,255,255);
for k,v in pairs(player.GetAll()) do
boneesp(k, v);
end
end);