-
Автор темы
- #1
local kills = {}
local deaths = {};
local w,h;
local frametimes = {}
local fps_prev = 0
local seperator = '|';
local function accumulate_fps()
local ft = globals.AbsoluteFrameTime()
if ft > 0 then
table.insert(frametimes, 1, ft)
end
local count = #frametimes
if count == 0 then
return 0
end
local i, accum = 0, 0
while accum < 0.5 do
i = i + 1
accum = accum + frametimes
if i >= count then
break
end
end
accum = accum / i
while i < count do
i = i + 1
table.remove(frametimes)
end
local fps = 1 / accum
local rt = globals.RealTime()
if math.abs(fps - fps_prev) > 4 or rt - last_update_time > 2 then
fps_prev = fps
last_update_time = rt
else
fps = fps_prev
end
return math.floor(fps + 0.5)
end
local function events_stuff( event )
if event:GetName( ) == "client_disconnect" then
kills = {}
deaths = {}
end
if event:GetName( ) == "player_death" then
local local_player = client.GetLocalPlayerIndex( );
local INDEX_Attacker = client.GetPlayerIndexByUserID( event:GetInt( 'attacker' ) );
local INDEX_Victim = client.GetPlayerIndexByUserID( event:GetInt( 'userid' ) );
if INDEX_Attacker == local_player then
kills[#kills + 1] = {}
end
if (INDEX_Victim == local_player) then
deaths[#deaths + 1] = {};
end
end
end
local function drawing_stuff( )
if not entities.GetLocalPlayer() then
return
end
w,h = draw.GetScreenSize(w,h)
print (h)
print (w)
draw.Color(37,39,38,255)
draw.FilledRect(w - 220, 5, w - 10, 40 ) -- ?????
draw.Color(10,9,7,255)
draw.FilledRect( w - 215, 10, w -15, 35 ) -- ??????
draw.Color(60,60,60,255)
draw.FilledRect( w - 4, 5, w - 20, 45)
draw.Color(40,40,40,255)
draw.FilledRect( w - 5, 5, w - 21, 45 )
draw.Color(60,60,60,255)
draw.FilledRect( w - 7, 5, w - 13, 45 )
draw.Color(gui.GetValue("clr_gui_window_logo2"))
draw.Color(255,255,255,255)
draw.Text(w - 201, 14, "AIM")
draw.Color(gui.GetValue("clr_gui_window_logo2"))
draw.Text(w - 177,14, "WARE")
draw.Color(255,255,255,255)
draw.Text(w - 133,14, seperator)
draw.Color(255,255,255,255)
draw.Text(w - 123,14, accumulate_fps())
draw.Color(157,1,1,255)
draw.Text(w - 97,14, "fps")
draw.Color(255,255,255,255)
draw.Text(w - 72,14, seperator)
draw.Color(255,255,255,255)
time = os.date("*t")
if time.min < 10 then
draw.Text(w - 60,14, time.hour .. ":" .. time.min .. "0")
else
draw.Text(w - 60,14, time.hour .. ":" .. time.min)
end
end
local function autobuy( event )
if event:GetName() == "round_prestart" then
client.Command("buy defuser; buy taser; buy deagle; buy vest; buy vesthelm; buy incgrenade; buy molotov; buy hegrenade; buy smokegrenade", true)
end
end
function events( Event )
if (Event:GetName( ) == 'player_death') then
local local_player = client.GetLocalPlayerIndex();
local victim_index = client.GetPlayerIndexByUserID( Event:GetInt( 'userid' ) ); --get victim's index
local attacker_index = client.GetPlayerIndexByUserID( Event:GetInt( 'attacker' ) ); --get attacker's index
local victim_name = client.GetPlayerNameByUserID( Event:GetInt( 'userid' ) ); -- get victim's name
local local_playername = client.GetPlayerNameByUserID( Event:GetInt( 'attacker' ) ); --get attacker's name
if ( victim_index == local_player and attacker_index ~= local_player ) then -- checks if we died, if we did we clear the list
kills = { };
end
if ( victim_index ~= local_player and attacker_index == local_player) then -- checks if we killed somebody, if we did adds player name & victimname to the list
kills = { local_playername, victim_name};
end
elseif (Event:GetName( ) == 'player_spawned') then
local local_player = client.GetLocalPlayerIndex();
local victim_index = client.GetPlayerIndexByUserID( Event:GetInt( 'userid' ) ); --get victim's index
local attacker_index = client.GetPlayerIndexByUserID( Event:GetInt( 'attacker' ) ); --get attacker's index
local victim_name = client.GetPlayerNameByUserID( Event:GetInt( 'userid' ) ); -- get victim's name
local local_playername = client.GetPlayerNameByUserID( Event:GetInt( 'attacker' ) ); --get attacker's name
if ( victim_index == local_player and attacker_index ~= local_player ) then -- checks if we died, if we did we clear the list
kills = { };
end
if ( victim_index ~= local_player and attacker_index == local_player) then -- checks if we killed somebody, if we did adds player name & victimname to the list
kills = { local_playername, victim_name};
end
end
end
function draw_kills( )
print(kills[1]);
print(kills[2]);
end
callbacks.Register( "FireGameEvent", "autobuy", autobuy);
client.AllowListener( 'player_death' );
client.AllowListener( "round_prestart" );
client.AllowListener( "round_start" );
client.AllowListener( "player_death" );
callbacks.Register( "FireGameEvent", "events_stuff", events_stuff);
callbacks.Register( "Draw", "drawing_stuff", drawing_stuff );
callbacks.Register( 'FireGameEvent', 'events', events );
callbacks.Register( 'Draw', 'draw_kills', draw_kills );
local hurt_time = 0
local alpha = 0;
--Change linesize here:
local linesize = 5
function Sounds( Event, Entity )
if ( Event:GetName() == 'player_hurt' ) then
local ME = client.GetLocalPlayerIndex();
local INT_UID = Event:GetInt( 'userid' );
local INT_ATTACKER = Event:GetInt( 'attacker' );
local NAME_Victim = client.GetPlayerNameByUserID( INT_UID );
local INDEX_Victim = client.GetPlayerIndexByUserID( INT_UID );
local NAME_Attacker = client.GetPlayerNameByUserID( INT_ATTACKER );
local INDEX_Attacker = client.GetPlayerIndexByUserID( INT_ATTACKER );
if ( INDEX_Attacker == ME and INDEX_Victim ~= ME ) then
hurt_time = globals.RealTime()
client.Command("play buttons\\arena_switch_press_02.wav", true); --replace sound here
end
end
end
function DrawingHook()
--Screensize:
local screenCenterX, screenCenterY = draw.GetScreenSize();
screenCenterX = screenCenterX / 2;
screenCenterY = screenCenterY / 2;
--Alpha/Colors:
local step = 255 / 0.3 * globals.FrameTime()
local r,b,g = gui.GetValue( "clr_misc_hitmarker" )
if hurt_time + 0.4 > globals.RealTime() then
alpha = 255
else
alpha = alpha - step
end
--Render:
if (alpha > 0) then
draw.Color( r,g,b,alpha)
draw.Line( screenCenterX - linesize * 2, screenCenterY - linesize * 2, screenCenterX - ( linesize ), screenCenterY - ( linesize ))
draw.Line( screenCenterX - linesize * 2, screenCenterY + linesize * 2, screenCenterX - ( linesize ), screenCenterY + ( linesize ))
draw.Line( screenCenterX + linesize * 2, screenCenterY + linesize * 2, screenCenterX + ( linesize ), screenCenterY + ( linesize ))
draw.Line( screenCenterX + linesize * 2, screenCenterY - linesize * 2, screenCenterX + ( linesize ), screenCenterY - ( linesize ))
end
end
client.AllowListener( 'player_hurt' );
callbacks.Register( "Draw", "DrawingHook", DrawingHook );
callbacks.Register( 'FireGameEvent', 'Hitsound', Sounds );
-- Bomb Info by Nyanpasu!
local defusing = false;
function EventHook(Event)
if Event:GetName() == "bomb_begindefuse" then
defusing = true;
elseif Event:GetName() == "bomb_abortdefuse" then
defusing = false;
elseif Event:GetName() == "round_officially_ended"
or Event:GetName() == "bomb_defused" or Event:GetName() == "bomb_exploded" then
defusing = false;
end
end
function DrawingHook()
if entities.FindByClass("CPlantedC4")[1] ~= nil then
local Bomb = entities.FindByClass("CPlantedC4")[1];
if Bomb:GetProp("m_bBombTicking") and Bomb:GetProp("m_bBombDefused") == 0 and globals.CurTime() < Bomb:GetProp("m_flC4Blow") then
local ScreenW, ScreenH = draw.GetScreenSize();
local Player = entities.GetLocalPlayer();
if defusing == true then
local BombMath = ((globals.CurTime() - Bomb:GetProp("m_flDefuseCountDown")) *
(0 - 1)) / ((Bomb:GetProp("m_flDefuseCountDown") - Bomb:GetProp("m_flDefuseLength")) - Bomb:GetProp("m_flDefuseCountDown")) + 1;
draw.Color(0, 0, 0, 170);
draw.RoundedRectFill( 0, 0, ScreenW/200, ScreenH );
draw.Color(0, 135, 255, 255);
draw.RoundedRectFill( 0, ScreenH * BombMath, ScreenW/200, ScreenH );
draw.Color(255, 255, 255, 255);
draw.RoundedRect( 0, 0, ScreenW/200, ScreenH );
if Bomb:GetProp("m_flDefuseCountDown") > Bomb:GetProp("m_flC4Blow") then
draw.Color(255, 0, 0, 255);
end
draw.Text( (ScreenW/175), ScreenH * BombMath, math.floor( (Bomb:GetProp("m_flDefuseCountDown") - globals.CurTime()) * 10 ) / 10);
draw.TextShadow( (ScreenW/175), ScreenH * BombMath, math.floor( (Bomb:GetProp("m_flDefuseCountDown") - globals.CurTime()) * 10 ) / 10);
else
local BombMath = ((globals.CurTime() - Bomb:GetProp("m_flC4Blow")) *
(0 - 1)) / ((Bomb:GetProp("m_flC4Blow") - Bomb:GetProp("m_flTimerLength")) - Bomb:GetProp("m_flC4Blow")) + 1;
draw.Color(0, 0, 0, 170);
draw.RoundedRectFill( 0, 0, ScreenW/200, ScreenH );
draw.Color(255, 0, 0, 255);
draw.RoundedRectFill( 0, ScreenH * BombMath, ScreenW/200, ScreenH );
draw.Color(255, 255, 255, 255);
draw.RoundedRect( 0, 0, ScreenW/200, ScreenH );
draw.Text( (ScreenW/175), ScreenH * BombMath, math.floor(Bomb:GetProp("m_flC4Blow") - globals.CurTime()));
draw.TextShadow( (ScreenW/175), ScreenH * BombMath, math.floor(Bomb:GetProp("m_flC4Blow") - globals.CurTime()));
end
if Player:IsAlive() and globals.CurTime() < Bomb:GetProp("m_flC4Blow") then
if math.floor(0.5 + BombDamage(Bomb, Player)) >= Player:GetHealth() then
draw.Color(255, 0, 0, 255)
else
draw.Color(255, 255, 255, 255)
end
draw.Text(ScreenW/150, 0, math.floor(0.5 + BombDamage(Bomb, Player)) .. " HP");
draw.TextShadow(ScreenW/150, 0, math.floor(0.5 + BombDamage(Bomb, Player)) .. " HP");
end
end
end
end
function BombDamage(Bomb, Player)
local C4Distance = math.sqrt((select(1,Bomb:GetAbsOrigin()) - select(1,Player:GetAbsOrigin())) ^ 2 +
(select(2,Bomb:GetAbsOrigin()) - select(2,Player:GetAbsOrigin())) ^ 2 +
(select(3,Bomb:GetAbsOrigin()) - select(3,Player:GetAbsOrigin())) ^ 2);
local Gauss = (C4Distance - 75.68) / 789.2
local flDamage = 450.7 * math.exp(-Gauss * Gauss);
if Player:GetProp("m_ArmorValue") > 0 then
local flArmorRatio = 0.5;
local flArmorBonus = 0.5;
if Player:GetProp("m_ArmorValue") > 0 then
local flNew = flDamage * flArmorRatio;
local flArmor = (flDamage - flNew) * flArmorBonus;
if flArmor > Player:GetProp("m_ArmorValue") then
flArmor = Player:GetProp("m_ArmorValue") * (1 / flArmorBonus);
flNew = flDamage - flArmor;
end
flDamage = flNew;
end
end
return math.max(flDamage, 0);
end
-- Bomb Info by Nyanpasu!
client.AllowListener( "bomb_begindefuse" );
client.AllowListener( "bomb_abortdefuse" );
client.AllowListener( "bomb_defused" );
client.AllowListener( "bomb_exploded" );
client.AllowListener( "round_officially_ended" );
callbacks.Register("FireGameEvent", "EventHookB", EventHook);
callbacks.Register("Draw", "DrawingHookB", DrawingHook)
-- Grenade timers by Nyanpasu! (- Luiz)
local updatetick = 0;
local grenades = {};
function EventHook(Event)
-- Clean table on round start
if Event:GetName() == "round_start" then
grenades = {};
end
-- Remove expired grenades from Table
if Event:GetName() == "hegrenade_detonate" or Event:GetName() == "flashbang_detonate"
or Event:GetName() == "inferno_expire" or Event:GetName() == "inferno_extinguish" then
updatetick = globals.TickCount();
for index,value in pairs(grenades) do
if value[1] == Event:GetInt("entityid") then
table.remove(grenades, index);
end
end
end
end
function ESPHook(Builder)
-- Smoke Grenades
if Builder:GetEntity():GetClass() == "CSmokeGrenadeProjectile"
and Builder:GetEntity():GetProp("m_nSmokeEffectTickBegin") ~= 0 then
delta = (globals.TickCount() - Builder:GetEntity():GetProp("m_nSmokeEffectTickBegin")) * globals.TickInterval();
Builder:AddBarBottom( 1 - (delta/17.5) )
-- Flash and HE Grenades
elseif Builder:GetEntity():GetClass() == "CBaseCSGrenadeProjectile" then
local found = false;
for index,value in pairs(grenades) do
if value[1] == Builder:GetEntity():GetIndex() then
DeltaT = (globals.TickCount() - grenades[index][2]) * globals.TickInterval();
Builder:AddBarBottom( 1 - (DeltaT/1.65) )
found = true;
break;
end
end
if found == false and globals.TickCount() > updatetick then
local gMatrix = {Builder:GetEntity():GetIndex(), globals.TickCount()};
table.insert(grenades, gMatrix);
end
end
end
function DrawingHook()
for indexF,valueF in pairs(entities.FindByClass("CInferno")) do
local found = false;
for indexT,valueT in pairs(grenades) do
if valueT[1] == valueF:GetIndex() then
x, y = client.WorldToScreen( valueF:GetAbsOrigin() )
local mollysize = 25;
if x ~= nil and y ~= nil then
draw.Color(0, 0, 0, 255);
draw.RoundedRectFill( x - mollysize, y, x + mollysize, y + 4 );
draw.Color(227, 227, 227, 255);
local math = (((globals.TickCount() - valueT[2]) * ((-1) - 1))
/ ( (valueT[2] + 7 / globals.TickInterval()) - valueT[2])) + 1
draw.RoundedRectFill( x - mollysize, y, x + mollysize * math, y + 4 )
draw.Color(255, 255, 255, 255);
draw.RoundedRect( x - mollysize, y, x + mollysize, y + 4)
local w,h = draw.GetTextSize( "MOLLY" )
draw.Text(x - w/2, y - h * 1.25 , "MOLLY");
draw.TextShadow(x - w/2, y - h * 1.25 , "MOLLY");
end
found = true;
break;
end
end
if found == false and globals.TickCount() > updatetick then
local gMatrix = {valueF:GetIndex(), globals.TickCount()};
table.insert(grenades, gMatrix);
end
end
end
-- Grenade timers by Nyanpasu! (- Luiz)
client.AllowListener("round_start");
client.AllowListener("inferno_expire");
client.AllowListener("inferno_extinguish");
client.AllowListener("molotov_detonate");
client.AllowListener("hegrenade_detonate");
client.AllowListener("flashbang_detonate");
callbacks.Register("FireGameEvent", "EventHookG", EventHook);
callbacks.Register( "Draw", "DrawingHookG", DrawingHook );
callbacks.Register( "DrawESP", "ESPHookG", ESPHook );
Выписываеться слово 1 ez bot хочу изменить OWNED BY PIDORAS
local deaths = {};
local w,h;
local frametimes = {}
local fps_prev = 0
local seperator = '|';
local function accumulate_fps()
local ft = globals.AbsoluteFrameTime()
if ft > 0 then
table.insert(frametimes, 1, ft)
end
local count = #frametimes
if count == 0 then
return 0
end
local i, accum = 0, 0
while accum < 0.5 do
i = i + 1
accum = accum + frametimes
if i >= count then
break
end
end
accum = accum / i
while i < count do
i = i + 1
table.remove(frametimes)
end
local fps = 1 / accum
local rt = globals.RealTime()
if math.abs(fps - fps_prev) > 4 or rt - last_update_time > 2 then
fps_prev = fps
last_update_time = rt
else
fps = fps_prev
end
return math.floor(fps + 0.5)
end
local function events_stuff( event )
if event:GetName( ) == "client_disconnect" then
kills = {}
deaths = {}
end
if event:GetName( ) == "player_death" then
local local_player = client.GetLocalPlayerIndex( );
local INDEX_Attacker = client.GetPlayerIndexByUserID( event:GetInt( 'attacker' ) );
local INDEX_Victim = client.GetPlayerIndexByUserID( event:GetInt( 'userid' ) );
if INDEX_Attacker == local_player then
kills[#kills + 1] = {}
end
if (INDEX_Victim == local_player) then
deaths[#deaths + 1] = {};
end
end
end
local function drawing_stuff( )
if not entities.GetLocalPlayer() then
return
end
w,h = draw.GetScreenSize(w,h)
print (h)
print (w)
draw.Color(37,39,38,255)
draw.FilledRect(w - 220, 5, w - 10, 40 ) -- ?????
draw.Color(10,9,7,255)
draw.FilledRect( w - 215, 10, w -15, 35 ) -- ??????
draw.Color(60,60,60,255)
draw.FilledRect( w - 4, 5, w - 20, 45)
draw.Color(40,40,40,255)
draw.FilledRect( w - 5, 5, w - 21, 45 )
draw.Color(60,60,60,255)
draw.FilledRect( w - 7, 5, w - 13, 45 )
draw.Color(gui.GetValue("clr_gui_window_logo2"))
draw.Color(255,255,255,255)
draw.Text(w - 201, 14, "AIM")
draw.Color(gui.GetValue("clr_gui_window_logo2"))
draw.Text(w - 177,14, "WARE")
draw.Color(255,255,255,255)
draw.Text(w - 133,14, seperator)
draw.Color(255,255,255,255)
draw.Text(w - 123,14, accumulate_fps())
draw.Color(157,1,1,255)
draw.Text(w - 97,14, "fps")
draw.Color(255,255,255,255)
draw.Text(w - 72,14, seperator)
draw.Color(255,255,255,255)
time = os.date("*t")
if time.min < 10 then
draw.Text(w - 60,14, time.hour .. ":" .. time.min .. "0")
else
draw.Text(w - 60,14, time.hour .. ":" .. time.min)
end
end
local function autobuy( event )
if event:GetName() == "round_prestart" then
client.Command("buy defuser; buy taser; buy deagle; buy vest; buy vesthelm; buy incgrenade; buy molotov; buy hegrenade; buy smokegrenade", true)
end
end
function events( Event )
if (Event:GetName( ) == 'player_death') then
local local_player = client.GetLocalPlayerIndex();
local victim_index = client.GetPlayerIndexByUserID( Event:GetInt( 'userid' ) ); --get victim's index
local attacker_index = client.GetPlayerIndexByUserID( Event:GetInt( 'attacker' ) ); --get attacker's index
local victim_name = client.GetPlayerNameByUserID( Event:GetInt( 'userid' ) ); -- get victim's name
local local_playername = client.GetPlayerNameByUserID( Event:GetInt( 'attacker' ) ); --get attacker's name
if ( victim_index == local_player and attacker_index ~= local_player ) then -- checks if we died, if we did we clear the list
kills = { };
end
if ( victim_index ~= local_player and attacker_index == local_player) then -- checks if we killed somebody, if we did adds player name & victimname to the list
kills = { local_playername, victim_name};
end
elseif (Event:GetName( ) == 'player_spawned') then
local local_player = client.GetLocalPlayerIndex();
local victim_index = client.GetPlayerIndexByUserID( Event:GetInt( 'userid' ) ); --get victim's index
local attacker_index = client.GetPlayerIndexByUserID( Event:GetInt( 'attacker' ) ); --get attacker's index
local victim_name = client.GetPlayerNameByUserID( Event:GetInt( 'userid' ) ); -- get victim's name
local local_playername = client.GetPlayerNameByUserID( Event:GetInt( 'attacker' ) ); --get attacker's name
if ( victim_index == local_player and attacker_index ~= local_player ) then -- checks if we died, if we did we clear the list
kills = { };
end
if ( victim_index ~= local_player and attacker_index == local_player) then -- checks if we killed somebody, if we did adds player name & victimname to the list
kills = { local_playername, victim_name};
end
end
end
function draw_kills( )
print(kills[1]);
print(kills[2]);
end
callbacks.Register( "FireGameEvent", "autobuy", autobuy);
client.AllowListener( 'player_death' );
client.AllowListener( "round_prestart" );
client.AllowListener( "round_start" );
client.AllowListener( "player_death" );
callbacks.Register( "FireGameEvent", "events_stuff", events_stuff);
callbacks.Register( "Draw", "drawing_stuff", drawing_stuff );
callbacks.Register( 'FireGameEvent', 'events', events );
callbacks.Register( 'Draw', 'draw_kills', draw_kills );
local hurt_time = 0
local alpha = 0;
--Change linesize here:
local linesize = 5
function Sounds( Event, Entity )
if ( Event:GetName() == 'player_hurt' ) then
local ME = client.GetLocalPlayerIndex();
local INT_UID = Event:GetInt( 'userid' );
local INT_ATTACKER = Event:GetInt( 'attacker' );
local NAME_Victim = client.GetPlayerNameByUserID( INT_UID );
local INDEX_Victim = client.GetPlayerIndexByUserID( INT_UID );
local NAME_Attacker = client.GetPlayerNameByUserID( INT_ATTACKER );
local INDEX_Attacker = client.GetPlayerIndexByUserID( INT_ATTACKER );
if ( INDEX_Attacker == ME and INDEX_Victim ~= ME ) then
hurt_time = globals.RealTime()
client.Command("play buttons\\arena_switch_press_02.wav", true); --replace sound here
end
end
end
function DrawingHook()
--Screensize:
local screenCenterX, screenCenterY = draw.GetScreenSize();
screenCenterX = screenCenterX / 2;
screenCenterY = screenCenterY / 2;
--Alpha/Colors:
local step = 255 / 0.3 * globals.FrameTime()
local r,b,g = gui.GetValue( "clr_misc_hitmarker" )
if hurt_time + 0.4 > globals.RealTime() then
alpha = 255
else
alpha = alpha - step
end
--Render:
if (alpha > 0) then
draw.Color( r,g,b,alpha)
draw.Line( screenCenterX - linesize * 2, screenCenterY - linesize * 2, screenCenterX - ( linesize ), screenCenterY - ( linesize ))
draw.Line( screenCenterX - linesize * 2, screenCenterY + linesize * 2, screenCenterX - ( linesize ), screenCenterY + ( linesize ))
draw.Line( screenCenterX + linesize * 2, screenCenterY + linesize * 2, screenCenterX + ( linesize ), screenCenterY + ( linesize ))
draw.Line( screenCenterX + linesize * 2, screenCenterY - linesize * 2, screenCenterX + ( linesize ), screenCenterY - ( linesize ))
end
end
client.AllowListener( 'player_hurt' );
callbacks.Register( "Draw", "DrawingHook", DrawingHook );
callbacks.Register( 'FireGameEvent', 'Hitsound', Sounds );
-- Bomb Info by Nyanpasu!
local defusing = false;
function EventHook(Event)
if Event:GetName() == "bomb_begindefuse" then
defusing = true;
elseif Event:GetName() == "bomb_abortdefuse" then
defusing = false;
elseif Event:GetName() == "round_officially_ended"
or Event:GetName() == "bomb_defused" or Event:GetName() == "bomb_exploded" then
defusing = false;
end
end
function DrawingHook()
if entities.FindByClass("CPlantedC4")[1] ~= nil then
local Bomb = entities.FindByClass("CPlantedC4")[1];
if Bomb:GetProp("m_bBombTicking") and Bomb:GetProp("m_bBombDefused") == 0 and globals.CurTime() < Bomb:GetProp("m_flC4Blow") then
local ScreenW, ScreenH = draw.GetScreenSize();
local Player = entities.GetLocalPlayer();
if defusing == true then
local BombMath = ((globals.CurTime() - Bomb:GetProp("m_flDefuseCountDown")) *
(0 - 1)) / ((Bomb:GetProp("m_flDefuseCountDown") - Bomb:GetProp("m_flDefuseLength")) - Bomb:GetProp("m_flDefuseCountDown")) + 1;
draw.Color(0, 0, 0, 170);
draw.RoundedRectFill( 0, 0, ScreenW/200, ScreenH );
draw.Color(0, 135, 255, 255);
draw.RoundedRectFill( 0, ScreenH * BombMath, ScreenW/200, ScreenH );
draw.Color(255, 255, 255, 255);
draw.RoundedRect( 0, 0, ScreenW/200, ScreenH );
if Bomb:GetProp("m_flDefuseCountDown") > Bomb:GetProp("m_flC4Blow") then
draw.Color(255, 0, 0, 255);
end
draw.Text( (ScreenW/175), ScreenH * BombMath, math.floor( (Bomb:GetProp("m_flDefuseCountDown") - globals.CurTime()) * 10 ) / 10);
draw.TextShadow( (ScreenW/175), ScreenH * BombMath, math.floor( (Bomb:GetProp("m_flDefuseCountDown") - globals.CurTime()) * 10 ) / 10);
else
local BombMath = ((globals.CurTime() - Bomb:GetProp("m_flC4Blow")) *
(0 - 1)) / ((Bomb:GetProp("m_flC4Blow") - Bomb:GetProp("m_flTimerLength")) - Bomb:GetProp("m_flC4Blow")) + 1;
draw.Color(0, 0, 0, 170);
draw.RoundedRectFill( 0, 0, ScreenW/200, ScreenH );
draw.Color(255, 0, 0, 255);
draw.RoundedRectFill( 0, ScreenH * BombMath, ScreenW/200, ScreenH );
draw.Color(255, 255, 255, 255);
draw.RoundedRect( 0, 0, ScreenW/200, ScreenH );
draw.Text( (ScreenW/175), ScreenH * BombMath, math.floor(Bomb:GetProp("m_flC4Blow") - globals.CurTime()));
draw.TextShadow( (ScreenW/175), ScreenH * BombMath, math.floor(Bomb:GetProp("m_flC4Blow") - globals.CurTime()));
end
if Player:IsAlive() and globals.CurTime() < Bomb:GetProp("m_flC4Blow") then
if math.floor(0.5 + BombDamage(Bomb, Player)) >= Player:GetHealth() then
draw.Color(255, 0, 0, 255)
else
draw.Color(255, 255, 255, 255)
end
draw.Text(ScreenW/150, 0, math.floor(0.5 + BombDamage(Bomb, Player)) .. " HP");
draw.TextShadow(ScreenW/150, 0, math.floor(0.5 + BombDamage(Bomb, Player)) .. " HP");
end
end
end
end
function BombDamage(Bomb, Player)
local C4Distance = math.sqrt((select(1,Bomb:GetAbsOrigin()) - select(1,Player:GetAbsOrigin())) ^ 2 +
(select(2,Bomb:GetAbsOrigin()) - select(2,Player:GetAbsOrigin())) ^ 2 +
(select(3,Bomb:GetAbsOrigin()) - select(3,Player:GetAbsOrigin())) ^ 2);
local Gauss = (C4Distance - 75.68) / 789.2
local flDamage = 450.7 * math.exp(-Gauss * Gauss);
if Player:GetProp("m_ArmorValue") > 0 then
local flArmorRatio = 0.5;
local flArmorBonus = 0.5;
if Player:GetProp("m_ArmorValue") > 0 then
local flNew = flDamage * flArmorRatio;
local flArmor = (flDamage - flNew) * flArmorBonus;
if flArmor > Player:GetProp("m_ArmorValue") then
flArmor = Player:GetProp("m_ArmorValue") * (1 / flArmorBonus);
flNew = flDamage - flArmor;
end
flDamage = flNew;
end
end
return math.max(flDamage, 0);
end
-- Bomb Info by Nyanpasu!
client.AllowListener( "bomb_begindefuse" );
client.AllowListener( "bomb_abortdefuse" );
client.AllowListener( "bomb_defused" );
client.AllowListener( "bomb_exploded" );
client.AllowListener( "round_officially_ended" );
callbacks.Register("FireGameEvent", "EventHookB", EventHook);
callbacks.Register("Draw", "DrawingHookB", DrawingHook)
-- Grenade timers by Nyanpasu! (- Luiz)
local updatetick = 0;
local grenades = {};
function EventHook(Event)
-- Clean table on round start
if Event:GetName() == "round_start" then
grenades = {};
end
-- Remove expired grenades from Table
if Event:GetName() == "hegrenade_detonate" or Event:GetName() == "flashbang_detonate"
or Event:GetName() == "inferno_expire" or Event:GetName() == "inferno_extinguish" then
updatetick = globals.TickCount();
for index,value in pairs(grenades) do
if value[1] == Event:GetInt("entityid") then
table.remove(grenades, index);
end
end
end
end
function ESPHook(Builder)
-- Smoke Grenades
if Builder:GetEntity():GetClass() == "CSmokeGrenadeProjectile"
and Builder:GetEntity():GetProp("m_nSmokeEffectTickBegin") ~= 0 then
delta = (globals.TickCount() - Builder:GetEntity():GetProp("m_nSmokeEffectTickBegin")) * globals.TickInterval();
Builder:AddBarBottom( 1 - (delta/17.5) )
-- Flash and HE Grenades
elseif Builder:GetEntity():GetClass() == "CBaseCSGrenadeProjectile" then
local found = false;
for index,value in pairs(grenades) do
if value[1] == Builder:GetEntity():GetIndex() then
DeltaT = (globals.TickCount() - grenades[index][2]) * globals.TickInterval();
Builder:AddBarBottom( 1 - (DeltaT/1.65) )
found = true;
break;
end
end
if found == false and globals.TickCount() > updatetick then
local gMatrix = {Builder:GetEntity():GetIndex(), globals.TickCount()};
table.insert(grenades, gMatrix);
end
end
end
function DrawingHook()
for indexF,valueF in pairs(entities.FindByClass("CInferno")) do
local found = false;
for indexT,valueT in pairs(grenades) do
if valueT[1] == valueF:GetIndex() then
x, y = client.WorldToScreen( valueF:GetAbsOrigin() )
local mollysize = 25;
if x ~= nil and y ~= nil then
draw.Color(0, 0, 0, 255);
draw.RoundedRectFill( x - mollysize, y, x + mollysize, y + 4 );
draw.Color(227, 227, 227, 255);
local math = (((globals.TickCount() - valueT[2]) * ((-1) - 1))
/ ( (valueT[2] + 7 / globals.TickInterval()) - valueT[2])) + 1
draw.RoundedRectFill( x - mollysize, y, x + mollysize * math, y + 4 )
draw.Color(255, 255, 255, 255);
draw.RoundedRect( x - mollysize, y, x + mollysize, y + 4)
local w,h = draw.GetTextSize( "MOLLY" )
draw.Text(x - w/2, y - h * 1.25 , "MOLLY");
draw.TextShadow(x - w/2, y - h * 1.25 , "MOLLY");
end
found = true;
break;
end
end
if found == false and globals.TickCount() > updatetick then
local gMatrix = {valueF:GetIndex(), globals.TickCount()};
table.insert(grenades, gMatrix);
end
end
end
-- Grenade timers by Nyanpasu! (- Luiz)
client.AllowListener("round_start");
client.AllowListener("inferno_expire");
client.AllowListener("inferno_extinguish");
client.AllowListener("molotov_detonate");
client.AllowListener("hegrenade_detonate");
client.AllowListener("flashbang_detonate");
callbacks.Register("FireGameEvent", "EventHookG", EventHook);
callbacks.Register( "Draw", "DrawingHookG", DrawingHook );
callbacks.Register( "DrawESP", "ESPHookG", ESPHook );
Выписываеться слово 1 ez bot хочу изменить OWNED BY PIDORAS