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