--[[ Obsidian.lua - Enhanced Defensive Systems with Obsidian Visuals & Tick Detection by Original Author + ASUSGOD Enhancements ft.riseabove,cynicism,king1,cathode,Obsidian ]] ---------------------------------------------------------------require local function try_require(module) local ok, result = pcall(require, module) return ok and result or nil end local entity = require "gamesense/entity" local antiaim_funcs = require 'gamesense/antiaim_funcs' local vector = require "vector" local ffi = require "ffi" local clipboard = require("gamesense/clipboard") local base64 = require("gamesense/base64") local http = require("gamesense/http") local images = try_require("gamesense/images") local weapons_funcs = require "gamesense/csgo_weapons" ---------------------------------------------------------------Element local bit_band, bit_lshift, client_color_log, client_create_interface, client_delay_call, client_find_signature, client_key_state, client_reload_active_scripts, client_screen_size, client_set_event_callback, client_system_time, client_timestamp, client_unset_event_callback, database_read, database_write, entity_get_classname, entity_get_local_player, entity_get_origin, entity_get_player_name, entity_get_prop, entity_get_steam64, entity_is_alive, globals_framecount, globals_realtime, math_ceil, math_floor, math_max, math_min, panorama_loadstring, renderer_gradient, renderer_line, renderer_rectangle, table_concat, table_insert, table_remove, table_sort, ui_get, ui_is_menu_open, ui_mouse_position, ui_menu_position, ui_menu_size, ui_new_checkbox, ui_new_color_picker, ui_new_combobox, ui_new_slider, ui_set, ui_set_visible, setmetatable, pairs, error, globals_absoluteframetime, globals_curtime, globals_frametime, globals_maxplayers, globals_tickcount, globals_tickinterval, math_abs, type, pcall, renderer_circle_outline, renderer_load_rgba, renderer_measure_text, renderer_text, renderer_texture, tostring, ui_name, ui_new_button, ui_new_hotkey, ui_new_label, ui_new_listbox, ui_new_textbox, ui_reference, ui_set_callback, ui_update, unpack, tonumber = bit.band, bit.lshift, client.color_log, client.create_interface, client.delay_call, client.find_signature, client.key_state, client.reload_active_scripts, client.screen_size, client.set_event_callback, client.system_time, client.timestamp, client.unset_event_callback, database.read, database.write, entity.get_classname, entity.get_local_player, entity.get_origin, entity.get_player_name, entity.get_prop, entity.get_steam64, entity.is_alive, globals.framecount, globals.realtime, math.ceil, math.floor, math.max, math.min, panorama.loadstring, renderer.gradient, renderer.line, renderer.rectangle, table.concat, table.insert, table.remove, table.sort, ui.get, ui.is_menu_open, ui.mouse_position, ui.menu_position, ui.menu_size, ui.new_checkbox, ui.new_color_picker, ui.new_combobox, ui.new_slider, ui.set, ui.set_visible, setmetatable, pairs, error, globals.absoluteframetime, globals.curtime, globals.frametime, globals.maxplayers, globals.tickcount, globals.tickinterval, math.abs, type, pcall, renderer.circle_outline, renderer.load_rgba, renderer.measure_text, renderer.text, renderer.texture, tostring, ui.name, ui.new_button, ui.new_hotkey, ui.new_label, ui.new_listbox, ui.new_textbox, ui.reference, ui.set_callback, ui.update, unpack, tonumber local entity_get_local_player, entity_is_enemy, entity_get_all, entity_set_prop, entity_is_alive, entity_is_dormant, entity_get_player_name, entity_get_game_rules, entity_hitbox_position, entity_get_players, entity_get_prop, entity_get_player_weapon = entity.get_local_player, entity.is_enemy, entity.get_all, entity.set_prop, entity.is_alive, entity.is_dormant, entity.get_player_name, entity.get_game_rules, entity.hitbox_position, entity.get_players, entity.get_prop, entity.get_player_weapon local math_cos, math_sin, math_rad, math_sqrt, math_floor, math_atan2 = math.cos, math.sin, math.rad, math.sqrt, math.floor, math.atan2 local ui_new_multiselect, renderer_circle = ui.new_multiselect, renderer.circle local ffi_cdef, ffi_cast, ffi_new = ffi.cdef, ffi.cast, ffi.new local bit_band, bit_bor = bit.band, bit.bor ---------------------------------------------------------------颜色定义 local ui_colors = { primary = { 108, 92, 231 }, -- 紫色 secondary = { 255, 107, 129 }, -- 粉色 accent = { 139, 233, 253 }, -- 青色 success = { 80, 250, 123 }, -- 绿色 warning = { 255, 184, 108 }, -- 橙色 danger = { 255, 85, 85 }, -- 红色 dark = { 30, 30, 46 }, -- 深色背景 darker = { 18, 18, 28 }, -- 更深背景 light = { 248, 248, 242 }, -- 亮色文字 gray = { 98, 114, 164, 100 }, -- 半透明灰 blue = "\aA9B7FFFF", bright = "\aE3E9FFFF", grey = "\aFFFFFF8D", default = "\aD5D5D5FF", bright_red = "\aFF9A9AFF", white = "\aFFFFFFFF", new_blue = "\aBABAF9F7" } ---------------------------------------------------------------动画系统 local anim = { data = {}, lerp = function(start, target, speed) local factor = math.min(speed * (globals.frametime() or 0.015) * 60, 1) return start + (target - start) * factor end, exp_lerp = function(start, target, speed) local factor = 1 - math.exp(-speed * (globals.frametime() or 0.015) * 60) return start + (target - start) * factor end, get = function(name, default) if anim.data[name] == nil then anim.data[name] = default or 0 end return anim.data[name] end, update = function(name, target, speed, use_exp) local current = anim.get(name) local new = use_exp and anim.exp_lerp(current, target, speed) or anim.lerp(current, target, speed) anim.data[name] = new return new end } ---------------------------------------------------------------工具函数 local function rgba_to_hex(r, g, b, a) return string.format('%02x%02x%02x%02x', math.floor(r or 0), math.floor(g or 0), math.floor(b or 0), math.floor(a or 255)) end local function contains(tbl, val) for i = 1, #tbl do if tbl[i] == val then return true end end return false end local function clamp(val, lo, hi) return math.max(lo, math.min(hi, val)) end local function lerp(a, b, t) return a + (b - a) * t end local function normalize_yaw(x) if x == nil then return 0 end x = (x % 360 + 360) % 360 return x > 180 and x - 360 or x end local function get_velocity(player) local x, y, z = entity_get_prop(player, "m_vecVelocity") if x == nil then return 0 end return math.sqrt(x * x + y * y + z * z) end local function get_velocity_2d(player) local x, y = entity_get_prop(player, "m_vecVelocity") if x == nil then return 0 end return math.sqrt(x * x + y * y) end local function is_on_ground(ent) return bit_band(entity_get_prop(ent, "m_fFlags") or 0, 1) == 1 end local function is_in_air(ent) return bit_band(entity_get_prop(ent, "m_fFlags") or 0, 1) == 0 end local function is_crouching(ent) return (entity_get_prop(ent, "m_flDuckAmount") or 0) > 0.55 end local function is_visible(ent) local me = entity_get_local_player() if not me then return false end local lx, ly, lz = entity_hitbox_position(me, 0) local ex, ey, ez = entity_hitbox_position(ent, 0) if not lx or not ex then return false end local frac = client.trace_line(me, lx, ly, lz, ex, ey, ez) return frac > 0.75 end local function get_table_length(data) if type(data) ~= 'table' then return 0 end local count = 0 for _ in pairs(data) do count = count + 1 end return count end local function animate_text(time, str, r1, g1, b1, a1, r2, g2, b2, a2) local out = {} local r_d, g_d, b_d, a_d = r2 - r1, g2 - g1, b2 - b1, a2 - a1 for i = 1, #str do local iter = (i - 1) / (#str - 1) + time local c = math.abs(math.cos(iter)) out[#out + 1] = "\\a" .. rgba_to_hex(r1 + r_d * c, g1 + g_d * c, b1 + b_d * c, a1 + a_d * c) out[#out + 1] = str:sub(i, i) end return table.concat(out) end local function time_to_ticks(t) return math.floor(0.5 + t / globals_tickinterval()) end local function angle_to_forward(pitch, yaw) local sy = math_sin(math_rad(yaw)) local cy = math_cos(math_rad(yaw)) local sp = math_sin(math_rad(pitch)) local cp = math_cos(math_rad(pitch)) return cp * cy, cp * sy, -sp end ---------------------------------------------------------------Obsidian视觉函数 local function draw_ring(x, y, r, g, b, a, radius, start_deg, pct, thickness) if renderer_circle_outline == nil then return end pcall(renderer_circle_outline, x, y, r, g, b, a, radius, start_deg or 0, pct or 1, thickness or 1) end local function draw_round_rect(x, y, w, h, r, g, b, a, radius) radius = clamp(math.floor(radius or 0), 0, math.floor(math.min(w, h) * 0.5)) if radius <= 0 then renderer_rectangle(x, y, w, h, r, g, b, a) return end renderer_rectangle(x + radius, y, w - radius - radius, h, r, g, b, a) renderer_rectangle(x, y + radius, radius, h - radius - radius, r, g, b, a) renderer_rectangle(x + w - radius, y + radius, radius, h - radius - radius, r, g, b, a) renderer_circle(x + radius, y + radius, r, g, b, a, radius, 180, 0.25) renderer_circle(x + w - radius, y + radius, r, g, b, a, radius, 90, 0.25) renderer_circle(x + radius, y + h - radius, r, g, b, a, radius, 270, 0.25) renderer_circle(x + w - radius, y + h - radius, r, g, b, a, radius, 0, 0.25) end local function draw_glass_panel(x, y, w, h, ar, ag, ab, aa, compact) local bg_a = math.floor((compact and 128 or 146) * aa) local fill_a = math.floor((compact and 58 or 72) * aa) local shine_a = math.floor((compact and 14 or 20) * aa) local line_a = math.floor((compact and 72 or 100) * aa) local edge_a = math.floor((compact and 46 or 58) * aa) local radius = compact and 5 or 7 if renderer.blur then pcall(renderer.blur, x - 2, y - 2, w + 4, h + 4, math.floor((compact and 128 or 156) * aa), compact and 4 or 6) end draw_round_rect(x, y, w, h, 8, 11, 18, bg_a, radius) draw_round_rect(x + 1, y + 1, w - 2, h - 2, 13, 16, 25, fill_a, math.max(0, radius - 1)) renderer_gradient(x, y, w, h, ar, ag, ab, shine_a, 16, 20, 30, 0, false) renderer_gradient(x + 1, y + 1, w - 2, math.max(6, math.floor(h * 0.5)), 255, 255, 255, math.floor(18 * aa), 255, 255, 255, 0, false) draw_round_rect(x, y, w, 2, ar, ag, ab, line_a, radius) draw_round_rect(x, y + h - 1, w, 1, ar, ag, ab, edge_a, radius) renderer_gradient(x + 8, y + h - 2, math.max(1, w - 16), 1, ar, ag, ab, 0, ar, ag, ab, math.floor(86 * aa), true) end local function draw_text_shadow(x, y, r, g, b, a, flags, width, text) renderer_text(x + 1, y + 1, 0, 0, 0, math.floor((a or 255) * 0.45), flags or "", width or 0, text) renderer_text(x, y, r, g, b, a, flags or "", width or 0, text) end local function get_hud_palette(ar, ag, ab, aa) local mul = aa or 1 return { text = { 242, 244, 248, math.floor(236 * mul) }, soft = { 212, 216, 224, math.floor(206 * mul) }, dim = { 171, 176, 187, math.floor(174 * mul) }, faint = { 124, 130, 142, math.floor(138 * mul) }, accent = { ar, ag, ab, math.floor(255 * mul) }, accent_soft = { math.min(255, math.floor(ar + (255 - ar) * 0.25)), math.min(255, math.floor(ag + (255 - ag) * 0.25)), math.min(255, math.floor(ab + (255 - ab) * 0.25)), math.floor(255 * mul) } } end local function draw_hud_header(x, y, w, title, ar, ag, ab, aa, compact, right_text) local pal = get_hud_palette(ar, ag, ab, aa) local header_h = compact and 18 or 20 local dot = compact and 6 or 7 local dot_y = y + math.floor(header_h * 0.5) - math.floor(dot * 0.5) draw_round_rect(x + 4, y + 4, w - 8, header_h, 15, 19, 28, math.floor(154 * aa), compact and 4 or 6) draw_round_rect(x + 9, dot_y, dot, dot, ar, ag, ab, pal.accent[4], math.floor(dot * 0.5)) draw_text_shadow(x + 20, y + (compact and 6 or 7), pal.text[1], pal.text[2], pal.text[3], pal.text[4], "", 0, title) if right_text ~= nil and right_text ~= "" then draw_text_shadow(x + w - 10, y + (compact and 6 or 7), pal.dim[1], pal.dim[2], pal.dim[3], pal.dim[4], "r", 0, right_text) end renderer_gradient(x + 10, y + header_h + 4, math.max(1, w - 20), 1, ar, ag, ab, math.floor(118 * aa), ar, ag, ab, 0, true) return header_h end local function draw_hud_row(x, y, w, h, label, value, ar, ag, ab, aa, compact, value_r, value_g, value_b, dot_a) local pal = get_hud_palette(ar, ag, ab, aa) local value_cr = value_r or ar local value_cg = value_g or ag local value_cb = value_b or ab local accent_a = dot_a or math.floor(214 * aa) draw_round_rect(x, y, w, h, 11, 14, 22, math.floor(140 * aa), compact and 4 or 5) draw_round_rect(x + 6, y + math.floor(h * 0.5) - 2, 4, 4, ar, ag, ab, accent_a, 2) draw_text_shadow(x + 14, y + (compact and 3 or 4), pal.text[1], pal.text[2], pal.text[3], pal.text[4], "", 0, label) if value ~= nil then draw_text_shadow(x + w - 10, y + (compact and 3 or 4), value_cr, value_cg, value_cb, math.floor(226 * aa), "r", 0, tostring(value)) end end local function measure_hud_badge(label, value, compact) local label_txt = tostring(label or "") local value_txt = tostring(value or "") local vw = renderer_measure_text("", value_txt) or 20 local lw = renderer_measure_text("", label_txt) or 30 local pad_x = compact and 8 or 10 local h = compact and 20 or 24 local w = math.max(compact and 86 or 98, lw + vw + pad_x * 3 + 6) return w, h end local function draw_hud_badge(x, y, label, value, ar, ag, ab, aa, compact) local pal = get_hud_palette(ar, ag, ab, aa) local label_txt = tostring(label or "") local value_txt = tostring(value or "") local _, lh = renderer_measure_text("", label_txt) lh = lh or 12 local pad_x = compact and 8 or 10 local w, h = measure_hud_badge(label_txt, value_txt, compact) draw_glass_panel(x, y, w, h, ar, ag, ab, aa, compact) draw_round_rect(x + 6, y + math.floor(h * 0.5) - 2, 4, 4, ar, ag, ab, math.floor(210 * aa), 2) draw_text_shadow(x + pad_x + 6, y + h * 0.5 - lh * 0.5 - 1, pal.dim[1], pal.dim[2], pal.dim[3], math.floor(180 * aa), "", 0, label_txt) draw_text_shadow(x + w - pad_x, y + h * 0.5 - lh * 0.5 - 1, pal.text[1], pal.text[2], pal.text[3], math.floor(245 * aa), "r", 0, value_txt) return w, h end ---------------------------------------------------------------References local references = { aa_enabled = ui_reference("AA", "Anti-aimbot angles", "Enabled"), body_freestanding = ui_reference("AA", "Anti-aimbot angles", "Freestanding body yaw"), pitch = { ui_reference("AA", "Anti-aimbot angles", "Pitch") }, yaw = { ui_reference("AA", "Anti-aimbot angles", "Yaw") }, body_yaw = { ui_reference("AA", "Anti-aimbot angles", "Body yaw") }, yaw_base = ui_reference("AA", "Anti-aimbot angles", "Yaw base"), jitter = { ui_reference("AA", "Anti-aimbot angles", "Yaw jitter") }, edge_yaw = ui_reference("AA", "Anti-aimbot angles", "Edge yaw"), freestanding = { ui_reference("AA", "Anti-aimbot angles", "Freestanding") }, fake_lag = ui_reference("AA", "Fake lag", "Amount"), fake_lag_limit = ui_reference("AA", "Fake lag", "Limit"), fakeduck = ui_reference("RAGE", "Other", "Duck peek assist"), legmovement = ui_reference("AA", "Other", "Leg movement"), slow_walk = { ui_reference("AA", "Other", "Slow motion") }, roll = ui_reference("AA", "Anti-aimbot angles", "Roll"), aimbot = ui_reference("RAGE", "Aimbot", "Enabled"), doubletap = { ui_reference("RAGE", "Aimbot", "Double Tap") }, dt_hit_chance = ui_reference("RAGE", "Aimbot", "Double tap hit chance"), onshot = { ui_reference("AA", "Other", "On shot anti-aim") }, mindmg = ui_reference("RAGE", "Aimbot", "Minimum damage"), fba_key = ui_reference("RAGE", "Aimbot", "Force body aim"), fl = { ui_reference("AA", "Fake lag", "Enabled") }, fsp_key = ui_reference("RAGE", "Aimbot", "Force safe point"), ap = ui_reference("RAGE", "Other", "Delay shot"), sw = ui_reference("AA", "Other", "Slow motion"), slowmotion_key = ui_reference("AA", "Other", "Slow motion"), quick_peek = { ui_reference("Rage", "Other", "Quick peek assist") }, flags = ui_reference("Visuals", "Player ESP", "Flags"), min_dmg = ui_reference("RAGE", "Aimbot", "Minimum damage"), min_dmg_override = { ui_reference("Rage", "Aimbot", "Minimum damage override") }, third = ui_reference("Visuals", "Effects", "Force Third Person (alive)"), untrust = ui_reference("MISC", "Settings", "Anti-untrusted"), sv_maxusrcmdprocessticks = ui_reference("MISC", "Settings", "sv_maxusrcmdprocessticks2"), auto_grenade_enable = ui_reference("MISC", "Miscellaneous", "Automatic grenade release"), auto_grenade_dmg = ui_reference("MISC", "Miscellaneous", "Minimum grenade damage"), dpi_scale = ui_reference("MISC", "Settings", "DPI scale"), -- Visuals references for scope override scope_overlay = ui_reference("VISUALS", "Effects", "Remove scope overlay"), override_zoom_fov = ui_reference("Misc", "Miscellaneous", "Override zoom FOV"), esp_preview = { name = { ui_reference("VISUALS", "Player ESP", "Name") }, box = { ui_reference("VISUALS", "Player ESP", "Bounding box") }, skeleton = { ui_reference("VISUALS", "Player ESP", "Skeleton") }, health = { ui_reference("VISUALS", "Player ESP", "Health bar") }, flags = { ui_reference("VISUALS", "Player ESP", "Flags") }, glow = { ui_reference("VISUALS", "Player ESP", "Glow") }, weapon_text = { ui_reference("VISUALS", "Player ESP", "Weapon text") }, weapon_icon = { ui_reference("VISUALS", "Player ESP", "Weapon icon") }, ammo = { ui_reference("VISUALS", "Player ESP", "Ammo") }, distance = { ui_reference("VISUALS", "Player ESP", "Distance") }, money = { ui_reference("VISUALS", "Player ESP", "Money") }, chams = { ui_reference("VISUALS", "Colored models", "Player") }, shadow = { ui_reference("VISUALS", "Colored models", "Shadow") }, chams_behind = { ui_reference("VISUALS", "Colored models", "Player behind wall") } } } local function vanila_skeet_element(state) ui_set_visible(references.pitch[1], state) ui_set_visible(references.pitch[2], state) ui_set_visible(references.yaw_base, state) ui_set_visible(references.yaw[1], state) ui_set_visible(references.yaw[2], state) ui_set_visible(references.jitter[1], state) ui_set_visible(references.jitter[2], state) ui_set_visible(references.body_yaw[1], state) ui_set_visible(references.body_yaw[2], state) ui_set_visible(references.body_freestanding, state) ui_set_visible(references.roll, state) ui_set_visible(references.freestanding[1], state) ui_set_visible(references.freestanding[2], state) ui_set_visible(references.edge_yaw, state) ui_set_visible(references.aa_enabled, state) end local HORUS_PREVIEW_MODEL_URLS = { "https://img.remit.ee/api/file/BQACAgUAAyEGAASHRsPbAAEDKZNo48LHEgsjg3SIJGQawpme7Uq0ZwACVxwAAlvxGVe-92Lm3fkP8jYE.png", "https://img.remit.ee/api/file/BQACAgUAAyEGAASHRsPbAAEDKZRo48LlP9zx52cnft_0PTWH-aAENwACWBwAAlvxGVfQjmFxwD_d1zYE.png", "https://img.remit.ee/api/file/BQACAgUAAyEGAASHRsPbAAEDKZVo48L0w5SusflaKF8e3VDOTym7jAACWRwAAlvxGVff8VbqJEYU3DYE.png", "https://img.remit.ee/api/file/BQACAgUAAyEGAASHRsPbAAEDKZVo48L0w5SusflaKF8e3VDOTym7jAACWRwAAlvxGVff8VbqJEYU3DYE.png", "https://img.remit.ee/api/file/BQACAgUAAyEGAASHRsPbAAEDKZZo48MEjfOO7kDlM3xN1heaUbWX8QACWhwAAlvxGVe9Gdee-2v4rDYE.png", "https://img.remit.ee/api/file/BQACAgUAAyEGAASHRsPbAAEDKZdo48MN9W9fiiJbXGWfQEug0iVgUAACWxwAAlvxGVfb47Os99e-gjYE.png", "https://img.remit.ee/api/file/BQACAgUAAyEGAASHRsPbAAEDKZho48MXarjqx-UzkKw0w9eAvVw81wACXBwAAlvxGVfMYga9_rzT6DYE.png", "https://img.remit.ee/api/file/BQACAgUAAyEGAASHRsPbAAEDKZlo48MiSaZLfM6e_Ubi1e37feiUdgACXRwAAlvxGVdi1vYbU6aqeDYE.png" } local function horus_preview_ref_active(ref) if not ref or ref[1] == nil then return false end local ok, active = pcall(ui_get, ref[1]) return ok and active or false end local function horus_preview_ref_value(ref, index, default) if not ref or ref[index] == nil then return default end local ok, value = pcall(ui_get, ref[index]) return ok and value or default end local function horus_preview_ref_color(ref, index, default_r, default_g, default_b, default_a) if not ref or ref[index] == nil then return default_r, default_g, default_b, default_a end local ok, r, g, b, a = pcall(ui_get, ref[index]) if not ok or r == nil then return default_r, default_g, default_b, default_a end return r, g, b, a end ---------------------------------------------------------------Menu设计 - 整合Obsidian视觉功能 local TAB = { "AA", "Anti-aimbot angles", "Fake lag" } local State = { "Global", "Standing", "Moving", "Crouch", "Crouch Move", "Slowwalk", "Air", "Air Duck", "Fakelag", "Hideshot", "No Enemy" } -- 导航标签 ui_new_label(TAB[1], "Fake lag", ui_colors.new_blue .. "• " .. ui_colors.white .. "Obsidian") ui_new_label(TAB[1], "Fake lag", ui_colors.grey .. "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━") local active_tab = ui_new_combobox(TAB[1], "Fake lag", "Tabs", { "Anti-Aim", "Visuals", "Misc", "Config" }) local condition_selector = ui_new_combobox(TAB[1], "Fake lag", "Condition", State) local menu_ = { setup = ui_new_checkbox(TAB[1], "Fake lag", ui_colors.bright_red .. ui_colors.new_blue .. "☠ 无敌 ☠"), render = { alpha = 0, list = {"Info", "Antiaim", "Visuals", "Misc", "Config"}, active = "Info", }, Antiaim = { extra = {} }, Visuals = {}, Misc = {} } -- Obsidian视觉菜单项 menu_.Visuals = { -- 主指示器 indicators = ui_new_multiselect(TAB[1], TAB[2], ui_colors.new_blue .. "Indicators", { "Manual Arrows", "State Display", "Desync Bar", "Branding", "Defensive Ticks", "Keybind List", "Spectator List", "Exploit Info", "FL Status" }), indicator_color = ui_new_color_picker(TAB[1], TAB[2], "Indicator Color", ui_colors.primary[1], ui_colors.primary[2], ui_colors.primary[3], 255), hud_style = ui_new_combobox(TAB[1], TAB[2], "HUD Style", { "Classic", "Mini" }), welcome_screen = ui_new_checkbox(TAB[1], TAB[2], "Welcome Screen"), animation_select = ui_new_multiselect(TAB[1], TAB[2], ui_colors.new_blue .. "Animations", { "Static Legs", "Pitch 0 on Land", "Static slowwalk legs", "Legs breaker", "Allen walk", "Jitter Leg", "Earthquake", "Flashed" }), -- Obsidian 自定义Scope scope_sep = ui_new_label(TAB[1], TAB[2], ui_colors.new_blue .. "--- Custom Scope ---"), scope_enable = ui_new_checkbox(TAB[1], TAB[2], "Custom Scope Lines"), scope_color = ui_new_color_picker(TAB[1], TAB[2], "Scope Color", 140, 120, 255, 255), scope_pos = ui_new_slider(TAB[1], TAB[2], "Scope Position", 0, 500, 190), scope_offset = ui_new_slider(TAB[1], TAB[2], "Scope Offset", 0, 500, 15), scope_speed = ui_new_slider(TAB[1], TAB[2], "Scope Fade Speed", 3, 20, 12, true, "fr", 1, {[3] = "Off"}), -- Obsidian Shot Logger + Hitmarker shot_log = ui_new_checkbox(TAB[1], TAB[2], "Shot Logger"), hitmarker = ui_new_checkbox(TAB[1], TAB[2], "Hitmarker"), combat_alerts = ui_new_multiselect(TAB[1], TAB[2], "Combat Alerts", { "Incoming Shot", "Threat Badge", "Toast Logs", "Kill Alerts" }), esp_preview = ui_new_checkbox(TAB[1], TAB[2], "ESP Preview (Horus)"), -- Obsidian 第二Zoom FOV scope_fov_slider = ui_new_slider(TAB[1], TAB[2], "Second Zoom FOV", 0, 100, 0, true, "%", 1, {[0] = "Off"}), -- 快速爬梯 fast_ladder = ui_new_checkbox(TAB[1], TAB[2], "Fast Ladder"), -- 宽高比 aspect_ratio = ui_new_slider(TAB[1], TAB[2], "Aspect Ratio", 0, 300, 0, true, "%", 1, {[0] = "Off"}), -- 队标动画 clantag = ui_new_checkbox(TAB[1], TAB[2], "Clantag Animation"), -- 控制台过滤 console_filter = ui_new_checkbox(TAB[1], TAB[2], "Console Filter"), } ---------------------------------------------------------------状态变量 - Obsidian风格 local vars = { ground_ticks = 0, end_time = 0, is_fire = false, chokes = 0, -- Obsidian-style tick detection exploit = { shift = false, breaking_lc = false, def_aa = false, max_tickbase = 0, run_cmd_num = 0, old_origin = nil, old_simtime = 0, defensive = { force = false, left = 0, max = 0, cmd_left = 0, cmd_max = 0, cmd_num = nil }, lc = { distance = 0, teleport = false }, }, def = { cmd_num = 0, checker = 0, tickbase = 0 }, defensive_wait_ticks = 0, defnesive_run_ticks = 0, defensive_delay = false, defensive_jitter = 0, defensive_spin_amout = 0, flick_active = false, flick_ticks = 0, flick_speed_current = 0, flick_inverted = false, flick_swap = false, flick_pitch_value1 = 0, flick_pitch_value2 = 0, flick_yaw_value1 = 0, flick_yaw_value2 = 0, defensive_yaw_sway = 0, defensive_yaw_dist = { tick = -1, val = 0 }, defensive_pitch_sway = 0, defensive_pitch_dist = 0, state = { idx = 1, name = "Global" }, realstate = { idx = 1, name = "Global" }, manual_dir = nil, manual_yaw = 0, way = 1, current_tick = 0, defensive_val = 0, defensive_twisted = 0, defensive_side = 0, semi_zero_state = { tick = 0, mode = 0, intensity = 0 }, smart_breaker_state = { tick = 0, pattern = 0, last_shot = 0 }, velocity_based_state = { last_velocity = 0, target_pitch = 0, transition = 0 }, hybrid_mix_state = { mode_idx = 1, tick_counter = 0, patterns = {} }, smart_random_state = { tick = 0, pattern_idx = 0, patterns = {} }, adaptive_spin_state = { tick = 0, direction = 1, speed = 0, target = 0 }, dynamic_jitter_state = { tick = 0, mode = 0, intensity = 0 }, hybrid_yaw_state = { tick = 0, mode_idx = 1, patterns = {} }, auto_switch_state = { tick = 0, pitch_idx = 1, yaw_idx = 1 }, enemy_adaptive_state = { last_enemy_count = 0, threat_level = 0, adaptation_tick = 0 }, preset_state = { current_preset = "Custom", last_tick = 0 }, cathode_state = { pitch_spin_value = 0, yaw_spin_value = 0, pitch_last_def = 0, yaw_last_def = 0, pitch_switch_jitter = 0, yaw_switch_jitter = 0, current_pitch = 0, current_yaw = 0, old_pitch = 1, old_yaw = 1, flick_counter = 0, tick = { max = 0, left = 0, cmd_num = 0, cmd_tick = { max = 0, left = 0 } } }, -- HUD动画 hud_watermark_w = 220, hud_keylist_w = 170, hud_speclist_w = 170, hud_scope_breathe = 0, welcome_alpha = 0, welcome_progress = 0, welcome_done = false, welcome_fading = false, session_start = client_system_time and client_system_time() or 0, -- Shot log entries shot_log_entries = {}, hitmarker_data = { alpha = 0, time = 0, size = 0 }, -- Combat notifications combat_notifications = {}, -- 手动箭头动画 manual_ani = { left = 0, right = 0 }, -- Clantag clantag_idx = 1, clantag_timer = 0, -- FL状态 flctl_state = "off", flctl_limit = 0, horus_preview = { alpha = 0, assets_loaded = false, assets_loading = false, assets_failed = false, last_error = nil, warn_token = nil, model_textures = {}, weapon_icon = nil, started = false, pending = 0 }, } local BREAK_LC_DIST_SQR = 64 * 64 local anim_desync = 0 local scope_alpha = 0 local scoped_fraction = 0 local function reset_horus_preview_runtime() vars.horus_preview.alpha = 0 vars.horus_preview.assets_loaded = false vars.horus_preview.assets_loading = false vars.horus_preview.assets_failed = false vars.horus_preview.last_error = nil vars.horus_preview.warn_token = nil vars.horus_preview.model_textures = {} vars.horus_preview.weapon_icon = nil vars.horus_preview.started = false vars.horus_preview.pending = 0 end local function horus_preview_notify(message) if not message or vars.horus_preview.warn_token == message then return end vars.horus_preview.warn_token = message vars.horus_preview.last_error = message client_color_log(ui_colors.warning[1], ui_colors.warning[2], ui_colors.warning[3], "[Obsidian] " .. message) end local function horus_preview_store_texture(index, body) if images == nil or body == nil then return false end local ok, texture = pcall(images.load_png, body) if not ok or texture == nil then return false end vars.horus_preview.model_textures[index] = texture return true end local function horus_preview_refresh_state() local ready = true for i = 1, #HORUS_PREVIEW_MODEL_URLS do if vars.horus_preview.model_textures[i] == nil then ready = false break end end vars.horus_preview.assets_loaded = ready vars.horus_preview.assets_loading = (vars.horus_preview.pending or 0) > 0 end local function ensure_horus_preview_assets() if vars.horus_preview.assets_loaded or vars.horus_preview.assets_loading or vars.horus_preview.started then return end if images == nil then vars.horus_preview.started = true vars.horus_preview.assets_failed = true horus_preview_notify("ESP preview images library missing, using fallback preview.") return end vars.horus_preview.started = true vars.horus_preview.pending = 0 if vars.horus_preview.weapon_icon == nil then local ok, icon = pcall(images.get_weapon_icon, "weapon_SSG08") if ok then vars.horus_preview.weapon_icon = icon end end for i = 1, #HORUS_PREVIEW_MODEL_URLS do local url = HORUS_PREVIEW_MODEL_URLS[i] local cached = database_read(url) if cached == nil or not horus_preview_store_texture(i, cached) then vars.horus_preview.pending = vars.horus_preview.pending + 1 local idx = i local asset_url = url http.get(asset_url, function(success, response) local loaded = false if success and response and response.status == 200 and response.body then loaded = horus_preview_store_texture(idx, response.body) if loaded then pcall(database_write, asset_url, response.body) end end if not loaded then vars.horus_preview.assets_failed = true horus_preview_notify("ESP preview assets failed to load, using fallback layers.") end vars.horus_preview.pending = math_max(0, (vars.horus_preview.pending or 0) - 1) horus_preview_refresh_state() end) end end horus_preview_refresh_state() end local function draw_horus_preview_texture(texture, x, y, height, r, g, b, a, ...) if texture == nil then return false end local extra = { ... } return pcall(function() texture:draw(x, y, nil, height, r, g, b, a, unpack(extra)) end) end local function draw_horus_preview_fallback_model(x, y, alpha) draw_round_rect(x + 42, y + 8, 58, 260, 44, 49, 58, math_floor(108 * alpha), 8) draw_round_rect(x + 56, y - 4, 30, 30, 54, 59, 70, math_floor(132 * alpha), 15) draw_round_rect(x + 54, y + 42, 34, 88, 73, 78, 89, math_floor(154 * alpha), 8) draw_round_rect(x + 58, y + 132, 26, 76, 66, 72, 82, math_floor(138 * alpha), 7) draw_round_rect(x + 38, y + 58, 16, 66, 62, 68, 78, math_floor(122 * alpha), 6) draw_round_rect(x + 88, y + 58, 16, 66, 62, 68, 78, math_floor(122 * alpha), 6) draw_round_rect(x + 56, y + 212, 14, 52, 66, 72, 82, math_floor(118 * alpha), 6) draw_round_rect(x + 72, y + 212, 14, 52, 66, 72, 82, math_floor(118 * alpha), 6) end local function draw_horus_preview_model_layers(base_x, base_y, alpha) local preview_refs = references.esp_preview local preview_state = vars.horus_preview local textures = preview_state.model_textures local model_x, model_y = base_x + 7, base_y + 35 local drew_main = false local glow_r, glow_g, glow_b, glow_a = horus_preview_ref_color(preview_refs.glow, 2, 185, 181, 241, 180) local shadow_r, shadow_g, shadow_b, shadow_a = horus_preview_ref_color(preview_refs.shadow, 2, 16, 16, 16, 180) local chams_r, chams_g, chams_b, chams_a = horus_preview_ref_color(preview_refs.chams, 2, 255, 255, 255, 255) local chams_glow_r, chams_glow_g, chams_glow_b, chams_glow_a = horus_preview_ref_color(preview_refs.chams_behind, 4, chams_r, chams_g, chams_b, chams_a) local material = horus_preview_ref_value(preview_refs.chams_behind, 3, "Original") if horus_preview_ref_active(preview_refs.shadow) then draw_horus_preview_texture(textures[6], model_x + 23, model_y, 280, shadow_r, shadow_g, shadow_b, math_floor(shadow_a * alpha)) end if horus_preview_ref_active(preview_refs.glow) then draw_horus_preview_texture(textures[2], model_x, model_y, 280, glow_r, glow_g, glow_b, math_floor(glow_a * alpha)) end if not horus_preview_ref_active(preview_refs.chams) then drew_main = draw_horus_preview_texture(textures[1], model_x, model_y, 280, 255, 255, 255, math_floor(255 * alpha)) elseif material == "Default" then drew_main = draw_horus_preview_texture(textures[3], model_x, model_y, 280, chams_r, chams_g, chams_b, math_floor(chams_a * alpha)) elseif material == "Solid" then drew_main = draw_horus_preview_texture(textures[4], model_x, model_y, 280, chams_r, chams_g, chams_b, math_floor(chams_a * alpha)) elseif material == "Shaded" then drew_main = draw_horus_preview_texture(textures[3], model_x, model_y, 280, chams_r, chams_g, chams_b, math_floor(chams_a * alpha)) draw_horus_preview_texture(textures[7], model_x, model_y, 280, chams_glow_r, chams_glow_g, chams_glow_b, math_floor(chams_glow_a * alpha)) elseif material == "Glow" then drew_main = draw_horus_preview_texture(textures[3], model_x, model_y, 280, chams_r, chams_g, chams_b, math_floor(chams_a * alpha)) draw_horus_preview_texture(textures[5], model_x, model_y, 280, chams_glow_r, chams_glow_g, chams_glow_b, math_floor(chams_glow_a * alpha)) elseif material == "Bubble" then drew_main = draw_horus_preview_texture(textures[6], model_x, model_y, 280, chams_r, chams_g, chams_b, math_floor(chams_a * alpha)) draw_horus_preview_texture(textures[7], model_x, model_y, 280, chams_glow_r, chams_glow_g, chams_glow_b, math_floor(chams_glow_a * alpha)) elseif material == "Metallic" then drew_main = draw_horus_preview_texture(textures[3], model_x, model_y, 280, chams_r, chams_g, chams_b, math_floor(chams_a * alpha)) draw_horus_preview_texture(textures[8], model_x, model_y, 280, chams_glow_r, chams_glow_g, chams_glow_b, math_floor(chams_glow_a * 0.5 * alpha)) else drew_main = draw_horus_preview_texture(textures[1], model_x, model_y, 280, chams_r, chams_g, chams_b, math_floor(chams_a * alpha)) end if not drew_main then draw_horus_preview_fallback_model(base_x, base_y + 8, alpha) end end local function draw_horus_esp_preview(sw, sh) local show_preview = ui_get(menu_.Visuals.esp_preview) and ui_is_menu_open() and ui_get(active_tab) == "Visuals" vars.horus_preview.alpha = clamp(vars.horus_preview.alpha + ((show_preview and 1 or -1) * globals_frametime() * 9.5), 0, 1) if vars.horus_preview.alpha <= 0 then return end if show_preview then ensure_horus_preview_assets() end local mul = vars.horus_preview.alpha local panel_w, panel_h = 242, 394 local panel_x = math_floor(sw * 0.76 - panel_w * 0.5) local panel_y = math_floor(sh * 0.50 - panel_h * 0.5) local accent_r, accent_g, accent_b = 185, 181, 241 local preview_refs = references.esp_preview local name_r, name_g, name_b, name_a = horus_preview_ref_color(preview_refs.name, 2, 255, 255, 255, 255) local box_r, box_g, box_b, box_a = horus_preview_ref_color(preview_refs.box, 2, 255, 255, 255, 255) local skeleton_r, skeleton_g, skeleton_b, skeleton_a = horus_preview_ref_color(preview_refs.skeleton, 2, 255, 255, 255, 255) local ammo_r, ammo_g, ammo_b, ammo_a = horus_preview_ref_color(preview_refs.ammo, 2, accent_r, accent_g, accent_b, 255) local icon_r, icon_g, icon_b, icon_a = horus_preview_ref_color(preview_refs.weapon_icon, 2, 255, 255, 255, 255) local glow_r, glow_g, glow_b, glow_a = horus_preview_ref_color(preview_refs.glow, 2, accent_r, accent_g, accent_b, 180) local status_y = panel_y + panel_h - 18 if ui_menu_position ~= nil and ui_menu_size ~= nil then local ok_pos, mx, my = pcall(ui_menu_position) local ok_size, mw, mh = pcall(ui_menu_size) if ok_pos and ok_size and mx and my and mw and mh then panel_x = mx + mw + 20 panel_y = my + math_floor(mh * 0.5 - panel_h * 0.5) end end panel_x = clamp(panel_x, 10, sw - panel_w - 10) panel_y = clamp(panel_y, 10, sh - panel_h - 10) status_y = panel_y + panel_h - 18 draw_glass_panel(panel_x, panel_y, panel_w, panel_h, accent_r, accent_g, accent_b, 0.96 * mul, false) draw_round_rect(panel_x + 10, panel_y + 10, panel_w - 20, 20, 15, 19, 28, math_floor(154 * mul), 6) draw_round_rect(panel_x + 15, panel_y + 15, 6, 6, accent_r, accent_g, accent_b, math_floor(228 * mul), 3) draw_text_shadow(panel_x + 27, panel_y + 14, 232, 236, 243, math_floor(240 * mul), "", 0, "ESP PREVIEW") draw_text_shadow(panel_x + panel_w - 15, panel_y + 14, 171, 176, 187, math_floor(210 * mul), "r", 0, "HORUS") local x = panel_x + 30 local y = panel_y + 42 local box_x, box_y, box_w, box_h = x + 20, y + 42, 142, 288 if horus_preview_ref_active(preview_refs.glow) then if renderer.blur then pcall(renderer.blur, box_x - 14, box_y - 10, box_w + 28, box_h + 20, math_floor(glow_a * mul * 0.62), 4) end draw_round_rect(box_x + 34, box_y + 8, 74, box_h - 24, glow_r, glow_g, glow_b, math_floor(glow_a * mul * 0.22), 8) end draw_horus_preview_model_layers(x, y, mul) if horus_preview_ref_active(preview_refs.name) then draw_text_shadow(x + 90, y + 35, name_r, name_g, name_b, math_floor(name_a * mul), "c", 0, "KnF7") end if horus_preview_ref_active(preview_refs.health) then local hp_h = 245 local hp_fill = math_floor(hp_h * 0.76 + 0.5) renderer_rectangle(x + 14, y + 43, 2, hp_h, 0, 0, 0, math_floor(235 * mul)) renderer_gradient(x + 14, y + 43 + (hp_h - hp_fill), 2, hp_fill, 188, 184, 234, math_floor(255 * mul), 146, 116, 105, math_floor(255 * mul), false) draw_text_shadow(x + 9, y + 80, 255, 255, 255, math_floor(245 * mul), "-", 0, "76") end if horus_preview_ref_active(preview_refs.box) then renderer_line(box_x, box_y, box_x + box_w, box_y, box_r, box_g, box_b, math_floor(box_a * mul)) renderer_line(box_x, box_y, box_x, box_y + box_h, box_r, box_g, box_b, math_floor(box_a * mul)) renderer_line(box_x, box_y + box_h, box_x + box_w, box_y + box_h, box_r, box_g, box_b, math_floor(box_a * mul)) renderer_line(box_x + box_w, box_y, box_x + box_w, box_y + box_h, box_r, box_g, box_b, math_floor(box_a * mul)) end local flag_offset = 41 if horus_preview_ref_active(preview_refs.money) then draw_text_shadow(x + 164, y + 41, 115, 180, 25, math_floor(240 * mul), "-", 0, "$1337") flag_offset = flag_offset + 9 end if horus_preview_ref_active(preview_refs.flags) then draw_text_shadow(x + 164, y + flag_offset, 255, 255, 255, math_floor(240 * mul), "-", 0, "HK") draw_text_shadow(x + 164, y + flag_offset + 9, 53, 166, 208, math_floor(240 * mul), "-", 0, "ZOOM") draw_text_shadow(x + 164, y + flag_offset + 18, 255, 255, 255, math_floor(240 * mul), "-", 0, "FAKE") draw_text_shadow(x + 164, y + flag_offset + 27, 255, 0, 0, math_floor(240 * mul), "-", 0, "PIN") end local other_offset = 0 if horus_preview_ref_active(preview_refs.ammo) then renderer_rectangle(x + 20, y + 335 + other_offset, 141, 2, 0, 0, 0, math_floor(245 * mul)) renderer_rectangle(x + 20, y + 335 + other_offset, 99, 2, ammo_r, ammo_g, ammo_b, math_floor(ammo_a * mul)) draw_text_shadow(x + 117, y + 336 + other_offset, 255, 255, 255, math_floor(245 * mul), "c-", 0, "7") other_offset = other_offset + 10 end if horus_preview_ref_active(preview_refs.distance) then draw_text_shadow(x + 90, y + 339 + other_offset, 255, 255, 255, math_floor(245 * mul), "c-", 0, "70 FT") other_offset = other_offset + 10 end if horus_preview_ref_active(preview_refs.weapon_text) then draw_text_shadow(x + 90, y + 338 + other_offset, 255, 255, 255, math_floor(245 * mul), "c-", 0, "SSG08") other_offset = other_offset + 10 end if horus_preview_ref_active(preview_refs.weapon_icon) then local drew_icon = draw_horus_preview_texture(vars.horus_preview.weapon_icon, x + 73, y + 335 + other_offset, 12, icon_r, icon_g, icon_b, math_floor(icon_a * mul), 10, "") if not drew_icon then draw_text_shadow(x + 90, y + 338 + other_offset, icon_r, icon_g, icon_b, math_floor(icon_a * mul), "c-", 0, "[ICON]") end other_offset = other_offset + 10 end if horus_preview_ref_active(preview_refs.skeleton) then local sy = y + 40 renderer_line(x + 90, sy + 40, x + 86, sy + 132, skeleton_r, skeleton_g, skeleton_b, math_floor(skeleton_a * mul)) renderer_line(x + 86, sy + 132, x + 72, sy + 152, skeleton_r, skeleton_g, skeleton_b, math_floor(skeleton_a * mul)) renderer_line(x + 72, sy + 152, x + 73, sy + 194, skeleton_r, skeleton_g, skeleton_b, math_floor(skeleton_a * mul)) renderer_line(x + 73, sy + 194, x + 90, sy + 250, skeleton_r, skeleton_g, skeleton_b, math_floor(skeleton_a * mul)) renderer_line(x + 86, sy + 132, x + 102, sy + 154, skeleton_r, skeleton_g, skeleton_b, math_floor(skeleton_a * mul)) renderer_line(x + 102, sy + 154, x + 105, sy + 193, skeleton_r, skeleton_g, skeleton_b, math_floor(skeleton_a * mul)) renderer_line(x + 105, sy + 193, x + 120, sy + 250, skeleton_r, skeleton_g, skeleton_b, math_floor(skeleton_a * mul)) renderer_line(x + 88, sy + 68, x + 66, sy + 75, skeleton_r, skeleton_g, skeleton_b, math_floor(skeleton_a * mul)) renderer_line(x + 66, sy + 75, x + 52, sy + 100, skeleton_r, skeleton_g, skeleton_b, math_floor(skeleton_a * mul)) renderer_line(x + 52, sy + 100, x + 43, sy + 70, skeleton_r, skeleton_g, skeleton_b, math_floor(skeleton_a * mul)) renderer_line(x + 88, sy + 68, x + 115, sy + 76, skeleton_r, skeleton_g, skeleton_b, math_floor(skeleton_a * mul)) renderer_line(x + 115, sy + 76, x + 130, sy + 105, skeleton_r, skeleton_g, skeleton_b, math_floor(skeleton_a * mul)) renderer_line(x + 130, sy + 105, x + 124, sy + 130, skeleton_r, skeleton_g, skeleton_b, math_floor(skeleton_a * mul)) end if vars.horus_preview.assets_loading and not vars.horus_preview.assets_loaded then draw_text_shadow(panel_x + 16, status_y, 171, 176, 187, math_floor(188 * mul), "", 0, "Loading preview assets...") elseif vars.horus_preview.assets_failed and not vars.horus_preview.assets_loaded then draw_text_shadow(panel_x + 16, status_y, 255, 184, 108, math_floor(188 * mul), "", 0, "Fallback preview active") end end ---------------------------------------------------------------Obsidian-style tick detection local function exploit_update_tickbase_shift(me) vars.exploit.shift = globals_tickcount() > (entity_get_prop(me, "m_nTickBase") or 0) end local function exploit_update_teleport(old_ox, old_oy, old_oz, nx, ny, nz) local dx, dy, dz = nx - old_ox, ny - old_oy, nz - old_oz local dist_sq = dx*dx + dy*dy + dz*dz vars.exploit.breaking_lc = dist_sq > BREAK_LC_DIST_SQR vars.exploit.lc.distance = dist_sq vars.exploit.lc.teleport = dist_sq > BREAK_LC_DIST_SQR end local function exploit_update_lagcomp(me) local ox, oy, oz = entity_get_prop(me, "m_vecOrigin") if not ox then return end local st = entity_get_prop(me, "m_flSimulationTime") or 0 local st_ticks = math.floor(0.5 + st / globals_tickinterval()) if vars.exploit.old_simtime then local delta = st_ticks - vars.exploit.old_simtime if delta < 0 or (delta > 0 and delta <= 64) then if vars.exploit.old_origin then exploit_update_teleport(vars.exploit.old_origin[1], vars.exploit.old_origin[2], vars.exploit.old_origin[3], ox, oy, oz) end end end vars.exploit.old_origin = {ox, oy, oz} vars.exploit.old_simtime = st_ticks end local function exploit_update_defensive_tick(me) local tb = entity_get_prop(me, "m_nTickBase") or 0 if math.abs(tb - vars.exploit.max_tickbase) > 64 then vars.exploit.max_tickbase = 0 end local dfl = 0 if tb > vars.exploit.max_tickbase then vars.exploit.max_tickbase = tb elseif vars.exploit.max_tickbase > tb then dfl = math.min(14, math.max(0, vars.exploit.max_tickbase - tb - 1)) end if dfl > 0 then vars.exploit.breaking_lc = true vars.exploit.defensive.left = dfl if vars.exploit.defensive.max == 0 then vars.exploit.defensive.max = dfl end else vars.exploit.defensive.left = 0 vars.exploit.defensive.max = 0 end vars.def.tickbase = dfl end local function exploit_on_predict(cmd) local me = entity_get_local_player() if not me then return end if cmd.command_number == vars.exploit.run_cmd_num then exploit_update_defensive_tick(me) vars.exploit.run_cmd_num = nil end if vars.exploit.defensive.cmd_num and cmd.command_number == vars.exploit.defensive.cmd_num then local tb = entity_get_prop(me, "m_nTickBase") or 0 local cmd_max = vars.exploit.defensive.cmd_max or 0 if math.abs(tb - cmd_max) > 64 then cmd_max = 0 end vars.exploit.defensive.cmd_left = math.abs(tb - cmd_max) vars.exploit.defensive.cmd_max = math.max(tb, cmd_max) vars.exploit.defensive.cmd_num = nil end end local function exploit_on_setup(cmd) local me = entity_get_local_player() if not me then return end exploit_update_tickbase_shift(me) end local function exploit_on_run(e) vars.exploit.run_cmd_num = e.command_number vars.exploit.defensive.cmd_num = e.command_number end local function exploit_on_net_update() local me = entity_get_local_player() if not me then return end exploit_update_lagcomp(me) end local function exploit_reset() vars.exploit.max_tickbase = 0 vars.exploit.defensive.left = 0 vars.exploit.defensive.max = 0 vars.exploit.defensive.cmd_left = 0 vars.exploit.defensive.cmd_max = 0 vars.exploit.defensive.cmd_num = nil vars.exploit.breaking_lc = false vars.exploit.def_aa = false vars.exploit.old_origin = nil vars.exploit.old_simtime = 0 vars.def.tickbase = 0 vars.flctl_state = "off" vars.flctl_limit = 0 end ---------------------------------------------------------------导出/导入配置 local function export_config() local settings = {} for key, value in pairs(State) do settings[tostring(value)] = {} for k, v in pairs(menu_.Antiaim[key] or {}) do if type(v) ~= "table" then settings[value][k] = ui_get(v) else settings[value][k] = {} for key_, value_ in pairs(v) do if type(value_) ~= "table" then settings[value][k][key_] = ui_get(value_) else settings[value][k][key_] = {} for k_, v_ in pairs(value_) do settings[value][k][key_][k_] = ui_get(v_) end end end end end end local json = require("gamesense/json") local base64_encode = base64.encode(json.stringify(settings)) clipboard.set(base64_encode) client.color_log(ui_colors.primary[1], ui_colors.primary[2], ui_colors.primary[3], "[Obsidian] Config exported") end local function import_config() local json = require("gamesense/json") local base_decode = base64.decode(clipboard.get()) local settings = json.parse(base_decode) if not settings then client.color_log(255, 80, 80, "[Obsidian] Invalid config data") return end for key, value in pairs(State) do for k, v in pairs(menu_.Antiaim[key] or {}) do local current = settings[value] and settings[value][k] if current ~= nil then if type(current) ~= "table" then ui_set(v, current) else for key_, value_ in pairs(current) do if type(value_) ~= "table" then ui_set(v[key_], value_) else for k_, v_ in pairs(value_) do ui_set(v[key_][k_], v_) end end end end end end end client.color_log(ui_colors.primary[1], ui_colors.primary[2], ui_colors.primary[3], "[Obsidian] Config imported") end ---------------------------------------------------------------生成AA菜单 local function generate_antiaim() menu_.Antiaim.state_selector = ui_new_combobox(TAB[1], TAB[2], ui_colors.new_blue .. "Player Status", State) menu_.Antiaim.extra = { extra = ui_new_multiselect(TAB[1], TAB[2], ui_colors.new_blue .. "Extra Features", { "Manual Anti-Aim", "Anti-Back Stab", "Legit AA", "Safe Head", "Height advantage" }), manual_left = ui_new_hotkey(TAB[1], TAB[2], "Manual Left"), manual_right = ui_new_hotkey(TAB[1], TAB[2], "Manual Right"), manual_forward = ui_new_hotkey(TAB[1], TAB[2], "Manual Forward"), manual_back = ui_new_hotkey(TAB[1], TAB[2], "Manual Back"), manual_freestand = ui_new_hotkey(TAB[1], TAB[2], "Manual Freestanding"), manual_static = ui_new_checkbox(TAB[1], TAB[2], "Force Static Bodyyaw"), manual_state = 0, config_export = ui_new_button(TAB[1], TAB[2], "Export Config", export_config), config_import = ui_new_button(TAB[1], TAB[2], "Import Config", import_config), invert_flick = ui_new_checkbox(TAB[1], TAB[2], "Invert Flick") } for i = 1, #State do menu_.Antiaim[i] = {} local tag = State[i] menu_.Antiaim[i].enabled = ui_new_checkbox(TAB[1], TAB[2], "Enable [" .. tag .. "]") -- Pitch menu_.Antiaim[i].pitch = ui_new_combobox(TAB[1], TAB[2], "Pitch [" .. tag .. "]", { "Off", "Default", "Up", "Down", "Minimal", "Random", "Custom" }) menu_.Antiaim[i].pitch_value = ui_new_slider(TAB[1], TAB[2], "Custom Pitch [" .. tag .. "]", -89, 89, 0, true, "°") -- Yaw base menu_.Antiaim[i].yaw_base = ui_new_combobox(TAB[1], TAB[2], "Yaw Base [" .. tag .. "]", { "At targets", "Local view" }) -- Yaw mode menu_.Antiaim[i].yaw_mode = ui_new_combobox(TAB[1], TAB[2], "Yaw Mode [" .. tag .. "]", { "180", "Spin", "Rotation" }) -- Yaw values menu_.Antiaim[i].global_yaw = ui_new_slider(TAB[1], TAB[2], "Global Yaw [" .. tag .. "]", -180, 180, 0, true, "°") menu_.Antiaim[i].yaw_left = ui_new_slider(TAB[1], TAB[2], "Left Yaw [" .. tag .. "]", -180, 180, 0, true, "°") menu_.Antiaim[i].yaw_right = ui_new_slider(TAB[1], TAB[2], "Right Yaw [" .. tag .. "]", -180, 180, 0, true, "°") menu_.Antiaim[i].spin_speed = ui_new_slider(TAB[1], TAB[2], "Spin Speed [" .. tag .. "]", 1, 50, 10, true) menu_.Antiaim[i].rotation_steps = ui_new_slider(TAB[1], TAB[2], "Rotation Steps [" .. tag .. "]", 2, 6, 3, true) -- Yaw logic menu_.Antiaim[i].yaw_logic = ui_new_combobox(TAB[1], TAB[2], "Yaw Type [" .. tag .. "]", { "Static", "L & R", "Random", "Slow", "Control", "Binary", "Experimental", "Random int", "Remainder", "Labyrinth", "Xways", "LC Avoid", "LC Base" }) menu_.Antiaim[i].jitter_left = ui_new_slider(TAB[1], TAB[2], "Yaw #1 [" .. tag .. "]", -180, 180, 0, true, "°") menu_.Antiaim[i].jitter_right = ui_new_slider(TAB[1], TAB[2], "Yaw #2 [" .. tag .. "]", -180, 180, 0, true, "°") menu_.Antiaim[i].yaw_delay = ui_new_slider(TAB[1], TAB[2], "Delay [" .. tag .. "]", 1, 10, 5, true, "t") -- Xways menu_.Antiaim[i].xways = { ways = ui_new_slider(TAB[1], TAB[2], "Ways [" .. tag .. "]", 1, 12, 1, true), yaw = {}, delay = {}, } for x = 1, 12 do menu_.Antiaim[i].xways.yaw[x] = ui_new_slider(TAB[1], TAB[2], "Way #" .. x .. " [" .. tag .. "]", -180, 180, 0, true, "°") menu_.Antiaim[i].xways.delay[x] = ui_new_slider(TAB[1], TAB[2], "Delay #" .. x .. " [" .. tag .. "]", 1, 15, 1, true, "t") end -- Jitter menu_.Antiaim[i].jitter_type = ui_new_combobox(TAB[1], TAB[2], "Jitter Type [" .. tag .. "]", { "Off", "Offset", "Center", "Random", "Skitter", "3-Way", "5-Way", "Frequence", "Randomize" }) menu_.Antiaim[i].jitter_mode = ui_new_combobox(TAB[1], TAB[2], "Jitter Mode [" .. tag .. "]", { "Static", "Switch", "Random", "Spin" }) menu_.Antiaim[i].jitter_val1 = ui_new_slider(TAB[1], TAB[2], "Jitter Value 1 [" .. tag .. "]", -180, 180, 0, true, "°") menu_.Antiaim[i].jitter_val2 = ui_new_slider(TAB[1], TAB[2], "Jitter Value 2 [" .. tag .. "]", -180, 180, 0, true, "°") menu_.Antiaim[i].jitter_rand = ui_new_slider(TAB[1], TAB[2], "Jitter Randomize [" .. tag .. "]", 0, 180, 0, true, "°") menu_.Antiaim[i].jitter_freq_speed = ui_new_slider(TAB[1], TAB[2], "Freq Speed [" .. tag .. "]", 1, 20, 4, true, "t") for w = 1, 5 do menu_.Antiaim[i]["jitter_way" .. w] = ui_new_slider(TAB[1], TAB[2], "Way " .. w .. " [" .. tag .. "]", -180, 180, 0, true, "°") end -- Yaw jitter menu_.Antiaim[i].yaw_jitter = ui_new_combobox(TAB[1], TAB[2], "Yaw Jitter [" .. tag .. "]", { "Off", "Offset", "Center", "Skitter" }) menu_.Antiaim[i].yaw_jitter_logic = ui_new_combobox(TAB[1], TAB[2], "Jitter Type [" .. tag .. "]", { "Default", "L & R", "Randoms" }) menu_.Antiaim[i].jitter_range_left = ui_new_slider(TAB[1], TAB[2], "Jitter #1 [" .. tag .. "]", -180, 180, 0, true, "°") menu_.Antiaim[i].jitter_range_right = ui_new_slider(TAB[1], TAB[2], "Jitter #2 [" .. tag .. "]", -180, 180, 0, true, "°") -- Body Yaw menu_.Antiaim[i].body_yaw = ui_new_combobox(TAB[1], TAB[2], "Body Yaw [" .. tag .. "]", { "Off", "Opposite", "Static", "Jitter" }) menu_.Antiaim[i].body_yaw_logic = ui_new_combobox(TAB[1], TAB[2], "Body Type [" .. tag .. "]", { "Default", "L & R", "Random", "Momentum", "Slow", "Current" }) menu_.Antiaim[i].body_yaw_fake = ui_new_slider(TAB[1], TAB[2], "Fake [" .. tag .. "]", 0, 60, 0, true, "%") menu_.Antiaim[i].body_yaw_left = ui_new_slider(TAB[1], TAB[2], "Body #1 [" .. tag .. "]", -180, 180, 0, true, "°") menu_.Antiaim[i].body_yaw_right = ui_new_slider(TAB[1], TAB[2], "Body #2 [" .. tag .. "]", -180, 180, 0, true, "°") menu_.Antiaim[i].body_yaw_speed = ui_new_slider(TAB[1], TAB[2], "Speed [" .. tag .. "]", 0, 31, 31, true, "%") menu_.Antiaim[i].body_side = ui_new_slider(TAB[1], TAB[2], "Body Side [" .. tag .. "]", 0, 1, 0, true, nil, 1, {[0]="Left", [1]="Right"}) menu_.Antiaim[i].body_delay_mode = ui_new_combobox(TAB[1], TAB[2], "Body Delay [" .. tag .. "]", { "Static", "Switch" }) menu_.Antiaim[i].body_delay_ticks = ui_new_slider(TAB[1], TAB[2], "Delay Ticks [" .. tag .. "]", 1, 12, 1, true, "t") menu_.Antiaim[i].body_delay_left = ui_new_slider(TAB[1], TAB[2], "Left Ticks [" .. tag .. "]", 1, 12, 1, true, "t") menu_.Antiaim[i].body_delay_right = ui_new_slider(TAB[1], TAB[2], "Right Ticks [" .. tag .. "]", 1, 12, 1, true, "t") menu_.Antiaim[i].body_delay_switch = ui_new_slider(TAB[1], TAB[2], "Switch Ticks [" .. tag .. "]", 0, 50, 0, true, "t") menu_.Antiaim[i].fake_limit_left = ui_new_slider(TAB[1], TAB[2], "[L] Fake Limit [" .. tag .. "]", 0, 60, 0, true) menu_.Antiaim[i].fake_limit_right = ui_new_slider(TAB[1], TAB[2], "[R] Fake Limit [" .. tag .. "]", 0, 60, 0, true) -- Roll / Backstab / Extra menu_.Antiaim[i].roll_amount = ui_new_slider(TAB[1], TAB[2], "Roll [" .. tag .. "]", -45, 45, 0, true, "°") menu_.Antiaim[i].backstab = ui_new_combobox(TAB[1], TAB[2], "Backstab [" .. tag .. "]", { "Off", "Forward", "Random" }) menu_.Antiaim[i].height_safe = ui_new_slider(TAB[1], TAB[2], "Height Safe [" .. tag .. "]", 25, 250, 50, true) menu_.Antiaim[i].fs_body_yaw = ui_new_checkbox(TAB[1], TAB[2], "FS Body Yaw [" .. tag .. "]") -- Defensive menu_.Antiaim[i].defensive_enable = ui_new_checkbox(TAB[1], TAB[2], "Defensive [" .. tag .. "]") menu_.Antiaim[i].defensive_check_mode = ui_new_combobox(TAB[1], TAB[2], "Def Mode [" .. tag .. "]", { "Tickbase", "Auto Switch", "Enemy Adaptive", "Flick", "Duration", "LC End", "Always", "Custom" }) menu_.Antiaim[i].defensive_sensitivity = ui_new_slider(TAB[1], TAB[2], "Sensitivity [" .. tag .. "]", 1, 25, 1, true) menu_.Antiaim[i].defensive_pingsafe = ui_new_checkbox(TAB[1], TAB[2], "Ping Safe [" .. tag .. "]") menu_.Antiaim[i].defensive_control = ui_new_checkbox(TAB[1], TAB[2], "Control [" .. tag .. "]") menu_.Antiaim[i].defensive_delay = ui_new_checkbox(TAB[1], TAB[2], "Delay Angle [" .. tag .. "]") menu_.Antiaim[i].defensive_force = ui_new_checkbox(TAB[1], TAB[2], "Force Defensive [" .. tag .. "]") -- Tick range menu_.Antiaim[i].def_range1 = ui_new_slider(TAB[1], TAB[2], "Def Tick Min [" .. tag .. "]", 0, 15, 0, true, "t") menu_.Antiaim[i].def_range2 = ui_new_slider(TAB[1], TAB[2], "Def Tick Max [" .. tag .. "]", 0, 15, 15, true, "t") menu_.Antiaim[i].defensive_auto_switch = ui_new_checkbox(TAB[1], TAB[2], "Auto Switch [" .. tag .. "]") menu_.Antiaim[i].defensive_switch_interval = ui_new_slider(TAB[1], TAB[2], "Switch Interval [" .. tag .. "]", 1, 30, 5, true, "t") menu_.Antiaim[i].defensive_randomize = ui_new_checkbox(TAB[1], TAB[2], "Randomize [" .. tag .. "]") menu_.Antiaim[i].defensive_preset = ui_new_combobox(TAB[1], TAB[2], "Preset [" .. tag .. "]", { "Custom", "Aggressive", "Defensive", "Balanced", "Anti-Resolver", "Hybrid" }) menu_.Antiaim[i].defensive_preset_pitch = ui_new_combobox(TAB[1], TAB[2], "Preset Pitch [" .. tag .. "]", { "Off", "Up", "Down", "Jitter", "Smart Breaker", "Semi-0°", "Velocity-Based", "Hybrid Mix" }) menu_.Antiaim[i].defensive_preset_yaw = ui_new_combobox(TAB[1], TAB[2], "Preset Yaw [" .. tag .. "]", { "Off", "Smart Random", "Adaptive Spin", "Dynamic Jitter", "Hybrid Yaw", "Distortion", "3-Way" }) menu_.Antiaim[i].defensive_pitch = ui_new_combobox(TAB[1], TAB[2], "Def Pitch [" .. tag .. "]", { "Off", "Up", "Down", "Jitter", "Minimal", "Random", "Custom", "Semi-Up", "Semi-Down", "Ocky-Way", "Head Juke", "Randomize Jitter", "Automatic", "Automatic custom", "Automatic Dual Thread", "Paketa", "Up Switch", "Down Switch", "Sway", "Distortion", "Semi-0°", "Smart Breaker", "Velocity-Based", "Hybrid Mix", "Neural Adaptive", "Disabled", "Fake Down", "Fake Up", "Cycle Spin", "Switch Random", "Switch Jitter", "Random Static", "LC End", "89-Random", "Static Flip", "Wave" }) menu_.Antiaim[i].defensive_pitch_custom = ui_new_slider(TAB[1], TAB[2], "Custom [" .. tag .. "]", -89, 89, 0, true, "°") menu_.Antiaim[i].defensive_pitch_custom1 = ui_new_slider(TAB[1], TAB[2], "Custom 2 [" .. tag .. "]", -89, 89, 0, true, "°") menu_.Antiaim[i].defensive_pitch_speed_custom = ui_new_slider(TAB[1], TAB[2], "Speed 1 [" .. tag .. "]", 1, 89, 1, true) menu_.Antiaim[i].defensive_pitch_speed_custom1 = ui_new_slider(TAB[1], TAB[2], "Speed 2 [" .. tag .. "]", 1, 89, 1, true) menu_.Antiaim[i].defensive_pitch_prefer = ui_new_combobox(TAB[1], TAB[2], "Prefer [" .. tag .. "]", { "Up", "Down" }) menu_.Antiaim[i].defensive_yaw = ui_new_combobox(TAB[1], TAB[2], "Def Yaw [" .. tag .. "]", { "Off", "180", "180Z", "Spin", "L&R", "Jitter", "Skitter", "Random", "Forward", "Move-Based", "Sideways", "Opposite", "Fake Spin", "Sway", "Distortion", "Delayed", "3-Way", "Spinbot", "disabled", "static", "jitter", "spin", "move-based", "Smart Random", "Adaptive Spin", "Dynamic Jitter", "Hybrid Yaw", "Wraith", "Random Jitter", "Spin Jitter", "Cycle Spin", "Switch Random", "Switch Jitter", "Random Static", "Flick", "Static Flick", "Adaptive", "Wave", "Defensive Yaw", "Step", "Fake 90°", "Static Flip" }) menu_.Antiaim[i].defensive_yaw_custom = ui_new_slider(TAB[1], TAB[2], "Custom [" .. tag .. "]", -180, 180, 0, true, "°") menu_.Antiaim[i].defensive_yaw_custom1 = ui_new_slider(TAB[1], TAB[2], "Custom 2 [" .. tag .. "]", -180, 180, 0, true, "°") menu_.Antiaim[i].defensive_yaw_sideways_left = ui_new_slider(TAB[1], TAB[2], "Sideways L [" .. tag .. "]", -180, 180, -90, true, "°") menu_.Antiaim[i].defensive_yaw_sideways_right = ui_new_slider(TAB[1], TAB[2], "Sideways R [" .. tag .. "]", -180, 180, 90, true, "°") menu_.Antiaim[i].defensive_pitch_min = ui_new_slider(TAB[1], TAB[2], "Pitch Min [" .. tag .. "]", -89, 89, 0, true, "°") menu_.Antiaim[i].defensive_pitch_max = ui_new_slider(TAB[1], TAB[2], "Pitch Max [" .. tag .. "]", -89, 89, 0, true, "°") menu_.Antiaim[i].defensive_pitch_switch = ui_new_slider(TAB[1], TAB[2], "Pitch Switch [" .. tag .. "]", 1, 14, 1, true, "t") menu_.Antiaim[i].defensive_pitch_speed = ui_new_slider(TAB[1], TAB[2], "Pitch Speed [" .. tag .. "]", 1, 45, 0, true) menu_.Antiaim[i].defensive_pitch_cycle_start = ui_new_slider(TAB[1], TAB[2], "Cycle Start [" .. tag .. "]", -89, 89, -89, true, "°") menu_.Antiaim[i].defensive_pitch_cycle_end = ui_new_slider(TAB[1], TAB[2], "Cycle End [" .. tag .. "]", -89, 89, 89, true, "°") menu_.Antiaim[i].defensive_pitch_wave_period = ui_new_slider(TAB[1], TAB[2], "Wave Period [" .. tag .. "]", 5, 100, 30, true, "ms") menu_.Antiaim[i].defensive_pitch_wave_type = ui_new_combobox(TAB[1], TAB[2], "Wave Type [" .. tag .. "]", { "Triangle", "Sine", "Saw" }) menu_.Antiaim[i].defensive_pitch_wave_invert = ui_new_checkbox(TAB[1], TAB[2], "Wave Invert [" .. tag .. "]") menu_.Antiaim[i].defensive_pitch_jitter_speed = ui_new_slider(TAB[1], TAB[2], "Jitter Speed [" .. tag .. "]", 1, 50, 0, true, "t") menu_.Antiaim[i].defensive_yaw_min = ui_new_slider(TAB[1], TAB[2], "Yaw Min [" .. tag .. "]", -180, 180, 0, true, "°") menu_.Antiaim[i].defensive_yaw_max = ui_new_slider(TAB[1], TAB[2], "Yaw Max [" .. tag .. "]", -180, 180, 0, true, "°") menu_.Antiaim[i].defensive_yaw_switch = ui_new_slider(TAB[1], TAB[2], "Yaw Switch [" .. tag .. "]", 1, 14, 1, true, "t") menu_.Antiaim[i].defensive_yaw_speed = ui_new_slider(TAB[1], TAB[2], "Yaw Speed [" .. tag .. "]", 1, 45, 0, true) menu_.Antiaim[i].defensive_yaw_cycle_start = ui_new_slider(TAB[1], TAB[2], "Cycle Start [" .. tag .. "]", -180, 180, -180, true, "°") menu_.Antiaim[i].defensive_yaw_cycle_end = ui_new_slider(TAB[1], TAB[2], "Cycle End [" .. tag .. "]", -180, 180, 180, true, "°") menu_.Antiaim[i].defensive_yaw_180z_speed = ui_new_slider(TAB[1], TAB[2], "180Z Speed [" .. tag .. "]", 1, 45, 10, true, "t") menu_.Antiaim[i].defensive_yaw_jitter_speed = ui_new_slider(TAB[1], TAB[2], "Jitter Speed [" .. tag .. "]", 1, 50, 0, true, "t") menu_.Antiaim[i].defensive_yaw_full = ui_new_slider(TAB[1], TAB[2], "Yaw Full [" .. tag .. "]", 0, 360, 0, true, "°") menu_.Antiaim[i].defensive_yaw_cycle_invert = ui_new_checkbox(TAB[1], TAB[2], "Cycle Invert [" .. tag .. "]") menu_.Antiaim[i].defensive_yaw_clock_step_size = ui_new_slider(TAB[1], TAB[2], "Clock Step [" .. tag .. "]", 1, 90, 30, true, "°") menu_.Antiaim[i].defensive_yaw_clock_jitter = ui_new_slider(TAB[1], TAB[2], "Clock Jitter [" .. tag .. "]", 0, 90, 30, true) menu_.Antiaim[i].defensive_yaw_clock_base = ui_new_slider(TAB[1], TAB[2], "Clock Base [" .. tag .. "]", -180, 180, 0, true, "°") menu_.Antiaim[i].defensive_yaw_clock_dir = ui_new_combobox(TAB[1], TAB[2], "Clock Dir [" .. tag .. "]", { "Clockwise", "Counter-Clockwise" }) -- Flick menu_.Antiaim[i].flick_enabled = ui_new_checkbox(TAB[1], TAB[2], "Flick [" .. tag .. "]") menu_.Antiaim[i].flick_mode = ui_new_combobox(TAB[1], TAB[2], "Flick Mode [" .. tag .. "]", { "Default", "Silent" }) menu_.Antiaim[i].flick_pitch = ui_new_slider(TAB[1], TAB[2], "Flick Pitch [" .. tag .. "]", -89, 89, 0, true, "°") menu_.Antiaim[i].flick_pitch2 = ui_new_slider(TAB[1], TAB[2], "Flick Pitch 2 [" .. tag .. "]", -89, 89, 0, true, "°") menu_.Antiaim[i].flick_yaw = ui_new_slider(TAB[1], TAB[2], "Flick Yaw [" .. tag .. "]", -180, 180, 120, true, "°") menu_.Antiaim[i].flick_yaw2 = ui_new_slider(TAB[1], TAB[2], "Flick Yaw 2 [" .. tag .. "]", -180, 180, 0, true, "°") menu_.Antiaim[i].flick_yaw_random = ui_new_slider(TAB[1], TAB[2], "Yaw Random [" .. tag .. "]", 0, 180, 0, true) menu_.Antiaim[i].flick_limit = ui_new_slider(TAB[1], TAB[2], "Flick Limit [" .. tag .. "]", 0, 60, 60, true) menu_.Antiaim[i].flick_speed = ui_new_slider(TAB[1], TAB[2], "Flick Speed [" .. tag .. "]", 2, 60, 7, true) menu_.Antiaim[i].flick_speed_random = ui_new_slider(TAB[1], TAB[2], "Speed Random [" .. tag .. "]", 0, 8, 0, true) -- Flick advanced menu_.Antiaim[i].flick_tick_mode = ui_new_combobox(TAB[1], TAB[2], "Flick Tick Mode [" .. tag .. "]", { "Static", "Random", "Random Static", "Jitter", "Cycle" }) menu_.Antiaim[i].flick_tick_min = ui_new_slider(TAB[1], TAB[2], "Flick Min [" .. tag .. "]", 1, 22, 7, true, "t") menu_.Antiaim[i].flick_tick_max = ui_new_slider(TAB[1], TAB[2], "Flick Max [" .. tag .. "]", 1, 22, 10, true, "t") menu_.Antiaim[i].flick_time = ui_new_slider(TAB[1], TAB[2], "Flick Time [" .. tag .. "]", 1, 22, 2, true, "t") menu_.Antiaim[i].flick_back_time = ui_new_slider(TAB[1], TAB[2], "Back Time [" .. tag .. "]", 1, 22, 8, true, "t") end end -- 初始化 local function on_loading() ui_set(references.yaw[2], 0) ui_set(references.jitter[1], "Off") ui_set(references.jitter[2], 0) ui_set(references.body_yaw[1], "Off") ui_set(references.body_yaw[2], 0) end on_loading() generate_antiaim() ---------------------------------------------------------------防御功能 - 基于Obsidian tick检测 local defensive_func = { update_cmdnumber = function(cmd) vars.def.cmd_num = cmd.command_number end, is_defensive_active = function() local me = entity_get_local_player() if me == nil then return false end if (not ui_get(references.onshot[1]) or not ui_get(references.onshot[2])) and (not ui_get(references.doubletap[1]) or not ui_get(references.doubletap[2])) or ui_get(references.fakeduck) then return false end local def_ticks = vars.exploit.defensive.left local state_idx = vars.state.idx local range1 = ui_get(menu_.Antiaim[state_idx].def_range1) local range2 = ui_get(menu_.Antiaim[state_idx].def_range2) local mode = ui_get(menu_.Antiaim[state_idx].defensive_check_mode) if mode == "Tickbase" then return def_ticks > 0 elseif mode == "Custom" then return def_ticks >= range1 and def_ticks <= range2 elseif mode == "Always" then return true elseif mode == "LC End" then return def_ticks > 0 and def_ticks <= math.max(1, range1) elseif mode == "Duration" then return def_ticks > 0 and def_ticks <= math.max(1, range2) else return def_ticks > 0 end end, reset_defensive = function() vars.def.tickbase = 0 vars.def.checker = 0 vars.defensive_wait_ticks = 0 vars.defensive_run_ticks = 0 vars.defensive_delay = false vars.cathode_state.tick.max = 0 vars.cathode_state.tick.left = 0 exploit_reset() end } ---------------------------------------------------------------方法缓存 local methodCache = { counter1 = 0, counter2 = 0, yaw1 = 0, yaw2 = 0, yaw3 = 0, body1 = 0, body2 = 0, body3 = 0, switch = { boolean1 = false, boolean2 = false, boolean3 = false }, lc_invert = false, lc_last = true } local random_jitter = 0 ---------------------------------------------------------------状态检测 local function detect_state(cmd) local lp = entity_get_local_player() if not lp or not entity_is_alive(lp) then return end exploit_on_setup(cmd) local flags = entity_get_prop(lp, "m_fFlags") or 0 local on_ground = bit_band(flags, 1) ~= 0 local crouching = is_crouching(lp) local speed_2d = get_velocity_2d(lp) local moving = speed_2d > 5 -- 手动AA检测 local left = ui_get(menu_.Antiaim.extra.manual_left) local right = ui_get(menu_.Antiaim.extra.manual_right) local forward = ui_get(menu_.Antiaim.extra.manual_forward) if left or right or forward then if left then vars.manual_dir = "Left" elseif right then vars.manual_dir = "Right" elseif forward then vars.manual_dir = "Forward" end vars.state.idx = 10 vars.state.name = "Manual" return else vars.manual_dir = nil end -- Legit AA if contains(ui_get(menu_.Antiaim.extra.extra), "Legit AA") then vars.state.idx = 9 vars.state.name = "Legit AA" return end -- 基于Obsidian的状态检测 if not on_ground then if crouching then vars.state.idx = 8 vars.state.name = "Air Duck" else vars.state.idx = 7 vars.state.name = "Air" end return end if on_ground then if crouching then if moving then vars.state.idx = 5 vars.state.name = "Crouch Move" else vars.state.idx = 4 vars.state.name = "Crouch" end return end if moving then if ui_get(references.slow_walk[2]) then vars.state.idx = 6 vars.state.name = "Slowwalk" else vars.state.idx = 3 vars.state.name = "Moving" end return end vars.state.idx = 2 vars.state.name = "Standing" return end vars.state.idx = 1 vars.state.name = "Global" end ---------------------------------------------------------------手动AA local bind_system = { l_press = false, r_press = false, f_press = false, b_press = false, last_manual = "reset", } local function manual() local left_state, right_state, forward_state, back_state, freestand_state = ui_get(menu_.Antiaim.extra.manual_left), ui_get(menu_.Antiaim.extra.manual_right), ui_get(menu_.Antiaim.extra.manual_forward), ui_get(menu_.Antiaim.extra.manual_back), ui_get(menu_.Antiaim.extra.manual_freestand) ui_set(references.freestanding[1], freestand_state) ui_set(references.freestanding[2], freestand_state and "Always on" or "On hotkey") if not right_state and not left_state and not forward_state then bind_system.last_manual = "reset" end bind_system.r_press = right_state and bind_system.last_manual ~= "right" bind_system.l_press = left_state and bind_system.last_manual ~= "left" bind_system.f_press = forward_state and bind_system.last_manual ~= "forward" bind_system.b_press = back_state and bind_system.last_manual ~= "reset" if bind_system.r_press then menu_.Antiaim.extra.manual_state = menu_.Antiaim.extra.manual_state == 2 and 0 or 2 bind_system.last_manual = "right" end if bind_system.l_press then menu_.Antiaim.extra.manual_state = menu_.Antiaim.extra.manual_state == 1 and 0 or 1 bind_system.last_manual = "left" end if bind_system.f_press then menu_.Antiaim.extra.manual_state = menu_.Antiaim.extra.manual_state == 3 and 0 or 3 bind_system.last_manual = "forward" end if bind_system.b_press then menu_.Antiaim.extra.manual_state = 0 bind_system.last_manual = "reset" end end ---------------------------------------------------------------方法表 local methods = { jitt = function(a, b) local desync = entity_get_prop(entity_get_local_player(), "m_flPoseParameter", 11) * 120 - 60 return (desync < 0 and a or b) end, rand = function(a, b) return math.random(a, b) end, count_cache = function(cmd, a, b) if cmd.chokedcommands == 0 then methodCache.counter1 = methodCache.counter1 + 1 end if methodCache.counter1 >= 10 then methodCache.counter1 = 0 end if methodCache.counter1 == 0 then return a elseif methodCache.counter1 == 1 then return a elseif methodCache.counter1 == 2 then return b elseif methodCache.counter1 == 3 then return a elseif methodCache.counter1 == 4 then return b elseif methodCache.counter1 == 5 then return b elseif methodCache.counter1 == 6 then return b elseif methodCache.counter1 == 7 then return a elseif methodCache.counter1 == 8 then return b elseif methodCache.counter1 == 9 then return a end return 0 end, binary = function(cmd, a, b) if cmd.chokedcommands == 0 then random_jitter = client.random_int(0, 1) == 1 and 1 or -1 end return (random_jitter == -1 and a or b or 0) end, experimental = function(cmd, a, b) if cmd.chokedcommands == 0 then methodCache.counter2 = methodCache.counter2 + 1 end if methodCache.counter2 >= 10 then methodCache.counter2 = 0 end if methodCache.counter2 == 0 then return a elseif methodCache.counter2 == 1 then return b elseif methodCache.counter2 == 2 then return b elseif methodCache.counter2 == 3 then return a elseif methodCache.counter2 == 4 then return b elseif methodCache.counter2 == 5 then return a elseif methodCache.counter2 == 6 then return a elseif methodCache.counter2 == 7 then return b elseif methodCache.counter2 == 8 then return a elseif methodCache.counter2 == 9 then return b elseif methodCache.counter2 == 10 then return b end end, automatic = function(cmd, a, b) local int = client.random_int(1, 6) if cmd.command_number % int == 1 then methodCache.switch.boolean1 = not methodCache.switch.boolean1 if methodCache.switch.boolean1 then methodCache.yaw1, methodCache.body1 = b, -60 else methodCache.yaw1, methodCache.body1 = a, 60 end end return methodCache.yaw1, methodCache.body1 end, remainder = function(cmd, a, b) if cmd.command_number % 6 == 1 then methodCache.switch.boolean2 = not methodCache.switch.boolean2 if methodCache.switch.boolean2 then methodCache.yaw2, methodCache.body2 = b, -123 else methodCache.yaw2, methodCache.body2 = a, 123 end end return methodCache.yaw2, methodCache.body2 end, slowSwitch = function(a, b, key) local delay = ui_get(menu_.Antiaim[key].yaw_delay) local target = delay * 2 local inverted = (globals.tickcount() % target) >= delay return inverted and a or b end, god = function(cmd, a, b) if cmd.command_number % 5 == 1 then methodCache.switch.boolean3 = not methodCache.switch.boolean3 if methodCache.switch.boolean3 then methodCache.yaw3, methodCache.body3 = b > 0 and math.random(20, b) or math.random(b, 0), -60 else methodCache.yaw3, methodCache.body3 = a > 0 and math.random(20, a) or math.random(a, 0), 60 end end return methodCache.yaw3, methodCache.body3 end, xways = function(cmd, ways, way, data) if cmd.chokedcommands == 0 then if globals_tickcount() + ui_get(data.delay[way]) < vars.current_tick then vars.current_tick = globals_tickcount() end if vars.current_tick + ui_get(data.delay[way]) <= globals_tickcount() then vars.way = way < ways and way + 1 or 1 vars.current_tick = globals_tickcount() elseif way > ways then vars.way = 1 end elseif way > ways then vars.way = 1 end local bodyyaw = (ui_get(data.yaw[way]) == 0 and 0) or (ui_get(data.yaw[way]) > 0 and 123 or -123) return ui_get(data.yaw[way]), bodyyaw end, lc = function (a,b) return methodCache.lc_last == true and a or b end } local function lc_check(cmd) local exploit = (ui_get(references.doubletap[1]) and ui_get(references.doubletap[2])) or (ui_get(references.onshot[1]) and ui_get(references.onshot[2])) local fd = ui_get(references.fakeduck) local break_lc = vars.def.tickbase > 1 and vars.def.tickbase < 14 if (not exploit or fd) and cmd.chokedcommands == 0 then methodCache.lc_last = math.random(0,1) == 0 and true or false elseif ui_get(menu_.Antiaim[vars.state.idx].yaw_logic) == "LC Avoid" and not break_lc and cmd.chokedcommands == 0 then methodCache.lc_invert = true elseif ui_get(menu_.Antiaim[vars.state.idx].yaw_logic) == "LC Base" and break_lc and cmd.chokedcommands == 0 then methodCache.lc_invert = true end if methodCache.lc_invert == true and cmd.chokedcommands == 0 then methodCache.lc_last = not methodCache.lc_last methodCache.lc_invert = false end end ---------------------------------------------------------------Jitter解析 local function resolve_jitter(aa) local jt = ui_get(aa.jitter_type) local jitter_offset = 0 local jitter_val = 0 local jitter_mode = "Off" if jt == "3-Way" or jt == "5-Way" then local ways = jt == "3-Way" and 3 or 5 local way_idx = (globals_tickcount() % ways) + 1 jitter_offset = ui_get(aa["jitter_way" .. way_idx]) elseif jt == "Frequence" then local spd = ui_get(aa.jitter_freq_speed) local side = math.floor(globals_tickcount() / (spd > 0 and spd or 1)) % 2 == 0 jitter_offset = side and ui_get(aa.jitter_val1) or ui_get(aa.jitter_val2) elseif jt == "Randomize" then if globals_chokedcommands() == 0 then local spd = ui_get(aa.jitter_freq_speed) if spd > 0 and math.random(1, spd) == 1 then jitter_offset = math.random(0, 1) == 0 and ui_get(aa.jitter_val1) or ui_get(aa.jitter_val2) end end elseif jt == "Skitter" then jitter_offset = globals_tickcount() % 2 == 0 and ui_get(aa.jitter_val1) or -ui_get(aa.jitter_val1) elseif jt ~= "Off" then local jm = ui_get(aa.jitter_mode) if jm == "Spin" then jitter_val = math.sin(globals_tickcount() * 0.05) * (ui_get(aa.jitter_val2) or 0) + (ui_get(aa.jitter_val1) or 0) elseif jm == "Random" then jitter_val = math.random(0, 1) == 1 and ui_get(aa.jitter_val2) or ui_get(aa.jitter_val1) elseif jm == "Switch" then jitter_val = globals_tickcount() % 6 <= 2 and ui_get(aa.jitter_val2) or ui_get(aa.jitter_val1) else jitter_val = ui_get(aa.jitter_val1) end jitter_mode = jt end local rand_range = ui_get(aa.jitter_rand) if rand_range > 0 then jitter_offset = jitter_offset + math.random(-rand_range, rand_range) jitter_val = jitter_val + math.random(-rand_range, rand_range) end return normalize_yaw(jitter_offset), jitter_mode, normalize_yaw(jitter_val) end ---------------------------------------------------------------Body Yaw延迟状态更新 local function update_body_delay_state(aa) if globals_chokedcommands() ~= 0 then return end if ui_get(aa.body_delay_mode) == "Static" then local d = ui_get(aa.body_delay_ticks) vars.body_packets = vars.body_packets > d * 2 - 2 and 0 or vars.body_packets + 1 return end local sw_ticks = ui_get(aa.body_delay_switch) vars.body_delay.switch_ticks = (sw_ticks == 0 and -1) or (vars.body_delay.switch_ticks > sw_ticks - 2 and 0 or vars.body_delay.switch_ticks + 1) if vars.body_delay.switch_ticks == 0 then vars.body_delay.switch = not vars.body_delay.switch end local ws = vars.body_delay.work_side or "left" local other_side = ws == "left" and "right" or "left" local target_side = vars.body_delay.switch and other_side or ws local target_lim = ui_get(aa["body_delay_" .. target_side]) - 2 vars.body_delay[ws] = vars.body_delay[ws] or 0 if vars.body_delay[ws] > target_lim then vars.body_delay.work_side = other_side vars.body_delay[other_side] = 0 end local active_side = vars.body_delay.work_side or "left" local mirror_side = active_side == "left" and "right" or "left" local use_side = vars.body_delay.switch and mirror_side or active_side local lim = ui_get(aa["body_delay_" .. use_side]) - 2 vars.body_delay[active_side] = (vars.body_delay[active_side] or 0) > lim and 0 or (vars.body_delay[active_side] or 0) + 1 end ---------------------------------------------------------------Body Yaw解析 local function resolve_body_yaw(aa) update_body_delay_state(aa) local bym = ui_get(aa.body_yaw) if bym == "Static" then vars.body_inverted = ui_get(aa.body_side) == 1 elseif bym == "Jitter" then if ui_get(aa.body_delay_mode) == "Switch" then vars.body_inverted = (vars.body_delay.work_side or "left") == "right" else local d = ui_get(aa.body_delay_ticks) vars.body_inverted = (vars.body_packets or 0) % (d * 2) >= d end end return bym == "Jitter" and "Static" or bym, vars.body_inverted and 1 or -1 end ---------------------------------------------------------------AA处理器 local function antiaim_handler(cmd) if not ui_get(menu_.setup) then return end local os_trigger = vars.is_fire local reduce = ui_get(menu_.reducer) if (contains(reduce, "Force Defensive")) and os_trigger then cmd.force_defensive = true end if (contains(reduce, "No Choke")) and os_trigger then cmd.allow_send_packet = true cmd.no_choke = true end manual() lc_check(cmd) local is_defensive = defensive_func.is_defensive_active() if is_defensive and ui_get(menu_.Antiaim[vars.state.idx].defensive_enable) and (ui_get(menu_.Antiaim[vars.state.idx].defensive_pitch) ~= "Off" or ui_get(menu_.Antiaim[vars.state.idx].defensive_yaw) ~= "Off") then return end local aa = menu_.Antiaim[vars.state.idx] -- Yaw Logic local yaw_default = ui_get(aa.yaw_logic) == "Default" or ui_get(aa.yaw_logic) == "Static" local yaw_jitter = ui_get(aa.yaw_logic) == "L & R" local yaw_random = ui_get(aa.yaw_logic) == "Random" local yaw_slow = ui_get(aa.yaw_logic) == "Slow" local yaw_control = ui_get(aa.yaw_logic) == "Control" local yaw_binary = ui_get(aa.yaw_logic) == "Binary" local yaw_experimental = ui_get(aa.yaw_logic) == "Experimental" local yaw_randomint = ui_get(aa.yaw_logic) == "Random int" local yaw_remainder = ui_get(aa.yaw_logic) == "Remainder" local yaw_god = ui_get(aa.yaw_logic) == "Labyrinth" local yaw_xways = ui_get(aa.yaw_logic) == "Xways" local yaw_lc_a = ui_get(aa.yaw_logic) == "LC Avoid" local yaw_lc_b = ui_get(aa.yaw_logic) == "LC Base" -- Yaw Jitter Logic local jitter_range_jitter = ui_get(aa.yaw_jitter_logic) == "L & R" local jitter_range_random = ui_get(aa.yaw_jitter_logic) == "Random" -- Body Yaw Logic local body_yaw_jitter = ui_get(aa.body_yaw_logic) == "L & R" local body_yaw_random = ui_get(aa.body_yaw_logic) == "Random" local body_yaw_momentum = ui_get(aa.body_yaw_logic) == "Momentum" local body_yaw_slow = ui_get(aa.body_yaw_logic) == "Slow" local body_yaw_current = ui_get(aa.body_yaw_logic) == "Current" -- Manual local is_manual = contains(ui_get(menu_.Antiaim.extra.extra), "Manual Anti-Aim") and ui_get(menu_.setup) local left = menu_.Antiaim.extra.manual_state == 1 and is_manual local right = menu_.Antiaim.extra.manual_state == 2 and is_manual local forward = menu_.Antiaim.extra.manual_state == 3 and is_manual local manual_static = ui_get(menu_.Antiaim.extra.manual_static) and is_manual -- Legit AA if vars.state.name == "Legit AA" then if cmd.chokedcommands == 0 then cmd.in_use = 0 end ui_set(references.pitch[1], "Off") ui_set(references.yaw[1], "180"); ui_set(references.yaw[2], 0) ui_set(references.yaw_jitter[1], "Off") ui_set(references.body_yaw[1], "Static"); ui_set(references.body_yaw[2], 0) ui_set(references.roll, 0) return end -- Manual yaw local yaw_offset = ui_get(aa.global_yaw) if left then yaw_offset = -90 elseif right then yaw_offset = 90 elseif forward then yaw_offset = 180 else yaw_offset = yaw_offset + (vars.body_inverted and ui_get(aa.yaw_right) or ui_get(aa.yaw_left)) end -- Yaw mode local ym = ui_get(aa.yaw_mode) if ym == "Spin" then yaw_offset = yaw_offset + normalize_yaw(globals_tickcount() * ui_get(aa.spin_speed)) elseif ym == "Rotation" then local steps = ui_get(aa.rotation_steps) local step_angle = 360 / steps local cur_step = globals_tickcount() % (steps * 8) yaw_offset = yaw_offset + normalize_yaw(math.floor(cur_step / 8) * step_angle) end -- Yaw logic local yaw_final = yaw_offset if yaw_default then yaw_final = yaw_offset + ui_get(aa.jitter_left) elseif yaw_jitter then yaw_final = yaw_offset + methods.jitt(ui_get(aa.jitter_left), ui_get(aa.jitter_right)) elseif yaw_random then yaw_final = yaw_offset + methods.rand(ui_get(aa.jitter_left), ui_get(aa.jitter_right)) elseif yaw_slow then yaw_final = yaw_offset + methods.slowSwitch(ui_get(aa.jitter_left), ui_get(aa.jitter_right), vars.state.idx) elseif yaw_control then yaw_final = yaw_offset + methods.count_cache(cmd, ui_get(aa.jitter_left), ui_get(aa.jitter_right)) elseif yaw_binary then yaw_final = yaw_offset + methods.binary(cmd, ui_get(aa.jitter_left), ui_get(aa.jitter_right)) elseif yaw_experimental then yaw_final = yaw_offset + methods.experimental(cmd, ui_get(aa.jitter_left), ui_get(aa.jitter_right)) elseif yaw_randomint then yaw_final = normalize_yaw(automatic_yaw) elseif yaw_remainder then yaw_final = normalize_yaw(remainder_yaw) elseif yaw_god then yaw_final = normalize_yaw(god_yaw) elseif yaw_xways then yaw_final = xways_yaw elseif yaw_lc_a or yaw_lc_b then yaw_final = methods.lc(ui_get(aa.jitter_left), ui_get(aa.jitter_right)) end -- Jitter local jitter_offset, jitter_mode, jitter_val = resolve_jitter(aa) if jitter_mode ~= "Off" then ui_set(references.yaw_jitter[1], jitter_mode) ui_set(references.yaw_jitter[2], jitter_val) else ui_set(references.yaw_jitter[1], "Off") end yaw_final = yaw_final + jitter_offset -- 应用Yaw ui_set(references.yaw_base, ui_get(aa.yaw_base)) ui_set(references.yaw[1], "180") ui_set(references.yaw[2], normalize_yaw(yaw_final)) -- Pitch local pitch_mode = ui_get(aa.pitch) if pitch_mode == "Custom" then ui_set(references.pitch[1], "Custom") ui_set(references.pitch[2], ui_get(aa.pitch_value)) elseif pitch_mode == "Random" then ui_set(references.pitch[1], "Custom") ui_set(references.pitch[2], math.random(-89, 89)) elseif pitch_mode == "Off" then ui_set(references.pitch[1], "Off") else ui_set(references.pitch[1], pitch_mode) end -- Body Yaw local by_mode, by_side = resolve_body_yaw(aa) ui_set(references.body_yaw[1], by_mode) ui_set(references.body_yaw[2], by_side) ui_set(references.freestanding_body_yaw, ui_get(aa.fs_body_yaw)) -- Roll ui_set(references.roll, ui_get(aa.roll_amount)) -- Height advantage if contains(ui_get(menu_.Antiaim.extra.extra), "Height advantage") then local threat = client.current_threat() if threat then local lx, ly, lz = entity_get_prop(lp, "m_vecOrigin") local tx, ty, tz = entity_get_prop(threat, "m_vecOrigin") if lz and tz and (lz - tz) > ui_get(aa.height_safe) then ui_set(references.pitch[1], "Down") ui_set(references.yaw[2], 0) ui_set(references.yaw_jitter[1], "Off") ui_set(references.body_yaw[1], "Static") ui_set(references.body_yaw[2], 0) end end end -- Safe Head if contains(ui_get(menu_.Antiaim.extra.extra), "Safe Head") and lp then local weapon = entity_get_player_weapon(lp) if weapon then local class = entity_get_classname(weapon) if class == "CKnife" or class == "CWeaponTaser" then if not is_on_ground(lp) then ui_set(references.yaw[1], "180") ui_set(references.yaw[2], 1) ui_set(references.yaw_jitter[2], 0) ui_set(references.body_yaw[1], "Static") ui_set(references.body_yaw[2], 50) end end end end -- Backstab local bs = ui_get(aa.backstab) if bs ~= "Off" then local threat = client.current_threat() if threat then local weapon = entity_get_player_weapon(threat) if weapon and entity_get_classname(weapon) == "CKnife" then local dist = get_velocity_2d(lp) -- 简化距离判断 if dist < 200 then if bs == "Forward" then ui_set(references.yaw_base, "Local view") ui_set(references.yaw[1], "180") ui_set(references.yaw[2], 0) ui_set(references.yaw_jitter[1], "Off") ui_set(references.body_yaw[1], "Static") ui_set(references.body_yaw[2], 0) elseif bs == "Random" then ui_set(references.yaw[2], math.random(-180, 180)) ui_set(references.yaw_jitter[1], "Center") ui_set(references.yaw_jitter[2], 60) end end end end end if cmd.chokedcommands ~= 0 and not ((vars.defensive_run_ticks == globals_tickcount()) or (vars.defensive_run_ticks == globals_tickcount() - 1) or (vars.defensive_run_ticks == globals_tickcount() - 2)) then return end end ---------------------------------------------------------------防御处理器 local def_value = 0 local def_switched = false local function flick_handler(cmd) if not ui_get(menu_.setup) then vars.flick_active = false return end local state_idx = vars.state.idx local flick_enabled = ui_get(menu_.Antiaim[state_idx].flick_enabled) if not flick_enabled or not ui_get(menu_.Antiaim[state_idx].defensive_enable) then vars.flick_active = false return end local is_dt = ui_get(references.doubletap[1]) and ui_get(references.doubletap[2]) local is_os = ui_get(references.onshot[1]) and ui_get(references.onshot[2]) local is_fd = ui_get(references.fakeduck) if not (is_dt or is_os) or is_fd then vars.flick_active = false return end local weapon = entity_get_player_weapon(entity_get_local_player()) if weapon == nil then vars.flick_active = false return end -- 排除武器 local weapon_classname = entity_get_classname(weapon) local weapon_idx = bit_band(entity_get_prop(weapon, "m_iItemDefinitionIndex"), 0xFFFF) if weapon_classname == "CKnife" or weapon_classname == "CWeaponTaser" or weapon_idx == 64 then vars.flick_active = false return end -- 检查防御是否激活 if not defensive_func.is_defensive_active() then vars.flick_active = false return end local flick_mode = ui_get(menu_.Antiaim[state_idx].flick_mode) local enforce_silent = (flick_mode == "Silent") local allow_apply = (not enforce_silent) or (cmd.chokedcommands > 0) if not vars.flick_active then vars.flick_active = true vars.flick_ticks = 0 local base_speed = ui_get(menu_.Antiaim[state_idx].flick_speed) local speed_random = ui_get(menu_.Antiaim[state_idx].flick_speed_random) vars.flick_speed_current = base_speed + (speed_random > 0 and client.random_int(0, speed_random) or 0) vars.flick_swap_interval = math.max(1, 12 - math.floor(vars.flick_speed_current)) vars.flick_swap_counter = 0 vars.flick_pitch_value1 = ui_get(menu_.Antiaim[state_idx].flick_pitch) vars.flick_pitch_value2 = ui_get(menu_.Antiaim[state_idx].flick_pitch2) vars.flick_yaw_value1 = ui_get(menu_.Antiaim[state_idx].flick_yaw) vars.flick_yaw_value2 = ui_get(menu_.Antiaim[state_idx].flick_yaw2) vars.flick_inverted = ui_get(menu_.Antiaim.extra.invert_flick) vars.flick_swap = false end local flick_limit = ui_get(menu_.Antiaim[state_idx].flick_limit) if vars.flick_ticks >= flick_limit then vars.flick_active = false vars.flick_swap = false vars.flick_swap_counter = 0 return end if allow_apply then vars.flick_ticks = vars.flick_ticks + 1 vars.flick_swap_counter = (vars.flick_swap_counter or 0) + 1 end local flick_pitch = ui_get(menu_.Antiaim[state_idx].flick_pitch) local flick_pitch2 = ui_get(menu_.Antiaim[state_idx].flick_pitch2) local flick_yaw = ui_get(menu_.Antiaim[state_idx].flick_yaw) local flick_yaw2 = ui_get(menu_.Antiaim[state_idx].flick_yaw2) local yaw_random = ui_get(menu_.Antiaim[state_idx].flick_yaw_random) local toggled_any = false local use_pitch = vars.flick_swap and flick_pitch2 or flick_pitch if allow_apply then ui_set(references.pitch[1], "Custom") ui_set(references.pitch[2], use_pitch) toggled_any = true end local base_yaw = vars.flick_swap and (flick_yaw2 or 0) or flick_yaw local final_yaw = base_yaw if yaw_random > 0 then final_yaw = final_yaw + client.random_int(-yaw_random, yaw_random) end if vars.flick_inverted then final_yaw = -final_yaw end if final_yaw > 180 then final_yaw = final_yaw - 360 end if final_yaw < -180 then final_yaw = final_yaw + 360 end if allow_apply then ui_set(references.yaw[1], "180") ui_set(references.yaw[2], final_yaw) ui_set(references.body_yaw[1], "Static") toggled_any = true end if toggled_any and vars.flick_swap_counter >= vars.flick_swap_interval then vars.flick_swap = not vars.flick_swap vars.flick_swap_counter = 0 end end local function defensive_handler(cmd) if not ui_get(menu_.setup) then vars.defensive_delay = false return end if (contains(ui_get(menu_.Misc.misc_combobox), "Disable force defensive on quickpeek") and ui_get(references.quick_peek[1]) and ui_get(references.quick_peek[2])) then vars.defensive_delay = false return end local is_dt = ui_get(references.doubletap[1]) and ui_get(references.doubletap[2]) local is_os = ui_get(references.onshot[1]) and ui_get(references.onshot[2]) local is_fd = ui_get(references.fakeduck) if (not (is_dt or is_os)) or is_fd then vars.defensive_wait_ticks = globals_tickcount() + 2 vars.defensive_delay = false end if globals_tickcount() < vars.defensive_wait_ticks + 17 then vars.defensive_delay = false return end if cmd.chokedcommands == 0 then vars.defensive_jitter = not vars.defensive_jitter if ui_get(menu_.Antiaim[vars.state.idx].defensive_pitch) == "Automatic" then def_value = def_value + (def_switched and ui_get(menu_.Antiaim[vars.state.idx].defensive_pitch_speed) or -ui_get(menu_.Antiaim[vars.state.idx].defensive_pitch_speed)) if math.ceil(def_value) >= 89 then def_switched = false elseif math.ceil(def_value) <= -89 then def_switched = true end end end if ui_get(menu_.Antiaim[vars.state.idx].defensive_force) then cmd.force_defensive = true end -- 基于Obsidian的防御检测 local def_ticks = vars.exploit.defensive.left local aa = menu_.Antiaim[vars.state.idx] local mode = ui_get(aa.defensive_check_mode) local range1 = clamp(ui_get(aa.def_range1), 0, 15) local range2 = clamp(ui_get(aa.def_range2), 0, 15) if range1 > range2 then range1, range2 = range2, range1 end local source_ticks = def_ticks local in_window = false if mode == "Tickbase" then in_window = source_ticks > 0 elseif mode == "Custom" then in_window = source_ticks >= range1 and source_ticks <= range2 elseif mode == "Always" then in_window = true elseif mode == "LC End" then in_window = source_ticks > 0 and source_ticks <= math.max(1, range1) elseif mode == "Duration" then in_window = source_ticks > 0 and source_ticks <= math.max(1, range2) elseif mode == "Flick" then local flick_time = ui_get(aa.flick_time) or 2 local back_time = ui_get(aa.flick_back_time) or 8 local cycle = flick_time + back_time local phase = (cmd.command_number % cycle) < flick_time in_window = source_ticks > 0 and phase else in_window = source_ticks > 0 end if ui_get(aa.defensive_enable) and in_window then vars.defensive_run_ticks = globals_tickcount() vars.exploit.def_aa = true cmd.force_defensive = 1 if ui_get(aa.defensive_control) then cmd.no_choke = true cmd.allow_send_packet = true ui_set(references.body_yaw[1], "Off") end else vars.exploit.def_aa = false end -- 防御性Pitch处理 if ui_get(aa.defensive_pitch) ~= "Off" then if ui_get(aa.defensive_pitch) == "Automatic" then ui_set(references.pitch[1], "Custom") ui_set(references.pitch[2], math.max(ui_get(aa.defensive_pitch_custom), math.min(ui_get(aa.defensive_pitch_custom1), def_value))) elseif ui_get(aa.defensive_pitch) == "Random" then ui_set(references.pitch[1], "Custom") ui_set(references.pitch[2], client.random_int(-89, 89)) elseif ui_get(aa.defensive_pitch) == "Jitter" then ui_set(references.pitch[1], "Custom") local v1 = ui_get(aa.defensive_pitch_custom) local v2 = ui_get(aa.defensive_pitch_custom1) ui_set(references.pitch[2], vars.defensive_jitter and v1 or v2) elseif ui_get(aa.defensive_pitch) == "Up" then ui_set(references.pitch[1], "Custom") ui_set(references.pitch[2], -89) elseif ui_get(aa.defensive_pitch) == "Down" then ui_set(references.pitch[1], "Custom") ui_set(references.pitch[2], 89) elseif ui_get(aa.defensive_pitch) == "Semi-0°" then ui_set(references.pitch[1], "Custom") local patterns = { -45, 45, -30, 30, 0, -60, 60 } local idx = (vars.semi_zero_state.tick % #patterns) + 1 vars.semi_zero_state.tick = vars.semi_zero_state.tick + 1 ui_set(references.pitch[2], patterns[idx]) end end -- 防御性Yaw处理 if ui_get(aa.defensive_yaw) ~= "Off" then if ui_get(aa.defensive_yaw) == "Jitter" then ui_set(references.yaw[1], "180") ui_set(references.yaw[2], vars.defensive_jitter and ui_get(aa.defensive_yaw_custom) or -ui_get(aa.defensive_yaw_custom)) ui_set(references.body_yaw[1], "Static") elseif ui_get(aa.defensive_yaw) == "Spin" then vars.defensive_spin_amout = vars.defensive_spin_amout + ui_get(aa.defensive_yaw_custom) if vars.defensive_spin_amout > 180 then vars.defensive_spin_amout = -180 elseif vars.defensive_spin_amout < -180 then vars.defensive_spin_amout = 180 end ui_set(references.yaw[1], "180") ui_set(references.yaw[2], vars.defensive_spin_amout) ui_set(references.body_yaw[1], "Static") elseif ui_get(aa.defensive_yaw) == "Random" then ui_set(references.yaw[1], "180") ui_set(references.yaw[2], client.random_int(-180, 180)) elseif ui_get(aa.defensive_yaw) == "L&R" then ui_set(references.yaw[1], "180") ui_set(references.yaw[2], vars.defensive_jitter and ui_get(aa.defensive_yaw_custom) or ui_get(aa.defensive_yaw_custom1)) elseif ui_get(aa.defensive_yaw) == "180" then ui_set(references.yaw[1], "180") ui_set(references.yaw[2], ui_get(aa.defensive_yaw_custom)) end end end ---------------------------------------------------------------武器列表 local weapons = { pistols = { "CWeaponHKP2000", "CWeaponElite", "CWeaponP250", "CWeaponFiveSeven", "CWeaponGlock", "CWeaponTec9" }, autoSnipers = { "CWeaponG3SG1", "CWeaponSCAR20" }, rifles = { "CWeaponM4A1", "CWeaponFamas", "CWeaponAug", "CWeaponGalilAR", "CAK47", "CWeaponSG556" }, nades = { "CHEGrenade", "CFlashbang", "CSmokeGrenade", "CMolotovGrenade", "CIncendiaryGrenade", "CDecoyGrenade" } } ---------------------------------------------------------------Killsay表 local killsay_normal = { "你已被 Obsidian.lua 击毙 ♡", "Obsidian sends regards.", "又一个被 Obsidian 支配的可怜虫", "Obsidian.lua — 无情的击杀机器", "别挣扎了,Obsidian 已经锁定你", "你的防御在 Obsidian 面前不堪一击", "Obsidian 判你死刑,立即执行", "技不如人,甘拜下风 —— Obsidian", "你已被 Obsidian 永久除名", "GG | Powered by Obsidian.lua", "Obsidian says: 下次注意走位", "你刚才做了什么?哦,你死了 —— Obsidian", "Obsidian.lua 精准制裁", "这就是和 Obsidian 对线的下场", "Obsidian 的子弹从不说谎", "你的准星对不上 Obsidian 的节奏", "Obsidian Anti-Aim: 你瞄得到算我输", "被我的 Obsidian 一枪带走,不冤吧?", "Obsidian.lua — 幻神级 AA 体验", "对面的,你的 resolver 解不了我", "Obsidian 已将你标记为免费击杀", "你只是 Obsidian 今日击杀统计的一部分", "想赢我?先过 Obsidian 这一关吧", "Obsidian: 你已经死了,只是还不知道而已", } local killsay_r18 = { "杂鱼这就不行啦❤~技术真菜❤~~wwww~~", "♡啊啦~那孩子~去了呢♡好舒服的样子呢~♡", "杂鱼♡别~别碰我♡呜~慢~慢一点啊", "呜♡有杂鱼恶心的东西进来了", "杂鱼~这么容易击败啊♡~真的好蠢哦♡", "变成~♡人家的~♡形状吧~♡", "呀❤被打倒了呢~杂鱼好弱啊♡", "杂鱼♡怎么这么快就倒了♡~不够尽兴呢❤", "讨厌~♡杂鱼的子弹好痒♡一点感觉都没有❤", "呜嗯♡杂鱼又死了♡~再来一次嘛~♡", "♡好热♡杂鱼的灵魂正在被吞噬呢❤", "啊♡杂鱼好可爱♡倒下的样子最棒了❤~~", "杂鱼~♡挡不住了吧♡~人家还没认真呢❤", "杂鱼的身体好老实啊♡~躺得真乖❤", "呜♡杂鱼你抖什么♡~害怕了吗❤~~", "杂鱼♡不要逃啊♡~人家追上来了哦❤", "♡好棒♡杂鱼又给了一个人头呢❤~~", "嘻嘻♡杂鱼真是最好的经验包❤", "杂鱼~♡你的准星在发抖哦♡~紧张了吗❤", "呜啊♡好舒服♡杂鱼的击杀奖励好多❤", "♡别、别看♡人家只是在虐杂鱼而已❤", "杂鱼♡要乖乖倒下哦♡~这是命令❤", "呜嗯~♡人家对杂鱼做了好过分的事❤~~", "杂鱼的身体诚实得很嘛♡~直接倒了呢❤", } ---------------------------------------------------------------Obsidian视觉函数 local function push_combat_notification(label, text, color, duration) if text == nil or text == "" then return end table.insert(vars.combat_notifications, 1, { label = tostring(label or "alert"), text = tostring(text), color = color or { ui_colors.primary[1], ui_colors.primary[2], ui_colors.primary[3] }, time = globals_realtime(), duration = duration or 2.8, alpha = 0, slide = 0 }) while #vars.combat_notifications > 5 do table.remove(vars.combat_notifications) end end local function get_camera_pos(ent) local ox, oy, oz = entity_get_prop(ent, "m_vecOrigin") if ox == nil then return nil end local _, _, view_ofs = entity_get_prop(ent, "m_vecViewOffset") local duck = entity_get_prop(ent, "m_flDuckAmount") or 0 return ox, oy, oz + (view_ofs or 64) - duck * 16 end local function fired_at_target(target, shooter, shot) local sx, sy, sz = get_camera_pos(shooter) local hx, hy, hz = entity_hitbox_position(target, 0) if sx == nil or hx == nil or shot == nil then return false end local shot_dx, shot_dy, shot_dz = shot[1] - sx, shot[2] - sy, shot[3] - sz local shot_len_sq = shot_dx * shot_dx + shot_dy * shot_dy + shot_dz * shot_dz if shot_len_sq <= 0.0001 then return false end local head_dx, head_dy, head_dz = hx - sx, hy - sy, hz - sz local proj = (head_dx * shot_dx + head_dy * shot_dy + head_dz * shot_dz) / shot_len_sq local closest_x = sx + shot_dx * proj local closest_y = sy + shot_dy * proj local closest_z = sz + shot_dz * proj local dist = math_sqrt((hx - closest_x) * (hx - closest_x) + (hy - closest_y) * (hy - closest_y) + (hz - closest_z) * (hz - closest_z)) local frac_shot = client.trace_line(shooter, shot[1], shot[2], shot[3], hx, hy, hz) local frac_head = client.trace_line(target, closest_x, closest_y, closest_z, hx, hy, hz) return dist < 69 and (frac_shot > 0.99 or frac_head > 0.99) end local function will_enemy_shoot_soon(enemy, local_player) if enemy == nil or local_player == nil then return false end if not entity_is_alive(enemy) or not entity_is_alive(local_player) then return false end local ex, ey, ez = get_camera_pos(enemy) local hx, hy, hz = entity_hitbox_position(local_player, 0) if ex == nil or hx == nil then return false end local dir_x, dir_y, dir_z = hx - ex, hy - ey, hz - ez local dir_len = math_sqrt(dir_x * dir_x + dir_y * dir_y + dir_z * dir_z) if dir_len <= 0.001 then return false end dir_x, dir_y, dir_z = dir_x / dir_len, dir_y / dir_len, dir_z / dir_len local pitch, yaw = entity_get_prop(enemy, "m_angEyeAngles") yaw = yaw or select(2, entity_get_prop(enemy, "m_angEyeAngles")) if yaw == nil then return false end local fx, fy, fz = angle_to_forward(pitch or 0, yaw) if fx * dir_x + fy * dir_y + fz * dir_z <= 0.975 then return false end if client.trace_line(enemy, ex, ey, ez, hx, hy, hz) <= 0.82 then return false end local weapon = entity_get_player_weapon(enemy) if weapon == nil then return false end local weapon_data = weapons_funcs[entity_get_prop(weapon, "m_iItemDefinitionIndex")] if weapon_data and (weapon_data.type == "knife" or weapon_data.type == "grenade") then return false end local clip1 = entity_get_prop(weapon, "m_iClip1") if clip1 ~= nil and clip1 <= 0 then return false end local soon_time = globals_curtime() + globals_tickinterval() * 2 local next_primary = entity_get_prop(weapon, "m_flNextPrimaryAttack") local next_player_attack = entity_get_prop(enemy, "m_flNextAttack") local can_shoot_weapon = next_primary == nil or soon_time >= next_primary local can_shoot_player = next_player_attack == nil or soon_time >= next_player_attack return can_shoot_weapon and can_shoot_player end local function update_combat_threat() local lp = entity_get_local_player() local rt = globals_realtime() if not lp or not entity_is_alive(lp) then vars.combat_threat = "idle" vars.combat_threat_name = "" vars.combat_threat_until = 0 vars.combat_pred_until = 0 return end if vars.combat_threat == "impact" and (vars.combat_threat_until or 0) > rt then return end if not contains(ui_get(menu_.Visuals.combat_alerts), "Threat Badge") then vars.combat_threat = "idle" vars.combat_threat_name = "" vars.combat_threat_until = 0 vars.combat_pred_until = 0 return end local best_enemy, best_dist local threat = client.current_threat() local enemies = entity_get_players(true) or {} local hx, hy, hz = entity_hitbox_position(lp, 0) local function consider_enemy(enemy) if enemy == nil or enemy == lp or not entity_is_enemy(enemy) or not entity_is_alive(enemy) then return end if not will_enemy_shoot_soon(enemy, lp) then return end local ex, ey, ez = get_camera_pos(enemy) if ex == nil or hx == nil then best_enemy = best_enemy or enemy return end local dx, dy, dz = hx - ex, hy - ey, hz - ez local dist = dx * dx + dy * dy + dz * dz if best_dist == nil or dist < best_dist then best_dist = dist best_enemy = enemy end end consider_enemy(threat) for i = 1, #enemies do if enemies[i] ~= threat then consider_enemy(enemies[i]) end end if best_enemy ~= nil then vars.combat_threat = "aimed" vars.combat_threat_name = entity.get_player_name(best_enemy) or ("enemy-" .. best_enemy) vars.combat_threat_until = 0 vars.combat_pred_until = rt + 0.22 elseif (vars.combat_pred_until or 0) <= rt then vars.combat_threat = "idle" vars.combat_threat_name = "" vars.combat_threat_until = 0 vars.combat_pred_until = 0 end end local function get_combat_badge_text() local rt = globals_realtime() if vars.combat_threat == "impact" and (vars.combat_threat_until or 0) > rt then return "impact" end if (vars.combat_pred_until or 0) > rt then return "aimed" end return nil end local function draw_combat_notifications(sw, sh, ir, ig, ib) if #vars.combat_notifications == 0 then return end local compact = ui_get(menu_.Visuals.hud_style) == "Mini" local pal = get_hud_palette(ir, ig, ib, 1) local rt = globals_realtime() local ft = globals_frametime() local h = compact and 34 or 38 local gap = 6 local base_y = sh - (compact and 128 or 144) for i = #vars.combat_notifications, 1, -1 do local entry = vars.combat_notifications[i] local ttl = entry.duration or 2.8 local alive = (rt - (entry.time or 0)) <= ttl entry.alpha = lerp(entry.alpha or 0, alive and 255 or 0, ft * (alive and 12 or 8)) entry.slide = lerp(entry.slide or 0, alive and 1 or 0, ft * (alive and 11 or 7)) local alpha = clamp(entry.alpha or 0, 0, 255) if alpha <= 1 and not alive then table.remove(vars.combat_notifications, i) else local label = tostring(entry.label or "alert") local text = tostring(entry.text or "") local color = entry.color or { ir, ig, ib } local w = math_max(compact and 194 or 220, math_max(renderer_measure_text("", label), renderer_measure_text("", text)) + 38) local x = math_floor(sw * 0.5 - w * 0.5) local slide = clamp(entry.slide or 0, 0, 1) local y = math_floor(base_y - (1 - slide) * 18) local mul = alpha / 255 draw_glass_panel(x, y, w, h, color[1], color[2], color[3], 0.95 * mul, compact) draw_round_rect(x + 8, y + 7, 3, h - 14, color[1], color[2], color[3], math_floor(alpha * 0.92), 2) draw_text_shadow(x + 18, y + (compact and 4 or 5), color[1], color[2], color[3], math_floor(alpha * 0.96), "", 0, label) draw_text_shadow(x + 18, y + (compact and 17 or 19), pal.text[1], pal.text[2], pal.text[3], math_floor(alpha * 0.94), "", 0, text) base_y = y - h - gap end end end local function collect_active_binds() local list = {} local function push(name, active, state) if active then list[#list + 1] = { name = name, state = state or "on" } end end push("Double tap", ui_get(references.doubletap[1]) and ui_get(references.doubletap[2]), "on") push("Slow motion", ui_get(references.slow_walk[2]), "hold") push("Fake duck", ui_get(references.fakeduck), "on") push("Manual yaw", vars.manual_dir ~= nil, vars.manual_dir and vars.manual_dir:lower() or "on") push("Defensive", defensive_func.is_defensive_active(), tostring(vars.exploit.defensive.left or 0) .. "t") return list end local function collect_spectators(local_player) local list = {} if not local_player then return list end local target = local_player local ob_target = entity_get_prop(local_player, "m_hObserverTarget") local ob_mode = entity_get_prop(local_player, "m_iObserverMode") if ob_target and (ob_mode == 4 or ob_mode == 5) then target = ob_target end for ent = 1, 64 do if ent ~= local_player and entity_get_classname(ent) == "CCSPlayer" and not entity_is_alive(ent) then local spec_target = entity_get_prop(ent, "m_hObserverTarget") local spec_mode = entity_get_prop(ent, "m_iObserverMode") if spec_target and spec_target == target and (spec_mode == 4 or spec_mode == 5) then list[#list + 1] = entity.get_player_name(ent) or ("spec-" .. ent) end end end return list end local function draw_custom_scope() if not ui_get(menu_.Visuals.scope_enable) then return end ui_set(references.scope_overlay, false) local sw, sh = client_screen_size() local lp = entity_get_local_player() if not lp or not entity_is_alive(lp) then return end local wpn = entity_get_player_weapon(lp) if not wpn then return end local scope_level = entity_get_prop(wpn, "m_zoomLevel") local scoped = entity_get_prop(lp, "m_bIsScoped") == 1 local is_valid = scope_level and scope_level > 0 and scoped local speed = ui_get(menu_.Visuals.scope_speed) local compact = ui_get(menu_.Visuals.hud_style) == "Mini" local anim_speed = globals_frametime() * math_max(6, speed * 2) scope_alpha = clamp(scope_alpha + (is_valid and anim_speed or -anim_speed), 0, 1) if scope_alpha <= 0 then return end local cx, cy = math_floor(sw * 0.5), math_floor(sh * 0.5) local offset = math_floor(ui_get(menu_.Visuals.scope_offset) * sh / 1080 + 0.5) local pos = math_floor(ui_get(menu_.Visuals.scope_pos) * sh / 1080 + 0.5) local cr, cg, cb, ca = ui_get(menu_.Visuals.scope_color) local pal = get_hud_palette(cr, cg, cb, scope_alpha) local a = math_floor(scope_alpha * ca + 0.5) local arm = math_max(1, pos - offset) local inner_len = compact and 12 or 16 local inner_gap = math_max(3, offset - (compact and 3 or 4)) local core = compact and 2 or 3 vars.hud_scope_breathe = vars.hud_scope_breathe + globals_frametime() * 5 local pulse = 0.55 + 0.45 * math_abs(math_sin(vars.hud_scope_breathe)) local main_alpha = math_floor(a * (0.72 + pulse * 0.22)) local sub_alpha = math_floor(a * (0.32 + pulse * 0.18)) draw_blur(cx - 18, cy - 18, 36, 36, math_floor(a * 0.42), compact and 4 or 5) renderer_gradient(cx - arm - offset, cy, arm, 1, cr, cg, cb, 0, cr, cg, cb, main_alpha, true) renderer_gradient(cx + offset, cy, arm, 1, cr, cg, cb, main_alpha, cr, cg, cb, 0, true) renderer_gradient(cx, cy - arm - offset, 1, arm, cr, cg, cb, 0, cr, cg, cb, main_alpha, false) renderer_gradient(cx, cy + offset, 1, arm, cr, cg, cb, main_alpha, cr, cg, cb, 0, false) renderer_gradient(cx - inner_gap - inner_len, cy - 2, inner_len, 1, cr, cg, cb, 0, pal.accent_soft[1], pal.accent_soft[2], pal.accent_soft[3], sub_alpha, true) renderer_gradient(cx + inner_gap, cy - 2, inner_len, 1, pal.accent_soft[1], pal.accent_soft[2], pal.accent_soft[3], sub_alpha, cr, cg, cb, 0, true) renderer_gradient(cx - 2, cy - inner_gap - inner_len, 1, inner_len, cr, cg, cb, 0, pal.accent_soft[1], pal.accent_soft[2], pal.accent_soft[3], sub_alpha, false) renderer_gradient(cx - 2, cy + inner_gap, 1, inner_len, pal.accent_soft[1], pal.accent_soft[2], pal.accent_soft[3], sub_alpha, cr, cg, cb, 0, false) draw_round_rect(cx - 5, cy - 5, 11, 11, 10, 13, 21, math_floor(a * 0.14), 4) draw_round_rect(cx - core, cy - core, core * 2 + 1, core * 2 + 1, cr, cg, cb, math_floor(a * 0.36), core) draw_round_rect(cx - 1, cy - 1, 3, 3, pal.text[1], pal.text[2], pal.text[3], math_floor(a * (0.42 + pulse * 0.22)), 1) end local function apply_scope_fov() local val = ui_get(menu_.Visuals.scope_fov_slider) if val > 0 then ui_set(references.override_zoom_fov, val) end end local function apply_fast_ladder(cmd) if not ui_get(menu_.Visuals.fast_ladder) then return end local lp = entity_get_local_player() if not lp or not entity_is_alive(lp) then return end local mt = entity_get_prop(lp, "m_MoveType") if mt == 9 then -- MOVETYPE_LADDER cmd.forwardmove = 450 cmd.sidemove = (cmd.in_moveleft or 0) == 1 and -450 or ((cmd.in_moveright or 0) == 1 and 450 or 0) end end local function apply_aspect_ratio() local cvar = cvar and cvar.r_aspectratio if not cvar then return end local val = ui_get(menu_.Visuals.aspect_ratio) if val > 0 then cvar:set_float(val / 100) else cvar:set_float(0) end end local function apply_clantag() if not ui_get(menu_.Visuals.clantag) then return end local rt = globals_realtime() if rt - vars.clantag_timer < 0.4 then return end vars.clantag_timer = rt vars.clantag_idx = vars.clantag_idx % #clantag_frames + 1 local ok, fn = pcall(function() return client.set_clan_tag end) if ok and fn then fn(clantag_frames[vars.clantag_idx]) end end local function apply_console_filter() if not ui_get(menu_.Visuals.console_filter) then return end local ok, fn = pcall(function() return cvar.con_filter_enable end) if ok and fn then fn:set_int(1) end end local function on_aim_fire(e) if not ui_get(menu_.Visuals.shot_log) then return end local target = entity.get_player_name(e.target) or "?" local hc = e.hit_chance or 0 table.insert(vars.shot_log_entries, 1, { text = string.format("Fired at %s (hc: %d%%)", target, math.floor(hc)), time = globals_realtime(), alpha = 255, kind = "fire", slide = 0 }) if #vars.shot_log_entries > 6 then table.remove(vars.shot_log_entries) end end local function on_aim_hit(e) local target = entity.get_player_name(e.target) or "?" local dmg = e.damage or 0 if contains(ui_get(menu_.Visuals.combat_alerts), "Toast Logs") then push_combat_notification("命中", string.format("命中 %s - %d dmg", target, dmg), { 100, 255, 100 }, 2.6) end if not ui_get(menu_.Visuals.shot_log) then return end table.insert(vars.shot_log_entries, 1, { text = string.format("Hit %s for %d dmg", target, dmg), time = globals_realtime(), alpha = 255, color = {100, 255, 100}, kind = "hit", slide = 0 }) if #vars.shot_log_entries > 6 then table.remove(vars.shot_log_entries) end end local function on_aim_miss(e) local target = entity.get_player_name(e.target) or "?" local reason = e.reason or "?" if contains(ui_get(menu_.Visuals.combat_alerts), "Toast Logs") then push_combat_notification("空枪", string.format("空枪 %s - %s", target, reason), { 255, 118, 118 }, 2.8) end if not ui_get(menu_.Visuals.shot_log) then return end table.insert(vars.shot_log_entries, 1, { text = string.format("Missed %s (%s)", target, reason), time = globals_realtime(), alpha = 255, color = {255, 100, 100}, kind = "miss", slide = 0 }) if #vars.shot_log_entries > 6 then table.remove(vars.shot_log_entries) end end local function on_player_hurt_hitmarker(e) if not ui_get(menu_.Visuals.hitmarker) then return end local attacker = client.userid_to_entindex(e.attacker) if attacker == entity_get_local_player() then vars.hitmarker_data.alpha = 255 vars.hitmarker_data.time = globals_realtime() vars.hitmarker_data.size = 0 end end local function draw_hud_watermark(sw, sh, ir, ig, ib) if not contains(ui_get(menu_.Visuals.indicators), "Branding") then return end local compact = ui_get(menu_.Visuals.hud_style) == "Mini" local pal = get_hud_palette(ir, ig, ib, 1) local hours, minutes, seconds = client.system_time() local ping = math.floor((client.latency() or 0) * 1000 + 0.5) local h = compact and 22 or 26 local y = 18 local gap = compact and 4 or 5 local shimmer = 0.72 + 0.28 * math.abs(math.sin(globals_realtime() * 2.4)) local parts = { { text = compact and "OB" or "OBSIDIAN", accent = true }, { text = string.format("%02d:%02d:%02d", hours or 0, minutes or 0, seconds or 0) }, { text = string.format("%dms", ping) }, { text = vars.state.name or "Global" } } local target_w = 0 for i = 1, #parts do local part = parts[i] local tw = renderer_measure_text("", part.text) or 20 local pad = part.accent and (compact and 20 or 24) or (compact and 14 or 18) part.w = math.max(part.accent and (compact and 34 or 42) or 0, tw + pad) target_w = target_w + part.w if i < #parts then target_w = target_w + gap end end vars.hud_watermark_w = anim.update("watermark_w", target_w, 10) local shell_w = math.floor(vars.hud_watermark_w + 0.5) local shell_x = sw - shell_w - 24 draw_glass_panel(shell_x, y, shell_w, h, ir, ig, ib, 0.16, compact) local x = sw - target_w - 24 for i = 1, #parts do local part = parts[i] local alpha = part.accent and (0.92 + shimmer * 0.08) or 0.84 local tr, tg, tb = pal.soft[1], pal.soft[2], pal.soft[3] if part.accent then tr, tg, tb = pal.text[1], pal.text[2], pal.text[3] end draw_glass_panel(x, y, part.w, h, ir, ig, ib, alpha, compact) if part.accent then draw_round_rect(x + 6, y + 5, part.w - 12, h - 10, ir, ig, ib, math.floor(82 * shimmer), compact and 4 or 5) end draw_text_shadow(x + part.w * 0.5, y + (compact and 5 or 6), tr, tg, tb, 240, "c", 0, part.text) x = x + part.w + gap end end local function draw_hud_center(sw, sh, ir, ig, ib) local compact = ui_get(menu_.Visuals.hud_style) == "Mini" local pal = get_hud_palette(ir, ig, ib, 1) local cx, cy = math.floor(sw * 0.5), math.floor(sh * 0.5) local stack_y = cy + (compact and 36 or 40) local gap = compact and 4 or 5 local badges = {} local function push_badge(label, value, condition) if not condition then return end badges[#badges + 1] = { label = label, value = tostring(value or "") } end push_badge("STATE", vars.state.name or "Global", contains(ui_get(menu_.Visuals.indicators), "State Display")) push_badge("DEF", tostring(vars.exploit.defensive.left or 0) .. "t", contains(ui_get(menu_.Visuals.indicators), "Defensive Ticks") and (vars.exploit.defensive.left or 0) > 0) push_badge("MODE", vars.exploit.def_aa and "Active" or "Idle", contains(ui_get(menu_.Visuals.indicators), "Exploit Info")) local fl_txt = "off" if (vars.flctl_state or "off") ~= "off" and (vars.flctl_limit or 0) > 0 then fl_txt = tostring(vars.flctl_limit or 0) .. "t" end push_badge("FL", fl_txt, contains(ui_get(menu_.Visuals.indicators), "FL Status")) local threat_txt = get_combat_badge_text() push_badge("THREAT", threat_txt, contains(ui_get(menu_.Visuals.combat_alerts), "Threat Badge") and threat_txt ~= nil) local offset_y = 0 for i = 1, #badges do local badge = badges[i] local bw, bh = measure_hud_badge(badge.label, badge.value, compact) local bx = cx - math.floor(bw * 0.5) local by = stack_y + offset_y draw_hud_badge(bx, by, badge.label, badge.value, ir, ig, ib, 0.94, compact) offset_y = offset_y + bh + gap end if contains(ui_get(menu_.Visuals.indicators), "Desync Bar") then local local_player = entity_get_local_player() if local_player then local pose = entity_get_prop(local_player, "m_flPoseParameter", 11) local amount = pose and math.abs(pose * 120 - 60) or 0 local anim_desync = anim.update("desync", clamp(amount / 60, 0, 1), 12) local bar_w = compact and 88 or 104 local bar_h = compact and 10 or 12 local bar_x = cx - math.floor(bar_w * 0.5) local bar_y = stack_y + offset_y + (compact and 4 or 6) local fill = math.floor((bar_w - 6) * anim_desync + 0.5) draw_glass_panel(bar_x, bar_y, bar_w, bar_h, ir, ig, ib, 0.9, compact) renderer_gradient(bar_x + 3, bar_y + 3, bar_w - 6, bar_h - 6, 255, 255, 255, 10, 255, 255, 255, 0, false) if fill > 0 then renderer_gradient(bar_x + 3, bar_y + 3, fill, bar_h - 6, ir, ig, ib, 185, pal.accent_soft[1], pal.accent_soft[2], pal.accent_soft[3], 42, true) end if not compact then draw_text_shadow(cx, bar_y + bar_h + 4, pal.dim[1], pal.dim[2], pal.dim[3], 156, "c", 0, string.format("desync %d", math.floor(anim_desync * 60 + 0.5))) end end end end local function draw_hud_keylist(sw, sh, ir, ig, ib) if not contains(ui_get(menu_.Visuals.indicators), "Keybind List") then return end local compact = ui_get(menu_.Visuals.hud_style) == "Mini" local pal = get_hud_palette(ir, ig, ib, 1) local menu_open = ui_is_menu_open() local items = collect_active_binds() local header_h = compact and 22 or 24 local row_h = compact and 18 or 20 local row_gap = 4 local target_w = compact and 148 or 170 for i = 1, #items do local item = items[i] local name_w = renderer_measure_text("", item.name or "") or 30 local state_w = renderer_measure_text("", item.state or "") or 20 target_w = math.max(target_w, name_w + state_w + (compact and 40 or 48)) end if #items == 0 then target_w = math.max(target_w, (renderer_measure_text("", "No active binds") or 80) + 40) end vars.hud_keylist_w = anim.update("keylist_w", target_w, 10) if #items == 0 and not menu_open and vars.hud_keylist_w < target_w * 0.98 then return end if #items == 0 and not menu_open then return end local rows = math.max(#items, menu_open and 1 or 0) local w = math.floor(vars.hud_keylist_w + 0.5) local h = header_h + 8 + rows * row_h + math.max(0, rows - 1) * row_gap + 8 local x = 28 local y = math.floor(sh * 0.42 - h * 0.5) draw_glass_panel(x, y, w, h, ir, ig, ib, 0.92, compact) draw_hud_header(x, y, w, "Hotkeys", ir, ig, ib, 1, compact, tostring(#items)) local row_y = y + header_h + 8 if #items == 0 then draw_text_shadow(x + w * 0.5, row_y + 2, pal.dim[1], pal.dim[2], pal.dim[3], 158, "c", 0, "No active binds") return end for i = 1, #items do local item = items[i] draw_hud_row(x + 6, row_y, w - 12, row_h, item.name, item.state, ir, ig, ib, 1, compact, pal.accent_soft[1], pal.accent_soft[2], pal.accent_soft[3], 216) row_y = row_y + row_h + row_gap end end local function draw_hud_spectators(sw, sh, ir, ig, ib) if not contains(ui_get(menu_.Visuals.indicators), "Spectator List") then return end local compact = ui_get(menu_.Visuals.hud_style) == "Mini" local pal = get_hud_palette(ir, ig, ib, 1) local menu_open = ui_is_menu_open() local lp = entity_get_local_player() local items = collect_spectators(lp) local header_h = compact and 22 or 24 local row_h = compact and 18 or 20 local row_gap = 4 local title = string.format("Spectators (%d)", #items) local target_w = math.max(compact and 156 or 178, (renderer_measure_text("", title) or 40) + 38) for i = 1, #items do target_w = math.max(target_w, (renderer_measure_text("", items[i]) or 50) + 40) end if #items == 0 then target_w = math.max(target_w, (renderer_measure_text("", "Nobody watching") or 80) + 40) end vars.hud_speclist_w = anim.update("speclist_w", target_w, 10) if #items == 0 and not menu_open and vars.hud_speclist_w < target_w * 0.98 then return end if #items == 0 and not menu_open then return end local rows = math.max(#items, menu_open and 1 or 0) local w = math.floor(vars.hud_speclist_w + 0.5) local h = header_h + 8 + rows * row_h + math.max(0, rows - 1) * row_gap + 8 local x = sw - w - 28 local y = math.floor(sh * 0.42 - h * 0.5) draw_glass_panel(x, y, w, h, ir, ig, ib, 0.92, compact) draw_hud_header(x, y, w, title, ir, ig, ib, 1, compact) local row_y = y + header_h + 8 if #items == 0 then draw_text_shadow(x + w * 0.5, row_y + 2, pal.dim[1], pal.dim[2], pal.dim[3], 158, "c", 0, "Nobody watching") return end for i = 1, #items do local name = items[i] draw_hud_row(x + 6, row_y, w - 12, row_h, name, tostring(i), ir, ig, ib, 1, compact, pal.dim[1], pal.dim[2], pal.dim[3], 188) row_y = row_y + row_h + row_gap end end local function draw_shot_logs(sw, sh, ir, ig, ib) if not ui_get(menu_.Visuals.shot_log) then return end local compact = ui_get(menu_.Visuals.hud_style) == "Mini" local pal = get_hud_palette(ir, ig, ib, 1) local rt = globals_realtime() local ft = globals_frametime() local icon_size = compact and 22 or 24 local card_h = icon_size local y = 56 for i = 1, #vars.shot_log_entries do local entry = vars.shot_log_entries[i] local age = rt - (entry.time or 0) if age > 4.6 then entry.alpha = lerp(entry.alpha or 255, 0, ft * 8) else entry.alpha = lerp(entry.alpha or 0, 255, ft * 12) end local alpha = clamp(entry.alpha or 0, 0, 255) if alpha > 1 then local text = entry.text or "" local tw = renderer_measure_text("", text) local icon = entry.kind == "hit" and "H" or (entry.kind == "miss" and "M" or "F") local w = math_max(compact and 164 or 188, tw + icon_size + 26) local mul = alpha / 255 local stay = age < 4.6 entry.slide = lerp(entry.slide or 0, stay and 1 or 0, ft * (stay and 11 or 8)) local slide = clamp(entry.slide or 0, 0, 1) local x = math_floor(24 - (1 - slide) * 42) local accent = entry.color or { ir, ig, ib } local chip_x = x local body_x = x + icon_size + 4 draw_glass_panel(chip_x, y, icon_size, card_h, accent[1], accent[2], accent[3], 0.92 * mul, compact) draw_round_rect(chip_x + 4, y + 4, icon_size - 8, card_h - 8, accent[1], accent[2], accent[3], math_floor(alpha * 0.26), compact and 4 or 5) draw_text_shadow(chip_x + math_floor(icon_size * 0.5), y + (compact and 5 or 6), pal.text[1], pal.text[2], pal.text[3], math_floor(alpha * 0.96), "c", 0, icon) draw_glass_panel(body_x, y, w - icon_size - 4, card_h, ir, ig, ib, 0.92 * mul, compact) draw_round_rect(body_x, y, 3, card_h, accent[1], accent[2], accent[3], math_floor(alpha * 0.92), 2) draw_text_shadow(body_x + 10, y + (compact and 4 or 5), pal.text[1], pal.text[2], pal.text[3], math_floor(alpha * 0.96), "", 0, text) y = y + card_h + 6 end end for i = #vars.shot_log_entries, 1, -1 do if (vars.shot_log_entries[i].alpha or 0) <= 1 then table.remove(vars.shot_log_entries, i) end end end local function draw_hitmarker(sw, sh, ir, ig, ib) if not ui_get(menu_.Visuals.hitmarker) then return end local compact = ui_get(menu_.Visuals.hud_style) == "Mini" local cx, cy = math_floor(sw * 0.5), math_floor(sh * 0.5) if vars.hitmarker_data.alpha > 1 then vars.hitmarker_data.alpha = lerp(vars.hitmarker_data.alpha, 0, globals_frametime() * 7.5) vars.hitmarker_data.size = lerp(vars.hitmarker_data.size, compact and 8 or 10, globals_frametime() * 18) local ha = clamp(vars.hitmarker_data.alpha, 0, 255) local hs = vars.hitmarker_data.size local outer = hs + (compact and 5 or 6) local inner = hs * 0.42 local pulse = 0.65 + 0.35 * math_abs(math.sin(globals_realtime() * 9)) local ring_scale = outer + pulse * 2 draw_blur(cx - outer - 8, cy - outer - 8, (outer + 8) * 2, (outer + 8) * 2, math_floor(ha * 0.32), compact and 4 or 5) draw_ring(cx, cy, 255, 255, 255, math_floor(ha * 0.12), ring_scale + 2, 0, 1, 1) draw_ring(cx, cy, ir, ig, ib, math_floor(ha * 0.24), outer, 0, 1, 1) renderer_line(cx - hs, cy - hs, cx - hs * 0.45, cy - hs * 0.45, 255, 255, 255, ha) renderer_line(cx + hs, cy - hs, cx + hs * 0.45, cy - hs * 0.45, 255, 255, 255, ha) renderer_line(cx - hs, cy + hs, cx - hs * 0.45, cy + hs * 0.45, 255, 255, 255, ha) renderer_line(cx + hs, cy + hs, cx + hs * 0.45, cy + hs * 0.45, 255, 255, 255, ha) renderer_line(cx - inner, cy, cx + inner, cy, ir, ig, ib, math_floor(ha * 0.26)) renderer_line(cx, cy - inner, cx, cy + inner, ir, ig, ib, math_floor(ha * 0.26)) draw_round_rect(cx - 2, cy - 2, 4, 4, 11, 14, 22, math_floor(ha * 0.38), 2) draw_round_rect(cx - 1, cy - 1, 2, 2, ir, ig, ib, ha, 1) end end local function draw_welcome() if vars.welcome_done or not ui_get(menu_.Visuals.welcome_screen) then return end local sw, sh = client_screen_size() if not vars.welcome_fading then vars.welcome_alpha = lerp(vars.welcome_alpha, 255, globals_frametime() * 24) if vars.welcome_alpha > 210 then vars.welcome_progress = lerp(vars.welcome_progress, 150, globals_frametime() * 24) end if vars.welcome_progress > 149 then vars.welcome_fading = true end else vars.welcome_alpha = lerp(vars.welcome_alpha, 0, globals_frametime() * 24) if vars.welcome_alpha < 1 then vars.welcome_done = true end end if vars.welcome_alpha > 0 then local compact = ui_get(menu_.Visuals.hud_style) == "Mini" local ir, ig, ib, ia = ui_get(menu_.Visuals.indicator_color) local pal = get_hud_palette(ir, ig, ib, vars.welcome_alpha / 255) local panel_w = math.floor((compact and 300 or 340) + vars.welcome_progress + 0.5) local panel_h = compact and 86 or 96 local x = math.floor(sw * 0.5 - panel_w * 0.5) local y = math.floor(sh * 0.5 - panel_h * 0.5) local logo_w = compact and 52 or 60 local shimmer = 0.72 + 0.28 * math.abs(math.sin(globals_realtime() * 2.1)) local alpha_mul = vars.welcome_alpha / 255 draw_glass_panel(x, y, panel_w, panel_h, ir, ig, ib, 0.98 * alpha_mul, compact) draw_round_rect(x + 10, y + 10, logo_w, panel_h - 20, ir, ig, ib, math.floor(vars.welcome_alpha * 0.84), compact and 6 or 8) draw_round_rect(x + 16, y + 16, logo_w - 12, panel_h - 32, ir, ig, ib, math.floor(vars.welcome_alpha * 0.22 * shimmer), compact and 5 or 6) draw_text_shadow(x + 10 + logo_w * 0.5, y + panel_h * 0.5 - 8, 255, 255, 255, vars.welcome_alpha, "c", 0, compact and "OB" or "OBSIDIAN") local title = animate_text(globals_realtime() * 2, "OBSIDIAN", 255, 255, 255, vars.welcome_alpha, ir, ig, ib, vars.welcome_alpha) renderer_text(x + logo_w + 30 + 1, y + 20 + 1, 0, 0, 0, math.floor(vars.welcome_alpha * 0.35), "", 0, "OBSIDIAN") renderer_text(x + logo_w + 30, y + 20, 255, 255, 255, vars.welcome_alpha, "", 0, title) draw_text_shadow(x + logo_w + 30, y + 46, pal.soft[1], pal.soft[2], pal.soft[3], math.floor(vars.welcome_alpha * 0.82), "", 0, "enhanced defensive system") draw_text_shadow(x + logo_w + 30, y + 64, pal.dim[1], pal.dim[2], pal.dim[3], math.floor(vars.welcome_alpha * 0.7), "", 0, "version 1.0 | glass HUD enabled") renderer_gradient(x + logo_w + 30, y + panel_h - 16, panel_w - logo_w - 44, 1, ir, ig, ib, math.floor(vars.welcome_alpha * 0.76), ir, ig, ib, 0, true) end end local function draw_manual_arrows(sw, sh, ir, ig, ib) if not contains(ui_get(menu_.Visuals.indicators), "Manual Arrows") then return end local compact = ui_get(menu_.Visuals.hud_style) == "Mini" local cx, cy = sw / 2, sh / 2 local arrow_offset = compact and 48 or 58 local idle_a = ui_is_menu_open() and 52 or 22 local active_a = 245 vars.manual_ani.left = lerp(vars.manual_ani.left or 0, menu_.Antiaim.extra.manual_state == 1 and 40 or 0, globals_frametime() * 6) vars.manual_ani.right = lerp(vars.manual_ani.right or 0, menu_.Antiaim.extra.manual_state == 2 and 40 or 0, globals_frametime() * 6) renderer_text(cx - arrow_offset - (vars.manual_ani.left or 0), cy - 1, ir, ig, ib, menu_.Antiaim.extra.manual_state == 1 and active_a or idle_a, "+c", 0, "◂") renderer_text(cx + arrow_offset + (vars.manual_ani.right or 0), cy - 1, ir, ig, ib, menu_.Antiaim.extra.manual_state == 2 and active_a or idle_a, "+c", 0, "▸") if menu_.Antiaim.extra.manual_state == 3 or ui_is_menu_open() then renderer_text(cx, cy - (compact and 28 or 32) - (vars.manual_ani.left or 0), ir, ig, ib, menu_.Antiaim.extra.manual_state == 3 and active_a or idle_a, "c", 0, "▴") end end ---------------------------------------------------------------回调函数 local call_backs = { shutdown = function() reset_horus_preview_runtime() vanila_skeet_element(true) ui_set(references.aimbot, true) end, setup_command = function(cmd) detect_state(cmd) antiaim_handler(cmd) defensive_handler(cmd) flick_handler(cmd) apply_fast_ladder(cmd) end, predict_command = function(cmd) exploit_on_predict(cmd) end, run_command = function(cmd) defensive_func.update_cmdnumber(cmd) exploit_on_run(cmd) end, paint_ui = function() if not ui_is_menu_open() then return end local tab = ui_get(active_tab) local is_aa = tab == "Anti-Aim" local is_vis = tab == "Visuals" local is_misc = tab == "Misc" local is_cfg = tab == "Config" -- 更新可见性 ui_set_visible(condition_selector, is_aa) ui_set_visible(menu_.Visuals.indicators, is_vis) ui_set_visible(menu_.Visuals.indicator_color, is_vis) ui_set_visible(menu_.Visuals.hud_style, is_vis) ui_set_visible(menu_.Visuals.animation_select, is_vis) ui_set_visible(menu_.Visuals.welcome_screen, is_vis) ui_set_visible(menu_.Visuals.scope_sep, is_vis) ui_set_visible(menu_.Visuals.scope_enable, is_vis) ui_set_visible(menu_.Visuals.scope_color, is_vis and ui_get(menu_.Visuals.scope_enable)) ui_set_visible(menu_.Visuals.scope_pos, is_vis and ui_get(menu_.Visuals.scope_enable)) ui_set_visible(menu_.Visuals.scope_offset, is_vis and ui_get(menu_.Visuals.scope_enable)) ui_set_visible(menu_.Visuals.scope_speed, is_vis and ui_get(menu_.Visuals.scope_enable)) ui_set_visible(menu_.Visuals.scope_fov_slider, is_vis) ui_set_visible(menu_.Visuals.fast_ladder, is_vis) ui_set_visible(menu_.Visuals.aspect_ratio, is_vis) ui_set_visible(menu_.Visuals.clantag, is_vis) ui_set_visible(menu_.Visuals.console_filter, is_vis) ui_set_visible(menu_.Visuals.shot_log, is_vis) ui_set_visible(menu_.Visuals.hitmarker, is_vis) ui_set_visible(menu_.Visuals.combat_alerts, is_vis) ui_set_visible(menu_.Visuals.esp_preview, is_vis) ui_set_visible(menu_.Misc.misc_combobox, is_misc) ui_set_visible(menu_.Antiaim.extra.config_export, is_cfg) ui_set_visible(menu_.Antiaim.extra.config_import, is_cfg) ui_set_visible(menu_.Antiaim.extra.invert_flick, is_cfg) -- 更新会话时间 ui_set(info_session, ui_colors.new_blue .. "• " .. ui_colors.white .. "Session: " .. ui_colors.new_blue .. get_session_time()) -- 应用视觉效果 apply_scope_fov() apply_aspect_ratio() apply_clantag() apply_console_filter() if ui_get(menu_.Visuals.scope_enable) then ui_set(references.scope_overlay, true) end end, paint = function() if not ui_get(menu_.setup) then return end local sw, sh = client_screen_size() local ir, ig, ib, ia = ui_get(menu_.Visuals.indicator_color) -- 更新战斗威胁 update_combat_threat() -- 绘制所有HUD元素 draw_hud_watermark(sw, sh, ir, ig, ib) draw_manual_arrows(sw, sh, ir, ig, ib) draw_hud_center(sw, sh, ir, ig, ib) draw_hud_keylist(sw, sh, ir, ig, ib) draw_hud_spectators(sw, sh, ir, ig, ib) draw_shot_logs(sw, sh, ir, ig, ib) draw_hitmarker(sw, sh, ir, ig, ib) draw_combat_notifications(sw, sh, ir, ig, ib) draw_welcome() -- 绘制自定义准镜 if ui_get(menu_.Visuals.scope_enable) then if ui_get(menu_.Visuals.scope_enable) then draw_custom_scope() end draw_horus_esp_preview(sw, sh) end, level_init = function() defensive_func.reset_defensive() reset_horus_preview_runtime() vars.shot_log_entries = {} vars.combat_notifications = {} vars.clantag_idx = 1 vars.clantag_timer = 0 end, net_update_end = function() exploit_on_net_update() end, cs_game_disconnected = function() exploit_reset() reset_horus_preview_runtime() end, round_start = function() exploit_reset() vars.shot_log_entries = {} vars.combat_notifications = {} end, aim_fire = function(e) on_aim_fire(e) cache_fire() end, aim_hit = function(e) on_aim_hit(e) if contains(ui_get(menu_.Misc.hit_logs), "Hit") then local target = entity.get_player_name(e.target) or "?" client.color_log(ui_colors.success[1], ui_colors.success[2], ui_colors.success[3], "[Obsidian] Hit " .. target .. " for " .. e.damage) end end, aim_miss = function(e) on_aim_miss(e) if contains(ui_get(menu_.Misc.hit_logs), "Miss") then local target = entity.get_player_name(e.target) or "?" client.color_log(ui_colors.warning[1], ui_colors.warning[2], ui_colors.warning[3], "[Obsidian] Missed " .. target .. " - " .. e.reason) end end, player_hurt = function(e) on_player_hurt_hitmarker(e) end, bullet_impact = function(e) local lp = entity_get_local_player() if not lp or not entity_is_alive(lp) then return end local enemy = client.userid_to_entindex(e.userid) if not enemy or enemy == lp or not entity_is_enemy(enemy) or not entity_is_alive(enemy) then return end if not fired_at_target(lp, enemy, { e.x, e.y, e.z }) then return end if vars.combat_last_impact_tick == globals_tickcount() then return end vars.combat_last_impact_tick = globals_tickcount() vars.combat_threat = "impact" vars.combat_threat_name = entity.get_player_name(enemy) or ("enemy-" .. enemy) vars.combat_threat_until = globals_realtime() + 0.65 vars.combat_pred_until = globals_realtime() + 0.65 if contains(ui_get(menu_.Visuals.combat_alerts), "Incoming Shot") then push_combat_notification("危险", vars.combat_threat_name .. " 的子弹正在指向你", { 255, 128, 128 }, 2.4) end end, player_death = function(e) local lp = entity_get_local_player() local attacker = client.userid_to_entindex(e.attacker) local victim = client.userid_to_entindex(e.userid) if contains(ui_get(menu_.Visuals.combat_alerts), "Kill Alerts") then if attacker == lp and victim ~= lp then push_combat_notification("击杀", "击杀 " .. ((victim and entity.get_player_name(victim)) or "?"), { 120, 220, 255 }, 2.6) elseif victim == lp and attacker ~= lp then push_combat_notification("阵亡", "被 " .. ((attacker and entity.get_player_name(attacker)) or "?") .. " 击杀", { 255, 118, 118 }, 2.8) end end -- Killsay if contains(ui_get(menu_.Misc.misc_combobox), "Enabled Killsay") and attacker == lp and victim ~= lp then local mode = ui_get(menu_.Misc.resolver_type) == "Jitter" and "Normal" or "R18" -- 简化 local pool = mode == "R18" and killsay_r18 or killsay_normal local msg = pool[client.random_int(1, #pool)] client.exec("say " .. msg) end end } ---------------------------------------------------------------获取会话时间 local function get_session_time() local elapsed = (client.system_time() or 0) - vars.session_start local h = math.floor(elapsed / 3600) local m = math.floor((elapsed % 3600) / 60) local s = elapsed % 60 return string.format("%02d:%02d:%02d", h, m, s) end local function cache_fire() vars.is_fire = true client.delay_call(0.02, function() vars.is_fire = false end) end -- Clantag frames local clantag_frames = {} local clantag_text = "OBSIDIAN " for i = 0, #clantag_text do clantag_frames[i+1] = clantag_text:sub(1, i) end ---------------------------------------------------------------事件注册 client_set_event_callback("paint", call_backs.paint) client_set_event_callback("paint_ui", call_backs.paint_ui) client_set_event_callback("setup_command", call_backs.setup_command) client_set_event_callback("run_command", call_backs.run_command) client_set_event_callback("predict_command", call_backs.predict_command) client_set_event_callback("level_init", call_backs.level_init) client_set_event_callback('shutdown', call_backs.shutdown) client_set_event_callback("net_update_end", call_backs.net_update_end) client_set_event_callback("round_start", call_backs.round_start) client_set_event_callback("cs_game_disconnected", call_backs.cs_game_disconnected) client_set_event_callback("aim_fire", call_backs.aim_fire) client_set_event_callback("aim_hit", call_backs.aim_hit) client_set_event_callback("aim_miss", call_backs.aim_miss) client_set_event_callback("player_hurt", call_backs.player_hurt) client_set_event_callback("bullet_impact", call_backs.bullet_impact) client_set_event_callback("player_death", call_backs.player_death) -- 初始化完成 client.color_log(ui_colors.primary[1], ui_colors.primary[2], ui_colors.primary[3], "[Obsidian] Loaded with Obsidian visuals")