Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local c_reg = callbacks.Register
- local b_toggle = input.IsButtonDown
- local abs_frame_time = globals.AbsoluteFrameTime;
- local draw_Line, draw_TextShadow, draw_Color, draw_Text, draw_FilledRect, client_WorldToScreen, draw_GetScreenSize, client_GetConVar, client_SetConVar, client_exec, PlayerNameByUserID, PlayerIndexByUserID, GetLocalPlayer, gui_SetValue, gui_GetValue, LocalPlayerIndex, c_AllowListener, cb_Register, g_tickcount, g_realtime, g_curtime, math_floor, math_sqrt, GetPlayerResources, entities_FindByClass, GetPlayerResources = draw.Line, draw.TextShadow, draw.Color, draw.Text, draw.FilledRect, client.WorldToScreen, draw.GetScreenSize, client.GetConVar, client.SetConVar, client.Command, client.GetPlayerNameByUserID, client.GetPlayerIndexByUserID, entities.GetLocalPlayer, gui.SetValue, gui.GetValue, client.GetLocalPlayerIndex, client.AllowListener, callbacks.Register, globals.TickCount, globals.RealTime, globals.CurTime, math.floor, math.sqrt, entities.GetPlayerResources, entities.FindByClass, entities.GetPlayerResources
- local menu_ref = gui.Reference("VISUALS", "ENEMIES", "Filter")
- local c_gb_ref = gui.Groupbox(menu_ref, "Super Visuals | by L3D451R7", 0, 206, 200, 223)
- --CODED BY L3D451R7 POSHEL NAHUI NN
- local c_local_ref = gui.Reference("VISUALS", "YOURSELF", "Filter", "Enable" );
- local c_box_esp = gui.Checkbox(c_gb_ref, "vis_kislo_esp_box", "ESP Box", 1)
- local c_healthbar = gui.Checkbox(c_gb_ref, "vis_kislo_esp_hbar", "ESP Health Bar", 1)
- local c_name_esp = gui.Checkbox(c_gb_ref, "vis_kislo_esp_name", "ESP Name", 1)
- local c_info_esp = gui.Checkbox(c_gb_ref, "vis_kislo_esp_info", "ESP Info", 1)
- local c_weapon_esp = gui.Checkbox(c_gb_ref, "vis_kislo_esp_weapon", "ESP Weapon", 1)
- local c_hit_log = gui.Checkbox(c_gb_ref, "vis_kislo_hit_log", "Hit Log", 1)
- local main_font = draw.CreateFont("Verdana", 12, 700)
- local flags_font = draw.CreateFont("Smallest Pixel-7", 11, 400)
- local headshot_font = draw.CreateFont("Againts", 40, 100)
- local kill_logs = {}
- function get_player_boundaries(player)
- local min_x, min_y, min_z = player:GetMins()
- local max_x, max_y, max_z = player:GetMaxs()
- return {min_x, min_y, min_z}, {max_x, max_y, max_z}
- end
- function get_player_position(player)
- if (player ~= nil) then
- local x, y, z = player:GetAbsOrigin()
- return {x, y, z}
- end
- end
- function w2s(pos)
- local x, y = client.WorldToScreen(pos[1], pos[2], pos[3])
- if x == nil or y == nil then
- return nil
- end
- return {x, y}
- end
- function get_bounding_box(player)
- local mins, maxs = get_player_boundaries(player)
- local screen_pos, pos_3d, screen_top, top_3d
- pos_3d = get_player_position(player)
- pos_3d[3] = pos_3d[3] - 3
- top_3d = get_player_position(player)
- local duck_amt = player:GetPropFloat("m_flDuckAmount")
- local angels = player:GetPropFloat("m_angEyeAngles[0]")
- top_3d[3] = top_3d[3] + 79 - 14 * duck_amt - angels / 89 * 3
- screen_pos = w2s(pos_3d)
- screen_top = w2s(top_3d)
- if (screen_pos ~= nil and screen_top ~= nil) then
- local height = screen_pos[2] - screen_top[2]
- local width = height / 2.2
- local left = screen_pos[1] - width / 2
- local right = (screen_pos[1] - width / 2) + width
- local top = screen_top[2] + width / 5
- local bottom = screen_top[2] + height
- local box = {left = left, right = right, top = top, bottom = bottom}
- --CODED BY L3D451R7 POSHEL NAHUI NN
- return box
- end
- return nil
- end
- function is_me(player)
- return (player:GetIndex() == client.GetLocalPlayerIndex())
- end
- function is_enemy(player)
- return (entities.GetLocalPlayer():GetTeamNumber() ~= player:GetTeamNumber())
- end
- function draw_text(text, pos, centered, shadow, font, color)
- draw.Color(color[1], color[2], color[3], color[4])
- draw.SetFont(font)
- if pos ~= nil then
- local _x, _y = pos[1], pos[2]
- if (centered) then
- local w, h = draw.GetTextSize(text)
- _x = _x - w / 2
- end
- if (shadow) then
- draw.TextShadow(_x, _y, text)
- else--CODED BY L3D451R7 POSHEL NAHUI NN
- draw.Text(_x, _y, text)
- end
- end
- end
- function rect_outline(pos1, pos2, color, outline_color)
- draw.Color(color[1], color[2], color[3], color[4])
- draw.OutlinedRect(pos1[1], pos1[2], pos2[1], pos2[2])
- draw.Color(outline_color[1], outline_color[2], outline_color[3], outline_color[4])
- draw.OutlinedRect(pos1[1] - 1, pos1[2] - 1, pos2[1] + 1, pos2[2] + 1)
- draw.OutlinedRect(pos1[1] + 1, pos1[2] + 1, pos2[1] - 1, pos2[2] - 1)
- end
- function rect_fill(pos1, pos2, color)
- draw.Color(color[1], color[2], color[3], color[4])
- draw.FilledRect(pos1[1], pos1[2], pos2[1], pos2[2])
- end
- function get_text_size(text, font)
- draw.SetFont(font)
- local w, h = draw.GetTextSize(text)
- return {w, h}
- end
- function get_screen_size()
- local w, h = draw.GetScreenSize()
- return {w, h}
- end
- function draw_line(pos1, pos2, color)
- draw.Color(color[1], color[2], color[3], color[4])
- draw.Line(pos1[1], pos1[2], pos2[1], pos2[2])
- end
- local function KuSloEb_DrAwInG()
- w, h = draw.GetScreenSize()
- w = w/2
- h = h/2 + 10
- --CODED BY L3D451R7 POSHEL NAHUI NN
- local local_player = entities.GetLocalPlayer()
- local screen_size = get_screen_size()
- if (local_player ~= nil) then
- -- esp
- local players = entities.FindByClass("CCSPlayer")
- for i = 1, #players do
- local player = players[i]
- if (is_enemy(player) and player:IsAlive() or is_me(player) and player:IsAlive() and c_local_ref:GetValue() ~= false) then
- -- get bounding box
- local aye = 0
- local bbox = get_bounding_box(player)
- if (bbox ~= nil) then
- -- box
- if c_box_esp:GetValue() ~= false then
- rect_outline({bbox.left, bbox.top}, {bbox.right, bbox.bottom}, {255, 255, 255, 200}, {0, 0, 0, 200})
- end
- -- health
- if c_healthbar:GetValue() ~= false then
- rect_fill({bbox.left - 6, bbox.top - 1}, {bbox.left - 2, bbox.bottom + 1}, {0, 0, 0, 130})
- local hp = math.min(player:GetHealth(), 100)
- local height = bbox.bottom - bbox.top - 1
- local healthbar_height = (hp / 100) * height
- local hp_percent = h - ((h * hp) / 100);
- local width = (w * (hp / 100.0));
- local red = 255 - (hp*2.55);
- local green = hp * 2.55;
- rect_fill(
- {bbox.left - 5, bbox.bottom - healthbar_height - 1},
- {bbox.left - 3, bbox.bottom},
- {red, green, 0, 200}
- )
- if (hp < 95) then
- draw_text(
- hp,
- {bbox.left - 4, bbox.bottom - healthbar_height - 6},
- true,
- true,
- flags_font,
- {255, 255, 255, 200})
- end
- end
- -- name
- local name = player:GetName()
- if c_name_esp:GetValue() ~= false then
- draw_text(
- name,
- {bbox.left + (bbox.right - bbox.left) / 2, bbox.top - 13},
- true,
- true,
- main_font,
- {255, 255, 255, 200}
- )
- end
- --CODED BY L3D451R7 POSHEL NAHUI NN
- if c_info_esp:GetValue() ~= false then
- local flags = ""
- local latency = math.min(entities.GetPlayerResources():GetPropInt("m_iPing", player:GetIndex()), 1000)
- local red_l = latency*0.255;
- local green_l = 255 - latency * 0.255;
- if (player:GetPropInt("m_bIsScoped") ~= 0) then
- draw_text("ZOOM", {bbox.right + 2, bbox.top - 2 + aye * 9}, false, true, flags_font, {0, 185, 255, 200})
- aye = aye + 1
- end
- if (latency > 70) then
- draw_text(latency, {bbox.right + 2, bbox.top - 2 + aye * 9}, false, true, flags_font, {red_l, green_l, 0, 200})
- aye = aye + 1
- end
- if (player:GetPropInt("m_bHasHelmet") == 1) then
- flags = flags .. "H"
- end
- if (player:GetPropInt("m_ArmorValue") ~= 0) then
- flags = flags .. "K"
- end
- if (flags ~= "") then
- draw_text(flags, {bbox.right + 2, bbox.top - 2 + aye * 9}, false, true, flags_font, {255, 255, 255, 200})
- aye = aye + 1
- end
- end
- -- weapon
- local weapon = player:GetPropEntity("m_hActiveWeapon")
- if (weapon ~= nil and c_weapon_esp:GetValue() ~= false) then
- local weapon_name = weapon:GetClass()
- weapon_name = weapon_name:gsub("CWeapon", "")
- weapon_name = weapon_name:gsub("CKnife", "knife")
- weapon_name = weapon_name:lower()
- if (weapon_name:sub(1, 1) == "c") then
- weapon_name = weapon_name:sub(2)--CODED BY L3D451R7 POSHEL NAHUI NN
- end
- draw_text(
- weapon_name,
- {bbox.left + (bbox.right - bbox.left) / 2, bbox.bottom + 1},
- true,
- true,
- main_font,
- {255, 255, 255, 200}
- )
- end
- end
- end
- end
- end
- if c_hit_log:GetValue() == true then
- for index = 1, 10, 1 do
- local data = kill_logs[index]
- if data ~= nil then
- local alpha = 0
- if data.time > globals.RealTime() then alpha = 255 else
- alpha = alpha - (255 / 0.3 * globals.FrameTime())
- end
- if alpha > 0 and data.position ~= nil then
- data.position[3] = data.position[3] + 0.5
- local lul = data.position[3] + 75
- local pos_2d = w2s({data.position[1], data.position[2], lul})
- --CODED BY L3D451R7 POSHEL NAHUI NN
- draw_text(data.text,pos_2d,true,true,headshot_font,{0, 200, 0, 200})
- end
- end
- end
- end
- end
- local function KuSloEb_GaMeEvEnT( event )
- local local_player = client.GetLocalPlayerIndex()
- if event:GetName() == "player_hurt" then
- local userid = client.GetPlayerIndexByUserID(event:GetInt("userid"))
- local attacker = client.GetPlayerIndexByUserID(event:GetInt("attacker"))
- local hitgroup = event:GetInt("hitgroup")
- if attacker == local_player and userid ~= local_player then
- for i = 10, 2, -1 do
- kill_logs[i] = kill_logs[i-1]
- end
- local text = "NICE BAIM"
- if hitgroup == 1 then
- text = "1TAP NN"--CODED BY L3D451R7 POSHEL NAHUI NN
- end
- kill_logs[1] =
- {
- ["position"] = get_player_position(entities.GetByIndex(userid)),
- ["time"] = globals.RealTime() + 2,
- ["text"] = text
- }
- end
- end
- end
- c_reg( "Draw", KuSloEb_DrAwInG)
- c_reg( "FireGameEvent", KuSloEb_GaMeEvEnT)
- client.AllowListener("player_hurt")
- print("Visuals For KuCJIoTa1337 // by L3D451R7")
- --CODED BY L3D451R7 POSHEL NAHUI NN
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement