The_Belch

Extra Utilities

Jul 2nd, 2019
2,344
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 31.21 KB | None | 0 0
  1. -- stuff
  2. 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
  3. -------------- References
  4. local L_RefE = gui.Reference("LEGIT", "Extra")
  5. local V_RefM = gui.Reference("VISUALS", "Shared")
  6. local G_VM = gui.Groupbox(V_RefM, "Extra Features", 0, 349, 200, 197)
  7. local VOO_Ref = gui.Reference("VISUALS", "OTHER", "Options")
  8. local VEO_Ref = gui.Reference("VISUALS", "ENEMIES", "Options")
  9. local VEF_Ref = gui.Reference("VISUALS", "ENEMIES", "Filter")
  10. local VTO_Ref = gui.Reference("VISUALS", "TEAMMATES", "Options")
  11. local M_Ref1 = gui.Reference("MISC", "GENERAL", "Main")
  12. local G_M1 = gui.Groupbox(M_Ref1, "Extra Features", 0, 206, 200, 223)
  13. -------------- Font
  14. local fontz = draw.CreateFont("Tahoma", 30);
  15. local ff = draw.CreateFont("Tahoma");
  16. -------------- Better Grenades
  17. local better_grenades = gui.Checkbox(VOO_Ref, "esp_other_better_grenades", "Better Grenades", false)
  18. -------------- Hit Log
  19. local HitLog = gui.Checkbox(G_M1, "msc_hitlog", "Hit Log", false)
  20. -------------- Auto Buy
  21. local show, pressed = false, true
  22. local AB_Show = gui.Checkbox(G_M1, "msc_autobuy", "AutoBuy", false)
  23. local AB_W = gui.Window("AB_W", "Auto Buy", 200, 200, 200, 328);
  24. local AB_GB = gui.Groupbox(AB_W, "Auto Buy Settings", 15, 14, 170, 268);
  25. local AB_E = gui.Checkbox(AB_GB, "AB_Active", "Active", false);
  26. local PrimaryWeapons = gui.Combobox(AB_GB, 'AB_Primary_Weapons', "Primary Weapons", "Off", "AK | M4", "Scout", "SG553 | AUG", "AWP", "Auto");
  27. local SecondaryWeapons = gui.Combobox(AB_GB, 'AB_Secondary_Weapons', "Secondary Weapons", "Off", "Elite", "P250", "Tec-9 | Five-Seven", "R8 | Deagle");
  28. local Armor = gui.Combobox(AB_GB, 'AB_Armor', "Armor", "Off", "Kevlar", "Kevlar + Helmet");
  29. local Nades = gui.Checkbox(AB_GB, "AB_Nades", "Grenades", false);
  30. local Zeus = gui.Checkbox(AB_GB, "AB_Zeus", "Zeus", false);
  31. local Defuser = gui.Checkbox(AB_GB, "AB_Defuser", "Defuser", false);
  32. -------------- View Model Extender
  33. local function VM_Cache() xO = client_GetConVar("viewmodel_offset_x"); yO = client_GetConVar("viewmodel_offset_y"); zO = client_GetConVar("viewmodel_offset_z"); fO = client_GetConVar("viewmodel_fov"); end; VM_Cache()
  34. local show2, pressed2 = false, true
  35. local ViewModelShown = gui.Checkbox(G_M1, "msc_vme", "Viewmodel Changer", false)
  36. local VM_W = gui.Window("VM_W", "Viewmodel Extender", 200,200,200,300)
  37. local VMStuff = gui.Groupbox(VM_W, "Viewmodel Stuff", 15, 14, 170, 240)
  38. local VM_e = gui.Checkbox(VMStuff, "msc_vme", "Enable", false)
  39. local xS = gui.Slider(VMStuff, "VM_X", "X", xO, -20, 20)
  40. local yS = gui.Slider(VMStuff, "VM_Y", "Y", yO, -100, 100)
  41. local zS = gui.Slider(VMStuff, "VM_Z", "Z", zO, -20, 20)
  42. local vfov = gui.Slider(VMStuff, "VM_fov", "Viewmodel FOV", fO, 0, 120)
  43. -------------- Sniper Crosshair
  44. local ComboCrosshair = gui.Combobox(G_VM, "vis_sniper_crosshair", "Sniper Crosshair", "Off", "Engine Crosshair", "Engine Crosshair (+scoped)", "Aimware Crosshair", "Draw Crosshair")
  45. -------------- Scoped FOV Fix
  46. local s_fovfix = gui.Checkbox(G_VM, "vis_fixfov", "Fix Scoped FOV", false)
  47. local fov_value = gui_GetValue("vis_view_fov")
  48. local vm_fov_value = gui_GetValue("vis_view_model_fov")
  49. -------------- Knife On Left Hand
  50. local K_O_L_H = gui.Checkbox(G_M1, "msc_knifelefthand", "Knife On Left Hand", false)
  51. -------------- Bomb Timer
  52. local BombTimer = gui.Checkbox(VOO_Ref, "esp_other_better_c4timer", "Bomb Timer", false)
  53. -------------- Bomb Damage
  54. local Bomb_Damage = gui.Checkbox(VOO_Ref, "esp_other_bombdamage", "Bomb Damage", false)
  55. -------------- Chat Spammer
  56. local show3, pressed3 = false, true
  57. local CC_Show = gui.Checkbox(G_M1, "msc_chat_spams", "Chat Spams", false)
  58. local CC_W = gui.Window("CC_W", "Chat Spam", 200,200,200,189)
  59. local CC_G1 = gui.Groupbox(CC_W, "Chat Spams", 15, 15, 170, 127)
  60. local CC_Spams = gui.Combobox(CC_G1, "CC_Spam", "Spams", "Off", "r_eyegloss", "r_eyemove", "r_eyesize", "Clear Chat")
  61. local CC_Spam_spd = gui.Slider(CC_G1, "CC_Spam_Speed", "Spam Speed", 67.5, 10, 250)
  62. -------------- Aspect Ratio Changer
  63. local aspect_ratio_table = {};
  64. local aspect_ratio_check = gui.Checkbox(G_M1, "msc_aspect_enable", "Aspect Ratio Changer", false)
  65. local aspect_ratio_reference = gui.Slider(G_M1, "msc_aspect_value", "Force aspect ratio", 100, 1, 199) -- % times your original ratio
  66. -------------- Esp On Dead
  67. local espdead = gui.Checkbox(VEF_Ref, "esp_espondead", "ESP when dead", false)
  68. -------------- Engine Radar
  69. local ERadar = gui.Checkbox(G_VM, "esp_engine_radar", "Engine Radar", false)
  70. -------------- Team & Enemy Tracers
  71. local tracersEnemy = gui.Checkbox(VEO_Ref, "esp_enemy_tracer", "Tracers", false)
  72. local tracersTeam = gui.Checkbox(VTO_Ref, "esp_team_tracer", "Tracers", false)
  73. -------------- Team & Enemy & Other Distance + visible help
  74. local enemy_distance = gui.Checkbox(VEO_Ref, "esp_enemy_distance", "Distance", false)
  75. local enemy_visiblehelp = gui.Checkbox(VEO_Ref, "esp_enemy_vishelp", "Visible Help", false)
  76. local team_distance = gui.Checkbox(VTO_Ref, "esp_team_distance", "Distance", false)
  77. local other_distance = gui.Checkbox(VOO_Ref, "esp_other_distance", "Distance", false)
  78. -------------- Full Bright
  79. local fBright = gui.Checkbox(G_VM, "vis_fullbright", "Full Bright", false)
  80. -------------- Disable Post Processing
  81. local DPP = gui.Checkbox(G_VM, "vis_disable_post", "Disable Post Processing", false)
  82. -------------- Third person on dead
  83. local thirdpersonondead = gui.Checkbox(G_VM, "vis_thirdperson_ondead", "3rd Person While Dead", false)
  84. -------------- Zeusbot
  85. local zeusbot = gui.Checkbox(L_RefE, "lbot_zeusbot_enable", "Zeusbot", false)
  86. local trigm, trigaf, trighc = gui_GetValue("lbot_trg_mode"), gui_GetValue("lbot_trg_autofire"), gui_GetValue("lbot_trg_hitchance")
  87. -------------------------------------------------------------------------------------------------------------------------------------------------------
  88.  
  89. -------------------------
  90. local abs_frame_time = globals.AbsoluteFrameTime;
  91. local frame_rate = 0.0;
  92. local get_abs_fps = function()
  93. frame_rate = 0.9 * frame_rate + (1.0 - 0.9) * abs_frame_time();
  94. return math_floor((1.0 / frame_rate) + 0.5);
  95. end
  96.  
  97. local function distance2D(x1, y1, x2, y2) return math_floor(math_sqrt((x2-x1)^2 + (y2-y1)^2) * 0.0833); end
  98. local function distance3D(x1, y1, z1, x2, y2, z2) return math_floor(math_sqrt((x2-x1)^2 + (y2-y1)^2 + (z2-z1)^2)* 0.0833); end
  99.  
  100. ------------------------- Grenade Timers
  101. local updatetick = 0; local grenades = {};
  102. function EventHook(Event)
  103. if Event:GetName() == "round_prestart" then grenades = {}; end
  104. if Event:GetName() == "hegrenade_detonate" or Event:GetName() == "flashbang_detonate"
  105. or Event:GetName() == "inferno_expire" or Event:GetName() == "inferno_extinguish" then updatetick = g_tickcount();
  106. for index,value in pairs(grenades) do
  107. if value[1] == Event:GetInt("entityid") then table.remove(grenades, index); end end end end
  108. function ESPHook(Builder)
  109. if better_grenades:GetValue() then
  110. if Builder:GetEntity():GetClass() == "CBaseCSGrenadeProjectile" then
  111. local found = false;
  112. for index,value in pairs(grenades) do
  113. if value[1] == Builder:GetEntity():GetIndex() then
  114. DeltaT = (g_tickcount() - grenades[index][2]) * globals.TickInterval();
  115. Builder:AddBarBottom(1 - (DeltaT/1.65)); found = true; break; end end
  116. if found == false and g_tickcount() > updatetick then
  117. local gMatrix = {Builder:GetEntity():GetIndex(), g_tickcount()};
  118. table.insert(grenades, gMatrix); end end end end
  119. function DrawingHook()
  120. draw.SetFont(ff);
  121. if better_grenades:GetValue() then
  122. for indexF,valueF in pairs(entities_FindByClass("CInferno")) do
  123. local found = false;
  124. for indexT,valueT in pairs(grenades) do
  125. if valueT[1] == valueF:GetIndex() then
  126. x, y = client_WorldToScreen(valueF:GetAbsOrigin())
  127. local mollysize = 25;
  128. if x ~= nil and y ~= nil then
  129. draw_Color(0, 0, 0, 255); draw.RoundedRectFill( x - mollysize, y, x + mollysize, y + 4 ); draw_Color(227, 227, 227, 255);
  130. local math = (((g_tickcount() - valueT[2]) * ((-1) - 1))/ ( (valueT[2] + 7 / globals.TickInterval()) - valueT[2])) + 1
  131. 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)
  132. local w,h = draw.GetTextSize( "MOLLY" )
  133. 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
  134. if found == false and g_tickcount() > updatetick then
  135. local gMatrix = {valueF:GetIndex(), g_tickcount()}; table.insert(grenades, gMatrix); end end end end
  136. c_AllowListener("inferno_expire"); c_AllowListener("inferno_extinguish"); c_AllowListener("molotov_detonate"); c_AllowListener("hegrenade_detonate"); c_AllowListener("flashbang_detonate");
  137. cb_Register("Draw", "DrawingHookG", DrawingHook); cb_Register("DrawESP", "ESPHookG", ESPHook); cb_Register("FireGameEvent", "EventHookG", EventHook);
  138.  
  139. ------------------------- Hit Log
  140. function HitGroup(i_hitgroup) if i_hitgroup == nil then return; elseif i_hitgroup == 0 then return "body"; elseif i_hitgroup == 1 then return "head"; elseif i_hitgroup == 2 then return "chest"; elseif i_hitgroup == 3 then return "stomach"; elseif i_hitgroup == 4 then return "left arm"; elseif i_hitgroup == 5 then return "right arm"; elseif i_hitgroup == 6 then return "left leg"; elseif i_hitgroup == 7 then return "right leg"; elseif i_hitgroup == 10 then return "body"; end end
  141. local draw_hitsay = {};
  142. function ChatLogger(Event)
  143. if HitLog:GetValue() then
  144. if Event:GetName() == nil then return;
  145. elseif (Event:GetName() == 'player_hurt') then
  146. local ME = LocalPlayerIndex();
  147. local uid = Event:GetInt('userid');
  148. local i_attacker = Event:GetInt('attacker');
  149. local i_dmg = Event:GetString('dmg_health');
  150. local i_health = Event:GetString('health');
  151. local i_hitgroup = Event:GetInt('hitgroup');
  152. local ind_Attacker = PlayerIndexByUserID(i_attacker);
  153. local N_Attacker = PlayerNameByUserID(i_attacker);
  154. local ind_Victim = PlayerIndexByUserID(uid);
  155. local n_Victim = PlayerNameByUserID(uid);
  156. hitPlayerName = ""; hitSpot = ""; hitDmg = ""; hitHealthRemaining = "";
  157. hitPlayerName = n_Victim; hitSpot = i_hitgroup; hitDmg = i_dmg; hitHealthRemaining = i_health;
  158. response = string.format("Hit %s in the %s for %s damage (%s health remaining)\n", hitPlayerName, HitGroup(hitSpot), hitDmg, hitHealthRemaining);
  159. if ( ind_Attacker == ME and ind_Victim ~= ME ) then print(response);
  160. table.insert(draw_hitsay, {globals.RealTime(), response}); end end end end
  161. local On_Screen_Time, pixels_between_each_line, ScreenX, ScreenY = 10, 10, 10, 10
  162. function hitlog()
  163. if HitLog:GetValue() then local things_on_screen = 0;
  164. for k, l in pairs(draw_hitsay) do
  165. if globals.RealTime() > l[1] + On_Screen_Time then table.remove(draw_hitsay, k); else
  166. draw_Color(255,255,255,255); draw.SetFont(ff); draw_TextShadow(ScreenX, things_on_screen * pixels_between_each_line + ScreenY, l[2]); things_on_screen = things_on_screen + 1; end end end end
  167. c_AllowListener('player_hurt'); cb_Register('Draw', 'drawing your hits', hitlog); cb_Register('FireGameEvent', 'ChatLogger', ChatLogger);
  168.  
  169. -------------------- Auto Buy
  170. function press() if AB_Show:GetValue() then show = true; else show = false; end if input.IsButtonPressed(gui_GetValue("msc_menutoggle")) then if pressed == true then pressed = false; else pressed = true; end end end
  171. function shows() if show == true and pressed == true then AB_W:SetActive(1); elseif show == true and pressed == false or show == false and pressed == true or show == false and pressed == false then AB_W:SetActive(0); end end
  172. SecondaryWeapon, PrimaryWeapon, armor = "", "", "";
  173. function buy(Event)
  174. if GetLocalPlayer() == nil then return end
  175. if Event:GetName() == "player_spawn" then if PlayerIndexByUserID(Event:GetInt('userid')) == LocalPlayerIndex() then buy = true; end end
  176. money = GetLocalPlayer():GetProp("m_iAccount");
  177. if AB_E:GetValue() then if buy == true then
  178. if (SecondaryWeapons:GetValue() == 0) then SecondaryWeapon = "";
  179. elseif (SecondaryWeapons:GetValue() == 1) then SecondaryWeapon = "buy elite; ";
  180. elseif (SecondaryWeapons:GetValue() == 2) then SecondaryWeapon = "buy p250; ";
  181. elseif (SecondaryWeapons:GetValue() == 3) then SecondaryWeapon = "buy tec9; ";
  182. elseif (SecondaryWeapons:GetValue() == 4) then SecondaryWeapon = "buy deagle; "; end
  183. if money > 199 or money < 1 then if Zeus:GetValue() then client_exec("buy Taser", true); end end
  184. if money > 2200 or money < 1 then PWb = true; end
  185. if PWb == true then
  186. if (PrimaryWeapons:GetValue() == 0) then PrimaryWeapon = "";
  187. elseif (PrimaryWeapons:GetValue() == 1) then PrimaryWeapon = "buy ak47; ";
  188. elseif (PrimaryWeapons:GetValue() == 2) then PrimaryWeapon = "buy ssg08; ";
  189. elseif (PrimaryWeapons:GetValue() == 3) then PrimaryWeapon = "buy sg556; ";
  190. elseif (PrimaryWeapons:GetValue() == 4) then PrimaryWeapon = "buy awp; ";
  191. elseif (PrimaryWeapons:GetValue() == 5) then PrimaryWeapon = "buy scar20; "; end
  192. if Armor:GetValue() == 0 then armor = ""
  193. elseif Armor:GetValue() == 1 then armor = "buy vest; ";
  194. elseif Armor:GetValue() == 2 then armor = "buy vest; buy vesthelm"; end
  195. if Nades:GetValue() then client_exec("buy hegrenade; buy incgrenade; buy molotov; buy smokegrenade; buy flashbang", true); end
  196. if Defuser:GetValue() then client_exec("buy defuser", true); end
  197. PWb = false; end
  198. current_buy = (PrimaryWeapon.. SecondaryWeapon.. armor); client_exec(current_buy, true); buy = false; end end end
  199. c_AllowListener("player_spawn"); cb_Register("Draw", "pressed", press); cb_Register("Draw", "shows", shows); cb_Register("FireGameEvent", "buy", buy);
  200.  
  201. -------------------- View Model Extender
  202. function press2() if ViewModelShown:GetValue() then show2 = true; else show2 = false; end if input.IsButtonPressed(gui_GetValue("msc_menutoggle")) then if pressed2 == true then pressed2 = false; else pressed2 = true; end end end
  203. function shows2() if show2 == true and pressed2 == true then VM_W:SetActive(1); elseif show2 == true and pressed2 == false or show2 == false and pressed2 == true or show2 == false and pressed2 == false then VM_W:SetActive(0); end end
  204. function VM_E() if VM_e:GetValue() then client_SetConVar("viewmodel_offset_x", xS:GetValue(), true); client_SetConVar("viewmodel_offset_y", yS:GetValue(), true); client_SetConVar("viewmodel_offset_z", zS:GetValue(), true); client_SetConVar("viewmodel_fov", vfov:GetValue(), true); end end
  205. cb_Register("Draw", "p2", press2); cb_Register("Draw", "s2", shows2); cb_Register("Draw", "vm sets", VM_E);
  206.  
  207. -------------------- Scoped Fov Fix
  208. function scopefov()
  209. local view_fov = gui_GetValue("vis_view_fov"); local view_model_fov = gui_GetValue("vis_view_model_fov");
  210. if view_fov ~= 0 then fov_value = gui_GetValue("vis_view_fov"); end if view_model_fov ~= 0 then vm_fov_value = gui_GetValue("vis_view_model_fov"); end
  211. if s_fovfix:GetValue() then
  212. if GetLocalPlayer() ~= nil then
  213. if GetLocalPlayer():GetProp("m_bIsScoped") == 1 or GetLocalPlayer():GetProp("m_bIsScoped") == 257 then gui_SetValue("vis_view_fov", 0); gui_SetValue("vis_view_model_fov", 0);
  214. elseif view_fov == 0 then gui_SetValue("vis_view_fov", fov_value); gui_SetValue("vis_view_model_fov", vm_fov_value); end end end end
  215. cb_Register("Draw", "scopefov", scopefov);
  216.  
  217. -------------------- Sniper Crosshair
  218. function ifCrosshair()
  219. if GetLocalPlayer() == nil then return; end
  220. local Weapon = GetLocalPlayer():GetPropEntity("m_hActiveWeapon");
  221. local Scoped = GetLocalPlayer():GetProp("m_bIsScoped") == 1 or GetLocalPlayer():GetProp("m_bIsScoped") == 257
  222. if Weapon == nil then return; end
  223. local cWep = Weapon:GetClass();
  224. if cWep == "CWeaponAWP" or cWep == "CWeaponSSG08" or cWep == "CWeaponSCAR20" or cWep == "CWeaponG3SG1" then drawCrosshair = true;
  225. else drawCrosshair = false; end
  226. local screenCenterX, screenY = draw_GetScreenSize(); local scX, scY = screenCenterX / 2, screenY / 2;
  227. if drawCrosshair == true and ComboCrosshair:GetValue() == 0 then client_SetConVar("weapon_debug_spread_show", 0, true)
  228. elseif drawCrosshair == true and ComboCrosshair:GetValue() == 1 then gui_SetValue('esp_crosshair', false); if Scoped then client_SetConVar("weapon_debug_spread_show", 0, true); else client_SetConVar("weapon_debug_spread_show", 3, true) end
  229. elseif drawCrosshair == true and ComboCrosshair:GetValue() == 2 then gui_SetValue('esp_crosshair', false); client_SetConVar("weapon_debug_spread_show", 3, true)
  230. elseif drawCrosshair == true and ComboCrosshair:GetValue() == 3 then if Scoped then gui_SetValue('esp_crosshair', false); else client_SetConVar("weapon_debug_spread_show", 0, true); gui_SetValue('esp_crosshair', true); end
  231. elseif drawCrosshair == false and ComboCrosshair:GetValue() == 3 then gui_SetValue('esp_crosshair', false)
  232. elseif drawCrosshair == true and ComboCrosshair:GetValue() == 4 then client_SetConVar("weapon_debug_spread_show", 0, true); gui_SetValue('esp_crosshair', false); draw.SetFont(ff);
  233. draw_Color(255,255,255,255); draw_Line(scX, scY - 8, scX, scY + 8); --[[ line down ]] draw_Line(scX - 8, scY, scX + 8, scY); --[[ line across ]] end end
  234. cb_Register("Draw", "sniper crosshairs", ifCrosshair);
  235.  
  236. -------------------- Bomb Timer & defuse timer
  237. local function mathfix() local screenX, screenY = draw_GetScreenSize() screenY3 = screenY/2; end cb_Register("Draw", "fix", mathfix);
  238. colorchange, drawBar, drawDefuse, drawPlanting, plantedTime, plantedTime2, fill, fill2, fill3, plantingName, plantingStarted, plantingTime, plantingSite = 10, false, false, false, 0, 0, 0, screenY3, 0, "", 0, 3.125, ""
  239. function bomb(event)
  240. if event:GetName() == "bomb_beginplant" then drawPlanting = true; plantingName = PlayerNameByUserID(event:GetInt("userid")); plantingStarted = g_curtime(); plantingSite = ""; end
  241. if event:GetName() == "bomb_abortplant" then drawPlanting = false; end
  242. if event:GetName() == "bomb_planted" then plantedTime = g_curtime(); drawBar = true; drawPlanting = false; end
  243. if event:GetName() == "bomb_begindefuse" then defusingName = PlayerNameByUserID(event:GetInt("userid")); plantedTime2 = g_curtime(); drawDefuse = true; end
  244. if event:GetName() == "bomb_abortdefuse" then drawDefuse = false; fill2 = screenY3; fill3 = 0; end
  245. if event:GetName() == "round_end" then drawBar = false; drawDefuse = false; drawPlanting = false; fill = 0; fill2 = screenY3; fill3 = 0; end end
  246. function drawProgress()
  247. if BombTimer:GetValue() then
  248. local screenX, screenY = draw_GetScreenSize()
  249. if drawBar then
  250. local ToExplode = entities_FindByClass("CPlantedC4")
  251. for i=1, #ToExplode do
  252. c4time = math_floor(ToExplode[i]:GetProp("m_flTimerLength"))
  253. if math_floor((plantedTime - g_curtime()) + c4time) > -1 then
  254. local godownby = (screenY / c4time) / get_abs_fps()
  255. C4time = string.format("%.1f", ((plantedTime - g_curtime()) + c4time))
  256. if math_floor((plantedTime - g_curtime()) + c4time) <= colorchange then draw_Color(255,0,0,255) else draw_Color(0,255,0,255) end
  257. draw_FilledRect(0, fill, 10, screenY); draw.SetFont(ff); draw_Color(0,0,0,100); draw_FilledRect(0, 0, 10, screenY); fill = fill + godownby; end end end
  258. if drawPlanting then
  259. local plant_percentage = (g_curtime() - plantingStarted) / plantingTime; local planttime = string.format("%.1fs", (plantingStarted - g_curtime()) + plantingTime);
  260. if plant_percentage > 0 and 1 > plant_percentage then local remove_from_Y = screenY * (1 - plant_percentage); draw.SetFont(fontz);
  261. draw_Color(255,255,255,255); draw_Text(15, 0, plantingSite.." - Planting"); draw_Color(255,255,255,255); draw_Text(15, 25, plantingName.. " - ".. planttime); draw_Color(0,255,0,255); draw_FilledRect(0, 0+remove_from_Y, 10, screenY+remove_from_Y); draw_Color(0,0,0,100); draw_FilledRect(0, 0, 10, screenY); draw.SetFont(ff); end end
  262. if drawDefuse then
  263. local ToDefuse = entities_FindByClass("CPlantedC4"); DefuseTime = math_floor(ToDefuse[1]:GetProp("m_flDefuseLength")); DefuseT = string.format("%.1fs", (plantedTime2 - g_curtime()) + DefuseTime); draw.SetFont(fontz); draw_Color(255,255,255,255); draw_Text(15, 50, defusingName.." - ".. DefuseT); draw.SetFont(ff);
  264. if DefuseTime == 10 then local godownby3 = (screenY / DefuseTime) / get_abs_fps(); draw.SetFont(ff); draw_Color(0,0,255,255); draw_FilledRect(0, fill3, 10, screenY); draw_Color(0,0,0,100); draw_FilledRect(0, 0, 10, screenY); fill3 = fill3 + godownby3;
  265. elseif DefuseTime == 5 then screenY3 = screenY/2; local godownby2 = (screenY3 / DefuseTime) / get_abs_fps(); draw.SetFont(ff); draw_Color(0,0,255,255); draw_FilledRect(0, fill2, 10, screenY); draw_Color(0,0,0,100); draw_FilledRect(0, screenY3, 10, screenY); fill2 = fill2 + godownby2; end end end end
  266.  
  267. -------------------- Bomb Damage
  268. function DrawDamage()
  269. if Bomb_Damage:GetValue() then
  270. if entities_FindByClass("CPlantedC4")[1] ~= nil then
  271. local Bomb = entities_FindByClass("CPlantedC4")[1];
  272. if C4time == nil or c4time == nil then return end
  273. if Bomb:GetProp("m_bBombTicking") and Bomb:GetProp("m_bBombDefused") == 0 and g_curtime() < Bomb:GetProp("m_flC4Blow") then
  274. local Player = GetLocalPlayer();
  275. HealthToTake = string.format("%.0f", (DamagefromDomb(Bomb, Player))); draw.SetFont(fontz)
  276. if Player:GetTeamNumber() == 3 and Player:GetProp("m_bHasDefuser") == 0 then if (plantedTime - g_curtime()) + c4time <= 10.05 then r, g, b, a = 255,13,13,255; else r, g, b, a = 255,255,255,255; end
  277. elseif Player:GetTeamNumber() == 3 and Player:GetProp("m_bHasDefuser") == 1 then if (plantedTime - g_curtime()) + c4time <= 5.05 then r, g, b, a = 255,13,13,255; else r, g, b, a = 255,255,255,255; end else r, g, b, a = 255,255,255,255 end
  278. local bombsite = Bomb:GetProp("m_nBombSite") == 0 and "A" or "B"
  279. draw_Color(r, g, b, a); draw_Text(15, 0, bombsite.. " - ".. C4time.."s")
  280. if g_curtime() < Bomb:GetProp("m_flC4Blow") then
  281. if HealthToTake + 0.95 < Player:GetHealth() and HealthToTake - 0 > 0 then
  282. draw_Color(255,255,255,255); draw_Text(15, 25, "-"..math_floor(HealthToTake+1));
  283. elseif HealthToTake + 1 >= Player:GetHealth() then draw_Color(255,0,0,255); draw_Text(15, 25, "FATAL"); end
  284. end end end end draw.SetFont(ff); end
  285. cb_Register('Draw', 'DrawDamage', DrawDamage);
  286. function DamagefromDomb(Bomb, Player)
  287. 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);
  288. local Gauss = (C4Distance - 75.68) / 789.2
  289. local flDamage = 450.7 * math.exp(-Gauss * Gauss);
  290. if Player:GetProp("m_ArmorValue") > 0 then
  291. local flArmorRatio = 0.5; local flArmorBonus = 0.5;
  292. if Player:GetProp("m_ArmorValue") > 0 then
  293. local flNew = flDamage * flArmorRatio;
  294. local flArmor = (flDamage - flNew) * flArmorBonus;
  295. if flArmor > Player:GetProp("m_ArmorValue") then
  296. flArmor = Player:GetProp("m_ArmorValue") * (1 / flArmorBonus); flNew = flDamage - flArmor; end; flDamage = flNew; end end
  297. return math.max(flDamage, 0); end
  298. c_AllowListener('bomb_beginplant'); c_AllowListener('bomb_abortplant'); c_AllowListener('bomb_planted'); c_AllowListener("bomb_defused"); c_AllowListener('round_end'); c_AllowListener('bomb_begindefuse'); c_AllowListener('bomb_abortdefuse');
  299. cb_Register('Draw', 'drawing bomb time', drawProgress); cb_Register('FireGameEvent', 'bomb thing', bomb);
  300.  
  301. -------------------- Chat Spams
  302. function press3() if CC_Show:GetValue() then show3 = true; else show3 = false; end if input.IsButtonPressed(gui_GetValue("msc_menutoggle")) then if pressed3 == true then pressed3 = false; else pressed3 = true; end end end
  303. function shows3() if show3 == true and pressed == true then CC_W:SetActive(1); elseif show3 == true and pressed3 == false or show3 == false and pressed3 == true or show3 == false and pressed3 == false then CC_W:SetActive(0); end end
  304. local c_spammedlast = g_realtime() + CC_Spam_spd:GetValue()/100
  305. function custom_chat()
  306. SPAM_C1 = client_GetConVar("r_eyegloss"); SPAM_C2 = client_GetConVar("r_eyemove"); SPAM_C3 = client_GetConVar("r_eyesize");
  307. if CC_Spams:GetValue() == 0 then return
  308. elseif CC_Spams:GetValue() == 1 and g_realtime() >= c_spammedlast and SPAM_C1 ~= "" and SPAM_C1 ~= "0" then client.ChatSay(SPAM_C1); c_spammedlast = g_realtime() + CC_Spam_spd:GetValue()/100;
  309. elseif CC_Spams:GetValue() == 2 and g_realtime() >= c_spammedlast and SPAM_C2 ~= "" and SPAM_C2 ~= "0" then client.ChatSay(SPAM_C2); c_spammedlast = g_realtime() + CC_Spam_spd:GetValue()/100;
  310. elseif CC_Spams:GetValue() == 3 and g_realtime() >= c_spammedlast and SPAM_C3 ~= "" and SPAM_C3 ~= "0" then client.ChatSay(SPAM_C3); c_spammedlast = g_realtime() + CC_Spam_spd:GetValue()/100;
  311. elseif CC_Spams:GetValue() == 4 and g_realtime() >= c_spammedlast then client.ChatSay("\n ?? ??? ??? ??? ??? ??? ??? ??? ?? \n"); c_spammedlast = g_realtime() + CC_Spam_spd:GetValue()/100; end end
  312. cb_Register("Draw", "p3", press3); cb_Register("Draw", "s3", shows3); cb_Register("Draw", "custom spam", custom_chat);
  313.  
  314. -------------------- Aspect Ratio Changer
  315. local function gcd(m, n) while m ~= 0 do m, n = math.fmod(n, m), m; end return n; end
  316. local function set_aspect_ratio(aspect_ratio_multiplier) local screen_width, screen_height = draw_GetScreenSize(); local aspectratio_value = (screen_width*aspect_ratio_multiplier)/screen_height; if aspect_ratio_multiplier == 1 or not aspect_ratio_check:GetValue() then aspectratio_value = 0; end client_SetConVar( "r_aspectratio", tonumber(aspectratio_value), true); end
  317. local function on_aspect_ratio_changed() local screen_width, screen_height = draw_GetScreenSize(); for i=1, 200 do local i2=i*0.01; i2 = 2 - i2; local divisor = gcd(screen_width*i2, screen_height); if screen_width*i2/divisor < 100 or i2 == 1 then aspect_ratio_table[i] = screen_width*i2/divisor .. ":" .. screen_height/divisor; end end local aspect_ratio = aspect_ratio_reference:GetValue()*0.01; aspect_ratio = 2 - aspect_ratio; set_aspect_ratio(aspect_ratio); end
  318. cb_Register('Draw', "aspect ratio" ,on_aspect_ratio_changed);
  319.  
  320. -------------------- Esp on Dead
  321. function ESP_Always_OnDead()
  322. if not espdead:GetValue() then return end
  323. if GetLocalPlayer() == nil then return end
  324. if GetLocalPlayer():GetHealth() <= 0 then
  325. gui_SetValue("esp_visibility_enemy", 0);
  326. gui_SetValue("esp_enemy_box", 3);
  327. gui_SetValue("esp_enemy_weapon", 1);
  328. gui_SetValue("esp_enemy_health", 2); gui_SetValue("esp_enemy_glow", 2);
  329. gui_SetValue("esp_enemy_skeleton", true); gui_SetValue("esp_enemy_name", true);
  330. else
  331. gui_SetValue("esp_visibility_enemy", 1);
  332. gui_SetValue("esp_enemy_box", 0); gui_SetValue("esp_enemy_weapon", 0); gui_SetValue("esp_enemy_health", 0); gui_SetValue("esp_enemy_glow", 0);
  333. gui_SetValue("esp_enemy_skeleton", false); gui_SetValue("esp_enemy_name", false); end end
  334. cb_Register("Draw", "espalwaysondead", ESP_Always_OnDead);
  335.  
  336. -------------------- Engine Radar
  337. function engineradar()
  338. if ERadar:GetValue() then ERval = 1; else ERval = 0; end
  339. for o, radar in pairs(entities_FindByClass("CCSPlayer")) do radar:SetProp("m_bSpotted", ERval); end end
  340. cb_Register("Draw", "engine radar", engineradar);
  341.  
  342. -------------------- Enemy & Team Tracers
  343. function Tracers()
  344. if GetLocalPlayer() == nil then return end
  345. local sX, sY = draw_GetScreenSize();
  346. local lpTeamNum = GetLocalPlayer():GetProp("m_iTeamNum")
  347. local players = entities_FindByClass("CCSPlayer");
  348. for i = 1, #players do
  349. local player = players[i];
  350. local pX, pY, pZ = client.WorldToScreen(player:GetProp("m_vecOrigin"));
  351. if tracersEnemy:GetValue() then
  352. if player:GetProp("m_iTeamNum") ~= lpTeamNum then
  353. if player:IsAlive() then
  354. if pX ~= nil and pY ~= nil then
  355. draw_Color(255, 0, 0, 255); draw_Line(sX/2, sY, pX, pY); end end end end
  356. if tracersTeam:GetValue() then
  357. if player:GetProp("m_iTeamNum") == lpTeamNum then
  358. if player:IsAlive() then
  359. if pX ~= nil and pY ~= nil then
  360. draw_Color(0, 0, 255, 255); draw_Line(sX/2, sY, pX, pY); end end end end
  361. end end
  362. cb_Register("Draw", "I'm already tracer", Tracers);
  363.  
  364. -------------------- Enemy & Team & Other Distance + visible help
  365. function Distance(builder)
  366. local ent = builder:GetEntity(); local ppX, ppY, ppZ = ent:GetProp("m_vecOrigin"); local lX, lY, lZ = GetLocalPlayer():GetProp("m_vecOrigin"); local dist = distance2D(ppX, ppY, lX, lY);
  367. if enemy_distance:GetValue() and ent:IsAlive() and ent:IsPlayer() and ent:GetTeamNumber() ~= GetLocalPlayer():GetTeamNumber() then builder:Color(255, 255, 255, 255); builder:AddTextBottom(dist.. "ft"); end
  368. if team_distance:GetValue() and ent:IsAlive() and ent:IsPlayer() and ent:GetTeamNumber() == GetLocalPlayer():GetTeamNumber() then builder:Color(255, 255, 255, 255); builder:AddTextBottom(dist.. "ft"); end
  369. if other_distance:GetValue() and not ent:IsPlayer() then builder:Color(255, 255, 255, 255); builder:AddTextBottom(dist.. "ft"); end
  370. if enemy_visiblehelp:GetValue() and ent:IsAlive() and ent:IsPlayer() and ent:GetTeamNumber() ~= GetLocalPlayer():GetTeamNumber() then builder:Color(255, 255, 255, 255); builder:AddTextTop("VISIBLE"); end end
  371. cb_Register("DrawESP", "distance", Distance)
  372.  
  373. -------------------- full bright
  374. function full_bright() if fBright:GetValue() then client_SetConVar("mat_fullbright", 1, true); else client_SetConVar("mat_fullbright", 0, true); end end
  375. cb_Register('Draw', "Full brightness" ,full_bright);
  376.  
  377. -------------------- Disable Post Processing
  378. function Dis_PP()
  379. if DPP:GetValue() then client_SetConVar("mat_postprocess_enable", 0, true); else client_SetConVar("mat_postprocess_enable", 1, true); end end
  380. cb_Register('Draw', "Disable Post Processing" ,Dis_PP);
  381.  
  382. -------------------- Knife on Left Hand
  383. function on_knife_righthand()
  384. if not K_O_L_H:GetValue() then return end
  385. if GetLocalPlayer() == nil then return end
  386. if GetLocalPlayer():GetHealth() == nil or GetLocalPlayer():GetHealth() <= 0 then client_exec("cl_righthand 1", true); return; end
  387. local wep = GetLocalPlayer():GetPropEntity("m_hActiveWeapon");
  388. if wep == nil then return; end local cwep = wep:GetClass();
  389. if cwep == "CKnife" then client_exec("cl_righthand 0", true); else client_exec("cl_righthand 1", true); end end
  390. cb_Register("Draw", "knife", on_knife_righthand);
  391.  
  392. -------------------- 3rd person if you are dead
  393. function ifyoudead() if thirdpersonondead:GetValue() then gui_SetValue("vis_thirdperson_mode", 1); if GetLocalPlayer():GetHealth() <= 0 then gui_SetValue("vis_thirdperson_dist", 150); else gui_SetValue("vis_thirdperson_dist", 0); end return; end end
  394. cb_Register("Draw", "3rd", ifyoudead);
  395.  
  396. -------------------- Zeusbot
  397. function zeuslegit()
  398. if zeusbot:GetValue() then
  399. if GetLocalPlayer() ~= nil then local Weapon = GetLocalPlayer():GetPropEntity("m_hActiveWeapon")
  400. if Weapon ~= nil then local CWeapon = Weapon:GetClass()
  401. if CWeapon == "CWeaponTaser" then gui_SetValue("lbot_trg_enable", 1); gui_SetValue("lbot_trg_mode", 0); gui_SetValue("lbot_trg_autofire", 1); gui_SetValue("lbot_trg_hitchance", 100)
  402. else gui_SetValue("lbot_trg_enable", 0); gui_SetValue("lbot_trg_mode", trigm); gui_SetValue("lbot_trg_autofire", trigaf); gui_SetValue("lbot_trg_hitchance", trighc); end end end end end
  403. cb_Register("Draw", "zeus", zeuslegit)
Add Comment
Please, Sign In to add comment