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