local menu = {
moly = Menu.SwitchColor("Grenade Esp", "Molotov Circle", false, Color.RGBA(255, 63, 63, 190)),
smoky = Menu.SwitchColor("Grenade Esp", "Smoke Circle", false, Color.RGBA(61, 147, 250, 180)),
}
local font = Render.InitFont("Smallest Pixel-7", 9)
Cheat.RegisterCallback("draw", function()
local lp = EntityList.GetClientEntity(EngineClient.GetLocalPlayer())
if lp == nil then return end
local lp_pos = lp:GetRenderOrigin()
local ts = 0
--smoke1
local smoke = EntityList.GetEntitiesByName("CSmokeGrenadeProjectile")
if smoke ~= nil then
for i = 1, #smoke do
local smoke_pos = smoke[i]:GetRenderOrigin()
local smoke_2dpos = Render.WorldToScreen(smoke_pos)
local smoke_tick = smoke[i]:GetProp("m_nSmokeEffectTickBegin")
local smoke_time = math.max(0.0, string.format("%.1f", 17.55 - GlobalVars.interval_per_tick * (GlobalVars.tickcount - smoke_tick)))
local color = Color.RGBA(math.floor(menu.smoky:GetColor().r*255), math.floor(menu.smoky:GetColor().g*255), math.floor(menu.smoky:GetColor().b*255), 255)
ts = Render.CalcTextSize("SMOKE", 9, font)
Render.Text("SMOKE", Vector2.new(smoke_2dpos.x-ts.x/2, smoke_2dpos.y-ts.y+16), Color.RGBA(255, 255, 255, 255), 9, font, true)
if smoke[i]:GetProp("m_bDidSmokeEffect") then
if menu.smoky:GetBool() then
Render.Circle3D(smoke_pos, 58, 125.1, Color.RGBA(0, 0, 0, 255))
Render.Circle3D(smoke_pos, 58, 124.9, Color.RGBA(0, 0, 0, 255))
Render.Circle3D(smoke_pos, 58, 125, color)
end
ts = Render.CalcTextSize(tostring(smoke_time), 9, font)
Render.Text(tostring(smoke_time), Vector2.new(smoke_2dpos.x-ts.x/2, smoke_2dpos.y+16), Color.RGBA(255, 255, 255, 255), 9, font, true)
end
end
end
--he1
local he = EntityList.GetEntitiesByName("CBaseCSGrenadeProjectile")
if he ~= nil then
for i = 1, #he do
local he_pos = he[i]:GetRenderOrigin()
local he_2dpos = Render.WorldToScreen(he_pos)
local he_tick = he[i]:GetProp("m_nExplodeEffectTickBegin")
if he_tick < 0.1 then
ts = Render.CalcTextSize("FRAG", 9, font)
Render.Text("FRAG", Vector2.new(he_2dpos.x-ts.x/2, he_2dpos.y-ts.y+16), Color.RGBA(255, 255, 255, 255), 9, font, true)
end
end
end
--molotov1
local molotov = EntityList.GetEntitiesByName("CMolotovProjectile")
if molotov ~= nil then
for i = 1, #molotov do
local molotov_pos = molotov[i]:GetRenderOrigin()
local molotov_2dpos = Render.WorldToScreen(molotov_pos)
ts = Render.CalcTextSize("MOLLY", 9, font)
Render.Text("MOLLY", Vector2.new(molotov_2dpos.x-ts.x/2, molotov_2dpos.y-ts.y+16), Color.RGBA(255, 255, 255, 255), 9, font, true)
end
end
local inferno = EntityList.GetEntitiesByName("CInferno")
if inferno ~= nil then
for i = 1, #inferno do
local thrower = inferno[i]:GetProp("m_hOwnerEntity")
local molotov_pos = inferno[i]:GetRenderOrigin()
local molotov_2dpos = Render.WorldToScreen(molotov_pos)
local molotov_tick = inferno[i]:GetProp("m_nFireEffectTickBegin")
local molotov_time = math.max(0.0, string.format("%.1f", 7.03125 - GlobalVars.interval_per_tick * (GlobalVars.tickcount - molotov_tick)))
local color = Color.RGBA(math.floor(menu.moly:GetColor().r*255), math.floor(menu.moly:GetColor().g*255), math.floor(menu.moly:GetColor().b*255), 255)
if menu.moly:GetBool() then
Render.Circle3D(molotov_pos, 58, 145.1, Color.RGBA(0, 0, 0, 255))
Render.Circle3D(molotov_pos, 58, 144.9, Color.RGBA(0, 0, 0, 255))
Render.Circle3D(molotov_pos, 58, 145, color)
end
ts = Render.CalcTextSize("MOLLY", 9, font)
Render.Text("MOLLY", Vector2.new(molotov_2dpos.x-ts.x/2, molotov_2dpos.y-ts.y+16), Color.RGBA(255, 255, 255, 255), 9, font, true)
ts = Render.CalcTextSize(tostring(molotov_time), 9, font)
Render.Text(tostring(molotov_time), Vector2.new(molotov_2dpos.x-ts.x/2, molotov_2dpos.y+16), Color.RGBA(255, 255, 255, 255), 9, font, true)
end
end
--decoy1
local decoy = EntityList.GetEntitiesByName("CDecoyProjectile")
if decoy ~= nil then
for i = 1, #decoy do
local decoy_pos = decoy[i]:GetRenderOrigin()
local decoy_2dpos = Render.WorldToScreen(decoy_pos)
local decoy_tick = decoy[i]:GetProp("m_nExplodeEffectTickBegin")
if decoy_tick < 0.1 then
ts = Render.CalcTextSize("DECOY", 9, font)
Render.Text("DECOY", Vector2.new(decoy_2dpos.x-ts.x/2, decoy_2dpos.y-ts.y+16), Color.RGBA(255, 255, 255, 255), 9, font, true)
end
end
end
end)