Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local anti_aim = require 'gamesense/antiaim_funcs'
- local ffi, csgo_weapons = require("ffi"), require("gamesense/csgo_weapons")
- local entity_get_local_player, entity_get_prop, entity_get_classname, entity_get_player_weapon, entity_hitbox_position, entity_get_players, entity_is_alive, entity_is_dormant, entity_is_enemy, entity_get_origin, entity_set_prop, ui_menu_position, ui_menu_size, ui_reference, ui_new_checkbox, ui_new_slider, ui_new_hotkey, ui_new_combobox, ui_new_color_picker, ui_set_visible, ui_get, ui_set, ui_is_menu_open, ui_new_label, ui_set_callback, ui_new_multiselect, client_screen_size, client_current_threat, client_find_signature, client_create_interface, client_set_event_callback, client_unset_event_callback, client_trace_line, client_random_int, client_userid_to_entindex, client_trace_bullet, client_scale_damage, client_eye_position, client_camera_angles, client_delay_call, client_key_state, client_latency, client_system_time, client_exec, globals_realtime, globals_curtime, globals_absoluteframetime, globals_frametime, globals_chokedcommands, globals_tickcount, renderer_rectangle, renderer_text, renderer_blur, renderer_indicator, renderer_circle_outline, renderer_fadebar , renderer_measure_text, renderer_line, renderer_world_to_screen, renderer_circle, math_floor, math_sqrt, math_abs, math_atan, math_atan2, math_max, math_deg, math_sin, math_cos, math_rad, math_pi, math_min, math_pow, math_random, ffi_cdef, ffi_cast, ffi_typeof, globals_mapname, globals_tickinterval, bit_band =
- entity.get_local_player, entity.get_prop, entity.get_classname, entity.get_player_weapon, entity.hitbox_position, entity.get_players, entity.is_alive, entity.is_dormant, entity.is_enemy, entity.get_origin, entity.set_prop, ui.menu_position, ui.menu_size, ui.reference, ui.new_checkbox, ui.new_slider, ui.new_hotkey, ui.new_combobox, ui.new_color_picker, ui.set_visible, ui.get, ui.set, ui.is_menu_open, ui.new_label, ui.set_callback, ui.new_multiselect, client.screen_size, client.current_threat, client.find_signature, client.create_interface, client.set_event_callback, client.unset_event_callback, client.trace_line, client.random_int, client.userid_to_entindex, client.trace_bullet, client.scale_damage, client.eye_position, client.camera_angles, client.delay_call, client.key_state, client.latency, client.system_time, client.exec, globals.realtime, globals.curtime, globals.absoluteframetime, globals.frametime, globals.chokedcommands, globals.tickcount, renderer.rectangle, renderer.text, renderer.blur, renderer.indicator, renderer.circle_outline, renderer.gradient, renderer.measure_text, renderer.line, renderer.world_to_screen, renderer.circle, math.floor, math.sqrt, math.abs, math.atan, math.atan2, math.max, math.deg, math.sin, math.cos, math.rad, math.pi, math.min, math.pow, math.random, ffi.cdef, ffi.cast, ffi.typeof, globals.mapname, globals.tickinterval, bit.band
- local local_player = entity_get_local_player()
- local should_swap = false
- local it = 0
- local enemyclosesttocrosshair = nil
- local ref = {
- enabled = ui_reference("AA", "Anti-aimbot angles", "Enabled"),
- pitch = ui_reference("AA", "Anti-aimbot angles", "pitch"),
- yaw_base = ui_reference("AA", "Anti-aimbot angles", "Yaw base"),
- yaw = {ui_reference("AA", "Anti-aimbot angles", "Yaw")},
- fsbodyyaw = ui_reference("AA", "anti-aimbot angles", "Freestanding body yaw"),
- edgeyaw = ui_reference("AA", "Anti-aimbot angles", "Edge yaw"),
- antiaim = ui_reference("AA", "Anti-aimbot angles", "Enabled"),
- roll = ui_reference("AA", "Anti-aimbot angles", "Roll"),
- is_qp = {ui_reference("RAGE", "Other", "Quick peek assist")},
- body_yaw = {ui_reference("AA", "Anti-aimbot angles", "Body yaw")},
- misc_legs = ui_reference("AA", "other", "leg movement"),
- fl_refference = ui_reference("AA", "Fake Lag", "Enabled"),
- fl_slider = ui_reference("AA", "Fake lag", "Limit"),
- fd_ref = {ui_reference("Rage", "Other", "Duck peek assist")},
- jitter = {ui_reference("AA", "Anti-aimbot angles", "Yaw jitter")},
- fl_ammount = ui_reference("AA", "Fake lag", "Amount"),
- aw_ref = ui_reference("Rage","Other","Automatic Fire"),
- ap_ref = ui_reference("Rage","Other","Automatic Penetration"),
- fov = ui_reference("RAGE", "Other", "Maximum FOV"),
- }
- local vars = {
- ["hitgroup_names"] = {"generic", "head", "chest", "stomach", "left arm", "right arm", "left leg", "right leg", "neck", "?", "gear"},
- ["bruteforce"] = false,
- ["closest_enemy"] = nil,
- ["in_fov"] = false,
- ["DEG_TO_RAD"] = math.pi / 180,
- ["RAD_TO_DEG"] = 180 / math.pi,
- ["fire"] = false,
- ["fire_improvements"] = false,
- ["visible_hitboxes"] = 0,
- ["side"] = 1,
- ["last_side"] = 0,
- ["last_hit"] = 0,
- ["hit_side"] = 0,
- ["ft_prev"] = 0
- }
- ui_set(ref.enabled, true)
- local ent_state = {
- speed = function(ent) local speed = math_sqrt(math_pow(entity_get_prop(ent, "m_vecVelocity[0]"), 2) + math_pow(entity_get_prop(ent, "m_vecVelocity[1]"), 2)) return speed end,
- is_peeking = function() return (ui_get(ref.is_qp[1]) and ui_get(ref.is_qp[2])) end,
- is_ladder = function(ent) return (entity_get_prop(ent, "m_MoveType") or 0) == 9 end
- }
- local table_contains = function(tbl, val)
- for i = 1, #tbl do
- if tbl[i] == val then
- return true
- end
- end
- return false
- end
- --Roll in MM From pilot
- local is_mm_state = 0
- local game_rule = ffi_cast("intptr_t**", ffi_cast("intptr_t", client_find_signature("client.dll", "\x83\x3D\xCC\xCC\xCC\xCC\xCC\x74\x2A\xA1")) + 2)[0]
- --Menu Build
- local lby_breaker = ui_new_checkbox("AA", "Anti-aimbot angles", "Enable Papi-Yaw", true)
- local menu_selector = ui_new_combobox("AA", "Anti-aimbot angles", "Menu Selector", {"Anti-Aim", "Misc"})
- local lby = {
- -- desync
- desync_type = ui_new_combobox("aa", "anti-aimbot angles","Desync Calculation",{"Max Desync", "Manual Value"}),
- desync = ui_new_slider("aa", "anti-aimbot angles", "Desync", 0, 65, 63),
- direction_handler = ui_new_combobox("AA", "Anti-aimbot angles", "Direction Handler", {"Automatic", "Manual"}),
- enable = ui_new_checkbox("AA", "Anti-aimbot angles", "Better body freestanding"),
- mode = ui_new_combobox("AA", "Anti-aimbot angles", "Body freestanding mode", { "Hide real", "Hide fake" }),
- smart = ui_new_checkbox("AA", "Anti-aimbot angles", "Smart mode"),
- roll_inverter = ui_new_hotkey("AA", "Anti-aimbot angles", "Roll Side Switch"),
- body_inverter = ui_new_hotkey("AA", "Anti-aimbot angles", "Desync Inverter"),
- roll_enabled = ui_new_checkbox("AA", "Anti-aimbot angles", "\aD6BE73FFEnable Roll {UNSAFE}"),
- roll = ui_new_slider("aa", "anti-aimbot angles", "Roll", -44, 44, 0),
- roll_disablers = ui_new_checkbox("AA", "Anti-aimbot angles", "Disable Roll While Moving"),
- -- anti-bruteforce references
- check = ui_new_checkbox("AA", "Anti-aimbot angles", "Anti-bruteforce"),
- combo = ui_new_combobox("AA", "Anti-aimbot angles", "Anti-bruteforce mode", { "Opposite", "Random",}),
- ab_conditions = ui_new_combobox("AA", "Anti-aimbot angles", "Anti-bruteforce conditions", { "Always", "Slow-Walk",}),
- ab_range = ui_new_slider("AA", "Anti-aimbot angles", "Anti-bruteforce range", 1, 100, 32)
- }
- local misc = {
- slide_leg = ui_new_checkbox("AA", "Other","Slide Legs"),
- slow_enabled = ui_new_checkbox("AA", "Other", "Custom Slow Walk"),
- limit_reference = ui_new_slider("AA", "Other", "Slow Walk Speed Factor", 10, 57, 50, 57, "", 1, {[57] = "Max"}),
- custom_fl_enabled = ui_new_checkbox("AA", "Fake lag", "Enable Custom Fake Lag"),
- custom_fl = ui_new_multiselect("AA", "Fake lag", "Custom Fake Lag Triggers", {"Standing", "Moving", "In Air"}),
- fl_standing_slider = ui_new_slider("aa", "Fake Lag", "Standing Fake Lag", 1, 14, 1),
- fl_standing_mode = ui_new_combobox("AA", "Fake Lag", "Standing Fake Lag", {"Dynamic", "Maximum", "Fluctuate"}),
- fl_moving_slider = ui_new_slider("aa", "Fake Lag", "Moving Fake Lag", 1, 14, 1),
- fl_moving_mode = ui_new_combobox("AA", "Fake Lag", "Moving Fake Lag", {"Dynamic", "Maximum", "Fluctuate"}),
- fl_in_air_slider = ui_new_slider("aa", "Fake Lag", "In-Air Fake Lag", 1, 14, 1),
- fl_in_air_mode = ui_new_combobox("AA", "Fake Lag", "In Air Fake Lag", {"Dynamic", "Maximum", "Fluctuate"}),
- fl_slowwalk_slider = ui_new_slider("aa", "Fake Lag", "Slow-Walk Fake Lag", 1, 14, 1),
- fl_slowwalk_mode = ui_new_combobox("AA", "Fake Lag", "Slow Walk Fake Lag", {"Dynamic", "Maximum", "Fluctuate"}),
- fl_fakeduck_slider = ui_new_slider("aa", "Fake Lag", "Fake-Duck Fake Lag", 1, 14, 1),
- fl_fakeduck_mode = ui_new_combobox("AA", "Fake Lag", "Fake Duck Fake Lag", {"Dynamic", "Maximum", "Fluctuate"}),
- aw_on_key = ui_new_hotkey("AA", "Anti-aimbot angles","Auto Wall On Key"),
- ap_on_key = ui_new_hotkey("AA", "Anti-aimbot angles","Auto Penetration On Key"),
- dynamicfov = ui_new_checkbox("AA", "Anti-aimbot angles", "Dynamic FOV"),
- dynamicfov_mode = ui_new_combobox("AA", "Anti-aimbot angles", "\ndynamic_fov_modes", {"Snipers","Deagle", "Pistols","Others"}),
- dynamicfov_autofactor = ui_new_slider("AA", "Anti-aimbot angles", "Dynamic FOV auto factor", 0, 250, 100, true, "x", 0.01),
- dynamicfov_min_snipers = ui_new_slider("AA", "Anti-aimbot angles", "Snipers Dynamic FOV min", 1, 180, 3, true, "°", 1),
- dynamicfov_max_snipers = ui_new_slider("AA", "Anti-aimbot angles", "Snipers Dynamic FOV max", 1, 180, 10, true, "°", 1),
- dynamicfov_min_deagle = ui_new_slider("AA", "Anti-aimbot angles", "Deagle Dynamic FOV min", 1, 180, 3, true, "°", 1),
- dynamicfov_max_deagle = ui_new_slider("AA", "Anti-aimbot angles", "Deagle Dynamic FOV max", 1, 180, 10, true, "°", 1),
- dynamicfov_min_pistols = ui_new_slider("AA", "Anti-aimbot angles", "Pistols Dynamic FOV min", 1, 180, 3, true, "°", 1),
- dynamicfov_max_pistols = ui_new_slider("AA", "Anti-aimbot angles", "Pistols Dynamic FOV max", 1, 180, 10, true, "°", 1),
- dynamicfov_min_others = ui_new_slider("AA", "Anti-aimbot angles", "Others Dynamic FOV min", 1, 180, 3, true, "°", 1),
- dynamicfov_max_others = ui_new_slider("AA", "Anti-aimbot angles", "Others Dynamic FOV max", 1, 180, 10, true, "°", 1),
- custom_aa_sw = ui_new_checkbox("AA", "Anti-aimbot angles", "Custom Pitch On Slow Walk"),
- custom_aa_sw_slider = ui_new_slider("aa", "Anti-aimbot angles", "Custom Pitch Angle", -89, 89, 1),
- clantag_chg = ui_new_checkbox("AA", "Anti-aimbot angles", "Putang Ina Clan Tag Changer"),
- stop_intro = ui_new_checkbox("aa", "anti-aimbot angles","\aB2ACDDFFEnable freeze animation"),
- }
- local function in_air(player)
- local flags = entity_get_prop(player, "m_fFlags")
- if bit_band(flags, 1) == 0 then
- return true
- end
- return false
- end
- local function get_velocity(player)
- local x,y,z = entity_get_prop(player, "m_vecVelocity")
- if x == nil then return end
- return math_sqrt(x*x + y*y + z*z)
- end
- local function extrapolate_position(xpos,ypos,zpos,ticks,player)
- local x,y,z = entity_get_prop(player, "m_vecVelocity")
- for i=0, ticks do
- xpos = xpos + (x*globals_tickinterval())
- ypos = ypos + (y*globals_tickinterval())
- zpos = zpos + (z*globals_tickinterval())
- end
- return xpos,ypos,zpos
- end
- local function can_enemy_hit_on_peek(ent,ticks)
- if ent == nil then return end
- local origin_x, origin_y, origin_z = entity_get_prop(ent, "m_vecOrigin")
- if origin_z == nil then return end
- local sx,sy,sz = entity_hitbox_position(entity_get_local_player(), 11)
- local dx,dy,dz = entity_hitbox_position(entity_get_local_player(), 12)
- sx,sy,sz = extrapolate_position(sx, sy, sz, ticks, entity_get_local_player())
- dx,dy,dz = extrapolate_position(dx, dy, dz, ticks, entity_get_local_player())
- local ___, left_dmg = client_trace_bullet(ent, origin_x, origin_y, origin_z, sx, sy, sz, true)
- local __, right_dmg = client_trace_bullet(ent, origin_x, origin_y, origin_z, dx, dy, dz, true)
- local left_hittable = left_dmg ~= nil and left_dmg > 12
- local right_hittable = right_dmg ~= nil and right_dmg > 12
- local hittable = (left_hittable or right_hittable) and get_velocity(entity_get_local_player()) > 32
- return hittable
- end
- local checkbox_reference, hotkey_reference = ui.reference("AA", "Other", "Slow motion")
- -- anti-bruteforce
- local function GetClosestPoint(A, B, P)
- local a_to_p = { P[1] - A[1], P[2] - A[2] }
- local a_to_b = { B[1] - A[1], B[2] - A[2] }
- local atb2 = a_to_b[1]^2 + a_to_b[2]^2
- local atp_dot_atb = a_to_p[1]*a_to_b[1] + a_to_p[2]*a_to_b[2]
- local t = atp_dot_atb / atb2
- return { A[1] + a_to_b[1]*t, A[2] + a_to_b[2]*t }
- end
- client_set_event_callback("bullet_impact", function(c)
- if ui_get(lby.check) and entity_is_alive(entity_get_local_player()) then
- local ent = client_userid_to_entindex(c.userid)
- if not entity_is_dormant(ent) and entity_is_enemy(ent) then
- local ent_shoot = { entity_get_prop(ent, "m_vecOrigin") }
- ent_shoot[3] = ent_shoot[3] + entity_get_prop(ent, "m_vecViewOffset[2]")
- local player_head = { entity_hitbox_position(entity_get_local_player(), 0) }
- local closest = GetClosestPoint(ent_shoot, { c.x, c.y, c.z }, player_head)
- local delta = { player_head[1]-closest[1], player_head[2]-closest[2] }
- local delta_2d = math.sqrt(delta[1]^2+delta[2]^2)
- if math.abs(delta_2d) < ui_get(lby.ab_range) then
- local ab_conditions_g = ui_get(lby.ab_conditions)
- if ab_conditions_g == "Always" then
- it = it + 1
- should_swap = true
- elseif ab_conditions_g == "Slow-Walk" and ui_get(hotkey_reference) then
- it = it + 1
- should_swap = true
- end
- end
- end
- end
- end)
- local math_sqrt = math.sqrt
- local function modify_velocity(cmd, goalspeed)
- if goalspeed <= 0 then
- return
- end
- local minimalspeed = math_sqrt((cmd.forwardmove * cmd.forwardmove) + (cmd.sidemove * cmd.sidemove))
- if minimalspeed <= 0 then
- return
- end
- if cmd.in_duck == 1 then
- goalspeed = goalspeed * 2.94117647 -- wooo cool magic number
- end
- if minimalspeed <= goalspeed then
- return
- end
- local speedfactor = goalspeed / minimalspeed
- cmd.forwardmove = cmd.forwardmove * speedfactor
- cmd.sidemove = cmd.sidemove * speedfactor
- end
- local function on_setup_cmd(cmd)
- local checkbox = ui.get(checkbox_reference)
- local hotkey = ui.get(hotkey_reference)
- local limit = ui.get(misc.limit_reference)
- if limit >= 57 then
- return
- end
- if checkbox and hotkey then
- modify_velocity(cmd, limit)
- end
- end
- client.set_event_callback('setup_command', on_setup_cmd)
- local on_dynamicfov_event = function()
- local mode = ui_get(misc.dynamicfov_mode)
- local auto_factor = ui_get(misc.dynamicfov_autofactor)
- local max_fov
- local min_fov
- if mode == "Snipers" then
- max_fov = ui_get(misc.dynamicfov_max_snipers)
- min_fov = ui_get(misc.dynamicfov_min_snipers)
- elseif mode == "Deagle" then
- max_fov = ui_get(misc.dynamicfov_max_deagle)
- min_fov = ui_get(misc.dynamicfov_min_deagle)
- elseif mode == "Pistols" then
- max_fov = ui_get(misc.dynamicfov_max_pistols)
- min_fov = ui_get(misc.dynamicfov_min_pistols)
- elseif mode == "Others" then
- max_fov = ui_get(misc.dynamicfov_max_others)
- min_fov = ui_get(misc.dynamicfov_min_others)
- end
- if auto_factor == nil or max_fov == nil or min_fov == nil then
- return
- end
- local old_fov = ui_get(ref.fov)
- local new_fov = old_fov
- local enemies = entity_get_players(true)
- if min_fov > max_fov then
- local store_min_fov = min_fov
- min_fov = max_fov
- max_fov = store_min_fov
- end
- if #enemies ~= 0 then
- local own_x, own_y, own_z = client_eye_position()
- local own_pitch, own_yaw = client_camera_angles()
- vars.closest_enemy = nil
- local closest_distance = 999999999
- for i = 1, #enemies do
- local enemy = enemies[i]
- local enemy_x, enemy_y, enemy_z = entity_hitbox_position(enemy, 0)
- local x = enemy_x - own_x
- local y = enemy_y - own_y
- local z = enemy_z - own_z
- local yaw = ((math_atan2(y, x) * 180 / math.pi))
- local pitch = -(math_atan2(z, math_sqrt(math_pow(x, 2) + math_pow(y, 2))) * 180 / math.pi)
- local yaw_dif = math_abs(own_yaw % 360 - yaw % 360) % 360
- local pitch_dif = math_abs(own_pitch - pitch ) % 360
- if yaw_dif > 180 then
- yaw_dif = 360 - yaw_dif
- end
- local real_dif = math_sqrt(math_pow(yaw_dif, 2) + math_pow(pitch_dif, 2))
- if closest_distance > real_dif then
- closest_distance = real_dif
- vars.closest_enemy = enemy
- end
- end
- if vars.closest_enemy ~= nil then
- local closest_enemy_x, closest_enemy_y, closest_enemy_z = entity_hitbox_position(vars.closest_enemy, 0)
- local real_distance = math_sqrt(math_pow(own_x - closest_enemy_x, 2) + math_pow(own_y - closest_enemy_y, 2) + math_pow(own_z - closest_enemy_z, 2))
- new_fov = (3800 / real_distance) * (ui_get(misc.dynamicfov_autofactor) * 0.01)
- if (new_fov > max_fov) then
- new_fov = max_fov
- elseif new_fov < min_fov then
- new_fov = min_fov
- end
- end
- new_fov = math_floor(new_fov + 0.5)
- if (new_fov > closest_distance) then
- vars.in_fov = true
- else
- vars.in_fov = false
- end
- else
- new_fov = min_fov
- vars.in_fov = false
- end
- if (new_fov ~= old_fov and (mode == "Snipers" or mode == "Deagle" or mode == "Pistols" or mode == "Others")) then
- ui_set(ref.fov, new_fov)
- end
- end
- local on_dynamicfov_change = function(ref, value)
- ui_set_visible(misc.dynamicfov_mode, value)
- ui_set_visible(misc.dynamicfov_autofactor, value)
- end
- client_set_event_callback("run_command", on_dynamicfov_event)
- client_set_event_callback("change", on_dynamicfov_change)
- client_set_event_callback("run_command", function(c)
- if ui_get(lby.check) and should_swap then
- local _combo = ui_get(lby.combo)
- if _combo == "Opposite" then
- ui_set(ref.body_yaw[2], -ui_get(ref.body_yaw[2]))
- elseif _combo == "Random" then
- ui_set(ref.body_yaw[2], math.random(-60, 60))
- end
- should_swap = false
- end
- ui_set(ref.aw_ref, ui_get(misc.aw_on_key))
- ui_set(ref.ap_ref, ui_get(misc.ap_on_key))
- local lp_hittable = can_enemy_hit_on_peek(enemyclosesttocrosshair,16) and not in_air(local_player)
- if ui_get(misc.slide_leg) then
- if lp_hittable then
- ui_set(ref.misc_legs,"off")
- else
- ui_set(ref.misc_legs,"always slide")
- end
- else
- ui_set(ref.misc_legs,"off")
- end
- local fl_triggers_g = ui_get(misc.custom_fl)
- local fl_state = false
- local fl_slider_value = 1
- local fl_amount = "Maximum"
- if table_contains(fl_triggers_g, "Standing") then
- if ent_state.speed(local_player) < 2 then
- fl_state = true
- end
- end
- if table_contains(fl_triggers_g, "Moving") then
- if ent_state.speed(local_player) > 2 then
- fl_state = true
- end
- end
- if table_contains(fl_triggers_g, "In Air") then
- if in_air(local_player) then
- fl_state = true
- end
- end
- ui_set(ref.fl_refference, fl_state)
- if in_air(local_player) then
- fl_slider_value = ui_get(misc.fl_in_air_slider)
- fl_amount = ui_get(misc.fl_in_air_mode)
- end
- if ent_state.speed(local_player) > 2 and not in_air(local_player) then
- fl_slider_value = ui_get(misc.fl_moving_slider)
- fl_amount = ui_get(misc.fl_moving_mode)
- end
- if ent_state.speed(local_player) < 2 then
- fl_slider_value = ui_get(misc.fl_standing_slider)
- fl_amount = ui_get(misc.fl_standing_mode)
- end
- local slw_true = ui_get(hotkey_reference)
- if slw_true then
- fl_slider_value = ui_get(misc.fl_slowwalk_slider)
- fl_amount = ui_get(misc.fl_slowwalk_mode)
- end
- local fd_true = ui_get(ref.fd_ref[1])
- if fd_true then
- fl_slider_value = ui_get(misc.fl_fakeduck_slider)
- fl_amount = ui_get(misc.fl_fakeduck_mode)
- end
- ui_set(ref.fl_slider, fl_slider_value)
- ui_set(ref.fl_ammount, fl_amount)
- -----------------------------------------------------------------------------------------------------------------------------------------
- local selected_aa
- local current_menu
- local state
- local direction_mode_g = ui_get(lby.direction_handler)
- current_menu = ui_get(menu_selector)
- state = ui_get(lby_breaker)
- ui_set_visible(menu_selector, state)
- -- handle aa
- selected_aa = current_menu == "Anti-Aim"
- ui_set_visible(lby.desync_type, state and selected_aa)
- ui_set_visible(lby.direction_handler, state and selected_aa)
- ui_set_visible(lby.roll_inverter, state and selected_aa and direction_mode_g == "Manual")
- ui_set_visible(lby.body_inverter, state and selected_aa and direction_mode_g == "Manual")
- ui_set_visible(lby.enable, state and selected_aa)
- ui_set_visible(lby.mode, state and selected_aa and ui_get(lby.enable))
- ui_set_visible(lby.smart, state and selected_aa and ui_get(lby.enable))
- ui_set_visible(lby.ab_conditions, state and selected_aa and ui_get(lby.enable))
- -- handle roll
- ui_set_visible(lby.roll_enabled, state and selected_aa)
- ui_set_visible(lby.roll, state and selected_aa and ui_get(lby.roll_enabled))
- ui_set_visible(lby.roll_disablers, state and selected_aa)
- -- handle antibrute force
- ui_set_visible(lby.check, state and selected_aa)
- ui_set_visible(lby.combo, state and selected_aa and ui_get(lby.check))
- ui_set_visible(lby.ab_range, state and selected_aa and ui_get(lby.check))
- -- handle misc
- local selected_misc = current_menu == "Misc"
- ui_set_visible(misc.slide_leg, state and selected_misc)
- ui_set_visible(misc.limit_reference, state and selected_misc)
- ui_set_visible(misc.slow_enabled, state and selected_misc)
- ui_set_visible(misc.limit_reference, state and selected_misc and ui_get(misc.slow_enabled))
- ui_set_visible(misc.custom_fl_enabled, state and selected_misc)
- ui_set_visible(misc.custom_fl, state and selected_misc and ui_get(misc.custom_fl_enabled))
- ui_set_visible(misc.fl_standing_slider, state and selected_misc)
- ui_set_visible(misc.fl_moving_slider, state and selected_misc)
- ui_set_visible(misc.fl_in_air_slider, state and selected_misc)
- ui_set_visible(misc.fl_slowwalk_slider, state and selected_misc)
- ui_set_visible(misc.fl_fakeduck_slider, state and selected_misc)
- ui_set_visible(misc.aw_on_key, state and selected_misc)
- ui_set_visible(misc.ap_on_key, state and selected_misc)
- ui_set_visible(misc.clantag_chg, state and selected_misc)
- ui_set_visible(misc.custom_aa_sw, state and selected_misc)
- ui_set_visible(misc.custom_aa_sw_slider, state and selected_misc and ui_get(misc.custom_aa_sw))
- local mode = ui_get(misc.dynamicfov_mode)
- ui_set_visible(misc.dynamicfov, state and selected_misc)
- ui_set_visible(misc.dynamicfov_mode, state and selected_misc and ui_get(misc.dynamicfov))
- ui_set_visible(misc.dynamicfov_autofactor, state and selected_misc and ui_get(misc.dynamicfov))
- ui_set_visible(misc.dynamicfov_min_snipers, state and selected_misc and mode == "Snipers" and ui_get(misc.dynamicfov))
- ui_set_visible(misc.dynamicfov_max_snipers, state and selected_misc and mode == "Snipers" and ui_get(misc.dynamicfov))
- ui_set_visible(misc.dynamicfov_min_deagle, state and selected_misc and mode == "Deagle" and ui_get(misc.dynamicfov))
- ui_set_visible(misc.dynamicfov_max_deagle, state and selected_misc and mode == "Deagle" and ui_get(misc.dynamicfov))
- ui_set_visible(misc.dynamicfov_min_pistols, state and selected_misc and mode == "Pistols" and ui_get(misc.dynamicfov))
- ui_set_visible(misc.dynamicfov_max_pistols, state and selected_misc and mode == "Pistols" and ui_get(misc.dynamicfov))
- ui_set_visible(misc.dynamicfov_min_others, state and selected_misc and mode == "Others" and ui_get(misc.dynamicfov))
- ui_set_visible(misc.dynamicfov_max_others, state and selected_misc and mode == "Others" and ui_get(misc.dynamicfov))
- ui_set_visible(misc.dynamicfov, state and selected_misc)
- end)
- local micro_move = function(cmd)
- if cmd.chokedcommands == 0 or ent_state.speed(local_player) > 2 or ent_state.is_peeking() or cmd.in_attack == 1 then return end
- cmd.forwardmove = 0.1
- cmd.in_forward = 1
- end
- local desync_func = function(cmd)
- if not ui_get(ref.antiaim) then return end
- if not (ui_get(lby_breaker)) then return end
- local body_yaw_value = ui_get(ref.body_yaw[2])
- local weapon = csgo_weapons[entity_get_prop(entity_get_player_weapon(local_player), "m_iItemDefinitionIndex")]
- local direction_mode_g
- local desync_type
- local invert_roll_true = false
- if ent_state.is_ladder(local_player) then return end
- if weapon == nil or weapon.type == "grenade" then return end
- -- custom slow walk aa
- local sw_true = ui_get(hotkey_reference)
- local custom_pitch = {ui_reference("AA", "Anti-aimbot angles", "pitch")}
- if ui_get(misc.custom_aa_sw) and sw_true then
- ui_set(custom_pitch[1], "Custom")
- ui_set(custom_pitch[2], ui_get(misc.custom_aa_sw_slider))
- else
- ui_set(custom_pitch[1], "Off")
- end
- ui_set_visible(custom_pitch[2], false)
- micro_move(cmd)
- direction_mode_g = ui_get(lby.direction_handler)
- if direction_mode_g == "Automatic" then
- if body_yaw_value == -180 then
- invert_roll_true = true
- else
- invert_roll_true = false
- end
- local body_side = invert_roll_true and ui_get(lby.desync) or -ui_get(lby.desync)
- if cmd.chokedcommands == 0 and cmd.in_attack ~= 1 then
- cmd.yaw = cmd.yaw - body_side
- cmd.allow_send_packet = false
- end
- elseif direction_mode_g == "Manual" then
- --inverter
- local body_side = ui_get(lby.body_inverter) and ui_get(lby.desync) or -ui_get(lby.desync)
- if cmd.chokedcommands == 0 and cmd.in_attack ~= 1 then
- cmd.yaw = cmd.yaw - body_side
- cmd.allow_send_packet = false
- end
- end
- --Spoofs Client to use Roll in MM
- local is_mm_value = ffi_cast("bool*", game_rule[0] + 124)
- local can_roll_move = true
- if ent_state.speed(local_player) > 2 and not ui_get(hotkey_reference) then
- can_roll_move = false
- end
- if is_mm_value ~= nil then
- if ui_get(lby.roll_enabled) and can_roll_move then
- ui_set(ref.roll, 0)
- if direction_mode_g == "Automatic" then
- cmd.roll = invert_roll_true and ui_get(lby.roll) or -ui_get(lby.roll)
- if is_mm_value[0] == true then
- is_mm_value[0] = 0
- is_mm_state = 1
- end
- elseif direction_mode_g == "Manual" then
- cmd.roll = invert_roll_true and ui_get(lby.roll) or -ui_get(lby.roll)
- if is_mm_value[0] == true then
- is_mm_value[0] = 0
- is_mm_state = 1
- end
- end
- else
- if is_mm_value[0] == false and is_mm_state == 1 then
- cmd.roll = 0
- end
- end
- end
- desync_type = ui_get(lby.desync_type)
- ui_set_visible(lby.desync, desync_type == "Manual Value")
- end
- local indicator_func = function()
- local desync = ui_get(ref.fov)
- renderer_indicator(19, 117, 175, 255, "FOV : ", math.floor(desync))
- end
- local menu_visible = function()
- for i, v in pairs(lby) do
- ui_set_visible(v, ui_get(lby_breaker))
- end
- state = not ui_get(lby_breaker)
- -- default sets
- ui_set(ref.pitch, "Off")
- ui_set(ref.yaw_base,"At Targets")
- ui_set(ref.yaw[1],"Off")
- ui_set(ref.body_yaw[1],"Static")
- ui_set(ref.body_yaw[2],180)
- ui_set_visible(ref.enabled, state)
- ui_set_visible(ref.pitch, state)
- ui_set_visible(ref.yaw_base, state)
- ui_set_visible(ref.yaw[1], state)
- ui_set_visible(ref.yaw[2], state)
- ui_set_visible(ref.fsbodyyaw, state)
- ui_set_visible(ref.edgeyaw, state)
- ui_set_visible(ref.roll, state)
- ui_set_visible(ref.body_yaw[1], state)
- ui_set_visible(ref.body_yaw[2], state)
- ui_set_visible(ref.jitter[1], state)
- ui_set_visible(ref.jitter[2], state)
- end
- menu_visible()
- ui_set_callback(lby_breaker, function(e)
- menu_visible()
- local set_callback = ui_get(e) and client_set_event_callback or client_unset_event_callback
- set_callback("setup_command", desync_func)
- set_callback("paint", indicator_func)
- end)
- client_set_event_callback("shutdown", function()
- if globals_mapname() == nil then is_mm_state = 0 return end
- local is_mm_value = ffi_cast("bool*", game_rule[0] + 124)
- if is_mm_value ~= nil then
- if is_mm_value[0] == false and is_mm_state == 1 then
- is_mm_value[0] = 1
- is_mm_state = 0
- end
- end
- end)
- client_set_event_callback("paint", function()
- end)
- local data = {
- side = 1,
- last_side = 0,
- last_hit = 0,
- hit_side = 0
- }
- ---endregion
- ---region functions
- local on_setup_command = function(cmd)
- local local_player = entity_get_local_player()
- if not local_player or entity_get_prop(local_player, "m_lifeState") ~= 0 then
- return
- end
- ui_set(ref.fsbodyyaw, false)
- -- Get the server's current time
- local now = globals_curtime()
- -- Check if our smart mode behaviour is done
- if data.hit_side ~= 0 and now - data.last_hit > 5 then
- -- If so, set the last side to '0' so the anti-aim updates
- data.last_side = 0
- -- And reset the smart mode info
- data.last_hit = 0
- data.hit_side = 0
- end
- -- Get what mode our freestanding is using
- local _mode = ui_get(lby.mode)
- -- Get some properties
- local x, y, z = client_eye_position()
- local _, yaw = client_camera_angles()
- -- Create a table where the trace data will be stored
- local trace_data = {left = 0, right = 0}
- for i = yaw - 90, yaw + 90, 30 do
- -- I don't know an alternative for continue so..
- -- Don't do any calculations if the current angle is equal to our yaw
- -- This means that this is the center point and thus it doesn't contribute to the calculations
- if i ~= yaw then
- -- Convert our yaw to radians in order to do further calculations
- local rad = math.rad(i)
- -- Calculate our destination point
- local px, py, pz = x + 256 * math.cos(rad), y + 256 * math.sin(rad), z
- -- Trace a line from our eye position to the previously calculated point
- local fraction = client_trace_line(local_player, x, y, z, px, py, pz)
- local side = i < yaw and "left" or "right"
- -- Add the trace's fraction to the trace table
- trace_data[side] = trace_data[side] + fraction
- end
- end
- -- Get which side has the lowest fraction amount, which means that it is closer to us.
- data.side = trace_data.left < trace_data.right and 1 or 2
- -- If our side didn't change from the last tick then there's no need to update our anti-aim
- if data.side == data.last_side then
- return
- end
- -- If it did change, then update our cached side to do further checks
- data.last_side = data.side
- -- Check if we should override our side due to the smart mode
- if data.hit_side ~= 0 then
- data.side = data.hit_side == 1 and 2 or 1
- end
- -- Get the fake angle's maximum length and calculate what our next body offset should be
- local limit = 180
- local lby = _mode == "Hide real" and (data.side == 1 and limit or -limit) or (data.side == 1 and -limit or limit)
- -- Update our body yaw settings
- ui_set(ref.body_yaw[1], "Static")
- ui_set(ref.body_yaw[2], lby)
- end
- local on_player_hurt = function(e)
- -- Check if smart mode is disabled
- if not ui_get(lby.smart) then
- return
- end
- -- Get the event's entities
- local userid, attacker = client_userid_to_entindex(e.userid), client_userid_to_entindex(e.attacker)
- -- Check if we're the one who got hurt and not the one who hurt us
- if local_player == userid and local_player ~= attacker then
- -- If so, set the last side to '0' so the anti-aim updates
- data.last_side = 0
- -- Update our smart mode info
- data.last_hit = globals_curtime()
- data.hit_side = data.side
- end
- end
- local handle_menu_visibility = function(self)
- -- Get if the script is enabled and determine if we should set or unset the callbacks
- local enabled = ui_get(self)
- local callback = enabled and client_set_event_callback or client_unset_event_callback
- -- Update the other elements' visibility
- ui_set_visible(lby.smart, enabled)
- -- Register/Unregister our callbacks
- callback("setup_command", on_setup_command)
- callback("player_hurt", on_player_hurt)
- end
- handle_menu_visibility(lby.enable)
- ---endregion
- ui_set_callback(lby.enable, handle_menu_visibility)
- ui_set_callback(lby.mode, function(self)
- -- Set the last side to '0' so the anti-aim updates
- data.last_side = 0
- end)
- ---endregion
- ------------- stupid animation
- ---------------------- INTRO ANIMATION ----------------------
- speed_anim_freq = 120
- text_anim_freq = 400
- time_to_turn_off = false
- real_pos_y = 0
- real_alpha = 0
- start_ticking = 0
- text_alpha = 255
- should_animate = "start"
- local y = 0
- local alpha = 255
- tab,place = "AA","Anti-aimbot angles"
- local lerp = function(a, b, t)
- return a + (b - a) * t
- end
- intro_animation = function()
- -------------------> INTRO CHECKS <-------------------
- if not ui.get(lby_breaker) and should_animate == "should_intro" then
- should_animate = "stop_introduction"
- elseif not ui.get(lby_breaker) and should_animate == "stop" then
- should_animate = "stop_introduction"
- elseif ui.get(lby_breaker) and ui.get(misc.stop_intro) == false and should_animate == "start" or should_animate == "stop_intro" then
- should_animate = "should_intro"
- elseif ui.get(lby_breaker) and ui.get(misc.stop_intro) and (should_animate == "start" or should_animate == "should_intro") then
- should_animate = "stop_freeze"
- end
- -------------------> INTRO START <-------------------
- if should_animate == "should_intro" then
- X,Y = client.screen_size()
- y = lerp(y, Y / 2, globals.frametime() * 2)
- if y >= Y / 2 - 10 then
- alpha = lerp(alpha, 0, globals.frametime() * 1)
- end
- -------------------> INTRO TEXT <-------------------
- renderer.rectangle(X - X,Y - Y,X,Y,10,10,10,alpha )
- renderer.text(X / 1.2, y - 5, 255, 255, 255, alpha,"cb+",0,"Papi Yaw Semi-Rage Technology")
- --renderer.text(X / 2, y , 255, 255, 255, alpha,"cb+",0,string.format("User - %s","User"))
- -------------------> INTRO STOP <-------------------
- if alpha <= 0 then
- should_animate = "stop"
- end
- end
- end
- ---------------------- END ----------------------
- client.set_event_callback("paint_ui",function()
- if ui.get(lby_breaker) then
- intro_animation()
- end
- end)
- local duration = 30
- local clantags = {"Papi Yaw ", "Papi Yaw ", "Papi Yaw ", "Papi Ya", "Papi Y", "Papi", "Pap", "Pa", "P", "", "P", "Pa", "Pap", "Papi", "Papi Y", "Papi Ya", "Papi Yaw"}
- local clantag_prev
- client.set_event_callback("run_command", function()
- if not ui_get(misc.clantag_chg) then return end
- local cur = math.floor(globals.tickcount() / duration) % #clantags
- local clantag = clantags[cur+1]
- if clantag ~= clantag_prev then
- clantag_prev = clantag
- client.set_clan_tag(clantag)
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement