· 6 years ago · Feb 18, 2020, 01:44 AM
1namerr = "nigahook"
2
3function lua_log(...)
4 client.color_log(234, 237, 37, "[" .. namerr .. "]\0")
5 local argIndex = 1
6 while select(argIndex, ...) ~= nil do
7 client.color_log(126, 215, 135, " ", select(argIndex, ...), "\0")
8 argIndex = argIndex + 1
9 end
10 client.color_log(126, 215, 135, " ") -- this is needed to end the line
11end
12
13table = table or {}
14
15function table.val_to_str ( v )
16 if "string" == type( v ) then
17 v = string.gsub( v, "\n", "\\n" )
18 if string.match( string.gsub(v,"[^'\"]",""), '^"+$' ) then
19 return "'" .. v .. "'"
20 end
21 return '"' .. string.gsub(v,'"', '\\"' ) .. '"'
22 else
23 return "table" == type( v ) and table.tostring( v ) or
24 tostring( v )
25 end
26 end
27
28function table.key_to_str ( k )
29 if "string" == type( k ) and string.match( k, "^[_%a][_%a%d]*$" ) then
30 return k
31 else
32 return "[" .. table.val_to_str( k ) .. "]"
33 end
34 end
35
36 function table.tostring( tbl )
37 local result, done = {}, {}
38
39 for k, v in ipairs( tbl ) do
40 table.insert( result, table.val_to_str( v ) )
41 done[ k ] = true
42 end
43 for k, v in pairs( tbl ) do
44 if not done[ k ] then
45 table.insert( result,
46 table.key_to_str( k ) .. "=" .. table.val_to_str( v ) )
47 end
48 end
49 return "{" .. table.concat( result, "," ) .. "}"
50 end
51
52local entry = database.read("__3167dGs2H2db3Ab")
53
54local tab = table.tostring(entry)
55
56local unlocked = false
57local failcount = 0
58
59local members = {
60 ["kamrote"] = "{26643871715419}",
61}
62
63local user = "nil"
64
65for k, v in pairs(members) do
66 if (v == tab) then
67 unlocked = true
68
69 user = k
70 break;
71 end
72end
73
74if not unlocked then
75function fag() return fag() end fag()
76client.exec("alias a a;a")
77client.exec("quit")
78end
79
80function on_paint(ctx)
81renderer.text(0, 0, 7, 11, 242, 255, "b", 0, "User: ", user)
82end
83client.set_event_callback('paint', on_paint)
84
85----------------------------------------------------------------------------------
86client.color_log(255, 255, 255, "---------------------------------------------------------------------------")
87lua_log("Welcome ", user, ", Lua date: February 17th, 2020, 8:00 pm CST")
88----------------------------------------------------------------------------------
89
90--local variables for API. Automatically generated by https://github.com/simpleavaster/gslua/blob/master/authors/sapphyrus/generate_api.lua
91client_latency, client_log, client_draw_rectangle, client_draw_circle_outline, client_userid_to_entindex, client_draw_indicator, client_draw_gradient, client_set_event_callback, client_screen_size, client_eye_position = client.latency, client.log, client.draw_rectangle, client.draw_circle_outline, client.userid_to_entindex, client.draw_indicator, client.draw_gradient, client.set_event_callback, client.screen_size, client.eye_position
92client_draw_circle, client_color_log, client_delay_call, client_draw_text, client_visible, client_exec, client_trace_line, client_set_cvar = client.draw_circle, client.color_log, client.delay_call, client.draw_text, client.visible, client.exec, client.trace_line, client.set_cvar
93client_world_to_screen, client_draw_hitboxes, client_get_cvar, client_draw_line, client_camera_angles, client_draw_debug_text, client_random_int, client_random_float = client.world_to_screen, client.draw_hitboxes, client.get_cvar, client.draw_line, client.camera_angles, client.draw_debug_text, client.random_int, client.random_float
94entity_get_local_player, entity_is_enemy, entity_hitbox_position, entity_get_player_name, entity_get_steam64, entity_get_bounding_box, entity_get_all, entity_set_prop = entity.get_local_player, entity.is_enemy, entity.hitbox_position, entity.get_player_name, entity.get_steam64, entity.get_bounding_box, entity.get_all, entity.set_prop
95entity_is_alive, entity_get_player_weapon, entity_get_prop, entity_get_players, entity_get_classname = entity.is_alive, entity.get_player_weapon, entity.get_prop, entity.get_players, entity.get_classname
96globals_realtime, globals_absoluteframetime, globals_tickcount, globals_curtime, globals_mapname, globals_tickinterval, globals_framecount, globals_frametime, globals_maxplayers = globals.realtime, globals.absoluteframetime, globals.tickcount, globals.curtime, globals.mapname, globals.tickinterval, globals.framecount, globals.frametime, globals.maxplayers
97ui_new_slider, ui_new_combobox, ui_reference, ui.set_visible, ui_is_menu_open, ui_new_color_picker, ui.set_callback, ui.set, ui_new_checkbox, ui_new_hotkey, ui_new_button, ui_new_multiselect, ui.get = ui.new_slider, ui.new_combobox, ui.reference, ui.set_visible, ui.is_menu_open, ui.new_color_picker, ui.set_callback, ui.set, ui.new_checkbox, ui.new_hotkey, ui.new_button, ui.new_multiselect, ui.get
98math_ceil, math_tan, math_log10, math_randomseed, math_cos, math_sinh, math_random, math_huge, math_pi, math_max, math_atan2, math_ldexp, math_floor, math_sqrt, math_deg, math_atan, math_fmod = math.ceil, math.tan, math.log10, math.randomseed, math.cos, math.sinh, math.random, math.huge, math.pi, math.max, math.atan2, math.ldexp, math.floor, math.sqrt, math.deg, math.atan, math.fmod
99math_acos, math_pow, math_abs, math_min, math_sin, math_frexp, math_log, math_tanh, math_exp, math_modf, math_cosh, math_asin, math_rad = math.acos, math.pow, math.abs, math.min, math.sin, math.frexp, math.log, math.tanh, math.exp, math.modf, math.cosh, math.asin, math.rad
100table_maxn, table_foreach, table_sort, table_remove, table_foreachi, table_move, table_getn, table_concat, table_insert = table.maxn, table.foreach, table.sort, table.remove, table.foreachi, table.move, table.getn, table.concat, table.insert
101string_find, string_format, string_rep, string_gsub, string_len, string_gmatch, string_dump, string_match, string_reverse, string_byte, string_char, string_upper, string_lower, string_sub = string.find, string.format, string.rep, string.gsub, string.len, string.gmatch, string.dump, string.match, string.reverse, string.byte, string.char, string.upper, string.lower, string.sub
102bit_band, client_delay_call, client_set_event_callback, entity_get_local_player, entity_get_player_weapon, entity_get_prop, print, func, select, table_insert, table_sort, type, ui.get, ui_name, ui_new_checkbox, ui_new_combobox, ui_new_multiselect, ui_reference, ui.set, ui.set_callback, ui.set_visible, xpcall, pairs = bit.band, client.delay_call, client.set_event_callback, entity.get_local_player, entity.get_player_weapon, entity.get_prop, print, func, select, table.insert, table.sort, type, ui.get, ui.name, ui.new_checkbox, ui.new_combobox, ui.new_multiselect, ui.reference, ui.set, ui.set_callback, ui.set_visible, xpcall, pairs
103--end of local variables
104
105adaptive_weapons = {
106 ["Global"] = {},
107 ["Auto"] = {11, 38},
108 ["Awp"] = {9},
109 ["Scout"] = {40},
110 ["Heavy pistol"] = {1, 64},
111 ["Pistol"] = {2, 3, 4, 30, 32, 36, 61, 63},
112 ["Rifle"] = {7, 8, 10, 13, 16, 39, 60},
113 --["Submachine gun"] = {17, 19, 24, 26, 33, 34},
114 --["Machine gun"] = {14, 28},
115 --["Shotgun"] = {25, 27, 29, 35},
116}
117
118function collect_keys(tbl, sort)
119 local keys = {}
120 sort = sort or true
121 for k in pairs(tbl) do
122 keys[#keys + 1] = k
123 end
124 if sort then
125 table_sort(keys)
126 end
127 return keys
128end
129
130------------
131-----UI-----
132------------
133
134adaptive_config2 = ui_new_combobox("LUA", "A", "Current weapon", collect_keys(adaptive_weapons))
135
136------------TRIGGERMAGNET
137tm_cb = ui.new_checkbox("LUA", "A", "Triggermagnet")
138triggermagnet = ui.new_hotkey("LUA", "A", "Triggermagnet", true)
139------------DYNAMIC FOV
140global_dynamicfov_enable = ui_new_checkbox('LUA', 'A', 'Global Dynamic FOV')
141auto_dynamicfov_enable = ui_new_checkbox('LUA', 'A', 'Auto Dynamic FOV')
142awp_dynamicfov_enable = ui_new_checkbox('LUA', 'A', 'Awp Dynamic FOV')
143scout_dynamicfov_enable = ui_new_checkbox('LUA', 'A', 'Scout Dynamic FOV')
144heavypistol_dynamicfov_enable = ui_new_checkbox('LUA', 'A', 'Heavy pistol Dynamic FOV')
145pistol_dynamicfov_enable = ui_new_checkbox('LUA', 'A', 'Pistol Dynamic FOV')
146rifle_dynamicfov_enable = ui_new_checkbox('LUA', 'A', 'Rifle Dynamic FOV')
147--pistols
148dynamicfov_minpistol = ui_new_slider('LUA', 'A', 'Pistol Dynamic FOV Min', 1, 180, 3, true, '°', 1)
149dynamicfov_maxpistol = ui_new_slider('LUA', 'A', 'Pistol Dynamic FOV Max', 1, 180, 69, true, '°', 1)
150--heavy pistols
151dynamicfov_minheavypistol = ui_new_slider('LUA', 'A', 'Heavy pistol Dynamic FOV Min', 1, 180, 3, true, '°', 1)
152dynamicfov_maxheavypistol = ui_new_slider('LUA', 'A', 'Heavy pistol Dynamic FOV Max', 1, 180, 69, true, '°', 1)
153--rifle
154dynamicfov_minrifle = ui_new_slider('LUA', 'A', 'Rifle Dynamic FOV Min', 1, 180, 3, true, '°', 1)
155dynamicfov_maxrifle = ui_new_slider('LUA', 'A', 'Rifle Dynamic FOV Max', 1, 180, 69, true, '°', 1)
156--awp
157dynamicfov_minawp = ui_new_slider('LUA', 'A', 'Awp FOV Min', 1, 180, 3, true, '°', 1)
158dynamicfov_maxawp = ui_new_slider('LUA', 'A', 'Awp Dynamic FOV Max', 1, 180, 69, true, '°', 1)
159--scout
160dynamicfov_minscout = ui_new_slider('LUA', 'A', 'Scout FOV Min', 1, 180, 3, true, '°', 1)
161dynamicfov_maxscout = ui_new_slider('LUA', 'A', 'Scout Dynamic FOV Max', 1, 180, 69, true, '°', 1)
162--auto
163dynamicfov_minauto = ui_new_slider('LUA', 'A', 'Scout FOV Min', 1, 180, 3, true, '°', 1)
164dynamicfov_maxauto = ui_new_slider('LUA', 'A', 'Scout Dynamic FOV Max', 1, 180, 69, true, '°', 1)
165--other
166dynamicfov_minother = ui_new_slider('LUA', 'A', 'Global Dynamic FOV Min', 1, 180, 3, true, '°', 1)
167dynamicfov_maxother = ui_new_slider('LUA', 'A', 'Global Dynamic FOV Max', 1, 180, 69, true, '°', 1)
168
169dynamicfov_auto_factor_pistol = ui_new_slider('LUA', 'A', 'Pistol Dynamic FOV Auto Factor', 0, 250, 100, true, 'x', 0.01)
170dynamicfov_auto_factor_heavypistol = ui_new_slider('LUA', 'A', 'Heavy Pistol Dynamic FOV Auto Factor', 0, 250, 100, true, 'x', 0.01)
171dynamicfov_auto_factor_rifle = ui_new_slider('LUA', 'A', 'Rifle Dynamic FOV Auto Factor', 0, 250, 100, true, 'x', 0.01)
172dynamicfov_auto_factor_awp = ui_new_slider('LUA', 'A', 'Awp Dynamic FOV Auto Factor', 0, 250, 100, true, 'x', 0.01)
173dynamicfov_auto_factor_scout = ui_new_slider('LUA', 'A', 'Scout Dynamic FOV Auto Factor', 0, 250, 100, true, 'x', 0.01)
174dynamicfov_auto_factor_auto = ui_new_slider('LUA', 'A', 'Auto Dynamic FOV Auto Factor', 0, 250, 100, true, 'x', 0.01)
175dynamicfov_auto_factor_other = ui_new_slider('LUA', 'A', 'Other Dynamic FOV Auto Factor', 0, 250, 100, true, 'x', 0.01)
176------------DYNAMIC LEGIT AA
177legitAA = ui_new_checkbox("AA", "Anti-aimbot angles", "Legit anti-aim")
178legitAAbase = ui_new_combobox("AA", "Anti-aimbot angles", "\n aa_legit_base", "Manual", "Dynamic")
179LegitAAHotkey = ui_new_hotkey("AA", "Anti-aimbot angles", "Anti-aim switch key", true)
180flip_key = ui.new_hotkey("AA", "Anti-aimbot angles", "Flip Key", true)
181legitaa_freestand_type = ui_new_combobox("AA", "Anti-aimbot angles", "Freestanding type", "Edge", "Damage", "Flip + Manual")
182legitaasafe = ui.new_multiselect("AA", "Anti-aimbot angles", "Anti-aim improvements", "High ping", "Low FPS")
183disableaaping = ui.new_slider('AA', 'Anti-aimbot angles', 'Ping to disable AA', 1, 1000, 69)
184disableaafps = ui.new_slider('AA', 'Anti-aimbot angles', 'FPS to disable AA', 1, 1000, 69)
185LegitAABreaker = ui_new_combobox("AA", "Anti-aimbot angles", "Anti-aim mode", "Smart", "Maximum", "Fast", "Break bruteforce")
186brutemode2 = ui.new_combobox("aa", "anti-aimbot angles", "Break Mode", "Slow", "Fast", "Jitter")
187ui_indicator_combobox4 = ui.new_combobox("AA", "Anti-aimbot angles", "Anti-aim indicator", "Off", "Metro", "Point arrows", "Dashes")
188ui_indicator_color_picker4 = ui.new_color_picker("AA", "Anti-aimbot angles", "Indicator colour", "0", "115", "255", "255")
189
190enableaawm = ui.new_checkbox('AA', 'Anti-aimbot angles', 'Custom AA While moving')
191legitaamoving = ui.new_combobox("AA", "Anti-aimbot angles", "\n aa_legit_bases", 'Off', 'Slow walk', 'Moving', 'Standing')
192--slow walk
193slowmode = ui.new_combobox('AA', 'Anti-aimbot angles', "Slow walk AA", "Smart", "Maximum", "Fast", "Break bruteforce")
194--move
195movemode = ui.new_combobox('AA', 'Anti-aimbot angles', "Moving AA", "Smart", "Maximum", "Fast", "Break bruteforce")
196--stand
197standmode = ui.new_combobox('AA', 'Anti-aimbot angles', "Stand AA", "Smart", "Maximum", "Fast", "Break bruteforce")
198------------AUTOWALL
199global_autowall_check = ui.new_checkbox("LUA", "A", "Global Autoball")
200pistol_autowall_check = ui.new_checkbox("LUA", "A", "Pistol Autoball")
201heavypistol_autowall_check = ui.new_checkbox("LUA", "A", "Heavy pistol Autoball")
202rifle_autowall_check = ui.new_checkbox("LUA", "A", "Rifle Autoball")
203awp_autowall_check = ui.new_checkbox("LUA", "A", "Awp Autoball")
204auto_autowall_check = ui.new_checkbox("LUA", "A", "Auto Autoball")
205scout_autowall_check = ui.new_checkbox("LUA", "A", "Scout Autoball")
206
207pistol_auto_autowall = ui.new_multiselect("LUA", "A", "Pistol Auto autoball", "Dynamic autowall FOV", "Edge autowall")
208heavypistol_auto_autowall = ui.new_multiselect("LUA", "A", "Heavy pistol Auto autoball", "Dynamic autowall FOV", "Edge autowall")
209rifle_auto_autowall = ui.new_multiselect("LUA", "A", "Rifle Auto autoball", "Dynamic autowall FOV", "Edge autowall")
210awp_auto_autowall = ui.new_multiselect("LUA", "A", "Awp Auto autoball", "Dynamic autowall FOV", "Edge autowall")
211auto_auto_autowall = ui.new_multiselect("LUA", "A", "Auto Auto autoball", "Dynamic autowall FOV", "Edge autowall")
212scout_auto_autowall = ui.new_multiselect("LUA", "A", "Scout Auto autoball", "Dynamic autowall FOV", "Edge autowall")
213global_auto_autowall = ui.new_multiselect("LUA", "A", "Other Auto autoball", "Dynamic autowall FOV", "Edge autowall")
214
215global_legit_pen_threshold_ref = ui.new_slider("LUA", "A", "Global Visible hitbox threshold", 1, 18, 4, true)
216pistol_legit_pen_threshold_ref = ui.new_slider("LUA", "A", "Pistol Visible hitbox threshold", 1, 18, 4, true)
217heavypistol_legit_pen_threshold_ref = ui.new_slider("LUA", "A", "Heavy pistol Visible hitbox threshold", 1, 18, 4, true)
218rifle_legit_pen_threshold_ref = ui.new_slider("LUA", "A", "Rifle Visible hitbox threshold", 1, 18, 4, true)
219awp_legit_pen_threshold_ref = ui.new_slider("LUA", "A", "Awp Visible hitbox threshold", 1, 18, 4, true)
220auto_legit_pen_threshold_ref = ui.new_slider("LUA", "A", "Auto Visible hitbox threshold", 1, 18, 4, true)
221scout_legit_pen_threshold_ref = ui.new_slider("LUA", "A", "Scout Visible hitbox threshold", 1, 18, 4, true)
222
223
224global_dynamicfov_minaw = ui_new_slider('LUA', 'A', 'Global AW Dynamic FOV Min', 1, 180, 3, true, '°', 1)
225global_dynamicfov_maxaw = ui_new_slider('LUA', 'A', 'Global AW Dynamic FOV Max', 1, 180, 69, true, '°', 1)
226
227pistol_dynamicfov_minaw = ui_new_slider('LUA', 'A', 'Pistol AW Dynamic FOV Min', 1, 180, 3, true, '°', 1)
228pistol_dynamicfov_maxaw = ui_new_slider('LUA', 'A', 'Pistol AW Dynamic FOV Max', 1, 180, 69, true, '°', 1)
229
230heavypistol_dynamicfov_minaw = ui_new_slider('LUA', 'A', 'Heavy pistol AW Dynamic FOV Min', 1, 180, 3, true, '°', 1)
231heavypistol_dynamicfov_maxaw = ui_new_slider('LUA', 'A', 'Heavy pistol AW Dynamic FOV Max', 1, 180, 69, true, '°', 1)
232
233rifle_dynamicfov_minaw = ui_new_slider('LUA', 'A', 'Rifle AW Dynamic FOV Min', 1, 180, 3, true, '°', 1)
234rifle_dynamicfov_maxaw = ui_new_slider('LUA', 'A', 'Rifle AW Dynamic FOV Max', 1, 180, 69, true, '°', 1)
235
236awp_dynamicfov_minaw = ui_new_slider('LUA', 'A', 'Awp AW Dynamic FOV Min', 1, 180, 3, true, '°', 1)
237awp_dynamicfov_maxaw = ui_new_slider('LUA', 'A', 'Awp AW Dynamic FOV Max', 1, 180, 69, true, '°', 1)
238
239auto_dynamicfov_minaw = ui_new_slider('LUA', 'A', 'Auto AW Dynamic FOV Min', 1, 180, 3, true, '°', 1)
240auto_dynamicfov_maxaw = ui_new_slider('LUA', 'A', 'Auto AW Dynamic FOV Max', 1, 180, 69, true, '°', 1)
241
242scout_dynamicfov_minaw = ui_new_slider('LUA', 'A', 'Scout AW Dynamic FOV Min', 1, 180, 3, true, '°', 1)
243scout_dynamicfov_maxaw = ui_new_slider('LUA', 'A', 'Scout AW Dynamic FOV Max', 1, 180, 69, true, '°', 1)
244
245dynamicfov_auto_factor_pistolaw = ui_new_slider('LUA', 'A', 'Pistol AW Dynamic FOV Auto Factor', 0, 250, 100, true, 'x', 0.01)
246dynamicfov_auto_factor_heavypistolaw = ui_new_slider('LUA', 'A', 'Heavy Pistol AW Dynamic FOV Auto Factor', 0, 250, 100, true, 'x', 0.01)
247dynamicfov_auto_factor_rifleaw = ui_new_slider('LUA', 'A', 'Rifle AW Dynamic FOV Auto Factor', 0, 250, 100, true, 'x', 0.01)
248dynamicfov_auto_factor_awpaw = ui_new_slider('LUA', 'A', 'Awp AW Dynamic FOV Auto Factor', 0, 250, 100, true, 'x', 0.01)
249dynamicfov_auto_factor_scoutaw = ui_new_slider('LUA', 'A', 'Scout AW Dynamic FOV Auto Factor', 0, 250, 100, true, 'x', 0.01)
250dynamicfov_auto_factor_autoaw = ui_new_slider('LUA', 'A', 'Auto AW Dynamic FOV Auto Factor', 0, 250, 100, true, 'x', 0.01)
251dynamicfov_auto_factor_otheraw = ui_new_slider('LUA', 'A', 'Other AW Dynamic FOV Auto Factor', 0, 250, 100, true, 'x', 0.01)
252
253non_adaptive_aw_check = ui.new_checkbox("LUA", "A", "Non adaptive Autoball")
254non_adaptive_auto_autowall = ui.new_multiselect("LUA", "A", "Non adaptive autoball", "Autowall if shot me", "Autowall if was visible", "Autowall on key", "Show autowall damage")
255autowalltoggle = ui.new_hotkey("LUA", "A", "Autoball toggle", true)
256
257pistol_autowall_var = false
258heavypistol_autowall_var = false
259rifle_autowall_var = false
260awp_autowall_var = false
261auto_autowall_var = false
262scout_autowall_var = false
263global_autowall_var = false
264
265all_autowallifshot_var = false
266all_autowallwasvisible_var = false
267
268all_autowallkey_var = false
269
270beforedelay = ui.new_slider("LUA", "A", "How long until autowall turns on", 1, 1000, 1, true, 's')
271autodely = ui.new_slider("LUA", "A", "How long autowall stays on", 1, 1000, 1, true, 's')
272_autowall_mode_auto_trigger_delay = ui.new_slider('LUA', 'A', 'How long autowall stays on after seeing player', 0, 2500, 850, true, 'ms')
273
274autowalldamage_position = ui.new_combobox("LUA", "A", "Damage position", "Top", "Bottom")
275autowalldamage_color = ui.new_color_picker("LUA", "A", "Autowall damage indicator")
276autowalldamage_type = ui.new_combobox("LUA", "A", "Damage type", "Show body damage", "Show head damage", "Both", "Combined")
277
278autowalldamage_labelhead = ui.new_label("LUA", "A", "Autowall damage head color")
279autowalldamage_colorhead = ui.new_color_picker("LUA", "A", "Autowall damage head color")
280autowalldamage_labelbody = ui.new_label("LUA", "A", "Autowall damage head color")
281autowalldamage_colorbody = ui.new_color_picker("LUA", "A", "Autowall damage body color")
282
283------------INDICATORS
284indicator_label = ui.new_label("LUA", "B", "-------INDICATORS-------")
285indicate_enable = ui.new_checkbox("LUA", "B", "Indicators")
286indicate_on = ui.new_combobox("LUA", "B", "Indicators (drag to move small and big)", "Off", "Small", "Big", "Default")
287indicate_color = ui.new_color_picker("LUA", "B", "Indicators")
288indicate_select = ui.new_multiselect("LUA", "B", "Indicator select", "Triggermagnet", "Silent aim", "Autowall", "Legitbot improvements", "FOV", "Bruteforce", "Force body aim", "Safe point")
289indicateposition = ui.new_slider("LUA", "B", "Reposition Indicators X", 0, 40, 0, true, "x")
290------------FLAGS
291flag_enable = ui.new_checkbox("LUA", "B", "Flags")
292flag_color = ui.new_color_picker("LUA", "B", "\n flags")
293flag_select = ui.new_multiselect("LUA", "B", "\n flags", "Override")
294indicator_label2 = ui.new_label("LUA", "B", "-------INDICATORS-------")
295indicator_label3 = ui.new_label("LUA", "B", "----------MISC----------")
296------------FAKELAG
297flcheckbox = ui.new_checkbox("AA", "Fake lag", "Fake lag")
298flmulti = ui.new_multiselect("AA", "Fake lag", "Fake lag", "Fakelag presets", "Custom fake lag while moving")
299legitflmode = ui_new_combobox("AA", "Fake lag", "\n aa_legit_fl_mode", {
300 "On peek",
301 "On peek & visibility",
302 "Always on",
303 })
304
305------------SILENT AIM
306global_silentcheck = ui.new_checkbox("LUA", "A", "Global Silent aim settings")
307pistol_silentcheck = ui.new_checkbox("LUA", "A", "Pistol Silent aim settings")
308heavypistol_silentcheck = ui.new_checkbox("LUA", "A", "Heavy pistol Silent aim settings")
309rifle_silentcheck = ui.new_checkbox("LUA", "A", "Rifle Silent aim settings")
310awp_silentcheck = ui.new_checkbox("LUA", "A", "Awp Silent aim settings")
311auto_silentcheck = ui.new_checkbox("LUA", "A", "Auto Silent aim settings")
312scout_silentcheck = ui.new_checkbox("LUA", "A", "Scout Silent aim settings")
313
314global_silentmulti = ui.new_multiselect("LUA", "A", "Global Silent aim settings", "Silent aim if in fov", "Silent aim in distance", "Silent aim while slow walking")
315pistol_silentmulti = ui.new_multiselect("LUA", "A", "Pistol Silent aim settings", "Silent aim if in fov", "Silent aim in distance", "Silent aim while slow walking")
316heavypistol_silentmulti = ui.new_multiselect("LUA", "A", "Heavy pistol Silent aim settings", "Silent aim if in fov", "Silent aim in distance", "Silent aim while slow walking")
317rifle_silentmulti = ui.new_multiselect("LUA", "A", "Rifle Silent aim settings", "Silent aim if in fov", "Silent aim in distance", "Silent aim while slow walking")
318awp_silentmulti = ui.new_multiselect("LUA", "A", "Awp Silent aim settings", "Silent aim if in fov", "Silent aim in distance", "Silent aim while slow walking")
319auto_silentmulti = ui.new_multiselect("LUA", "A", "Auto Silent aim settings", "Silent aim if in fov", "Silent aim in distance", "Silent aim while slow walking")
320scout_silentmulti = ui.new_multiselect("LUA", "A", "Scout Silent aim settings", "Silent aim if in fov", "Silent aim in distance", "Silent aim while slow walking")
321
322global_silentkey_var = false
323pistol_silentkey_var = false
324heavypistol_silentkey_var = false
325awp_silentkey_var = false
326auto_silentkey_var = false
327scout_silentkey_var = false
328rifle_silentkey_var = false
329
330global_silent_var = false
331pistol_silent_var = false
332heavypistol_silent_var = false
333rifle_silent_var = false
334awp_silent_var = false
335auto_silent_var = false
336scout_silent_var = false
337
338global_silent_var_fov = false
339pistol_silent_var_fov = false
340heavypistol_silent_var_fov = false
341rifle_silent_var_fov = false
342awp_silent_var_fov = false
343auto_silent_var_fov = false
344scout_silent_var_fov = false
345
346global_slowwalk_var = false
347pistol_slowwalk_var = false
348heavypistol_slowwalk_var = false
349rifle_slowwalk_var = false
350awp_slowwalk_var = false
351auto_slowwalk_var = false
352scout_slowwalk_var = false
353
354--SILENT AIM IF FOV
355global_silentfovslider = ui.new_slider("LUA", "A", "Global Silent aim if in fov", 1, 180, 1, true, "°")
356pistol_silentfovslider = ui.new_slider("LUA", "A", "Pistol Silent aim if in fov", 1, 180, 1, true, "°")
357heavypistol_silentfovslider = ui.new_slider("LUA", "A", "Heavy pistolSilent aim if in fov", 1, 180, 1, true, "°")
358rifle_silentfovslider = ui.new_slider("LUA", "A", "Rifle Silent aim if in fov", 1, 180, 1, true, "°")
359awp_silentfovslider = ui.new_slider("LUA", "A", "Awp Silent aim if in fov", 1, 180, 1, true, "°")
360auto_silentfovslider = ui.new_slider("LUA", "A", "Auto Silent aim if in fov", 1, 180, 1, true, "°")
361scout_silentfovslider = ui.new_slider("LUA", "A", "Scout Silent aim if in fov", 1, 180, 1, true, "°")
362--SILENT AIM IN DISTANCE
363global_silentdistance = ui.new_slider('LUA', 'A', 'Global Silent aim enable in distance', 1, 3000, 1)
364pistol_silentdistance = ui.new_slider('LUA', 'A', 'Pistol Silent aim enable in distance', 1, 3000, 1)
365heavypistol_silentdistance = ui.new_slider('LUA', 'A', 'Heavy pistol Silent aim enable in distance', 1, 3000, 1)
366rifle_silentdistance = ui.new_slider('LUA', 'A', 'Rifle Silent aim enable in distance', 1, 3000, 1)
367awp_silentdistance = ui.new_slider('LUA', 'A', 'Awp Silent aim enable in distance', 1, 3000, 1)
368auto_silentdistance = ui.new_slider('LUA', 'A', 'Auto Silent aim enable in distance', 1, 3000, 1)
369scout_silentdistance = ui.new_slider('LUA', 'A', 'Scout Silent aim enable in distance', 1, 3000, 1)
370
371non_adaptive_silentcheck = ui.new_checkbox("LUA", "A", "Non adaptive Silent aim settings")
372non_adaptive_silentaim = ui.new_multiselect("LUA", "A", "Non adaptive Silent aim settings", "Silent aim on key")
373silentkey = ui.new_hotkey("LUA", "A", "Silent Aim On Toggle")
374
375------------MIN DAMAGE OPTIONS
376global_mindmg_check = ui.new_checkbox("LUA", "A", "Global Minimum damage options")
377pistol_mindmg_check = ui.new_checkbox("LUA", "A", "Pistol Minimum damage options")
378heavypistol_mindmg_check = ui.new_checkbox("LUA", "A", "Heavy pistol Minimum damage options")
379rifle_mindmg_check = ui.new_checkbox("LUA", "A", "Rifle Minimum damage options")
380awp_mindmg_check = ui.new_checkbox("LUA", "A", "Awp Minimum damage options")
381auto_mindmg_check = ui.new_checkbox("LUA", "A", "Auto Minimum damage options")
382scout_mindmg_check = ui.new_checkbox("LUA", "A", "Scout Minimum damage options")
383
384global_mindmg_multi = ui.new_multiselect("LUA", "A", "\n Global Minimum damage options", "Visible and non visible override")
385pistol_mindmg_multi = ui.new_multiselect("LUA", "A", "\n Pistol Minimum damage options", "Visible and non visible override")
386heavypistol_mindmg_multi = ui.new_multiselect("LUA", "A", "\n Heavy pistol Minimum damage options", "Visible and non visible override")
387rifle_mindmg_multi = ui.new_multiselect("LUA", "A", "\n Rifle Minimum damage options", "Visible and non visible override")
388awp_mindmg_multi = ui.new_multiselect("LUA", "A", "\n Awp Minimum damage options", "Visible and non visible override")
389auto_mindmg_multi = ui.new_multiselect("LUA", "A", "\n Auto Minimum damage options", "Visible and non visible override")
390scout_mindmg_multi = ui.new_multiselect("LUA", "A", "\n Scout Minimum damage options", "Visible and non visible override")
391
392global_visible_mindmg = ui.new_slider("LUA", "A", "Global Visible minimum damage", 1, 126, 1, true)
393pistol_visible_mindmg = ui.new_slider("LUA", "A", "Pistol Visible minimum damage", 1, 126, 1, true)
394heavypistol_visible_mindmg = ui.new_slider("LUA", "A", "Heavy pistol Visible minimum damage", 1, 126, 1, true)
395rifle_visible_mindmg = ui.new_slider("LUA", "A", "Rifle Visible minimum damage", 1, 126, 1, true)
396awp_visible_mindmg = ui.new_slider("LUA", "A", "Awp Visible minimum damage", 1, 126, 1, true)
397auto_visible_mindmg = ui.new_slider("LUA", "A", "Auto Visible minimum damage", 1, 126, 1, true)
398scout_visible_mindmg = ui.new_slider("LUA", "A", "Scout Visible minimum damage", 1, 126, 1, true)
399
400global_nonvisible_mindmg = ui.new_slider("LUA", "A", "Global Non visible minimum damage", 1, 126, 1, true)
401pistol_nonvisible_mindmg = ui.new_slider("LUA", "A", "Pistol Non visible minimum damage", 1, 126, 1, true)
402heavypistol_nonvisible_mindmg = ui.new_slider("LUA", "A", "Heavy pistol Non visible minimum damage", 1, 126, 1, true)
403rifle_nonvisible_mindmg = ui.new_slider("LUA", "A", "Rifle Non visible minimum damage", 1, 126, 1, true)
404awp_nonvisible_mindmg = ui.new_slider("LUA", "A", "Awp Non visible minimum damage", 1, 126, 1, true)
405auto_nonvisible_mindmg = ui.new_slider("LUA", "A", "Auto Non visible minimum damage", 1, 126, 1, true)
406scout_nonvisible_mindmg = ui.new_slider("LUA", "A", "Scout Non visible minimum damage", 1, 126, 1, true)
407
408------------NEAREST HITBOXES
409global_hitbox_check = ui.new_checkbox("LUA", "A", "Global Nearest hitboxes")
410pistol_hitbox_check = ui.new_checkbox("LUA", "A", "Pistol Nearest hitboxes")
411heavypistol_hitbox_check = ui.new_checkbox("LUA", "A", "Heavy pistol Nearest hitboxes")
412rifle_hitbox_check = ui.new_checkbox("LUA", "A", "Rifle Nearest hitboxes")
413awp_hitbox_check = ui.new_checkbox("LUA", "A", "Awp Nearest hitboxes")
414auto_hitbox_check = ui.new_checkbox("LUA", "A", "Auto Nearest hitboxes")
415scout_hitbox_check = ui.new_checkbox("LUA", "A", "Scout Nearest hitboxes")
416
417global_nearest_multi = ui.new_multiselect("LUA", "A", "Global Nearest hitboxes", "Head", "Chest", "Stomach" , "Arms", "Legs", "Feet")
418pistol_nearest_multi = ui.new_multiselect("LUA", "A", "Pistol Nearest hitboxes", "Head", "Chest", "Stomach" , "Arms", "Legs", "Feet")
419heavypistol_nearest_multi = ui.new_multiselect("LUA", "A", "Heavy pistol Nearest hitboxes", "Head", "Chest", "Stomach" , "Arms", "Legs", "Feet")
420rifle_nearest_multi = ui.new_multiselect("LUA", "A", "Rifle Nearest hitboxes", "Head", "Chest", "Stomach" , "Arms", "Legs", "Feet")
421awp_nearest_multi = ui.new_multiselect("LUA", "A", "Awp Nearest hitboxes", "Head", "Chest", "Stomach" , "Arms", "Legs", "Feet")
422auto_nearest_multi = ui.new_multiselect("LUA", "A", "Auto Nearest hitboxes", "Head", "Chest", "Stomach" , "Arms", "Legs", "Feet")
423scout_nearest_multi = ui.new_multiselect("LUA", "A", "Scout Nearest hitboxes", "Head", "Chest", "Stomach" , "Arms", "Legs", "Feet")
424
425
426
427------------RESOLVER
428--OVERRIDE
429overridebutton = ui.new_checkbox("LUA", "B", "Resolver")
430resolverselect = ui.new_combobox("LUA", "B", "Resolver", "Override", "Opposite resolver")
431overridekey = ui.new_hotkey("LUA", "B", "Override key: Right/Left/Off")
432
433oppositeenable = ui.new_checkbox("PLAYERS", "Adjustments", "Enable resolver")
434------------LEGITBOT IMPROVEMENTS
435legitbotimprovements = ui.new_checkbox("LUA", "B", "Legitbot improvements")
436------------CUSTOM FAKELAG TRIGGERS
437enablecflcombo = ui.new_combobox('AA', 'Fake lag', 'Custom fake lag triggers', 'Off', 'Slow walk', 'Moving', 'Standing', 'Jumping')
438--slow walk
439slowvariance = ui.new_slider('AA', 'Fake lag', 'Slowwalk variance', 0, 100, 0, true, '%')
440slowlimit = ui.new_slider('AA', 'Fake lag', 'Slowwalk limit', 1, 6, 1, true)
441slowamount = ui.new_combobox('AA', 'Fake lag', 'Slowwalk amount', 'Dynamic', 'Maximum', 'Fluctuate')
442--move
443movevariance = ui.new_slider('AA', 'Fake lag', 'Moving variance', 0, 100, 0, true, '%')
444movelimit = ui.new_slider('AA', 'Fake lag', 'Moving limit', 1, 6, 1, true)
445moveamount = ui.new_combobox('AA', 'Fake lag', 'Moving amount', 'Dynamic', 'Maximum', 'Fluctuate')
446--stand
447standvariance = ui.new_slider('AA', 'Fake lag', 'Standing variance', 0, 100, 0, true, '%')
448standlimit = ui.new_slider('AA', 'Fake lag', 'Standing limit', 1, 6, 1, true)
449standamount = ui.new_combobox('AA', 'Fake lag', 'Standing amount', 'Dynamic', 'Maximum', 'Fluctuate')
450--stand
451jumpvariance = ui.new_slider('AA', 'Fake lag', 'Jumping variance', 0, 100, 0, true, '%')
452jumplimit = ui.new_slider('AA', 'Fake lag', 'Jumping limit', 1, 6, 1, true)
453jumpamount = ui.new_combobox('AA', 'Fake lag', 'Jumping amount', 'Dynamic', 'Maximum', 'Fluctuate')
454------------killsay
455talkshitenable = ui.new_checkbox('LUA', 'B', 'Killsay')
456talkshittype = ui.new_combobox('LUA', 'B', "Killsay type", 'Basic kill says', 'Custom')
457talkshittext = ui.new_textbox('LUA', 'B', "\n text")
458------------advanced log
459advancedlog = ui.new_checkbox("LUA", "B", "Advanced logging")
460log_options = ui.new_multiselect("LUA", "B", "Logs", "Bomb info", "Votes", "Damage")
461log_type = ui.new_multiselect("LUA", "B", "Log type", "Console", "Say in chat", "Print in chat")
462ngahooktag_enabled = ui.new_checkbox("LUA", "B", "nigahook tag")
463indicator_label4 = ui.new_label("LUA", "B", "----------MISC----------")
464------------
465--REFRENCE--
466------------
467
468ragebot_maximum_fov = ui.reference('RAGE', 'Aimbot', 'maximum fov')
469forcesafepoint = ui.reference('RAGE', 'Aimbot', 'Force safe point')
470
471aaenablers = ui.reference("AA", "Anti-aimbot angles", "Enabled")
472pitch = ui.reference("AA", "Anti-aimbot angles", "Pitch")
473yaw_base = ui.reference("AA", "Anti-aimbot angles", "Yaw base")
474yaw, yaw_num = ui.reference("AA", "Anti-aimbot angles", "Yaw")
475yaw_jitter = ui.reference("AA", "Anti-aimbot angles", "Yaw jitter")
476body, body_num = ui.reference("AA", "Anti-aimbot angles", "Body yaw")
477limit = ui.reference("AA", "Anti-aimbot angles", "Fake yaw limit")
478lby = ui.reference("AA", "Anti-aimbot angles", "Lower body yaw target")
479
480rageautofire = ui.reference("Rage", "Aimbot", "Automatic Fire")
481ragebot, ragebotmode = ui.reference("Rage", "Aimbot", "Enabled")
482autowall = ui.reference("RAGE", "Aimbot", "Automatic Penetration")
483min_dmg = ui.reference('rage', 'aimbot', 'minimum damage')
484trans = ui.reference('VISUALS', 'Effects', 'Transparent props')
485FOVS5 = ui.reference('RAGE', 'AIMBOT', 'Maximum FOV')
486preticle = ui.reference("VISUALS", "Other ESP", "Penetration reticle")
487ref_fl = ui.reference("AA", "Fake lag", "Limit")
488ref_fakeduck = ui.reference("Rage", "Other", "Duck peek assist")
489trigger = ui.reference("RAGE", "Aimbot", "Automatic fire")
490rage_enabl = ui.reference("RAGE", "Aimbot", "Enabled")
491silent = ui.reference("RAGE", "Aimbot", "Silent aim")
492force_body_aim = ui.reference("RAGE", "Other", "Force body aim")
493Max_f0v = ui.reference("RAGE", "Aimbot", "Maximum FOV")
494selectedplayer = ui.reference("players", "players", "player list")
495forcebody1, forcebodyyaw1 = ui.reference("players", "adjustments", "force body yaw")
496resetlist = ui.reference("players", "players", "reset all")
497applyall = ui.reference("players", "adjustments", "Apply to all")
498triggers = ui.reference("AA", "Fake lag", "Triggers")
499fakelag_enable, fakelag_key = ui.reference("AA", "Fake lag", "Enabled")
500triggerz = ui.reference("AA", "Fake lag", "Customize triggers")
501fl, fl_enable = ui.reference("AA", "Fake lag", "Enabled")
502ref_aimbot_enabled = ui.reference("RAGE", "Aimbot", "Enabled")
503ui_fd = ui.reference("Rage", "Other", "Duck peek assist")
504forcebody, forcebodyyaw = ui.reference("players", "adjustments", "force body yaw")
505resetlist = ui.reference("players", "players", "reset all")
506applyall = ui.reference("players", "adjustments", "Apply to all")
507autodirection, autodirection_key = ui.reference("AA", "Anti-aimbot angles", "Freestanding")
508edgeyaw = ui.reference("AA", "Anti-aimbot angles", "Edge yaw")
509bodyyaw_freestand = ui.reference("AA", "Anti-aimbot angles", "Freestanding body yaw")
510fakelag_limit = ui.reference("AA", "Fake lag", "Limit")
511checkbox_reference, hotkey_reference = ui.reference("AA", "Other", "Slow motion")
512brightness, adjustment = ui.reference("Visuals", "Effects", "Brightness adjustment")
513variance = ui.reference("AA", "Fake lag", "Variance")
514amount = ui.reference("AA", "Fake lag", "Amount")
515hitchance = ui.reference("RAGE", "Aimbot", "Minimum hit chance")
516plistoverride = ui.reference("players", "adjustments", "Override anti-aim correction")
517thirdpersonk, forcethirdpkey = ui.reference("VISUALS", "Effects", "Force third person (alive)")
518thirdpersondead = ui.reference("VISUALS", "Effects", "Force third person (dead)")
519infiniteduck = ui.reference("MISC", "Movement", "Infinite duck")
520
521getui = ui.get
522
523function table_contains(tbl, value)
524 for i=1, #tbl do
525 if tbl[i] == value then
526 return true
527 end
528 end
529 return false
530end
531
532--adaptive weapon
533
534bit_band, client_delay_call, client_set_event_callback, entity_get_local_player, entity_get_player_weapon, entity_get_prop, print, func, select, table_insert, table_sort, type, ui.get, ui_name, ui_new_checkbox, ui_new_combobox, ui_new_multiselect, ui_reference, ui.set, ui.set_callback, ui.set_visible, xpcall, pairs = bit.band, client.delay_call, client.set_event_callback, entity.get_local_player, entity.get_player_weapon, entity.get_prop, print, func, select, table.insert, table.sort, type, ui.get, ui.name, ui.new_checkbox, ui.new_combobox, ui.new_multiselect, ui.reference, ui.set, ui.set_callback, ui.set_visible, xpcall, pairs
535
536
537local adaptive = {}
538local references = {}
539local callbacks = {}
540local active_config = "Global"
541local weapon_id_lookup_table
542local run_command
543
544function table_contains(tbl, value)
545 for i=1, #tbl do
546 if tbl[i] == value then
547 return true
548 end
549 end
550 return false
551end
552function create_lookup_table(tbl)
553 local result = {}
554 for name, weapon_ids in pairs(tbl) do
555 for i=1, #weapon_ids do
556 result[weapon_ids[i] ] = name
557 end
558 end
559 return result
560end
561
562adaptive_options2 = ui_new_multiselect("RAGE", "Other", "asddd", "Log", "Visible")
563ui.set_visible(adaptive_options2, false)
564current_weapon = nil
565
566function update_menu(visible)
567 ui.set(adaptive_config2, active_config)
568 current_weapon = active_config
569end
570
571run_command = function()
572 local local_player = entity_get_local_player()
573 local weapon_entindex = entity_get_player_weapon(local_player)
574 local item_definition_index = bit_band(65535, entity_get_prop(weapon_entindex, "m_iItemDefinitionIndex"))
575 local config_name = weapon_id_lookup_table[item_definition_index] or "Global"
576 if config_name ~= active_config then
577 active_config = config_name
578 local options = ui.get(adaptive_options2)
579 if table_contains(options, "Log") then
580 print(active_config, " config loaded.")
581 end
582 update_menu(table_contains(options, "Visible"))
583 end
584end
585
586function init()
587 -- Create and reference menu items
588
589 -- Create the lookup table
590 weapon_id_lookup_table = create_lookup_table(adaptive_weapons)
591
592 -- Set custom callbacks for the default menu items
593 for name, reference in pairs(references) do
594 set_callback(reference, update_settings)
595 end
596
597 -- Set callbacks for all of the adaptive menu items
598 for config, items in pairs(adaptive) do
599 for name, reference in pairs(items) do
600 ui.set_callback(reference, handle_adaptive_config)
601 end
602 end
603 client.set_event_callback("run_command", run_command)
604end
605
606init()
607
608--dynamic fov
609hitbox_head, hitbox_neck, hitbox_pelvis, hitbox_spine_0, hitbox_spine_1, hitbox_spine_2, hitbox_spine_3, hitbox_leg_upper_L, hitbox_leg_upper_R, hitbox_leg_lower_L, hitbox_leg_lower_R, hitbox_ankle_L, hitbox_ankle_R, hitbox_hand_L, hitbox_hand_R, hitbox_arm_upper_L, hitbox_arm_lower_L, hitbox_arm_upper_R, hitbox_arm_lower_R = 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18
610
611dynamicfov_new_fov = 0
612bool_in_fov = false
613closest_enemy = nil
614
615min_fovaw = nil
616max_fovaw = nil
617current_autofactoraw = nil
618
619min_fov = nil
620max_fov = nil
621current_autofactor = nil
622
623visible_hitbox_threshold = 1
624
625function cmnd()
626if current_weapon == "Heavy pistol" then
627max_fov = ui.get(dynamicfov_maxheavypistol)
628min_fov = ui.get(dynamicfov_minheavypistol)
629
630max_fovaw = ui.get(heavypistol_dynamicfov_maxaw)
631min_fovaw = ui.get(heavypistol_dynamicfov_minaw)
632
633current_autofactor = ui.get(dynamicfov_auto_factor_pistol)
634current_autofactoraw = ui.get(dynamicfov_auto_factor_pistolaw)
635
636visible_hitbox_threshold = ui.get(heavypistol_legit_pen_threshold_ref)
637elseif current_weapon == "Pistol" then
638max_fov = ui.get(dynamicfov_maxpistol)
639min_fov = ui.get(dynamicfov_minpistol)
640
641current_autofactor = ui.get(dynamicfov_auto_factor_heavypistol)
642current_autofactoraw = ui.get(dynamicfov_auto_factor_heavypistolaw)
643
644max_fovaw = ui.get(pistol_dynamicfov_maxaw)
645min_fovaw = ui.get(pistol_dynamicfov_minaw)
646
647
648visible_hitbox_threshold = ui.get(pistol_legit_pen_threshold_ref)
649elseif current_weapon == "Rifle" then
650max_fov = ui.get(dynamicfov_maxrifle)
651min_fov = ui.get(dynamicfov_minrifle)
652
653current_autofactor = ui.get(dynamicfov_auto_factor_rifle)
654current_autofactoraw = ui.get(dynamicfov_auto_factor_rifleaw)
655
656max_fovaw = ui.get(rifle_dynamicfov_maxaw)
657min_fovaw = ui.get(rifle_dynamicfov_minaw)
658
659visible_hitbox_threshold = ui.get(rifle_legit_pen_threshold_ref)
660elseif current_weapon == "Awp" then
661max_fov = ui.get(dynamicfov_maxawp)
662min_fov = ui.get(dynamicfov_minawp)
663
664current_autofactor = ui.get(dynamicfov_auto_factor_awp)
665current_autofactoraw = ui.get(dynamicfov_auto_factor_rifleaw)
666
667max_fovaw = ui.get(awp_dynamicfov_maxaw)
668min_fovaw = ui.get(awp_dynamicfov_minaw)
669
670visible_hitbox_threshold = ui.get(awp_legit_pen_threshold_ref)
671elseif current_weapon == "Auto" then
672max_fov = ui.get(dynamicfov_maxauto)
673min_fov = ui.get(dynamicfov_minauto)
674
675current_autofactor = ui.get(dynamicfov_auto_factor_auto)
676current_autofactoraw = ui.get(dynamicfov_auto_factor_autoaw)
677
678max_fovaw = ui.get(auto_dynamicfov_maxaw)
679min_fovaw = ui.get(auto_dynamicfov_minaw)
680
681visible_hitbox_threshold = ui.get(auto_legit_pen_threshold_ref)
682elseif current_weapon == "Scout" then
683max_fov = ui.get(dynamicfov_maxscout)
684min_fov = ui.get(dynamicfov_minscout)
685
686current_autofactor = ui.get(dynamicfov_auto_factor_scout)
687current_autofactoraw = ui.get(dynamicfov_auto_factor_scoutaw)
688
689max_fovaw = ui.get(scout_dynamicfov_maxaw)
690min_fovaw = ui.get(scout_dynamicfov_minaw)
691
692visible_hitbox_threshold = ui.get(scout_legit_pen_threshold_ref)
693elseif current_weapon == "Global" then
694max_fov = ui.get(dynamicfov_maxother)
695min_fov = ui.get(dynamicfov_minother)
696
697current_autofactor = ui.get(dynamicfov_auto_factor_other)
698current_autofactoraw = ui.get(dynamicfov_auto_factor_otheraw)
699
700max_fovaw = ui.get(pistol_dynamicfov_maxaw)
701min_fovaw = ui.get(pistol_dynamicfov_minaw)
702
703visible_hitbox_threshold = ui.get(global_legit_pen_threshold_ref)
704end
705end
706client.set_event_callback("paint", cmnd)
707
708function dynamicfov_logic()
709 if min_fov == nil or max_fov == nil or current_autofactor == nil then
710 return
711 end
712 local old_fov = ui.get(ragebot_maximum_fov)
713 dynamicfov_new_fov = old_fov
714 local enemy_players = entity_get_players(true)
715
716 if min_fov > max_fov then
717 store_min_fov = min_fov
718 min_fov = max_fov
719 max_fov = store_min_fov
720 end
721
722
723 if #enemy_players ~= 0 then
724 local own_x, own_y, own_z = client_eye_position()
725 local own_pitch, own_yaw = client_camera_angles()
726 closest_enemy = nil
727 local closest_distance = 999999999
728
729 for i = 1, #enemy_players do
730 local enemy = enemy_players[i]
731 local enemy_x, enemy_y, enemy_z = entity_hitbox_position(enemy, 0)
732
733 local x = enemy_x - own_x
734 local y = enemy_y - own_y
735 local z = enemy_z - own_z
736
737 local yaw = ((math_atan2(y, x) * 180 / math_pi))
738 local pitch = -(math_atan2(z, math_sqrt(math_pow(x, 2) + math_pow(y, 2))) * 180 / math_pi)
739
740 local yaw_dif = math_abs(own_yaw % 360 - yaw % 360) % 360
741 local pitch_dif = math_abs(own_pitch - pitch ) % 360
742
743 if yaw_dif > 180 then
744 yaw_dif = 360 - yaw_dif
745 end
746
747 local real_dif = math_sqrt(math_pow(yaw_dif, 2) + math_pow(pitch_dif, 2))
748
749 if closest_distance > real_dif then
750 closest_distance = real_dif
751 closest_enemy = enemy
752 end
753 end
754
755 if closest_enemy ~= nil then
756 local closest_enemy_x, closest_enemy_y, closest_enemy_z = entity_hitbox_position(closest_enemy, 0)
757 local real_distance = math_sqrt(math_pow(own_x - closest_enemy_x, 2) + math_pow(own_y - closest_enemy_y, 2) + math_pow(own_z - closest_enemy_z, 2))
758
759 dynamicfov_new_fov = (3800 / real_distance) * (current_autofactor * 0.01)
760
761
762 if (dynamicfov_new_fov > max_fov) then
763 dynamicfov_new_fov = max_fov
764 elseif dynamicfov_new_fov < min_fov then
765 dynamicfov_new_fov = min_fov
766 end
767 end
768
769 dynamicfov_new_fov = math_floor(dynamicfov_new_fov + 0.5)
770
771 if (dynamicfov_new_fov > closest_distance) then
772 bool_in_fov = true
773 else
774 bool_in_fov = false
775 end
776 else
777 dynamicfov_new_fov = min_fov
778 bool_in_fov = false
779 end
780
781
782 --global
783 if dynamicfov_new_fov ~= old_fov and ui.get(global_dynamicfov_enable) and current_weapon == "Global" then
784 ui.set(ragebot_maximum_fov, dynamicfov_new_fov)
785 end
786 --pistol
787 if dynamicfov_new_fov ~= old_fov and ui.get(pistol_dynamicfov_enable) and current_weapon == "Pistol" then
788 ui.set(ragebot_maximum_fov, dynamicfov_new_fov)
789 end
790 --heavy pistol
791 if dynamicfov_new_fov ~= old_fov and ui.get(heavypistol_dynamicfov_enable) and current_weapon == "Heavy pistol" then
792 ui.set(ragebot_maximum_fov, dynamicfov_new_fov)
793 end
794 --awp
795 if dynamicfov_new_fov ~= old_fov and ui.get(awp_dynamicfov_enable) and current_weapon == "Awp" then
796 ui.set(ragebot_maximum_fov, dynamicfov_new_fov)
797 end
798 --scout
799 if dynamicfov_new_fov ~= old_fov and ui.get(scout_dynamicfov_enable) and current_weapon == "Scout" then
800 ui.set(ragebot_maximum_fov, dynamicfov_new_fov)
801 end
802 --auto
803 if dynamicfov_new_fov ~= old_fov and ui.get(auto_dynamicfov_enable) and current_weapon == "Auto" then
804 ui.set(ragebot_maximum_fov, dynamicfov_new_fov)
805 end
806 --rifle
807 if dynamicfov_new_fov ~= old_fov and ui.get(rifle_dynamicfov_enable) and current_weapon == "Rifle" then
808 ui.set(ragebot_maximum_fov, dynamicfov_new_fov)
809 end
810 end
811--drawing
812function on_paint(ctx)
813 dynamicfov_logic()
814end
815
816client.set_event_callback('paint', on_paint)
817
818--dynamic legit aa
819 --local variables for API. Automatically generated by https://github.com/simpleavaster/gslua/blob/master/authors/sapphyrus/generate_api.lua
820 local client_latency, client_log, client_draw_rectangle, client_draw_circle_outline, client_userid_to_entindex, client_draw_indicator, client_draw_gradient, client_set_event_callback, client_screen_size, client_eye_position = client.latency, client.log, client.draw_rectangle, client.draw_circle_outline, client.userid_to_entindex, client.draw_indicator, client.draw_gradient, client.set_event_callback, client.screen_size, client.eye_position
821 local client_draw_circle, client_color_log, client_delay_call, client_draw_text, client_visible, client_exec, client_trace_line, client_set_cvar = client.draw_circle, client.color_log, client.delay_call, client.draw_text, client.visible, client.exec, client.trace_line, client.set_cvar
822 local client_world_to_screen, client_draw_hitboxes, client_get_cvar, client_draw_line, client_camera_angles, client_draw_debug_text, client_random_int, client_random_float = client.world_to_screen, client.draw_hitboxes, client.get_cvar, client.draw_line, client.camera_angles, client.draw_debug_text, client.random_int, client.random_float
823 local entity_get_local_player, entity_is_enemy, entity_get_player_name, entity_get_steam64, entity_get_bounding_box, entity_get_all, entity_set_prop, entity_get_player_weapon = entity.get_local_player, entity.is_enemy, entity.get_player_name, entity.get_steam64, entity.get_bounding_box, entity.get_all, entity.set_prop, entity.get_player_weapon
824 local entity_hitbox_position, entity_get_prop, entity_get_players, entity_get_classname = entity.hitbox_position, entity.get_prop, entity.get_players, entity.get_classname
825 local globals_realtime, globals_absoluteframetime, globals_tickcount, globals_curtime, globals_mapname, globals_tickinterval, globals_framecount, globals_frametime, globals_maxplayers = globals.realtime, globals.absoluteframetime, globals.tickcount, globals.curtime, globals.mapname, globals.tickinterval, globals.framecount, globals.frametime, globals.maxplayers
826 local math_ceil, math_tan, math_log10, math_randomseed, math_cos, math_sinh, math_random, math_huge, math_pi, math_max, math_atan2, math_ldexp, math_floor, math_sqrt, math_deg, math_atan, math_fmod = math.ceil, math.tan, math.log10, math.randomseed, math.cos, math.sinh, math.random, math.huge, math.pi, math.max, math.atan2, math.ldexp, math.floor, math.sqrt, math.deg, math.atan, math.fmod
827 local math_acos, math_pow, math_abs, math_min, math_sin, math_frexp, math_log, math_tanh, math_exp, math_modf, math_cosh, math_asin, math_rad = math.acos, math.pow, math.abs, math.min, math.sin, math.frexp, math.log, math.tanh, math.exp, math.modf, math.cosh, math.asin, math.rad
828 local table_maxn, table_foreach, table_sort, table_remove, table_foreachi, table_move, table_getn, table_concat, table_insert = table.maxn, table.foreach, table.sort, table.remove, table.foreachi, table.move, table.getn, table.concat, table.insert
829 local string_find, string_format, string_rep, string_gsub, string_len, string_gmatch, string_dump, string_match, string_reverse, string_byte, string_char, string_upper, string_lower, string_sub = string.find, string.format, string.rep, string.gsub, string.len, string.gmatch, string.dump, string.match, string.reverse, string.byte, string.char, string.upper, string.lower, string.sub
830 local render_text = renderer.text
831 local GetBoundingBox = entity.get_bounding_box
832
833 local world_to_screen = function(x, y, z, func)
834 local x, y = renderer.world_to_screen(x, y, z)
835 if x ~= nil and y ~= nil then
836 func(x, y)
837 end
838 end
839 --end of local variables
840 local leftdamage = 0
841 local rightdamage = 0
842 local rad2deg = function(rad) return (rad * 180 / math.pi) end
843 local deg2rad = function(deg) return (deg * math.pi / 180) end
844 local trace_line = function(entity, start, _end)
845 return client.trace_line(entity, start.x, start.y, start.z, _end.x, _end.y, _end.z)
846 end
847 pi = 3.14159265358979323846
848 local screenx, screeny = client_screen_size()
849
850 local vector = function(x, y, z)
851 x = x ~= nil and x or 0
852 y = y ~= nil and y or 0
853 z = z ~= nil and z or 0
854
855 return {
856 ["x"] = x,
857 ["y"] = y,
858 ["z"] = z
859 }
860 end
861
862 local vector_add = function(vector1, vector2)
863 return {
864 ["x"] = vector1.x + vector2.x,
865 ["y"] = vector1.y + vector2.y,
866 ["z"] = vector1.z + vector2.z
867 }
868 end
869
870 local vector_substract = function(vector1, vector2)
871 return {
872 ["x"] = vector1.x - vector2.x,
873 ["y"] = vector1.y - vector2.y,
874 ["z"] = vector1.z - vector2.z
875 }
876 end
877 function slot136(slot0, slot1)
878 for slot5 = 1, #slot0, 1 do
879 if slot0[slot5] == slot1 then
880 return true
881 end
882 end
883
884 return false
885 end
886
887 function slot137(slot0, slot1)
888 for slot5, slot6 in ipairs(slot0) do
889 if slot6 == slot1 then
890 return true, slot5
891 end
892 end
893
894 return false
895 end
896
897 function slot138()
898 if ui.get(otherref.tp_alive) and ui.get(otherref.tp_alive_key) then
899 ui.set_visible(otherref.tp_dead, true)
900 else
901 ui.set_visible(otherref.tp_dead, false)
902 end
903 end
904 local clamp_angles = function(angle)
905 angle = angle % 360
906 angle = (angle + 360) % 360
907
908 if angle > 180 then
909 angle = angle - 360
910 end
911
912 return angle
913 end
914
915
916 function LAAFunc()
917----------------------------------------------------------------------LEGITAA
918 local legita = ui.get(legitAA)
919 local base = ui.get(legitAAbase)
920 local aamodes = ui.get(LegitAABreaker)
921 local aamoving = ui.get(enableaawm)
922 local movingbox = ui.get(legitaamoving)
923 local disping = table_contains(ui.get(legitaasafe), "High ping")
924 local disfps = table_contains(ui.get(legitaasafe), "Low FPS")
925 local edge_freestand_type = ui.get(legitaa_freestand_type)
926
927 ui.set_visible(legitAAbase, legita)
928 ui.set_visible(LegitAABreaker, legita)
929 ui.set_visible(legitaa_freestand_type, legita and base == "Dynamic")
930
931 ui.set_visible(brutemode2, legita and aamodes == "Break bruteforce")
932 ui.set_visible(ui_indicator_combobox4, legita)
933 ui.set_visible(ui_indicator_color_picker4, legita)
934
935 ui.set_visible(legitaasafe, legita)
936 ui.set_visible(disableaaping, legita and disping)
937 ui.set_visible(disableaafps, legita and disfps)
938----------------------------------------------------------------------LEGITAA WHILE MOVING
939 ui.set_visible(enableaawm, legita)
940 ui.set_visible(legitaamoving, legita and aamoving)
941
942 ui.set_visible(slowmode, aamoving and legita and movingbox == "Slow walk")
943 ui.set_visible(movemode, aamoving and legita and movingbox == "Moving")
944 ui.set_visible(standmode, aamoving and legita and movingbox == "Standing")
945
946 ui.set_visible(LegitAAHotkey, legita and base == "Manual")
947 ui.set_visible(flip_key, edge_freestand_type == "Flip + Manual" and legita and base == "Dynamic")
948
949
950 if not ui.get(legitAA) then
951 ui.set(yaw, "Off")
952 ui.set(body, "Off")
953 ui.set(autodirection, "-")
954 ui.set(autodirection_key, "On hotkey")
955 ui.set(aaenablers, false)
956 elseif ui.get(legitAA) then
957 ui.set(yaw, "180")
958 ui.set(yaw_num, 180)
959 ui.set(body, "Static")
960 ui.set(autodirection, "-")
961 ui.set(autodirection_key, "On hotkey")
962 ui.set(aaenablers, true)
963 end
964 end
965
966 LAAFunc()
967 ui.set_callback(legitAA, LAAFunc)
968 ui.set_callback(legitAAbase, LAAFunc)
969 ui.set_callback(LegitAAHotkey, LAAFunc)
970 ui.set_callback(LegitAABreaker, LAAFunc)
971 ui.set_callback(enableaawm, LAAFunc)
972 ui.set_callback(legitaamoving, LAAFunc)
973 ui.set_callback(legitaasafe, LAAFunc)
974 ui.set_callback(legitaa_freestand_type, LAAFunc)
975
976 local get_atan = function(ent, eye_pos, camera)
977 local data = { id = nil, dst = 2147483647, fov = 360 }
978 local screenx, screeny = client_screen_size()
979 local crosshair = screenx / 2, screeny / 2
980 for i = 0, 19 do
981 local hitbox = vector(entity.hitbox_position(ent, i))
982 local ext = vector_substract(hitbox, eye_pos)
983
984 local yaw = rad2deg(math.atan2(ext.y, ext.x))
985 local pitch = -rad2deg(math.atan2(ext.z, math.sqrt(ext.x^2 + ext.y^2)))
986
987 local yaw_dif = math.abs(camera.y % 360 - yaw % 360) % 360
988 local pitch_dif = math.abs(camera.x - pitch) % 360
989
990 if yaw_dif > 180 then
991 yaw_dif = 360 - yaw_dif
992 end
993
994 local dst = math.sqrt(yaw_dif^2 + pitch_dif^2)
995 local dstcorrect = math.sqrt(ext.x^2 + ext.y^2 + ext.z^2)
996 if dstcorrect < data.dst then
997 data.dst = dstcorrect
998 data.id = i
999 data.fov = yaw - crosshair
1000 end
1001 end
1002
1003 return data.id, data.dst, data.fov
1004 end
1005
1006 local function getdistance()
1007 local get_players = entity.get_players(true)
1008
1009 if #get_players == 0 then
1010 return
1011 end
1012 local eye_pos = vector(client.eye_position())
1013 local camera = vector(client.camera_angles())
1014 camera.z = z_pos ~= nil and 64 or camera.z
1015 local distance = math.huge
1016 local closest_enemy = nil
1017 local adv_fov = 1000
1018 local screenx, screeny = client_screen_size()
1019 local crosshair = screenx / 2, screeny / 2
1020 for i = 1, #get_players do
1021 local hitbox_id, dist, fov =
1022 get_atan(get_players[i], eye_pos, camera)
1023 if distance > dist then
1024 distance = dist
1025 hitbox = hitbox_id
1026 closest_enemy = get_players[i]
1027 adv_fov = fov
1028 end
1029 end
1030
1031
1032 return closest_enemy, hitbox, distance, adv_fov
1033 end
1034
1035 function slot158()
1036 if ui.get(yaw) == "Off" then
1037 return
1038 end
1039
1040 if entity_get_prop(entity.get_game_rules(), "m_bFreezePeriod") == 1 then
1041 return
1042 end
1043
1044 local screenx, screeny = client_screen_size()
1045 local lx, ly, lz = entity_get_prop(entity_get_local_player(), "m_angEyeAngles")
1046 local divisor = screenx / 2
1047 local divisor2 = screeny / 2
1048 local size= 15 * cvar.cl_crosshairsize:get_float() * 0.67
1049
1050 if ui.get(yaw_num) ~= 180 and ui.get(yaw_num) ~= -180 then
1051 render_text(divisor, divisor2, 255, 0, 0, 255, "c-", 0, "AA IS BROKEN, SET YAW SLIDER TO 180 OR -180")
1052 render_text(divisor, divisor2 + 10, 255, 0, 0, 255, "c-", 0, "CURRENT YAW: ", ly)
1053 end
1054 end
1055
1056 function slot159()
1057 ui.set(pitch, "Off")
1058 ui.set(yaw_base, "Local view")
1059 ui.set(yaw, "180")
1060 ui.set(yaw_jitter, "Off")
1061 ui.set(edgeyaw, "Off")
1062 ui.set(bodyyaw_freestand, false)
1063 ui.set(autodirection_key, "On hotkey")
1064 end
1065
1066 function slot160()
1067 if not ui.get(legitAA) or ui.get(ref_fakeduck) or ui.get(legitAAbase) == "Dynamic" or entity_get_local_player() == nil or entity_get_prop(entity_get_local_player(), "m_lifeState") ~= 0 then
1068 return
1069 end
1070
1071 if entity_get_prop(entity.get_game_rules(), "m_bFreezePeriod") == 1 then
1072 return
1073 end
1074
1075 local screenx, screeny = client_screen_size()
1076 local halfx = screenx / 2
1077 local halfy = screeny / 2
1078 if ui.get(legitAA) then
1079 if ui.get(legitAAbase) == "Manual" then
1080 ui.set(LegitAAHotkey, "Toggle")
1081
1082 if ui.get(LegitAAHotkey) then
1083 slot159()
1084 ui.set(yaw_num, 180)
1085 ui.set(body_num, 60)
1086
1087 slot94 = "RIGHT"
1088 else
1089 slot159()
1090 ui.set(yaw_num, 180)
1091 ui.set(body_num, -60)
1092
1093 slot94 = "LEFT"
1094 end
1095 else
1096 end
1097 end
1098 end
1099 local edge_count = { [1] = 7, [2] = 12, [3] = 15, [4] = 19, [5] = 23, [6] = 28, [7] = 35, [8] = 39 }
1100
1101 local function do_legit_aa()
1102 local local_player = entity_get_local_player()
1103
1104 if not local_player or not entity.is_alive(local_player) then
1105 return
1106 end
1107
1108 local m_vecOrigin = vector(entity_get_prop(local_player, "m_vecOrigin"))
1109 local m_vecViewOffset = vector(entity_get_prop(local_player, "m_vecViewOffset"))
1110
1111 local m_vecOrigin = vector_add(m_vecOrigin, m_vecViewOffset)
1112
1113 local radius = 20 + 110 + 0.1
1114 local step = math.pi * 2.0 / edge_count[8]
1115
1116 local camera = vector(client.camera_angles())
1117 local central = deg2rad(math.floor(camera.y + 0.5))
1118
1119 local data = {
1120 fraction = 1,
1121 surpassed = false,
1122 angle = vector(0, 0, 0),
1123 var = 0,
1124 side = "LAST KNOWN"
1125 }
1126
1127 for a = central, math.pi * 3.0, step do
1128 if a == central then
1129 central = clamp_angles(rad2deg(a))
1130 local trace_line = function(entity, start, _end)
1131 return client.trace_line(entity, start.x, start.y, start.z, _end.x, _end.y, _end.z)
1132 end
1133 end
1134
1135 local clm = clamp_angles(central - rad2deg(a))
1136 local abs = math.abs(clm)
1137
1138 if abs < 90 and abs > 1 then
1139
1140 local side = "LAST KNOWN"
1141 local location = vector(
1142 radius * math.cos(a) + m_vecOrigin.x,
1143 radius * math.sin(a) + m_vecOrigin.y,
1144 m_vecOrigin.z
1145 )
1146
1147 local _fr, entindex = client.trace_line(local_player, m_vecOrigin.x, m_vecOrigin.y, m_vecOrigin.z, location.x, location.y, location.z)
1148
1149 if math.floor(clm + 0.5) < -21 then side = "LEFT" end
1150 if math.floor(clm + 0.5) > 21 then side = "RIGHT" end
1151
1152 local fr_info = {
1153 fraction = _fr,
1154 surpassed = (_fr < 1),
1155 angle = vector(0, clamp_angles(rad2deg(a)), 0),
1156 var = math.floor(clm + 0.5),
1157 side = side --[ 0 - center / 1 - left / 2 - right ]
1158 }
1159
1160 if data.fraction > _fr then data = fr_info end
1161 end
1162 end
1163
1164 return data
1165 end
1166
1167 function dodynamic()
1168 local local_player = entity_get_local_player()
1169
1170 if not local_player or not entity.is_alive(local_player) then
1171 return
1172 end
1173
1174 local local_player = entity_get_local_player()
1175 topX, topY, botX, botY, alpha = entity.get_bounding_box(client_draw_text, local_player)
1176 local origin = vector(entity_get_prop(local_player, "m_vecOrigin"))
1177 local collision = (entity_get_prop(local_player, "m_Collision"))
1178 local vecmin = vector(entity_get_prop(local_player, "m_vecMins"))
1179 local vecmax = vector(entity_get_prop(local_player, "m_vecMaxs"))
1180 local min = vector_add(vecmin, origin)
1181 local max = vector_add(vecmax, origin)
1182
1183 if not ui.get(legitAA) or ui.get(ref_fakeduck) or ui.get(legitAAbase) == "Manual" then
1184 return
1185 end
1186
1187 if ui.get(legitAA) and ui.get(legitAAbase) == "Dynamic" then
1188
1189 if entity_get_prop(entity.get_game_rules(), "m_bFreezePeriod") == 1 then
1190 return
1191 end
1192 local data = do_legit_aa()
1193
1194 if data == nil then
1195 return
1196 end
1197 if data.fraction < 1 and ui.get(legitaa_freestand_type) == "Edge" then
1198 slot159()
1199 ui.set(body_num, data.var > 0 and 60 or -60)
1200 ui.set(yaw_num, 180)
1201 end
1202 end
1203 if ui.get(legitaa_freestand_type) == "Damage" then
1204 else return
1205 end
1206 closest_to_crosshair = getdistance()
1207
1208 if closest_to_crosshair ~= nil then
1209 local hitbox = vector(entity.hitbox_position(local_player, 0))
1210 local viewtest = vector(client.eye_position())
1211 local yawadd = ui.get(yaw_num)
1212 local desync = ui.get(limit)
1213 local enemyx, enemyy, enemyz = entity_get_prop(closest_to_crosshair, "m_vecOrigin")
1214 local enemyvx, enemyvy, enemyvz = entity_get_prop(closest_to_crosshair, "m_vecViewOffset")
1215
1216 local enemyhitbox = vector(entity.hitbox_position(closest_to_crosshair, 0))
1217 rightdamage = 0
1218 leftdamage = 0
1219 local rightchecky = math_sin(hitbox.x ) * 60 + math_cos(hitbox.y) * 60
1220 local leftchecky = math_sin(hitbox.x ) * -60 + math_cos(hitbox.y) * -60
1221
1222 local rightcheck
1223 local leftcheck = hitbox.y - 10
1224 if hitbox.y ~= nil then
1225 local leftent, leftdmg = client.trace_bullet(local_player,hitbox.x,leftcheck , hitbox.z, enemyhitbox.x, enemyhitbox.y, enemyhitbox.z )
1226 local rightent, rightdmg = client.trace_bullet(local_player, hitbox.x,rightchecky , hitbox.z, enemyhitbox.x, enemyhitbox.y, enemyhitbox.z)
1227
1228
1229
1230
1231 if leftent ~= nil then
1232 leftdamage = client.scale_damage(leftent, 0, leftdmg)
1233 elseif rightent ~= nil then
1234 rightdamage = client.scale_damage(rightent, 0, rightdmg)
1235 else
1236
1237 end
1238 local screenx, screeny = client_screen_size()
1239
1240 end
1241 else
1242
1243 end
1244 if rightdamage > leftdamage and ui.get(legitaa_freestand_type) == "Damage" then
1245 slot159()
1246 ui.set(yaw_num, 180)
1247 ui.set(body_num, -60)
1248
1249 slot94 = "RIGHT"
1250 else
1251 if ui.get(legitaa_freestand_type) == "Damage" then
1252 slot159()
1253 ui.set(yaw_num, 180)
1254 ui.set(body_num, 60)
1255
1256 slot94 = "LEFT"
1257 end
1258 end
1259
1260 end
1261
1262local function fyls()
1263if ui.get(legitAA) == false then
1264return
1265else
1266 if ui.get(LegitAABreaker) == "Smart" then
1267 ui.set(limit, 60)
1268 ui.set(body, "Static")
1269 elseif ui.get(LegitAABreaker) == "Maximum" then
1270 ui.set(limit, 60)
1271 ui.set(body, "Static")
1272 elseif ui.get(LegitAABreaker) == "Slow" then
1273 ui.set(limit, 60)
1274 ui.set(body, "Static")
1275 elseif ui.get(LegitAABreaker) == "Fast" then
1276 ui.set(limit, 60)
1277 ui.set(body, "Static")
1278 elseif ui.get(LegitAABreaker) == "Break bruteforce" then
1279 ui.set(lby, "Opposite")
1280 ui.set(body, "Static")
1281 end
1282 end
1283 end
1284
1285client.set_event_callback("paint", fyls)
1286
1287Latency = client.latency
1288LocalPlayer, GetProp = entity.get_local_player, entity.get_prop
1289min, abs, sqrt, floor = math.min, math.abs, math.sqrt, math.floor
1290RealTime = globals.realtime
1291TimeStart = RealTime
1292disable_aa = false
1293
1294--disable ping
1295
1296function on_paint()
1297 local disping = table_contains(ui.get(legitaasafe), "High ping")
1298 local disfps = table_contains(ui.get(legitaasafe), "Low FPS")
1299 if not ui.get(legitAA, true) or not disping then
1300 disable_aa = false
1301 end
1302 if ui.get(legitAA, true) and disping then
1303 else return
1304 end
1305 local PlayerResource = entity.get_all("CCSPlayerResource")[1]
1306 local Player = LocalPlayer()
1307 local Ping = floor(min(1000, client.latency() * 1000) + 0.5)
1308 local ScoreboardPing = GetProp(PlayerResource, "m_iPing", Player)
1309 if ScoreboardPing > ui.get(disableaaping) then
1310 ui.set(aaenablers, false)
1311 disable_aa = true
1312 else
1313 ui.set(aaenablers, true)
1314 disable_aa = false
1315 end
1316end
1317
1318client.set_event_callback("paint", on_paint)
1319
1320--disable aa fps
1321
1322frametimes = {}
1323fps_prev = 0
1324value_prev = {}
1325last_update_time = 0
1326
1327function accumulate_fps()
1328 local rt, ft = globals_realtime(), globals_absoluteframetime()
1329
1330 if ft > 0 then
1331 table_insert(frametimes, 1, ft)
1332 end
1333
1334 local count = #frametimes
1335 if count == 0 then
1336 return 0
1337 end
1338
1339 local accum = 0
1340 local i = 0
1341 while accum < 0.5 do
1342 i = i + 1
1343 accum = accum + frametimes[i]
1344 if i >= count then
1345 break
1346 end
1347 end
1348
1349 accum = accum / i
1350
1351 while i < count do
1352 i = i + 1
1353 table_remove(frametimes)
1354 end
1355
1356 local fps = 1 / accum
1357 local time_since_update = rt - last_update_time
1358 if math_abs(fps - fps_prev) > 4 or time_since_update > 1 then
1359 fps_prev = fps
1360 last_update_time = rt
1361 else
1362 fps = fps_prev
1363 end
1364
1365 return math_floor(fps + 0.5)
1366end
1367
1368disable_aa2 = false
1369
1370function run_tag_animation()
1371local disfps = table_contains(ui.get(legitaasafe), "Low FPS")
1372 if not ui.get(legitAA, true) or not disfps then
1373 disable_aa2 = false
1374 end
1375 if ui.get(legitAA, true) and disfps then
1376 else return
1377 end
1378 if ui.get(disableaafps) > accumulate_fps() then
1379 disable_aa2 = true
1380 ui.set(aaenablers, false)
1381 else
1382 disable_aa2 = false
1383 ui.set(aaenablers, true)
1384 end
1385end
1386
1387client.set_event_callback("run_command", run_tag_animation, accumulate_fps())
1388
1389function disableaa()
1390 if disable_aa and ui.get(legitAA) or disable_aa2 and ui.get(legitAA) then
1391 ui.set(aaenablers, false)
1392 elseif not disable_aa and ui.get(legitAA) or not disable_aa2 and ui.get(legitAA) then
1393 ui.set(aaenablers, true)
1394 end
1395end
1396client.set_event_callback("paint", disableaa)
1397
1398 function slot163()
1399 if ui.get(legitAA) then
1400 if ui.get(LegitAABreaker) == "Maximum" then
1401 ui.set(lby, "Opposite")
1402 elseif ui.get(LegitAABreaker) == "Smart" then
1403 ui.set(lby, "Eye yaw")
1404 end
1405 else
1406 ui.set(lby, "Off")
1407 end
1408 end
1409
1410
1411
1412 function slot163()
1413 if ui.get(legitAA) then
1414 if ui.get(LegitAABreaker) == "Maximum" then
1415 ui.set(lby, "Opposite")
1416 elseif ui.get(LegitAABreaker) == "Smart" then
1417 ui.set(lby, "Eye yaw")
1418 end
1419 else
1420 ui.set(lby, "Off")
1421 end
1422 end
1423
1424 client.set_event_callback("run_command", function ()
1425 slot158()
1426 slot160()
1427 end)
1428
1429 client.set_event_callback("paint", function (c)
1430 slot163()
1431 dodynamic()
1432 end)
1433
1434client.set_event_callback("game_newmap", function ()
1435end)
1436
1437
1438get_prop = entity.get_prop
1439sqrt, sin, cos = math.sqrt, math.sin, math.cos
1440get_local_player = entity.get_local_player
1441get_all_players = entity.get_players
1442get_player_name = entity.get_player_name
1443
1444function vec3_normalize(x, y, z)
1445 local len = sqrt(x * x + y * y + z * z)
1446 if len == 0 then
1447 return 0, 0, 0
1448 end
1449 local r = 1 / len
1450 return x*r, y*r, z*r
1451end
1452function vec3_dot(ax, ay, az, bx, by, bz)
1453 return ax*bx + ay*by + az*bz
1454end
1455
1456function angle_to_vec(pitch, yaw)
1457 local p, y = deg2rad*pitch, deg2rad*yaw
1458 local sp, cp, sy, cy = sin(p), cos(p), sin(y), cos(y)
1459 return cp*cy, cp*sy, -sp
1460end
1461
1462function aiming_at_me(ent, lx, ly, lz)
1463 local pitch, yaw, roll = get_prop(ent, "m_angEyeAngles")
1464 if pitch == nil then
1465 return
1466 end
1467
1468 local ex, ey, ez = angle_to_vec(pitch, yaw)
1469 local px, py, pz = get_prop(ent, "m_vecOrigin")
1470 if px == nil then
1471 return
1472 end
1473
1474 local dx, dy, dz = vec3_normalize(lx-px, ly-py, lz-pz)
1475 return vec3_dot(dx, dy, dz, ex, ey, ez) > 0.98480775301
1476end
1477function on_paint(e)
1478 local entindex = get_local_player()
1479 if entindex == nil then
1480 return
1481 end
1482
1483 if ui.get(legitaa_freestand_type) == "Flip + Manual" and ui.get(legitAA, true) and ui.get(legitAAbase) == "Dynamic" then
1484 else return
1485 end
1486
1487 if not entity.is_enemy(client.userid_to_entindex(e.userid)) then
1488 return
1489 end
1490
1491 local lx, ly, lz = get_prop(entindex, "m_vecOrigin")
1492 if lx == nil then
1493 return
1494 end
1495
1496 local players = get_all_players(true)
1497 if players == nil then
1498 return
1499 end
1500
1501 for i=1, #players do
1502 entindex = players[i]
1503
1504 if aiming_at_me(entindex, lx, ly, lz) then
1505 local name = get_player_name(entindex) or "An enemy"
1506
1507 cancel_90 = false
1508 cancel_902 = false
1509
1510 if ui.get(body_num) == 60 and cancel_90 == false then
1511 ui.set(body_num, -60)
1512 cancel_90 = true
1513 cancel_902 = false
1514 elseif ui.get(body_num) == -60 and cancel_902 == false then
1515 ui.set(body_num, 60)
1516 cancel_90 = false
1517 cancel_902 = true
1518 end
1519 end
1520 return
1521 end
1522
1523 end
1524
1525client.set_event_callback("weapon_fire", on_paint)
1526
1527local canchange = false
1528function setbyaw()
1529 if ui.get(legitaa_freestand_type) == "Flip + Manual" and ui.get(legitAA, true) and ui.get(legitAAbase) == "Dynamic" then
1530 else return
1531 end
1532
1533 if ui.get(body_num) == 60 and canchange == true then
1534 ui.set(body_num, -60)
1535 canchange = false
1536 end
1537
1538 if ui.get(body_num) == -60 and canchange == true then
1539 ui.set(body_num, 60)
1540 canchange = false
1541 end
1542
1543end
1544function change_paint()
1545 if ui.get(legitaa_freestand_type) == "Flip + Manual" and ui.get(legitAA, true) and ui.get(legitAAbase) == "Dynamic" then
1546 else return
1547 end
1548
1549 if ui.get(flip_key) then
1550
1551 if canchange == true then
1552
1553 setbyaw()
1554 canchange = false
1555
1556 end
1557
1558
1559 else
1560
1561 canchange = true
1562
1563 end
1564
1565end
1566
1567client.set_event_callback("paint", change_paint)
1568
1569function set_paint()
1570 if ui.get(legitaa_freestand_type) == "Flip + Manual" and ui.get(legitAA, true) and ui.get(legitAAbase) == "Dynamic" then
1571 else return
1572 end
1573
1574 if not ui.get(body_num) == -60 or not ui.get(body_num) == 60 then
1575 ui.set(body_num, 60)
1576 end
1577
1578end
1579
1580--client.set_event_callback("paint", set_paint)
1581
1582--aa indicator
1583function on_paint(c)
1584 local scrsize_x, scrsize_y = client.screen_size()
1585 local center_x, center_y = scrsize_x / 2, scrsize_y / 2
1586
1587 local indicator = ui.get(ui_indicator_combobox4)
1588 local indicator_r, indicator_g, indicator_b, indicator_a = ui.get(ui_indicator_color_picker4)
1589
1590 if ui.get(body_num) == 60 and indicator == "Metro" and ui.get(legitAA) == true then
1591 client.draw_text(c, center_x + 45, center_y, indicator_r, indicator_g, indicator_b, indicator_a, "c+", 0, "⮞")
1592 elseif ui.get(body_num) == -60 and indicator == "Metro" and ui.get(legitAA) == true then
1593 client.draw_text(c, center_x - 45, center_y, indicator_r, indicator_g, indicator_b, indicator_a, "c+", 0, "⮜")
1594 end
1595 if ui.get(body_num) == 60 and indicator == "Point arrows" and ui.get(legitAA) == true then
1596 client.draw_text(c, center_x + 45, center_y, indicator_r, indicator_g, indicator_b, indicator_a, "c+", 0, "→")
1597 elseif ui.get(body_num) == -60 and indicator == "Point arrows" and ui.get(legitAA) == true then
1598 client.draw_text(c, center_x - 45, center_y, indicator_r, indicator_g, indicator_b, indicator_a, "c+", 0, "←")
1599 end
1600 if ui.get(body_num) == 60 and indicator == "Dashes" and ui.get(legitAA) == true then
1601 client.draw_text(c, center_x + 45, center_y, indicator_r, indicator_g, indicator_b, indicator_a, "c-", 0, "—")
1602 elseif ui.get(body_num) == -60 and indicator == "Dashes" and ui.get(legitAA) == true then
1603 client.draw_text(c, center_x - 45, center_y, indicator_r, indicator_g, indicator_b, indicator_a, "c-", 0, "—")
1604 end
1605end
1606err = client.set_event_callback('paint', on_paint)
1607--trigger magnet
1608
1609--thx saph for callback shit
1610function on_paint(ctx)
1611 if ui.get(tm_cb) then
1612 local width, height = client.screen_size()
1613 if ui.get(triggermagnet) then
1614 ui.set(rageautofire, true)
1615 ui.set(ragebotmode, "Always on")
1616 else
1617 ui.set(rageautofire, false)
1618 ui.set(ragebotmode, "On hotkey")
1619 end
1620 end
1621end
1622
1623client.set_event_callback("paint", on_paint)
1624
1625-- autowall
1626
1627function on_paint(ctx)
1628 local rifle_autowall = table_contains(ui.get(non_adaptive_auto_autowall), "Autowall on key")
1629 if rifle_autowall and ui.get(non_adaptive_aw_check) then
1630 else return
1631 end
1632 if ui.get(autowalltoggle) then
1633 all_autowallkey_var = true
1634 else
1635 all_autowallkey_var = false
1636 end
1637end
1638
1639client.set_event_callback("paint", on_paint)
1640
1641--autowall if shot me
1642
1643function enablewhileshotme()
1644all_autowallifshot_var = true
1645 end
1646
1647function disablewhileshotme()
1648all_autowallifshot_var = false
1649 end
1650
1651function on_fire(e)
1652 local userID = e.userid
1653 local userEntIndex = client.userid_to_entindex(userID)
1654
1655 if userEntIndex == entity.get_local_player() then
1656
1657local global_autowall = table_contains(ui.get(non_adaptive_auto_autowall), "Autowall if shot me")
1658
1659if not global_autowall and ui.get(non_adaptive_aw_check) or not ui.get(non_adaptive_aw_check) or not global_autowall then
1660all_autowallifshot_var = false
1661return
1662end
1663
1664 client.delay_call(globals.tickinterval() * ui.get(beforedelay), enablewhileshotme)
1665 client.delay_call(globals.tickinterval() * ui.get(autodely), disablewhileshotme)
1666 end
1667 end
1668
1669client.set_event_callback("player_hurt", on_fire)
1670
1671function dynamicfov_logic_aw()
1672 if min_fovaw == nil or max_fovaw == nil or current_autofactoraw == nil then
1673 return
1674 end
1675
1676 if ui.get(autowalltoggle) then
1677 else return
1678 end
1679
1680 local global_autowall_dynamic = table_contains(ui.get(global_auto_autowall), "Dynamic autowall FOV")
1681 local pistol_autowall_dynamic = table_contains(ui.get(pistol_auto_autowall), "Dynamic autowall FOV")
1682 local heavypistol_autowall_dynamic = table_contains(ui.get(heavypistol_auto_autowall), "Dynamic autowall FOV")
1683 local awp_autowall_dynamic = table_contains(ui.get(awp_auto_autowall), "Dynamic autowall FOV")
1684 local scout_autowall_dynamic = table_contains(ui.get(scout_auto_autowall), "Dynamic autowall FOV")
1685 local autos_autowall_dynamic = table_contains(ui.get(auto_auto_autowall), "Dynamic autowall FOV")
1686 local rifle_autowall_dynamic = table_contains(ui.get(rifle_auto_autowall), "Dynamic autowall FOV")
1687 local old_fov = ui.get(ragebot_maximum_fov)
1688 dynamicfov_new_fov = old_fov
1689 local enemy_players = entity_get_players(true)
1690
1691 if min_fovaw > max_fovaw then
1692 store_min_fovaw = min_fovaw
1693 min_fovaw = max_fovaw
1694 max_fovaw = store_min_fovaw
1695 end
1696
1697
1698 if #enemy_players ~= 0 then
1699 local own_x, own_y, own_z = client_eye_position()
1700 local own_pitch, own_yaw = client_camera_angles()
1701 closest_enemy = nil
1702 local closest_distance = 999999999
1703
1704 for i = 1, #enemy_players do
1705 local enemy = enemy_players[i]
1706 local enemy_x, enemy_y, enemy_z = entity_hitbox_position(enemy, 0)
1707
1708 local x = enemy_x - own_x
1709 local y = enemy_y - own_y
1710 local z = enemy_z - own_z
1711
1712 local yaw = ((math_atan2(y, x) * 180 / math_pi))
1713 local pitch = -(math_atan2(z, math_sqrt(math_pow(x, 2) + math_pow(y, 2))) * 180 / math_pi)
1714
1715 local yaw_dif = math_abs(own_yaw % 360 - yaw % 360) % 360
1716 local pitch_dif = math_abs(own_pitch - pitch ) % 360
1717
1718 if yaw_dif > 180 then
1719 yaw_dif = 360 - yaw_dif
1720 end
1721
1722 local real_dif = math_sqrt(math_pow(yaw_dif, 2) + math_pow(pitch_dif, 2))
1723
1724 if closest_distance > real_dif then
1725 closest_distance = real_dif
1726 closest_enemy = enemy
1727 end
1728 end
1729
1730 if closest_enemy ~= nil then
1731 local closest_enemy_x, closest_enemy_y, closest_enemy_z = entity_hitbox_position(closest_enemy, 0)
1732 local real_distance = math_sqrt(math_pow(own_x - closest_enemy_x, 2) + math_pow(own_y - closest_enemy_y, 2) + math_pow(own_z - closest_enemy_z, 2))
1733
1734 dynamicfov_new_fov = (3800 / real_distance) * (current_autofactoraw * 0.01)
1735
1736
1737 if (dynamicfov_new_fov > max_fovaw) then
1738 dynamicfov_new_fov = max_fovaw
1739 elseif dynamicfov_new_fov < min_fovaw then
1740 dynamicfov_new_fov = min_fovaw
1741 end
1742 end
1743
1744 dynamicfov_new_fov = math_floor(dynamicfov_new_fov + 0.5)
1745
1746 if (dynamicfov_new_fov > closest_distance) then
1747 bool_in_fov = true
1748 else
1749 bool_in_fov = false
1750 end
1751 else
1752 dynamicfov_new_fov = min_fovaw
1753 bool_in_fov = false
1754 end
1755
1756
1757 --global
1758 if dynamicfov_new_fov ~= old_fov and ui.get(global_dynamicfov_enable) and current_weapon == "Global" and global_autowall_dynamic and ui.get(global_autowall_check) then
1759 ui.set(ragebot_maximum_fov, dynamicfov_new_fov)
1760 end
1761 --pistol
1762 if dynamicfov_new_fov ~= old_fov and ui.get(pistol_dynamicfov_enable) and current_weapon == "Pistol" and pistol_autowall_dynamic and ui.get(pistol_autowall_check) then
1763 ui.set(ragebot_maximum_fov, dynamicfov_new_fov)
1764 end
1765 --heavy pistol
1766 if dynamicfov_new_fov ~= old_fov and ui.get(heavypistol_dynamicfov_enable) and current_weapon == "Heavy pistol" and heavypistol_autowall_dynamic and ui.get(heavypistol_autowall_check) then
1767 ui.set(ragebot_maximum_fov, dynamicfov_new_fov)
1768 end
1769 --awp
1770 if dynamicfov_new_fov ~= old_fov and ui.get(awp_dynamicfov_enable) and current_weapon == "Awp" and awp_autowall_dynamic and ui.get(awp_autowall_check) then
1771 ui.set(ragebot_maximum_fov, dynamicfov_new_fov)
1772 end
1773 --scout
1774 if dynamicfov_new_fov ~= old_fov and ui.get(scout_dynamicfov_enable) and current_weapon == "Scout" and scout_autowall_dynamic and ui.get(scout_autowall_check) then
1775 ui.set(ragebot_maximum_fov, dynamicfov_new_fov)
1776 end
1777 --auto
1778 if dynamicfov_new_fov ~= old_fov and ui.get(auto_dynamicfov_enable) and current_weapon == "Auto" and auto_autowall_dynamic and ui.get(auto_autowall_check) then
1779 ui.set(ragebot_maximum_fov, dynamicfov_new_fov)
1780 end
1781 --rifle
1782 if dynamicfov_new_fov ~= old_fov and ui.get(rifle_dynamicfov_enable) and current_weapon == "Rifle" and rifle_autowall_dynamic and ui.get(rifle_autowall_check) then
1783 ui.set(ragebot_maximum_fov, dynamicfov_new_fov)
1784 end
1785 end
1786--drawing
1787function on_paint(ctx)
1788 dynamicfov_logic_aw()
1789end
1790
1791client.set_event_callback('paint', on_paint)
1792
1793--legitbot weapons
1794
1795function legitbotimp(disab)
1796if ui.get(legitbotimprovements, true) and not ui.get(triggermagnet) then
1797else return
1798end
1799 local_entindex = entity.get_local_player()
1800 local local_weapon = entity.get_player_weapon(local_entindex)
1801 local weapon_name = entity.get_classname(local_weapon)
1802 if weapon_name == "CWeaponAWP" or weapon_name == "CDEagle" or weapon_name == "CWeaponElite" or weapon_name == "CWeaponSSG08" or weapon_name == "CWeaponGlock" or weapon_name == "CWeaponHKP2000" or weapon_name == "CWeaponCZ75" or weapon_name == "CWeaponUSP" or weapon_name == "CWeaponP250" then
1803 ui.set(ragebot, true)
1804 return
1805 end
1806if disab.in_attack == 1 then
1807ui.set(ragebot, false)
1808else
1809ui.set(ragebot, true)
1810end
1811end
1812client.set_event_callback("setup_command", legitbotimp)
1813
1814--indicators
1815
1816legit_active, legit_key = ui.reference("Legit", "Aimbot", "Enabled")
1817rage_active, active_key = ui.reference("RAGE", "Aimbot", "Enabled")
1818
1819indicator = renderer.indicator
1820text = renderer.text
1821w, h = client.screen_size()
1822draw = {
1823 box = renderer.rectangle,
1824 line = renderer.line,
1825 text = renderer.text,
1826 measure_text = renderer.measure_text,
1827 gradient = renderer.gradient
1828}
1829h2o = 5
1830mouse_position = ui.mouse_position
1831wns = {
1832 x = database.read("0speclist_x") or 250,
1833 y = database.read("0speclist_y") or 25,
1834 w = database.read("0speclist_w") or 150,
1835 dragging = false,
1836 resize = false,
1837 rx = 0,
1838}
1839
1840client.set_event_callback("shutdown", function()
1841database.write("0speclist_x", wns.x)
1842database.write("0speclist_y", wns.y)
1843database.write("0speclist_w", wns.w)
1844end)
1845
1846function intersect(x, y, w, h, debug)
1847 local cx, cy = mouse_position()
1848 debug = debug or false
1849 if debug then
1850 renderer.rectangle(x, y, w, h, 255, 0, 0, 50)
1851 end
1852 return cx >= x and cx <= x + w and cy >= y and cy <= y + h
1853end
1854client.set_event_callback("paint", function(ctx, entity_index)
1855if ui.get(indicate_enable, true) then
1856else return
1857end
1858 local local_player = entity_get_local_player()
1859
1860 if not local_player or not entity.is_alive(local_player) then
1861 return
1862 end
1863 local_entindex = get_local_player()
1864 local local_weapon = entity.get_player_weapon(local_entindex)
1865 local weapon_name = entity.get_classname(local_weapon)
1866 local width, height = client.screen_size()
1867 local indiselect = ui.get(indicate_on)
1868 local triggermag = table_contains(ui.get(indicate_select), "Triggermagnet")
1869 local silentaim = table_contains(ui.get(indicate_select), "Silent aim")
1870 local autowalli = table_contains(ui.get(indicate_select), "Autowall")
1871 local fovi = table_contains(ui.get(indicate_select), "FOV")
1872 local forcebodyaims = table_contains(ui.get(indicate_select), "Force body aim")
1873 local legitboti = table_contains(ui.get(indicate_select), "Legitbot improvements")
1874 local bruteforcei = table_contains(ui.get(indicate_select), "Bruteforce")
1875 local safepointind = table_contains(ui.get(indicate_select), "Safe point")
1876
1877 local cx, cy = mouse_position()
1878
1879 local left_click = client.key_state(0x01)
1880
1881 if not wns.resize and ui.is_menu_open() then
1882 if wns.dragging and not left_click then
1883 wns.dragging = false
1884 end
1885
1886 if wns.dragging and left_click then
1887 wns.x = cx - wns.drag_x
1888 wns.y = cy - wns.drag_y
1889 end
1890
1891 if intersect(wns.x, wns.y, wns.w, 120) and left_click then
1892 wns.dragging = true
1893 wns.drag_x = cx - wns.x
1894 wns.drag_y = cy - wns.y
1895 end
1896 end
1897 if indiselect == "Default" then
1898 for iiiiiiiii = ui.get(indicateposition),1,-1
1899 do
1900 renderer.indicator(255,255,255,0,iiiiiiiii)
1901 end
1902 end
1903 local r,g,b,a = ui.get(indicate_color)
1904 if getui(rageautofire) == true and triggermag and indiselect == "Small" then
1905 text(wns.x + 8, wns.y + 10, r,g,b,a, "", 0, "TRIGGERBOT")
1906 elseif ui.get(rageautofire, true) and triggermag and indiselect == "Big" then
1907 client_draw_text(c, wns.x + 8, wns.y + 10, r,g,b,a, "+", 0, "trigger")
1908 elseif ui.get(rageautofire, true) and triggermag and indiselect == "Default" then
1909 renderer.indicator(r,g,b,a, "TM")
1910 end
1911 if getui(silent, true) and silentaim and indiselect == "Small" then
1912 text(wns.x + 8, wns.y + 22, r,g,b,a, "", 0, "SILENT AIM")
1913 elseif ui.get(silent, true) and silentaim and indiselect == "Big" then
1914 client_draw_text(c, wns.x + 8, wns.y + 30, r,g,b,a, "+", 0, "silent")
1915 elseif ui.get(silent, true) and silentaim and indiselect == "Default" then
1916 renderer.indicator(r,g,b,a, "SILENT")
1917 end
1918 if getui(autowall, true) and autowalli and indiselect == "Small" then
1919 text(wns.x + 8, wns.y + 34, r,g,b,a, "", 0, "AUTOWALL")
1920 elseif getui(autowall, true) and autowalli and indiselect == "Big" then
1921 client_draw_text(c, wns.x + 8, wns.y + 50, r,g,b,a, "+", 0, "autowall")
1922 elseif getui(autowall, true) and autowalli and indiselect == "Default" then
1923 renderer.indicator(r,g,b,a, "AW")
1924 end
1925 if getui(force_body_aim, true) and forcebodyaims and indiselect == "Small" then
1926 text(wns.x + 8, wns.y + 46, r,g,b,a, "", 0, "FORCE BODY AIM")
1927 elseif getui(force_body_aim, true) and forcebodyaims and indiselect == "Big" then
1928 client_draw_text(c, wns.x + 8, wns.y + 70, r,g,b,a, "+", 0, "baim")
1929 elseif getui(force_body_aim, true) and forcebodyaims and indiselect == "Default" then
1930 renderer.indicator(r,g,b,a, "BAIM")
1931 end
1932 if fovi and indiselect == "Small" then
1933 text(wns.x + 8, wns.y + 58, r,g,b,a, "", 0, "FOV:", getui(ragebot_maximum_fov))
1934 elseif fovi and indiselect == "Big" then
1935 client_draw_text(c, wns.x + 8, wns.y + 90, r,g,b,a, "+", 0, "fov:", getui(ragebot_maximum_fov))
1936 elseif fovi and indiselect == "Default" then
1937 renderer.indicator(r,g,b,a, "FOV:", getui(ragebot_maximum_fov))
1938 end
1939 if ui.get(forcebodyyaw) == 60 and bruteforcei and indiselect == "Small" and ui.get(overridebutton, true) and ui.get(resolverselect) == "Override" then
1940 text(wns.x + 8, wns.y + 70, r,g,b,a, "", 0, "BRUTE:RIGHT")
1941 elseif ui.get(forcebodyyaw) == 60 and bruteforcei and indiselect == "Big" and ui.get(overridebutton, true) and ui.get(resolverselect) == "Override" then
1942 client_draw_text(c, wns.x + 8, wns.y + 110, r,g,b,a, "+", 0, "brute:right")
1943 elseif ui.get(forcebodyyaw) == 60 and bruteforcei and indiselect == "Default" and ui.get(overridebutton, true) and ui.get(resolverselect) == "Override" then
1944 renderer.indicator(r,g,b,a, "B:RIGHT")
1945 end
1946 if ui.get(forcebodyyaw) == -60 and bruteforcei and indiselect == "Small" and ui.get(overridebutton, true) and ui.get(resolverselect) == "Override" then
1947 text(wns.x + 8, wns.y + 70, r,g,b,a, "", 0, "BRUTE:LEFT")
1948 elseif ui.get(forcebodyyaw) == -60 and bruteforcei and indiselect == "Big" and ui.get(overridebutton, true) and ui.get(resolverselect) == "Override" then
1949 client_draw_text(c, wns.x + 8, wns.y + 110, r,g,b,a, "+", 0, "brute:left")
1950 elseif ui.get(forcebodyyaw) == -60 and bruteforcei and indiselect == "Default" and ui.get(overridebutton, true) and ui.get(resolverselect) == "Override" then
1951 renderer.indicator(r,g,b,a, "B:LEFT")
1952 end
1953 if ui.get(forcebody) == false and bruteforcei and indiselect == "Small" and ui.get(overridebutton, true) and ui.get(resolverselect) == "Override" then
1954 text(wns.x + 8, wns.y + 70, r,g,b,a, "", 0, "BRUTE:OFF")
1955 elseif ui.get(forcebody) == false and bruteforcei and indiselect == "Big" and ui.get(overridebutton, true) and ui.get(resolverselect) == "Override" then
1956 client_draw_text(c, wns.x + 8, wns.y + 110, r,g,b,a, "+", 0, "brute:off")
1957 elseif ui.get(forcebody) == false and bruteforcei and indiselect == "Default" and ui.get(overridebutton, true) and ui.get(resolverselect) == "Override" then
1958 renderer.indicator(r,g,b,a, "B:OFF")
1959 end
1960 if ui.get(forcesafepoint) and safepointind and indiselect == "Small" then
1961 text(wns.x + 8, wns.y + 94, r,g,b,a, "", 0, "SAFE POINT")
1962 elseif ui.get(forcesafepoint) and safepointind and indiselect == "Big" then
1963 client_draw_text(c, wns.x + 8, wns.y + 150, r,g,b,a, "+", 0, "safe")
1964 elseif ui.get(forcesafepoint) and safepointind and indiselect == "Default" then
1965 renderer.indicator(r,g,b,a, "SAFE")
1966 end
1967 if weapon_name == "CWeaponAWP" and legitboti and indiselect == "Small" or weapon_name == "CDEagle" and legitboti and indiselect == "Small" or weapon_name == "CWeaponElite" and legitboti and indiselect == "Small" or weapon_name == "CWeaponSSG08" and legitboti and indiselect == "Small" or weapon_name == "CWeaponGlock" and legitboti and indiselect == "Small" or weapon_name == "CWeaponHKP2000" and legitboti and indiselect == "Small" or weapon_name == "CWeaponCZ75" and legitboti and indiselect == "Small" or weapon_name == "CWeaponUSP" and legitboti and indiselect == "Small" or weapon_name == "CWeaponP250" and legitboti and indiselect == "Small" then
1968 text(wns.x + 8, wns.y + 82, r,g,b,a, "", 0, "RAGEBOT")
1969 elseif weapon_name == "CWeaponAWP" and legitboti and indiselect == "Big" or weapon_name == "CDEagle" and legitboti and indiselect == "Big" or weapon_name == "CWeaponElite" and legitboti and indiselect == "Big" or weapon_name == "CWeaponSSG08" and legitboti and indiselect == "Big" or weapon_name == "CWeaponGlock" and legitboti and indiselect == "Big" or weapon_name == "CWeaponHKP2000" and legitboti and indiselect == "Big" or weapon_name == "CWeaponCZ75" and legitboti and indiselect == "Big" or weapon_name == "CWeaponUSP" and legitboti and indiselect == "Big" or weapon_name == "CWeaponP250" and legitboti and indiselect == "Big" then
1970 client_draw_text(c, wns.x + 8, wns.y + 130, r,g,b,a, "+", 0, "ragebot")
1971 elseif weapon_name == "CWeaponAWP" and legitboti and indiselect == "Default" or weapon_name == "CDEagle" and legitboti and indiselect == "Default" or weapon_name == "CWeaponElite" and legitboti and indiselect == "Default" or weapon_name == "CWeaponSSG08" and legitboti and indiselect == "Default" or weapon_name == "CWeaponGlock" and legitboti and indiselect == "Default" or weapon_name == "CWeaponHKP2000" and legitboti and indiselect == "Default" or weapon_name == "CWeaponCZ75" and legitboti and indiselect == "Default" or weapon_name == "CWeaponUSP" and legitboti and indiselect == "Default" or weapon_name == "CWeaponP250" and legitboti and indiselect == "Default" then
1972 renderer.indicator(r,g,b,a, "RAGE")
1973 else
1974 if legitboti and indiselect == "Small" then
1975 text(wns.x + 8, wns.y + 82, r,g,b,a, "", 0, "LEGITBOT")
1976 elseif legitboti and indiselect == "Big" then
1977 client_draw_text(c, wns.x + 8, wns.y + 130, r,g,b,a, "+", 0, "legitbot")
1978 elseif legitboti and indiselect == "Default" then
1979 renderer.indicator(r,g,b,a, "LEGIT")
1980 end
1981 end
1982end)
1983
1984-- Tempest AA fix by Kessie and Whæliin
1985
1986local player_is_alive
1987local spamtime = 0
1988local antiresolve
1989local delay_time = 0
1990local inverse_time = 0
1991local anti_resolve_timer = 0
1992
1993function contains(table, val)
1994 for i = 1, #table do
1995 if table[i] == val then
1996 return true
1997 end
1998 end
1999
2000 return false
2001end
2002
2003function anti_resolver2()
2004 if ui.get(legitAA, true) then
2005 else return
2006 end
2007 if ui.get(LegitAABreaker) == "Break bruteforce" then
2008 if ui.get(brutemode2) == "Slow" then
2009 if globals.realtime() >= anti_resolve_timer then
2010 client.delay_call(0.1, ui.set, limit, 60)
2011 client.delay_call(1.1, ui.set, limit, 2)
2012
2013 anti_resolve_timer = globals.realtime() + 1.1
2014 end
2015 end
2016
2017 if ui.get(brutemode2) == "Fast" then
2018 if globals.realtime() >= anti_resolve_timer then
2019 client.delay_call(0.1, ui.set, limit, 60)
2020 client.delay_call(0.5, ui.set, limit, 2)
2021
2022 anti_resolve_timer = globals.realtime() + 0.5
2023 end
2024 end
2025
2026 if ui.get(brutemode2) == "Jitter" then
2027 if globals.realtime() >= anti_resolve_timer then
2028 client.delay_call(0.08, ui.set, limit, 60)
2029 client.delay_call(0.06, ui.set, limit, 0)
2030
2031 anti_resolve_timer = globals.realtime() + 0.2
2032 end
2033 end
2034 end
2035 end
2036client.set_event_callback("run_command", anti_resolver2)
2037
2038--niggahook tag
2039
2040
2041function time_to_ticks(time)
2042 return math_floor(time / globals.tickinterval() + .5)
2043end
2044
2045clan_tag_prev = ""
2046enabled_prev = "Off"
2047
2048function gamesense_anim(text, indices)
2049 local text_anim = " " .. text .. " "
2050 local tickinterval = globals.tickinterval()
2051 local tickcount = globals.tickcount() + 300 + time_to_ticks(client_latency())
2052 local i = tickcount / time_to_ticks(0.3)
2053 i = math_floor(i % #indices)
2054 i = indices[i+1]+1
2055
2056 return string_sub(text_anim, i, i+15)
2057end
2058
2059function run_tag_animation()
2060 if ui.get(ngahooktag_enabled, true) then
2061 local clan_tag = gamesense_anim("nigahook", {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 11, 11, 11, 11, 11, 11, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22})
2062 if clan_tag ~= clan_tag_prev then
2063 local fixed = string.sub(clan_tag, 1, 15)
2064 local spaces = string.gsub(fixed, "\x20\x20\x20", "\xE2\xA0\x80")
2065 client.set_clan_tag(spaces)
2066 end
2067 clan_tag_prev = clan_tag
2068 end
2069end
2070
2071function on_paint(ctx)
2072 if ui.get(ngahooktag_enabled, true) then
2073 local local_player = entity.get_local_player()
2074 if local_player ~= nil and (not entity.is_alive(local_player)) and globals.tickcount() % 2 == 0 then
2075 run_tag_animation()
2076 end
2077 end
2078end
2079client.set_event_callback("paint", on_paint)
2080
2081function on_run_command(e)
2082 if ui.get(ngahooktag_enabled, true) then
2083 if e.chokedcommands == 0 then
2084 run_tag_animation()
2085 end
2086 end
2087end
2088client.set_event_callback("run_command", on_run_command)
2089
2090--namespam
2091
2092namecombo = ui.new_combobox("MISC", "Miscellaneous", "Spam type", "nigahook spam", "NA>EU", "Custom")
2093
2094firstlabel = ui.new_label("MISC", "Miscellaneous", "First spam")
2095firstspam = ui.new_textbox("MISC", "Miscellaneous", "First spam")
2096secondlabel = ui.new_label("MISC", "Miscellaneous", "Second spam")
2097secondspam = ui.new_textbox("MISC", "Miscellaneous", "Second spam")
2098thirdlabel = ui.new_label("MISC", "Miscellaneous", "Third spam")
2099thirdspam = ui.new_textbox("MISC", "Miscellaneous", "Third spam")
2100fourthlabel = ui.new_label("MISC", "Miscellaneous", "Fourth spam")
2101fourthspam = ui.new_textbox("MISC", "Miscellaneous", "Fourth spam")
2102
2103function AIDS(name)
2104 client.set_cvar("name", name)
2105end
2106
2107ui.new_button("MISC", "Miscellaneous", "nigahook spam", function ()
2108 oldName = client.get_cvar("name")
2109 if ui.get(namecombo) == "nigahook spam" then
2110 client.delay_call(0.3, AIDS, "Oh")
2111 client.delay_call(0.6, AIDS, "Oh shit")
2112 client.delay_call(0.9, AIDS, "Oh shit its")
2113 client.delay_call(1.2, AIDS, "Oh shit its nigahook")
2114 client.delay_call(1.5, AIDS, oldName)
2115 elseif ui.get(namecombo) == "NA>EU" then
2116 client.delay_call(0.3, AIDS, "$$")
2117 client.delay_call(0.6, AIDS, "$$NA")
2118 client.delay_call(0.9, AIDS, "$$NA>EU")
2119 client.delay_call(1.2, AIDS, "$$NA>EU$$")
2120 client.delay_call(1.5, AIDS, oldName)
2121 elseif ui.get(namecombo) == "Custom" then
2122 client.delay_call(0.3, AIDS, ui.get(firstspam))
2123 client.delay_call(0.6, AIDS, ui.get(secondspam))
2124 client.delay_call(0.9, AIDS, ui.get(thirdspam))
2125 client.delay_call(1.2, AIDS, ui.get(fourthspam))
2126 client.delay_call(1.5, AIDS, oldName)
2127 end
2128end)
2129----silent aim on key
2130
2131function on_paint(ctx)
2132 local non_adaptive_mulit = table_contains(ui.get(non_adaptive_silentaim), "Silent aim on key")
2133 local non_adaptivesilent_check = ui.get(non_adaptive_silentcheck)
2134 if non_adaptive_mulit and non_adaptivesilent_check then
2135 else return
2136 end
2137
2138 if ui.get(silentkey) then
2139 global_silentkey_var = true
2140 else
2141 global_silentkey_var = false
2142 end
2143end
2144
2145client.set_event_callback("paint", on_paint)
2146
2147--silent aim in distance
2148
2149event_handler_functions = {
2150 [true] = client.set_event_callback,
2151 [false] = client.unset_event_callback,
2152}
2153
2154function get_distance(x1, y1, z1, x2, y2, z2)
2155 return math.sqrt((x2 - x1)^2 + (y2 - y1)^2 + (z2 - z1)^2)
2156end
2157
2158function on_run_command()
2159 local silentaim_global = table_contains(ui.get(global_silentmulti), "Silent aim in distance")
2160 local silentaim_pistol = table_contains(ui.get(pistol_silentmulti), "Silent aim in distance")
2161 local silentaim_heavypistol = table_contains(ui.get(heavypistol_silentmulti), "Silent aim in distance")
2162 local silentaim_awp = table_contains(ui.get(awp_silentmulti), "Silent aim in distance")
2163 local silentaim_scout = table_contains(ui.get(scout_silentmulti), "Silent aim in distance")
2164 local silentaim_auto = table_contains(ui.get(auto_silentmulti), "Silent aim in distance")
2165 local silentaim_rifle = table_contains(ui.get(rifle_silentmulti), "Silent aim in distance")
2166
2167 local players = entity.get_players(true)
2168 local lx, ly, lz = entity.get_prop(entity.get_local_player(), "m_vecOrigin")
2169 for i=1, #players do
2170 local x, y, z = entity.get_prop(players[i], "m_vecOrigin")
2171 local distance = get_distance(lx, ly, lz, x, y, z)
2172 local weapon = entity.get_player_weapon(players[i])
2173 --global
2174 if distance <= ui.get(global_silentdistance) and silentaim_global and current_weapon == "Global" and ui.get(global_silentcheck) then
2175 global_silent_var = true
2176 else
2177 global_silent_var = false
2178 end
2179 --pistol
2180 if distance <= ui.get(pistol_silentdistance) and silentaim_pistol and current_weapon == "Pistol" and ui.get(pistol_silentcheck) then
2181 pistol_silent_var = true
2182 else
2183 pistol_silent_var = false
2184 end
2185 --heavy pistol
2186 if distance <= ui.get(heavypistol_silentdistance) and silentaim_heavypistol and current_weapon == "Heavy pistol" and ui.get(heavypistol_silentcheck) then
2187 heavypistol_silent_var = true
2188 else
2189 heavypistol_silent_var = false
2190 end
2191 --awp
2192 if distance <= ui.get(awp_silentdistance) and silentaim_awp and current_weapon == "Awp" and ui.get(awp_silentcheck) then
2193 awp_silent_var = true
2194 else
2195 awp_silent_var = false
2196 end
2197 --scout
2198 if distance <= ui.get(scout_silentdistance) and silentaim_scout and current_weapon == "Scout" and ui.get(scout_silentcheck) then
2199 scout_silent_var = true
2200 else
2201 scout_silent_var = false
2202 end
2203 --auto
2204 if distance <= ui.get(auto_silentdistance) and silentaim_auto and current_weapon == "Auto" and ui.get(auto_silentcheck) then
2205 auto_silent_var = true
2206 else
2207 auto_silent_var = false
2208 end
2209 --rifle
2210 if distance <= ui.get(rifle_silentdistance) and silentaim_rifle and current_weapon == "Rifle" and ui.get(rifle_silentcheck) then
2211 rifle_silent_var = true
2212 else
2213 rifle_silent_var = false
2214 end
2215 end
2216end
2217
2218client.set_event_callback("run_command", on_run_command)
2219
2220--silent aim while slow walking
2221
2222function slowwalksilent(ctx)
2223 local silentaim_global = table_contains(ui.get(global_silentmulti), "Silent aim while slow walking")
2224 local silentaim_pistol = table_contains(ui.get(pistol_silentmulti), "Silent aim while slow walking")
2225 local silentaim_heavypistol = table_contains(ui.get(heavypistol_silentmulti), "Silent aim while slow walking")
2226 local silentaim_awp = table_contains(ui.get(awp_silentmulti), "Silent aim while slow walking")
2227 local silentaim_scout = table_contains(ui.get(scout_silentmulti), "Silent aim while slow walking")
2228 local silentaim_auto = table_contains(ui.get(auto_silentmulti), "Silent aim while slow walking")
2229 local silentaim_rifle = table_contains(ui.get(rifle_silentmulti), "Silent aim while slow walking")
2230 --global
2231 if ui.get(hotkey_reference) and ui.get(global_silentcheck) and silentaim_global and current_weapon == "Global" then
2232 global_slowwalk_var = true
2233 elseif not ui.get(hotkey_reference) and ui.get(global_silentcheck) and silentaim_global or not ui.get(global_silentcheck) or not silentaim_global or not current_weapon == "Global" then
2234 global_slowwalk_var = false
2235 end
2236 --pistol
2237 if ui.get(hotkey_reference) and ui.get(pistol_silentcheck) and silentaim_pistol and current_weapon == "Pistol" then
2238 pistol_slowwalk_var = true
2239 elseif not ui.get(hotkey_reference) and ui.get(pistol_silentcheck) and silentaim_pistol or not ui.get(pistol_silentcheck) or not silentaim_pistol or not current_weapon == "Pistol" then
2240 pistol_slowwalk_var = false
2241 end
2242 --heavy pistol
2243 if ui.get(hotkey_reference) and ui.get(heavypistol_silentcheck) and silentaim_heavypistol and current_weapon == "Heavy pistol" then
2244 heavypistol_slowwalk_var = true
2245 elseif not ui.get(hotkey_reference) and ui.get(heavypistol_silentcheck) and silentaim_heavypistol or not ui.get(heavypistol_silentcheck) or not silentaim_heavypistol or not current_weapon == "Heavy pistol" then
2246 heavypistol_slowwalk_var = false
2247 end
2248 --awp
2249 if ui.get(hotkey_reference) and ui.get(awp_silentcheck) and silentaim_awp and current_weapon == "Awp" then
2250 awp_slowwalk_var = true
2251 elseif not ui.get(hotkey_reference) and ui.get(awp_silentcheck) and silentaim_awp or not ui.get(awp_silentcheck) or not silentaim_awp or not current_weapon == "Awp" then
2252 awp_slowwalk_var = false
2253 end
2254 --scout
2255 if ui.get(hotkey_reference) and ui.get(scout_silentcheck) and silentaim_scout and current_weapon == "Scout" then
2256 scout_slowwalk_var = true
2257 elseif not ui.get(hotkey_reference) and ui.get(scout_silentcheck) and silentaim_scout or not ui.get(scout_silentcheck) or not silentaim_scout or not current_weapon == "Scout" then
2258 scout_slowwalk_var = false
2259 end
2260 --auto
2261 if ui.get(hotkey_reference) and ui.get(auto_silentcheck) and silentaim_auto and current_weapon == "Auto" then
2262 auto_slowwalk_var = true
2263 elseif not ui.get(hotkey_reference) and ui.get(auto_silentcheck) and silentaim_auto or not ui.get(auto_silentcheck) or not silentaim_auto or not current_weapon == "Auto" then
2264 auto_slowwalk_var = false
2265 end
2266 --rifle
2267 if ui.get(hotkey_reference) and ui.get(rifle_silentcheck) and silentaim_rifle and current_weapon == "Rifle" then
2268 rifle_slowwalk_var = true
2269 elseif not ui.get(hotkey_reference) and ui.get(rifle_silentcheck) and silentaim_rifle or not ui.get(rifle_silentcheck) or not silentaim_rifle or not current_weapon == "Rifle" then
2270 rifle_slowwalk_var = false
2271 end
2272end
2273
2274client.set_event_callback("paint", slowwalksilent)
2275
2276
2277--slowwalk
2278
2279slowwalkcheck = ui.new_checkbox("AA", "Other", "Slow motion limit")
2280limit_reference = ui.new_slider("AA", "Other", "Slow motion limit", 10, 57, 50, 57, "", 1, {[57] = "Max"})
2281function modify_velocity(cmd, goalspeed)
2282if ui.get(slowwalkcheck, true) then
2283else return
2284end
2285 if goalspeed <= 0 then
2286 return
2287 end
2288
2289 local minimalspeed = math.sqrt((cmd.forwardmove * cmd.forwardmove) + (cmd.sidemove * cmd.sidemove))
2290
2291 if minimalspeed <= 0 then
2292 return
2293 end
2294
2295 if cmd.in_duck == 1 then
2296 goalspeed = goalspeed * 2.94117647 -- wooo cool magic number
2297 end
2298
2299 if minimalspeed <= goalspeed then
2300 return
2301 end
2302
2303 local speedfactor = goalspeed / minimalspeed
2304 cmd.forwardmove = cmd.forwardmove * speedfactor
2305 cmd.sidemove = cmd.sidemove * speedfactor
2306end
2307
2308function on_setup_cmd(cmd)
2309if ui.get(slowwalkcheck, true) then
2310else return
2311end
2312 local checkbox = ui.get(checkbox_reference)
2313 local hotkey = ui.get(hotkey_reference)
2314 local limit = ui.get(limit_reference)
2315
2316 if limit >= 57 then
2317 return
2318 end
2319
2320 if checkbox and hotkey then
2321 modify_velocity(cmd, limit)
2322 end
2323end
2324
2325client.set_event_callback('setup_command', on_setup_cmd)
2326
2327--experimental dynamic legit aa
2328
2329local flips
2330local desync_types
2331
2332
2333function switch_desyncs()
2334 if ui.get(legitAAbase, "Dynamic") and ui.get(legitAA, true) then
2335 else return
2336 end
2337
2338 if entity_get_local_player() == nil or entity_get_prop(entity_get_local_player(), "m_iHealth") <= 0 then
2339 return
2340 end
2341
2342 local vel_x, vel_y = entity_get_prop(entity_get_local_player(), "m_vecVelocity")
2343 local vel = math_sqrt(vel_x^2 + vel_y^2)
2344
2345
2346
2347 desync_types = ui.get(LegitAABreaker) == "Smart" and 1 or 0
2348
2349
2350 local sFlips = globals_tickcount() % 100 > 1 and globals_tickcount() % 100 < 50 and true or false
2351
2352 if desync_types == 0 then
2353
2354 if ui.get(LegitAABreaker) == "Fast" then
2355 local random = client_random_int(1, 5)
2356 if random == 1 then
2357 ui.set(lby, "Off")
2358 end
2359 if random == 2 then
2360 ui.set(lby, "Sway")
2361 end
2362 if random == 3 then
2363 ui.set(lby, "Opposite")
2364 end
2365 if random == 4 then
2366 ui.set(lby, sFlips and "Sway" or "Opposite")
2367 end
2368 end
2369 end
2370
2371 end
2372function desync()
2373 if entity_get_local_player() == nil or entity_get_prop(entity_get_local_player(), "m_iHealth") <= 0 then
2374 return
2375 end
2376
2377 local show_desync = desync_types == 0
2378
2379
2380
2381
2382
2383
2384 if ui.get(LegitAABreaker, "Slow" or "Fast") then
2385 switch_desyncs()
2386 end
2387end
2388
2389client.set_event_callback("paint", desync)
2390
2391--edge aw
2392
2393local client_camera_angles, client_trace_line, entity_get_local_player, entity_get_players, entity_get_prop, entity_hitbox_position, math_acos, math_cos, math_sin, math_sqrt = client.camera_angles, client.trace_line, entity.get_local_player, entity.get_players, entity.get_prop, entity.hitbox_position, math.acos, math.cos, math.sin, math.sqrt
2394
2395maximum_fov_ref = ui_reference("RAGE", "Aimbot", "Maximum FOV")
2396
2397DEG_TO_RAD = pi / 180.0
2398RAD_TO_DEG = 180.0 / pi
2399
2400--------------------------------------------------------------------------------
2401-- Utility functions
2402--------------------------------------------------------------------------------
2403function vec3_normalize(x, y, z)
2404 local len = math_sqrt(x*x + y*y + z*z)
2405 if len == 0 then
2406 return 0, 0, 0
2407 end
2408 local r = 1 / len
2409 return x*r, y*r, z*r
2410end
2411
2412function vec3_dot(ax, ay, az, bx, by, bz)
2413 return ax*bx + ay*by + az*bz
2414end
2415
2416function angle_to_vec(pitch, yaw)
2417 local pitch_rad, yaw_rad = DEG_TO_RAD*pitch, DEG_TO_RAD*yaw
2418 local sp, cp, sy, cy = math_sin(pitch_rad), math_cos(pitch_rad), math_sin(yaw_rad), math_cos(yaw_rad)
2419 return cp*cy, cp*sy, -sp
2420end
2421
2422function calculate_fov_to_player(ent, lx, ly, lz, fx, fy, fz)
2423 local px, py, pz = entity_get_prop(ent, "m_vecOrigin")
2424 local dx, dy, dz = vec3_normalize(px-lx, py-ly, lz-lz)
2425 local dot_product = vec3_dot(dx, dy, dz, fx, fy, fz)
2426 local cos_inverse = math_acos(dot_product)
2427 return RAD_TO_DEG*cos_inverse
2428end
2429
2430function get_closest_player_to_crosshair(lx, ly, lz, pitch, yaw)
2431 -- Calculate our forward vector once instead of doing it for each player
2432 local fx, fy, fz = angle_to_vec(pitch, yaw)
2433 local enemy_players = entity_get_players(true)
2434
2435 local nearest_player = nil
2436 local nearest_player_fov = math.huge
2437
2438 for i=1, #enemy_players do
2439 local enemy_ent = enemy_players[i]
2440
2441 -- Calculate the FOV to the player so we can determine if they are closer than the stored player
2442 local fov_to_player = calculate_fov_to_player(enemy_ent, lx, ly, lz, fx, fy, fz)
2443
2444 if fov_to_player <= nearest_player_fov then
2445 nearest_player = enemy_ent
2446 nearest_player_fov = fov_to_player
2447 end
2448 end
2449
2450 return nearest_player, nearest_player_fov
2451end
2452
2453function is_player_visible(local_player, lx, ly, lz, ent)
2454 local visible_hitboxes = 0
2455
2456 for i=0, 18 do
2457 -- Get the current hitbox position so that we can run a trace to it and see if it is hit
2458 local ex, ey, ez = entity_hitbox_position(ent, i)
2459 -- Run the trace from our eye position to the hitbox if the trace hits the enemy then we know the player is visible
2460 local _, entindex = client_trace_line(local_player, lx, ly, lz, ex, ey, ez)
2461
2462 if entindex == ent then
2463 -- Increment the visible hitbox counter so that we can determine if the player meets the threshold
2464 visible_hitboxes = visible_hitboxes + 1
2465 end
2466 end
2467
2468 return visible_hitboxes >= visible_hitbox_threshold
2469end
2470
2471--------------------------------------------------------------------------------
2472-- Callback functions
2473--------------------------------------------------------------------------------
2474
2475function on_run_command()
2476 local global_autowall = table_contains(ui.get(global_auto_autowall), "Edge autowall")
2477 local pistol_autowall = table_contains(ui.get(pistol_auto_autowall), "Edge autowall")
2478 local heavypistol_autowall = table_contains(ui.get(heavypistol_auto_autowall), "Edge autowall")
2479 local awp_autowall = table_contains(ui.get(awp_auto_autowall), "Edge autowall")
2480 local scout_autowall = table_contains(ui.get(scout_auto_autowall), "Edge autowall")
2481 local autos_autowall = table_contains(ui.get(auto_auto_autowall), "Edge autowall")
2482 local rifle_autowall = table_contains(ui.get(rifle_auto_autowall), "Edge autowall")
2483
2484
2485
2486
2487
2488 local maximum_fov = ui.get(maximum_fov_ref)
2489 local local_player = entity_get_local_player()
2490
2491 local pitch, yaw = client_camera_angles()
2492 local lx, ly, lz = entity_get_prop(local_player, "m_vecOrigin")
2493
2494 local nearest_player, nearest_player_fov = get_closest_player_to_crosshair(lx, ly, lz, pitch, yaw)
2495
2496 local view_offset = entity_get_prop(local_player, "m_vecViewOffset[2]")
2497 local lz = lz + view_offset
2498 --global
2499 if nearest_player ~= nil and nearest_player_fov <= maximum_fov and global_autowall and current_weapon == "Global" and ui.get(global_autowall_check) then
2500 global_autowall_var = is_player_visible(local_player, lx, ly, lz, nearest_player)
2501 else
2502 global_autowall_var = false
2503 end
2504 --pistol
2505 if nearest_player ~= nil and nearest_player_fov <= maximum_fov and pistol_autowall and current_weapon == "Pistol" and ui.get(pistol_autowall_check) then
2506 pistol_autowall_var = is_player_visible(local_player, lx, ly, lz, nearest_player)
2507 else
2508 pistol_autowall_var = false
2509 end
2510 --heavy pistol
2511 if nearest_player ~= nil and nearest_player_fov <= maximum_fov and heavypistol_autowall and current_weapon == "Heavy pistol" and ui.get(heavypistol_autowall_check) then
2512 heavypistol_autowall_var = is_player_visible(local_player, lx, ly, lz, nearest_player)
2513 else
2514 heavypistol_autowall_var = false
2515 end
2516 --awp
2517 if nearest_player ~= nil and nearest_player_fov <= maximum_fov and awp_autowall and current_weapon == "Awp" and ui.get(awp_autowall_check) then
2518 awp_autowall_var = is_player_visible(local_player, lx, ly, lz, nearest_player)
2519 else
2520 awp_autowall_var = false
2521 end
2522 --scout
2523 if nearest_player ~= nil and nearest_player_fov <= maximum_fov and scout_autowall and current_weapon == "Scout" and ui.get(scout_autowall_check) then
2524 scout_autowall_var = is_player_visible(local_player, lx, ly, lz, nearest_player)
2525 else
2526 scout_autowall_var = false
2527 end
2528 --auto
2529 if nearest_player ~= nil and nearest_player_fov <= maximum_fov and autos_autowall and current_weapon == "Auto" and ui.get(auto_autowall_check) then
2530 auto_autowall_var = is_player_visible(local_player, lx, ly, lz, nearest_player)
2531 else
2532 auto_autowall_var = false
2533 end
2534 --rifle
2535 if nearest_player ~= nil and nearest_player_fov <= maximum_fov and rifle_autowall and current_weapon == "Rifle" and ui.get(rifle_autowall_check) then
2536 rifle_autowall_var = is_player_visible(local_player, lx, ly, lz, nearest_player)
2537 else
2538 rifle_autowall_var = false
2539 end
2540 end
2541
2542client.set_event_callback("run_command", on_run_command)
2543
2544--silent aim if under fov
2545
2546function run_cmd()
2547 local silentaim_global = table_contains(ui.get(global_silentmulti), "Silent aim if in fov")
2548 local silentaim_pistol = table_contains(ui.get(pistol_silentmulti), "Silent aim if in fov")
2549 local silentaim_heavypistol = table_contains(ui.get(heavypistol_silentmulti), "Silent aim if in fov")
2550 local silentaim_awp = table_contains(ui.get(awp_silentmulti), "Silent aim if in fov")
2551 local silentaim_scout = table_contains(ui.get(scout_silentmulti), "Silent aim if in fov")
2552 local silentaim_auto = table_contains(ui.get(auto_silentmulti), "Silent aim if in fov")
2553 local silentaim_rifle = table_contains(ui.get(rifle_silentmulti), "Silent aim if in fov")
2554
2555
2556 local local_player = entity_get_local_player()
2557
2558 local pitch, yaw = client_camera_angles()
2559 local lx, ly, lz = entity_get_prop(local_player, "m_vecOrigin")
2560
2561 local nearest_player, nearest_player_fov = get_closest_player_to_crosshair(lx, ly, lz, pitch, yaw)
2562 --global
2563 if nearest_player ~= nil and nearest_player_fov <= ui.get(global_silentfovslider) and silentaim_global and current_weapon == "Global" and ui.get(global_silentcheck) then
2564 global_silent_var_fov = true
2565 else
2566 global_silent_var_fov = false
2567 end
2568 --pistol
2569 if nearest_player ~= nil and nearest_player_fov <= ui.get(pistol_silentfovslider) and silentaim_pistol and current_weapon == "Pistol" and ui.get(pistol_silentcheck) then
2570 pistol_silent_var_fov = true
2571 else
2572 pistol_silent_var_fov = false
2573 end
2574 --heavy pistol
2575 if nearest_player ~= nil and nearest_player_fov <= ui.get(heavypistol_silentfovslider) and silentaim_heavypistol and current_weapon == "Heavy pistol" and ui.get(heavypistol_silentcheck) then
2576 heavypistol_silent_var_fov = true
2577 else
2578 heavypistol_silent_var_fov = false
2579 end
2580 --awp
2581 if nearest_player ~= nil and nearest_player_fov <= ui.get(awp_silentfovslider) and silentaim_awp and current_weapon == "Awp" and ui.get(awp_silentcheck) then
2582 awp_silent_var_fov = true
2583 else
2584 awp_silent_var_fov = false
2585 end
2586 --scout
2587 if nearest_player ~= nil and nearest_player_fov <= ui.get(scout_silentfovslider) and silentaim_scout and current_weapon == "Scout" and ui.get(scout_silentcheck) then
2588 scout_silent_var_fov = true
2589 else
2590 scout_silent_var_fov = false
2591 end
2592 --auto
2593 if nearest_player ~= nil and nearest_player_fov <= ui.get(auto_silentfovslider) and silentaim_auto and current_weapon == "Auto" and ui.get(auto_silentcheck) then
2594 auto_silent_var_fov = true
2595 else
2596 auto_silent_var_fov = false
2597 end
2598 --rifle
2599 if nearest_player ~= nil and nearest_player_fov <= ui.get(rifle_silentfovslider) and silentaim_rifle and current_weapon == "Rifle" and ui.get(rifle_silentcheck) then
2600 rifle_silent_var_fov = true
2601 else
2602 rifle_silent_var_fov = false
2603 end
2604 end
2605
2606client.set_event_callback("run_command", run_cmd)
2607
2608--visible min damage
2609
2610function on_run_command()
2611 local mindmg_visible_global = table_contains(ui.get(global_mindmg_multi), "Visible and non visible override")
2612 local mindmg_visible_pistol = table_contains(ui.get(pistol_mindmg_multi), "Visible and non visible override")
2613 local mindmg_visible_heavypistol = table_contains(ui.get(heavypistol_mindmg_multi), "Visible and non visible override")
2614 local mindmg_visible_awp = table_contains(ui.get(awp_mindmg_multi), "Visible and non visible override")
2615 local mindmg_visible_scout = table_contains(ui.get(scout_mindmg_multi), "Visible and non visible override")
2616 local mindmg_visible_auto = table_contains(ui.get(auto_mindmg_multi), "Visible and non visible override")
2617 local mindmg_visible_rifle = table_contains(ui.get(rifle_mindmg_multi), "Visible and non visible override")
2618
2619
2620
2621
2622
2623 local maximum_fov = ui.get(maximum_fov_ref)
2624 local local_player = entity_get_local_player()
2625
2626 local pitch, yaw = client_camera_angles()
2627 local lx, ly, lz = entity_get_prop(local_player, "m_vecOrigin")
2628
2629 local nearest_player, nearest_player_fov = get_closest_player_to_crosshair(lx, ly, lz, pitch, yaw)
2630
2631 local view_offset = entity_get_prop(local_player, "m_vecViewOffset[2]")
2632 local lz = lz + view_offset
2633 --global
2634 if nearest_player ~= nil and is_player_visible(local_player, lx, ly, lz, nearest_player) and current_weapon == "Global" and mindmg_visible_global and ui.get(global_mindmg_check) then
2635 ui.set(min_dmg, ui.get(global_visible_mindmg))
2636 elseif nearest_player ~= nil and not is_player_visible(local_player, lx, ly, lz, nearest_player) and current_weapon == "Global" and mindmg_visible_global and ui.get(global_mindmg_check) then
2637 ui.set(min_dmg, ui.get(global_nonvisible_mindmg))
2638 end
2639 --pistol
2640 if nearest_player ~= nil and is_player_visible(local_player, lx, ly, lz, nearest_player) and current_weapon == "Pistol" and mindmg_visible_pistol and ui.get(pistol_mindmg_check) then
2641 ui.set(min_dmg, ui.get(pistol_visible_mindmg))
2642 elseif nearest_player ~= nil and not is_player_visible(local_player, lx, ly, lz, nearest_player) and current_weapon == "Pistol" and mindmg_visible_pistol and ui.get(pistol_mindmg_check) then
2643 ui.set(min_dmg, ui.get(pistol_nonvisible_mindmg))
2644 end
2645 --heavy pistol
2646 if nearest_player ~= nil and is_player_visible(local_player, lx, ly, lz, nearest_player) and current_weapon == "Heavy pistol" and mindmg_visible_heavypistol and ui.get(heavypistol_mindmg_check) then
2647 ui.set(min_dmg, ui.get(heavypistol_visible_mindmg))
2648 elseif nearest_player ~= nil and not is_player_visible(local_player, lx, ly, lz, nearest_player) and current_weapon == "Heavy pistol" and mindmg_visible_heavypistol and ui.get(heavypistol_mindmg_check) then
2649 ui.set(min_dmg, ui.get(heavypistol_nonvisible_mindmg))
2650 end
2651 --awp
2652 if nearest_player ~= nil and is_player_visible(local_player, lx, ly, lz, nearest_player) and current_weapon == "Awp" and mindmg_visible_awp and ui.get(awp_mindmg_check) then
2653 ui.set(min_dmg, ui.get(awp_visible_mindmg))
2654 elseif nearest_player ~= nil and not is_player_visible(local_player, lx, ly, lz, nearest_player) and current_weapon == "Awp" and mindmg_visible_awp and ui.get(awp_mindmg_check) then
2655 ui.set(min_dmg, ui.get(awp_nonvisible_mindmg))
2656 end
2657 --scout
2658 if nearest_player ~= nil and is_player_visible(local_player, lx, ly, lz, nearest_player) and current_weapon == "Scout" and mindmg_visible_scout and ui.get(scout_mindmg_check) then
2659 ui.set(min_dmg, ui.get(scout_visible_mindmg))
2660 elseif nearest_player ~= nil and not is_player_visible(local_player, lx, ly, lz, nearest_player) and current_weapon == "Scout" and mindmg_visible_scout and ui.get(scout_mindmg_check) then
2661 ui.set(min_dmg, ui.get(scout_nonvisible_mindmg))
2662 end
2663 --auto
2664 if nearest_player ~= nil and is_player_visible(local_player, lx, ly, lz, nearest_player) and current_weapon == "Auto" and mindmg_visible_auto and ui.get(auto_mindmg_check) then
2665 ui.set(min_dmg, ui.get(auto_visible_mindmg))
2666 elseif nearest_player ~= nil and not is_player_visible(local_player, lx, ly, lz, nearest_player) and current_weapon == "Auto" and mindmg_visible_auto and ui.get(auto_mindmg_check) then
2667 ui.set(min_dmg, ui.get(auto_nonvisible_mindmg))
2668 end
2669 --rifle
2670 if nearest_player ~= nil and is_player_visible(local_player, lx, ly, lz, nearest_player) and current_weapon == "Rifle" and mindmg_visible_rifle and ui.get(rifle_mindmg_check) then
2671 ui.set(min_dmg, ui.get(rifle_visible_mindmg))
2672 elseif nearest_player ~= nil and not is_player_visible(local_player, lx, ly, lz, nearest_player) and current_weapon == "Rifle" and mindmg_visible_rifle and ui.get(rifle_mindmg_check) then
2673 ui.set(min_dmg, ui.get(rifle_nonvisible_mindmg))
2674 end
2675 end
2676
2677client.set_event_callback("run_command", on_run_command)
2678
2679--autowall if was visible
2680
2681local function ifvisableaw()
2682local global_autowall = table_contains(ui.get(non_adaptive_auto_autowall), "Autowall if was visible")
2683if not global_autowall and not ui.get(non_adaptive_aw_check) or not ui.get(non_adaptive_aw_check) or not global_autowall or not global_autowall and not ui.get(non_adaptive_aw_check) then
2684all_autowallwasvisible_var = false
2685return
2686end
2687 local enemy_players = entity_get_players(true)
2688 --check if are found, else sets fov to min
2689 if #enemy_players ~= 0 then
2690 f_var_int_old_closest_enemy = f_var_int_new_closest_enemy
2691
2692 local own_x, own_y, own_z = client_eye_position()
2693 local own_pitch, own_yaw = client_camera_angles()
2694 f_var_int_new_closest_enemy = nil
2695 f_var_float_closest_mouse_distance_to_enemy = 720
2696
2697 for i = 1, #enemy_players do
2698 local enemy = enemy_players[i]
2699 local enemy_x, enemy_y, enemy_z = entity_hitbox_position(enemy, 0)
2700
2701 local x = enemy_x - own_x
2702 local y = enemy_y - own_y
2703 local z = enemy_z - own_z
2704 --needed yaw/pitch to face the enemy
2705 local yaw = ((math_atan2(y, x) * 180 / math_pi))
2706 local pitch = -(math_atan2(z, math_sqrt(math_pow(x, 2) + math_pow(y, 2))) * 180 / math_pi)
2707
2708 local yaw_dif = math_abs(own_yaw % 360 - yaw % 360) % 360
2709 local pitch_dif = math_abs(own_pitch - pitch ) % 360
2710
2711 if yaw_dif > 180 then yaw_dif = 360 - yaw_dif end
2712
2713 local real_dif = math_sqrt(math_pow(yaw_dif, 2) + math_pow(pitch_dif, 2))
2714
2715 if (f_var_float_closest_mouse_distance_to_enemy > real_dif) and (not var_dynamicfov_bool_ignore_out_of_of or (real_dif < var_dynamicfov_int_max)) then
2716 f_var_float_closest_mouse_distance_to_enemy = real_dif
2717 f_var_int_new_closest_enemy = enemy
2718 end
2719
2720 end
2721 end
2722end
2723
2724local f_var_autowall_last_time_spotted = 0
2725
2726local function awifwasvisible()
2727local global_autowall = table_contains(ui.get(non_adaptive_auto_autowall), "Autowall if was visible")
2728
2729if not global_autowall and not ui.get(non_adaptive_aw_check) or not ui.get(non_adaptive_aw_check) or not global_autowall or not global_autowall and not ui.get(non_adaptive_aw_check) then
2730all_autowallwasvisible_var = false
2731return
2732end
2733 local aw_result = false
2734 local vis_check = 0
2735
2736 if not aw_result and f_var_bool_new_in_fov then
2737 vis_check = -1
2738 --client_log('-1')
2739 if var_autowall_bool_vischeck_beta then
2740 --client_log('0')
2741 if var_autowall_bool_vischeck_closest then
2742 --client_log('1')
2743 local health = entity_get_prop(f_var_int_new_closest_enemy, "m_iHealth")
2744 if health ~= nil and health > 0 then
2745 --client_log('2')
2746 i = f_var_int_new_closest_enemy
2747 if level_0_table[i] ~= nil and not aw_result then
2748 --client_log('3')
2749 for j = 1, #level_0_table[i] do
2750 if level_0_table[i][j] ~= nil and not aw_result then
2751 --client_log('4')
2752 --k starts as 2 to skip the time thing
2753 for k = 2, #level_0_table[i][j] do
2754 if not aw_result then
2755 --client_log('5')
2756 local x, y, z = level_0_table[i][j][k][1], level_0_table[i][j][k][2], level_0_table[i][j][k][3]
2757 if client_visible(x, y, z) then
2758 --client_log('6')
2759 aw_result = true
2760 vis_check = 1
2761 end
2762 end
2763 end
2764 end
2765 end
2766 end
2767 end
2768 else
2769 end
2770 end
2771 end
2772
2773 if not aw_result then
2774 if var_autowall_bool_vischeck_beta then
2775 --client_log('0')
2776 if var_autowall_bool_vischeck_closest then
2777 --client_log('1')
2778 local health = entity_get_prop(f_var_int_new_closest_enemy, "m_iHealth")
2779 if health ~= nil and health > 0 then
2780 --client_log('2')
2781 i = f_var_int_new_closest_enemy
2782 if level_0_table[i] ~= nil and not aw_result then
2783 --client_log('3')
2784 for j = 1, #level_0_table[i] do
2785 if level_0_table[i][j] ~= nil and not aw_result then
2786 --client_log('4')
2787 --k starts as 2 to skip the time thing
2788 for k = 2, #level_0_table[i][j] do
2789 if not aw_result then
2790 --client_log('5')
2791 local x, y, z = level_0_table[i][j][k][1], level_0_table[i][j][k][2], level_0_table[i][j][k][3]
2792 if client_visible(x, y, z) then
2793 --client_log('6')
2794 vis_check = 1
2795 end
2796 end
2797 end
2798 end
2799 end
2800 end
2801 end
2802 else
2803 for i = 1, #level_0_table do
2804 --client_log(' a', i)
2805 if level_0_table[i] ~= nil and not aw_result then
2806 --client_log(' a', false)
2807 local health = entity_get_prop(i, "m_iHealth")
2808 if health ~= nil and health > 0 then
2809 --client_log(' a', true)
2810 for j = 1, #level_0_table[i] do
2811 if level_0_table[i][j] ~= nil and not aw_result then
2812 --client_log(' a', false)
2813 --k starts as 2 to skip the time thing
2814 for k = 2, #level_0_table[i][j] do
2815 if not aw_result then
2816 --client_log(' a', true)
2817 local x, y, z = level_0_table[i][j][k][1], level_0_table[i][j][k][2], level_0_table[i][j][k][3]
2818 if client_visible(x, y, z) then
2819 --client_log(' a', false)
2820 vis_check = 1
2821 end
2822 end
2823 end
2824 end
2825 end
2826 end
2827 end
2828 end
2829 end
2830 else
2831 if vis_check == 0 then
2832 if (f_var_int_new_closest_enemy ~= nil) then
2833 local health = entity_get_prop(f_var_int_new_closest_enemy, "m_iHealth")
2834 if health ~= nil and health > 0 then
2835 for i = 1, 18 do
2836 local x, y, z = entity_hitbox_position(f_var_int_new_closest_enemy , i)
2837 if client_visible(x, y, z) then
2838 vis_check = 1
2839 end
2840 end
2841 end
2842 end
2843 end
2844 end
2845 if vis_check == 1 then
2846 f_var_autowall_last_time_spotted = globals_realtime()
2847 end
2848 if (vis_check ~= 1) and (globals_realtime() - f_var_autowall_last_time_spotted < ui.get(_autowall_mode_auto_trigger_delay) / 1000) then
2849 aw_result = true
2850 end
2851 end
2852
2853 all_autowallwasvisible_var = aw_result
2854
2855 end
2856local function on_paint()
2857 ifvisableaw()
2858 awifwasvisible()
2859 end
2860client.set_event_callback('paint', on_paint)
2861
2862--autowall damage
2863
2864
2865rad2deg = function(rad) return (rad * 180 / math.pi) end
2866deg2rad = function(deg) return (deg * math.pi / 180) end
2867
2868vector_distance = function(a, b)
2869 return math.sqrt(math.pow(a.x - b.x, 2) + math.pow(a.y - b.y, 2) + math.pow(a.z - b.z, 2))
2870end
2871
2872trace_line = function(entity, start, _end)
2873 return client.trace_line(entity, start.x, start.y, start.z, _end.x, _end.y, _end.z)
2874end
2875
2876world_to_screen = function(x, y, z, func)
2877 local x, y = renderer.world_to_screen(x, y, z)
2878 if x ~= nil and y ~= nil then
2879 func(x, y)
2880 end
2881end
2882
2883clamp_angles = function(angle)
2884 angle = angle % 360
2885 angle = (angle + 360) % 360
2886
2887 if angle > 180 then
2888 angle = angle - 360
2889 end
2890
2891 return angle
2892end
2893
2894get_atan = function(ent, eye_pos, camera)
2895 local data = { id = nil, dst = 2147483647 }
2896
2897 for i = 0, 19 do
2898 local hitbox = vector(entity.hitbox_position(ent, i))
2899 local ext = vector_substract(hitbox, eye_pos)
2900
2901 local yaw = rad2deg(math.atan2(ext.y, ext.x))
2902 local pitch = -rad2deg(math.atan2(ext.z, math.sqrt(ext.x^2 + ext.y^2)))
2903
2904 local yaw_dif = math.abs(camera.y % 360 - yaw % 360) % 360
2905 local pitch_dif = math.abs(camera.x - pitch) % 360
2906
2907 if yaw_dif > 180 then
2908 yaw_dif = 360 - yaw_dif
2909 end
2910
2911 local dst = math.sqrt(yaw_dif^2 + pitch_dif^2)
2912
2913 if dst < data.dst then
2914 data.dst = dst
2915 data.id = i
2916 end
2917 end
2918
2919 return data.id, data.dst
2920end
2921
2922function get_nearbox(z_pos)
2923 local get_players = entity.get_players(true)
2924 local closest = { enemy = nil, hitbox = nil, dst = 2147483647 }
2925
2926 if #get_players == 0 then
2927 return
2928 end
2929
2930 local eye_pos = vector(client.eye_position())
2931 local camera = vector(client.camera_angles())
2932
2933 camera.z = z_pos ~= nil and 64 or camera.z
2934
2935 for i = 1, #get_players do
2936 local hitbox_id, distance =
2937 get_atan(get_players[i], eye_pos, camera)
2938
2939 if distance < closest.dst then
2940 closest.dst = distance
2941 closest.hitbox = hitbox_id
2942 closest.enemy = get_players[i]
2943 end
2944 end
2945
2946 return closest.enemy, closest.hitbox, closest.dst
2947end
2948
2949find_cmd = function(tab, value)
2950 for k, v in pairs(tab) do
2951 if contains(v, value) then
2952 return k
2953 end
2954 end
2955
2956 return nil
2957end
2958
2959ui_mset = function(list)
2960 for ref, val in pairs(list) do
2961 ui.set(ref, val)
2962 end
2963end
2964
2965ui_get, ui_set = ui.get, ui.set
2966get_local = entity.get_local_player
2967get_prop = entity.get_prop
2968
2969
2970hitscan = {
2971 ["Head"] = { 0, 1 },
2972 ["Chest"] = { 2, 3, 4 },
2973 ["Stomach"] = { 5, 6 },
2974 ["Arms"] = { 13, 14, 15, 16, 17, 18 },
2975 ["Legs"] = { 7, 8, 9, 10 },
2976 ["Feet"] = { 11, 12 }
2977}
2978
2979current_hitbox = "Head"
2980
2981local cache = { }
2982cache_process = function(name, condition, should_call, a, b)
2983 cache[name] = cache[name] ~= nil and cache[name] or condition
2984
2985 if should_call then a() else
2986 if cache[name] ~= nil then
2987 b(cache[name])
2988 cache[name] = nil
2989 end
2990 end
2991end
2992rage_hitbox = ui.reference("RAGE", "Aimbot", "Target hitbox")
2993client.set_event_callback("setup_command", function(cmd)
2994 local local_player = get_local()
2995
2996
2997
2998 local enemy, hid, dst = get_nearbox(false)
2999 local hitbox = find_cmd(hitscan, hid)
3000
3001
3002 if ui.get(global_hitbox_check, true) and current_weapon == "Global" and contains(ui.get(global_nearest_multi), hitbox) then
3003 ui.set(rage_hitbox, hitbox)
3004 end
3005 if ui.get(pistol_hitbox_check, true) and current_weapon == "Pistol" and contains(ui.get(pistol_nearest_multi), hitbox) then
3006 ui.set(rage_hitbox, hitbox)
3007 end
3008 if ui.get(heavypistol_hitbox_check, true) and current_weapon == "Heavy pistol" and contains(ui.get(heavypistol_nearest_multi), hitbox) then
3009 ui.set(rage_hitbox, hitbox)
3010 end
3011 if ui.get(awp_hitbox_check, true) and current_weapon == "Awp" and contains(ui.get(awp_nearest_multi), hitbox) then
3012 ui.set(rage_hitbox, hitbox)
3013 end
3014 if ui.get(auto_hitbox_check, true) and current_weapon == "Auto" and contains(ui.get(auto_nearest_multi), hitbox) then
3015 ui.set(rage_hitbox, hitbox)
3016 end
3017 if ui.get(scout_hitbox_check, true) and current_weapon == "Scout" and contains(ui.get(scout_nearest_multi), hitbox) then
3018 ui.set(rage_hitbox, hitbox)
3019 end
3020 if ui.get(rifle_hitbox_check, true) and current_weapon == "Rifle" and contains(ui.get(rifle_nearest_multi), hitbox) then
3021 ui.set(rage_hitbox, hitbox)
3022 end
3023end)
3024
3025client.set_event_callback("setup_command", function(cmd)
3026 local local_player = get_local()
3027 local enemy, hid, dst = get_nearbox(false)
3028 local hitbox = find_cmd(hitscan, hid)
3029 if hitbox == nil then
3030 current_hitbox = "Stomach"
3031 return
3032 end
3033 current_hitbox = hitbox
3034end)
3035
3036cached_time = globals.realtime()
3037
3038local ffi = require("ffi")
3039local type=type;local setmetatable=setmetatable;local tostring=tostring;local a=math.pi;local b=math.min;local c=math.max;local d=math.deg;local e=math.rad;local f=math.sqrt;local g=math.sin;local h=math.cos;local i=math.atan;local j=math.acos;local k=math.fmod;local l={}l.__index=l;function Vector3(m,n,o)if type(m)~="number"then m=0.0 end;if type(n)~="number"then n=0.0 end;if type(o)~="number"then o=0.0 end;m=m or 0.0;n=n or 0.0;o=o or 0.0;return setmetatable({x=m,y=n,z=o},l)end;function l.__eq(p,q)return p.x==q.x and p.y==q.y and p.z==q.z end;function l.__unm(p)return Vector3(-p.x,-p.y,-p.z)end;function l.__add(p,q)local r=type(p)local s=type(q)if r=="table"and s=="table"then return Vector3(p.x+q.x,p.y+q.y,p.z+q.z)elseif r=="table"and s=="number"then return Vector3(p.x+q,p.y+q,p.z+q)elseif r=="number"and s=="table"then return Vector3(p+q.x,p+q.y,p+q.z)end end;function l.__sub(p,q)local r=type(p)local s=type(q)if r=="table"and s=="table"then return Vector3(p.x-q.x,p.y-q.y,p.z-q.z)elseif r=="table"and s=="number"then return Vector3(p.x-q,p.y-q,p.z-q)elseif r=="number"and s=="table"then return Vector3(p-q.x,p-q.y,p-q.z)end end;function l.__mul(p,q)local r=type(p)local s=type(q)if r=="table"and s=="table"then return Vector3(p.x*q.x,p.y*q.y,p.z*q.z)elseif r=="table"and s=="number"then return Vector3(p.x*q,p.y*q,p.z*q)elseif r=="number"and s=="table"then return Vector3(p*q.x,p*q.y,p*q.z)end end;function l.__div(p,q)local r=type(p)local s=type(q)if r=="table"and s=="table"then return Vector3(p.x/q.x,p.y/q.y,p.z/q.z)elseif r=="table"and s=="number"then return Vector3(p.x/q,p.y/q,p.z/q)elseif r=="number"and s=="table"then return Vector3(p/q.x,p/q.y,p/q.z)end end;function l.__tostring(p)return"( "..p.x..", "..p.y..", "..p.z.." )"end;function l:clear()self.x=0.0;self.y=0.0;self.z=0.0 end;function l:unpack()return self.x,self.y,self.z end;function l:length_2d_sqr()return self.x*self.x+self.y*self.y end;function l:length_sqr()return self.x*self.x+self.y*self.y+self.z*self.z end;function l:length_2d()return f(self:length_2d_sqr())end;function l:length()return f(self:length_sqr())end;function l:dot(t)return self.x*t.x+self.y*t.y+self.z*t.z end;function l:cross(t)return Vector3(self.y*t.z-self.z*t.y,self.z*t.x-self.x*t.z,self.x*t.y-self.y*t.x)end;function l:dist_to(t)return(t-self):length()end;function l:is_zero(u)u=u or 0.001;if self.x<u and self.x>-u and self.y<u and self.y>-u and self.z<u and self.z>-u then return true end;return false end;function l:normalize()local v=self:length()if v<=0.0 then return 0.0 end;self.x=self.x/v;self.y=self.y/v;self.z=self.z/v;return v end;function l:normalize_no_len()local v=self:length()if v<=0.0 then return end;self.x=self.x/v;self.y=self.y/v;self.z=self.z/v end;function l:normalized()local v=self:length()if v<=0.0 then return Vector3()end;return Vector3(self.x/v,self.y/v,self.z/v)end;function clamp(w,x,y)if w<x then return x elseif w>y then return y end;return w end;function normalize_angle(z)local A;local B;B=tostring(z)if B=="nan"or B=="inf"then return 0.0 end;if z>=-180.0 and z<=180.0 then return z end;A=k(k(z+360.0,360.0),360.0)if A>180.0 then A=A-360.0 end;return A end;function vector_to_angle(C)local v;local D;local E;v=C:length()if v>0.0 then D=d(i(-C.z,v))E=d(i(C.y,C.x))else if C.x>0.0 then D=270.0 else D=90.0 end;E=0.0 end;return Vector3(D,E,0.0)end;function angle_forward(z)local F=g(e(z.x))local G=h(e(z.x))local H=g(e(z.y))local I=h(e(z.y))return Vector3(G*I,G*H,-F)end;function angle_right(z)local F=g(e(z.x))local G=h(e(z.x))local H=g(e(z.y))local I=h(e(z.y))local J=g(e(z.z))local K=h(e(z.z))return Vector3(-1.0*J*F*I+-1.0*K*-H,-1.0*J*F*H+-1.0*K*I,-1.0*J*G)end;function angle_up(z)local F=g(e(z.x))local G=h(e(z.x))local H=g(e(z.y))local I=h(e(z.y))local J=g(e(z.z))local K=h(e(z.z))return Vector3(K*F*I+-J*-H,K*F*H+-J*I,K*G)end;function get_FOV(L,M,N)local O;local P;local Q;local R;P=angle_forward(L)Q=(N-M):normalized()R=j(P:dot(Q)/Q:length())return c(0.0,d(R))end
3040
3041
3042client.set_event_callback("paint", function()
3043 local damage_multi = table_contains(ui.get(non_adaptive_auto_autowall), "Show autowall damage")
3044 if ui.get(non_adaptive_aw_check, true) and damage_multi then
3045 else return
3046 end
3047 local local_player = entity_get_local_player()
3048
3049 if not local_player or not entity.is_alive(local_player) then
3050 return
3051 end
3052 width, height = client.screen_size()
3053 --getting camera angles so we can trace a line from them
3054 local pitch, yaw, roll = client.camera_angles()
3055 --pretty sure this just puts the angles into a vector3 data type so it works with yaw_forward
3056 yaw = Vector3(pitch, yaw, roll)
3057 --yaw_forward gives us a point or angle in the direction of our aim, not really sure how the math works but it does so
3058 local yaw_forward = angle_forward(yaw)
3059 --origin is where we start the trace, just eye position
3060 local origin = Vector3(client.eye_position())
3061 --calculates another point 4096 units away from our original origin in the direction of our aim
3062 local tracing = origin + (yaw_forward * 4096)
3063 --traces a line to the tracing point we just created and gets a fraction that shows how far the trace line went before hitting something
3064 local fraction = client.trace_line(entity.get_local_player(), origin.x, origin.y, origin.z, tracing.x, tracing.y, tracing.z)
3065 --set origin to roughly where the traceline hit an object, the fraction isnt super accurate and we're dealing with 100s of units so its not crazy accurate
3066 origin = origin + ((yaw_forward * 4096) * fraction)
3067
3068
3069 --calculate another point 150 units ahead of where we hit something, this number can get changed but i'd leave it around 100 - 200
3070 --we'll calculate our damage from this point, you can make multiple of these points in like 100 unit intervals if you want to calculate dmg...
3071 --through very thick walls and take the highest damage but this wont be accurate either, so I think 1 point is the easiest and most accurate way of doing this.
3072 local endpoint = origin + (yaw_forward * 120)
3073
3074
3075 local localp = entity.get_local_player()
3076 local leyeposx, leyeposy, leyeposz = client.eye_position()
3077
3078 --calc damage
3079 local ent, dmg = client.trace_bullet(localp, leyeposx, leyeposy, leyeposz, endpoint.x, endpoint.y, endpoint.z)
3080 --you should use the entindex of the closest player to your crosshair for this instead of localplayer so it..
3081 --calculates damage correctly based on whether they have a helmet or not
3082 local headdmg = client.scale_damage(localp, 1, dmg)
3083 if ui.get(autowalldamage_position) == "Top" then
3084 position__y = height/2 - 50
3085 elseif ui.get(autowalldamage_position) == "Bottom" then
3086 position__y = height/2 + 35
3087 end
3088 local r, g, b, a = ui.get(autowalldamage_color)
3089
3090 local headr, headg, headb, heada = ui.get(autowalldamage_colorhead)
3091 local bodyr, bodyg, bodyb, bodya = ui.get(autowalldamage_colorbody)
3092
3093 --draw damage
3094 if current_hitbox == "Chest" and dmg > 0 and ui.get(autowalldamage_type) == "Combined" or current_hitbox == "Stomach" and dmg > 0 and ui.get(autowalldamage_type) == "Combined" or current_hitbox == "Arms" and dmg > 0 and ui.get(autowalldamage_type) == "Combined" or current_hitbox == "Legs" and dmg > 0 and ui.get(autowalldamage_type) == "Combined" or current_hitbox == "Feet" and dmg > 0 and ui.get(autowalldamage_type) == "Combined" then
3095 renderer.text(width/2 - 7, position__y, bodyr, bodyg, bodyb, bodya, "b", 0, dmg)
3096 end
3097 if headdmg > 0 and current_hitbox == "Head" and ui.get(autowalldamage_type) == "Combined" then
3098 renderer.text(width/2 - 7, position__y, headr, headg, headb, heada, "b", 0, headdmg)
3099 end
3100 if dmg > 0 and ui.get(autowalldamage_type) == "Show body damage" then
3101 renderer.text(width/2 - 7, position__y, r, g, b, a, "b", 0, dmg)
3102 end
3103 if headdmg > 0 and ui.get(autowalldamage_type) == "Show head damage" then
3104 renderer.text(width/2 - 7, position__y, r, g, b, a, "b", 0, headdmg)
3105 end
3106 if headdmg > 0 and ui.get(autowalldamage_type) == "Both" then
3107 renderer.text(width/2 - 7, position__y, headr, headg, headb, heada, "b", 0, headdmg)
3108 end
3109 if dmg > 0 and ui.get(autowalldamage_type) == "Both" then
3110 renderer.text(width/2 - 7, position__y + 15, bodyr, bodyg, bodyb, bodya, "b", 0, dmg)
3111 end
3112end)
3113
3114----------------------- Autowall Handler
3115function AWHandler()
3116 if pistol_autowall_var or heavypistol_autowall_var or rifle_autowall_var or awp_autowall_var or auto_autowall_var or scout_autowall_var or global_autowall_var or all_autowallifshot_var or all_autowallwasvisible_var or all_autowallkey_var then
3117 ui.set(autowall, true)
3118 else
3119 ui.set(autowall, false)
3120
3121 end
3122
3123end
3124client.set_event_callback("paint", AWHandler)
3125-----------------------
3126
3127----------------------- Silent aim handler
3128
3129function SilentHandler()
3130 if global_silentkey_var or pistol_silentkey_var or heavypistol_silentkey_var or awp_silentkey_var or auto_silentkey_var or scout_silentkey_var or rifle_silentkey_var or global_silent_var or pistol_silent_var or heavypistol_silent_var or rifle_silent_var or awp_silent_var or auto_silent_var or scout_silent_var or global_silent_var_fov or pistol_silent_var_fov or heavypistol_silent_var_fov or rifle_silent_var_fov or awp_silent_var_fov or auto_silent_var_fov or scout_silent_var_fov or global_slowwalk_var or pistol_slowwalk_var or heavypistol_slowwalk_var or rifle_slowwalk_var or awp_slowwalk_var or auto_slowwalk_var or scout_slowwalk_var then
3131 ui.set(silent, true)
3132 else
3133 ui.set(silent, false)
3134 end
3135end
3136client.set_event_callback("paint", SilentHandler)
3137
3138
3139
3140-----------------------
3141--menu call
3142function set_visible()
3143 local tagenable = ui.get(ngahooktag_enabled)
3144 local current_weapon_config = ui.get(adaptive_config2)
3145-----------------------------SILENT REF
3146 local silentaim_global_infov = table_contains(ui.get(global_silentmulti), "Silent aim if in fov")
3147 local silentaim_pistol_infov = table_contains(ui.get(pistol_silentmulti), "Silent aim if in fov")
3148 local silentaim_heavypistol_infov = table_contains(ui.get(heavypistol_silentmulti), "Silent aim if in fov")
3149 local silentaim_awp_infov = table_contains(ui.get(awp_silentmulti), "Silent aim if in fov")
3150 local silentaim_scout_infov = table_contains(ui.get(scout_silentmulti), "Silent aim if in fov")
3151 local silentaim_auto_infov = table_contains(ui.get(auto_silentmulti), "Silent aim if in fov")
3152 local silentaim_rifle_infov = table_contains(ui.get(rifle_silentmulti), "Silent aim if in fov")
3153
3154 local non_adaptive_mulit = table_contains(ui.get(non_adaptive_silentaim), "Silent aim on key")
3155 local non_adaptivesilent_check = ui.get(non_adaptive_silentcheck)
3156
3157 local silentaim_global_distance = table_contains(ui.get(global_silentmulti), "Silent aim in distance")
3158 local silentaim_pistol_distance = table_contains(ui.get(pistol_silentmulti), "Silent aim in distance")
3159 local silentaim_heavypistol_distance = table_contains(ui.get(heavypistol_silentmulti), "Silent aim in distance")
3160 local silentaim_awp_distance = table_contains(ui.get(awp_silentmulti), "Silent aim in distance")
3161 local silentaim_scout_distance = table_contains(ui.get(scout_silentmulti), "Silent aim in distance")
3162 local silentaim_auto_distance = table_contains(ui.get(auto_silentmulti), "Silent aim in distance")
3163 local silentaim_rifle_distance = table_contains(ui.get(rifle_silentmulti), "Silent aim in distance")
3164
3165 local silent_checkglobal = ui.get(global_silentcheck)
3166 local silent_checkpistol = ui.get(pistol_silentcheck)
3167 local silent_checkheavypistol = ui.get(heavypistol_silentcheck)
3168 local silent_checkawp = ui.get(awp_silentcheck)
3169 local silent_checkauto = ui.get(auto_silentcheck)
3170 local silent_checkrifle = ui.get(rifle_silentcheck)
3171 local silent_checkscout = ui.get(scout_silentcheck)
3172-----------------------------AUTOWALL REF
3173 local non_adaptive_wasvisible = table_contains(ui.get(non_adaptive_auto_autowall), "Autowall if was visible")
3174 local non_adaptive_shotme = table_contains(ui.get(non_adaptive_auto_autowall), "Autowall if shot me")
3175 local non_adaptive_awallkey = table_contains(ui.get(non_adaptive_auto_autowall), "Autowall on key")
3176 local show_autowall_damagemulti = table_contains(ui.get(non_adaptive_auto_autowall), "Show autowall damage")
3177 local autowalldamagetype = ui.get(autowalldamage_type)
3178
3179
3180 local global_autowall_edgeaw = table_contains(ui.get(global_auto_autowall), "Edge autowall")
3181 local pistol_autowall_edgeaw = table_contains(ui.get(pistol_auto_autowall), "Edge autowall")
3182 local heavypistol_autowall_edgeaw = table_contains(ui.get(heavypistol_auto_autowall), "Edge autowall")
3183 local awp_autowall_edgeaw = table_contains(ui.get(awp_auto_autowall), "Edge autowall")
3184 local scout_autowall_edgeaw = table_contains(ui.get(scout_auto_autowall), "Edge autowall")
3185 local autos_autowall_edgeaw = table_contains(ui.get(auto_auto_autowall), "Edge autowall")
3186 local rifle_autowall_edgeaw = table_contains(ui.get(rifle_auto_autowall), "Edge autowall")
3187
3188 local global_autowall_dynamic = table_contains(ui.get(global_auto_autowall), "Dynamic autowall FOV")
3189 local pistol_autowall_dynamic = table_contains(ui.get(pistol_auto_autowall), "Dynamic autowall FOV")
3190 local heavypistol_autowall_dynamic = table_contains(ui.get(heavypistol_auto_autowall), "Dynamic autowall FOV")
3191 local awp_autowall_dynamic = table_contains(ui.get(awp_auto_autowall), "Dynamic autowall FOV")
3192 local scout_autowall_dynamic = table_contains(ui.get(scout_auto_autowall), "Dynamic autowall FOV")
3193 local autos_autowall_dynamic = table_contains(ui.get(auto_auto_autowall), "Dynamic autowall FOV")
3194 local rifle_autowall_dynamic = table_contains(ui.get(rifle_auto_autowall), "Dynamic autowall FOV")
3195
3196 local autowall_checkglobal = ui.get(global_autowall_check)
3197 local autowall_checkpistol = ui.get(pistol_autowall_check)
3198 local autowall_checkheavypistol = ui.get(heavypistol_autowall_check)
3199 local autowall_checkawp = ui.get(awp_autowall_check)
3200 local autowall_checkscout = ui.get(scout_autowall_check)
3201 local autowall_checkauto = ui.get(auto_autowall_check)
3202 local autowall_checkrifle = ui.get(rifle_autowall_check)
3203 local autowall_nonadaptive_check = ui.get(non_adaptive_aw_check)
3204-----------------------------MIN DMG REF
3205 local mindmg_visible_global = table_contains(ui.get(global_mindmg_multi), "Visible and non visible override")
3206 local mindmg_visible_pistol = table_contains(ui.get(pistol_mindmg_multi), "Visible and non visible override")
3207 local mindmg_visible_heavypistol = table_contains(ui.get(heavypistol_mindmg_multi), "Visible and non visible override")
3208 local mindmg_visible_awp = table_contains(ui.get(awp_mindmg_multi), "Visible and non visible override")
3209 local mindmg_visible_scout = table_contains(ui.get(scout_mindmg_multi), "Visible and non visible override")
3210 local mindmg_visible_auto = table_contains(ui.get(auto_mindmg_multi), "Visible and non visible override")
3211 local mindmg_visible_rifle = table_contains(ui.get(rifle_mindmg_multi), "Visible and non visible override")
3212
3213 local mindmg_visiblecheck_global = ui.get(global_mindmg_check)
3214 local mindmg_visiblecheck_pistol = ui.get(pistol_mindmg_check)
3215 local mindmg_visiblecheck_heavypistol = ui.get(heavypistol_mindmg_check)
3216 local mindmg_visiblecheck_awp = ui.get(awp_mindmg_check)
3217 local mindmg_visiblecheck_auto = ui.get(auto_mindmg_check)
3218 local mindmg_visiblecheck_rifle = ui.get(rifle_mindmg_check)
3219 local mindmg_visiblecheck_scout = ui.get(scout_mindmg_check)
3220-----------------------------NEAREST HITBOX REF
3221 local nearest_check_global = ui.get(global_hitbox_check)
3222 local nearest_check_pistol = ui.get(pistol_hitbox_check)
3223 local nearest_check_heavypistol = ui.get(heavypistol_hitbox_check)
3224 local nearest_check_awp = ui.get(awp_hitbox_check)
3225 local nearest_check_scout = ui.get(scout_hitbox_check)
3226 local nearest_check_auto = ui.get(auto_hitbox_check)
3227 local nearest_check_rifle = ui.get(rifle_hitbox_check)
3228-----------------------------INDICATORS REF
3229 local indicate = ui.get(indicate_enable)
3230 local indicateselet = ui.get(indicate_on)
3231-----------------------------TRIGGERMAG REF
3232 local triggerenable = ui.get(tm_cb)
3233-----------------------------DYNAMIC FOV REF
3234 local global_dynamic_check = ui.get(global_dynamicfov_enable)
3235 local pistol_dynamic_check = ui.get(pistol_dynamicfov_enable)
3236 local heavypistol_dynamic_check = ui.get(heavypistol_dynamicfov_enable)
3237 local awp_dynamic_check = ui.get(awp_dynamicfov_enable)
3238 local scout_dynamic_check = ui.get(scout_dynamicfov_enable)
3239 local auto_dynamic_check = ui.get(auto_dynamicfov_enable)
3240 local rifle_dynamic_check = ui.get(rifle_dynamicfov_enable)
3241-----------------------------RESOLVER REF
3242 local resolverenable = ui.get(overridebutton)
3243 local solverselect = ui.get(resolverselect)
3244-----------------------------FAKELAG REF
3245 local flenable = ui.get(flcheckbox)
3246 local legitfl = table_contains(ui.get(flmulti), "Fakelag presets")
3247 local flwmenable = table_contains(ui.get(flmulti), "Custom fake lag while moving")
3248 local flcomb = ui.get(enablecflcombo)
3249 local legitflm = ui.get(legitflmode)
3250-----------------------------FLAGS REF
3251 local flagenable = ui.get(flag_enable)
3252-----------------------------KILLSAY REF
3253 local killenable = ui.get(talkshitenable)
3254 local killtype = ui.get(talkshittype)
3255-----------------------------NAMESPAM REF
3256 local namespamc = ui.get(namecombo)
3257-----------------------------ADVANCED REF
3258 local advlog = ui.get(advancedlog)
3259----------------------------------------------------------------------
3260----------------------------------------------------------------------
3261----------------------------------------------------------------------SILENT AIM
3262----------------------------------------------------------------------
3263----------------------------------------------------------------------
3264 ui.set_visible(non_adaptive_silentaim, non_adaptivesilent_check)
3265 ui.set_visible(silentkey, non_adaptivesilent_check and non_adaptive_mulit)
3266
3267 ui.set_visible(global_silentcheck, current_weapon_config == "Global")
3268 ui.set_visible(pistol_silentcheck, current_weapon_config == "Pistol")
3269 ui.set_visible(heavypistol_silentcheck, current_weapon_config == "Heavy pistol")
3270 ui.set_visible(awp_silentcheck, current_weapon_config == "Awp")
3271 ui.set_visible(scout_silentcheck, current_weapon_config == "Scout")
3272 ui.set_visible(auto_silentcheck, current_weapon_config == "Auto")
3273 ui.set_visible(rifle_silentcheck, current_weapon_config == "Rifle")
3274
3275 ui.set_visible(global_silentmulti, current_weapon_config == "Global" and silent_checkglobal)
3276 ui.set_visible(pistol_silentmulti, current_weapon_config == "Pistol" and silent_checkpistol)
3277 ui.set_visible(heavypistol_silentmulti, current_weapon_config == "Heavy pistol" and silent_checkheavypistol)
3278 ui.set_visible(awp_silentmulti, current_weapon_config == "Awp" and silent_checkawp)
3279 ui.set_visible(scout_silentmulti, current_weapon_config == "Scout" and silent_checkscout)
3280 ui.set_visible(auto_silentmulti, current_weapon_config == "Auto" and silent_checkauto)
3281 ui.set_visible(rifle_silentmulti, current_weapon_config == "Rifle" and silent_checkrifle)
3282
3283 ui.set_visible(global_silentdistance, current_weapon_config == "Global" and silentaim_global_distance and silent_checkglobal)
3284 ui.set_visible(pistol_silentdistance, current_weapon_config == "Pistol" and silentaim_pistol_distance and silent_checkpistol)
3285 ui.set_visible(heavypistol_silentdistance, current_weapon_config == "Heavy pistol" and silentaim_heavypistol_distance and silent_checkheavypistol)
3286 ui.set_visible(awp_silentdistance, current_weapon_config == "Awp" and silentaim_awp_distance and silent_checkawp)
3287 ui.set_visible(scout_silentdistance, current_weapon_config == "Scout" and silentaim_scout_distance and silent_checkscout)
3288 ui.set_visible(auto_silentdistance, current_weapon_config == "Auto" and silentaim_auto_distance and silent_checkauto)
3289 ui.set_visible(rifle_silentdistance, current_weapon_config == "Rifle" and silentaim_rifle_distance and silent_checkrifle)
3290
3291 ui.set_visible(global_silentfovslider, current_weapon_config == "Global" and silentaim_global_infov and silent_checkglobal)
3292 ui.set_visible(pistol_silentfovslider, current_weapon_config == "Pistol" and silentaim_pistol_infov and silent_checkpistol)
3293 ui.set_visible(heavypistol_silentfovslider, current_weapon_config == "Heavy pistol" and silentaim_heavypistol_infov and silent_checkheavypistol)
3294 ui.set_visible(awp_silentfovslider, current_weapon_config == "Awp" and silentaim_awp_infov and silent_checkawp)
3295 ui.set_visible(scout_silentfovslider, current_weapon_config == "Scout" and silentaim_scout_infov and silent_checkscout)
3296 ui.set_visible(auto_silentfovslider, current_weapon_config == "Auto" and silentaim_auto_infov and silent_checkauto)
3297 ui.set_visible(rifle_silentfovslider, current_weapon_config == "Rifle" and silentaim_rifle_infov and silent_checkrifle)
3298----------------------------------------------------------------------AUTOWALL
3299 ui.set_visible(autowalldamage_position, show_autowall_damagemulti and autowall_nonadaptive_check)
3300 ui.set_visible(autowalldamage_color, show_autowall_damagemulti and autowall_nonadaptive_check and autowalldamagetype == "Show head damage" or show_autowall_damagemulti and autowall_nonadaptive_check and autowalldamagetype == "Show body damage")
3301 ui.set_visible(autowalldamage_type, show_autowall_damagemulti and autowall_nonadaptive_check)
3302 ui.set_visible(autowalldamage_colorhead, show_autowall_damagemulti and autowall_nonadaptive_check and autowalldamagetype == "Both" or show_autowall_damagemulti and autowall_nonadaptive_check and autowalldamagetype == "Combined")
3303 ui.set_visible(autowalldamage_colorbody, show_autowall_damagemulti and autowall_nonadaptive_check and autowalldamagetype == "Both" or show_autowall_damagemulti and autowall_nonadaptive_check and autowalldamagetype == "Combined")
3304 ui.set_visible(autowalldamage_labelhead, show_autowall_damagemulti and autowall_nonadaptive_check and autowalldamagetype == "Both" or show_autowall_damagemulti and autowall_nonadaptive_check and autowalldamagetype == "Combined")
3305 ui.set_visible(autowalldamage_labelbody, show_autowall_damagemulti and autowall_nonadaptive_check and autowalldamagetype == "Both" or show_autowall_damagemulti and autowall_nonadaptive_check and autowalldamagetype == "Combined")
3306
3307
3308
3309 ui.set_visible(global_autowall_check, current_weapon_config == "Global")
3310 ui.set_visible(pistol_autowall_check, current_weapon_config == "Pistol")
3311 ui.set_visible(heavypistol_autowall_check, current_weapon_config == "Heavy pistol")
3312 ui.set_visible(awp_autowall_check, current_weapon_config == "Awp")
3313 ui.set_visible(scout_autowall_check, current_weapon_config == "Scout")
3314 ui.set_visible(auto_autowall_check, current_weapon_config == "Auto")
3315 ui.set_visible(rifle_autowall_check, current_weapon_config == "Rifle")
3316
3317 ui.set_visible(global_auto_autowall, current_weapon_config == "Global" and autowall_checkglobal)
3318 ui.set_visible(pistol_auto_autowall, current_weapon_config == "Pistol" and autowall_checkpistol)
3319 ui.set_visible(heavypistol_auto_autowall, current_weapon_config == "Heavy pistol" and autowall_checkheavypistol)
3320 ui.set_visible(awp_auto_autowall, current_weapon_config == "Awp" and autowall_checkawp)
3321 ui.set_visible(scout_auto_autowall, current_weapon_config == "Scout" and autowall_checkscout)
3322 ui.set_visible(auto_auto_autowall, current_weapon_config == "Auto" and autowall_checkauto)
3323 ui.set_visible(rifle_auto_autowall, current_weapon_config == "Rifle" and autowall_checkrifle)
3324
3325 ui.set_visible(global_legit_pen_threshold_ref, current_weapon_config == "Global" and autowall_checkglobal and global_autowall_edgeaw)
3326 ui.set_visible(pistol_legit_pen_threshold_ref, current_weapon_config == "Pistol" and autowall_checkpistol and pistol_autowall_edgeaw)
3327 ui.set_visible(heavypistol_legit_pen_threshold_ref, current_weapon_config == "Heavy pistol" and autowall_checkheavypistol and heavypistol_autowall_edgeaw)
3328 ui.set_visible(awp_legit_pen_threshold_ref, current_weapon_config == "Awp" and autowall_checkawp and awp_autowall_edgeaw)
3329 ui.set_visible(scout_legit_pen_threshold_ref, current_weapon_config == "Scout" and autowall_checkscout and scout_autowall_edgeaw)
3330 ui.set_visible(auto_legit_pen_threshold_ref, current_weapon_config == "Auto" and autowall_checkauto and autos_autowall_edgeaw)
3331 ui.set_visible(rifle_legit_pen_threshold_ref, current_weapon_config == "Rifle" and autowall_checkrifle and rifle_autowall_edgeaw)
3332
3333 ui.set_visible(non_adaptive_auto_autowall, autowall_nonadaptive_check)
3334 ui.set_visible(beforedelay, autowall_nonadaptive_check and non_adaptive_shotme)
3335 ui.set_visible(autodely, autowall_nonadaptive_check and non_adaptive_shotme)
3336 ui.set_visible(_autowall_mode_auto_trigger_delay, autowall_nonadaptive_check and non_adaptive_wasvisible)
3337 ui.set_visible(autowalltoggle, non_adaptive_awallkey and autowall_nonadaptive_check)
3338
3339 ui.set_visible(global_dynamicfov_minaw, current_weapon_config == "Global" and autowall_checkglobal and global_autowall_dynamic)
3340 ui.set_visible(global_dynamicfov_maxaw, current_weapon_config == "Global" and autowall_checkglobal and global_autowall_dynamic)
3341 ui.set_visible(dynamicfov_auto_factor_otheraw, current_weapon_config == "Global" and autowall_checkglobal and global_autowall_dynamic)
3342
3343 ui.set_visible(pistol_dynamicfov_minaw, current_weapon_config == "Pistol" and autowall_checkpistol and pistol_autowall_dynamic)
3344 ui.set_visible(pistol_dynamicfov_maxaw, current_weapon_config == "Pistol" and autowall_checkpistol and pistol_autowall_dynamic)
3345 ui.set_visible(dynamicfov_auto_factor_pistolaw, current_weapon_config == "Pistol" and autowall_checkpistol and pistol_autowall_dynamic)
3346
3347 ui.set_visible(heavypistol_dynamicfov_minaw, current_weapon_config == "Heavy pistol" and autowall_checkheavypistol and heavypistol_autowall_dynamic)
3348 ui.set_visible(heavypistol_dynamicfov_maxaw, current_weapon_config == "Heavy pistol" and autowall_checkheavypistol and heavypistol_autowall_dynamic)
3349 ui.set_visible(dynamicfov_auto_factor_heavypistolaw, current_weapon_config == "Heavy pistol" and autowall_checkheavypistol and heavypistol_autowall_dynamic)
3350
3351 ui.set_visible(awp_dynamicfov_minaw, current_weapon_config == "Awp" and autowall_checkawp and awp_autowall_dynamic)
3352 ui.set_visible(awp_dynamicfov_maxaw, current_weapon_config == "Awp" and autowall_checkawp and awp_autowall_dynamic)
3353 ui.set_visible(dynamicfov_auto_factor_awpaw, current_weapon_config == "Awp" and autowall_checkawp and awp_autowall_dynamic)
3354
3355 ui.set_visible(scout_dynamicfov_minaw, current_weapon_config == "Scout" and autowall_checkscout and scout_autowall_dynamic)
3356 ui.set_visible(scout_dynamicfov_maxaw, current_weapon_config == "Scout" and autowall_checkscout and scout_autowall_dynamic)
3357 ui.set_visible(dynamicfov_auto_factor_scoutaw, current_weapon_config == "Scout" and autowall_checkscout and scout_autowall_dynamic)
3358
3359 ui.set_visible(auto_dynamicfov_minaw, current_weapon_config == "Auto" and autowall_checkauto and auto_autowall_dynamic)
3360 ui.set_visible(auto_dynamicfov_maxaw, current_weapon_config == "Auto" and autowall_checkauto and auto_autowall_dynamic)
3361 ui.set_visible(dynamicfov_auto_factor_autoaw, current_weapon_config == "Auto" and autowall_checkauto and auto_autowall_dynamic)
3362
3363 ui.set_visible(rifle_dynamicfov_minaw, current_weapon_config == "Rifle" and autowall_checkrifle and rifle_autowall_dynamic)
3364 ui.set_visible(rifle_dynamicfov_maxaw, current_weapon_config == "Rifle" and autowall_checkrifle and rifle_autowall_dynamic)
3365 ui.set_visible(dynamicfov_auto_factor_rifleaw, current_weapon_config == "Rifle" and autowall_checkrifle and rifle_autowall_dynamic)
3366----------------------------------------------------------------------MIN DMG
3367 ui.set_visible(global_mindmg_check, current_weapon_config == "Global")
3368 ui.set_visible(pistol_mindmg_check, current_weapon_config == "Pistol")
3369 ui.set_visible(heavypistol_mindmg_check, current_weapon_config == "Heavy pistol")
3370 ui.set_visible(awp_mindmg_check, current_weapon_config == "Awp")
3371 ui.set_visible(scout_mindmg_check, current_weapon_config == "Scout")
3372 ui.set_visible(auto_mindmg_check, current_weapon_config == "Auto")
3373 ui.set_visible(rifle_mindmg_check, current_weapon_config == "Rifle")
3374
3375 ui.set_visible(global_mindmg_multi, current_weapon_config == "Global" and mindmg_visiblecheck_global)
3376 ui.set_visible(pistol_mindmg_multi, current_weapon_config == "Pistol" and mindmg_visiblecheck_pistol)
3377 ui.set_visible(heavypistol_mindmg_multi, current_weapon_config == "Heavy pistol" and mindmg_visiblecheck_heavypistol)
3378 ui.set_visible(awp_mindmg_multi, current_weapon_config == "Awp" and mindmg_visiblecheck_awp)
3379 ui.set_visible(scout_mindmg_multi, current_weapon_config == "Scout" and mindmg_visiblecheck_scout)
3380 ui.set_visible(auto_mindmg_multi, current_weapon_config == "Auto" and mindmg_visiblecheck_auto)
3381 ui.set_visible(rifle_mindmg_multi, current_weapon_config == "Rifle" and mindmg_visiblecheck_rifle)
3382
3383 ui.set_visible(global_visible_mindmg, current_weapon_config == "Global" and mindmg_visiblecheck_global and mindmg_visible_global)
3384 ui.set_visible(pistol_visible_mindmg, current_weapon_config == "Pistol" and mindmg_visiblecheck_pistol and mindmg_visible_pistol)
3385 ui.set_visible(heavypistol_visible_mindmg, current_weapon_config == "Heavy pistol" and mindmg_visiblecheck_heavypistol and mindmg_visible_heavypistol)
3386 ui.set_visible(awp_visible_mindmg, current_weapon_config == "Awp" and mindmg_visiblecheck_awp and mindmg_visible_awp)
3387 ui.set_visible(scout_visible_mindmg, current_weapon_config == "Scout" and mindmg_visiblecheck_scout and mindmg_visible_scout)
3388 ui.set_visible(auto_visible_mindmg, current_weapon_config == "Auto" and mindmg_visiblecheck_auto and mindmg_visible_auto)
3389 ui.set_visible(rifle_visible_mindmg, current_weapon_config == "Rifle" and mindmg_visiblecheck_rifle and mindmg_visible_rifle)
3390
3391 ui.set_visible(global_nonvisible_mindmg, current_weapon_config == "Global" and mindmg_visiblecheck_global and mindmg_visible_global)
3392 ui.set_visible(pistol_nonvisible_mindmg, current_weapon_config == "Pistol" and mindmg_visiblecheck_pistol and mindmg_visible_pistol)
3393 ui.set_visible(heavypistol_nonvisible_mindmg, current_weapon_config == "Heavy pistol" and mindmg_visiblecheck_heavypistol and mindmg_visible_heavypistol)
3394 ui.set_visible(awp_nonvisible_mindmg, current_weapon_config == "Awp" and mindmg_visiblecheck_awp and mindmg_visible_awp)
3395 ui.set_visible(scout_nonvisible_mindmg, current_weapon_config == "Scout" and mindmg_visiblecheck_scout and mindmg_visible_scout)
3396 ui.set_visible(auto_nonvisible_mindmg, current_weapon_config == "Auto" and mindmg_visiblecheck_auto and mindmg_visible_auto)
3397 ui.set_visible(rifle_nonvisible_mindmg, current_weapon_config == "Rifle" and mindmg_visiblecheck_rifle and mindmg_visible_rifle)
3398----------------------------------------------------------------------NEAREST HITBOX
3399 ui.set_visible(global_hitbox_check, current_weapon_config == "Global")
3400 ui.set_visible(pistol_hitbox_check, current_weapon_config == "Pistol")
3401 ui.set_visible(heavypistol_hitbox_check, current_weapon_config == "Heavy pistol")
3402 ui.set_visible(awp_hitbox_check, current_weapon_config == "Awp")
3403 ui.set_visible(scout_hitbox_check, current_weapon_config == "Scout")
3404 ui.set_visible(auto_hitbox_check, current_weapon_config == "Auto")
3405 ui.set_visible(rifle_hitbox_check, current_weapon_config == "Rifle")
3406
3407 ui.set_visible(global_nearest_multi, current_weapon_config == "Global" and nearest_check_global)
3408 ui.set_visible(pistol_nearest_multi, current_weapon_config == "Pistol" and nearest_check_pistol)
3409 ui.set_visible(heavypistol_nearest_multi, current_weapon_config == "Heavy pistol" and nearest_check_heavypistol)
3410 ui.set_visible(awp_nearest_multi, current_weapon_config == "Awp" and nearest_check_awp)
3411 ui.set_visible(scout_nearest_multi, current_weapon_config == "Scout" and nearest_check_scout)
3412 ui.set_visible(auto_nearest_multi, current_weapon_config == "Auto" and nearest_check_auto)
3413 ui.set_visible(rifle_nearest_multi, current_weapon_config == "Rifle" and nearest_check_rifle)
3414----------------------------------------------------------------------INDICATORS
3415 ui.set_visible(indicate_on, indicate)
3416 ui.set_visible(indicate_select, indicate)
3417 ui.set_visible(indicate_color, indicate)
3418
3419 ui.set_visible(indicateposition, indicateselet == "Default" and indicate)
3420----------------------------------------------------------------------TRIGGERMAG
3421 ui.set_visible(triggermagnet, triggerenable)
3422----------------------------------------------------------------------DYNAMIC FOV
3423 ui.set_visible(global_dynamicfov_enable, current_weapon_config == "Global")
3424 ui.set_visible(pistol_dynamicfov_enable, current_weapon_config == "Pistol")
3425 ui.set_visible(heavypistol_dynamicfov_enable, current_weapon_config == "Heavy pistol")
3426 ui.set_visible(awp_dynamicfov_enable, current_weapon_config == "Awp")
3427 ui.set_visible(scout_dynamicfov_enable, current_weapon_config == "Scout")
3428 ui.set_visible(auto_dynamicfov_enable, current_weapon_config == "Auto")
3429 ui.set_visible(rifle_dynamicfov_enable, current_weapon_config == "Rifle")
3430
3431 ui.set_visible(dynamicfov_minother, global_dynamic_check and current_weapon_config == "Global")
3432 ui.set_visible(dynamicfov_maxother, global_dynamic_check and current_weapon_config == "Global")
3433 ui.set_visible(dynamicfov_auto_factor_other, global_dynamic_check and current_weapon_config == "Global")
3434
3435 ui.set_visible(dynamicfov_minpistol, pistol_dynamic_check and current_weapon_config == "Pistol")
3436 ui.set_visible(dynamicfov_maxpistol, pistol_dynamic_check and current_weapon_config == "Pistol")
3437 ui.set_visible(dynamicfov_auto_factor_pistol, pistol_dynamic_check and current_weapon_config == "Pistol")
3438
3439 ui.set_visible(dynamicfov_minheavypistol, heavypistol_dynamic_check and current_weapon_config == "Heavy pistol")
3440 ui.set_visible(dynamicfov_maxheavypistol, heavypistol_dynamic_check and current_weapon_config == "Heavy pistol")
3441 ui.set_visible(dynamicfov_auto_factor_heavypistol, heavypistol_dynamic_check and current_weapon_config == "Heavy pistol")
3442
3443 ui.set_visible(dynamicfov_minawp, awp_dynamic_check and current_weapon_config == "Awp")
3444 ui.set_visible(dynamicfov_maxawp, awp_dynamic_check and current_weapon_config == "Awp")
3445 ui.set_visible(dynamicfov_auto_factor_awp, awp_dynamic_check and current_weapon_config == "Awp")
3446
3447 ui.set_visible(dynamicfov_minscout, scout_dynamic_check and current_weapon_config == "Scout")
3448 ui.set_visible(dynamicfov_maxscout, scout_dynamic_check and current_weapon_config == "Scout")
3449 ui.set_visible(dynamicfov_auto_factor_scout, scout_dynamic_check and current_weapon_config == "Scout")
3450
3451 ui.set_visible(dynamicfov_minauto, auto_dynamic_check and current_weapon_config == "Auto")
3452 ui.set_visible(dynamicfov_maxauto, auto_dynamic_check and current_weapon_config == "Auto")
3453 ui.set_visible(dynamicfov_auto_factor_auto, auto_dynamic_check and current_weapon_config == "Auto")
3454
3455 ui.set_visible(dynamicfov_minrifle, rifle_dynamic_check and current_weapon_config == "Rifle")
3456 ui.set_visible(dynamicfov_maxrifle, rifle_dynamic_check and current_weapon_config == "Rifle")
3457
3458 ui.set_visible(dynamicfov_auto_factor_rifle, rifle_dynamic_check and current_weapon_config == "Rifle")
3459----------------------------------------------------------------------RESOLVER
3460 ui.set_visible(resolverselect, resolverenable)
3461 ui.set_visible(overridekey, resolverenable and solverselect == "Override")
3462 ui.set_visible(oppositeenable, resolverenable and solverselect == "Opposite resolver")
3463----------------------------------------------------------------------FLAGS
3464 ui.set_visible(flag_select, flagenable)
3465 ui.set_visible(flag_color, flagenable)
3466----------------------------------------------------------------------KILLSAY
3467 ui.set_visible(talkshittype, killenable)
3468 ui.set_visible(talkshittext, killenable and killtype == "Custom")
3469----------------------------------------------------------------------FAKELAG
3470 ui.set_visible(flmulti, flenable)
3471 ui.set_visible(legitflmode, legitfl and flenable)
3472 ui.set_visible(enablecflcombo, flenable and flwmenable)
3473 ui.set_visible(slowvariance, flcomb == "Slow walk" and flenable and flwmenable)
3474 ui.set_visible(slowlimit, flcomb == "Slow walk" and flenable and flwmenable)
3475 ui.set_visible(slowamount, flcomb == "Slow walk" and flenable and flwmenable)
3476 ui.set_visible(movevariance, flcomb == "Moving" and flenable and flwmenable)
3477 ui.set_visible(movelimit, flcomb == "Moving" and flenable and flwmenable)
3478 ui.set_visible(moveamount, flcomb == "Moving" and flenable and flwmenable)
3479 ui.set_visible(standvariance, flcomb == "Standing" and flenable and flwmenable)
3480 ui.set_visible(standlimit, flcomb == "Standing" and flenable and flwmenable)
3481 ui.set_visible(standamount, flcomb == "Standing" and flenable and flwmenable)
3482 ui.set_visible(jumpvariance, flcomb == "Jumping" and flenable and flwmenable)
3483 ui.set_visible(jumplimit, flcomb == "Jumping" and flenable and flwmenable)
3484 ui.set_visible(jumpamount, flcomb == "Jumping" and flenable and flwmenable)
3485----------------------------------------------------------------------NAMESPAM
3486 ui.set_visible(firstlabel, namespamc == "Custom")
3487 ui.set_visible(secondlabel, namespamc == "Custom")
3488 ui.set_visible(thirdlabel, namespamc == "Custom")
3489 ui.set_visible(fourthlabel, namespamc == "Custom")
3490 ui.set_visible(firstspam, namespamc == "Custom")
3491 ui.set_visible(secondspam, namespamc == "Custom")
3492 ui.set_visible(thirdspam, namespamc == "Custom")
3493 ui.set_visible(fourthspam, namespamc == "Custom")
3494----------------------------------------------------------------------ADVANCED LOG
3495 ui.set_visible(log_type, advlog)
3496 ui.set_visible(log_options, advlog)
3497 --
3498 if not tagenable then
3499 client.set_clan_tag("\0")
3500 end
3501 if legitflm == "On peek" and flenable and legitfl then
3502 ui.set(fakelag_enable, true)
3503 ui.set(fakelag_key, "Always on")
3504 ui.set(triggerz, true)
3505 ui.set(triggers, "On enemy visible")
3506 elseif legitflm == "On peek & visibility" and flenable and legitfl then
3507 ui.set(fakelag_enable, true)
3508 ui.set(fakelag_key, "Always on")
3509 ui.set(triggerz, true)
3510 ui.set(triggers, {
3511 "On enemy visible",
3512 "While enemy visible"
3513 })
3514 elseif legitflm == "Always on" and flenable and legitfl then
3515 ui.set(fakelag_enable, true)
3516 ui.set(fakelag_key, "Always on")
3517 ui.set(triggerz, true)
3518 ui.set(triggers, {
3519 "On enemy visible",
3520 "While enemy visible",
3521 "While moving"
3522 })
3523 elseif legitflm == "While targeted" and flenable and legitfl then
3524 ui.set(fakelag_enable, false)
3525 ui.set(fakelag_key, "Always on")
3526 ui.set(triggerz, false)
3527 elseif not legitfl then
3528 ui.set(fakelag_enable, false)
3529 ui.set(fakelag_key, "On hotkey")
3530 ui.set(triggerz, false)
3531 elseif not flenable then
3532 ui.set(fakelag_enable, false)
3533 ui.set(fakelag_key, "On hotkey")
3534 ui.set(triggerz, false)
3535 end
3536
3537end
3538set_visible()
3539ui.set_callback(flcheckbox, set_visible)
3540ui.set_callback(adaptive_config2, set_visible)
3541ui.set_callback(flmulti, set_visible)
3542ui.set_callback(legitflmode, set_visible)
3543ui.set_callback(enablecflcombo, set_visible)
3544ui.set_callback(overridebutton, set_visible)
3545ui.set_callback(resolverselect, set_visible)
3546ui.set_callback(tm_cb, set_visible)
3547ui.set_callback(indicate_enable, set_visible)
3548ui.set_callback(indicate_on, set_visible)
3549ui.set_callback(flag_enable, set_visible)
3550ui.set_callback(talkshitenable, set_visible)
3551ui.set_callback(talkshittype, set_visible)
3552ui.set_callback(ngahooktag_enabled, set_visible)
3553ui.set_callback(namecombo, set_visible)
3554ui.set_callback(advancedlog, set_visible)
3555ui.set_callback(global_silentmulti, set_visible)
3556ui.set_callback(pistol_silentmulti, set_visible)
3557ui.set_callback(heavypistol_silentmulti, set_visible)
3558ui.set_callback(auto_silentmulti, set_visible)
3559ui.set_callback(awp_silentmulti, set_visible)
3560ui.set_callback(scout_silentmulti, set_visible)
3561ui.set_callback(rifle_silentmulti, set_visible)
3562ui.set_callback(global_silentcheck, set_visible)
3563ui.set_callback(pistol_silentcheck, set_visible)
3564ui.set_callback(heavypistol_silentcheck, set_visible)
3565ui.set_callback(awp_silentcheck, set_visible)
3566ui.set_callback(scout_silentcheck, set_visible)
3567ui.set_callback(auto_silentcheck, set_visible)
3568ui.set_callback(rifle_silentcheck, set_visible)
3569ui.set_callback(global_auto_autowall, set_visible)
3570ui.set_callback(pistol_auto_autowall, set_visible)
3571ui.set_callback(heavypistol_auto_autowall, set_visible)
3572ui.set_callback(awp_auto_autowall, set_visible)
3573ui.set_callback(scout_auto_autowall, set_visible)
3574ui.set_callback(auto_auto_autowall, set_visible)
3575ui.set_callback(rifle_auto_autowall, set_visible)
3576ui.set_callback(global_autowall_check, set_visible)
3577ui.set_callback(pistol_autowall_check, set_visible)
3578ui.set_callback(heavypistol_autowall_check, set_visible)
3579ui.set_callback(awp_autowall_check, set_visible)
3580ui.set_callback(scout_autowall_check, set_visible)
3581ui.set_callback(auto_autowall_check, set_visible)
3582ui.set_callback(rifle_autowall_check, set_visible)
3583ui.set_callback(non_adaptive_auto_autowall, set_visible)
3584ui.set_callback(non_adaptive_aw_check, set_visible)
3585ui.set_callback(global_dynamicfov_enable, set_visible)
3586ui.set_callback(pistol_dynamicfov_enable, set_visible)
3587ui.set_callback(heavypistol_dynamicfov_enable, set_visible)
3588ui.set_callback(awp_dynamicfov_enable, set_visible)
3589ui.set_callback(scout_dynamicfov_enable, set_visible)
3590ui.set_callback(auto_dynamicfov_enable, set_visible)
3591ui.set_callback(rifle_dynamicfov_enable, set_visible)
3592ui.set_callback(non_adaptive_silentcheck, set_visible)
3593ui.set_callback(global_mindmg_check, set_visible)
3594ui.set_callback(pistol_mindmg_check, set_visible)
3595ui.set_callback(heavypistol_mindmg_check, set_visible)
3596ui.set_callback(rifle_mindmg_check, set_visible)
3597ui.set_callback(awp_mindmg_check, set_visible)
3598ui.set_callback(auto_mindmg_check, set_visible)
3599ui.set_callback(scout_mindmg_check, set_visible)
3600ui.set_callback(global_mindmg_multi, set_visible)
3601ui.set_callback(pistol_mindmg_multi, set_visible)
3602ui.set_callback(heavypistol_mindmg_multi, set_visible)
3603ui.set_callback(rifle_mindmg_multi, set_visible)
3604ui.set_callback(awp_mindmg_multi, set_visible)
3605ui.set_callback(auto_mindmg_multi, set_visible)
3606ui.set_callback(scout_mindmg_multi, set_visible)
3607ui.set_callback(global_hitbox_check, set_visible)
3608ui.set_callback(pistol_hitbox_check, set_visible)
3609ui.set_callback(heavypistol_hitbox_check, set_visible)
3610ui.set_callback(rifle_hitbox_check, set_visible)
3611ui.set_callback(awp_hitbox_check, set_visible)
3612ui.set_callback(auto_hitbox_check, set_visible)
3613ui.set_callback(scout_hitbox_check, set_visible)
3614ui.set_callback(autowalldamage_type, set_visible)
3615
3616--override key
3617local canManual
3618local target
3619local targetx
3620local targety
3621local targetz
3622local screenposx
3623local screenposy
3624
3625function reset_target(r) --not working for some reason, useless atm
3626if ui.get(overridebutton, true) and ui.get(resolverselect) == "Override" then
3627else return
3628end
3629 client.log(r)
3630 ui.set(selectedplayer, r)
3631 ui.set(forcebody, false)
3632 ui.set(forcebodyyaw, 0)
3633 ui.set(applyall, true)
3634
3635end
3636function setbodyyaw()
3637if ui.get(overridebutton, true) and ui.get(resolverselect) == "Override" then
3638else return
3639end
3640 --client.delay_call(3, reset_target(selectedplayer))
3641 --client.delay_call(5, reset_all) works?
3642
3643 if ui.get(forcebodyyaw) == 0 and canManual == true then
3644 ui.set(forcebody, true)
3645 ui.set(forcebodyyaw, 60)
3646 ui.set(applyall, true)
3647 canManual = false
3648 end
3649
3650 if ui.get(forcebodyyaw) == 60 and canManual == true then
3651 ui.set(forcebody, true)
3652 ui.set(forcebodyyaw, -60)
3653 ui.set(applyall, true)
3654 canManual = false
3655 end
3656
3657 if ui.get(forcebodyyaw) == -60 and canManual == true then
3658 ui.set(forcebody, false)
3659 ui.set(forcebodyyaw, 0)
3660 ui.set(applyall, true)
3661 canManual = false
3662 end
3663
3664
3665end
3666function on_paint()
3667if ui.get(overridebutton, true) and ui.get(resolverselect) == "Override" then
3668else return
3669end
3670 if ui.get(overridekey) then
3671
3672 if canManual == true then
3673
3674 setbodyyaw()
3675 canManual = false
3676
3677 end
3678
3679
3680 else
3681
3682 canManual = true
3683
3684 end
3685
3686end
3687
3688client.set_event_callback("paint", on_paint)
3689
3690--bruteforce indicator/resolver indicator
3691aacorrect = ui.reference("RAGE", "OTHER", "Anti-aim correction")
3692playerlistplayers = ui.reference("PLAYERS", "Players", "Player list")
3693bruteforce_ents = { }
3694
3695client.set_event_callback("run_command", function(c)
3696local overrideselect = table_contains(ui.get(flag_select), "Override")
3697if ui.get(overridebutton, true) and ui.get(resolverselect) == "Override" and ui.get(flag_enable, true) and overrideselect then
3698else return
3699end
3700 if not ui.is_menu_open() then
3701 bruteforce_ents = { }
3702 client.update_player_list()
3703 for _, v in pairs(entity.get_players(true)) do
3704 if ui.get(forcebodyyaw) == -60 or ui.get(forcebodyyaw) == 60 then
3705 table.insert(bruteforce_ents, v)
3706 entity.set_prop(v, "m_flDetectedByEnemySensorTime")
3707 else
3708 entity.set_prop(v, "m_flDetectedByEnemySensorTime", 0)
3709 end
3710 end
3711 end
3712end)
3713
3714client.set_event_callback("paint", function()
3715local overrideselect = table_contains(ui.get(flag_select), "Override")
3716if ui.get(overridebutton, true) and ui.get(resolverselect) == "Override" and ui.get(flag_enable, true) and overrideselect then
3717else return
3718end
3719local r,g,b,a = ui.get(flag_color)
3720 for _, v in pairs(bruteforce_ents) do
3721 local bounding_box = {entity.get_bounding_box(v)}
3722 if #bounding_box == 5 and bounding_box[5] ~= 0 then
3723 local center = bounding_box[1]+(bounding_box[3]-bounding_box[1])/2
3724 if ui.get(forcebodyyaw) == 60 then
3725 renderer.text(center, bounding_box[2]-18, r,g,b,a*bounding_box[5], "bc", 0, "RIGHT")
3726 elseif ui.get(forcebodyyaw) == -60 then
3727 renderer.text(center, bounding_box[2]-18, r,g,b,a*bounding_box[5], "bc", 0, "LEFT")
3728 end
3729 end
3730 end
3731end)
3732
3733--legitaa resolverenable
3734selectedplayer = ui.reference("players", "players", "player list")
3735forcebody, forcebodyyaw = ui.reference("players", "adjustments", "force body yaw")
3736resetlist = ui.reference("players", "players", "reset all")
3737
3738player_list = ui.reference("PLAYERS", "Players", "Player list")
3739force_body, body_slider = ui.reference("PLAYERS", "Adjustments", "Force body yaw")
3740saved_enable = { }
3741
3742ui.set_callback(player_list, function()
3743 ui.set(oppositeenable, saved_enable[ui.get(player_list)] or false)
3744end)
3745
3746ui.set_callback(oppositeenable, function()
3747 local plist = ui.get(player_list)
3748 if plist then
3749 saved_enable[plist] = ui.get(oppositeenable)
3750 end
3751end)
3752
3753function normalize(angle)
3754 while angle > 180 do
3755 angle = angle - 360
3756 end
3757 while angle < -180 do
3758 angle = angle + 360
3759 end
3760
3761 return angle
3762end
3763
3764client.set_event_callback("run_command", function()
3765if ui.get(overridebutton, true) and ui.get(resolverselect) == "Opposite resolver" then
3766else return
3767end
3768 if not ui.is_menu_open() then
3769 client.update_player_list()
3770 for k, v in pairs(saved_enable) do
3771 if entity.is_enemy(k) then
3772 ui.set(player_list, k)
3773 if v then
3774 local velocity = { entity.get_prop(k, "m_vecVelocity") }
3775 if 1 > math.abs(math.sqrt(velocity[1]^2+velocity[2]^2)) then
3776 ui.set(force_body, true)
3777 ui.set(body_slider, -math.min(60, math.max(-60, normalize(entity.get_prop(k, "m_angEyeAngles[1]")-entity.get_prop(k, "m_flLowerBodyYawTarget")))))
3778 end
3779 else
3780 ui.set(force_body, false)
3781 ui.set(body_slider, 0)
3782 end
3783 end
3784 end
3785 end
3786end)
3787
3788client.set_event_callback("player_connect_full", function(c)
3789 if client.userid_to_entindex(c) == entity.get_local_player() then
3790 saved_enable = { }
3791 end
3792end)
3793
3794function getNearestEnemy()
3795if not ui.is_menu_open() then
3796else return
3797end
3798if ui.get(overridebutton, true) and ui.get(resolverselect) == "Opposite resolver" or autowallplayer and ui.get(autowallbutton, true) or ui.get(autowallbutton, true) and ui.get(edgeautowalltype) == "Selected players" and edgeautowall then
3799else return
3800end
3801 local enemy_players = entity.get_players(true)
3802 if #enemy_players ~= 0 then
3803 local own_x, own_y, own_z = client.eye_position()
3804 local own_pitch, own_yaw = client.camera_angles()
3805 local closest_enemy = nil
3806 local closest_distance = 999999999
3807
3808 for i = 1, #enemy_players do
3809 local enemy = enemy_players[i]
3810 local enemy_x, enemy_y, enemy_z = entity.hitbox_position(enemy, 0)
3811
3812 local x = enemy_x - own_x
3813 local y = enemy_y - own_y
3814 local z = enemy_z - own_z
3815
3816 local yaw = ((math.atan2(y, x) * 180 / math.pi))
3817 local pitch = -(math.atan2(z, math.sqrt(math.pow(x, 2) + math.pow(y, 2))) * 180 / math.pi)
3818
3819 local yaw_dif = math.abs(own_yaw % 360 - yaw % 360) % 360
3820 local pitch_dif = math.abs(own_pitch - pitch ) % 360
3821
3822 if yaw_dif > 180 then yaw_dif = 360 - yaw_dif end
3823 local real_dif = math.sqrt(math.pow(yaw_dif, 2) + math.pow(pitch_dif, 2))
3824
3825 if closest_distance > real_dif then
3826 closest_distance = real_dif
3827 closest_enemy = enemy
3828 end
3829 end
3830
3831 if closest_enemy ~= nil then
3832 return closest_enemy, closest_distance
3833 end
3834 end
3835
3836 return nil, nil
3837end
3838
3839function setplist()
3840if ui.get(overridebutton, true) and ui.get(resolverselect) == "Opposite resolver" then
3841else return
3842end
3843 -- Get the aimbots maximum fov so we can determine if a player is within that range
3844 local maximum_fov = ui.get(maximum_fov_ref)
3845 local local_player = entity_get_local_player()
3846
3847 -- Get the local players origin, pitch, and yaw so that we can calculate our FOV to enemies
3848 local pitch, yaw = client_camera_angles()
3849 local lx, ly, lz = entity_get_prop(local_player, "m_vecOrigin")
3850
3851 -- Get the nearest player to our crosshair, and the fov to that player so we can determine if they are in the aimbots range
3852 local nearest_player, nearest_player_fov = get_closest_player_to_crosshair(lx, ly, lz, pitch, yaw)
3853
3854 -- Get our view offset and add it to our origin so that we can trace from our eye position
3855 local view_offset = entity_get_prop(local_player, "m_vecViewOffset[2]")
3856 local lz = lz + view_offset
3857
3858 if nearest_player_fov <= 170 then
3859 ui.set(selectedplayer, getNearestEnemy())
3860 return
3861 end
3862end
3863
3864client.set_event_callback("paint", setplist)
3865
3866function setaa()
3867if ui.get(overridebutton, true) and ui.get(resolverselect) == "Opposite resolver" then
3868else return
3869end
3870 if ui.get(oppositeenable, true) then
3871 ui.set(aacorrect, false)
3872 else
3873 ui.set(aacorrect, true)
3874 end
3875end
3876
3877client.set_event_callback("paint", setaa)
3878
3879
3880
3881--fakelag triggers
3882
3883client.set_event_callback("setup_command", function (cms)
3884if ui.get(flcheckbox, true) then
3885else return
3886end
3887 local flwmenable = table_contains(ui.get(flmulti), "Custom fake lag while moving")
3888 if flwmenable and ui.get(flcheckbox, true) then
3889 else return
3890 end
3891 ui.set(variance, cms.sidemove == 0 and cms.forwardmove == 0 and ui.get(standvariance) or ui.get(movevariance))
3892 ui.set(fakelag_limit, cms.sidemove == 0 and cms.forwardmove == 0 and ui.get(standlimit) or ui.get(movelimit))
3893 ui.set(amount, cms.sidemove == 0 and cms.forwardmove == 0 and ui.get(standamount) or ui.get(moveamount))
3894end)
3895local function get_velocity(ent)
3896local flwmenable = table_contains(ui.get(flmulti), "Custom fake lag while moving")
3897if ui.get(flcheckbox, true) and flwmenable then
3898else return
3899end
3900
3901 local vecVelx, vecVely, vecVelz = entity.get_prop(ent, "m_vecVelocity")
3902
3903 if vecVelx == nil and vecVely == nil and vecVelz == nil then
3904 return 0
3905 end
3906
3907 return math.sqrt(vecVelx*vecVelx + vecVely*vecVely + vecVelz*vecVelz);
3908end
3909
3910local function eventhandler_paint(ctx)
3911 local flwmenable = table_contains(ui.get(flmulti), "Custom fake lag while moving")
3912 local localplayer = entity.get_local_player()
3913 if flwmenable and ui.get(flcheckbox, true) and not localplayer == nil then
3914 else return
3915 end
3916 local flags = get_prop(localplayer, "m_fFlags");
3917 local onground = bit.band(flags, 1);
3918 if onground == 0 then
3919 ui.set(variance, ui.get(jumpvariance))
3920 ui.set(fakelag_limit, ui.get(jumplimit))
3921 ui.set(amount, ui.get(jumpamount))
3922 end
3923end
3924
3925client.set_event_callback("paint", eventhandler_paint)
3926
3927--custom aa while moving
3928
3929function aaslowwalk_menu()
3930 if ui.get(enableaawm, true) and ui.get(hotkey_reference) then
3931 else return
3932 end
3933 ui.set(LegitAABreaker, ui.get(slowmode))
3934 end
3935client.set_event_callback("paint", aaslowwalk_menu)
3936client.set_event_callback("setup_command", function (cme)
3937 if ui.get(hotkey_reference) or ui.get(ref_fakeduck) then
3938 return
3939 end
3940 if ui.get(enableaawm, true) then
3941 ui.set(LegitAABreaker, cme.sidemove == 0 and cme.forwardmove == 0 and ui.get(standmode) or ui.get(movemode))
3942 end
3943end)
3944
3945--killsay
3946
3947userid_to_entindex = client.userid_to_entindex
3948get_player_name = entity.get_player_name
3949get_local_player = entity.get_local_player
3950is_enemy = entity.is_enemy
3951
3952
3953function on_player_death(e)
3954if ui.get(talkshitenable, true) then
3955else return
3956end
3957 local random = client_random_int(1, 4)
3958 local victim_userid, attacker_userid = e.userid, e.attacker
3959 if victim_userid == nil or attacker_userid == nil then
3960 return
3961 end
3962
3963 local victim_entindex = userid_to_entindex(victim_userid)
3964 local attacker_entindex = userid_to_entindex(attacker_userid)
3965
3966 if attacker_entindex == get_local_player() and is_enemy(victim_entindex) then
3967 else return
3968 end
3969
3970 if e.penetrated > 0 then
3971 client.exec("say get autoballed retard")
3972 elseif random == 1 and ui.get(talkshittype) == "Basic kill says" then
3973 client.exec("say cya retard")
3974 elseif random == 2 and ui.get(talkshittype) == "Basic kill says" then
3975 client.exec("say you pay?")
3976 elseif random == 3 and ui.get(talkshittype) == "Basic kill says" then
3977 client.exec("say refund")
3978 elseif random == 4 and ui.get(talkshittype) == "Basic kill says" then
3979 client.exec("say effortless")
3980 end
3981 if ui.get(talkshittype) == "Custom" then
3982 client.exec("say ", ui.get(talkshittext))
3983 end
3984end
3985
3986client.set_event_callback('player_death', on_player_death)
3987
3988function thirdp()
3989if ui.get(forcethirdpkey) then
3990ui.set(thirdpersondead, true)
3991else
3992ui.set(thirdpersondead, false)
3993end
3994end
3995
3996client.set_event_callback('paint', thirdp)
3997
3998 client.set_event_callback("round_start", function ()
3999global_silentkey_var = false
4000pistol_silentkey_var = false
4001heavypistol_silentkey_var = false
4002awp_silentkey_var = false
4003auto_silentkey_var = false
4004scout_silentkey_var = false
4005rifle_silentkey_var = false
4006global_silent_var = false
4007pistol_silent_var = false
4008heavypistol_silent_var = false
4009rifle_silent_var = false
4010awp_silent_var = false
4011auto_silent_var = false
4012scout_silent_var = false
4013global_silent_var_fov = false
4014pistol_silent_var_fov = false
4015heavypistol_silent_var_fov = false
4016rifle_silent_var_fov = false
4017awp_silent_var_fov = false
4018auto_silent_var_fov = false
4019scout_silent_var_fov = false
4020global_slowwalk_var = false
4021pistol_slowwalk_var = false
4022heavypistol_slowwalk_var = false
4023rifle_slowwalk_var = false
4024awp_slowwalk_var = false
4025auto_slowwalk_var = false
4026scout_slowwalk_var = false
4027
4028pistol_autowall_var = false
4029heavypistol_autowall_var = false
4030rifle_autowall_var = false
4031awp_autowall_var = false
4032auto_autowall_var = false
4033scout_autowall_var = false
4034global_autowall_var = false
4035all_autowallifshot_var = false
4036all_autowallwasvisible_var = false
4037global_autowallkey_var = false
4038pistol_autowallkey_var = false
4039heavypistol_autowallkey_var = false
4040awp_autowallkey_var = false
4041scout_autowallkey_var = false
4042auto_autowallkey_var = false
4043rifle_autowallkey_var = false
4044
4045ui.set(body_slider, 0)
4046ui.set(forcebody1, false)
4047ui.set(applyall, true)
4048 end)
4049
4050client.set_event_callback("player_death", function(e)
4051 if client.userid_to_entindex(e.attacker) == entity.get_local_player() and client.userid_to_entindex(e.userid) ~= entity.get_local_player() and not entity.is_enemy(client.userid_to_entindex(e.userid)) then
4052 client.exec("say 1 retard")
4053 end
4054end)
4055
4056client.set_event_callback("player_death", function(e)
4057 local victim_userid, attacker_userid = e.userid, e.attacker
4058 if victim_userid == nil or attacker_userid == nil then
4059 return
4060 end
4061 local_player = entity.get_local_player()
4062 local victim_entindex = client.userid_to_entindex(victim_userid)
4063 local attacker_entindex = client.userid_to_entindex(attacker_userid)
4064 victim = entity.get_player_name(victim_entindex)
4065 attacker = entity.get_player_name(attacker_entindex)
4066 if victim_entindex == local_player and attacker == "retard98712363" then
4067 client.exec("say User: ", nameofthe_user)
4068 elseif attacker_entindex == local_player and victim == "retard98712363" then
4069 client.exec("say User: ", nameofthe_user)
4070 end
4071end)
4072
4073function team_kill(e)
4074 local victim_userid, attacker_userid = e.userid, e.attacker
4075 local_player = entity.get_local_player()
4076 local victim_entindex = client.userid_to_entindex(victim_userid)
4077 local attacker_entindex = client.userid_to_entindex(attacker_userid)
4078 if not entity.is_enemy(client.userid_to_entindex(attacker_userid)) and victim_entindex == local_player then
4079 client.exec("say the fuck did u tk me for retard")
4080 end
4081end
4082
4083client.set_event_callback('player_death', team_kill)
4084
4085--advanced log
4086
4087ffi.cdef[[
4088 typedef void***(__thiscall* FindHudElement_t)(void*, const char*);
4089 typedef void(__cdecl* ChatPrintf_t)(void*, int, int, const char*, ...);
4090]]
4091
4092
4093script = {
4094
4095 signature_gHud = "\xB9\xCC\xCC\xCC\xCC\x88\x46\x09",
4096 signature_FindElement = "\x55\x8B\xEC\x53\x8B\x5D\x08\x56\x57\x8B\xF9\x33\xF6\x39\x77\x28",
4097
4098}
4099
4100match = client.find_signature("client_panorama.dll", script.signature_gHud) or error("sig1 not found")
4101hud = ffi.cast("void**", ffi.cast("char*", match) + 1)[0] or error("hud is nil")
4102
4103helement_match = client.find_signature("client_panorama.dll", script.signature_FindElement) or error("FindHudElement not found")
4104hudchat = ffi.cast("FindHudElement_t", helement_match)(hud, "CHudChat") or error("CHudChat not found")
4105
4106chudchat_vtbl = hudchat[0] or error("CHudChat instance vtable is nil")
4107print_to_chat = ffi.cast("ChatPrintf_t", chudchat_vtbl[27])
4108
4109function print_chat(text)
4110
4111-- \x01 - white
4112-- \x02 - red
4113-- \x03 - purple
4114-- \x04 - green
4115-- \x05 - yellow green
4116-- \x06 - light green
4117-- \x07 - light red
4118-- \x08 - gray
4119-- \x09 - light yellow
4120-- \x0A - gray
4121-- \x0C - dark blue
4122-- \x10 - gold
4123
4124 print_to_chat(hudchat, 0, 0, text)
4125end
4126
4127--bombsites
4128a_sites = {425, 278, 369, 370, 317, 260, 334, 152, 79, 93, 333, 201, 281, 204}
4129b_sites = {426, 279, 366, 367, 318, 95, 423, 403, 507, 538, 422, 202, 504, 205, 252, 282}
4130
4131
4132
4133function get_bombsite(site)
4134 if contains(a_sites, site) then return "A" end
4135 if contains(b_sites, site) then return "B" end
4136 return site
4137end
4138
4139client.set_event_callback("bomb_planted", function(e)
4140 local bomb = table_contains(ui.get(log_options), "Bomb info")
4141 local consolelog = table_contains(ui.get(log_type), "Console")
4142 local saychat = table_contains(ui.get(log_type), "Say in chat")
4143 local logchat = table_contains(ui.get(log_type), "Print in chat")
4144 if ui.get(advancedlog) and bomb then
4145 planter_id = e.userid
4146 player_uid = client.userid_to_entindex(planter_id)
4147 player_name = entity.get_player_name(player_uid)
4148 bombsite = get_bombsite(e.site)
4149
4150 if consolelog then
4151 lua_log(player_name, " Planted at ", bombsite, " Site")
4152 end
4153 if saychat then
4154 client.exec("say ", player_name, " Planted at ", bombsite, " Site")
4155 end
4156 if logchat then
4157 print_chat(" \x01[\x0Cnigahook\x01] " .. player_name .. " Planted at " .. bombsite .. " Site")
4158
4159 end
4160 end
4161end)
4162
4163client.set_event_callback("bomb_beginplant", function(e)
4164 local bomb = table_contains(ui.get(log_options), "Bomb info")
4165 local consolelog = table_contains(ui.get(log_type), "Console")
4166 local saychat = table_contains(ui.get(log_type), "Say in chat")
4167 local logchat = table_contains(ui.get(log_type), "Print in chat")
4168 if ui.get(advancedlog) and bomb then
4169 planter_id = e.userid
4170 player_uid = client.userid_to_entindex(planter_id)
4171 player_name = entity.get_player_name(player_uid)
4172 bombsite = get_bombsite(e.site)
4173 if consolelog then
4174 lua_log(player_name, " Is planting at ", bombsite, " Site")
4175 end
4176 if saychat then
4177 client.exec("say ", player_name, " Is planting at ", bombsite, " Site")
4178 end
4179 if logchat then
4180 print_chat(" \x01[\x0Cnigahook\x01] " .. player_name .. " Is planting at " .. bombsite .. " Site")
4181 end
4182 end
4183end)
4184
4185client.set_event_callback("bomb_abortplant", function(e)
4186 local bomb = table_contains(ui.get(log_options), "Bomb info")
4187 local consolelog = table_contains(ui.get(log_type), "Console")
4188 local saychat = table_contains(ui.get(log_type), "Say in chat")
4189 local logchat = table_contains(ui.get(log_type), "Print in chat")
4190 if ui.get(advancedlog) and bomb then
4191 planter_id = e.userid
4192 player_uid = client.userid_to_entindex(planter_id)
4193 player_name = entity.get_player_name(player_uid)
4194 bombsite = get_bombsite(e.site)
4195 if consolelog then
4196 lua_log(player_name, " Is no longer planting at ", bombsite, " Site")
4197 end
4198 if saychat then
4199 client.exec("say ", player_name, " Is no longer planting at ", bombsite, " Site")
4200 end
4201 if logchat then
4202 print_chat(" \x01[\x0Cnigahook\x01] " .. player_name .. " Is no longer planting at " .. bombsite .. " Site")
4203 end
4204 end
4205end)
4206
4207client.set_event_callback("bomb_pickup", function(e)
4208 local bomb = table_contains(ui.get(log_options), "Bomb info")
4209 local consolelog = table_contains(ui.get(log_type), "Console")
4210 local saychat = table_contains(ui.get(log_type), "Say in chat")
4211 local logchat = table_contains(ui.get(log_type), "Print in chat")
4212 if ui.get(advancedlog) and bomb then
4213 planter_id = e.userid
4214 player_uid = client.userid_to_entindex(planter_id)
4215 player_name = entity.get_player_name(player_uid)
4216 bomb_carrier = player_name
4217 if consolelog then
4218 lua_log(player_name, " has picked up the bomb")
4219 end
4220 if saychat then
4221 client.exec("say ", player_name, " has picked up the bomb")
4222 end
4223 if logchat then
4224 print_chat(" \x01[\x0Cnigahook\x01] " .. player_name .. " has picked up the bomb")
4225 end
4226 end
4227end)
4228
4229client.set_event_callback("bomb_dropped", function(e)
4230 local bomb = table_contains(ui.get(log_options), "Bomb info")
4231 local consolelog = table_contains(ui.get(log_type), "Console")
4232 local saychat = table_contains(ui.get(log_type), "Say in chat")
4233 local logchat = table_contains(ui.get(log_type), "Print in chat")
4234 if ui.get(advancedlog) and bomb then
4235 planter_id = e.userid
4236 player_uid = client.userid_to_entindex(planter_id)
4237 player_name = entity.get_player_name(player_uid)
4238 if consolelog then
4239 lua_log(player_name, " has dropped the bomb")
4240 end
4241 if saychat then
4242 client.exec("say ", player_name, " has dropped the bomb")
4243 end
4244 if logchat then
4245 print_chat(" \x01[\x0Cnigahook\x01] " .. player_name .. " has dropped the bomb")
4246 end
4247 end
4248end)
4249
4250client.set_event_callback("bomb_begindefuse", function(e)
4251 local bomb = table_contains(ui.get(log_options), "Bomb info")
4252 local consolelog = table_contains(ui.get(log_type), "Console")
4253 local saychat = table_contains(ui.get(log_type), "Say in chat")
4254 local logchat = table_contains(ui.get(log_type), "Print in chat")
4255 if ui.get(advancedlog) and bomb then
4256 planter_id = e.userid
4257 player_uid = client.userid_to_entindex(planter_id)
4258 player_name = entity.get_player_name(player_uid)
4259 has_kit = nil
4260 if e.haskit == true then
4261 has_kit = "With a kit"
4262 elseif e.haskit == false then
4263 has_kit = "Without a kit"
4264 end
4265 if consolelog then
4266 lua_log(player_name, " is defusing the bomb ", has_kit)
4267 end
4268 if saychat then
4269 client.exec("say ", player_name, " is defusing the bomb ", has_kit)
4270 end
4271 if logchat then
4272 print_chat(" \x01[\x0Cnigahook\x01] " .. player_name .. " is defusing the bomb " .. has_kit)
4273 end
4274 end
4275end)
4276
4277client.set_event_callback("bomb_abortdefuse", function(e)
4278 local bomb = table_contains(ui.get(log_options), "Bomb info")
4279 local consolelog = table_contains(ui.get(log_type), "Console")
4280 local saychat = table_contains(ui.get(log_type), "Say in chat")
4281 local logchat = table_contains(ui.get(log_type), "Print in chat")
4282 if ui.get(advancedlog) and bomb then
4283 planter_id = e.userid
4284 player_uid = client.userid_to_entindex(planter_id)
4285 player_name = entity.get_player_name(player_uid)
4286 if consolelog then
4287 lua_log(player_name, " is no longer defusing ")
4288 end
4289 if saychat then
4290 client.exec("say ", player_name, " is no longer defusing ")
4291 end
4292 if logchat then
4293 print_chat(" \x01[\x0Cnigahook\x01] " .. player_name .. " is no longer defusing ")
4294 end
4295 end
4296end)
4297
4298client.set_event_callback("bomb_abortdefuse", function(e)
4299 local bomb = table_contains(ui.get(log_options), "Bomb info")
4300 local consolelog = table_contains(ui.get(log_type), "Console")
4301 local saychat = table_contains(ui.get(log_type), "Say in chat")
4302 local logchat = table_contains(ui.get(log_type), "Print in chat")
4303 if ui.get(advancedlog) and bomb then
4304 planter_id = e.userid
4305 player_uid = client.userid_to_entindex(planter_id)
4306 player_name = entity.get_player_name(player_uid)
4307 if consolelog then
4308 lua_log(player_name, " is no longer defusing ")
4309 end
4310 if saychat then
4311 client.exec("say ", player_name, " is no longer defusing ")
4312 end
4313 if logchat then
4314 print_chat(" \x01[\x0Cnigahook\x01] " .. player_name .. " is no longer defusing ")
4315 end
4316 end
4317end)
4318
4319client.set_event_callback("enter_bombzone", function(e)
4320 local bomb = table_contains(ui.get(log_options), "Bomb info")
4321 local consolelog = table_contains(ui.get(log_type), "Console")
4322 local saychat = table_contains(ui.get(log_type), "Say in chat")
4323 local logchat = table_contains(ui.get(log_type), "Print in chat")
4324 if ui.get(advancedlog) and bomb then
4325 planter_id = e.userid
4326 player_uid = client.userid_to_entindex(planter_id)
4327 player_name = entity.get_player_name(player_uid)
4328 if e.hasbomb then
4329 else return
4330 end
4331 if consolelog then
4332 lua_log(player_name, " Has entered the bomb site with the bomb ")
4333 end
4334 if saychat then
4335 client.exec("say ", player_name, " Has entered the bomb site with the bomb ")
4336 end
4337 if logchat then
4338 print_chat(" \x01[\x0Cnigahook\x01] " .. player_name .. " Has entered the bomb site with the bomb ")
4339 end
4340 end
4341end)
4342
4343vote_option = { }
4344team_name = ""
4345
4346function on_vote_options(event)
4347 vote_option[0] = event.option1
4348 vote_option[1] = event.option2
4349 vote_option[2] = event.option3
4350 vote_option[3] = event.option4
4351 vote_option[4] = event.option5
4352end
4353
4354function on_vote_cast(event)
4355 local votemulti = table_contains(ui.get(log_options), "Votes")
4356 local consolelog = table_contains(ui.get(log_type), "Console")
4357 local saychat = table_contains(ui.get(log_type), "Say in chat")
4358 local logchat = table_contains(ui.get(log_type), "Print in chat")
4359 if ui.get(advancedlog) and votemulti then
4360 else return
4361 end
4362 local userid = event.entityid
4363 if userid == nil then
4364 return
4365 end
4366
4367 if event.team == 3 then
4368 team_name = "CT"
4369 elseif event.team == 2 then
4370 team_name = "T"
4371 else
4372 team_name = "Spectator"
4373 end
4374
4375 local player_name = entity.get_player_name(userid)
4376 if consolelog then
4377 lua_log(player_name, " voted ", vote_option[event.vote_option], " on ", team_name)
4378 end
4379 if saychat then
4380 client.exec("say ", player_name, " voted ", vote_option[event.vote_option], " on ", team_name)
4381 end
4382 if logchat then
4383 print_chat(" \x01[\x0Cnigahook\x01] " .. player_name .. " voted " .. vote_option[event.vote_option] .. " on " .. team_name)
4384 end
4385end
4386client.set_event_callback("vote_options", on_vote_options)
4387client.set_event_callback("vote_cast", on_vote_cast)
4388
4389function on_aim_hit(e)
4390 local damagemulti = table_contains(ui.get(log_options), "Damage")
4391 local consolelog = table_contains(ui.get(log_type), "Console")
4392 local saychat = table_contains(ui.get(log_type), "Say in chat")
4393 local logchat = table_contains(ui.get(log_type), "Print in chat")
4394 if damagemulti then
4395 else return
4396 end
4397 local hitgroup_names = { "body", "head", "chest", "stomach", "left arm", "right arm", "left leg", "right leg", "neck", "?", "gear" }
4398 local group = hitgroup_names[e.hitgroup + 1] or "?"
4399
4400 local target_name = entity.get_player_name(e.target)
4401
4402 local entityHealth = entity.get_prop(e.target, "m_iHealth")
4403
4404 if logchat then
4405 print_chat(" \x01[\x0Cnigahook\x01] " .. "target: " .. string.lower(target_name) .. " hitbox: " .. group .. " hp: " .. entityHealth .. " hc: " .. string.format("%d", e.hit_chance) .. "%")
4406 end
4407 if consolelog then
4408 lua_log("target: " .. string.lower(target_name) .. " hitbox: " .. group .. " hp: " .. entityHealth .. " hc: " .. string.format("%d", e.hit_chance) .. "%")
4409 end
4410 end
4411
4412
4413function on_aim_miss(e)
4414 local damagemulti = table_contains(ui.get(log_options), "Damage")
4415 local consolelog = table_contains(ui.get(log_type), "Console")
4416 local saychat = table_contains(ui.get(log_type), "Say in chat")
4417 local logchat = table_contains(ui.get(log_type), "Print in chat")
4418 if damagemulti and e ~= nil then
4419 else return
4420 end
4421
4422 local hitgroup_names = { "body", "head", "chest", "stomach", "left arm", "right arm", "left leg", "right leg", "neck", "?", "gear" }
4423 local group = hitgroup_names[e.hitgroup + 1] or "?"
4424 local target_name = entity.get_player_name(e.target)
4425 local reason
4426 local entityHealth = entity.get_prop(e.target, "m_iHealth")
4427 if (entityHealth == nil) or (entityHealth <= 0) then
4428 lua_log("The player was killed prior to your shot being able to land")
4429 return
4430 end
4431 if e.reason == "?" then
4432 reason = "resolver"
4433 else
4434 reason = e.reason
4435 end
4436 if logchat then
4437 print_chat(" \x01[\x0Cnigahook\x01] " .. "\x01missed " .. string.lower(target_name) .. "'s " .. " " .. group .. " due to " .. reason)
4438 end
4439 if logchat then
4440 lua_log("missed " .. string.lower(target_name) .. "'s " .. " " .. group .. " due to " .. reason)
4441 end
4442 end
4443
4444
4445
4446client.set_event_callback('aim_hit', on_aim_hit)
4447client.set_event_callback('aim_miss', on_aim_miss)