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