· 6 years ago · Mar 08, 2020, 09:32 PM
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--end of local variables
15
16------------------
17----ScriptLock----
18------------------
19
20--client.log(keyvalue)
21
22nameofthe_user = "COCABOSS2017"
23
24----------------------------------------------------------------------------------
25client.color_log(255, 255, 255, "---------------------------------------------------------------------------")
26client.color_log(30, 144, 255, "Welcome ", nameofthe_user, ", Lua date: March 3rd, 2020, 7:20 am GMT+1")
27client.color_log(30, 144, 255, "If you have any issues or find any bugs message me on discord. night#0461")
28client.color_log(255, 255, 255, "---------------------------------------------------------------------------")
29----------------------------------------------------------------------------------
30
31--database.write("key", keyvalue)
32------------
33-----UI-----
34------------
35
36------------DYNAMIC FOV
37dynamicfov_enable = ui_new_checkbox('RAGE', 'Other', 'Dynamic FOV')
38dynamicfov_select = ui_new_combobox('RAGE', 'Other', 'Dynamic FOV', 'Default', 'Adaptive weapon dynamic FOV')
39dynamicfov_weapons = ui_new_combobox('RAGE', 'Other', 'Dynamic FOV Weapons', 'Pistols', 'Rifles', 'Awp/scout/auto', 'Smg/other')
40dynamicfov_min = ui_new_slider('RAGE', 'Other', 'Dynamic FOV Min', 1, 180, 3, true, '°', 1)
41dynamicfov_max = ui_new_slider('RAGE', 'Other', 'Dynamic FOV Max', 1, 180, 69, true, '°', 1)
42dynamicfov_auto_factor = ui_new_slider('RAGE', 'Other', 'Dynamic FOV Auto Factor', 0, 250, 100, true, 'x', 0.01)
43--pistols
44dynamicfov_minpistol = ui_new_slider('RAGE', 'Other', 'Pistol Dynamic FOV Min', 1, 180, 3, true, '°', 1)
45dynamicfov_maxpistol = ui_new_slider('RAGE', 'Other', 'Pistol Dynamic FOV Max', 1, 180, 69, true, '°', 1)
46--rifle
47dynamicfov_minrifle = ui_new_slider('RAGE', 'Other', 'Rifle Dynamic FOV Min', 1, 180, 3, true, '°', 1)
48dynamicfov_maxrifle = ui_new_slider('RAGE', 'Other', 'Rifle Dynamic FOV Max', 1, 180, 69, true, '°', 1)
49--scoped
50dynamicfov_minscope = ui_new_slider('RAGE', 'Other', 'Awp/scout/auto Dynamic FOV Min', 1, 180, 3, true, '°', 1)
51dynamicfov_maxscope = ui_new_slider('RAGE', 'Other', 'Awp/scout/auto Dynamic FOV Max', 1, 180, 69, true, '°', 1)
52--other
53dynamicfov_minother = ui_new_slider('RAGE', 'Other', 'Smg/other Dynamic FOV Min', 1, 180, 3, true, '°', 1)
54dynamicfov_maxother = ui_new_slider('RAGE', 'Other', 'Smg/other Dynamic FOV Max', 1, 180, 69, true, '°', 1)
55------------DYNAMIC LEGIT AA
56legitAA = ui_new_checkbox("AA", "Anti-aimbot angles", "Legit anti-aim")
57legitAAbase = ui_new_combobox("AA", "Anti-aimbot angles", "\n aa_legit_base", "Manual", "Dynamic")
58LegitAAHotkey = ui_new_hotkey("AA", "Anti-aimbot angles", "Anti-aim switch key", true)
59LegitAABreaker = ui_new_combobox("AA", "Anti-aimbot angles", "Anti-aim mode", "Smart", "Maximum", "Fast", "Slow", "Break bruteforce")
60brutemode2 = ui.new_combobox("aa", "anti-aimbot angles", "Break Mode", "Slow", "Fast", "Jitter")
61
62ui_indicator_combobox4 = ui.new_combobox("AA", "Anti-aimbot angles", "Anti-aim indicator", "Off", "Metro", "Point arrows", "Dashes")
63ui_indicator_color_picker4 = ui.new_color_picker("AA", "Anti-aimbot angles", "Indicator colour", "0", "115", "255", "255")
64
65enableaawm = ui.new_checkbox('AA', 'Anti-aimbot angles', 'Custom AA While moving')
66legitaamoving = ui.new_combobox("AA", "Anti-aimbot angles", "\n aa_legit_bases", 'Off', 'Slow walk', 'Moving', 'Standing')
67--slow walk
68slowmode = ui.new_combobox('AA', 'Anti-aimbot angles', "Slow walk AA", "Smart", "Maximum", "Fast", "Slow", "Break bruteforce")
69--move
70movemode = ui.new_combobox('AA', 'Anti-aimbot angles', "Moving AA", "Smart", "Maximum", "Fast", "Slow", "Break bruteforce")
71--stand
72standmode = ui.new_combobox('AA', 'Anti-aimbot angles', "Stand AA", "Smart", "Maximum", "Fast", "Slow", "Break bruteforce")
73
74------------TRIGGERMAGNET
75tm_cb = ui.new_checkbox("Rage", "Other", "Triggermagnet")
76triggermagnet = ui.new_hotkey("Rage", "Other", "Triggermagnet", true)
77typeselect = ui.new_combobox("Rage", "Other", "Select", "Default", "Advanced")
78
79triggerdmg = ui.new_slider("Rage", "Other", "Minimum damage override", 1, 100, 3, true)
80triggerhtc = ui.new_slider("Rage", "Other", "Hitchance override", 1, 100, 3, true, "%")
81------------AUTOWALL
82trans_values2 = {
83 [1] = "1%", [2] = "2%", [3] = "3%", [4] = "4%", [5] = "5%", [6] = "6%", [7] = "7%", [8] = "8%", [9] = "9%", [10] = "10%", [11] = "11%", [12] = "12%", [13] = "13%", [14] = "14%", [15] = "15%", [16] = "16%", [17] = "17%", [18] = "18%", [19] = "19%", [20] = "20%", [21] = "21%", [22] = "22%", [23] = "23%", [24] = "24%", [25] = "25%", [26] = "26%", [27] = "27%", [28] = "28%", [29] = "29%", [30] = "30%", [31] = "31%", [32] = "32%", [33] = "33%", [34] = "34%", [35] = "35%", [36] = "36%", [37] = "37%", [38] = "38%", [39] = "39%", [40] = "40%", [41] = "41%", [42] = "42%", [43] = "43%", [44] = "44%", [45] = "45%", [46] = "46%", [47] = "47%", [48] = "48%", [49] = "49%", [50] = "50%", [51] = "51%", [52] = "52%", [53] = "53%", [54] = "54%", [55] = "55%", [56] = "56%", [57] = "57%", [58] = "58%", [59] = "59%", [60] = "60%", [61] = "61%", [62] = "62%", [63] = "63%", [64] = "64%", [65] = "65%", [66] = "66%", [67] = "67%", [68] = "68%", [69] = "69%", [70] = "70%", [71] = "71%", [72] = "72%", [73] = "73%", [74] = "74%", [75] = "75%", [76] = "76%", [77] = "77%", [78] = "78%", [79] = "79%", [80] = "80%", [81] = "81%", [82] = "82%", [83] = "83%", [84] = "84%", [85] = "85%", [86] = "86%", [87] = "87%", [88] = "88%", [89] = "89%", [90] = "90%", [91] = "91%", [92] = "92%", [93] = "93%", [94] = "94%", [95] = "95%", [96] = "96%", [97] = "97%", [98] = "98%", [99] = "99%", [100] = "100%",
84}
85autowallbutton = ui.new_checkbox("RAGE", "Other", "Autowall")
86autowalltoggle = ui.new_hotkey("RAGE", "Other", "Automatic Penetration Toggle", true)
87auto_autowall = ui.new_multiselect("RAGE", "Other", "Auto autowall modes", "Transparent props", "Penetration reticle", "Min dmg override", "Dynamic autowall FOV", "Autowall if shot me", "Edge autowall", "Autowall specific players", "Autowall if was visible")
88slider_trans = ui.new_slider('rage', 'other', 'Transparent props', 1, 100, 1, true, "", 1, trans_values2)
89
90dynamicfov_minaw = ui_new_slider('RAGE', 'Other', 'Dynamic FOV Min', 1, 180, 3, true, '°', 1)
91dynamicfov_maxaw = ui_new_slider('RAGE', 'Other', 'Dynamic FOV Max', 1, 180, 69, true, '°', 1)
92dynamicfov_auto_factoraw = ui_new_slider('RAGE', 'Other', 'Dynamic FOV Auto Factor', 0, 250, 100, true, 'x', 0.01)
93autowalldmg = ui.new_slider("Rage", "Other", "Autowall Minimum damage override", 1, 100, 3, true)
94edgeautowallbutton = ui.new_checkbox("Players", "Adjustments", "Edge autowall")
95edgeautowalltype = ui.new_combobox("RAGE", "Other", "Edge autowall players", "All players", "Selected players")
96legit_pen_threshold_ref = ui.new_slider("RAGE", "Other", "Visible hitbox threshold", 0, 18, 4, true)
97
98beforedelay = ui.new_slider("RAGE", "Other", "How long until autowall turns on", 1, 1000, 1, true, 's')
99autodely = ui.new_slider("RAGE", "Other", "How long autowall stays on", 1, 1000, 1, true, 's')
100autowallplayerbutton = ui.new_checkbox("PLAYERS", "Adjustments", 'Autowall this player')
101_autowall_mode_auto_trigger_delay = ui.new_slider('rage', 'other', 'How long autowall stays on after seeing player', 0, 2500, 850, true, 'ms')
102autowallvar1 = false
103autowallvar2 = false
104autowallvar3 = false
105autowallvar4 = false
106autowallvar5 = false
107autowallvar6 = false
108------------INDICATORS
109indicate_enable = ui.new_checkbox("RAGE", "Other", "Indicators")
110indicate_on = ui.new_combobox("RAGE", "Other", "Indicators (drag to move small and big)", "Off", "Small", "Big", "Default")
111indicate_color = ui.new_color_picker("RAGE", "Other", "Indicators")
112indicate_select = ui.new_multiselect("RAGE", "Other", "Indicator select", "Triggermagnet", "Silent aim", "Autowall", "Legitbot improvements", "FOV", "Bruteforce", "Force body aim", "Safe point")
113indicateposition = ui.new_slider("RAGE", "Other", "Reposition Indicators X", 0, 40, 0, true, "x")
114------------FLAGS
115flag_enable = ui.new_checkbox("RAGE", "Other", "Flags")
116flag_color = ui.new_color_picker("RAGE", "Other", "\n flags")
117flag_select = ui.new_multiselect("RAGE", "Other", "\n flags", "Override")
118------------FAKELAG
119flcheckbox = ui.new_checkbox("AA", "Fake lag", "Fake lag")
120flmulti = ui.new_multiselect("AA", "Fake lag", "Fake lag", "Fakelag presets", "Custom fake lag while moving")
121legitflmode = ui_new_combobox("AA", "Fake lag", "\n aa_legit_fl_mode", {
122 "On peek",
123 "On peek & visibility",
124 "Always on",
125})
126------------LEGITBOT IMPROVEMENTS
127legitbotimprovements = ui.new_checkbox("RAGE", "Other", "Legitbot improvements")
128------------SILENT AIM
129silentbuttonenable = ui.new_checkbox("RAGE", "Other", "Silent settings")
130silentmulti = ui.new_multiselect("RAGE", "Other", "Silent aim settings", "Silent aim on key", "Silent aim if in fov", "Silent aim in distance", "Silent aim while slow walking")
131silentkey = ui.new_hotkey("RAGE", "Other", "Silent Aim On Toggle")
132silentvar1 = false
133silentvar2 = false
134silentvar3 = false
135silentvar4 = false
136silentvar5 = false
137------------SILENT AIM IF FOV
138silentfovslider = ui.new_slider("RAGE", "Other", "Silent aim if in fov", 1, 180, 1, true, "°")
139------------SILENT AIM IN DISTANCE
140silentdistance = ui.new_slider('RAGE', 'Other', 'Silent aim enable in distance', 1, 3000, 1)
141distancecircle = ui.new_checkbox("rage", "other", "Distance circle")
142------------RESOLVER
143--OVERRIDE
144overridebutton = ui.new_checkbox("rage", "other", "Resolver")
145resolverselect = ui.new_combobox("rage", "other", "Resolver", "Override", "Opposite resolver")
146overridekey = ui.new_hotkey("rage", "other", "Override key: Right/Left/Off")
147
148oppositeenable = ui.new_checkbox("PLAYERS", "Adjustments", "Enable resolver")
149------------CUSTOM FAKELAG TRIGGERS
150enablecfl = ui.new_checkbox('AA', 'Fake lag', 'Custom fake lag triggers')
151enablecflcombo = ui.new_combobox('AA', 'Fake lag', 'Custom fake lag triggers', 'Off', 'Slow walk', 'Moving', 'Standing', 'Jumping')
152--slow walk
153slowvariance = ui.new_slider('AA', 'Fake lag', 'Slowwalk variance', 0, 100, 0, true, '%')
154slowlimit = ui.new_slider('AA', 'Fake lag', 'Slowwalk limit', 1, 14, 1, true)
155slowamount = ui.new_combobox('AA', 'Fake lag', 'Slowwalk amount', 'Dynamic', 'Maximum', 'Fluctuate')
156--move
157movevariance = ui.new_slider('AA', 'Fake lag', 'Moving variance', 0, 100, 0, true, '%')
158movelimit = ui.new_slider('AA', 'Fake lag', 'Moving limit', 1, 14, 1, true)
159moveamount = ui.new_combobox('AA', 'Fake lag', 'Moving amount', 'Dynamic', 'Maximum', 'Fluctuate')
160--stand
161standvariance = ui.new_slider('AA', 'Fake lag', 'Standing variance', 0, 100, 0, true, '%')
162standlimit = ui.new_slider('AA', 'Fake lag', 'Standing limit', 1, 14, 1, true)
163standamount = ui.new_combobox('AA', 'Fake lag', 'Standing amount', 'Dynamic', 'Maximum', 'Fluctuate')
164--stand
165jumpvariance = ui.new_slider('AA', 'Fake lag', 'Jumping variance', 0, 100, 0, true, '%')
166jumplimit = ui.new_slider('AA', 'Fake lag', 'Jumping limit', 1, 14, 1, true)
167jumpamount = ui.new_combobox('AA', 'Fake lag', 'Jumping amount', 'Dynamic', 'Maximum', 'Fluctuate')
168------------killsay
169talkshitenable = ui.new_checkbox('RAGE', 'Other', 'Killsay')
170talkshittype = ui.new_combobox('RAGE', 'Other', "Killsay type", 'Basic kill says', 'Custom')
171talkshittext = ui.new_textbox('RAGE', 'Other', "\n text")
172------------
173--REFRENCE--
174------------
175
176ragebot_maximum_fov = ui.reference('RAGE', 'Aimbot', 'maximum fov')
177forcesafepoint = ui.reference('RAGE', 'Aimbot', 'Force safe point')
178
179aaenablers = ui.reference("AA", "Anti-aimbot angles", "Enabled")
180pitch = ui.reference("AA", "Anti-aimbot angles", "Pitch")
181yaw_base = ui.reference("AA", "Anti-aimbot angles", "Yaw base")
182yaw, yaw_num = ui.reference("AA", "Anti-aimbot angles", "Yaw")
183yaw_jitter = ui.reference("AA", "Anti-aimbot angles", "Yaw jitter")
184body, body_num = ui.reference("AA", "Anti-aimbot angles", "Body yaw")
185limit = ui.reference("AA", "Anti-aimbot angles", "Fake yaw limit")
186lby = ui.reference("AA", "Anti-aimbot angles", "Lower body yaw target")
187
188rageautofire = ui.reference("Rage", "Aimbot", "Automatic Fire")
189ragebot, ragebotmode = ui.reference("Rage", "Aimbot", "Enabled")
190autowall = ui.reference("RAGE", "Aimbot", "Automatic Penetration")
191min_dmg = ui.reference('rage', 'aimbot', 'minimum damage')
192trans = ui.reference('VISUALS', 'Effects', 'Transparent props')
193FOVS5 = ui.reference('RAGE', 'AIMBOT', 'Maximum FOV')
194preticle = ui.reference("VISUALS", "Other ESP", "Penetration reticle")
195ref_fl = ui.reference("AA", "Fake lag", "Limit")
196ref_fakeduck = ui.reference("Rage", "Other", "Duck peek assist")
197trigger = ui.reference("RAGE", "Aimbot", "Automatic fire")
198rage_enabl = ui.reference("RAGE", "Aimbot", "Enabled")
199silent = ui.reference("RAGE", "Aimbot", "Silent aim")
200force_body_aim = ui.reference("RAGE", "Other", "Force body aim")
201Max_f0v = ui.reference("RAGE", "Aimbot", "Maximum FOV")
202selectedplayer = ui.reference("players", "players", "player list")
203forcebody1, forcebodyyaw1 = ui.reference("players", "adjustments", "force body yaw")
204resetlist = ui.reference("players", "players", "reset all")
205applyall = ui.reference("players", "adjustments", "Apply to all")
206triggers = ui.reference("AA", "Fake lag", "Triggers")
207fakelag_enable, fakelag_key = ui.reference("AA", "Fake lag", "Enabled")
208triggerz = ui.reference("AA", "Fake lag", "Customize triggers")
209fl, fl_enable = ui.reference("AA", "Fake lag", "Enabled")
210ref_aimbot_enabled = ui.reference("RAGE", "Aimbot", "Enabled")
211ui_fd = ui.reference("Rage", "Other", "Duck peek assist")
212forcebody, forcebodyyaw = ui.reference("players", "adjustments", "force body yaw")
213resetlist = ui.reference("players", "players", "reset all")
214applyall = ui.reference("players", "adjustments", "Apply to all")
215autodirection, autodirection_key = ui.reference("AA", "Anti-aimbot angles", "Freestanding")
216edgeyaw = ui.reference("AA", "Anti-aimbot angles", "Edge yaw")
217bodyyaw_freestand = ui.reference("AA", "Anti-aimbot angles", "Freestanding body yaw")
218fakelag_limit = ui.reference("AA", "Fake lag", "Limit")
219checkbox_reference, hotkey_reference = ui.reference("AA", "Other", "Slow motion")
220brightness, adjustment = ui.reference("Visuals", "Effects", "Brightness adjustment")
221variance = ui.reference("AA", "Fake lag", "Variance")
222amount = ui.reference("AA", "Fake lag", "Amount")
223hitchance = ui.reference("RAGE", "Aimbot", "Minimum hit chance")
224plistoverride = ui.reference("players", "adjustments", "Override anti-aim correction")
225thirdpersonk, forcethirdpkey = ui.reference("VISUALS", "Effects", "Force third person (alive)")
226thirdpersondead = ui.reference("VISUALS", "Effects", "Force third person (dead)")
227infiniteduck = ui.reference("MISC", "Movement", "Infinite duck")
228
229getui = ui.get
230
231function table_contains(tbl, value)
232 for i = 1, #tbl do
233 if tbl[i] == value then
234 return true
235 end
236 end
237 return false
238end
239
240--adaptive weapon
241
242bit_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
243adaptive_weapons = {
244 ["Global"] = {},
245 ["Auto"] = { 11, 38 },
246 ["Awp"] = { 9 },
247 ["Scout"] = { 40 },
248 ["Desert Eagle"] = { 1 },
249 ["Revolver"] = { 64 },
250 ["Pistol"] = { 2, 3, 4, 30, 32, 36, 61, 63 },
251 ["Rifle"] = { 7, 8, 10, 13, 16, 39, 60 },
252 --["Submachine gun"] = {17, 19, 24, 26, 33, 34},
253 --["Machine gun"] = {14, 28},
254 --["Shotgun"] = {25, 27, 29, 35},
255}
256
257local adaptive = {}
258local references = {}
259local callbacks = {}
260local active_config = "Global"
261local weapon_id_lookup_table
262local run_command
263
264function collect_keys(tbl, sort)
265 local keys = {}
266 sort = sort or true
267 for k in pairs(tbl) do
268 keys[#keys + 1] = k
269 end
270 if sort then
271 table_sort(keys)
272 end
273 return keys
274end
275function table_contains(tbl, value)
276 for i = 1, #tbl do
277 if tbl[i] == value then
278 return true
279 end
280 end
281 return false
282end
283function create_lookup_table(tbl)
284 local result = {}
285 for name, weapon_ids in pairs(tbl) do
286 for i = 1, #weapon_ids do
287 result[weapon_ids[i]] = name
288 end
289 end
290 return result
291end
292
293adaptive_options2 = ui_new_multiselect("RAGE", "Other", "asddd", "Log", "Visible")
294adaptive_config2 = ui_new_combobox("RAGE", "Aimbot", "addd", collect_keys(adaptive_weapons))
295
296function update_menu(visible)
297 ui.set(adaptive_config2, active_config)
298 if visible then
299 end
300end
301
302run_command = function()
303 local local_player = entity_get_local_player()
304 local weapon_entindex = entity_get_player_weapon(local_player)
305 local item_definition_index = bit_band(65535, entity_get_prop(weapon_entindex, "m_iItemDefinitionIndex"))
306 local config_name = weapon_id_lookup_table[item_definition_index] or "Global"
307 if config_name ~= active_config then
308 active_config = config_name
309 local options = ui.get(adaptive_options2)
310 if table_contains(options, "Log") then
311 print(active_config, " config loaded.")
312 end
313 update_menu(table_contains(options, "Visible"))
314 end
315end
316
317function init()
318 -- Create and reference menu items
319
320 -- Create the lookup table
321 weapon_id_lookup_table = create_lookup_table(adaptive_weapons)
322
323 -- Set custom callbacks for the default menu items
324 for name, reference in pairs(references) do
325 set_callback(reference, update_settings)
326 end
327
328 -- Set callbacks for all of the adaptive menu items
329 for config, items in pairs(adaptive) do
330 for name, reference in pairs(items) do
331 ui.set_callback(reference, handle_adaptive_config)
332 end
333 end
334 client.set_event_callback("run_command", run_command)
335end
336
337init()
338
339--dynamic fov
340hitbox_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
341
342adaptiveselect = ui.reference('RAGE', 'Aimbot', 'addd')
343
344dynamicfov_new_fov = 0
345bool_in_fov = false
346closest_enemy = nil
347
348function dynamicfov_logic()
349 local local_player = entity_get_local_player()
350
351 if not local_player or not entity.is_alive(local_player) then
352 return
353 end
354 if ui.get(dynamicfov_enable, true) then
355 else
356 return
357 end
358 if ui.get(dynamicfov_select) == "Adaptive weapon dynamic FOV" then
359 return
360 end
361 local old_fov = ui.get(ragebot_maximum_fov)
362 dynamicfov_new_fov = old_fov
363 local enemy_players = entity_get_players(true)
364
365 local min_fov = ui.get(dynamicfov_min)
366 local max_fov = ui.get(dynamicfov_max)
367
368 if min_fov > max_fov then
369 local store_min_fov = min_fov
370 min_fov = max_fov
371 max_fov = store_min_fov
372 end
373
374 if #enemy_players ~= 0 then
375 local own_x, own_y, own_z = client_eye_position()
376 local own_pitch, own_yaw = client_camera_angles()
377 closest_enemy = nil
378 local closest_distance = 999999999
379
380 for i = 1, #enemy_players do
381 local enemy = enemy_players[i]
382 local enemy_x, enemy_y, enemy_z = entity_hitbox_position(enemy, 0)
383
384 local x = enemy_x - own_x
385 local y = enemy_y - own_y
386 local z = enemy_z - own_z
387
388 local yaw = ((math_atan2(y, x) * 180 / math_pi))
389 local pitch = -(math_atan2(z, math_sqrt(math_pow(x, 2) + math_pow(y, 2))) * 180 / math_pi)
390
391 local yaw_dif = math_abs(own_yaw % 360 - yaw % 360) % 360
392 local pitch_dif = math_abs(own_pitch - pitch) % 360
393
394 if yaw_dif > 180 then
395 yaw_dif = 360 - yaw_dif
396 end
397
398 local real_dif = math_sqrt(math_pow(yaw_dif, 2) + math_pow(pitch_dif, 2))
399
400 if closest_distance > real_dif then
401 closest_distance = real_dif
402 closest_enemy = enemy
403 end
404 end
405
406 if closest_enemy ~= nil then
407 local closest_enemy_x, closest_enemy_y, closest_enemy_z = entity_hitbox_position(closest_enemy, 0)
408 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))
409
410 dynamicfov_new_fov = (3800 / real_distance) * (ui.get(dynamicfov_auto_factor) * 0.01)
411
412 if (dynamicfov_new_fov > max_fov) then
413 dynamicfov_new_fov = max_fov
414 elseif dynamicfov_new_fov < min_fov then
415 dynamicfov_new_fov = min_fov
416 end
417 end
418
419 dynamicfov_new_fov = math_floor(dynamicfov_new_fov + 0.5)
420
421 if (dynamicfov_new_fov > closest_distance) then
422 bool_in_fov = true
423 else
424 bool_in_fov = false
425 end
426 else
427 dynamicfov_new_fov = min_fov
428 bool_in_fov = false
429 end
430
431 if dynamicfov_new_fov ~= old_fov then
432 ui.set(ragebot_maximum_fov, dynamicfov_new_fov)
433 end
434
435end
436--drawing
437function on_paint(ctx)
438 dynamicfov_logic()
439end
440
441client.set_event_callback('paint', on_paint)
442
443--pistol
444
445function dynamicfov_logicpistol()
446 local local_player = entity_get_local_player()
447
448 if not local_player or not entity.is_alive(local_player) then
449 return
450 end
451 if ui.get(dynamicfov_enable, true) then
452 else
453 return
454 end
455 if ui.get(dynamicfov_select) == "Adaptive weapon dynamic FOV" then
456 else
457 return
458 end
459 if ui.get(adaptiveselect) == "Desert Eagle" then
460 elseif ui.get(adaptiveselect) == "Pistol" then
461 elseif ui.get(adaptiveselect) == "Revolver" then
462 else
463 return
464 end
465 local old_fov = ui.get(ragebot_maximum_fov)
466 dynamicfov_new_fov = old_fov
467 local enemy_players = entity_get_players(true)
468
469 local min_fov = ui.get(dynamicfov_minpistol)
470 local max_fov = ui.get(dynamicfov_maxpistol)
471
472 if min_fov > max_fov then
473 local store_min_fov = min_fov
474 min_fov = max_fov
475 max_fov = store_min_fov
476 end
477
478 if #enemy_players ~= 0 then
479 local own_x, own_y, own_z = client_eye_position()
480 local own_pitch, own_yaw = client_camera_angles()
481 closest_enemy = nil
482 local closest_distance = 999999999
483
484 for i = 1, #enemy_players do
485 local enemy = enemy_players[i]
486 local enemy_x, enemy_y, enemy_z = entity_hitbox_position(enemy, 0)
487
488 local x = enemy_x - own_x
489 local y = enemy_y - own_y
490 local z = enemy_z - own_z
491
492 local yaw = ((math_atan2(y, x) * 180 / math_pi))
493 local pitch = -(math_atan2(z, math_sqrt(math_pow(x, 2) + math_pow(y, 2))) * 180 / math_pi)
494
495 local yaw_dif = math_abs(own_yaw % 360 - yaw % 360) % 360
496 local pitch_dif = math_abs(own_pitch - pitch) % 360
497
498 if yaw_dif > 180 then
499 yaw_dif = 360 - yaw_dif
500 end
501
502 local real_dif = math_sqrt(math_pow(yaw_dif, 2) + math_pow(pitch_dif, 2))
503
504 if closest_distance > real_dif then
505 closest_distance = real_dif
506 closest_enemy = enemy
507 end
508 end
509
510 if closest_enemy ~= nil then
511 local closest_enemy_x, closest_enemy_y, closest_enemy_z = entity_hitbox_position(closest_enemy, 0)
512 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))
513
514 dynamicfov_new_fov = (3800 / real_distance) * (ui.get(dynamicfov_auto_factor) * 0.01)
515
516 if (dynamicfov_new_fov > max_fov) then
517 dynamicfov_new_fov = max_fov
518 elseif dynamicfov_new_fov < min_fov then
519 dynamicfov_new_fov = min_fov
520 end
521 end
522
523 dynamicfov_new_fov = math_floor(dynamicfov_new_fov + 0.5)
524
525 if (dynamicfov_new_fov > closest_distance) then
526 bool_in_fov = true
527 else
528 bool_in_fov = false
529 end
530 else
531 dynamicfov_new_fov = min_fov
532 bool_in_fov = false
533 end
534
535 if dynamicfov_new_fov ~= old_fov then
536 ui.set(ragebot_maximum_fov, dynamicfov_new_fov)
537 end
538
539end
540function on_paintpistol(ctx)
541 dynamicfov_logicpistol()
542end
543client.set_event_callback('paint', on_paintpistol)
544
545--rifle
546
547function dynamicfov_logicrifle()
548 local local_player = entity_get_local_player()
549
550 if not local_player or not entity.is_alive(local_player) then
551 return
552 end
553 if ui.get(dynamicfov_enable, true) then
554 else
555 return
556 end
557 if ui.get(dynamicfov_select) == "Adaptive weapon dynamic FOV" then
558 else
559 return
560 end
561 if ui.get(adaptiveselect) == "Rifle" then
562 else
563 return
564 end
565 local old_fov = ui.get(ragebot_maximum_fov)
566 dynamicfov_new_fov = old_fov
567 local enemy_players = entity_get_players(true)
568
569 local min_fov = ui.get(dynamicfov_minrifle)
570 local max_fov = ui.get(dynamicfov_maxrifle)
571
572 if min_fov > max_fov then
573 local store_min_fov = min_fov
574 min_fov = max_fov
575 max_fov = store_min_fov
576 end
577
578 if #enemy_players ~= 0 then
579 local own_x, own_y, own_z = client_eye_position()
580 local own_pitch, own_yaw = client_camera_angles()
581 closest_enemy = nil
582 local closest_distance = 999999999
583
584 for i = 1, #enemy_players do
585 local enemy = enemy_players[i]
586 local enemy_x, enemy_y, enemy_z = entity_hitbox_position(enemy, 0)
587
588 local x = enemy_x - own_x
589 local y = enemy_y - own_y
590 local z = enemy_z - own_z
591
592 local yaw = ((math_atan2(y, x) * 180 / math_pi))
593 local pitch = -(math_atan2(z, math_sqrt(math_pow(x, 2) + math_pow(y, 2))) * 180 / math_pi)
594
595 local yaw_dif = math_abs(own_yaw % 360 - yaw % 360) % 360
596 local pitch_dif = math_abs(own_pitch - pitch) % 360
597
598 if yaw_dif > 180 then
599 yaw_dif = 360 - yaw_dif
600 end
601
602 local real_dif = math_sqrt(math_pow(yaw_dif, 2) + math_pow(pitch_dif, 2))
603
604 if closest_distance > real_dif then
605 closest_distance = real_dif
606 closest_enemy = enemy
607 end
608 end
609
610 if closest_enemy ~= nil then
611 local closest_enemy_x, closest_enemy_y, closest_enemy_z = entity_hitbox_position(closest_enemy, 0)
612 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))
613
614 dynamicfov_new_fov = (3800 / real_distance) * (ui.get(dynamicfov_auto_factor) * 0.01)
615
616 if (dynamicfov_new_fov > max_fov) then
617 dynamicfov_new_fov = max_fov
618 elseif dynamicfov_new_fov < min_fov then
619 dynamicfov_new_fov = min_fov
620 end
621 end
622
623 dynamicfov_new_fov = math_floor(dynamicfov_new_fov + 0.5)
624
625 if (dynamicfov_new_fov > closest_distance) then
626 bool_in_fov = true
627 else
628 bool_in_fov = false
629 end
630 else
631 dynamicfov_new_fov = min_fov
632 bool_in_fov = false
633 end
634
635 if dynamicfov_new_fov ~= old_fov then
636 ui.set(ragebot_maximum_fov, dynamicfov_new_fov)
637 end
638
639end
640--drawing
641function on_paintrifle(ctx)
642 dynamicfov_logicrifle()
643end
644client.set_event_callback('paint', on_paintrifle)
645
646--scoped weapons
647
648function dynamicfov_logicscope()
649 local local_player = entity_get_local_player()
650
651 if not local_player or not entity.is_alive(local_player) then
652 return
653 end
654 if ui.get(dynamicfov_enable, true) then
655 else
656 return
657 end
658 if ui.get(dynamicfov_select) == "Adaptive weapon dynamic FOV" then
659 else
660 return
661 end
662 if ui.get(adaptiveselect) == "Awp" then
663 elseif ui.get(adaptiveselect) == "Auto" then
664 elseif ui.get(adaptiveselect) == "Scout" then
665 else
666 return
667 end
668 local old_fov = ui.get(ragebot_maximum_fov)
669 dynamicfov_new_fov = old_fov
670 local enemy_players = entity_get_players(true)
671
672 local min_fov = ui.get(dynamicfov_minscope)
673 local max_fov = ui.get(dynamicfov_maxscope)
674
675 if min_fov > max_fov then
676 local store_min_fov = min_fov
677 min_fov = max_fov
678 max_fov = store_min_fov
679 end
680
681 if #enemy_players ~= 0 then
682 local own_x, own_y, own_z = client_eye_position()
683 local own_pitch, own_yaw = client_camera_angles()
684 closest_enemy = nil
685 local closest_distance = 999999999
686
687 for i = 1, #enemy_players do
688 local enemy = enemy_players[i]
689 local enemy_x, enemy_y, enemy_z = entity_hitbox_position(enemy, 0)
690
691 local x = enemy_x - own_x
692 local y = enemy_y - own_y
693 local z = enemy_z - own_z
694
695 local yaw = ((math_atan2(y, x) * 180 / math_pi))
696 local pitch = -(math_atan2(z, math_sqrt(math_pow(x, 2) + math_pow(y, 2))) * 180 / math_pi)
697
698 local yaw_dif = math_abs(own_yaw % 360 - yaw % 360) % 360
699 local pitch_dif = math_abs(own_pitch - pitch) % 360
700
701 if yaw_dif > 180 then
702 yaw_dif = 360 - yaw_dif
703 end
704
705 local real_dif = math_sqrt(math_pow(yaw_dif, 2) + math_pow(pitch_dif, 2))
706
707 if closest_distance > real_dif then
708 closest_distance = real_dif
709 closest_enemy = enemy
710 end
711 end
712
713 if closest_enemy ~= nil then
714 local closest_enemy_x, closest_enemy_y, closest_enemy_z = entity_hitbox_position(closest_enemy, 0)
715 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))
716
717 dynamicfov_new_fov = (3800 / real_distance) * (ui.get(dynamicfov_auto_factor) * 0.01)
718
719 if (dynamicfov_new_fov > max_fov) then
720 dynamicfov_new_fov = max_fov
721 elseif dynamicfov_new_fov < min_fov then
722 dynamicfov_new_fov = min_fov
723 end
724 end
725
726 dynamicfov_new_fov = math_floor(dynamicfov_new_fov + 0.5)
727
728 if (dynamicfov_new_fov > closest_distance) then
729 bool_in_fov = true
730 else
731 bool_in_fov = false
732 end
733 else
734 dynamicfov_new_fov = min_fov
735 bool_in_fov = false
736 end
737
738 if dynamicfov_new_fov ~= old_fov then
739 ui.set(ragebot_maximum_fov, dynamicfov_new_fov)
740 end
741
742end
743--drawing
744function on_paintscope(ctx)
745 dynamicfov_logicscope()
746end
747client.set_event_callback('paint', on_paintscope)
748
749--other
750
751--scoped weapons
752
753function dynamicfov_logicother()
754 local local_player = entity_get_local_player()
755
756 if not local_player or not entity.is_alive(local_player) then
757 return
758 end
759 if ui.get(dynamicfov_enable, true) then
760 else
761 return
762 end
763 if ui.get(dynamicfov_select) == "Adaptive weapon dynamic FOV" then
764 else
765 return
766 end
767 if ui.get(adaptiveselect) == "Global" then
768 else
769 return
770 end
771 local old_fov = ui.get(ragebot_maximum_fov)
772 dynamicfov_new_fov = old_fov
773 local enemy_players = entity_get_players(true)
774
775 local min_fov = ui.get(dynamicfov_minother)
776 local max_fov = ui.get(dynamicfov_maxother)
777
778 if min_fov > max_fov then
779 local store_min_fov = min_fov
780 min_fov = max_fov
781 max_fov = store_min_fov
782 end
783
784 if #enemy_players ~= 0 then
785 local own_x, own_y, own_z = client_eye_position()
786 local own_pitch, own_yaw = client_camera_angles()
787 closest_enemy = nil
788 local closest_distance = 999999999
789
790 for i = 1, #enemy_players do
791 local enemy = enemy_players[i]
792 local enemy_x, enemy_y, enemy_z = entity_hitbox_position(enemy, 0)
793
794 local x = enemy_x - own_x
795 local y = enemy_y - own_y
796 local z = enemy_z - own_z
797
798 local yaw = ((math_atan2(y, x) * 180 / math_pi))
799 local pitch = -(math_atan2(z, math_sqrt(math_pow(x, 2) + math_pow(y, 2))) * 180 / math_pi)
800
801 local yaw_dif = math_abs(own_yaw % 360 - yaw % 360) % 360
802 local pitch_dif = math_abs(own_pitch - pitch) % 360
803
804 if yaw_dif > 180 then
805 yaw_dif = 360 - yaw_dif
806 end
807
808 local real_dif = math_sqrt(math_pow(yaw_dif, 2) + math_pow(pitch_dif, 2))
809
810 if closest_distance > real_dif then
811 closest_distance = real_dif
812 closest_enemy = enemy
813 end
814 end
815
816 if closest_enemy ~= nil then
817 local closest_enemy_x, closest_enemy_y, closest_enemy_z = entity_hitbox_position(closest_enemy, 0)
818 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))
819
820 dynamicfov_new_fov = (3800 / real_distance) * (ui.get(dynamicfov_auto_factor) * 0.01)
821
822 if (dynamicfov_new_fov > max_fov) then
823 dynamicfov_new_fov = max_fov
824 elseif dynamicfov_new_fov < min_fov then
825 dynamicfov_new_fov = min_fov
826 end
827 end
828
829 dynamicfov_new_fov = math_floor(dynamicfov_new_fov + 0.5)
830
831 if (dynamicfov_new_fov > closest_distance) then
832 bool_in_fov = true
833 else
834 bool_in_fov = false
835 end
836 else
837 dynamicfov_new_fov = min_fov
838 bool_in_fov = false
839 end
840
841 if dynamicfov_new_fov ~= old_fov then
842 ui.set(ragebot_maximum_fov, dynamicfov_new_fov)
843 end
844
845end
846--drawing
847function on_paintother(ctx)
848 dynamicfov_logicother()
849end
850client.set_event_callback('paint', on_paintother)
851
852--dynamic legit aa
853--local variables for API. Automatically generated by https://github.com/simpleavaster/gslua/blob/master/authors/sapphyrus/generate_api.lua
854local client_latency, client_log, client_draw_rectangle, client_draw_circle_outline, client_userid_to_entindex, client_draw_indicator, client_draw_gradient, client_set_event_callback, client_screen_size, client_eye_position = client.latency, client.log, client.draw_rectangle, client.draw_circle_outline, client.userid_to_entindex, client.draw_indicator, client.draw_gradient, client.set_event_callback, client.screen_size, client.eye_position
855local client_draw_circle, client_color_log, client_delay_call, client_draw_text, client_visible, client_exec, client_trace_line, client_set_cvar = client.draw_circle, client.color_log, client.delay_call, client.draw_text, client.visible, client.exec, client.trace_line, client.set_cvar
856local client_world_to_screen, client_draw_hitboxes, client_get_cvar, client_draw_line, client_camera_angles, client_draw_debug_text, client_random_int, client_random_float = client.world_to_screen, client.draw_hitboxes, client.get_cvar, client.draw_line, client.camera_angles, client.draw_debug_text, client.random_int, client.random_float
857local entity_get_local_player, entity_is_enemy, entity_get_player_name, entity_get_steam64, entity_get_bounding_box, entity_get_all, entity_set_prop, entity_get_player_weapon = entity.get_local_player, entity.is_enemy, entity.get_player_name, entity.get_steam64, entity.get_bounding_box, entity.get_all, entity.set_prop, entity.get_player_weapon
858local entity_hitbox_position, entity_get_prop, entity_get_players, entity_get_classname = entity.hitbox_position, entity.get_prop, entity.get_players, entity.get_classname
859local globals_realtime, globals_absoluteframetime, globals_tickcount, globals_curtime, globals_mapname, globals_tickinterval, globals_framecount, globals_frametime, globals_maxplayers = globals.realtime, globals.absoluteframetime, globals.tickcount, globals.curtime, globals.mapname, globals.tickinterval, globals.framecount, globals.frametime, globals.maxplayers
860local math_ceil, math_tan, math_log10, math_randomseed, math_cos, math_sinh, math_random, math_huge, math_pi, math_max, math_atan2, math_ldexp, math_floor, math_sqrt, math_deg, math_atan, math_fmod = math.ceil, math.tan, math.log10, math.randomseed, math.cos, math.sinh, math.random, math.huge, math.pi, math.max, math.atan2, math.ldexp, math.floor, math.sqrt, math.deg, math.atan, math.fmod
861local math_acos, math_pow, math_abs, math_min, math_sin, math_frexp, math_log, math_tanh, math_exp, math_modf, math_cosh, math_asin, math_rad = math.acos, math.pow, math.abs, math.min, math.sin, math.frexp, math.log, math.tanh, math.exp, math.modf, math.cosh, math.asin, math.rad
862local table_maxn, table_foreach, table_sort, table_remove, table_foreachi, table_move, table_getn, table_concat, table_insert = table.maxn, table.foreach, table.sort, table.remove, table.foreachi, table.move, table.getn, table.concat, table.insert
863local string_find, string_format, string_rep, string_gsub, string_len, string_gmatch, string_dump, string_match, string_reverse, string_byte, string_char, string_upper, string_lower, string_sub = string.find, string.format, string.rep, string.gsub, string.len, string.gmatch, string.dump, string.match, string.reverse, string.byte, string.char, string.upper, string.lower, string.sub
864local render_text = renderer.text
865local GetBoundingBox = entity.get_bounding_box
866
867local world_to_screen = function(x, y, z, func)
868 local x, y = renderer.world_to_screen(x, y, z)
869 if x ~= nil and y ~= nil then
870 func(x, y)
871 end
872end
873--end of local variables
874local leftdamage = 0
875local rightdamage = 0
876local rad2deg = function(rad)
877 return (rad * 180 / math.pi)
878end
879local deg2rad = function(deg)
880 return (deg * math.pi / 180)
881end
882local trace_line = function(entity, start, _end)
883 return client.trace_line(entity, start.x, start.y, start.z, _end.x, _end.y, _end.z)
884end
885
886local screenx, screeny = client_screen_size()
887
888local vector = function(x, y, z)
889 x = x ~= nil and x or 0
890 y = y ~= nil and y or 0
891 z = z ~= nil and z or 0
892
893 return {
894 ["x"] = x,
895 ["y"] = y,
896 ["z"] = z
897 }
898end
899
900local vector_add = function(vector1, vector2)
901 return {
902 ["x"] = vector1.x + vector2.x,
903 ["y"] = vector1.y + vector2.y,
904 ["z"] = vector1.z + vector2.z
905 }
906end
907
908local vector_substract = function(vector1, vector2)
909 return {
910 ["x"] = vector1.x - vector2.x,
911 ["y"] = vector1.y - vector2.y,
912 ["z"] = vector1.z - vector2.z
913 }
914end
915function slot136(slot0, slot1)
916 for slot5 = 1, #slot0, 1 do
917 if slot0[slot5] == slot1 then
918 return true
919 end
920 end
921
922 return false
923end
924
925function slot137(slot0, slot1)
926 for slot5, slot6 in ipairs(slot0) do
927 if slot6 == slot1 then
928 return true, slot5
929 end
930 end
931
932 return false
933end
934
935function slot138()
936 if ui.get(otherref.tp_alive) and ui.get(otherref.tp_alive_key) then
937 ui.set_visible(otherref.tp_dead, true)
938 else
939 ui.set_visible(otherref.tp_dead, false)
940 end
941end
942local clamp_angles = function(angle)
943 angle = angle % 360
944 angle = (angle + 360) % 360
945
946 if angle > 180 then
947 angle = angle - 360
948 end
949
950 return angle
951end
952
953function LAASetup()
954 if ui.get(legitAA) then
955 if ui.get(legitAAbase) == "Manual" then
956 ui.set_visible(LegitAAHotkey, true)
957 elseif ui.get(legitAAbase) == "Dynamic" then
958 ui.set_visible(LegitAAHotkey, false)
959 end
960 else
961 ui.set_visible(LegitAAHotkey, false)
962 end
963end
964
965function LAAFunc()
966 ----------------------------------------------------------------------LEGITAA
967 local legita = ui.get(legitAA)
968 local base = ui.get(legitAAbase)
969 local aamodes = ui.get(LegitAABreaker)
970 local aamoving = ui.get(enableaawm)
971 local movingbox = ui.get(legitaamoving)
972
973 ui.set_visible(legitAAbase, legita)
974 ui.set_visible(LegitAABreaker, legita)
975
976 ui.set_visible(brutemode2, legita and aamodes == "Break bruteforce")
977 ui.set_visible(ui_indicator_combobox4, legita)
978 ui.set_visible(ui_indicator_color_picker4, legita)
979 ui.set_visible(LegitAAHotkey, legita and base == "Manual")
980 ----------------------------------------------------------------------LEGITAA WHILE MOVING
981 ui.set_visible(enableaawm, legita)
982 ui.set_visible(legitaamoving, legita and aamoving)
983
984 ui.set_visible(slowmode, aamoving and legita and movingbox == "Slow walk")
985 ui.set_visible(movemode, aamoving and legita and movingbox == "Moving")
986 ui.set_visible(standmode, aamoving and legita and movingbox == "Standing")
987
988 if not ui.get(legitAA) then
989 LAASetup()
990 ui.set(yaw, "Off")
991 ui.set(body, "Off")
992 ui.set(autodirection, "-")
993 ui.set(autodirection_key, "On hotkey")
994 ui.set(aaenablers, false)
995 elseif ui.get(legitAA) then
996 LAASetup()
997 ui.set(yaw, "180")
998 ui.set(yaw_num, 180)
999 ui.set(body, "Static")
1000 ui.set(autodirection, "-")
1001 ui.set(autodirection_key, "On hotkey")
1002 ui.set(aaenablers, true)
1003 end
1004end
1005
1006LAAFunc()
1007ui.set_callback(legitAA, LAAFunc)
1008ui.set_callback(legitAAbase, LAAFunc)
1009ui.set_callback(LegitAAHotkey, LAAFunc)
1010ui.set_callback(LegitAABreaker, LAAFunc)
1011ui.set_callback(enableaawm, LAAFunc)
1012ui.set_callback(legitaamoving, LAAFunc)
1013
1014local get_atan = function(ent, eye_pos, camera)
1015 local data = { id = nil, dst = 2147483647, fov = 360 }
1016 local screenx, screeny = client_screen_size()
1017 local crosshair = screenx / 2, screeny / 2
1018 for i = 0, 19 do
1019 local hitbox = vector(entity.hitbox_position(ent, i))
1020 local ext = vector_substract(hitbox, eye_pos)
1021
1022 local yaw = rad2deg(math.atan2(ext.y, ext.x))
1023 local pitch = -rad2deg(math.atan2(ext.z, math.sqrt(ext.x ^ 2 + ext.y ^ 2)))
1024
1025 local yaw_dif = math.abs(camera.y % 360 - yaw % 360) % 360
1026 local pitch_dif = math.abs(camera.x - pitch) % 360
1027
1028 if yaw_dif > 180 then
1029 yaw_dif = 360 - yaw_dif
1030 end
1031
1032 local dst = math.sqrt(yaw_dif ^ 2 + pitch_dif ^ 2)
1033 local dstcorrect = math.sqrt(ext.x ^ 2 + ext.y ^ 2 + ext.z ^ 2)
1034 if dstcorrect < data.dst then
1035 data.dst = dstcorrect
1036 data.id = i
1037 data.fov = yaw - crosshair
1038 end
1039 end
1040
1041 return data.id, data.dst, data.fov
1042end
1043
1044local function getdistance()
1045 local get_players = entity.get_players(true)
1046
1047 if #get_players == 0 then
1048 return
1049 end
1050 local eye_pos = vector(client.eye_position())
1051 local camera = vector(client.camera_angles())
1052 camera.z = z_pos ~= nil and 64 or camera.z
1053 local distance = math.huge
1054 local closest_enemy = nil
1055 local adv_fov = 1000
1056 local screenx, screeny = client_screen_size()
1057 local crosshair = screenx / 2, screeny / 2
1058 for i = 1, #get_players do
1059 local hitbox_id, dist, fov = get_atan(get_players[i], eye_pos, camera)
1060 if distance > dist then
1061 distance = dist
1062 hitbox = hitbox_id
1063 closest_enemy = get_players[i]
1064 adv_fov = fov
1065 end
1066 end
1067
1068 return closest_enemy, hitbox, distance, adv_fov
1069end
1070
1071function slot158()
1072 if ui.get(yaw) == "Off" then
1073 return
1074 end
1075
1076 if entity_get_prop(entity.get_game_rules(), "m_bFreezePeriod") == 1 then
1077 return
1078 end
1079
1080 local screenx, screeny = client_screen_size()
1081 local lx, ly, lz = entity_get_prop(entity_get_local_player(), "m_angEyeAngles")
1082 local divisor = screenx / 2
1083 local divisor2 = screeny / 2
1084 local size = 15 * cvar.cl_crosshairsize:get_float() * 0.67
1085
1086 if ui.get(yaw_num) ~= 180 and ui.get(yaw_num) ~= -180 then
1087 render_text(divisor, divisor2, 255, 0, 0, 255, "c-", 0, "AA IS BROKEN, SET YAW SLIDER TO 180 OR -180")
1088 render_text(divisor, divisor2 + 10, 255, 0, 0, 255, "c-", 0, "CURRENT YAW: ", ly)
1089 end
1090end
1091
1092function slot159()
1093 ui.set(pitch, "Off")
1094 ui.set(yaw_base, "Local view")
1095 ui.set(yaw, "180")
1096 ui.set(yaw_jitter, "Off")
1097 ui.set(edgeyaw, "Off")
1098 ui.set(bodyyaw_freestand, false)
1099 ui.set(autodirection_key, "On hotkey")
1100end
1101
1102function slot160()
1103 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
1104 return
1105 end
1106
1107 if entity_get_prop(entity.get_game_rules(), "m_bFreezePeriod") == 1 then
1108 return
1109 end
1110
1111 local screenx, screeny = client_screen_size()
1112 local halfx = screenx / 2
1113 local halfy = screeny / 2
1114
1115 if ui.get(legitAA) then
1116 if ui.get(legitAAbase) == "Manual" then
1117 ui.set_visible(LegitAAHotkey, true)
1118 ui.set(LegitAAHotkey, "Toggle")
1119
1120 if ui.get(LegitAAHotkey) then
1121 slot159()
1122 ui.set(yaw_num, 180)
1123 ui.set(body_num, 90)
1124
1125 slot94 = "RIGHT"
1126 else
1127 slot159()
1128 ui.set(yaw_num, 180)
1129 ui.set(body_num, -90)
1130
1131 slot94 = "LEFT"
1132 end
1133 else
1134 ui.set_visible(LegitAAHotkey, false)
1135 end
1136 end
1137end
1138local edge_count = { [1] = 7, [2] = 12, [3] = 15, [4] = 19, [5] = 23, [6] = 28, [7] = 35, [8] = 39 }
1139
1140local function do_legit_aa()
1141 local local_player = entity_get_local_player()
1142
1143 if not local_player or not entity.is_alive(local_player) then
1144 return
1145 end
1146
1147 local m_vecOrigin = vector(entity_get_prop(local_player, "m_vecOrigin"))
1148 local m_vecViewOffset = vector(entity_get_prop(local_player, "m_vecViewOffset"))
1149
1150 local m_vecOrigin = vector_add(m_vecOrigin, m_vecViewOffset)
1151
1152 local radius = 20 + 110 + 0.1
1153 local step = math.pi * 2.0 / edge_count[8]
1154
1155 local camera = vector(client.camera_angles())
1156 local central = deg2rad(math.floor(camera.y + 0.5))
1157
1158 local data = {
1159 fraction = 1,
1160 surpassed = false,
1161 angle = vector(0, 0, 0),
1162 var = 0,
1163 side = "LAST KNOWN"
1164 }
1165
1166 for a = central, math.pi * 3.0, step do
1167 if a == central then
1168 central = clamp_angles(rad2deg(a))
1169 local trace_line = function(entity, start, _end)
1170 return client.trace_line(entity, start.x, start.y, start.z, _end.x, _end.y, _end.z)
1171 end
1172 end
1173
1174 local clm = clamp_angles(central - rad2deg(a))
1175 local abs = math.abs(clm)
1176
1177 if abs < 90 and abs > 1 then
1178
1179 local side = "LAST KNOWN"
1180 local location = vector(
1181 radius * math.cos(a) + m_vecOrigin.x,
1182 radius * math.sin(a) + m_vecOrigin.y,
1183 m_vecOrigin.z
1184 )
1185
1186 local _fr, entindex = client.trace_line(local_player, m_vecOrigin.x, m_vecOrigin.y, m_vecOrigin.z, location.x, location.y, location.z)
1187
1188 if math.floor(clm + 0.5) < -21 then
1189 side = "LEFT"
1190 end
1191 if math.floor(clm + 0.5) > 21 then
1192 side = "RIGHT"
1193 end
1194
1195 local fr_info = {
1196 fraction = _fr,
1197 surpassed = (_fr < 1),
1198 angle = vector(0, clamp_angles(rad2deg(a)), 0),
1199 var = math.floor(clm + 0.5),
1200 side = side --[ 0 - center / 1 - left / 2 - right ]
1201 }
1202
1203 if data.fraction > _fr then
1204 data = fr_info
1205 end
1206 end
1207 end
1208
1209 return data
1210end
1211
1212function dodynamic()
1213 local local_player = entity_get_local_player()
1214
1215 if not local_player or not entity.is_alive(local_player) then
1216 return
1217 end
1218
1219 local local_player = entity_get_local_player()
1220 topX, topY, botX, botY, alpha = entity.get_bounding_box(client_draw_text, local_player)
1221 local origin = vector(entity_get_prop(local_player, "m_vecOrigin"))
1222 local collision = (entity_get_prop(local_player, "m_Collision"))
1223 local vecmin = vector(entity_get_prop(local_player, "m_vecMins"))
1224 local vecmax = vector(entity_get_prop(local_player, "m_vecMaxs"))
1225 local min = vector_add(vecmin, origin)
1226 local max = vector_add(vecmax, origin)
1227
1228 if not ui.get(legitAA) or ui.get(ref_fakeduck) or ui.get(legitAAbase) == "Manual" then
1229 return
1230 end
1231
1232 if ui.get(legitAA) and ui.get(legitAAbase) == "Dynamic" then
1233
1234 if entity_get_prop(entity.get_game_rules(), "m_bFreezePeriod") == 1 then
1235 return
1236 end
1237 local data = do_legit_aa()
1238
1239 if data == nil then
1240 return
1241 end
1242 if data.fraction < 1 then
1243 slot159()
1244 ui.set(body_num, data.var > 0 and 180 or -180)
1245 ui.set(yaw_num, -180)
1246 end
1247 end
1248
1249
1250end
1251
1252local function fyls()
1253 if ui.get(legitAA) == false then
1254 return
1255 else
1256 if ui.get(LegitAABreaker) == "Smart" then
1257 ui.set(limit, 60)
1258 ui.set(body, "Static")
1259 elseif ui.get(LegitAABreaker) == "Maximum" then
1260 ui.set(limit, 60)
1261 ui.set(body, "Static")
1262 elseif ui.get(LegitAABreaker) == "Slow" then
1263 ui.set(limit, 60)
1264 ui.set(body, "Static")
1265 elseif ui.get(LegitAABreaker) == "Fast" then
1266 ui.set(limit, 60)
1267 ui.set(body, "Static")
1268 elseif ui.get(LegitAABreaker) == "Break bruteforce" then
1269 ui.set(lby, "Opposite")
1270 ui.set(body, "Static")
1271 end
1272 end
1273end
1274
1275client.set_event_callback("paint", fyls)
1276
1277function slot163()
1278 if ui.get(legitAA) then
1279 if ui.get(LegitAABreaker) == "Maximum" then
1280 ui.set(lby, "Opposite")
1281 elseif ui.get(LegitAABreaker) == "Smart" then
1282 ui.set(lby, "Eye yaw")
1283 end
1284 else
1285 ui.set(lby, "Off")
1286 end
1287end
1288
1289client.set_event_callback("run_command", function()
1290 slot158()
1291 slot160()
1292end)
1293
1294client.set_event_callback("paint", function(c)
1295 slot163()
1296 dodynamic()
1297end)
1298
1299client.set_event_callback("game_newmap", function()
1300end)
1301
1302--aa indicator
1303function on_paint(c)
1304 local scrsize_x, scrsize_y = client.screen_size()
1305 local center_x, center_y = scrsize_x / 2, scrsize_y / 2
1306
1307 local indicator = ui.get(ui_indicator_combobox4)
1308 local indicator_r, indicator_g, indicator_b, indicator_a = ui.get(ui_indicator_color_picker4)
1309
1310 if ui.get(body_num) == 90 and indicator == "Metro" and ui.get(legitAA) == true or ui.get(body_num) == 180 and indicator == "Metro" and ui.get(legitAA) == true then
1311 client.draw_text(c, center_x + 45, center_y, indicator_r, indicator_g, indicator_b, indicator_a, "c+", 0, "⮞")
1312 elseif ui.get(body_num) == -90 and indicator == "Metro" and ui.get(legitAA) == true or ui.get(body_num) == -180 and indicator == "Metro" and ui.get(legitAA) == true then
1313 client.draw_text(c, center_x - 45, center_y, indicator_r, indicator_g, indicator_b, indicator_a, "c+", 0, "⮜")
1314 end
1315 if ui.get(body_num) == 90 and indicator == "Point arrows" and ui.get(legitAA) == true or ui.get(body_num) == 180 and indicator == "Point arrows" and ui.get(legitAA) == true then
1316 client.draw_text(c, center_x + 45, center_y, indicator_r, indicator_g, indicator_b, indicator_a, "c+", 0, "→")
1317 elseif ui.get(body_num) == -90 and indicator == "Point arrows" and ui.get(legitAA) == true or ui.get(body_num) == -180 and indicator == "Point arrows" and ui.get(legitAA) == true then
1318 client.draw_text(c, center_x - 45, center_y, indicator_r, indicator_g, indicator_b, indicator_a, "c+", 0, "←")
1319 end
1320 if ui.get(body_num) == 90 and indicator == "Dashes" and ui.get(legitAA) == true or ui.get(body_num) == 180 and indicator == "Dashes" and ui.get(legitAA) == true then
1321 client.draw_text(c, center_x + 45, center_y, indicator_r, indicator_g, indicator_b, indicator_a, "c-", 0, "‒")
1322 elseif ui.get(body_num) == -90 and indicator == "Dashes" and ui.get(legitAA) == true or ui.get(body_num) == -180 and indicator == "Dashes" and ui.get(legitAA) == true then
1323 client.draw_text(c, center_x - 45, center_y, indicator_r, indicator_g, indicator_b, indicator_a, "c-", 0, "‒")
1324 end
1325end
1326err = client.set_event_callback('paint', on_paint)
1327--trigger magnet
1328
1329--thx saph for callback shit
1330function on_paint(ctx)
1331 if ui.get(tm_cb) then
1332 local width, height = client.screen_size()
1333 if ui.get(triggermagnet) then
1334 ui.set(rageautofire, true)
1335 ui.set(ragebotmode, "Always on")
1336 else
1337 ui.set(rageautofire, false)
1338 ui.set(ragebotmode, "On hotkey")
1339 end
1340 end
1341end
1342
1343client.set_event_callback("paint", on_paint)
1344
1345reduce = false
1346
1347function reduction(c)
1348 if ui.get(tm_cb, true) and ui.get(typeselect) == "Advanced" then
1349 else
1350 return
1351 end
1352 local h_key = ui.get(triggermagnet)
1353 local hc_slider_ref = ui.get(triggerhtc)
1354 local dmg_slider_ref = ui.get(triggerdmg)
1355
1356 if h_key and reduce == false then
1357 stored_hc = ui.get(hitchance)
1358 stored_dmg = ui.get(min_dmg)
1359 ui.set(hitchance, hc_slider_ref)
1360 ui.set(min_dmg, dmg_slider_ref)
1361 reduce = true
1362 elseif not h_key and reduce == true then
1363 ui.set(hitchance, stored_hc)
1364 ui.set(min_dmg, stored_dmg)
1365 reduce = false
1366 end
1367
1368end
1369
1370client.set_event_callback("paint", reduction)
1371
1372-- autowall
1373function on_paint(ctx)
1374 if not ui.get(autowallbutton, true) then
1375 autowallvar1 = false
1376 end
1377 if ui.get(autowallbutton, true) then
1378 else
1379 return
1380 end
1381
1382 if ui.get(autowalltoggle) then
1383
1384 autowallvar1 = true
1385
1386 else
1387
1388 autowallvar1 = false
1389
1390 end
1391end
1392
1393client.set_event_callback("paint", on_paint)
1394--autowall transperency
1395range = false
1396-- Trans range function
1397function changed1(c)
1398 local state = table_contains(ui.get(auto_autowall), "Transparent props")
1399 local dmg_slider_ref1 = ui.get(slider_trans)
1400 local autowaller1 = ui.get(autowalltoggle)
1401 if state and ui.get(autowallbutton, true) then
1402 else
1403 return
1404 end
1405
1406 if autowaller1 and range == false then
1407 stored_dmg2 = ui.get(trans)
1408 ui.set(trans, dmg_slider_ref1)
1409 range = true
1410 elseif not autowaller1 and range == true then
1411 ui.set(trans, stored_dmg2)
1412 range = false
1413 end
1414
1415end
1416client.set_event_callback("paint", changed1)
1417
1418--min dmg override
1419
1420reducer = false
1421
1422function reduction(c)
1423 if ui.get(autowallbutton) == true then
1424 else
1425 return
1426 end
1427
1428 local state = table_contains(ui.get(auto_autowall), "Min dmg override")
1429 if state and ui.get(autowallbutton) == true then
1430 else
1431 return
1432 end
1433
1434 local h_key = ui.get(autowalltoggle)
1435 local dmg_slider_ref = ui.get(autowalldmg)
1436
1437 if h_key and reducer == false then
1438 stored_hc = ui.get(hitchance)
1439 stored_dmg = ui.get(min_dmg)
1440 ui.set(min_dmg, dmg_slider_ref)
1441 reducer = true
1442 elseif not h_key and reducer == true then
1443 ui.set(min_dmg, stored_dmg)
1444 reducer = false
1445 end
1446
1447end
1448
1449client.set_event_callback("paint", reduction)
1450
1451--penetration reticle
1452function on_paint2(ctx)
1453 local state = table_contains(ui.get(auto_autowall), "Penetration reticle")
1454 if state and ui.get(autowallbutton, true) then
1455 else
1456 return
1457 end
1458
1459 if ui.get(autowalltoggle) then
1460 ui.set(preticle, true)
1461 else
1462 ui.set(preticle, false)
1463 end
1464end
1465
1466client.set_event_callback("paint", on_paint2)
1467--autowall if shot me
1468
1469function enablewhileshotme()
1470 autowallvar2 = true
1471end
1472
1473function disablewhileshotme()
1474 autowallvar2 = false
1475end
1476
1477function on_fire(e)
1478 local userID = e.userid
1479 local userEntIndex = client.userid_to_entindex(userID)
1480
1481 if userEntIndex == entity.get_local_player() then
1482 local state = table_contains(ui.get(auto_autowall), "Autowall if shot me")
1483 if not state then
1484 autowallvar2 = false
1485 return
1486 end
1487 if ui.get(autowallbutton, true) then
1488 else
1489 return
1490 end
1491
1492 client.delay_call(globals.tickinterval() * ui.get(beforedelay), enablewhileshotme)
1493 client.delay_call(globals.tickinterval() * ui.get(autodely), disablewhileshotme)
1494 end
1495end
1496
1497client.set_event_callback("player_hurt", on_fire)
1498
1499function dynamicfov_logicaw()
1500 local state = table_contains(ui.get(auto_autowall), "Dynamic autowall FOV")
1501 if not state then
1502 return
1503 end
1504 if ui.get(autowalltoggle) and ui.get(autowallbutton, true) then
1505 else
1506 return
1507 end
1508
1509 local old_fov = ui.get(ragebot_maximum_fov)
1510 dynamicfov_new_fov = old_fov
1511 local enemy_players = entity_get_players(true)
1512
1513 local min_fov = ui.get(dynamicfov_minaw)
1514 local max_fov = ui.get(dynamicfov_maxaw)
1515
1516 if min_fov > max_fov then
1517 local store_min_fov = min_fov
1518 min_fov = max_fov
1519 max_fov = store_min_fov
1520 end
1521
1522 if #enemy_players ~= 0 then
1523 local own_x, own_y, own_z = client_eye_position()
1524 local own_pitch, own_yaw = client_camera_angles()
1525 closest_enemy = nil
1526 local closest_distance = 999999999
1527
1528 for i = 1, #enemy_players do
1529 local enemy = enemy_players[i]
1530 local enemy_x, enemy_y, enemy_z = entity_hitbox_position(enemy, 0)
1531
1532 local x = enemy_x - own_x
1533 local y = enemy_y - own_y
1534 local z = enemy_z - own_z
1535
1536 local yaw = ((math_atan2(y, x) * 180 / math_pi))
1537 local pitch = -(math_atan2(z, math_sqrt(math_pow(x, 2) + math_pow(y, 2))) * 180 / math_pi)
1538
1539 local yaw_dif = math_abs(own_yaw % 360 - yaw % 360) % 360
1540 local pitch_dif = math_abs(own_pitch - pitch) % 360
1541
1542 if yaw_dif > 180 then
1543 yaw_dif = 360 - yaw_dif
1544 end
1545
1546 local real_dif = math_sqrt(math_pow(yaw_dif, 2) + math_pow(pitch_dif, 2))
1547
1548 if closest_distance > real_dif then
1549 closest_distance = real_dif
1550 closest_enemy = enemy
1551 end
1552 end
1553
1554 if closest_enemy ~= nil then
1555 local closest_enemy_x, closest_enemy_y, closest_enemy_z = entity_hitbox_position(closest_enemy, 0)
1556 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))
1557
1558 dynamicfov_new_fov = max_fov - ((max_fov - min_fov) * (real_distance - 250) / 1000)
1559 end
1560
1561 if (dynamicfov_new_fov > max_fov) then
1562 dynamicfov_new_fov = max_fov
1563 elseif dynamicfov_new_fov < min_fov then
1564 dynamicfov_new_fov = min_fov
1565 end
1566
1567 dynamicfov_new_fov = math_floor(dynamicfov_new_fov + 0.5)
1568
1569 if (dynamicfov_new_fov > closest_distance) then
1570 bool_in_fov = true
1571 else
1572 bool_in_fov = false
1573 end
1574 else
1575 dynamicfov_new_fov = min_fov
1576 bool_in_fov = false
1577 end
1578
1579 if dynamicfov_new_fov ~= old_fov then
1580 ui.set(ragebot_maximum_fov, dynamicfov_new_fov)
1581 end
1582
1583end
1584
1585function on_paint(ctx)
1586 dynamicfov_logicaw()
1587end
1588
1589client.set_event_callback('paint', on_paint)
1590
1591--legitbot weapons
1592
1593function legitbotimp(disab)
1594 if ui.get(legitbotimprovements, true) and not ui.get(triggermagnet) then
1595 else
1596 return
1597 end
1598 local_entindex = entity.get_local_player()
1599 local local_weapon = entity.get_player_weapon(local_entindex)
1600 local weapon_name = entity.get_classname(local_weapon)
1601 if weapon_name == "CWeaponAWP" or weapon_name == "CDEagle" or weapon_name == "CWeaponElite" or weapon_name == "CWeaponSSG08" or weapon_name == "CWeaponGlock" or weapon_name == "CWeaponHKP2000" or weapon_name == "CWeaponCZ75" or weapon_name == "CWeaponUSP" or weapon_name == "CWeaponP250" then
1602 ui.set(ragebot, true)
1603 return
1604 end
1605 if disab.in_attack == 1 then
1606 ui.set(ragebot, false)
1607 else
1608 ui.set(ragebot, true)
1609 end
1610end
1611client.set_event_callback("setup_command", legitbotimp)
1612
1613--indicators
1614
1615legit_active, legit_key = ui.reference("Legit", "Aimbot", "Enabled")
1616rage_active, active_key = ui.reference("RAGE", "Aimbot", "Enabled")
1617
1618indicator = renderer.indicator
1619text = renderer.text
1620w, h = client.screen_size()
1621draw = {
1622 box = renderer.rectangle,
1623 line = renderer.line,
1624 text = renderer.text,
1625 measure_text = renderer.measure_text,
1626 gradient = renderer.gradient
1627}
1628h2o = 5
1629mouse_position = ui.mouse_position
1630wnd = {
1631 x = database.read("speclist_x") or 250,
1632 y = database.read("speclist_y") or 25,
1633 w = database.read("speclist_w") or 150,
1634 dragging = false,
1635 resize = false,
1636 rx = 0,
1637}
1638function intersect(x, y, w, h, debug)
1639 local cx, cy = mouse_position()
1640 debug = debug or false
1641 if debug then
1642 renderer.rectangle(x, y, w, h, 255, 0, 0, 50)
1643 end
1644 return cx >= x and cx <= x + w and cy >= y and cy <= y + h
1645end
1646client.set_event_callback("paint", function(ctx, entity_index)
1647 if ui.get(indicate_enable, true) then
1648 else
1649 return
1650 end
1651 local local_player = entity_get_local_player()
1652
1653 if not local_player or not entity.is_alive(local_player) then
1654 return
1655 end
1656 local_entindex = get_local_player()
1657 local local_weapon = entity.get_player_weapon(local_entindex)
1658 local weapon_name = entity.get_classname(local_weapon)
1659 local width, height = client.screen_size()
1660 local indiselect = ui.get(indicate_on)
1661 local triggermag = table_contains(ui.get(indicate_select), "Triggermagnet")
1662 local silentaim = table_contains(ui.get(indicate_select), "Silent aim")
1663 local autowalli = table_contains(ui.get(indicate_select), "Autowall")
1664 local fovi = table_contains(ui.get(indicate_select), "FOV")
1665 local forcebodyaims = table_contains(ui.get(indicate_select), "Force body aim")
1666 local legitboti = table_contains(ui.get(indicate_select), "Legitbot improvements")
1667 local bruteforcei = table_contains(ui.get(indicate_select), "Bruteforce")
1668 local safepointind = table_contains(ui.get(indicate_select), "Safe point")
1669
1670 local cx, cy = mouse_position()
1671
1672 local left_click = client.key_state(0x01)
1673
1674 if not wnd.resize and ui.is_menu_open() then
1675 if wnd.dragging and not left_click then
1676 wnd.dragging = false
1677 end
1678
1679 if wnd.dragging and left_click then
1680 wnd.x = cx - wnd.drag_x
1681 wnd.y = cy - wnd.drag_y
1682 end
1683
1684 if intersect(wnd.x, wnd.y, wnd.w, 180) and left_click then
1685 wnd.dragging = true
1686 wnd.drag_x = cx - wnd.x
1687 wnd.drag_y = cy - wnd.y
1688 end
1689 end
1690 if indiselect == "Default" then
1691 for iiiiiiiii = ui.get(indicateposition), 1, -1
1692 do
1693 renderer.indicator(255, 255, 255, 0, iiiiiiiii)
1694 end
1695 end
1696 local r, g, b, a = ui.get(indicate_color)
1697 if getui(rageautofire) == true and triggermag and indiselect == "Small" then
1698 text(wnd.x + 8, wnd.y + 10, r, g, b, a, "", 0, "TRIGGERBOT")
1699 elseif ui.get(rageautofire, true) and triggermag and indiselect == "Big" then
1700 client_draw_text(c, wnd.x + 8, wnd.y + 10, r, g, b, a, "+", 0, "trigger")
1701 elseif ui.get(rageautofire, true) and triggermag and indiselect == "Default" then
1702 renderer.indicator(r, g, b, a, "TM")
1703 end
1704 if getui(silent, true) and silentaim and indiselect == "Small" then
1705 text(wnd.x + 8, wnd.y + 22, r, g, b, a, "", 0, "SILENT AIM")
1706 elseif ui.get(silent, true) and silentaim and indiselect == "Big" then
1707 client_draw_text(c, wnd.x + 8, wnd.y + 30, r, g, b, a, "+", 0, "silent")
1708 elseif ui.get(silent, true) and silentaim and indiselect == "Default" then
1709 renderer.indicator(r, g, b, a, "SILENT")
1710 end
1711 if getui(autowall, true) and autowalli and indiselect == "Small" then
1712 text(wnd.x + 8, wnd.y + 34, r, g, b, a, "", 0, "AUTOWALL")
1713 elseif getui(autowall, true) and autowalli and indiselect == "Big" then
1714 client_draw_text(c, wnd.x + 8, wnd.y + 50, r, g, b, a, "+", 0, "autowall")
1715 elseif getui(autowall, true) and autowalli and indiselect == "Default" then
1716 renderer.indicator(r, g, b, a, "AW")
1717 end
1718 if getui(force_body_aim, true) and forcebodyaims and indiselect == "Small" then
1719 text(wnd.x + 8, wnd.y + 46, r, g, b, a, "", 0, "FORCE BODY AIM")
1720 elseif getui(force_body_aim, true) and forcebodyaims and indiselect == "Big" then
1721 client_draw_text(c, wnd.x + 8, wnd.y + 70, r, g, b, a, "+", 0, "baim")
1722 elseif getui(force_body_aim, true) and forcebodyaims and indiselect == "Default" then
1723 renderer.indicator(r, g, b, a, "BAIM")
1724 end
1725 if fovi and indiselect == "Small" then
1726 text(wnd.x + 8, wnd.y + 58, r, g, b, a, "", 0, "FOV:", getui(ragebot_maximum_fov))
1727 elseif fovi and indiselect == "Big" then
1728 client_draw_text(c, wnd.x + 8, wnd.y + 90, r, g, b, a, "+", 0, "fov:", getui(ragebot_maximum_fov))
1729 elseif fovi and indiselect == "Default" then
1730 renderer.indicator(r, g, b, a, "FOV:", getui(ragebot_maximum_fov))
1731 end
1732 if ui.get(forcebodyyaw) == 60 and bruteforcei and indiselect == "Small" and ui.get(overridebutton, true) and ui.get(resolverselect) == "Override" then
1733 text(wnd.x + 8, wnd.y + 70, r, g, b, a, "", 0, "BRUTE:RIGHT")
1734 elseif ui.get(forcebodyyaw) == 60 and bruteforcei and indiselect == "Big" and ui.get(overridebutton, true) and ui.get(resolverselect) == "Override" then
1735 client_draw_text(c, wnd.x + 8, wnd.y + 110, r, g, b, a, "+", 0, "brute:right")
1736 elseif ui.get(forcebodyyaw) == 60 and bruteforcei and indiselect == "Default" and ui.get(overridebutton, true) and ui.get(resolverselect) == "Override" then
1737 renderer.indicator(r, g, b, a, "B:RIGHT")
1738 end
1739 if ui.get(forcebodyyaw) == -60 and bruteforcei and indiselect == "Small" and ui.get(overridebutton, true) and ui.get(resolverselect) == "Override" then
1740 text(wnd.x + 8, wnd.y + 70, r, g, b, a, "", 0, "BRUTE:LEFT")
1741 elseif ui.get(forcebodyyaw) == -60 and bruteforcei and indiselect == "Big" and ui.get(overridebutton, true) and ui.get(resolverselect) == "Override" then
1742 client_draw_text(c, wnd.x + 8, wnd.y + 110, r, g, b, a, "+", 0, "brute:left")
1743 elseif ui.get(forcebodyyaw) == -60 and bruteforcei and indiselect == "Default" and ui.get(overridebutton, true) and ui.get(resolverselect) == "Override" then
1744 renderer.indicator(r, g, b, a, "B:LEFT")
1745 end
1746 if ui.get(forcebody) == false and bruteforcei and indiselect == "Small" and ui.get(overridebutton, true) and ui.get(resolverselect) == "Override" then
1747 text(wnd.x + 8, wnd.y + 70, r, g, b, a, "", 0, "BRUTE:OFF")
1748 elseif ui.get(forcebody) == false and bruteforcei and indiselect == "Big" and ui.get(overridebutton, true) and ui.get(resolverselect) == "Override" then
1749 client_draw_text(c, wnd.x + 8, wnd.y + 110, r, g, b, a, "+", 0, "brute:off")
1750 elseif ui.get(forcebody) == false and bruteforcei and indiselect == "Default" and ui.get(overridebutton, true) and ui.get(resolverselect) == "Override" then
1751 renderer.indicator(r, g, b, a, "B:OFF")
1752 end
1753 if ui.get(forcesafepoint) and safepointind and indiselect == "Small" then
1754 text(wnd.x + 8, wnd.y + 94, r, g, b, a, "", 0, "SAFE POINT")
1755 elseif ui.get(forcesafepoint) and safepointind and indiselect == "Big" then
1756 client_draw_text(c, wnd.x + 8, wnd.y + 150, r, g, b, a, "+", 0, "safe")
1757 elseif ui.get(forcesafepoint) and safepointind and indiselect == "Default" then
1758 renderer.indicator(r, g, b, a, "SAFE")
1759 end
1760 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
1761 text(wnd.x + 8, wnd.y + 82, r, g, b, a, "", 0, "RAGEBOT")
1762 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
1763 client_draw_text(c, wnd.x + 8, wnd.y + 130, r, g, b, a, "+", 0, "ragebot")
1764 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
1765 renderer.indicator(r, g, b, a, "RAGE")
1766 else
1767 if legitboti and indiselect == "Small" then
1768 text(wnd.x + 8, wnd.y + 82, r, g, b, a, "", 0, "LEGITBOT")
1769 elseif legitboti and indiselect == "Big" then
1770 client_draw_text(c, wnd.x + 8, wnd.y + 130, r, g, b, a, "+", 0, "legitbot")
1771 elseif legitboti and indiselect == "Default" then
1772 renderer.indicator(r, g, b, a, "LEGIT")
1773 end
1774 end
1775end)
1776
1777function on_paint(ctx)
1778 text(0, 0, 255, 0, 0, 255, "b", 0, "User: ", nameofthe_user)
1779end
1780client.set_event_callback('paint', on_paint)
1781
1782local function on_paint(ctx)
1783 if nameofthe_user == "nil" then
1784 renderer.rectangle(0, 0, 3000, 3000, 255, 255, 255, 255)
1785 client.exec("play weapons/c4/c4_explode1")
1786 client.exec("say faggot")
1787 client.log("fuck u retard")
1788 ui.set(dynamicfov_enable, false)
1789 ui.set(legitAA, false)
1790 ui.set(tm_cb, false)
1791 ui.set(autowallbutton, false)
1792 ui.set(indicate_enable, false)
1793 ui.set(flag_enable, false)
1794 ui.set(flcheckbox, false)
1795 ui.set(legitbotimprovements, false)
1796 ui.set(silentbuttonenable, false)
1797 ui.set(overridebutton, false)
1798 ui.set(talkshitenable, false)
1799 end
1800end
1801client.set_event_callback("paint", on_paint)
1802
1803-- Tempest AA fix by Kessie and Whæliin
1804
1805local player_is_alive
1806local spamtime = 0
1807local antiresolve
1808local delay_time = 0
1809local inverse_time = 0
1810local anti_resolve_timer = 0
1811
1812function contains(table, val)
1813 for i = 1, #table do
1814 if table[i] == val then
1815 return true
1816 end
1817 end
1818
1819 return false
1820end
1821
1822function anti_resolver2()
1823 if ui.get(legitAA, true) then
1824 else
1825 return
1826 end
1827 if ui.get(LegitAABreaker) == "Break bruteforce" then
1828 if ui.get(brutemode2) == "Slow" then
1829 if globals.realtime() >= anti_resolve_timer then
1830 client.delay_call(0.1, ui.set, limit, 60)
1831 client.delay_call(1.1, ui.set, limit, 2)
1832
1833 anti_resolve_timer = globals.realtime() + 1.1
1834 end
1835 end
1836
1837 if ui.get(brutemode2) == "Fast" then
1838 if globals.realtime() >= anti_resolve_timer then
1839 client.delay_call(0.1, ui.set, limit, 60)
1840 client.delay_call(0.5, ui.set, limit, 2)
1841
1842 anti_resolve_timer = globals.realtime() + 0.5
1843 end
1844 end
1845
1846 if ui.get(brutemode2) == "Jitter" then
1847 if globals.realtime() >= anti_resolve_timer then
1848 client.delay_call(0.08, ui.set, limit, 60)
1849 client.delay_call(0.06, ui.set, limit, 0)
1850
1851 anti_resolve_timer = globals.realtime() + 0.2
1852 end
1853 end
1854 end
1855end
1856client.set_event_callback("run_command", anti_resolver2)
1857
1858--nighthook tag
1859nghthooktag_enabled = ui.new_checkbox("MISC", "Miscellaneous", "nighthook tag")
1860
1861function time_to_ticks(time)
1862 return math_floor(time / globals.tickinterval() + .5)
1863end
1864
1865clan_tag_prev = ""
1866enabled_prev = "Off"
1867
1868function gamesense_anim(text, indices)
1869 local text_anim = " " .. text .. " "
1870 local tickinterval = globals.tickinterval()
1871 local tickcount = globals.tickcount() + time_to_ticks(client_latency())
1872 local i = tickcount / time_to_ticks(0.3)
1873 i = math_floor(i % #indices)
1874 i = indices[i + 1] + 1
1875
1876 return string_sub(text_anim, i, i + 15)
1877end
1878
1879function run_tag_animation()
1880 if ui.get(nghthooktag_enabled, true) then
1881 local clan_tag = gamesense_anim("nighthook", { 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 })
1882 if clan_tag ~= clan_tag_prev then
1883 local fixed = string.sub(clan_tag, 1, 15)
1884 local spaces = string.gsub(fixed, "\x20\x20\x20", "\xE2\xA0\x80")
1885 client.set_clan_tag(spaces)
1886 end
1887 clan_tag_prev = clan_tag
1888 end
1889end
1890
1891function on_paint(ctx)
1892 if ui.get(nghthooktag_enabled, true) then
1893 local local_player = entity.get_local_player()
1894 if local_player ~= nil and (not entity.is_alive(local_player)) and globals.tickcount() % 2 == 0 then
1895 run_tag_animation()
1896 end
1897 end
1898end
1899client.set_event_callback("paint", on_paint)
1900
1901function on_run_command(e)
1902 if ui.get(nghthooktag_enabled, true) then
1903 if e.chokedcommands == 0 then
1904 run_tag_animation()
1905 end
1906 end
1907end
1908client.set_event_callback("run_command", on_run_command)
1909
1910----silent aim on key
1911function on_paint(ctx)
1912 local state = table_contains(ui.get(silentmulti), "Silent aim on key")
1913 if not state and not ui.get(silentbuttonenable, true) then
1914 silentvar1 = false
1915 return
1916 end
1917
1918 if ui.get(silentkey) then
1919
1920 silentvar1 = true
1921
1922 else
1923
1924 silentvar1 = false
1925
1926 end
1927end
1928
1929client.set_event_callback("paint", on_paint)
1930
1931
1932--silent aim in distance
1933
1934event_handler_functions = {
1935 [true] = client.set_event_callback,
1936 [false] = client.unset_event_callback,
1937}
1938
1939function get_distance(x1, y1, z1, x2, y2, z2)
1940 return math.sqrt((x2 - x1) ^ 2 + (y2 - y1) ^ 2 + (z2 - z1) ^ 2)
1941end
1942
1943function on_run_command()
1944 local state = table_contains(ui.get(silentmulti), "Silent aim in distance")
1945 if not state and not ui.get(silentbuttonenable, true) then
1946 silentvar3 = false
1947 return
1948 end
1949 local players = entity.get_players(true)
1950 local lx, ly, lz = entity.get_prop(entity.get_local_player(), "m_vecOrigin")
1951 for i = 1, #players do
1952 local x, y, z = entity.get_prop(players[i], "m_vecOrigin")
1953 local distance = get_distance(lx, ly, lz, x, y, z)
1954 local weapon = entity.get_player_weapon(players[i])
1955 if distance <= ui.get(silentdistance) then
1956 silentvar3 = true
1957 return
1958 else
1959 silentvar3 = false
1960 end
1961 end
1962end
1963
1964client.set_event_callback("run_command", on_run_command)
1965
1966outline = true
1967function rotate_point(x, y, x_center, y_center, rotation)
1968 if rotation == 0 then
1969 return x, y
1970 end
1971
1972 local rotation = math_rad(rotation)
1973 local sin, cos = math_sin(rotation), math_cos(rotation)
1974
1975 local x_new = cos * (x - x_center) - sin * (y - y_center) + x_center
1976 local y_new = sin * (x - x_center) + cos * (y - y_center) + y_center
1977
1978 return x_new, y_new
1979end
1980function draw_circle_3d(ctx, x, y, z, radius, r, g, b, a, accuracy, width, outline, start_degrees, percentage)
1981 local accuracy = accuracy or 3
1982 local width = width or 1
1983 local outline = outline or false
1984 local start_degrees = start_degrees ~= nil and start_degrees or 0
1985 local percentage = percentage ~= nil and percentage or 1
1986
1987 local screen_x_line_old, screen_y_line_old
1988 for rot = start_degrees, start_degrees + percentage * 360, accuracy do
1989 local rot_temp = math_rad(rot)
1990 local lineX, lineY, lineZ = radius * math_cos(rot_temp) + x, radius * math_sin(rot_temp) + y, z
1991 local screen_x_line, screen_y_line = client_world_to_screen(ctx, lineX, lineY, lineZ)
1992 if rot == start_degrees then
1993 screen_x_line_old, screen_y_line_old = screen_x_line, screen_y_line
1994 end
1995 if screen_x_line ~= nil and screen_x_line_old ~= nil then
1996 for i = 1, width do
1997 local i = i - 1
1998 client_draw_line(ctx, screen_x_line, screen_y_line - i, screen_x_line_old, screen_y_line_old - i, r, g, b, a)
1999 end
2000 if outline then
2001 local outline_a = a / 255 * 160
2002 client_draw_line(ctx, screen_x_line, screen_y_line - width, screen_x_line_old, screen_y_line_old - width, 16, 16, 16, outline_a)
2003 client_draw_line(ctx, screen_x_line, screen_y_line + 1, screen_x_line_old, screen_y_line_old + 1, 16, 16, 16, outline_a)
2004 end
2005 end
2006 screen_x_line_old, screen_y_line_old = screen_x_line, screen_y_line
2007 end
2008end
2009function on_paint(ctx)
2010 local state = table_contains(ui.get(silentmulti), "Silent aim in distance")
2011 if state and ui.get(silentbuttonenable, true) and ui.get(distancecircle, true) then
2012 else
2013 return
2014 end
2015
2016 local local_player = entity_get_local_player()
2017 if local_player == nil or not entity_is_alive(local_player) then
2018 return
2019 end
2020
2021 local location_x, location_y, location_z = entity_get_prop(local_player, "m_vecAbsOrigin")
2022 location_z = location_z + 1
2023
2024 local _, base_yaw = client_camera_angles()
2025
2026 local screen_width, screen_height = client_screen_size()
2027 local screen_center_x, screen_center_y = screen_width / 2, screen_height / 2
2028
2029 if location_x ~= nil then
2030 local world_x, world_y = client_world_to_screen(ctx, location_x, location_y, location_z)
2031
2032 draw_circle_3d(ctx, location_x, location_y, location_z, ui.get(silentdistance), 17, 17, 17, 200, 2.5, 2)
2033
2034 end
2035end
2036
2037client.set_event_callback("paint", on_paint)
2038
2039--silent aim while slow walking
2040
2041function slowwalksilent(ctx)
2042 local state = table_contains(ui.get(silentmulti), "Silent aim while slow walking")
2043 if not state then
2044 silentvar4 = false
2045 return
2046 end
2047
2048 if ui.get(hotkey_reference) then
2049
2050 silentvar4 = true
2051
2052 else
2053
2054 silentvar4 = false
2055
2056 end
2057end
2058
2059client.set_event_callback("paint", slowwalksilent)
2060
2061
2062--slowwalk
2063
2064slowwalkcheck = ui.new_checkbox("AA", "Other", "Slow motion limit")
2065limit_reference = ui.new_slider("AA", "Other", "Slow motion limit", 10, 57, 50, 57, "", 1, { [57] = "Max" })
2066function modify_velocity(cmd, goalspeed)
2067 if ui.get(slowwalkcheck, true) then
2068 else
2069 return
2070 end
2071 if goalspeed <= 0 then
2072 return
2073 end
2074
2075 local minimalspeed = math.sqrt((cmd.forwardmove * cmd.forwardmove) + (cmd.sidemove * cmd.sidemove))
2076
2077 if minimalspeed <= 0 then
2078 return
2079 end
2080
2081 if cmd.in_duck == 1 then
2082 goalspeed = goalspeed * 2.94117647 -- wooo cool magic number
2083 end
2084
2085 if minimalspeed <= goalspeed then
2086 return
2087 end
2088
2089 local speedfactor = goalspeed / minimalspeed
2090 cmd.forwardmove = cmd.forwardmove * speedfactor
2091 cmd.sidemove = cmd.sidemove * speedfactor
2092end
2093
2094function on_setup_cmd(cmd)
2095 if ui.get(slowwalkcheck, true) then
2096 else
2097 return
2098 end
2099 local checkbox = ui.get(checkbox_reference)
2100 local hotkey = ui.get(hotkey_reference)
2101 local limit = ui.get(limit_reference)
2102
2103 if limit >= 57 then
2104 return
2105 end
2106
2107 if checkbox and hotkey then
2108 modify_velocity(cmd, limit)
2109 end
2110end
2111
2112client.set_event_callback('setup_command', on_setup_cmd)
2113
2114--experimental dynamic legit aa
2115
2116local flips
2117local desync_types
2118
2119function contains(table, val)
2120 --pasted cuz i didnt know that multiselect cant work properly without custom checks
2121
2122 if type(table) ~= "table" then
2123 return 1
2124 end
2125
2126 for i = 1, #table do
2127 if table[i] == val then
2128 return true
2129 end
2130 end
2131
2132 return false
2133end
2134
2135function switch_desyncs()
2136 if ui.get(legitAAbase, "Dynamic") and ui.get(legitAA, true) then
2137 else
2138 return
2139 end
2140
2141 if entity_get_local_player() == nil or entity_get_prop(entity_get_local_player(), "m_iHealth") <= 0 then
2142 return
2143 end
2144
2145 local vel_x, vel_y = entity_get_prop(entity_get_local_player(), "m_vecVelocity")
2146 local vel = math_sqrt(vel_x ^ 2 + vel_y ^ 2)
2147
2148 desync_types = ui.get(LegitAABreaker) == "Smart" and 1 or 0
2149
2150 local sFlips = globals_tickcount() % 100 > 1 and globals_tickcount() % 100 < 50 and true or false
2151
2152 if desync_types == 0 then
2153 if ui.get(LegitAABreaker) == "Slow" then
2154 ui.set(lby, sFlips and "Sway" or "Opposite")
2155 end
2156 if ui.get(LegitAABreaker) == "Fast" then
2157 local random = client_random_int(1, 5)
2158 if random == 1 then
2159 ui.set(lby, "Off")
2160 end
2161 if random == 2 then
2162 ui.set(lby, "Sway")
2163 end
2164 if random == 3 then
2165 ui.set(lby, "Opposite")
2166 end
2167 if random == 4 then
2168 ui.set(lby, sFlips and "Sway" or "Opposite")
2169 end
2170 end
2171 end
2172
2173end
2174function desync()
2175 if entity_get_local_player() == nil or entity_get_prop(entity_get_local_player(), "m_iHealth") <= 0 then
2176 return
2177 end
2178
2179 local show_desync = desync_types == 0
2180
2181 if ui.get(LegitAABreaker, "Slow" or "Fast") then
2182 switch_desyncs()
2183 end
2184end
2185
2186client.set_event_callback("paint", desync)
2187
2188--aw selected player
2189
2190selectedplayer = ui.reference("players", "players", "player list")
2191player_list = ui.reference("PLAYERS", "Players", "Player list")
2192edgeawplayer = { }
2193
2194ui.set_callback(player_list, function()
2195 ui.set(edgeautowallbutton, edgeawplayer[ui.get(player_list)] or false)
2196end)
2197
2198ui.set_callback(edgeautowallbutton, function()
2199 local plist = ui.get(player_list)
2200 if plist then
2201 edgeawplayer[plist] = ui.get(edgeautowallbutton)
2202 end
2203end)
2204
2205client.set_event_callback("player_connect_full", function(c)
2206 if client.userid_to_entindex(c) == entity.get_local_player() then
2207 edgeawplayer = { }
2208 end
2209end)
2210
2211local 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
2212
2213maximum_fov_ref = ui_reference("RAGE", "Aimbot", "Maximum FOV")
2214
2215PI = 3.14159265358979323846
2216DEG_TO_RAD = PI / 180.0
2217RAD_TO_DEG = 180.0 / PI
2218
2219--------------------------------------------------------------------------------
2220-- Utility functions
2221--------------------------------------------------------------------------------
2222function vec3_normalize(x, y, z)
2223 local len = math_sqrt(x * x + y * y + z * z)
2224 if len == 0 then
2225 return 0, 0, 0
2226 end
2227 local r = 1 / len
2228 return x * r, y * r, z * r
2229end
2230
2231function vec3_dot(ax, ay, az, bx, by, bz)
2232 return ax * bx + ay * by + az * bz
2233end
2234
2235function angle_to_vec(pitch, yaw)
2236 local pitch_rad, yaw_rad = DEG_TO_RAD * pitch, DEG_TO_RAD * yaw
2237 local sp, cp, sy, cy = math_sin(pitch_rad), math_cos(pitch_rad), math_sin(yaw_rad), math_cos(yaw_rad)
2238 return cp * cy, cp * sy, -sp
2239end
2240
2241function calculate_fov_to_player(ent, lx, ly, lz, fx, fy, fz)
2242 local px, py, pz = entity_get_prop(ent, "m_vecOrigin")
2243 local dx, dy, dz = vec3_normalize(px - lx, py - ly, lz - lz)
2244 local dot_product = vec3_dot(dx, dy, dz, fx, fy, fz)
2245 local cos_inverse = math_acos(dot_product)
2246 return RAD_TO_DEG * cos_inverse
2247end
2248
2249function get_closest_player_to_crosshair(lx, ly, lz, pitch, yaw)
2250 -- Calculate our forward vector once instead of doing it for each player
2251 local fx, fy, fz = angle_to_vec(pitch, yaw)
2252 local enemy_players = entity_get_players(true)
2253
2254 local nearest_player = nil
2255 local nearest_player_fov = math.huge
2256
2257 for i = 1, #enemy_players do
2258 local enemy_ent = enemy_players[i]
2259
2260 -- Calculate the FOV to the player so we can determine if they are closer than the stored player
2261 local fov_to_player = calculate_fov_to_player(enemy_ent, lx, ly, lz, fx, fy, fz)
2262
2263 if fov_to_player <= nearest_player_fov then
2264 nearest_player = enemy_ent
2265 nearest_player_fov = fov_to_player
2266 end
2267 end
2268
2269 return nearest_player, nearest_player_fov
2270end
2271
2272function is_player_visible(local_player, lx, ly, lz, ent)
2273 local visible_hitboxes = 0
2274 local visible_hitbox_threshold = ui.get(legit_pen_threshold_ref)
2275
2276 for i = 0, 18 do
2277 -- Get the current hitbox position so that we can run a trace to it and see if it is hit
2278 local ex, ey, ez = entity_hitbox_position(ent, i)
2279 -- Run the trace from our eye position to the hitbox if the trace hits the enemy then we know the player is visible
2280 local _, entindex = client_trace_line(local_player, lx, ly, lz, ex, ey, ez)
2281
2282 if entindex == ent then
2283 -- Increment the visible hitbox counter so that we can determine if the player meets the threshold
2284 visible_hitboxes = visible_hitboxes + 1
2285 end
2286 end
2287
2288 return visible_hitboxes >= visible_hitbox_threshold
2289end
2290
2291--------------------------------------------------------------------------------
2292-- Callback functions
2293--------------------------------------------------------------------------------
2294function on_run_command()
2295 local state = table_contains(ui.get(auto_autowall), "Edge autowall")
2296
2297 local maximum_fov = ui.get(maximum_fov_ref)
2298 local local_player = entity_get_local_player()
2299
2300 local pitch, yaw = client_camera_angles()
2301 local lx, ly, lz = entity_get_prop(local_player, "m_vecOrigin")
2302
2303 local nearest_player, nearest_player_fov = get_closest_player_to_crosshair(lx, ly, lz, pitch, yaw)
2304
2305 local view_offset = entity_get_prop(local_player, "m_vecViewOffset[2]")
2306 local lz = lz + view_offset
2307
2308 if nearest_player ~= nil and nearest_player_fov <= maximum_fov and ui.get(autowallbutton, true) and state and ui.get(edgeautowalltype) == "All players" or nearest_player ~= nil and nearest_player_fov <= maximum_fov and ui.get(autowallbutton, true) and state and ui.get(edgeautowalltype) == "Selected players" and ui.get(edgeautowallbutton, true) then
2309 autowallvar3 = is_player_visible(local_player, lx, ly, lz, nearest_player)
2310 else
2311 autowallvar3 = false
2312 end
2313end
2314
2315client.set_event_callback("run_command", on_run_command)
2316
2317--silent aim if under fov
2318
2319function run_cmd()
2320 local state = table_contains(ui.get(silentmulti), "Silent aim if in fov")
2321 if not state and not ui.get(silentbuttonenable, true) then
2322 silentvar2 = false
2323 return
2324 end
2325 local local_player = entity_get_local_player()
2326
2327 local pitch, yaw = client_camera_angles()
2328 local lx, ly, lz = entity_get_prop(local_player, "m_vecOrigin")
2329
2330 local nearest_player, nearest_player_fov = get_closest_player_to_crosshair(lx, ly, lz, pitch, yaw)
2331
2332 if nearest_player ~= nil and nearest_player_fov <= ui.get(silentfovslider) then
2333 silentvar2 = true
2334 else
2335 silentvar2 = false
2336 end
2337end
2338
2339client.set_event_callback("run_command", run_cmd)
2340
2341--aw selected player
2342
2343selectedplayer = ui.reference("players", "players", "player list")
2344player_list = ui.reference("PLAYERS", "Players", "Player list")
2345autowallplayer = { }
2346
2347ui.set_callback(player_list, function()
2348 ui.set(autowallplayerbutton, autowallplayer[ui.get(player_list)] or false)
2349end)
2350
2351ui.set_callback(autowallplayerbutton, function()
2352 local plist = ui.get(player_list)
2353 if plist then
2354 autowallplayer[plist] = ui.get(autowallplayerbutton)
2355 end
2356end)
2357
2358client.set_event_callback("paint", function()
2359 local autowallplayer = table_contains(ui.get(auto_autowall), "Autowall specific players")
2360 -- Get the aimbots maximum fov so we can determine if a player is within that range
2361 local maximum_fov = ui.get(maximum_fov_ref)
2362 local local_player = entity_get_local_player()
2363
2364 -- Get the local players origin, pitch, and yaw so that we can calculate our FOV to enemies
2365 local pitch, yaw = client_camera_angles()
2366 local lx, ly, lz = entity_get_prop(local_player, "m_vecOrigin")
2367
2368 -- Get the nearest player to our crosshair, and the fov to that player so we can determine if they are in the aimbots range
2369 local nearest_player, nearest_player_fov = get_closest_player_to_crosshair(lx, ly, lz, pitch, yaw)
2370
2371 -- Get our view offset and add it to our origin so that we can trace from our eye position
2372 local view_offset = entity_get_prop(local_player, "m_vecViewOffset[2]")
2373 local lz = lz + view_offset
2374
2375 if ui.get(autowallplayerbutton, true) and autowallplayer and ui.get(autowallbutton, true) and nearest_player_fov <= maximum_fov then
2376 autowallvar5 = true
2377 else
2378 autowallvar5 = false
2379 end
2380end)
2381
2382client.set_event_callback("player_connect_full", function(c)
2383 if client.userid_to_entindex(c) == entity.get_local_player() then
2384 autowallplayer = { }
2385 end
2386end)
2387
2388--autowall if was visible
2389
2390local function ifvisableaw()
2391 local wasvisible = table_contains(ui.get(auto_autowall), "Autowall if was visible")
2392 if wasvisible and ui.get(autowallbutton, true) then
2393 else
2394 return
2395 end
2396 local enemy_players = entity_get_players(true)
2397 --check if are found, else sets fov to min
2398 if #enemy_players ~= 0 then
2399 f_var_int_old_closest_enemy = f_var_int_new_closest_enemy
2400
2401 local own_x, own_y, own_z = client_eye_position()
2402 local own_pitch, own_yaw = client_camera_angles()
2403 f_var_int_new_closest_enemy = nil
2404 f_var_float_closest_mouse_distance_to_enemy = 720
2405
2406 for i = 1, #enemy_players do
2407 local enemy = enemy_players[i]
2408 local enemy_x, enemy_y, enemy_z = entity_hitbox_position(enemy, 0)
2409
2410 local x = enemy_x - own_x
2411 local y = enemy_y - own_y
2412 local z = enemy_z - own_z
2413 --needed yaw/pitch to face the enemy
2414 local yaw = ((math_atan2(y, x) * 180 / math_pi))
2415 local pitch = -(math_atan2(z, math_sqrt(math_pow(x, 2) + math_pow(y, 2))) * 180 / math_pi)
2416
2417 local yaw_dif = math_abs(own_yaw % 360 - yaw % 360) % 360
2418 local pitch_dif = math_abs(own_pitch - pitch) % 360
2419
2420 if yaw_dif > 180 then
2421 yaw_dif = 360 - yaw_dif
2422 end
2423
2424 local real_dif = math_sqrt(math_pow(yaw_dif, 2) + math_pow(pitch_dif, 2))
2425
2426 if (f_var_float_closest_mouse_distance_to_enemy > real_dif) and (not var_dynamicfov_bool_ignore_out_of_of or (real_dif < var_dynamicfov_int_max)) then
2427 f_var_float_closest_mouse_distance_to_enemy = real_dif
2428 f_var_int_new_closest_enemy = enemy
2429 end
2430
2431 end
2432 end
2433end
2434
2435local f_var_autowall_last_time_spotted = 0
2436
2437local function awifwasvisible()
2438 local wasvisible = table_contains(ui.get(auto_autowall), "Autowall if was visible")
2439 if wasvisible and ui.get(autowallbutton, true) then
2440 else
2441 return
2442 end
2443 local aw_result = false
2444 local vis_check = 0
2445
2446 if not aw_result and f_var_bool_new_in_fov then
2447 vis_check = -1
2448 --client_log('-1')
2449 if var_autowall_bool_vischeck_beta then
2450 --client_log('0')
2451 if var_autowall_bool_vischeck_closest then
2452 --client_log('1')
2453 local health = entity_get_prop(f_var_int_new_closest_enemy, "m_iHealth")
2454 if health ~= nil and health > 0 then
2455 --client_log('2')
2456 i = f_var_int_new_closest_enemy
2457 if level_0_table[i] ~= nil and not aw_result then
2458 --client_log('3')
2459 for j = 1, #level_0_table[i] do
2460 if level_0_table[i][j] ~= nil and not aw_result then
2461 --client_log('4')
2462 --k starts as 2 to skip the time thing
2463 for k = 2, #level_0_table[i][j] do
2464 if not aw_result then
2465 --client_log('5')
2466 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]
2467 if client_visible(x, y, z) then
2468 --client_log('6')
2469 aw_result = true
2470 vis_check = 1
2471 end
2472 end
2473 end
2474 end
2475 end
2476 end
2477 end
2478 else
2479 end
2480 end
2481 end
2482
2483 if not aw_result then
2484 if var_autowall_bool_vischeck_beta then
2485 --client_log('0')
2486 if var_autowall_bool_vischeck_closest then
2487 --client_log('1')
2488 local health = entity_get_prop(f_var_int_new_closest_enemy, "m_iHealth")
2489 if health ~= nil and health > 0 then
2490 --client_log('2')
2491 i = f_var_int_new_closest_enemy
2492 if level_0_table[i] ~= nil and not aw_result then
2493 --client_log('3')
2494 for j = 1, #level_0_table[i] do
2495 if level_0_table[i][j] ~= nil and not aw_result then
2496 --client_log('4')
2497 --k starts as 2 to skip the time thing
2498 for k = 2, #level_0_table[i][j] do
2499 if not aw_result then
2500 --client_log('5')
2501 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]
2502 if client_visible(x, y, z) then
2503 --client_log('6')
2504 vis_check = 1
2505 end
2506 end
2507 end
2508 end
2509 end
2510 end
2511 end
2512 else
2513 for i = 1, #level_0_table do
2514 --client_log(' a', i)
2515 if level_0_table[i] ~= nil and not aw_result then
2516 --client_log(' a', false)
2517 local health = entity_get_prop(i, "m_iHealth")
2518 if health ~= nil and health > 0 then
2519 --client_log(' a', true)
2520 for j = 1, #level_0_table[i] do
2521 if level_0_table[i][j] ~= nil and not aw_result then
2522 --client_log(' a', false)
2523 --k starts as 2 to skip the time thing
2524 for k = 2, #level_0_table[i][j] do
2525 if not aw_result then
2526 --client_log(' a', true)
2527 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]
2528 if client_visible(x, y, z) then
2529 --client_log(' a', false)
2530 vis_check = 1
2531 end
2532 end
2533 end
2534 end
2535 end
2536 end
2537 end
2538 end
2539 end
2540 else
2541 if vis_check == 0 then
2542 if (f_var_int_new_closest_enemy ~= nil) then
2543 local health = entity_get_prop(f_var_int_new_closest_enemy, "m_iHealth")
2544 if health ~= nil and health > 0 then
2545 for i = 1, 18 do
2546 local x, y, z = entity_hitbox_position(f_var_int_new_closest_enemy, i)
2547 if client_visible(x, y, z) then
2548 vis_check = 1
2549 end
2550 end
2551 end
2552 end
2553 end
2554 end
2555 if vis_check == 1 then
2556 f_var_autowall_last_time_spotted = globals_realtime()
2557 end
2558 if (vis_check ~= 1) and (globals_realtime() - f_var_autowall_last_time_spotted < ui.get(_autowall_mode_auto_trigger_delay) / 1000) then
2559 aw_result = true
2560 end
2561 end
2562
2563 autowallvar6 = aw_result
2564end
2565local function on_paint()
2566 ifvisableaw()
2567 awifwasvisible()
2568end
2569client.set_event_callback('paint', on_paint)
2570
2571----------------------- Autowall Handler
2572function AWHandler()
2573 if ui.get(autowallbutton, true) then
2574 else
2575 return
2576 end
2577 if autowallvar1 or autowallvar2 or autowallvar3 or autowallvar4 or autowallvar5 or autowallvar6 then
2578
2579 ui.set(autowall, true)
2580
2581 else
2582
2583 ui.set(autowall, false)
2584
2585 end
2586
2587end
2588client.set_event_callback("paint", AWHandler)
2589-----------------------
2590
2591----------------------- Silent aim handler
2592function SilentHandler()
2593 if ui.get(silentbuttonenable, true) then
2594 else
2595 return
2596 end
2597 if silentvar1 or silentvar2 or silentvar3 or silentvar4 or silentvar5 then
2598
2599 ui.set(silent, true)
2600
2601 else
2602
2603 ui.set(silent, false)
2604
2605 end
2606
2607end
2608client.set_event_callback("paint", SilentHandler)
2609
2610-----------------------
2611--menu call
2612function set_visible()
2613 local tagenable = ui.get(nghthooktag_enabled)
2614
2615 -----------------------------SILENT REF
2616 local silentenable = ui.get(silentbuttonenable)
2617 local under = table_contains(ui.get(silentmulti), "Silent aim if in fov")
2618 local key = table_contains(ui.get(silentmulti), "Silent aim on key")
2619 local distance = table_contains(ui.get(silentmulti), "Silent aim in distance")
2620 -----------------------------AUTOWALL REF
2621 local autowallenable = ui.get(autowallbutton)
2622 local transparent = table_contains(ui.get(auto_autowall), "Transparent props")
2623 local reticle = table_contains(ui.get(auto_autowall), "Penetration reticle")
2624 local dynamic = table_contains(ui.get(auto_autowall), "Dynamic autowall FOV")
2625 local shotme = table_contains(ui.get(auto_autowall), "Autowall if shot me")
2626 local edge = table_contains(ui.get(auto_autowall), "Edge autowall")
2627 local dmg = table_contains(ui.get(auto_autowall), "Min dmg override")
2628 local autowallplayer = table_contains(ui.get(auto_autowall), "Autowall specific players")
2629 local edgeawtype = ui.get(edgeautowalltype)
2630 local wasvisible = table_contains(ui.get(auto_autowall), "Autowall if was visible")
2631 -----------------------------INDICATORS REF
2632 local indicate = ui.get(indicate_enable)
2633 local indicateselet = ui.get(indicate_on)
2634 -----------------------------TRIGGERMAG REF
2635 local triggerenable = ui.get(tm_cb)
2636 local triggerselect = ui.get(typeselect)
2637 -----------------------------DYNAMIC FOV REF
2638 local fovenable = ui.get(dynamicfov_enable)
2639 local fovselect = ui.get(dynamicfov_select)
2640 local weaponselect = ui.get(dynamicfov_weapons)
2641 -----------------------------RESOLVER REF
2642 local resolverenable = ui.get(overridebutton)
2643 local solverselect = ui.get(resolverselect)
2644 -----------------------------FAKELAG REF
2645 local flenable = ui.get(flcheckbox)
2646 local legitfl = table_contains(ui.get(flmulti), "Fakelag presets")
2647 local flwmenable = table_contains(ui.get(flmulti), "Custom fake lag while moving")
2648 local flenabler = ui.get(enablecfl)
2649 local flcomb = ui.get(enablecflcombo)
2650 local legitflm = ui.get(legitflmode)
2651 -----------------------------FLAGS REF
2652 local flagenable = ui.get(flag_enable)
2653 -----------------------------KILLSAY REF
2654 local killenable = ui.get(talkshitenable)
2655 local killtype = ui.get(talkshittype)
2656 ----------------------------------------------------------------------
2657 ----------------------------------------------------------------------
2658 ----------------------------------------------------------------------SILENT AIM
2659 ----------------------------------------------------------------------
2660 ----------------------------------------------------------------------
2661 ui.set_visible(silentmulti, silentenable)
2662 ui.set_visible(silentfovslider, silentenable and under)
2663 ui.set_visible(silentkey, silentenable and key)
2664 ui.set_visible(silentdistance, silentenable and distance)
2665 ui.set_visible(distancecircle, silentenable and distance)
2666 ----------------------------------------------------------------------AUTOWALL
2667 ui.set_visible(auto_autowall, autowallenable)
2668 ui.set_visible(autowalltoggle, autowallenable)
2669 ui.set_visible(slider_trans, autowallenable and transparent)
2670 ui.set_visible(dynamicfov_minaw, autowallenable and dynamic)
2671 ui.set_visible(dynamicfov_maxaw, autowallenable and dynamic)
2672 ui.set_visible(dynamicfov_auto_factoraw, autowallenable and dynamic)
2673 ui.set_visible(autodely, autowallenable and shotme)
2674 ui.set_visible(beforedelay, autowallenable and shotme)
2675 ui.set_visible(autowalldmg, autowallenable and dmg)
2676 ui.set_visible(legit_pen_threshold_ref, autowallenable and edge)
2677 ui.set_visible(edgeautowalltype, autowallenable and edge)
2678 ui.set_visible(edgeautowallbutton, autowallenable and edge and edgeawtype == "Selected players")
2679 ui.set_visible(autowallplayerbutton, autowallenable and autowallplayer)
2680 ui.set_visible(_autowall_mode_auto_trigger_delay, autowallenable and wasvisible)
2681 ----------------------------------------------------------------------INDICATORS
2682 ui.set_visible(indicate_on, indicate)
2683 ui.set_visible(indicate_select, indicate)
2684 ui.set_visible(indicate_color, indicate)
2685 ui.set_visible(dynamicfov_minaw, autowallenable and dynamic)
2686 ui.set_visible(dynamicfov_maxaw, autowallenable and dynamic)
2687 ui.set_visible(dynamicfov_auto_factoraw, autowallenable and dynamic)
2688 ui.set_visible(autodely, autowallenable and shotme)
2689 ui.set_visible(autowalldmg, autowallenable and dmg)
2690 ui.set_visible(indicateposition, indicateselet == "Default" and indicate)
2691 ----------------------------------------------------------------------TRIGGERMAG
2692 ui.set_visible(typeselect, triggerenable)
2693 ui.set_visible(triggermagnet, triggerenable)
2694 ui.set_visible(triggerdmg, triggerenable and triggerselect == "Advanced")
2695 ui.set_visible(triggerhtc, triggerenable and triggerselect == "Advanced")
2696 ----------------------------------------------------------------------DYNAMIC FOV
2697 ui.set_visible(dynamicfov_select, fovenable)
2698 ui.set_visible(dynamicfov_min, fovenable and fovselect == "Default")
2699 ui.set_visible(dynamicfov_max, fovenable and fovselect == "Default")
2700 ui.set_visible(dynamicfov_auto_factor, fovenable)
2701 ui.set_visible(dynamicfov_weapons, fovenable and fovselect == "Adaptive weapon dynamic FOV")
2702 ui.set_visible(dynamicfov_minpistol, fovenable and fovselect == "Adaptive weapon dynamic FOV" and weaponselect == "Pistols")
2703 ui.set_visible(dynamicfov_maxpistol, fovenable and fovselect == "Adaptive weapon dynamic FOV" and weaponselect == "Pistols")
2704 ui.set_visible(dynamicfov_minrifle, fovenable and fovselect == "Adaptive weapon dynamic FOV" and weaponselect == "Rifles")
2705 ui.set_visible(dynamicfov_maxrifle, fovenable and fovselect == "Adaptive weapon dynamic FOV" and weaponselect == "Rifles")
2706 ui.set_visible(dynamicfov_minscope, fovenable and fovselect == "Adaptive weapon dynamic FOV" and weaponselect == "Awp/scout/auto")
2707 ui.set_visible(dynamicfov_maxscope, fovenable and fovselect == "Adaptive weapon dynamic FOV" and weaponselect == "Awp/scout/auto")
2708 ui.set_visible(dynamicfov_minother, fovenable and fovselect == "Adaptive weapon dynamic FOV" and weaponselect == "Smg/other")
2709 ui.set_visible(dynamicfov_maxother, fovenable and fovselect == "Adaptive weapon dynamic FOV" and weaponselect == "Smg/other")
2710 ----------------------------------------------------------------------RESOLVER
2711 ui.set_visible(resolverselect, resolverenable)
2712 ui.set_visible(overridekey, resolverenable and solverselect == "Override")
2713 ui.set_visible(oppositeenable, resolverenable and solverselect == "Opposite resolver")
2714 ----------------------------------------------------------------------FLAGS
2715 ui.set_visible(flag_select, flagenable)
2716 ui.set_visible(flag_color, flagenable)
2717 ----------------------------------------------------------------------KILLSAY
2718 ui.set_visible(talkshittype, killenable)
2719 ui.set_visible(talkshittext, killenable and killtype == "Custom")
2720 ----------------------------------------------------------------------FAKELAG
2721 ui.set_visible(flmulti, flenable)
2722 ui.set_visible(legitflmode, legitfl and flenable)
2723 ui.set_visible(enablecfl, flenable and flwmenable)
2724 ui.set_visible(enablecflcombo, flenabler and flenable and flwmenable)
2725 ui.set_visible(slowvariance, flenabler and flcomb == "Slow walk" and flenable and flwmenable)
2726 ui.set_visible(slowlimit, flenabler and flcomb == "Slow walk" and flenable and flwmenable)
2727 ui.set_visible(slowamount, flenabler and flcomb == "Slow walk" and flenable and flwmenable)
2728 ui.set_visible(movevariance, flenabler and flcomb == "Moving" and flenable and flwmenable)
2729 ui.set_visible(movelimit, flenabler and flcomb == "Moving" and flenable and flwmenable)
2730 ui.set_visible(moveamount, flenabler and flcomb == "Moving" and flenable and flwmenable)
2731 ui.set_visible(standvariance, flenabler and flcomb == "Standing" and flenable and flwmenable)
2732 ui.set_visible(standlimit, flenabler and flcomb == "Standing" and flenable and flwmenable)
2733 ui.set_visible(standamount, flenabler and flcomb == "Standing" and flenable and flwmenable)
2734 ui.set_visible(jumpvariance, flenabler and flcomb == "Jumping" and flenable and flwmenable)
2735 ui.set_visible(jumplimit, flenabler and flcomb == "Jumping" and flenable and flwmenable)
2736 ui.set_visible(jumpamount, flenabler and flcomb == "Jumping" and flenable and flwmenable)
2737
2738 if legitflm == "On peek" and flenable and legitfl then
2739 ui.set(fakelag_enable, true)
2740 ui.set(fakelag_key, "Always on")
2741 ui.set(triggerz, true)
2742 ui.set(triggers, "On enemy visible")
2743 elseif legitflm == "On peek & visibility" and flenable and legitfl then
2744 ui.set(fakelag_enable, true)
2745 ui.set(fakelag_key, "Always on")
2746 ui.set(triggerz, true)
2747 ui.set(triggers, {
2748 "On enemy visible",
2749 "While enemy visible"
2750 })
2751 elseif legitflm == "Always on" and flenable and legitfl then
2752 ui.set(fakelag_enable, true)
2753 ui.set(fakelag_key, "Always on")
2754 ui.set(triggerz, true)
2755 ui.set(triggers, {
2756 "On enemy visible",
2757 "While enemy visible",
2758 "While moving"
2759 })
2760 elseif legitflm == "While targeted" and flenable and legitfl then
2761 ui.set(fakelag_enable, false)
2762 ui.set(fakelag_key, "Always on")
2763 ui.set(triggerz, false)
2764 elseif not legitfl then
2765 ui.set(fakelag_enable, false)
2766 ui.set(fakelag_key, "On hotkey")
2767 ui.set(triggerz, false)
2768 elseif not flenable then
2769 ui.set(fakelag_enable, false)
2770 ui.set(fakelag_key, "On hotkey")
2771 ui.set(triggerz, false)
2772 end
2773
2774end
2775set_visible()
2776ui.set_callback(flcheckbox, set_visible)
2777ui.set_callback(flmulti, set_visible)
2778ui.set_callback(legitflmode, set_visible)
2779ui.set_callback(enablecflcombo, set_visible)
2780ui.set_callback(enablecfl, set_visible)
2781ui.set_callback(overridebutton, set_visible)
2782ui.set_callback(resolverselect, set_visible)
2783ui.set_callback(dynamicfov_enable, set_visible)
2784ui.set_callback(dynamicfov_select, set_visible)
2785ui.set_callback(dynamicfov_weapons, set_visible)
2786ui.set_callback(tm_cb, set_visible)
2787ui.set_callback(typeselect, set_visible)
2788ui.set_callback(indicate_enable, set_visible)
2789ui.set_callback(indicate_on, set_visible)
2790ui.set_callback(auto_autowall, set_visible)
2791ui.set_callback(autowallbutton, set_visible)
2792ui.set_callback(silentbuttonenable, set_visible)
2793ui.set_callback(silentmulti, set_visible)
2794ui.set_callback(flag_enable, set_visible)
2795ui.set_callback(talkshitenable, set_visible)
2796ui.set_callback(talkshittype, set_visible)
2797ui.set_callback(edgeautowalltype, set_visible)
2798ui.set_callback(nghthooktag_enabled, set_visible)
2799
2800--override key
2801local canManual
2802local target
2803local targetx
2804local targety
2805local targetz
2806local screenposx
2807local screenposy
2808
2809function reset_target(r)
2810 --not working for some reason, useless atm
2811 if ui.get(overridebutton, true) and ui.get(resolverselect) == "Override" then
2812 else
2813 return
2814 end
2815 client.log(r)
2816 ui.set(selectedplayer, r)
2817 ui.set(forcebody, false)
2818 ui.set(forcebodyyaw, 0)
2819 ui.set(applyall, true)
2820
2821end
2822function setbodyyaw()
2823 if ui.get(overridebutton, true) and ui.get(resolverselect) == "Override" then
2824 else
2825 return
2826 end
2827 --client.delay_call(3, reset_target(selectedplayer))
2828 --client.delay_call(5, reset_all) works?
2829
2830 if ui.get(forcebodyyaw) == 0 and canManual == true then
2831 ui.set(forcebody, true)
2832 ui.set(forcebodyyaw, 60)
2833 ui.set(applyall, true)
2834 canManual = false
2835 end
2836
2837 if ui.get(forcebodyyaw) == 60 and canManual == true then
2838 ui.set(forcebody, true)
2839 ui.set(forcebodyyaw, -60)
2840 ui.set(applyall, true)
2841 canManual = false
2842 end
2843
2844 if ui.get(forcebodyyaw) == -60 and canManual == true then
2845 ui.set(forcebody, false)
2846 ui.set(forcebodyyaw, 0)
2847 ui.set(applyall, true)
2848 canManual = false
2849 end
2850
2851
2852end
2853function on_paint()
2854 if ui.get(overridebutton, true) and ui.get(resolverselect) == "Override" then
2855 else
2856 return
2857 end
2858 if ui.get(overridekey) then
2859
2860 if canManual == true then
2861
2862 setbodyyaw()
2863 canManual = false
2864
2865 end
2866
2867
2868 else
2869
2870 canManual = true
2871
2872 end
2873
2874end
2875
2876client.set_event_callback("paint", on_paint)
2877
2878--bruteforce indicator/resolver indicator
2879aacorrect = ui.reference("RAGE", "OTHER", "Anti-aim correction")
2880playerlistplayers = ui.reference("PLAYERS", "Players", "Player list")
2881bruteforce_ents = { }
2882
2883client.set_event_callback("run_command", function(c)
2884 local overrideselect = table_contains(ui.get(flag_select), "Override")
2885 if ui.get(overridebutton, true) and ui.get(resolverselect) == "Override" and ui.get(flag_enable, true) and overrideselect then
2886 else
2887 return
2888 end
2889 if not ui.is_menu_open() then
2890 bruteforce_ents = { }
2891 client.update_player_list()
2892 for _, v in pairs(entity.get_players(true)) do
2893 if ui.get(forcebodyyaw) == -60 or ui.get(forcebodyyaw) == 60 then
2894 table.insert(bruteforce_ents, v)
2895 entity.set_prop(v, "m_flDetectedByEnemySensorTime")
2896 else
2897 entity.set_prop(v, "m_flDetectedByEnemySensorTime", 0)
2898 end
2899 end
2900 end
2901end)
2902
2903client.set_event_callback("paint", function()
2904 local overrideselect = table_contains(ui.get(flag_select), "Override")
2905 if ui.get(overridebutton, true) and ui.get(resolverselect) == "Override" and ui.get(flag_enable, true) and overrideselect then
2906 else
2907 return
2908 end
2909 local r, g, b, a = ui.get(flag_color)
2910 for _, v in pairs(bruteforce_ents) do
2911 local bounding_box = { entity.get_bounding_box(v) }
2912 if #bounding_box == 5 and bounding_box[5] ~= 0 then
2913 local center = bounding_box[1] + (bounding_box[3] - bounding_box[1]) / 2
2914 if ui.get(forcebodyyaw) == 60 then
2915 renderer.text(center, bounding_box[2] - 18, r, g, b, a * bounding_box[5], "bc", 0, "RIGHT")
2916 elseif ui.get(forcebodyyaw) == -60 then
2917 renderer.text(center, bounding_box[2] - 18, r, g, b, a * bounding_box[5], "bc", 0, "LEFT")
2918 end
2919 end
2920 end
2921end)
2922
2923--legitaa resolverenable
2924selectedplayer = ui.reference("players", "players", "player list")
2925forcebody, forcebodyyaw = ui.reference("players", "adjustments", "force body yaw")
2926resetlist = ui.reference("players", "players", "reset all")
2927
2928player_list = ui.reference("PLAYERS", "Players", "Player list")
2929force_body, body_slider = ui.reference("PLAYERS", "Adjustments", "Force body yaw")
2930saved_enable = { }
2931
2932ui.set_callback(player_list, function()
2933 ui.set(oppositeenable, saved_enable[ui.get(player_list)] or false)
2934end)
2935
2936ui.set_callback(oppositeenable, function()
2937 local plist = ui.get(player_list)
2938 if plist then
2939 saved_enable[plist] = ui.get(oppositeenable)
2940 end
2941end)
2942
2943function normalize(angle)
2944 while angle > 180 do
2945 angle = angle - 360
2946 end
2947 while angle < -180 do
2948 angle = angle + 360
2949 end
2950
2951 return angle
2952end
2953
2954client.set_event_callback("run_command", function()
2955 if ui.get(overridebutton, true) and ui.get(resolverselect) == "Opposite resolver" then
2956 else
2957 return
2958 end
2959 if not ui.is_menu_open() then
2960 client.update_player_list()
2961 for k, v in pairs(saved_enable) do
2962 if entity.is_enemy(k) then
2963 ui.set(player_list, k)
2964 if v then
2965 local velocity = { entity.get_prop(k, "m_vecVelocity") }
2966 if 1 > math.abs(math.sqrt(velocity[1] ^ 2 + velocity[2] ^ 2)) then
2967 ui.set(force_body, true)
2968 ui.set(body_slider, -math.min(60, math.max(-60, normalize(entity.get_prop(k, "m_angEyeAngles[1]") - entity.get_prop(k, "m_flLowerBodyYawTarget")))))
2969 end
2970 else
2971 ui.set(force_body, false)
2972 ui.set(body_slider, 0)
2973 end
2974 end
2975 end
2976 end
2977end)
2978
2979client.set_event_callback("player_connect_full", function(c)
2980 if client.userid_to_entindex(c) == entity.get_local_player() then
2981 saved_enable = { }
2982 end
2983end)
2984
2985function getNearestEnemy()
2986 if not ui.is_menu_open() then
2987 else
2988 return
2989 end
2990 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
2991 else
2992 return
2993 end
2994 local enemy_players = entity.get_players(true)
2995 if #enemy_players ~= 0 then
2996 local own_x, own_y, own_z = client.eye_position()
2997 local own_pitch, own_yaw = client.camera_angles()
2998 local closest_enemy = nil
2999 local closest_distance = 999999999
3000
3001 for i = 1, #enemy_players do
3002 local enemy = enemy_players[i]
3003 local enemy_x, enemy_y, enemy_z = entity.hitbox_position(enemy, 0)
3004
3005 local x = enemy_x - own_x
3006 local y = enemy_y - own_y
3007 local z = enemy_z - own_z
3008
3009 local yaw = ((math.atan2(y, x) * 180 / math.pi))
3010 local pitch = -(math.atan2(z, math.sqrt(math.pow(x, 2) + math.pow(y, 2))) * 180 / math.pi)
3011
3012 local yaw_dif = math.abs(own_yaw % 360 - yaw % 360) % 360
3013 local pitch_dif = math.abs(own_pitch - pitch) % 360
3014
3015 if yaw_dif > 180 then
3016 yaw_dif = 360 - yaw_dif
3017 end
3018 local real_dif = math.sqrt(math.pow(yaw_dif, 2) + math.pow(pitch_dif, 2))
3019
3020 if closest_distance > real_dif then
3021 closest_distance = real_dif
3022 closest_enemy = enemy
3023 end
3024 end
3025
3026 if closest_enemy ~= nil then
3027 return closest_enemy, closest_distance
3028 end
3029 end
3030
3031 return nil, nil
3032end
3033
3034function setplist()
3035 local autowallplayer = table_contains(ui.get(auto_autowall), "Autowall specific players")
3036 local edgeautowall = table_contains(ui.get(auto_autowall), "Edge autowall")
3037 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
3038 else
3039 return
3040 end
3041 -- Get the aimbots maximum fov so we can determine if a player is within that range
3042 local maximum_fov = ui.get(maximum_fov_ref)
3043 local local_player = entity_get_local_player()
3044
3045 -- Get the local players origin, pitch, and yaw so that we can calculate our FOV to enemies
3046 local pitch, yaw = client_camera_angles()
3047 local lx, ly, lz = entity_get_prop(local_player, "m_vecOrigin")
3048
3049 -- Get the nearest player to our crosshair, and the fov to that player so we can determine if they are in the aimbots range
3050 local nearest_player, nearest_player_fov = get_closest_player_to_crosshair(lx, ly, lz, pitch, yaw)
3051
3052 -- Get our view offset and add it to our origin so that we can trace from our eye position
3053 local view_offset = entity_get_prop(local_player, "m_vecViewOffset[2]")
3054 local lz = lz + view_offset
3055
3056 if nearest_player_fov <= 170 then
3057 ui.set(selectedplayer, getNearestEnemy())
3058 return
3059 end
3060end
3061
3062client.set_event_callback("paint", setplist)
3063
3064function setaa()
3065 if ui.get(overridebutton, true) and ui.get(resolverselect) == "Opposite resolver" then
3066 else
3067 return
3068 end
3069 if ui.get(oppositeenable, true) then
3070 ui.set(aacorrect, false)
3071 else
3072 ui.set(aacorrect, true)
3073 end
3074end
3075
3076client.set_event_callback("paint", setaa)
3077
3078ui.set_visible(adaptive_options2, false)
3079ui.set_visible(adaptive_config2, false)
3080
3081
3082--fakelag triggers
3083
3084client.set_event_callback("setup_command", function(cms)
3085 if ui.get(flcheckbox, true) then
3086 else
3087 return
3088 end
3089 local flwmenable = table_contains(ui.get(flmulti), "Custom fake lag while moving")
3090 if flwmenable and ui.get(enablecfl, true) and ui.get(flcheckbox, true) then
3091 else
3092 return
3093 end
3094 ui.set(variance, cms.sidemove == 0 and cms.forwardmove == 0 and ui.get(standvariance) or ui.get(movevariance))
3095 ui.set(fakelag_limit, cms.sidemove == 0 and cms.forwardmove == 0 and ui.get(standlimit) or ui.get(movelimit))
3096 ui.set(amount, cms.sidemove == 0 and cms.forwardmove == 0 and ui.get(standamount) or ui.get(moveamount))
3097end)
3098local function get_velocity(ent)
3099 local flwmenable = table_contains(ui.get(flmulti), "Custom fake lag while moving")
3100 if ui.get(flcheckbox, true) and flwmenable then
3101 else
3102 return
3103 end
3104
3105 local vecVelx, vecVely, vecVelz = entity.get_prop(ent, "m_vecVelocity")
3106
3107 if vecVelx == nil and vecVely == nil and vecVelz == nil then
3108 return 0
3109 end
3110
3111 return math.sqrt(vecVelx * vecVelx + vecVely * vecVely + vecVelz * vecVelz);
3112end
3113
3114local function eventhandler_paint(ctx)
3115 local flwmenable = table_contains(ui.get(flmulti), "Custom fake lag while moving")
3116 local localplayer = entity.get_local_player()
3117 if flwmenable and ui.get(enablecfl, true) and ui.get(flcheckbox, true) and not localplayer == nil then
3118 else
3119 return
3120 end
3121 local flags = get_prop(localplayer, "m_fFlags");
3122 local onground = bit.band(flags, 1);
3123 if onground == 0 then
3124 ui.set(variance, ui.get(jumpvariance))
3125 ui.set(fakelag_limit, ui.get(jumplimit))
3126 ui.set(amount, ui.get(jumpamount))
3127 end
3128end
3129
3130client.set_event_callback("paint", eventhandler_paint)
3131
3132--custom aa while moving
3133
3134function aaslowwalk_menu()
3135 if ui.get(enableaawm, true) and ui.get(hotkey_reference) then
3136 else
3137 return
3138 end
3139 ui.set(LegitAABreaker, ui.get(slowmode))
3140end
3141client.set_event_callback("paint", aaslowwalk_menu)
3142client.set_event_callback("setup_command", function(cme)
3143 if ui.get(hotkey_reference) or ui.get(ref_fakeduck) then
3144 return
3145 end
3146 if ui.get(enableaawm, true) then
3147 ui.set(LegitAABreaker, cme.sidemove == 0 and cme.forwardmove == 0 and ui.get(standmode) or ui.get(movemode))
3148 end
3149end)
3150
3151--killsay
3152
3153userid_to_entindex = client.userid_to_entindex
3154get_player_name = entity.get_player_name
3155get_local_player = entity.get_local_player
3156is_enemy = entity.is_enemy
3157
3158function on_player_death(e)
3159 if ui.get(talkshitenable, true) then
3160 else
3161 return
3162 end
3163 local random = client_random_int(1, 4)
3164 local victim_userid, attacker_userid = e.userid, e.attacker
3165 if victim_userid == nil or attacker_userid == nil then
3166 return
3167 end
3168
3169 local victim_entindex = userid_to_entindex(victim_userid)
3170 local attacker_entindex = userid_to_entindex(attacker_userid)
3171
3172 if attacker_entindex == get_local_player() and is_enemy(victim_entindex) then
3173 else
3174 return
3175 end
3176
3177 if random == 1 and ui.get(talkshittype) == "Basic kill says" then
3178 client.exec("say cya retard")
3179 elseif random == 2 and ui.get(talkshittype) == "Basic kill says" then
3180 client.exec("say hhh")
3181 elseif random == 3 and ui.get(talkshittype) == "Basic kill says" then
3182 client.exec("say refund ur trash")
3183 elseif random == 4 and ui.get(talkshittype) == "Basic kill says" then
3184 client.exec("say owned dog")
3185 end
3186 if ui.get(talkshittype) == "Custom" then
3187 client.exec("say ", ui.get(talkshittext))
3188 end
3189end
3190
3191client.set_event_callback('player_death', on_player_death)
3192
3193function thirdp()
3194 if ui.get(forcethirdpkey) then
3195 ui.set(thirdpersondead, true)
3196 else
3197 ui.set(thirdpersondead, false)
3198 end
3199end
3200
3201client.set_event_callback('paint', thirdp)
3202
3203client.set_event_callback("round_start", function()
3204 autowallvar1 = false
3205 autowallvar2 = false
3206 autowallvar3 = false
3207 autowallvar4 = false
3208 autowallvar5 = false
3209 autowallvar6 = false
3210 ui.set(body_slider, 0)
3211 ui.set(forcebody1, false)
3212 ui.set(applyall, true)
3213 silentvar1 = false
3214 silentvar2 = false
3215 silentvar3 = false
3216 silentvar4 = false
3217 silentvar5 = false
3218end)
3219
3220client.set_event_callback("player_death", function(e)
3221 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
3222 client.exec("say missclick")
3223 end
3224end)