Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local ui_set_callback, ui_set_visible, globals_absoluteframetime, globals_frametime, globals_tickinterval, get_prop, ui_get, sqrt, sin, cos, get_local_player, get_all_players, get_player_name, get_screen_size, draw_text, client_console_cmd, client_delay_call, get_player_name, get_classname, get_local_player, globals_realtime, globals_tickcount = ui.set_callback, ui.set_visible, globals.absoluteframetime, globals.frametime, globals.tickinterval, entity.get_prop, ui.get, math.sqrt, math.sin, math.cos, entity.get_local_player, entity.get_players, entity.get_player_name, client.screen_size, client.draw_text, client.exec, client.delay_call, entity.get_player_name, entity.get_classname, entity.get_local_player, globals.realtime, globals.tickcount
- local table_insert, table_remove, math_floor, math_sqrt, math_min, math_abs = table.insert, table.remove, math.floor, math.sqrt, math.min, math.abs
- local entity_is_enemy, entity_is_alive, entity_is_dormant = entity.is_enemy, entity.is_alive, entity.is_dormant
- local ui_new_checkbox, ui_new_slider, ui_new_combobox, ui_new_multiselect = ui.new_checkbox, ui.new_slider, ui.new_combobox, ui.new_multiselect
- local getvar, setvar = client.get_cvar, client.set_cvar
- --added
- local client_visible, client_trace_bullet, client_eye_position, entity_hitbox_position = client.visible , client.trace_bullet, client.eye_position, entity.hitbox_position
- local disable_oof = ui_new_checkbox("LUA", "A", "Disable AA OOF")
- local oof_yaw = ui_new_combobox("LUA", "A", "OOF Yaw", "180", "Spin", "Static", "180 Z", "Crosshair")
- local oof_pitch = ui_new_combobox("LUA", "A", "OOF Pitch", "Default", "Up", "Down", "Minimal", "Random")
- local oof_fakelag = ui_new_checkbox("LUA", "A", "OOF Fakelag")
- local oof_fov = ui_new_slider("LUA", "A", "FOV to enable", 0, 180)
- --added
- local oof_mode = ui_new_combobox("LUA", "A", "OOF Mode", "Nothing Special", "Vischeck", "Bullettrace Owner", "Bullettrace Enemy")
- local yawaa, yaw_saa = ui.reference("AA", "Anti-aimbot angles", "Yaw")
- local pitchaa = ui.reference("AA", "Anti-aimbot angles", "Pitch")
- local fakelagaa = ui.reference("AA", "Fake lag", "Enabled")
- require ('vector3')
- --hitbox indexes by sapphyrus
- --[[
- hitbox_head = 0,
- hitbox_neck = 1,
- hitbox_pelvis = 2,
- hitbox_spine_0 = 3,
- hitbox_spine_1 = 4,
- hitbox_spine_2 = 5,
- hitbox_spine_3 = 6,
- hitbox_leg_upper_L = 7,
- hitbox_leg_upper_R = 8,
- hitbox_leg_lower_L = 9,
- hitbox_leg_lower_R = 10,
- hitbox_ankle_L = 11,
- hitbox_ankle_R = 12,
- hitbox_hand_L = 13,
- hitbox_hand_R = 14,
- hitbox_arm_upper_L = 15,
- hitbox_arm_lower_L = 16,
- hitbox_arm_upper_R = 17,
- hitbox_arm_lower_R = 18,
- ]]--
- local function runMenuThings()
- ui_set_visible(oof_yaw, ui_get(disable_oof))
- ui_set_visible(oof_pitch, ui_get(disable_oof))
- ui_set_visible(oof_fakelag, ui_get(disable_oof))
- ui_set_visible(oof_fov, ui_get(disable_oof))
- --added
- ui_set_visible(oof_mode, ui_get(disable_oof))
- end
- runMenuThings()
- local function run_cmd()
- if not (ui_get(disable_oof)) then
- return
- end
- local local_player = get_local_player()
- if local_player == nil or not entity.is_alive(local_player) then
- return
- end
- local v_origin_local = Vector3(get_prop(local_player, "m_vecAbsOrigin"))
- if v_origin_local.x == nil then
- return
- end
- local players = get_all_players(true)
- --renamed
- local result = false
- local pitch, yaw, roll = client.camera_angles()
- local cam_angle = Vector3(pitch, yaw, 0)
- local fov = ui_get(oof_fov)
- for i=1, #players do
- local entindex = players[i]
- if entity_is_enemy(entindex) and entity_is_alive(entindex) and not entity_is_dormant(entindex) then
- local v_origin_enemy = Vector3(entity.get_prop(entindex, "m_vecOrigin"))
- local cur_fov = get_FOV(cam_angle, v_origin_local, v_origin_enemy)
- if cur_fov < fov then
- if ui_get(oof_mode) == "Nothing Special" then
- result = true
- elseif ui_get(oof_mode) == "Vischeck" then
- for j = 0, 18 do -- could be reduced to improve performance
- local hitbox_x, hitbox_y, hitbox_z = entity_hitbox_position(entindex, j)
- if client_visible(hitbox_x, hitbox_y, hitbox_z) then
- result = true
- break
- end
- end
- elseif ui_get(oof_mode) == "Bullettrace Owner" then
- local own_x, own_y, own_z = client_eye_position()
- for j = 0, 18 do -- could be reduced to improve performance
- local hitbox_x, hitbox_y, hitbox_z = entity_hitbox_position(entindex, j)
- local enemyhit, damage = client_trace_bullet(local_player, own_x, own_y, own_z, hitbox_x, hitbox_y, hitbox_z)
- if enemyhit ~= nil then
- result = true
- break
- end
- end
- elseif ui_get(oof_mode) == "Bullettrace Enemy" then
- local enemy_x, enemy_y, enemy_z = entity_hitbox_position(entindex, 0) --not sure if that works like eye pos for the enemy
- for j = 0, 18 do -- could be reduced to improve performance
- local hitbox_x, hitbox_y, hitbox_z = entity_hitbox_position(local_player, j)
- local ownerhit, damage = client_trace_bullet(entindex, enemy_x, enemy_y, enemy_z, hitbox_x, hitbox_y, hitbox_z)
- if ownerhit ~= nil then
- result = true
- break
- end
- end
- end
- -- didn't see a reason to store any of that information
- --fov = cur_fov
- --closestplayer = entindex
- end
- end
- end
- if result then
- ui.set(yawaa, ui_get(oof_yaw))
- ui.set(fakelagaa, ui_get(oof_fakelag))
- ui.set(pitchaa, ui_get(oof_pitch))
- else
- ui.set(yawaa, "Off")
- ui.set(fakelagaa, false)
- ui.set(pitchaa, "Off")
- end
- end
- ui.set_callback(disable_oof, function()
- runMenuThings()
- if not (ui_get(disable_oof)) then
- ui.set(yawaa, ui_get(oof_yaw))
- ui.set(fakelagaa, ui_get(oof_fakelag))
- ui.set(pitchaa, ui_get(oof_pitch))
- end
- end)
- client.set_event_callback("run_command", run_cmd)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement