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