VISUAL_BASICSDynamic bone esp

Posts 1–15 of 77 · Page 1 of 6
Dynamic bone esp
Hey guys, I coded a really nice dynamic bone esp for you guys and im gonna share it because im a really nice person.

shout out to my boys at dango mafia!!!

Code:
--[[
	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)
Sreenshot:
i.gyazo.com/8ec216a37d2bef64899a822dbd6a9ca0.jpg

enjoy!!!



edit: make you you place this in materials folder as "skeleton.png"
pngimg.com/upload/skeleton_PNG5556.png
code god ily
reported for not putting a warning for spooky!!!!!!!!!!!!!!!!!!!!!!!
This is really bad coding, It shouldn't be done like this!

Spoiler: Spooky skeleton
Quote Originally Posted by suchisgood View Post
This is really bad coding, It shouldn't be done like this!

Spoiler: Spooky skeleton
As far as I know, this is the best possible way to code a dynamic bone esp, idk what you're on about, you're probably just a troll :v
Quote Originally Posted by Ariaa View Post
As far as I know, this is the best possible way to code a dynamic bone esp, idk what you're on about, you're probably just a troll :v
You forgot the skeleton.png image upload + virus scans for it!
Quote Originally Posted by suchisgood View Post
You forgot the skeleton.png image upload + virus scans for it!
added the picture but I didnt post the virus scan sorry
this code is giving me autism
Quote Originally Posted by D3M0L1T10N View Post
this code is giving me autism
kcool lets see you make it better
Quote Originally Posted by Kieru_ View Post
kcool lets see you make it better
Code:
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);
that was hard
Quote Originally Posted by D3M0L1T10N View Post
Code:
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);
that was hard
Why are you comparing the angle? I just compare the bone position to player's origin and it works fine.
Quote Originally Posted by D3M0L1T10N View Post
Code:
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);
that was hard
This is how you code it properly! +rep
Quote Originally Posted by suchisgood View Post
This is how you code it properly! +rep
trust me, it's really not...
Quote Originally Posted by D3M0L1T10N View Post
Code:
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);
that was hard
Dear lord, I hope you don't actually use that.
Posts 1–15 of 77 · Page 1 of 6
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Talk with us