LUA скрипт [NL] AA BUILDER (aka Lunarity.lua [silver]) //for portfolio

Пользователь
Статус
Оффлайн
Регистрация
3 Июл 2021
Сообщения
825
Реакции[?]
93
Поинты[?]
10K
!!!!Осторожно присудствует говонокод (в свое опровдание скажу что писал когда в3 с новым апи только вышел, писал одновременно изучая)

code_language.lua:
ui.sidebar('Lunarity.lua', 'moon')

local globalss = ui.create("Globals", "Lunarity.lua")
local cfg_s = ui.create("Globals", "Config System")

local aa_g = ui.create("AntiAims", "AntiAims")
local aa_a = ui.create("AntiAims", "AntiAims Settings")

local visual = ui.create("Others", "Visuals")
local visual_ui = ui.create("Others", "UI indicators")
local others = ui.create("Others", "Misc")

local welcome = globalss:label("Welcome to Lunarity - "..common.get_username())
local build = globalss:label("Last upd: 07.09.22  |  Build: 1.2")

local conditions = {"global","standing", "moving", "air", "crouch", "walk", "air-crouching"}
local presets = aa_g:combo("Presets", "Disabled", "lunarity-yaw", "customs")
local base = aa_g:combo("Yaw Base", {"Disabled","Left", "Right", "Backward", "At Target", "Freestanding", "Forward"}, 0, "")
local cur_cond = aa_a:combo("Current Condition", conditions)
local anim_breakers = aa_g:selectable("Anim breakers", {'Static legs in air', 'Follow direction'}, 0)

local custom_aa = {
    yaw_add_left = aa_a:slider("Left Yaw Add", -180, 180, 0, ""),
    yaw_add_right = aa_a:slider("Right Yaw Add", -180, 180, 0, ""),
    yaw_mod = aa_a:combo("Yaw Modifier", {"Disabled","Center", "Offset", "Random", "Spin"}, 0, ""),
    yaw_degree = aa_a:slider("Modifier Degree", -180, 180, 0, ""),
    fake_options = aa_a:selectable("Fake Options", {"Avoid Overlap", "Jitter", "Randomize Jitter", "Anti Bruteforce"}, 0, ""),
    lby_mode = aa_a:combo("LBY Mode", {"Disabled","Opposite","Sway"}, 0, ""),
    desync_freestand = aa_a:combo("Freestanding", {"Off","Fake","Real"}, 0, ""),
    desync_on_shot = aa_a:combo("Onshot", {"Default","Opposite","Freestanding","Switch"  }, 0, ""),
    left_limit = aa_a:slider("Fake Left Limit", 0, 60, 0, ""),
    right_limit = aa_a:slider("Fake Right Limit", 0, 60, 0, ""),
}

local custom_aa_stand = {
    enable = aa_a:switch("Override Stand"),
    yaw_add_left = aa_a:slider("[S] Left Yaw Add", -180, 180, 0, ""),
    yaw_add_right = aa_a:slider("[S] Right Yaw Add", -180, 180, 0, ""),
    yaw_mod = aa_a:combo("[S] Yaw Modifier", {"Disabled","Center", "Offset", "Random", "Spin"}, 0, ""),
    yaw_degree = aa_a:slider("[S] Modifier Degree", -180, 180, 0, ""),
    fake_options = aa_a:selectable("[S] Fake Options", {"Avoid Overlap", "Jitter", "Randomize Jitter", "Anti Bruteforce"}, 0, ""),
    lby_mode = aa_a:combo("[S] LBY Mode", {"Disabled","Opposite","Sway"}, 0, ""),
    desync_freestand = aa_a:combo("[S] Freestanding", {"Off","Fake","Real"}, 0, ""),
    desync_on_shot = aa_a:combo("[S] Onshot", {"Default","Opposite","Freestanding","Switch"  }, 0, ""),
    left_limit = aa_a:slider("[S] Fake Left Limit", 0, 60, 0, ""),
    right_limit = aa_a:slider("[S] Fake Right Limit", 0, 60, 0, ""),
}

local custom_aa_move = {
    enable = aa_a:switch("Override Move"),
    yaw_add_left = aa_a:slider("[M] Left Yaw Add", -180, 180, 0, ""),
    yaw_add_right = aa_a:slider("[M] Right Yaw Add", -180, 180, 0, ""),
    yaw_mod = aa_a:combo("[M] Yaw Modifier", {"Disabled","Center", "Offset", "Random", "Spin"}, 0, ""),
    yaw_degree = aa_a:slider("[M] Modifier Degree", -180, 180, 0, ""),
    fake_options = aa_a:selectable("[M] Fake Options", {"Avoid Overlap", "Jitter", "Randomize Jitter", "Anti Bruteforce"}, 0, ""),
    lby_mode = aa_a:combo("[M] LBY Mode", {"Disabled","Opposite","Sway"}, 0, ""),
    desync_freestand = aa_a:combo("[M] Freestanding", {"Off","Fake","Real"}, 0, ""),
    desync_on_shot = aa_a:combo("[M] Onshot", {"Default","Opposite","Freestanding","Switch"  }, 0, ""),
    left_limit = aa_a:slider("[M] Fake Left Limit", 0, 60, 0, ""),
    right_limit = aa_a:slider("[M] Fake Right Limit", 0, 60, 0, ""),
}

local custom_aa_air = {
    enable = aa_a:switch("Override Air"),
    yaw_add_left = aa_a:slider("[A] Left Yaw Add", -180, 180, 0, ""),
    yaw_add_right = aa_a:slider("[A] Right Yaw Add", -180, 180, 0, ""),
    yaw_mod = aa_a:combo("[A] Yaw Modifier", {"Disabled","Center", "Offset", "Random", "Spin"}, 0, ""),
    yaw_degree = aa_a:slider("[A] Modifier Degree", -180, 180, 0, ""),
    fake_options = aa_a:selectable("[A] Fake Options", {"Avoid Overlap", "Jitter", "Randomize Jitter", "Anti Bruteforce"}, 0, ""),
    lby_mode = aa_a:combo("[A] LBY Mode", {"Disabled","Opposite","Sway"}, 0, ""),
    desync_freestand = aa_a:combo("[A] Freestanding", {"Off","Fake","Real"}, 0, ""),
    desync_on_shot = aa_a:combo("[A] Onshot", {"Default","Opposite","Freestanding","Switch"  }, 0, ""),
    left_limit = aa_a:slider("[A] Fake Left Limit", 0, 60, 0, ""),
    right_limit = aa_a:slider("[A] Fake Right Limit", 0, 60, 0, ""),
}

local custom_aa_crouch = {
    enable = aa_a:switch("Override Crouch"),
    yaw_add_left = aa_a:slider("[C] Left Yaw Add", -180, 180, 0, ""),
    yaw_add_right = aa_a:slider("[C] Right Yaw Add", -180, 180, 0, ""),
    yaw_mod = aa_a:combo("[C] Yaw Modifier", {"Disabled","Center", "Offset", "Random", "Spin"}, 0, ""),
    yaw_degree = aa_a:slider("[C] Modifier Degree", -180, 180, 0, ""),
    fake_options = aa_a:selectable("[C] Fake Options", {"Avoid Overlap", "Jitter", "Randomize Jitter", "Anti Bruteforce"}, 0, ""),
    lby_mode = aa_a:combo("[C] LBY Mode", {"Disabled","Opposite","Sway"}, 0, ""),
    desync_freestand = aa_a:combo("[C] Freestanding", {"Off","Fake","Real"}, 0, ""),
    desync_on_shot = aa_a:combo("[C] Onshot", {"Default","Opposite","Freestanding","Switch"  }, 0, ""),
    left_limit = aa_a:slider("[C] Fake Left Limit", 0, 60, 0, ""),
    right_limit = aa_a:slider("[C] Fake Right Limit", 0, 60, 0, ""),
}

local custom_aa_walk = {
    enable = aa_a:switch("Override Walk"),
    yaw_add_left = aa_a:slider("[W] Left Yaw Add", -180, 180, 0, ""),
    yaw_add_right = aa_a:slider("[W] Right Yaw Add", -180, 180, 0, ""),
    yaw_mod = aa_a:combo("[W] Yaw Modifier", {"Disabled","Center", "Offset", "Random", "Spin"}, 0, ""),
    yaw_degree = aa_a:slider("[W] Modifier Degree", -180, 180, 0, ""),
    fake_options = aa_a:selectable("[W] Fake Options", {"Avoid Overlap", "Jitter", "Randomize Jitter", "Anti Bruteforce"}, 0, ""),
    lby_mode = aa_a:combo("[W] LBY Mode", {"Disabled","Opposite","Sway"}, 0, ""),
    desync_freestand = aa_a:combo("[W] Freestanding", {"Off","Fake","Real"}, 0, ""),
    desync_on_shot = aa_a:combo("[W] Onshot", {"Default","Opposite","Freestanding","Switch"  }, 0, ""),
    left_limit = aa_a:slider("[W] Fake Left Limit", 0, 60, 0, ""),
    right_limit = aa_a:slider("[W] Fake Right Limit", 0, 60, 0, ""),
}

local custom_aa_air_duck = {
    enable = aa_a:switch("Override Air+Crouch"),
    yaw_add_left = aa_a:slider("[A+C] Left Yaw Add", -180, 180, 0, ""),
    yaw_add_right = aa_a:slider("[A+C] Right Yaw Add", -180, 180, 0, ""),
    yaw_mod = aa_a:combo("[A+C] Yaw Modifier", {"Disabled","Center", "Offset", "Random", "Spin"}, 0, ""),
    yaw_degree = aa_a:slider("[A+C] Modifier Degree", -180, 180, 0, ""),
    fake_options = aa_a:selectable("[A+C] Fake Options", {"Avoid Overlap", "Jitter", "Randomize Jitter", "Anti Bruteforce"}, 0, ""),
    lby_mode = aa_a:combo("[A+C] LBY Mode", {"Disabled","Opposite","Sway"}, 0, ""),
    desync_freestand = aa_a:combo("[A+C] Freestanding", {"Off","Fake","Real"}, 0, ""),
    desync_on_shot = aa_a:combo("[A+C] Onshot", {"Default","Opposite","Freestanding","Switch"  }, 0, ""),
    left_limit = aa_a:slider("[A+C] Fake Left Limit", 0, 60, 0, ""),
    right_limit = aa_a:slider("[A+C] Fake Right Limit", 0, 60, 0, ""),
}

local var = {
    hit = ui.find("aimbot", "ragebot", "selection", "hit chance"),
    dt = ui.find("aimbot", "ragebot", "main", "double Tap"),
    hs = ui.find("aimbot", "ragebot", "main", "hide shots"),
    autopeek = ui.find("aimbot", "ragebot", "main", "peek assist"),
    legmovement = ui.find("aimbot", "anti aim", "misc", "leg movement"),

    walk = ui.find("aimbot", "anti aim", "misc", "slow walk"),
    fl_en = ui.find("aimbot", "anti aim", "fake lag", "enabled"),

    pitch = ui.find("aimbot", "anti aim", "angles", "pitch"),
    yaw = ui.find("aimbot", "anti aim", "angles", "yaw"),
    at_target = ui.find("aimbot", "anti aim", "angles", "yaw", "base"),
    yaw_mod = ui.find("aimbot", "anti aim", "angles", "yaw modifier"),
    offset = ui.find("aimbot", "anti aim", "angles", "yaw", "offset"),
    yaw_offset = ui.find("aimbot", "anti aim", "angles", "yaw modifier", "offset"),
    body_yaw = ui.find("aimbot", "anti aim", "angles", "body yaw"),

    left_limit = ui.find("aimbot", "anti aim", "angles", "body yaw", "left limit"),
    right_limit = ui.find("aimbot", "anti aim", "angles", "body yaw", "right limit"),
    options = ui.find("aimbot", "anti aim", "angles", "body yaw", "options"),
    freestanding_desync = ui.find("aimbot", "anti aim", "angles", "body yaw", "freestanding"),
    on_shot = ui.find("aimbot", "anti aim", "angles", "body yaw", "on shot"),
    lby = ui.find("aimbot", "anti aim", "angles", "body yaw", "lby mode"),

    freestanding = ui.find("aimbot", "anti aim", "angles", "freestanding"),
    roll = ui.find("aimbot", "anti aim", "angles", "extended angles"),

    override_zoom_en = ui.find("visuals", "world", "main", "override zoom"),
    override_zoom = ui.find("visuals", "world", "main", "override zoom", "scope overlay"),
    hitsound = ui.find("visuals", "world", "other", "hit marker sound"),

    strafe = ui.find("miscellaneous", "main", "movement", "air strafe"),
    clantag = ui.find("miscellaneous", "main", "in-game", "clantag"),
    shared_f = ui.find("miscellaneous", "main", "in-game", "Shared Features"),
}

function get_velocity(player)
    if(player == nil) then return end
    local vec = player.m_vecVelocity
    local velocity = vec:length()
    return velocity
end

local function is_crouching(player)
    local flags = player.m_fFlags

    if bit.band(flags, 4) == 4 then
        return true
    end

    return false
end

local function in_air(player)
    local flags = player.m_fFlags

    if bit.band(flags, 1) == 0 then
        return true
    end

    return false
end

--antiaims
local bInverter = false;

function antiaims(cmd)
    local get_local_player = entity.get_local_player()
    if get_local_player == nil then return end
    local weapon = get_local_player:get_player_weapon()
    if weapon == nil then return end
   
    bInverter = not bInverter;
    yaw_add = 0

    --lunarity-yaw
    if presets:get() == "lunarity-yaw" then
        --stand
        if (in_air(get_local_player) == false and is_crouching(get_local_player) == false and var.walk:get() == false and get_velocity(get_local_player) < 3) then
            yaw_add = bInverter and -26 or 26
            var.pitch:override("Down")
            var.yaw_mod:override("Center")
            var.at_target:override("At target")
            var.body_yaw:override(true)
            var.left_limit:override(60)
            var.right_limit:override(60)
            var.options:override("jitter")
            var.freestanding_desync:override("off")
            var.on_shot:override("freestanding")
            var.lby:override("opposite")
            var.offset:override(bInverter and -26 or 26)
            var.yaw_offset:override(35)
        end
        --duck
        if (in_air(get_local_player) == false and is_crouching(get_local_player)) then
            yaw_add = bInverter and -24 or 22
            var.pitch:override("Down")
            var.yaw_mod:override("Center")
            var.at_target:override("At target")
            var.body_yaw:override(true)
            var.left_limit:override(60)
            var.right_limit:override(60)
            var.options:override("jitter")
            var.freestanding_desync:override("off")
            var.on_shot:override("freestanding")
            var.lby:override("opposite")
            var.offset:override(bInverter and -22 or 22)
            var.yaw_offset:override(42)
        end
        --air
        if (in_air(get_local_player) and is_crouching(get_local_player) == false) then
            yaw_add = bInverter and -20 or 22
            var.pitch:override("Down")
            var.yaw_mod:override("Center")
            var.at_target:override("At target")
            var.body_yaw:override(true)
            var.left_limit:override(60)
            var.right_limit:override(60)
            var.options:override("jitter")
            var.freestanding_desync:override("off")
            var.on_shot:override("freestanding")
            var.lby:override("opposite")
            var.offset:override(bInverter and -20 or 22)
            var.yaw_offset:override(32)
        end
        --move
        if (in_air(get_local_player) == false and is_crouching(get_local_player) == false and var.walk:get() == false and get_velocity(get_local_player) > 3) then
            yaw_add = bInverter and -24 or 22
            var.pitch:override("Down")
            var.yaw_mod:override("Center")
            var.at_target:override("At target")
            var.body_yaw:override(true)
            var.left_limit:override(60)
            var.right_limit:override(60)
            var.options:override("jitter")
            var.freestanding_desync:override("off")
            var.on_shot:override("freestanding")
            var.lby:override("opposite")
            var.offset:override(bInverter and -24 or 22)
            var.yaw_offset:override(32)
        end
        --air+duck
        if (in_air(get_local_player) and is_crouching(get_local_player)) then
            yaw_add = bInverter and -7 or 12
            var.pitch:override("Down")
            var.yaw_mod:override("Center")
            var.at_target:override("At target")
            var.body_yaw:override(true)
            var.left_limit:override(60)
            var.right_limit:override(60)
            var.options:override("jitter")
            var.freestanding_desync:override("off")
            var.on_shot:override("freestanding")
            var.lby:override("opposite")
            var.offset:override(bInverter and -7 or 12)
            var.yaw_offset:override(60)
        end
        --walk
        if (in_air(get_local_player) == false and is_crouching(get_local_player) == false and var.walk:get()) then
            yaw_add = bInverter and -24 or 22
            var.pitch:override("Down")
            var.yaw_mod:override("Center")
            var.at_target:override("At target")
            var.body_yaw:override(true)
            var.left_limit:override(60)
            var.right_limit:override(60)
            var.options:override("jitter")
            var.freestanding_desync:override("off")
            var.on_shot:override("freestanding")
            var.lby:override("opposite")
            var.offset:override(bInverter and -24 or 22)
            var.yaw_offset:override(32)
        end
    end
    if presets:get() == "customs" then
        yaw_add = bInverter and custom_aa.yaw_add_left:get() or custom_aa.yaw_add_right:get()
        var.pitch:override("Down")
        var.yaw_mod:override(custom_aa.yaw_mod:get())
        var.body_yaw:override(true)
        var.left_limit:override(custom_aa.left_limit:get())
        var.right_limit:override(custom_aa.right_limit:get())
        var.options:override(custom_aa.fake_options:get())
        var.freestanding_desync:override(custom_aa.desync_freestand:get())
        var.on_shot:override(custom_aa.desync_on_shot:get())
        var.lby:override(custom_aa.lby_mode:get())
        var.offset:override(bInverter and custom_aa.yaw_add_left:get() or custom_aa.yaw_add_right:get())
        var.yaw_offset:override(custom_aa.yaw_degree:get())
       
        if custom_aa_stand.enable:get() and (in_air(get_local_player) == false and is_crouching(get_local_player) == false and var.walk:get() == false and get_velocity(get_local_player) < 3) then
            yaw_add = bInverter and custom_aa_stand.yaw_add_left:get() or custom_aa_stand.yaw_add_right:get()
            var.pitch:override("Down")
            var.yaw_mod:override(custom_aa_stand.yaw_mod:get())
            var.body_yaw:override(true)
            var.left_limit:override(custom_aa_stand.left_limit:get())
            var.right_limit:override(custom_aa_stand.right_limit:get())
            var.options:override(custom_aa_stand.fake_options:get())
            var.freestanding_desync:override(custom_aa_stand.desync_freestand:get())
            var.on_shot:override(custom_aa_stand.desync_on_shot:get())
            var.lby:override(custom_aa_stand.lby_mode:get())
            var.offset:override(bInverter and custom_aa_stand.yaw_add_left:get() or custom_aa_stand.yaw_add_right:get())
            var.yaw_offset:override(custom_aa_stand.yaw_degree:get())
        end
        if custom_aa_move.enable:get() and (in_air(get_local_player) == false and is_crouching(get_local_player) == false and var.walk:get() == false and get_velocity(get_local_player) > 3) then
            yaw_add = bInverter and custom_aa_move.yaw_add_left:get() or custom_aa_move.yaw_add_right:get()
            var.pitch:override("Down")
            var.yaw_mod:override(custom_aa_move.yaw_mod:get())
            var.body_yaw:override(true)
            var.left_limit:override(custom_aa_move.left_limit:get())
            var.right_limit:override(custom_aa_move.right_limit:get())
            var.options:override(custom_aa_move.fake_options:get())
            var.freestanding_desync:override(custom_aa_move.desync_freestand:get())
            var.on_shot:override(custom_aa_move.desync_on_shot:get())
            var.lby:override(custom_aa_move.lby_mode:get())
            var.offset:override(bInverter and custom_aa_move.yaw_add_left:get() or custom_aa_move.yaw_add_right:get())
            var.yaw_offset:override(custom_aa_move.yaw_degree:get())
        end
        if custom_aa_air.enable:get() and (in_air(get_local_player) and is_crouching(get_local_player) == false) then
            yaw_add = bInverter and custom_aa_air.yaw_add_left:get() or custom_aa_air.yaw_add_right:get()
            var.pitch:override("Down")
            var.yaw_mod:override(custom_aa_air.yaw_mod:get())
            var.body_yaw:override(true)
            var.left_limit:override(custom_aa_air.left_limit:get())
            var.right_limit:override(custom_aa_air.right_limit:get())
            var.options:override(custom_aa_air.fake_options:get())
            var.freestanding_desync:override(custom_aa_air.desync_freestand:get())
            var.on_shot:override(custom_aa_air.desync_on_shot:get())
            var.lby:override(custom_aa_air.lby_mode:get())
            var.offset:override(bInverter and custom_aa_air.yaw_add_left:get() or custom_aa_air.yaw_add_right:get())
            var.yaw_offset:override(custom_aa_air.yaw_degree:get())
        end
        if custom_aa_crouch.enable:get() and (in_air(get_local_player) == false and is_crouching(get_local_player)) then
            yaw_add = bInverter and custom_aa_crouch.yaw_add_left:get() or custom_aa_crouch.yaw_add_right:get()
            var.pitch:override("Down")
            var.yaw_mod:override(custom_aa_crouch.yaw_mod:get())
            var.body_yaw:override(true)
            var.left_limit:override(custom_aa_crouch.left_limit:get())
            var.right_limit:override(custom_aa_crouch.right_limit:get())
            var.options:override(custom_aa_crouch.fake_options:get())
            var.freestanding_desync:override(custom_aa_crouch.desync_freestand:get())
            var.on_shot:override(custom_aa_crouch.desync_on_shot:get())
            var.lby:override(custom_aa_crouch.lby_mode:get())
            var.offset:override(bInverter and custom_aa_crouch.yaw_add_left:get() or custom_aa_crouch.yaw_add_right:get())
            var.yaw_offset:override(custom_aa_crouch.yaw_degree:get())
        end
        if custom_aa_walk.enable:get() and (in_air(get_local_player) == false and is_crouching(get_local_player) == false and var.walk:get()) then
            yaw_add = bInverter and custom_aa_walk.yaw_add_left:get() or custom_aa_walk.yaw_add_right:get()
            var.pitch:override("Down")
            var.yaw_mod:override(custom_aa_walk.yaw_mod:get())
            var.body_yaw:override(true)
            var.left_limit:override(custom_aa_walk.left_limit:get())
            var.right_limit:override(custom_aa_walk.right_limit:get())
            var.options:override(custom_aa_walk.fake_options:get())
            var.freestanding_desync:override(custom_aa_walk.desync_freestand:get())
            var.on_shot:override(custom_aa_walk.desync_on_shot:get())
            var.lby:override(custom_aa_walk.lby_mode:get())
            var.offset:override(bInverter and custom_aa_walk.yaw_add_left:get() or custom_aa_walk.yaw_add_right:get())
            var.yaw_offset:override(custom_aa_walk.yaw_degree:get())
        end
        if custom_aa_air_duck.enable:get() and (in_air(get_local_player) and is_crouching(get_local_player)) then
            yaw_add = bInverter and custom_aa_air_duck.yaw_add_left:get() or custom_aa_air_duck.yaw_add_right:get()
            var.pitch:override("Down")
            var.yaw_mod:override(custom_aa_air_duck.yaw_mod:get())
            var.body_yaw:override(true)
            var.left_limit:override(custom_aa_air_duck.left_limit:get())
            var.right_limit:override(custom_aa_air_duck.right_limit:get())
            var.options:override(custom_aa_air_duck.fake_options:get())
            var.freestanding_desync:override(custom_aa_air_duck.desync_freestand:get())
            var.on_shot:override(custom_aa_air_duck.desync_on_shot:get())
            var.lby:override(custom_aa_air_duck.lby_mode:get())
            var.offset:override(bInverter and custom_aa_air_duck.yaw_add_left:get() or custom_aa_air_duck.yaw_add_right:get())
            var.yaw_offset:override(custom_aa_air_duck.yaw_degree:get())
        end
    end
    if(base:get() == "Disabled") then
        var.yaw:override("Disabled")
        var.offset:override(0 + yaw_add)
        var.at_target:override("Local View")
        var.freestanding:override(false)
    elseif(base:get() == "Left") then
        var.yaw:override("Backward")
        var.offset:override(-90 + yaw_add)
        var.at_target:override("Local View")
        var.freestanding:override(false)
    elseif(base:get() == "Right") then
        var.yaw:override("Backward")
        var.offset:override(90 + yaw_add)
        var.at_target:override("Local View")
        var.freestanding:override(false)
    elseif(base:get() == "Backward") then
        var.yaw:override("Backward")
        var.offset:override(0 + yaw_add)
        var.at_target:override("Local View")
        var.freestanding:override(false)
    elseif(base:get() == "At Target") then
        var.yaw:override("Backward")
        var.offset:override(0 + yaw_add)
        var.at_target:override("At Target")
        var.freestanding:override(false)
    elseif(base:get() == "Freestanding") then
        var.yaw:override("Backward")
        var.at_target:override("At Target")
        var.freestanding:set(false)
        var.freestanding:override(true)
    elseif(base:get() == "Forward") then
        var.yaw:override("Backward")
        var.offset:override(180 + yaw_add)
        var.at_target:override("Local View")
        var.freestanding:override(false)
    end
end

local base64 = require("neverlose/base64")
local Clipboard, ffi_handler = {}, {}, {}

ffi.cdef[[
    typedef int(__thiscall* get_clipboard_text_length)(void*);
    typedef void(__thiscall* set_clipboard_text)(void*, const char*, int);
    typedef void(__thiscall* get_clipboard_text)(void*, int, const char*, int);
]]

ffi_handler.VGUI_System = ffi.cast(ffi.typeof("void***"), utils.create_interface("vgui2.dll", "VGUI_System010"))
ffi_handler.get_clipboard_text_length = ffi.cast("get_clipboard_text_length", ffi_handler.VGUI_System[0][7])
ffi_handler.get_clipboard_text = ffi.cast("get_clipboard_text", ffi_handler.VGUI_System[0][11])
ffi_handler.set_clipboard_text = ffi.cast("set_clipboard_text", ffi_handler.VGUI_System[0][9])


function Clipboard.Get()
    local clipboard_text_length = ffi_handler.get_clipboard_text_length(ffi_handler.VGUI_System)

    if (clipboard_text_length > 0) then
        local buffer = ffi.new("char[?]", clipboard_text_length)

        ffi_handler.get_clipboard_text(ffi_handler.VGUI_System, 0, buffer, clipboard_text_length * ffi.sizeof("char[?]", clipboard_text_length))
        return ffi.string(buffer, clipboard_text_length - 1)
    end

    return ""
end

function Clipboard.Set(text)
    ffi_handler.set_clipboard_text(ffi_handler.VGUI_System, text, #text)
end

local JSON = panorama.loadstring([[
    return {
        stringify: JSON.stringify,
        parse: JSON.parse
    };
]])()


local cfg_data = {
    bools = {
        custom_aa_stand.enable,
        custom_aa_move.enable,
        custom_aa_air.enable,
        custom_aa_crouch.enable,
        custom_aa_walk.enable,
        custom_aa_air_duck.enable
    },

    ints = {
        presets,
        base,
        anim_breakers,
        cur_cond,
       
        custom_aa.yaw_add_left,
        custom_aa.yaw_add_right,
        custom_aa.yaw_mod,
        custom_aa.yaw_degree,
        custom_aa.desync_freestand,
        custom_aa.desync_on_shot,
        custom_aa.fake_options,
        custom_aa.left_limit,
        custom_aa.right_limit,

        custom_aa_stand.yaw_add_left,
        custom_aa_stand.yaw_add_right,
        custom_aa_stand.yaw_mod,
        custom_aa_stand.yaw_degree,
        custom_aa_stand.desync_freestand,
        custom_aa_stand.desync_on_shot,
        custom_aa_stand.fake_options,
        custom_aa_stand.left_limit,
        custom_aa_stand.right_limit,

        custom_aa_move.yaw_add_left,
        custom_aa_move.yaw_add_right,
        custom_aa_move.yaw_mod,
        custom_aa_move.yaw_degree,
        custom_aa_move.desync_freestand,
        custom_aa_move.desync_on_shot,
        custom_aa_move.fake_options,
        custom_aa_move.left_limit,
        custom_aa_move.right_limit,

        custom_aa_air.yaw_add_left,
        custom_aa_air.yaw_add_right,
        custom_aa_air.yaw_mod,
        custom_aa_air.yaw_degree,
        custom_aa_air.desync_freestand,
        custom_aa_air.desync_on_shot,
        custom_aa_air.fake_options,
        custom_aa_air.left_limit,
        custom_aa_air.right_limit,

        custom_aa_crouch.yaw_add_left,
        custom_aa_crouch.yaw_add_right,
        custom_aa_crouch.yaw_mod,
        custom_aa_crouch.yaw_degree,
        custom_aa_crouch.desync_freestand,
        custom_aa_crouch.desync_on_shot,
        custom_aa_crouch.fake_options,
        custom_aa_crouch.left_limit,
        custom_aa_crouch.right_limit,

        custom_aa_walk.yaw_add_left,
        custom_aa_walk.yaw_add_right,
        custom_aa_walk.yaw_mod,
        custom_aa_walk.yaw_degree,
        custom_aa_walk.desync_freestand,
        custom_aa_walk.desync_on_shot,
        custom_aa_walk.fake_options,
        custom_aa_walk.left_limit,
        custom_aa_walk.right_limit,

        custom_aa_air_duck.yaw_add_left,
        custom_aa_air_duck.yaw_add_right,
        custom_aa_air_duck.yaw_mod,
        custom_aa_air_duck.yaw_degree,
        custom_aa_air_duck.desync_freestand,
        custom_aa_air_duck.desync_on_shot,
        custom_aa_air_duck.fake_options,
        custom_aa_air_duck.left_limit,
        custom_aa_air_duck.right_limit,

        windows
    },

    floats = {
    },

    strings = {
        custom_name
    }
}

cfg_s:button("Copy Settings", function()

    local Code = {{}, {}, {}, {}, {}}

    for _, bools in pairs(cfg_data.bools) do
        table.insert(Code[1], bools:get())
    end

    for _, ints in pairs(cfg_data.ints) do
        table.insert(Code[2], ints:get())
    end

    for _, floats in pairs(cfg_data.floats) do
        table.insert(Code[3], floats:get())
    end

    for _, strings in pairs(cfg_data.strings) do
        table.insert(Code[4], strings:get())
    end

    Clipboard.Set(base64.encode(JSON.stringify(Code)))
end)

cfg_s:button("Load Settings", function()

    for k, v in pairs(JSON.parse(base64.decode(Clipboard.Get()))) do

        k = ({[1] = "bools", [2] = "ints", [3] = "floats", [4] = "strings", [5] = "colors"})[k]

        for k2, v2 in pairs(v) do
            if (k == "bools") then
                cfg_data[k][k2]:set(v2)
            end

            if (k == "ints") then
                cfg_data[k][k2]:set(v2)
            end

            if (k == "floats") then
                cfg_data[k][k2]:set(v2)
            end

            if (k == "strings") then
                cfg_data[k][k2]:set(v2)
            end
        end
    end
end)

cfg_s:button("Load Default Settings", function()
    presets:set("customs")

    custom_aa_stand.enable:set(true)
    custom_aa_move.enable:set(true)
    custom_aa_air.enable:set(true)
    custom_aa_crouch.enable:set(true)
    custom_aa_walk.enable:set(true)
    custom_aa_air_duck.enable:set(true)

    custom_aa_stand.yaw_add_left:set(6)
    custom_aa_stand.yaw_add_right:set(6)
    custom_aa_stand.yaw_mod:set("Center")
    custom_aa_stand.yaw_degree:set(-66)
    custom_aa_stand.desync_freestand:set("off")
    custom_aa_stand.desync_on_shot:set("freestanding")
    custom_aa_stand.fake_options:set("jitter")
    custom_aa_stand.left_limit:set(60)
    custom_aa_stand.right_limit:set(60)

    custom_aa_move.yaw_add_left:set(0)
    custom_aa_move.yaw_add_right:set(0)
    custom_aa_move.yaw_mod:set("Center")
    custom_aa_move.yaw_degree:set(-72)
    custom_aa_move.desync_freestand:set("off")
    custom_aa_move.desync_on_shot:set("freestanding")
    custom_aa_move.fake_options:set("jitter")
    custom_aa_move.left_limit:set(60)
    custom_aa_move.right_limit:set(60)

    custom_aa_air.yaw_add_left:set(6)
    custom_aa_air.yaw_add_right:set(6)
    custom_aa_air.yaw_mod:set("center")
    custom_aa_air.yaw_degree:set(-66)
    custom_aa_air.desync_freestand:set("off")
    custom_aa_air.desync_on_shot:set("freestanding")
    custom_aa_air.fake_options:set("jitter")
    custom_aa_air.left_limit:set(60)
    custom_aa_air.right_limit:set(60)
    custom_aa_air.lby_mode:set("opposite")

    custom_aa_crouch.yaw_add_left:set(6)
    custom_aa_crouch.yaw_add_right:set(6)
    custom_aa_crouch.yaw_mod:set("Center")
    custom_aa_crouch.yaw_degree:set(-66)
    custom_aa_crouch.desync_on_shot:set("Switch")
    custom_aa_crouch.fake_options:set("jitter")
    custom_aa_crouch.left_limit:set(60)
    custom_aa_crouch.right_limit:set(60)

    custom_aa_walk.yaw_add_left:set(0)
    custom_aa_walk.yaw_add_right:set(0)
    custom_aa_walk.yaw_mod:set("center")
    custom_aa_walk.yaw_degree:set(-88)
    custom_aa_walk.desync_freestand:set("off")
    custom_aa_walk.desync_on_shot:set("freestanding")
    custom_aa_walk.fake_options:set("jitter")
    custom_aa_walk.left_limit:set(60)
    custom_aa_walk.right_limit:set(60)
    custom_aa_walk.lby_mode:set("opposite")

    custom_aa_air_duck.yaw_add_left:set(6)
    custom_aa_air_duck.yaw_add_right:set(6)
    custom_aa_air_duck.yaw_mod:set("center")
    custom_aa_air_duck.yaw_degree:set(-66)
    custom_aa_air_duck.desync_freestand:set("off")
    custom_aa_air_duck.desync_on_shot:set("freestanding")
    custom_aa_air_duck.fake_options:set("jitter")
    custom_aa_air_duck.left_limit:set(60)
    custom_aa_air_duck.right_limit:set(60)
end)

globalss:button("Discord server", function(link)
    panorama.SteamOverlayAPI.OpenExternalBrowserURL("https://discord.gg/eQRBcycFjH")
end)

function menu_hanlde()

    cur_cond:set_visible(presets:get() == "customs")
    custom_aa.yaw_add_left:set_visible(presets:get() == "customs" and cur_cond:get() == "global")
    custom_aa.yaw_add_right:set_visible(presets:get() == "customs" and cur_cond:get() == "global")
    custom_aa.yaw_degree:set_visible(presets:get() == "customs" and cur_cond:get() == "global")
    custom_aa.yaw_mod:set_visible(presets:get() == "customs" and cur_cond:get() == "global")
    custom_aa.fake_options:set_visible(presets:get() == "customs" and cur_cond:get() == "global")
    custom_aa.lby_mode:set_visible(presets:get() == "customs" and cur_cond:get() == "global")
    custom_aa.desync_freestand:set_visible(presets:get() == "customs" and cur_cond:get() == "global")
    custom_aa.desync_on_shot:set_visible(presets:get() == "customs" and cur_cond:get() == "global")
    custom_aa.left_limit:set_visible(presets:get() == "customs" and cur_cond:get() == "global")
    custom_aa.right_limit:set_visible(presets:get() == "customs" and cur_cond:get() == "global")

    custom_aa_stand.enable:set_visible(presets:get() == "customs" and cur_cond:get() == "standing")
    custom_aa_stand.yaw_add_left:set_visible(presets:get() == "customs" and cur_cond:get() == "standing")
    custom_aa_stand.yaw_add_right:set_visible(presets:get() == "customs" and cur_cond:get() == "standing")
    custom_aa_stand.yaw_degree:set_visible(presets:get() == "customs" and cur_cond:get() == "standing")
    custom_aa_stand.yaw_mod:set_visible(presets:get() == "customs" and cur_cond:get() == "standing")
    custom_aa_stand.fake_options:set_visible(presets:get() == "customs" and cur_cond:get() == "standing")
    custom_aa_stand.lby_mode:set_visible(presets:get() == "customs" and cur_cond:get() == "standing")
    custom_aa_stand.desync_freestand:set_visible(presets:get() == "customs" and cur_cond:get() == "standing")
    custom_aa_stand.desync_on_shot:set_visible(presets:get() == "customs" and cur_cond:get() == "standing")
    custom_aa_stand.left_limit:set_visible(presets:get() == "customs" and cur_cond:get() == "standing")
    custom_aa_stand.right_limit:set_visible(presets:get() == "customs" and cur_cond:get() == "standing")

    custom_aa_move.enable:set_visible(presets:get() == "customs" and cur_cond:get() == "moving")
    custom_aa_move.yaw_add_left:set_visible(presets:get() == "customs" and cur_cond:get() == "moving")
    custom_aa_move.yaw_add_right:set_visible(presets:get() == "customs" and cur_cond:get() == "moving")
    custom_aa_move.yaw_degree:set_visible(presets:get() == "customs" and cur_cond:get() == "moving")
    custom_aa_move.yaw_mod:set_visible(presets:get() == "customs" and cur_cond:get() == "moving")
    custom_aa_move.fake_options:set_visible(presets:get() == "customs" and cur_cond:get() == "moving")
    custom_aa_move.lby_mode:set_visible(presets:get() == "customs" and cur_cond:get() == "moving")
    custom_aa_move.desync_freestand:set_visible(presets:get() == "customs" and cur_cond:get() == "moving")
    custom_aa_move.desync_on_shot:set_visible(presets:get() == "customs" and cur_cond:get() == "moving")
    custom_aa_move.left_limit:set_visible(presets:get() == "customs" and cur_cond:get() == "moving")
    custom_aa_move.right_limit:set_visible(presets:get() == "customs" and cur_cond:get() == "moving")

    custom_aa_air.enable:set_visible(presets:get() == "customs" and cur_cond:get() == "air")
    custom_aa_air.yaw_add_left:set_visible(presets:get() == "customs" and cur_cond:get() == "air")
    custom_aa_air.yaw_add_right:set_visible(presets:get() == "customs" and cur_cond:get() == "air")
    custom_aa_air.yaw_degree:set_visible(presets:get() == "customs" and cur_cond:get() == "air")
    custom_aa_air.yaw_mod:set_visible(presets:get() == "customs" and cur_cond:get() == "air")
    custom_aa_air.fake_options:set_visible(presets:get() == "customs" and cur_cond:get() == "air")
    custom_aa_air.lby_mode:set_visible(presets:get() == "customs" and cur_cond:get() == "air")
    custom_aa_air.desync_freestand:set_visible(presets:get() == "customs" and cur_cond:get() == "air")
    custom_aa_air.desync_on_shot:set_visible(presets:get() == "customs" and cur_cond:get() == "air")
    custom_aa_air.left_limit:set_visible(presets:get() == "customs" and cur_cond:get() == "air")
    custom_aa_air.right_limit:set_visible(presets:get() == "customs" and cur_cond:get() == "air")

    custom_aa_crouch.enable:set_visible(presets:get() == "customs" and cur_cond:get() == "crouch")
    custom_aa_crouch.yaw_add_left:set_visible(presets:get() == "customs" and cur_cond:get() == "crouch")
    custom_aa_crouch.yaw_add_right:set_visible(presets:get() == "customs" and cur_cond:get() == "crouch")
    custom_aa_crouch.yaw_degree:set_visible(presets:get() == "customs" and cur_cond:get() == "crouch")
    custom_aa_crouch.yaw_mod:set_visible(presets:get() == "customs" and cur_cond:get() == "crouch")
    custom_aa_crouch.fake_options:set_visible(presets:get() == "customs" and cur_cond:get() == "crouch")
    custom_aa_crouch.lby_mode:set_visible(presets:get() == "customs" and cur_cond:get() == "crouch")
    custom_aa_crouch.desync_freestand:set_visible(presets:get() == "customs" and cur_cond:get() == "crouch")
    custom_aa_crouch.desync_on_shot:set_visible(presets:get() == "customs" and cur_cond:get() == "crouch")
    custom_aa_crouch.left_limit:set_visible(presets:get() == "customs" and cur_cond:get() == "crouch")
    custom_aa_crouch.right_limit:set_visible(presets:get() == "customs" and cur_cond:get() == "crouch")

    custom_aa_walk.enable:set_visible(presets:get() == "customs" and cur_cond:get() == "walk")
    custom_aa_walk.yaw_add_left:set_visible(presets:get() == "customs" and cur_cond:get() == "walk")
    custom_aa_walk.yaw_add_right:set_visible(presets:get() == "customs" and cur_cond:get() == "walk")
    custom_aa_walk.yaw_degree:set_visible(presets:get() == "customs" and cur_cond:get() == "walk")
    custom_aa_walk.yaw_mod:set_visible(presets:get() == "customs" and cur_cond:get() == "walk")
    custom_aa_walk.fake_options:set_visible(presets:get() == "customs" and cur_cond:get() == "walk")
    custom_aa_walk.lby_mode:set_visible(presets:get() == "customs" and cur_cond:get() == "walk")
    custom_aa_walk.desync_freestand:set_visible(presets:get() == "customs" and cur_cond:get() == "walk")
    custom_aa_walk.desync_on_shot:set_visible(presets:get() == "customs" and cur_cond:get() == "walk")
    custom_aa_walk.left_limit:set_visible(presets:get() == "customs" and cur_cond:get() == "walk")
    custom_aa_walk.right_limit:set_visible(presets:get() == "customs" and cur_cond:get() == "walk")

    custom_aa_air_duck.enable:set_visible(presets:get() == "customs" and cur_cond:get() == "air-crouching")
    custom_aa_air_duck.yaw_add_left:set_visible(presets:get() == "customs" and cur_cond:get() == "air-crouching")
    custom_aa_air_duck.yaw_add_right:set_visible(presets:get() == "customs" and cur_cond:get() == "air-crouching")
    custom_aa_air_duck.yaw_degree:set_visible(presets:get() == "customs" and cur_cond:get() == "air-crouching")
    custom_aa_air_duck.yaw_mod:set_visible(presets:get() == "customs" and cur_cond:get() == "air-crouching")
    custom_aa_air_duck.fake_options:set_visible(presets:get() == "customs" and cur_cond:get() == "air-crouching")
    custom_aa_air_duck.lby_mode:set_visible(presets:get() == "customs" and cur_cond:get() == "air-crouching")
    custom_aa_air_duck.desync_freestand:set_visible(presets:get() == "customs" and cur_cond:get() == "air-crouching")
    custom_aa_air_duck.desync_on_shot:set_visible(presets:get() == "customs" and cur_cond:get() == "air-crouching")
    custom_aa_air_duck.left_limit:set_visible(presets:get() == "customs" and cur_cond:get() == "air-crouching")
    custom_aa_air_duck.right_limit:set_visible(presets:get() == "customs" and cur_cond:get() == "air-crouching")
end

local ffi = require("ffi")
ffi.cdef[[

    typedef struct
    {
        float x;
        float y;
        float z;
    } Vector_t;
   
    int VirtualProtect(void* lpAddress, unsigned long dwSize, unsigned long flNewProtect, unsigned long* lpflOldProtect);
    void* VirtualAlloc(void* lpAddress, unsigned long dwSize, unsigned long  flAllocationType, unsigned long flProtect);
    int VirtualFree(void* lpAddress, unsigned long dwSize, unsigned long dwFreeType);
    typedef uintptr_t (__thiscall* GetClientEntity_4242425_t)(void*, int);

    typedef struct
    {
        char    pad0[0x60]; // 0x00
        void* pEntity; // 0x60
        void* pActiveWeapon; // 0x64
        void* pLastActiveWeapon; // 0x68
        float        flLastUpdateTime; // 0x6C
        int            iLastUpdateFrame; // 0x70
        float        flLastUpdateIncrement; // 0x74
        float        flEyeYaw; // 0x78
        float        flEyePitch; // 0x7C
        float        flGoalFeetYaw; // 0x80
        float        flLastFeetYaw; // 0x84
        float        flMoveYaw; // 0x88
        float        flLastMoveYaw; // 0x8C // changes when moving/jumping/hitting ground
        float        flLeanAmount; // 0x90
        char         pad1[0x4]; // 0x94
        float        flFeetCycle; // 0x98 0 to 1
        float        flMoveWeight; // 0x9C 0 to 1
        float        flMoveWeightSmoothed; // 0xA0
        float        flDuckAmount; // 0xA4
        float        flHitGroundCycle; // 0xA8
        float        flRecrouchWeight; // 0xAC
        Vector_t        vecOrigin; // 0xB0
        Vector_t        vecLastOrigin;// 0xBC
        Vector_t        vecVelocity; // 0xC8
        Vector_t        vecVelocityNormalized; // 0xD4
        Vector_t        vecVelocityNormalizedNonZero; // 0xE0
        float        flVelocityLenght2D; // 0xEC
        float        flJumpFallVelocity; // 0xF0
        float        flSpeedNormalized; // 0xF4 // clamped velocity from 0 to 1
        float        flRunningSpeed; // 0xF8
        float        flDuckingSpeed; // 0xFC
        float        flDurationMoving; // 0x100
        float        flDurationStill; // 0x104
        bool        bOnGround; // 0x108
        bool        bHitGroundAnimation; // 0x109
        char    pad2[0x2]; // 0x10A
        float        flNextLowerBodyYawUpdateTime; // 0x10C
        float        flDurationInAir; // 0x110
        float        flLeftGroundHeight; // 0x114
        float        flHitGroundWeight; // 0x118 // from 0 to 1, is 1 when standing
        float        flWalkToRunTransition; // 0x11C // from 0 to 1, doesnt change when walking or crouching, only running
        char    pad3[0x4]; // 0x120
        float        flAffectedFraction; // 0x124 // affected while jumping and running, or when just jumping, 0 to 1
        char    pad4[0x208]; // 0x128
        float        flMinBodyYaw; // 0x330
        float        flMaxBodyYaw; // 0x334
        float        flMinPitch; //0x338
        float        flMaxPitch; // 0x33C
        int            iAnimsetVersion; // 0x340
    } CCSGOPlayerAnimationState_534535_t;

]]

entity_list_pointer = ffi.cast('void***', utils.create_interface('client.dll', 'VClientEntityList003'))
get_client_entity_fn = ffi.cast('GetClientEntity_4242425_t', entity_list_pointer[0][3])
function get_entity_address(ent_index)
    local addr = get_client_entity_fn(entity_list_pointer, ent_index)
    return addr
end

hook_helper = {
    copy = function(dst, src, len)
    return ffi.copy(ffi.cast('void*', dst), ffi.cast('const void*', src), len)
    end,

    virtual_protect = function(lpAddress, dwSize, flNewProtect, lpflOldProtect)
    return ffi.C.VirtualProtect(ffi.cast('void*', lpAddress), dwSize, flNewProtect, lpflOldProtect)
    end,

    virtual_alloc = function(lpAddress, dwSize, flAllocationType, flProtect, blFree)
    local alloc = ffi.C.VirtualAlloc(lpAddress, dwSize, flAllocationType, flProtect)
    if blFree then
        table.insert(buff.free, function()
        ffi.C.VirtualFree(alloc, 0, 0x8000)
        end)
    end
    return ffi.cast('intptr_t', alloc)
end
}

buff = {free = {}}
vmt_hook = {hooks = {}}

function vmt_hook.new(vt)
    local new_hook = {}
    local org_func = {}
    local old_prot = ffi.new('unsigned long[1]')
    local virtual_table = ffi.cast('intptr_t**', vt)[0]

    new_hook.this = virtual_table
    new_hook.hookMethod = function(cast, func, method)
    org_func[method] = virtual_table[method]
    hook_helper.virtual_protect(virtual_table + method, 4, 0x4, old_prot)

    virtual_table[method] = ffi.cast('intptr_t', ffi.cast(cast, func))
    hook_helper.virtual_protect(virtual_table + method, 4, old_prot[0], old_prot)

    return ffi.cast(cast, org_func[method])
end

new_hook.unHookMethod = function(method)
    hook_helper.virtual_protect(virtual_table + method, 4, 0x4, old_prot)
    local alloc_addr = hook_helper.virtual_alloc(nil, 5, 0x1000, 0x40, false)
    local trampoline_bytes = ffi.new('uint8_t[?]', 5, 0x90)

    trampoline_bytes[0] = 0xE9
    ffi.cast('int32_t*', trampoline_bytes + 1)[0] = org_func[method] - tonumber(alloc_addr) - 5

    hook_helper.copy(alloc_addr, trampoline_bytes, 5)
    virtual_table[method] = ffi.cast('intptr_t', alloc_addr)

    hook_helper.virtual_protect(virtual_table + method, 4, old_prot[0], old_prot)
    org_func[method] = nil
end

new_hook.unHookAll = function()
    for method, func in pairs(org_func) do
        new_hook.unHookMethod(method)
    end
end

table.insert(vmt_hook.hooks, new_hook.unHookAll)
    return new_hook
end

local function in_air2()
    local localplayer = entity.get_local_player()
    local b = entity.get_local_player()
        if b == nil then
            return
        end
    local flags = localplayer["m_fFlags"]
   
    if bit.band(flags, 1) == 0 then
        return true
    end
   
    return false
end

events.shutdown:set(function()
    for _, reset_function in ipairs(vmt_hook.hooks) do
        reset_function()
    end
end)

hooked_function = nil
ground_ticks, end_time = 1, 0
function updateCSA_hk(thisptr, edx)
    if entity.get_local_player() == nil or ffi.cast('uintptr_t', thisptr) == nil then return end
    if anim_breakers:get("Follow direction") then
        ffi.cast('float*', ffi.cast('uintptr_t', thisptr) + 10104)[0] = 1
        var.legmovement:set('Sliding')
    end
    hooked_function(thisptr, edx)
    if anim_breakers:get("Static legs in air") then
        ffi.cast('float*', ffi.cast('uintptr_t', thisptr) + 10104)[6] = 1
    end
end

function anim_state_hook()
    local local_player = entity.get_local_player()
    if not local_player then return end

    local local_player_ptr = get_entity_address(local_player:get_index())
    if not local_player_ptr or hooked_function then return end
    local C_CSPLAYER = vmt_hook.new(local_player_ptr)
    hooked_function = C_CSPLAYER.hookMethod('void(__fastcall*)(void*, void*)', updateCSA_hk, 224)
end

events.render:set(menu_hanlde)
events.createmove_run:set(anim_state_hook)
events.createmove:set(antiaims)
 
Последнее редактирование:
я дед инсайд, мне 9 лет, я хочу в психокидс
Пользователь
Статус
Оффлайн
Регистрация
12 Ноя 2020
Сообщения
191
Реакции[?]
45
Поинты[?]
0
Забаненный
Статус
Оффлайн
Регистрация
4 Май 2021
Сообщения
228
Реакции[?]
39
Поинты[?]
0
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
!!!!Осторожно присудствует говонокод (в свое опровдание скажу что писал когда в3 с новым апи только вышел, писал одновременно изучая)

code_language.lua:
ui.sidebar('Lunarity.lua', 'moon')

local globalss = ui.create("Globals", "Lunarity.lua")
local cfg_s = ui.create("Globals", "Config System")

local aa_g = ui.create("AntiAims", "AntiAims")
local aa_a = ui.create("AntiAims", "AntiAims Settings")

local visual = ui.create("Others", "Visuals")
local visual_ui = ui.create("Others", "UI indicators")
local others = ui.create("Others", "Misc")

local welcome = globalss:label("Welcome to Lunarity - "..common.get_username())
local build = globalss:label("Last upd: 07.09.22  |  Build: 1.2")

local conditions = {"global","standing", "moving", "air", "crouch", "walk", "air-crouching"}
local presets = aa_g:combo("Presets", "Disabled", "lunarity-yaw", "customs")
local base = aa_g:combo("Yaw Base", {"Disabled","Left", "Right", "Backward", "At Target", "Freestanding", "Forward"}, 0, "")
local cur_cond = aa_a:combo("Current Condition", conditions)
local anim_breakers = aa_g:selectable("Anim breakers", {'Static legs in air', 'Follow direction'}, 0)

local custom_aa = {
    yaw_add_left = aa_a:slider("Left Yaw Add", -180, 180, 0, ""),
    yaw_add_right = aa_a:slider("Right Yaw Add", -180, 180, 0, ""),
    yaw_mod = aa_a:combo("Yaw Modifier", {"Disabled","Center", "Offset", "Random", "Spin"}, 0, ""),
    yaw_degree = aa_a:slider("Modifier Degree", -180, 180, 0, ""),
    fake_options = aa_a:selectable("Fake Options", {"Avoid Overlap", "Jitter", "Randomize Jitter", "Anti Bruteforce"}, 0, ""),
    lby_mode = aa_a:combo("LBY Mode", {"Disabled","Opposite","Sway"}, 0, ""),
    desync_freestand = aa_a:combo("Freestanding", {"Off","Fake","Real"}, 0, ""),
    desync_on_shot = aa_a:combo("Onshot", {"Default","Opposite","Freestanding","Switch"  }, 0, ""),
    left_limit = aa_a:slider("Fake Left Limit", 0, 60, 0, ""),
    right_limit = aa_a:slider("Fake Right Limit", 0, 60, 0, ""),
}

local custom_aa_stand = {
    enable = aa_a:switch("Override Stand"),
    yaw_add_left = aa_a:slider("[S] Left Yaw Add", -180, 180, 0, ""),
    yaw_add_right = aa_a:slider("[S] Right Yaw Add", -180, 180, 0, ""),
    yaw_mod = aa_a:combo("[S] Yaw Modifier", {"Disabled","Center", "Offset", "Random", "Spin"}, 0, ""),
    yaw_degree = aa_a:slider("[S] Modifier Degree", -180, 180, 0, ""),
    fake_options = aa_a:selectable("[S] Fake Options", {"Avoid Overlap", "Jitter", "Randomize Jitter", "Anti Bruteforce"}, 0, ""),
    lby_mode = aa_a:combo("[S] LBY Mode", {"Disabled","Opposite","Sway"}, 0, ""),
    desync_freestand = aa_a:combo("[S] Freestanding", {"Off","Fake","Real"}, 0, ""),
    desync_on_shot = aa_a:combo("[S] Onshot", {"Default","Opposite","Freestanding","Switch"  }, 0, ""),
    left_limit = aa_a:slider("[S] Fake Left Limit", 0, 60, 0, ""),
    right_limit = aa_a:slider("[S] Fake Right Limit", 0, 60, 0, ""),
}

local custom_aa_move = {
    enable = aa_a:switch("Override Move"),
    yaw_add_left = aa_a:slider("[M] Left Yaw Add", -180, 180, 0, ""),
    yaw_add_right = aa_a:slider("[M] Right Yaw Add", -180, 180, 0, ""),
    yaw_mod = aa_a:combo("[M] Yaw Modifier", {"Disabled","Center", "Offset", "Random", "Spin"}, 0, ""),
    yaw_degree = aa_a:slider("[M] Modifier Degree", -180, 180, 0, ""),
    fake_options = aa_a:selectable("[M] Fake Options", {"Avoid Overlap", "Jitter", "Randomize Jitter", "Anti Bruteforce"}, 0, ""),
    lby_mode = aa_a:combo("[M] LBY Mode", {"Disabled","Opposite","Sway"}, 0, ""),
    desync_freestand = aa_a:combo("[M] Freestanding", {"Off","Fake","Real"}, 0, ""),
    desync_on_shot = aa_a:combo("[M] Onshot", {"Default","Opposite","Freestanding","Switch"  }, 0, ""),
    left_limit = aa_a:slider("[M] Fake Left Limit", 0, 60, 0, ""),
    right_limit = aa_a:slider("[M] Fake Right Limit", 0, 60, 0, ""),
}

local custom_aa_air = {
    enable = aa_a:switch("Override Air"),
    yaw_add_left = aa_a:slider("[A] Left Yaw Add", -180, 180, 0, ""),
    yaw_add_right = aa_a:slider("[A] Right Yaw Add", -180, 180, 0, ""),
    yaw_mod = aa_a:combo("[A] Yaw Modifier", {"Disabled","Center", "Offset", "Random", "Spin"}, 0, ""),
    yaw_degree = aa_a:slider("[A] Modifier Degree", -180, 180, 0, ""),
    fake_options = aa_a:selectable("[A] Fake Options", {"Avoid Overlap", "Jitter", "Randomize Jitter", "Anti Bruteforce"}, 0, ""),
    lby_mode = aa_a:combo("[A] LBY Mode", {"Disabled","Opposite","Sway"}, 0, ""),
    desync_freestand = aa_a:combo("[A] Freestanding", {"Off","Fake","Real"}, 0, ""),
    desync_on_shot = aa_a:combo("[A] Onshot", {"Default","Opposite","Freestanding","Switch"  }, 0, ""),
    left_limit = aa_a:slider("[A] Fake Left Limit", 0, 60, 0, ""),
    right_limit = aa_a:slider("[A] Fake Right Limit", 0, 60, 0, ""),
}

local custom_aa_crouch = {
    enable = aa_a:switch("Override Crouch"),
    yaw_add_left = aa_a:slider("[C] Left Yaw Add", -180, 180, 0, ""),
    yaw_add_right = aa_a:slider("[C] Right Yaw Add", -180, 180, 0, ""),
    yaw_mod = aa_a:combo("[C] Yaw Modifier", {"Disabled","Center", "Offset", "Random", "Spin"}, 0, ""),
    yaw_degree = aa_a:slider("[C] Modifier Degree", -180, 180, 0, ""),
    fake_options = aa_a:selectable("[C] Fake Options", {"Avoid Overlap", "Jitter", "Randomize Jitter", "Anti Bruteforce"}, 0, ""),
    lby_mode = aa_a:combo("[C] LBY Mode", {"Disabled","Opposite","Sway"}, 0, ""),
    desync_freestand = aa_a:combo("[C] Freestanding", {"Off","Fake","Real"}, 0, ""),
    desync_on_shot = aa_a:combo("[C] Onshot", {"Default","Opposite","Freestanding","Switch"  }, 0, ""),
    left_limit = aa_a:slider("[C] Fake Left Limit", 0, 60, 0, ""),
    right_limit = aa_a:slider("[C] Fake Right Limit", 0, 60, 0, ""),
}

local custom_aa_walk = {
    enable = aa_a:switch("Override Walk"),
    yaw_add_left = aa_a:slider("[W] Left Yaw Add", -180, 180, 0, ""),
    yaw_add_right = aa_a:slider("[W] Right Yaw Add", -180, 180, 0, ""),
    yaw_mod = aa_a:combo("[W] Yaw Modifier", {"Disabled","Center", "Offset", "Random", "Spin"}, 0, ""),
    yaw_degree = aa_a:slider("[W] Modifier Degree", -180, 180, 0, ""),
    fake_options = aa_a:selectable("[W] Fake Options", {"Avoid Overlap", "Jitter", "Randomize Jitter", "Anti Bruteforce"}, 0, ""),
    lby_mode = aa_a:combo("[W] LBY Mode", {"Disabled","Opposite","Sway"}, 0, ""),
    desync_freestand = aa_a:combo("[W] Freestanding", {"Off","Fake","Real"}, 0, ""),
    desync_on_shot = aa_a:combo("[W] Onshot", {"Default","Opposite","Freestanding","Switch"  }, 0, ""),
    left_limit = aa_a:slider("[W] Fake Left Limit", 0, 60, 0, ""),
    right_limit = aa_a:slider("[W] Fake Right Limit", 0, 60, 0, ""),
}

local custom_aa_air_duck = {
    enable = aa_a:switch("Override Air+Crouch"),
    yaw_add_left = aa_a:slider("[A+C] Left Yaw Add", -180, 180, 0, ""),
    yaw_add_right = aa_a:slider("[A+C] Right Yaw Add", -180, 180, 0, ""),
    yaw_mod = aa_a:combo("[A+C] Yaw Modifier", {"Disabled","Center", "Offset", "Random", "Spin"}, 0, ""),
    yaw_degree = aa_a:slider("[A+C] Modifier Degree", -180, 180, 0, ""),
    fake_options = aa_a:selectable("[A+C] Fake Options", {"Avoid Overlap", "Jitter", "Randomize Jitter", "Anti Bruteforce"}, 0, ""),
    lby_mode = aa_a:combo("[A+C] LBY Mode", {"Disabled","Opposite","Sway"}, 0, ""),
    desync_freestand = aa_a:combo("[A+C] Freestanding", {"Off","Fake","Real"}, 0, ""),
    desync_on_shot = aa_a:combo("[A+C] Onshot", {"Default","Opposite","Freestanding","Switch"  }, 0, ""),
    left_limit = aa_a:slider("[A+C] Fake Left Limit", 0, 60, 0, ""),
    right_limit = aa_a:slider("[A+C] Fake Right Limit", 0, 60, 0, ""),
}

local var = {
    hit = ui.find("aimbot", "ragebot", "selection", "hit chance"),
    dt = ui.find("aimbot", "ragebot", "main", "double Tap"),
    hs = ui.find("aimbot", "ragebot", "main", "hide shots"),
    autopeek = ui.find("aimbot", "ragebot", "main", "peek assist"),
    legmovement = ui.find("aimbot", "anti aim", "misc", "leg movement"),

    walk = ui.find("aimbot", "anti aim", "misc", "slow walk"),
    fl_en = ui.find("aimbot", "anti aim", "fake lag", "enabled"),

    pitch = ui.find("aimbot", "anti aim", "angles", "pitch"),
    yaw = ui.find("aimbot", "anti aim", "angles", "yaw"),
    at_target = ui.find("aimbot", "anti aim", "angles", "yaw", "base"),
    yaw_mod = ui.find("aimbot", "anti aim", "angles", "yaw modifier"),
    offset = ui.find("aimbot", "anti aim", "angles", "yaw", "offset"),
    yaw_offset = ui.find("aimbot", "anti aim", "angles", "yaw modifier", "offset"),
    body_yaw = ui.find("aimbot", "anti aim", "angles", "body yaw"),

    left_limit = ui.find("aimbot", "anti aim", "angles", "body yaw", "left limit"),
    right_limit = ui.find("aimbot", "anti aim", "angles", "body yaw", "right limit"),
    options = ui.find("aimbot", "anti aim", "angles", "body yaw", "options"),
    freestanding_desync = ui.find("aimbot", "anti aim", "angles", "body yaw", "freestanding"),
    on_shot = ui.find("aimbot", "anti aim", "angles", "body yaw", "on shot"),
    lby = ui.find("aimbot", "anti aim", "angles", "body yaw", "lby mode"),

    freestanding = ui.find("aimbot", "anti aim", "angles", "freestanding"),
    roll = ui.find("aimbot", "anti aim", "angles", "extended angles"),

    override_zoom_en = ui.find("visuals", "world", "main", "override zoom"),
    override_zoom = ui.find("visuals", "world", "main", "override zoom", "scope overlay"),
    hitsound = ui.find("visuals", "world", "other", "hit marker sound"),

    strafe = ui.find("miscellaneous", "main", "movement", "air strafe"),
    clantag = ui.find("miscellaneous", "main", "in-game", "clantag"),
    shared_f = ui.find("miscellaneous", "main", "in-game", "Shared Features"),
}

function get_velocity(player)
    if(player == nil) then return end
    local vec = player.m_vecVelocity
    local velocity = vec:length()
    return velocity
end

local function is_crouching(player)
    local flags = player.m_fFlags

    if bit.band(flags, 4) == 4 then
        return true
    end

    return false
end

local function in_air(player)
    local flags = player.m_fFlags

    if bit.band(flags, 1) == 0 then
        return true
    end

    return false
end

--antiaims
local bInverter = false;

function antiaims(cmd)
    local get_local_player = entity.get_local_player()
    if get_local_player == nil then return end
    local weapon = get_local_player:get_player_weapon()
    if weapon == nil then return end
  
    bInverter = not bInverter;
    yaw_add = 0

    --lunarity-yaw
    if presets:get() == "lunarity-yaw" then
        --stand
        if (in_air(get_local_player) == false and is_crouching(get_local_player) == false and var.walk:get() == false and get_velocity(get_local_player) < 3) then
            yaw_add = bInverter and -26 or 26
            var.pitch:override("Down")
            var.yaw_mod:override("Center")
            var.at_target:override("At target")
            var.body_yaw:override(true)
            var.left_limit:override(60)
            var.right_limit:override(60)
            var.options:override("jitter")
            var.freestanding_desync:override("off")
            var.on_shot:override("freestanding")
            var.lby:override("opposite")
            var.offset:override(bInverter and -26 or 26)
            var.yaw_offset:override(35)
        end
        --duck
        if (in_air(get_local_player) == false and is_crouching(get_local_player)) then
            yaw_add = bInverter and -24 or 22
            var.pitch:override("Down")
            var.yaw_mod:override("Center")
            var.at_target:override("At target")
            var.body_yaw:override(true)
            var.left_limit:override(60)
            var.right_limit:override(60)
            var.options:override("jitter")
            var.freestanding_desync:override("off")
            var.on_shot:override("freestanding")
            var.lby:override("opposite")
            var.offset:override(bInverter and -22 or 22)
            var.yaw_offset:override(42)
        end
        --air
        if (in_air(get_local_player) and is_crouching(get_local_player) == false) then
            yaw_add = bInverter and -20 or 22
            var.pitch:override("Down")
            var.yaw_mod:override("Center")
            var.at_target:override("At target")
            var.body_yaw:override(true)
            var.left_limit:override(60)
            var.right_limit:override(60)
            var.options:override("jitter")
            var.freestanding_desync:override("off")
            var.on_shot:override("freestanding")
            var.lby:override("opposite")
            var.offset:override(bInverter and -20 or 22)
            var.yaw_offset:override(32)
        end
        --move
        if (in_air(get_local_player) == false and is_crouching(get_local_player) == false and var.walk:get() == false and get_velocity(get_local_player) > 3) then
            yaw_add = bInverter and -24 or 22
            var.pitch:override("Down")
            var.yaw_mod:override("Center")
            var.at_target:override("At target")
            var.body_yaw:override(true)
            var.left_limit:override(60)
            var.right_limit:override(60)
            var.options:override("jitter")
            var.freestanding_desync:override("off")
            var.on_shot:override("freestanding")
            var.lby:override("opposite")
            var.offset:override(bInverter and -24 or 22)
            var.yaw_offset:override(32)
        end
        --air+duck
        if (in_air(get_local_player) and is_crouching(get_local_player)) then
            yaw_add = bInverter and -7 or 12
            var.pitch:override("Down")
            var.yaw_mod:override("Center")
            var.at_target:override("At target")
            var.body_yaw:override(true)
            var.left_limit:override(60)
            var.right_limit:override(60)
            var.options:override("jitter")
            var.freestanding_desync:override("off")
            var.on_shot:override("freestanding")
            var.lby:override("opposite")
            var.offset:override(bInverter and -7 or 12)
            var.yaw_offset:override(60)
        end
        --walk
        if (in_air(get_local_player) == false and is_crouching(get_local_player) == false and var.walk:get()) then
            yaw_add = bInverter and -24 or 22
            var.pitch:override("Down")
            var.yaw_mod:override("Center")
            var.at_target:override("At target")
            var.body_yaw:override(true)
            var.left_limit:override(60)
            var.right_limit:override(60)
            var.options:override("jitter")
            var.freestanding_desync:override("off")
            var.on_shot:override("freestanding")
            var.lby:override("opposite")
            var.offset:override(bInverter and -24 or 22)
            var.yaw_offset:override(32)
        end
    end
    if presets:get() == "customs" then
        yaw_add = bInverter and custom_aa.yaw_add_left:get() or custom_aa.yaw_add_right:get()
        var.pitch:override("Down")
        var.yaw_mod:override(custom_aa.yaw_mod:get())
        var.body_yaw:override(true)
        var.left_limit:override(custom_aa.left_limit:get())
        var.right_limit:override(custom_aa.right_limit:get())
        var.options:override(custom_aa.fake_options:get())
        var.freestanding_desync:override(custom_aa.desync_freestand:get())
        var.on_shot:override(custom_aa.desync_on_shot:get())
        var.lby:override(custom_aa.lby_mode:get())
        var.offset:override(bInverter and custom_aa.yaw_add_left:get() or custom_aa.yaw_add_right:get())
        var.yaw_offset:override(custom_aa.yaw_degree:get())
      
        if custom_aa_stand.enable:get() and (in_air(get_local_player) == false and is_crouching(get_local_player) == false and var.walk:get() == false and get_velocity(get_local_player) < 3) then
            yaw_add = bInverter and custom_aa_stand.yaw_add_left:get() or custom_aa_stand.yaw_add_right:get()
            var.pitch:override("Down")
            var.yaw_mod:override(custom_aa_stand.yaw_mod:get())
            var.body_yaw:override(true)
            var.left_limit:override(custom_aa_stand.left_limit:get())
            var.right_limit:override(custom_aa_stand.right_limit:get())
            var.options:override(custom_aa_stand.fake_options:get())
            var.freestanding_desync:override(custom_aa_stand.desync_freestand:get())
            var.on_shot:override(custom_aa_stand.desync_on_shot:get())
            var.lby:override(custom_aa_stand.lby_mode:get())
            var.offset:override(bInverter and custom_aa_stand.yaw_add_left:get() or custom_aa_stand.yaw_add_right:get())
            var.yaw_offset:override(custom_aa_stand.yaw_degree:get())
        end
        if custom_aa_move.enable:get() and (in_air(get_local_player) == false and is_crouching(get_local_player) == false and var.walk:get() == false and get_velocity(get_local_player) > 3) then
            yaw_add = bInverter and custom_aa_move.yaw_add_left:get() or custom_aa_move.yaw_add_right:get()
            var.pitch:override("Down")
            var.yaw_mod:override(custom_aa_move.yaw_mod:get())
            var.body_yaw:override(true)
            var.left_limit:override(custom_aa_move.left_limit:get())
            var.right_limit:override(custom_aa_move.right_limit:get())
            var.options:override(custom_aa_move.fake_options:get())
            var.freestanding_desync:override(custom_aa_move.desync_freestand:get())
            var.on_shot:override(custom_aa_move.desync_on_shot:get())
            var.lby:override(custom_aa_move.lby_mode:get())
            var.offset:override(bInverter and custom_aa_move.yaw_add_left:get() or custom_aa_move.yaw_add_right:get())
            var.yaw_offset:override(custom_aa_move.yaw_degree:get())
        end
        if custom_aa_air.enable:get() and (in_air(get_local_player) and is_crouching(get_local_player) == false) then
            yaw_add = bInverter and custom_aa_air.yaw_add_left:get() or custom_aa_air.yaw_add_right:get()
            var.pitch:override("Down")
            var.yaw_mod:override(custom_aa_air.yaw_mod:get())
            var.body_yaw:override(true)
            var.left_limit:override(custom_aa_air.left_limit:get())
            var.right_limit:override(custom_aa_air.right_limit:get())
            var.options:override(custom_aa_air.fake_options:get())
            var.freestanding_desync:override(custom_aa_air.desync_freestand:get())
            var.on_shot:override(custom_aa_air.desync_on_shot:get())
            var.lby:override(custom_aa_air.lby_mode:get())
            var.offset:override(bInverter and custom_aa_air.yaw_add_left:get() or custom_aa_air.yaw_add_right:get())
            var.yaw_offset:override(custom_aa_air.yaw_degree:get())
        end
        if custom_aa_crouch.enable:get() and (in_air(get_local_player) == false and is_crouching(get_local_player)) then
            yaw_add = bInverter and custom_aa_crouch.yaw_add_left:get() or custom_aa_crouch.yaw_add_right:get()
            var.pitch:override("Down")
            var.yaw_mod:override(custom_aa_crouch.yaw_mod:get())
            var.body_yaw:override(true)
            var.left_limit:override(custom_aa_crouch.left_limit:get())
            var.right_limit:override(custom_aa_crouch.right_limit:get())
            var.options:override(custom_aa_crouch.fake_options:get())
            var.freestanding_desync:override(custom_aa_crouch.desync_freestand:get())
            var.on_shot:override(custom_aa_crouch.desync_on_shot:get())
            var.lby:override(custom_aa_crouch.lby_mode:get())
            var.offset:override(bInverter and custom_aa_crouch.yaw_add_left:get() or custom_aa_crouch.yaw_add_right:get())
            var.yaw_offset:override(custom_aa_crouch.yaw_degree:get())
        end
        if custom_aa_walk.enable:get() and (in_air(get_local_player) == false and is_crouching(get_local_player) == false and var.walk:get()) then
            yaw_add = bInverter and custom_aa_walk.yaw_add_left:get() or custom_aa_walk.yaw_add_right:get()
            var.pitch:override("Down")
            var.yaw_mod:override(custom_aa_walk.yaw_mod:get())
            var.body_yaw:override(true)
            var.left_limit:override(custom_aa_walk.left_limit:get())
            var.right_limit:override(custom_aa_walk.right_limit:get())
            var.options:override(custom_aa_walk.fake_options:get())
            var.freestanding_desync:override(custom_aa_walk.desync_freestand:get())
            var.on_shot:override(custom_aa_walk.desync_on_shot:get())
            var.lby:override(custom_aa_walk.lby_mode:get())
            var.offset:override(bInverter and custom_aa_walk.yaw_add_left:get() or custom_aa_walk.yaw_add_right:get())
            var.yaw_offset:override(custom_aa_walk.yaw_degree:get())
        end
        if custom_aa_air_duck.enable:get() and (in_air(get_local_player) and is_crouching(get_local_player)) then
            yaw_add = bInverter and custom_aa_air_duck.yaw_add_left:get() or custom_aa_air_duck.yaw_add_right:get()
            var.pitch:override("Down")
            var.yaw_mod:override(custom_aa_air_duck.yaw_mod:get())
            var.body_yaw:override(true)
            var.left_limit:override(custom_aa_air_duck.left_limit:get())
            var.right_limit:override(custom_aa_air_duck.right_limit:get())
            var.options:override(custom_aa_air_duck.fake_options:get())
            var.freestanding_desync:override(custom_aa_air_duck.desync_freestand:get())
            var.on_shot:override(custom_aa_air_duck.desync_on_shot:get())
            var.lby:override(custom_aa_air_duck.lby_mode:get())
            var.offset:override(bInverter and custom_aa_air_duck.yaw_add_left:get() or custom_aa_air_duck.yaw_add_right:get())
            var.yaw_offset:override(custom_aa_air_duck.yaw_degree:get())
        end
    end
    if(base:get() == "Disabled") then
        var.yaw:override("Disabled")
        var.offset:override(0 + yaw_add)
        var.at_target:override("Local View")
        var.freestanding:override(false)
    elseif(base:get() == "Left") then
        var.yaw:override("Backward")
        var.offset:override(-90 + yaw_add)
        var.at_target:override("Local View")
        var.freestanding:override(false)
    elseif(base:get() == "Right") then
        var.yaw:override("Backward")
        var.offset:override(90 + yaw_add)
        var.at_target:override("Local View")
        var.freestanding:override(false)
    elseif(base:get() == "Backward") then
        var.yaw:override("Backward")
        var.offset:override(0 + yaw_add)
        var.at_target:override("Local View")
        var.freestanding:override(false)
    elseif(base:get() == "At Target") then
        var.yaw:override("Backward")
        var.offset:override(0 + yaw_add)
        var.at_target:override("At Target")
        var.freestanding:override(false)
    elseif(base:get() == "Freestanding") then
        var.yaw:override("Backward")
        var.at_target:override("At Target")
        var.freestanding:set(false)
        var.freestanding:override(true)
    elseif(base:get() == "Forward") then
        var.yaw:override("Backward")
        var.offset:override(180 + yaw_add)
        var.at_target:override("Local View")
        var.freestanding:override(false)
    end
end

local base64 = require("neverlose/base64")
local Clipboard, ffi_handler = {}, {}, {}

ffi.cdef[[
    typedef int(__thiscall* get_clipboard_text_length)(void*);
    typedef void(__thiscall* set_clipboard_text)(void*, const char*, int);
    typedef void(__thiscall* get_clipboard_text)(void*, int, const char*, int);
]]

ffi_handler.VGUI_System = ffi.cast(ffi.typeof("void***"), utils.create_interface("vgui2.dll", "VGUI_System010"))
ffi_handler.get_clipboard_text_length = ffi.cast("get_clipboard_text_length", ffi_handler.VGUI_System[0][7])
ffi_handler.get_clipboard_text = ffi.cast("get_clipboard_text", ffi_handler.VGUI_System[0][11])
ffi_handler.set_clipboard_text = ffi.cast("set_clipboard_text", ffi_handler.VGUI_System[0][9])


function Clipboard.Get()
    local clipboard_text_length = ffi_handler.get_clipboard_text_length(ffi_handler.VGUI_System)

    if (clipboard_text_length > 0) then
        local buffer = ffi.new("char[?]", clipboard_text_length)

        ffi_handler.get_clipboard_text(ffi_handler.VGUI_System, 0, buffer, clipboard_text_length * ffi.sizeof("char[?]", clipboard_text_length))
        return ffi.string(buffer, clipboard_text_length - 1)
    end

    return ""
end

function Clipboard.Set(text)
    ffi_handler.set_clipboard_text(ffi_handler.VGUI_System, text, #text)
end

local JSON = panorama.loadstring([[
    return {
        stringify: JSON.stringify,
        parse: JSON.parse
    };
]])()


local cfg_data = {
    bools = {
        custom_aa_stand.enable,
        custom_aa_move.enable,
        custom_aa_air.enable,
        custom_aa_crouch.enable,
        custom_aa_walk.enable,
        custom_aa_air_duck.enable
    },

    ints = {
        presets,
        base,
        anim_breakers,
        cur_cond,
      
        custom_aa.yaw_add_left,
        custom_aa.yaw_add_right,
        custom_aa.yaw_mod,
        custom_aa.yaw_degree,
        custom_aa.desync_freestand,
        custom_aa.desync_on_shot,
        custom_aa.fake_options,
        custom_aa.left_limit,
        custom_aa.right_limit,

        custom_aa_stand.yaw_add_left,
        custom_aa_stand.yaw_add_right,
        custom_aa_stand.yaw_mod,
        custom_aa_stand.yaw_degree,
        custom_aa_stand.desync_freestand,
        custom_aa_stand.desync_on_shot,
        custom_aa_stand.fake_options,
        custom_aa_stand.left_limit,
        custom_aa_stand.right_limit,

        custom_aa_move.yaw_add_left,
        custom_aa_move.yaw_add_right,
        custom_aa_move.yaw_mod,
        custom_aa_move.yaw_degree,
        custom_aa_move.desync_freestand,
        custom_aa_move.desync_on_shot,
        custom_aa_move.fake_options,
        custom_aa_move.left_limit,
        custom_aa_move.right_limit,

        custom_aa_air.yaw_add_left,
        custom_aa_air.yaw_add_right,
        custom_aa_air.yaw_mod,
        custom_aa_air.yaw_degree,
        custom_aa_air.desync_freestand,
        custom_aa_air.desync_on_shot,
        custom_aa_air.fake_options,
        custom_aa_air.left_limit,
        custom_aa_air.right_limit,

        custom_aa_crouch.yaw_add_left,
        custom_aa_crouch.yaw_add_right,
        custom_aa_crouch.yaw_mod,
        custom_aa_crouch.yaw_degree,
        custom_aa_crouch.desync_freestand,
        custom_aa_crouch.desync_on_shot,
        custom_aa_crouch.fake_options,
        custom_aa_crouch.left_limit,
        custom_aa_crouch.right_limit,

        custom_aa_walk.yaw_add_left,
        custom_aa_walk.yaw_add_right,
        custom_aa_walk.yaw_mod,
        custom_aa_walk.yaw_degree,
        custom_aa_walk.desync_freestand,
        custom_aa_walk.desync_on_shot,
        custom_aa_walk.fake_options,
        custom_aa_walk.left_limit,
        custom_aa_walk.right_limit,

        custom_aa_air_duck.yaw_add_left,
        custom_aa_air_duck.yaw_add_right,
        custom_aa_air_duck.yaw_mod,
        custom_aa_air_duck.yaw_degree,
        custom_aa_air_duck.desync_freestand,
        custom_aa_air_duck.desync_on_shot,
        custom_aa_air_duck.fake_options,
        custom_aa_air_duck.left_limit,
        custom_aa_air_duck.right_limit,

        windows
    },

    floats = {
    },

    strings = {
        custom_name
    }
}

cfg_s:button("Copy Settings", function()

    local Code = {{}, {}, {}, {}, {}}

    for _, bools in pairs(cfg_data.bools) do
        table.insert(Code[1], bools:get())
    end

    for _, ints in pairs(cfg_data.ints) do
        table.insert(Code[2], ints:get())
    end

    for _, floats in pairs(cfg_data.floats) do
        table.insert(Code[3], floats:get())
    end

    for _, strings in pairs(cfg_data.strings) do
        table.insert(Code[4], strings:get())
    end

    Clipboard.Set(base64.encode(JSON.stringify(Code)))
end)

cfg_s:button("Load Settings", function()

    for k, v in pairs(JSON.parse(base64.decode(Clipboard.Get()))) do

        k = ({[1] = "bools", [2] = "ints", [3] = "floats", [4] = "strings", [5] = "colors"})[k]

        for k2, v2 in pairs(v) do
            if (k == "bools") then
                cfg_data[k][k2]:set(v2)
            end

            if (k == "ints") then
                cfg_data[k][k2]:set(v2)
            end

            if (k == "floats") then
                cfg_data[k][k2]:set(v2)
            end

            if (k == "strings") then
                cfg_data[k][k2]:set(v2)
            end
        end
    end
end)

cfg_s:button("Load Default Settings", function()
    presets:set("customs")

    custom_aa_stand.enable:set(true)
    custom_aa_move.enable:set(true)
    custom_aa_air.enable:set(true)
    custom_aa_crouch.enable:set(true)
    custom_aa_walk.enable:set(true)
    custom_aa_air_duck.enable:set(true)

    custom_aa_stand.yaw_add_left:set(6)
    custom_aa_stand.yaw_add_right:set(6)
    custom_aa_stand.yaw_mod:set("Center")
    custom_aa_stand.yaw_degree:set(-66)
    custom_aa_stand.desync_freestand:set("off")
    custom_aa_stand.desync_on_shot:set("freestanding")
    custom_aa_stand.fake_options:set("jitter")
    custom_aa_stand.left_limit:set(60)
    custom_aa_stand.right_limit:set(60)

    custom_aa_move.yaw_add_left:set(0)
    custom_aa_move.yaw_add_right:set(0)
    custom_aa_move.yaw_mod:set("Center")
    custom_aa_move.yaw_degree:set(-72)
    custom_aa_move.desync_freestand:set("off")
    custom_aa_move.desync_on_shot:set("freestanding")
    custom_aa_move.fake_options:set("jitter")
    custom_aa_move.left_limit:set(60)
    custom_aa_move.right_limit:set(60)

    custom_aa_air.yaw_add_left:set(6)
    custom_aa_air.yaw_add_right:set(6)
    custom_aa_air.yaw_mod:set("center")
    custom_aa_air.yaw_degree:set(-66)
    custom_aa_air.desync_freestand:set("off")
    custom_aa_air.desync_on_shot:set("freestanding")
    custom_aa_air.fake_options:set("jitter")
    custom_aa_air.left_limit:set(60)
    custom_aa_air.right_limit:set(60)
    custom_aa_air.lby_mode:set("opposite")

    custom_aa_crouch.yaw_add_left:set(6)
    custom_aa_crouch.yaw_add_right:set(6)
    custom_aa_crouch.yaw_mod:set("Center")
    custom_aa_crouch.yaw_degree:set(-66)
    custom_aa_crouch.desync_on_shot:set("Switch")
    custom_aa_crouch.fake_options:set("jitter")
    custom_aa_crouch.left_limit:set(60)
    custom_aa_crouch.right_limit:set(60)

    custom_aa_walk.yaw_add_left:set(0)
    custom_aa_walk.yaw_add_right:set(0)
    custom_aa_walk.yaw_mod:set("center")
    custom_aa_walk.yaw_degree:set(-88)
    custom_aa_walk.desync_freestand:set("off")
    custom_aa_walk.desync_on_shot:set("freestanding")
    custom_aa_walk.fake_options:set("jitter")
    custom_aa_walk.left_limit:set(60)
    custom_aa_walk.right_limit:set(60)
    custom_aa_walk.lby_mode:set("opposite")

    custom_aa_air_duck.yaw_add_left:set(6)
    custom_aa_air_duck.yaw_add_right:set(6)
    custom_aa_air_duck.yaw_mod:set("center")
    custom_aa_air_duck.yaw_degree:set(-66)
    custom_aa_air_duck.desync_freestand:set("off")
    custom_aa_air_duck.desync_on_shot:set("freestanding")
    custom_aa_air_duck.fake_options:set("jitter")
    custom_aa_air_duck.left_limit:set(60)
    custom_aa_air_duck.right_limit:set(60)
end)

globalss:button("Discord server", function(link)
    panorama.SteamOverlayAPI.OpenExternalBrowserURL("https://discord.gg/eQRBcycFjH")
end)

function menu_hanlde()

    cur_cond:set_visible(presets:get() == "customs")
    custom_aa.yaw_add_left:set_visible(presets:get() == "customs" and cur_cond:get() == "global")
    custom_aa.yaw_add_right:set_visible(presets:get() == "customs" and cur_cond:get() == "global")
    custom_aa.yaw_degree:set_visible(presets:get() == "customs" and cur_cond:get() == "global")
    custom_aa.yaw_mod:set_visible(presets:get() == "customs" and cur_cond:get() == "global")
    custom_aa.fake_options:set_visible(presets:get() == "customs" and cur_cond:get() == "global")
    custom_aa.lby_mode:set_visible(presets:get() == "customs" and cur_cond:get() == "global")
    custom_aa.desync_freestand:set_visible(presets:get() == "customs" and cur_cond:get() == "global")
    custom_aa.desync_on_shot:set_visible(presets:get() == "customs" and cur_cond:get() == "global")
    custom_aa.left_limit:set_visible(presets:get() == "customs" and cur_cond:get() == "global")
    custom_aa.right_limit:set_visible(presets:get() == "customs" and cur_cond:get() == "global")

    custom_aa_stand.enable:set_visible(presets:get() == "customs" and cur_cond:get() == "standing")
    custom_aa_stand.yaw_add_left:set_visible(presets:get() == "customs" and cur_cond:get() == "standing")
    custom_aa_stand.yaw_add_right:set_visible(presets:get() == "customs" and cur_cond:get() == "standing")
    custom_aa_stand.yaw_degree:set_visible(presets:get() == "customs" and cur_cond:get() == "standing")
    custom_aa_stand.yaw_mod:set_visible(presets:get() == "customs" and cur_cond:get() == "standing")
    custom_aa_stand.fake_options:set_visible(presets:get() == "customs" and cur_cond:get() == "standing")
    custom_aa_stand.lby_mode:set_visible(presets:get() == "customs" and cur_cond:get() == "standing")
    custom_aa_stand.desync_freestand:set_visible(presets:get() == "customs" and cur_cond:get() == "standing")
    custom_aa_stand.desync_on_shot:set_visible(presets:get() == "customs" and cur_cond:get() == "standing")
    custom_aa_stand.left_limit:set_visible(presets:get() == "customs" and cur_cond:get() == "standing")
    custom_aa_stand.right_limit:set_visible(presets:get() == "customs" and cur_cond:get() == "standing")

    custom_aa_move.enable:set_visible(presets:get() == "customs" and cur_cond:get() == "moving")
    custom_aa_move.yaw_add_left:set_visible(presets:get() == "customs" and cur_cond:get() == "moving")
    custom_aa_move.yaw_add_right:set_visible(presets:get() == "customs" and cur_cond:get() == "moving")
    custom_aa_move.yaw_degree:set_visible(presets:get() == "customs" and cur_cond:get() == "moving")
    custom_aa_move.yaw_mod:set_visible(presets:get() == "customs" and cur_cond:get() == "moving")
    custom_aa_move.fake_options:set_visible(presets:get() == "customs" and cur_cond:get() == "moving")
    custom_aa_move.lby_mode:set_visible(presets:get() == "customs" and cur_cond:get() == "moving")
    custom_aa_move.desync_freestand:set_visible(presets:get() == "customs" and cur_cond:get() == "moving")
    custom_aa_move.desync_on_shot:set_visible(presets:get() == "customs" and cur_cond:get() == "moving")
    custom_aa_move.left_limit:set_visible(presets:get() == "customs" and cur_cond:get() == "moving")
    custom_aa_move.right_limit:set_visible(presets:get() == "customs" and cur_cond:get() == "moving")

    custom_aa_air.enable:set_visible(presets:get() == "customs" and cur_cond:get() == "air")
    custom_aa_air.yaw_add_left:set_visible(presets:get() == "customs" and cur_cond:get() == "air")
    custom_aa_air.yaw_add_right:set_visible(presets:get() == "customs" and cur_cond:get() == "air")
    custom_aa_air.yaw_degree:set_visible(presets:get() == "customs" and cur_cond:get() == "air")
    custom_aa_air.yaw_mod:set_visible(presets:get() == "customs" and cur_cond:get() == "air")
    custom_aa_air.fake_options:set_visible(presets:get() == "customs" and cur_cond:get() == "air")
    custom_aa_air.lby_mode:set_visible(presets:get() == "customs" and cur_cond:get() == "air")
    custom_aa_air.desync_freestand:set_visible(presets:get() == "customs" and cur_cond:get() == "air")
    custom_aa_air.desync_on_shot:set_visible(presets:get() == "customs" and cur_cond:get() == "air")
    custom_aa_air.left_limit:set_visible(presets:get() == "customs" and cur_cond:get() == "air")
    custom_aa_air.right_limit:set_visible(presets:get() == "customs" and cur_cond:get() == "air")

    custom_aa_crouch.enable:set_visible(presets:get() == "customs" and cur_cond:get() == "crouch")
    custom_aa_crouch.yaw_add_left:set_visible(presets:get() == "customs" and cur_cond:get() == "crouch")
    custom_aa_crouch.yaw_add_right:set_visible(presets:get() == "customs" and cur_cond:get() == "crouch")
    custom_aa_crouch.yaw_degree:set_visible(presets:get() == "customs" and cur_cond:get() == "crouch")
    custom_aa_crouch.yaw_mod:set_visible(presets:get() == "customs" and cur_cond:get() == "crouch")
    custom_aa_crouch.fake_options:set_visible(presets:get() == "customs" and cur_cond:get() == "crouch")
    custom_aa_crouch.lby_mode:set_visible(presets:get() == "customs" and cur_cond:get() == "crouch")
    custom_aa_crouch.desync_freestand:set_visible(presets:get() == "customs" and cur_cond:get() == "crouch")
    custom_aa_crouch.desync_on_shot:set_visible(presets:get() == "customs" and cur_cond:get() == "crouch")
    custom_aa_crouch.left_limit:set_visible(presets:get() == "customs" and cur_cond:get() == "crouch")
    custom_aa_crouch.right_limit:set_visible(presets:get() == "customs" and cur_cond:get() == "crouch")

    custom_aa_walk.enable:set_visible(presets:get() == "customs" and cur_cond:get() == "walk")
    custom_aa_walk.yaw_add_left:set_visible(presets:get() == "customs" and cur_cond:get() == "walk")
    custom_aa_walk.yaw_add_right:set_visible(presets:get() == "customs" and cur_cond:get() == "walk")
    custom_aa_walk.yaw_degree:set_visible(presets:get() == "customs" and cur_cond:get() == "walk")
    custom_aa_walk.yaw_mod:set_visible(presets:get() == "customs" and cur_cond:get() == "walk")
    custom_aa_walk.fake_options:set_visible(presets:get() == "customs" and cur_cond:get() == "walk")
    custom_aa_walk.lby_mode:set_visible(presets:get() == "customs" and cur_cond:get() == "walk")
    custom_aa_walk.desync_freestand:set_visible(presets:get() == "customs" and cur_cond:get() == "walk")
    custom_aa_walk.desync_on_shot:set_visible(presets:get() == "customs" and cur_cond:get() == "walk")
    custom_aa_walk.left_limit:set_visible(presets:get() == "customs" and cur_cond:get() == "walk")
    custom_aa_walk.right_limit:set_visible(presets:get() == "customs" and cur_cond:get() == "walk")

    custom_aa_air_duck.enable:set_visible(presets:get() == "customs" and cur_cond:get() == "air-crouching")
    custom_aa_air_duck.yaw_add_left:set_visible(presets:get() == "customs" and cur_cond:get() == "air-crouching")
    custom_aa_air_duck.yaw_add_right:set_visible(presets:get() == "customs" and cur_cond:get() == "air-crouching")
    custom_aa_air_duck.yaw_degree:set_visible(presets:get() == "customs" and cur_cond:get() == "air-crouching")
    custom_aa_air_duck.yaw_mod:set_visible(presets:get() == "customs" and cur_cond:get() == "air-crouching")
    custom_aa_air_duck.fake_options:set_visible(presets:get() == "customs" and cur_cond:get() == "air-crouching")
    custom_aa_air_duck.lby_mode:set_visible(presets:get() == "customs" and cur_cond:get() == "air-crouching")
    custom_aa_air_duck.desync_freestand:set_visible(presets:get() == "customs" and cur_cond:get() == "air-crouching")
    custom_aa_air_duck.desync_on_shot:set_visible(presets:get() == "customs" and cur_cond:get() == "air-crouching")
    custom_aa_air_duck.left_limit:set_visible(presets:get() == "customs" and cur_cond:get() == "air-crouching")
    custom_aa_air_duck.right_limit:set_visible(presets:get() == "customs" and cur_cond:get() == "air-crouching")
end

local ffi = require("ffi")
ffi.cdef[[

    typedef struct
    {
        float x;
        float y;
        float z;
    } Vector_t;
  
    int VirtualProtect(void* lpAddress, unsigned long dwSize, unsigned long flNewProtect, unsigned long* lpflOldProtect);
    void* VirtualAlloc(void* lpAddress, unsigned long dwSize, unsigned long  flAllocationType, unsigned long flProtect);
    int VirtualFree(void* lpAddress, unsigned long dwSize, unsigned long dwFreeType);
    typedef uintptr_t (__thiscall* GetClientEntity_4242425_t)(void*, int);

    typedef struct
    {
        char    pad0[0x60]; // 0x00
        void* pEntity; // 0x60
        void* pActiveWeapon; // 0x64
        void* pLastActiveWeapon; // 0x68
        float        flLastUpdateTime; // 0x6C
        int            iLastUpdateFrame; // 0x70
        float        flLastUpdateIncrement; // 0x74
        float        flEyeYaw; // 0x78
        float        flEyePitch; // 0x7C
        float        flGoalFeetYaw; // 0x80
        float        flLastFeetYaw; // 0x84
        float        flMoveYaw; // 0x88
        float        flLastMoveYaw; // 0x8C // changes when moving/jumping/hitting ground
        float        flLeanAmount; // 0x90
        char         pad1[0x4]; // 0x94
        float        flFeetCycle; // 0x98 0 to 1
        float        flMoveWeight; // 0x9C 0 to 1
        float        flMoveWeightSmoothed; // 0xA0
        float        flDuckAmount; // 0xA4
        float        flHitGroundCycle; // 0xA8
        float        flRecrouchWeight; // 0xAC
        Vector_t        vecOrigin; // 0xB0
        Vector_t        vecLastOrigin;// 0xBC
        Vector_t        vecVelocity; // 0xC8
        Vector_t        vecVelocityNormalized; // 0xD4
        Vector_t        vecVelocityNormalizedNonZero; // 0xE0
        float        flVelocityLenght2D; // 0xEC
        float        flJumpFallVelocity; // 0xF0
        float        flSpeedNormalized; // 0xF4 // clamped velocity from 0 to 1
        float        flRunningSpeed; // 0xF8
        float        flDuckingSpeed; // 0xFC
        float        flDurationMoving; // 0x100
        float        flDurationStill; // 0x104
        bool        bOnGround; // 0x108
        bool        bHitGroundAnimation; // 0x109
        char    pad2[0x2]; // 0x10A
        float        flNextLowerBodyYawUpdateTime; // 0x10C
        float        flDurationInAir; // 0x110
        float        flLeftGroundHeight; // 0x114
        float        flHitGroundWeight; // 0x118 // from 0 to 1, is 1 when standing
        float        flWalkToRunTransition; // 0x11C // from 0 to 1, doesnt change when walking or crouching, only running
        char    pad3[0x4]; // 0x120
        float        flAffectedFraction; // 0x124 // affected while jumping and running, or when just jumping, 0 to 1
        char    pad4[0x208]; // 0x128
        float        flMinBodyYaw; // 0x330
        float        flMaxBodyYaw; // 0x334
        float        flMinPitch; //0x338
        float        flMaxPitch; // 0x33C
        int            iAnimsetVersion; // 0x340
    } CCSGOPlayerAnimationState_534535_t;

]]

entity_list_pointer = ffi.cast('void***', utils.create_interface('client.dll', 'VClientEntityList003'))
get_client_entity_fn = ffi.cast('GetClientEntity_4242425_t', entity_list_pointer[0][3])
function get_entity_address(ent_index)
    local addr = get_client_entity_fn(entity_list_pointer, ent_index)
    return addr
end

hook_helper = {
    copy = function(dst, src, len)
    return ffi.copy(ffi.cast('void*', dst), ffi.cast('const void*', src), len)
    end,

    virtual_protect = function(lpAddress, dwSize, flNewProtect, lpflOldProtect)
    return ffi.C.VirtualProtect(ffi.cast('void*', lpAddress), dwSize, flNewProtect, lpflOldProtect)
    end,

    virtual_alloc = function(lpAddress, dwSize, flAllocationType, flProtect, blFree)
    local alloc = ffi.C.VirtualAlloc(lpAddress, dwSize, flAllocationType, flProtect)
    if blFree then
        table.insert(buff.free, function()
        ffi.C.VirtualFree(alloc, 0, 0x8000)
        end)
    end
    return ffi.cast('intptr_t', alloc)
end
}

buff = {free = {}}
vmt_hook = {hooks = {}}

function vmt_hook.new(vt)
    local new_hook = {}
    local org_func = {}
    local old_prot = ffi.new('unsigned long[1]')
    local virtual_table = ffi.cast('intptr_t**', vt)[0]

    new_hook.this = virtual_table
    new_hook.hookMethod = function(cast, func, method)
    org_func[method] = virtual_table[method]
    hook_helper.virtual_protect(virtual_table + method, 4, 0x4, old_prot)

    virtual_table[method] = ffi.cast('intptr_t', ffi.cast(cast, func))
    hook_helper.virtual_protect(virtual_table + method, 4, old_prot[0], old_prot)

    return ffi.cast(cast, org_func[method])
end

new_hook.unHookMethod = function(method)
    hook_helper.virtual_protect(virtual_table + method, 4, 0x4, old_prot)
    local alloc_addr = hook_helper.virtual_alloc(nil, 5, 0x1000, 0x40, false)
    local trampoline_bytes = ffi.new('uint8_t[?]', 5, 0x90)

    trampoline_bytes[0] = 0xE9
    ffi.cast('int32_t*', trampoline_bytes + 1)[0] = org_func[method] - tonumber(alloc_addr) - 5

    hook_helper.copy(alloc_addr, trampoline_bytes, 5)
    virtual_table[method] = ffi.cast('intptr_t', alloc_addr)

    hook_helper.virtual_protect(virtual_table + method, 4, old_prot[0], old_prot)
    org_func[method] = nil
end

new_hook.unHookAll = function()
    for method, func in pairs(org_func) do
        new_hook.unHookMethod(method)
    end
end

table.insert(vmt_hook.hooks, new_hook.unHookAll)
    return new_hook
end

local function in_air2()
    local localplayer = entity.get_local_player()
    local b = entity.get_local_player()
        if b == nil then
            return
        end
    local flags = localplayer["m_fFlags"]
  
    if bit.band(flags, 1) == 0 then
        return true
    end
  
    return false
end

events.shutdown:set(function()
    for _, reset_function in ipairs(vmt_hook.hooks) do
        reset_function()
    end
end)

hooked_function = nil
ground_ticks, end_time = 1, 0
function updateCSA_hk(thisptr, edx)
    if entity.get_local_player() == nil or ffi.cast('uintptr_t', thisptr) == nil then return end
    if anim_breakers:get("Follow direction") then
        ffi.cast('float*', ffi.cast('uintptr_t', thisptr) + 10104)[0] = 1
        var.legmovement:set('Sliding')
    end
    hooked_function(thisptr, edx)
    if anim_breakers:get("Static legs in air") then
        ffi.cast('float*', ffi.cast('uintptr_t', thisptr) + 10104)[6] = 1
    end
end

function anim_state_hook()
    local local_player = entity.get_local_player()
    if not local_player then return end

    local local_player_ptr = get_entity_address(local_player:get_index())
    if not local_player_ptr or hooked_function then return end
    local C_CSPLAYER = vmt_hook.new(local_player_ptr)
    hooked_function = C_CSPLAYER.hookMethod('void(__fastcall*)(void*, void*)', updateCSA_hk, 224)
end

events.render:set(menu_hanlde)
events.createmove_run:set(anim_state_hook)
events.createmove:set(antiaims)
Код:
local function in_air2()
    local localplayer = entity.get_local_player()
    local b = entity.get_local_player()
        if b == nil then
            return
        end
    local flags = localplayer["m_fFlags"]
   
    if bit.band(flags, 1) == 0 then
        return true
    end
   
    return false
end
 
я дед инсайд, мне 9 лет, я хочу в психокидс
Пользователь
Статус
Оффлайн
Регистрация
12 Ноя 2020
Сообщения
191
Реакции[?]
45
Поинты[?]
0
!!!!Осторожно присудствует говонокод (в свое опровдание скажу что писал когда в3 с новым апи только вышел, писал одновременно изучая)

code_language.lua:
ui.sidebar('Lunarity.lua', 'moon')

local globalss = ui.create("Globals", "Lunarity.lua")
local cfg_s = ui.create("Globals", "Config System")

local aa_g = ui.create("AntiAims", "AntiAims")
local aa_a = ui.create("AntiAims", "AntiAims Settings")

local visual = ui.create("Others", "Visuals")
local visual_ui = ui.create("Others", "UI indicators")
local others = ui.create("Others", "Misc")

local welcome = globalss:label("Welcome to Lunarity - "..common.get_username())
local build = globalss:label("Last upd: 07.09.22  |  Build: 1.2")

local conditions = {"global","standing", "moving", "air", "crouch", "walk", "air-crouching"}
local presets = aa_g:combo("Presets", "Disabled", "lunarity-yaw", "customs")
local base = aa_g:combo("Yaw Base", {"Disabled","Left", "Right", "Backward", "At Target", "Freestanding", "Forward"}, 0, "")
local cur_cond = aa_a:combo("Current Condition", conditions)
local anim_breakers = aa_g:selectable("Anim breakers", {'Static legs in air', 'Follow direction'}, 0)

local custom_aa = {
    yaw_add_left = aa_a:slider("Left Yaw Add", -180, 180, 0, ""),
    yaw_add_right = aa_a:slider("Right Yaw Add", -180, 180, 0, ""),
    yaw_mod = aa_a:combo("Yaw Modifier", {"Disabled","Center", "Offset", "Random", "Spin"}, 0, ""),
    yaw_degree = aa_a:slider("Modifier Degree", -180, 180, 0, ""),
    fake_options = aa_a:selectable("Fake Options", {"Avoid Overlap", "Jitter", "Randomize Jitter", "Anti Bruteforce"}, 0, ""),
    lby_mode = aa_a:combo("LBY Mode", {"Disabled","Opposite","Sway"}, 0, ""),
    desync_freestand = aa_a:combo("Freestanding", {"Off","Fake","Real"}, 0, ""),
    desync_on_shot = aa_a:combo("Onshot", {"Default","Opposite","Freestanding","Switch"  }, 0, ""),
    left_limit = aa_a:slider("Fake Left Limit", 0, 60, 0, ""),
    right_limit = aa_a:slider("Fake Right Limit", 0, 60, 0, ""),
}

local custom_aa_stand = {
    enable = aa_a:switch("Override Stand"),
    yaw_add_left = aa_a:slider("[S] Left Yaw Add", -180, 180, 0, ""),
    yaw_add_right = aa_a:slider("[S] Right Yaw Add", -180, 180, 0, ""),
    yaw_mod = aa_a:combo("[S] Yaw Modifier", {"Disabled","Center", "Offset", "Random", "Spin"}, 0, ""),
    yaw_degree = aa_a:slider("[S] Modifier Degree", -180, 180, 0, ""),
    fake_options = aa_a:selectable("[S] Fake Options", {"Avoid Overlap", "Jitter", "Randomize Jitter", "Anti Bruteforce"}, 0, ""),
    lby_mode = aa_a:combo("[S] LBY Mode", {"Disabled","Opposite","Sway"}, 0, ""),
    desync_freestand = aa_a:combo("[S] Freestanding", {"Off","Fake","Real"}, 0, ""),
    desync_on_shot = aa_a:combo("[S] Onshot", {"Default","Opposite","Freestanding","Switch"  }, 0, ""),
    left_limit = aa_a:slider("[S] Fake Left Limit", 0, 60, 0, ""),
    right_limit = aa_a:slider("[S] Fake Right Limit", 0, 60, 0, ""),
}

local custom_aa_move = {
    enable = aa_a:switch("Override Move"),
    yaw_add_left = aa_a:slider("[M] Left Yaw Add", -180, 180, 0, ""),
    yaw_add_right = aa_a:slider("[M] Right Yaw Add", -180, 180, 0, ""),
    yaw_mod = aa_a:combo("[M] Yaw Modifier", {"Disabled","Center", "Offset", "Random", "Spin"}, 0, ""),
    yaw_degree = aa_a:slider("[M] Modifier Degree", -180, 180, 0, ""),
    fake_options = aa_a:selectable("[M] Fake Options", {"Avoid Overlap", "Jitter", "Randomize Jitter", "Anti Bruteforce"}, 0, ""),
    lby_mode = aa_a:combo("[M] LBY Mode", {"Disabled","Opposite","Sway"}, 0, ""),
    desync_freestand = aa_a:combo("[M] Freestanding", {"Off","Fake","Real"}, 0, ""),
    desync_on_shot = aa_a:combo("[M] Onshot", {"Default","Opposite","Freestanding","Switch"  }, 0, ""),
    left_limit = aa_a:slider("[M] Fake Left Limit", 0, 60, 0, ""),
    right_limit = aa_a:slider("[M] Fake Right Limit", 0, 60, 0, ""),
}

local custom_aa_air = {
    enable = aa_a:switch("Override Air"),
    yaw_add_left = aa_a:slider("[A] Left Yaw Add", -180, 180, 0, ""),
    yaw_add_right = aa_a:slider("[A] Right Yaw Add", -180, 180, 0, ""),
    yaw_mod = aa_a:combo("[A] Yaw Modifier", {"Disabled","Center", "Offset", "Random", "Spin"}, 0, ""),
    yaw_degree = aa_a:slider("[A] Modifier Degree", -180, 180, 0, ""),
    fake_options = aa_a:selectable("[A] Fake Options", {"Avoid Overlap", "Jitter", "Randomize Jitter", "Anti Bruteforce"}, 0, ""),
    lby_mode = aa_a:combo("[A] LBY Mode", {"Disabled","Opposite","Sway"}, 0, ""),
    desync_freestand = aa_a:combo("[A] Freestanding", {"Off","Fake","Real"}, 0, ""),
    desync_on_shot = aa_a:combo("[A] Onshot", {"Default","Opposite","Freestanding","Switch"  }, 0, ""),
    left_limit = aa_a:slider("[A] Fake Left Limit", 0, 60, 0, ""),
    right_limit = aa_a:slider("[A] Fake Right Limit", 0, 60, 0, ""),
}

local custom_aa_crouch = {
    enable = aa_a:switch("Override Crouch"),
    yaw_add_left = aa_a:slider("[C] Left Yaw Add", -180, 180, 0, ""),
    yaw_add_right = aa_a:slider("[C] Right Yaw Add", -180, 180, 0, ""),
    yaw_mod = aa_a:combo("[C] Yaw Modifier", {"Disabled","Center", "Offset", "Random", "Spin"}, 0, ""),
    yaw_degree = aa_a:slider("[C] Modifier Degree", -180, 180, 0, ""),
    fake_options = aa_a:selectable("[C] Fake Options", {"Avoid Overlap", "Jitter", "Randomize Jitter", "Anti Bruteforce"}, 0, ""),
    lby_mode = aa_a:combo("[C] LBY Mode", {"Disabled","Opposite","Sway"}, 0, ""),
    desync_freestand = aa_a:combo("[C] Freestanding", {"Off","Fake","Real"}, 0, ""),
    desync_on_shot = aa_a:combo("[C] Onshot", {"Default","Opposite","Freestanding","Switch"  }, 0, ""),
    left_limit = aa_a:slider("[C] Fake Left Limit", 0, 60, 0, ""),
    right_limit = aa_a:slider("[C] Fake Right Limit", 0, 60, 0, ""),
}

local custom_aa_walk = {
    enable = aa_a:switch("Override Walk"),
    yaw_add_left = aa_a:slider("[W] Left Yaw Add", -180, 180, 0, ""),
    yaw_add_right = aa_a:slider("[W] Right Yaw Add", -180, 180, 0, ""),
    yaw_mod = aa_a:combo("[W] Yaw Modifier", {"Disabled","Center", "Offset", "Random", "Spin"}, 0, ""),
    yaw_degree = aa_a:slider("[W] Modifier Degree", -180, 180, 0, ""),
    fake_options = aa_a:selectable("[W] Fake Options", {"Avoid Overlap", "Jitter", "Randomize Jitter", "Anti Bruteforce"}, 0, ""),
    lby_mode = aa_a:combo("[W] LBY Mode", {"Disabled","Opposite","Sway"}, 0, ""),
    desync_freestand = aa_a:combo("[W] Freestanding", {"Off","Fake","Real"}, 0, ""),
    desync_on_shot = aa_a:combo("[W] Onshot", {"Default","Opposite","Freestanding","Switch"  }, 0, ""),
    left_limit = aa_a:slider("[W] Fake Left Limit", 0, 60, 0, ""),
    right_limit = aa_a:slider("[W] Fake Right Limit", 0, 60, 0, ""),
}

local custom_aa_air_duck = {
    enable = aa_a:switch("Override Air+Crouch"),
    yaw_add_left = aa_a:slider("[A+C] Left Yaw Add", -180, 180, 0, ""),
    yaw_add_right = aa_a:slider("[A+C] Right Yaw Add", -180, 180, 0, ""),
    yaw_mod = aa_a:combo("[A+C] Yaw Modifier", {"Disabled","Center", "Offset", "Random", "Spin"}, 0, ""),
    yaw_degree = aa_a:slider("[A+C] Modifier Degree", -180, 180, 0, ""),
    fake_options = aa_a:selectable("[A+C] Fake Options", {"Avoid Overlap", "Jitter", "Randomize Jitter", "Anti Bruteforce"}, 0, ""),
    lby_mode = aa_a:combo("[A+C] LBY Mode", {"Disabled","Opposite","Sway"}, 0, ""),
    desync_freestand = aa_a:combo("[A+C] Freestanding", {"Off","Fake","Real"}, 0, ""),
    desync_on_shot = aa_a:combo("[A+C] Onshot", {"Default","Opposite","Freestanding","Switch"  }, 0, ""),
    left_limit = aa_a:slider("[A+C] Fake Left Limit", 0, 60, 0, ""),
    right_limit = aa_a:slider("[A+C] Fake Right Limit", 0, 60, 0, ""),
}

local var = {
    hit = ui.find("aimbot", "ragebot", "selection", "hit chance"),
    dt = ui.find("aimbot", "ragebot", "main", "double Tap"),
    hs = ui.find("aimbot", "ragebot", "main", "hide shots"),
    autopeek = ui.find("aimbot", "ragebot", "main", "peek assist"),
    legmovement = ui.find("aimbot", "anti aim", "misc", "leg movement"),

    walk = ui.find("aimbot", "anti aim", "misc", "slow walk"),
    fl_en = ui.find("aimbot", "anti aim", "fake lag", "enabled"),

    pitch = ui.find("aimbot", "anti aim", "angles", "pitch"),
    yaw = ui.find("aimbot", "anti aim", "angles", "yaw"),
    at_target = ui.find("aimbot", "anti aim", "angles", "yaw", "base"),
    yaw_mod = ui.find("aimbot", "anti aim", "angles", "yaw modifier"),
    offset = ui.find("aimbot", "anti aim", "angles", "yaw", "offset"),
    yaw_offset = ui.find("aimbot", "anti aim", "angles", "yaw modifier", "offset"),
    body_yaw = ui.find("aimbot", "anti aim", "angles", "body yaw"),

    left_limit = ui.find("aimbot", "anti aim", "angles", "body yaw", "left limit"),
    right_limit = ui.find("aimbot", "anti aim", "angles", "body yaw", "right limit"),
    options = ui.find("aimbot", "anti aim", "angles", "body yaw", "options"),
    freestanding_desync = ui.find("aimbot", "anti aim", "angles", "body yaw", "freestanding"),
    on_shot = ui.find("aimbot", "anti aim", "angles", "body yaw", "on shot"),
    lby = ui.find("aimbot", "anti aim", "angles", "body yaw", "lby mode"),

    freestanding = ui.find("aimbot", "anti aim", "angles", "freestanding"),
    roll = ui.find("aimbot", "anti aim", "angles", "extended angles"),

    override_zoom_en = ui.find("visuals", "world", "main", "override zoom"),
    override_zoom = ui.find("visuals", "world", "main", "override zoom", "scope overlay"),
    hitsound = ui.find("visuals", "world", "other", "hit marker sound"),

    strafe = ui.find("miscellaneous", "main", "movement", "air strafe"),
    clantag = ui.find("miscellaneous", "main", "in-game", "clantag"),
    shared_f = ui.find("miscellaneous", "main", "in-game", "Shared Features"),
}

function get_velocity(player)
    if(player == nil) then return end
    local vec = player.m_vecVelocity
    local velocity = vec:length()
    return velocity
end

local function is_crouching(player)
    local flags = player.m_fFlags

    if bit.band(flags, 4) == 4 then
        return true
    end

    return false
end

local function in_air(player)
    local flags = player.m_fFlags

    if bit.band(flags, 1) == 0 then
        return true
    end

    return false
end

--antiaims
local bInverter = false;

function antiaims(cmd)
    local get_local_player = entity.get_local_player()
    if get_local_player == nil then return end
    local weapon = get_local_player:get_player_weapon()
    if weapon == nil then return end
  
    bInverter = not bInverter;
    yaw_add = 0

    --lunarity-yaw
    if presets:get() == "lunarity-yaw" then
        --stand
        if (in_air(get_local_player) == false and is_crouching(get_local_player) == false and var.walk:get() == false and get_velocity(get_local_player) < 3) then
            yaw_add = bInverter and -26 or 26
            var.pitch:override("Down")
            var.yaw_mod:override("Center")
            var.at_target:override("At target")
            var.body_yaw:override(true)
            var.left_limit:override(60)
            var.right_limit:override(60)
            var.options:override("jitter")
            var.freestanding_desync:override("off")
            var.on_shot:override("freestanding")
            var.lby:override("opposite")
            var.offset:override(bInverter and -26 or 26)
            var.yaw_offset:override(35)
        end
        --duck
        if (in_air(get_local_player) == false and is_crouching(get_local_player)) then
            yaw_add = bInverter and -24 or 22
            var.pitch:override("Down")
            var.yaw_mod:override("Center")
            var.at_target:override("At target")
            var.body_yaw:override(true)
            var.left_limit:override(60)
            var.right_limit:override(60)
            var.options:override("jitter")
            var.freestanding_desync:override("off")
            var.on_shot:override("freestanding")
            var.lby:override("opposite")
            var.offset:override(bInverter and -22 or 22)
            var.yaw_offset:override(42)
        end
        --air
        if (in_air(get_local_player) and is_crouching(get_local_player) == false) then
            yaw_add = bInverter and -20 or 22
            var.pitch:override("Down")
            var.yaw_mod:override("Center")
            var.at_target:override("At target")
            var.body_yaw:override(true)
            var.left_limit:override(60)
            var.right_limit:override(60)
            var.options:override("jitter")
            var.freestanding_desync:override("off")
            var.on_shot:override("freestanding")
            var.lby:override("opposite")
            var.offset:override(bInverter and -20 or 22)
            var.yaw_offset:override(32)
        end
        --move
        if (in_air(get_local_player) == false and is_crouching(get_local_player) == false and var.walk:get() == false and get_velocity(get_local_player) > 3) then
            yaw_add = bInverter and -24 or 22
            var.pitch:override("Down")
            var.yaw_mod:override("Center")
            var.at_target:override("At target")
            var.body_yaw:override(true)
            var.left_limit:override(60)
            var.right_limit:override(60)
            var.options:override("jitter")
            var.freestanding_desync:override("off")
            var.on_shot:override("freestanding")
            var.lby:override("opposite")
            var.offset:override(bInverter and -24 or 22)
            var.yaw_offset:override(32)
        end
        --air+duck
        if (in_air(get_local_player) and is_crouching(get_local_player)) then
            yaw_add = bInverter and -7 or 12
            var.pitch:override("Down")
            var.yaw_mod:override("Center")
            var.at_target:override("At target")
            var.body_yaw:override(true)
            var.left_limit:override(60)
            var.right_limit:override(60)
            var.options:override("jitter")
            var.freestanding_desync:override("off")
            var.on_shot:override("freestanding")
            var.lby:override("opposite")
            var.offset:override(bInverter and -7 or 12)
            var.yaw_offset:override(60)
        end
        --walk
        if (in_air(get_local_player) == false and is_crouching(get_local_player) == false and var.walk:get()) then
            yaw_add = bInverter and -24 or 22
            var.pitch:override("Down")
            var.yaw_mod:override("Center")
            var.at_target:override("At target")
            var.body_yaw:override(true)
            var.left_limit:override(60)
            var.right_limit:override(60)
            var.options:override("jitter")
            var.freestanding_desync:override("off")
            var.on_shot:override("freestanding")
            var.lby:override("opposite")
            var.offset:override(bInverter and -24 or 22)
            var.yaw_offset:override(32)
        end
    end
    if presets:get() == "customs" then
        yaw_add = bInverter and custom_aa.yaw_add_left:get() or custom_aa.yaw_add_right:get()
        var.pitch:override("Down")
        var.yaw_mod:override(custom_aa.yaw_mod:get())
        var.body_yaw:override(true)
        var.left_limit:override(custom_aa.left_limit:get())
        var.right_limit:override(custom_aa.right_limit:get())
        var.options:override(custom_aa.fake_options:get())
        var.freestanding_desync:override(custom_aa.desync_freestand:get())
        var.on_shot:override(custom_aa.desync_on_shot:get())
        var.lby:override(custom_aa.lby_mode:get())
        var.offset:override(bInverter and custom_aa.yaw_add_left:get() or custom_aa.yaw_add_right:get())
        var.yaw_offset:override(custom_aa.yaw_degree:get())
      
        if custom_aa_stand.enable:get() and (in_air(get_local_player) == false and is_crouching(get_local_player) == false and var.walk:get() == false and get_velocity(get_local_player) < 3) then
            yaw_add = bInverter and custom_aa_stand.yaw_add_left:get() or custom_aa_stand.yaw_add_right:get()
            var.pitch:override("Down")
            var.yaw_mod:override(custom_aa_stand.yaw_mod:get())
            var.body_yaw:override(true)
            var.left_limit:override(custom_aa_stand.left_limit:get())
            var.right_limit:override(custom_aa_stand.right_limit:get())
            var.options:override(custom_aa_stand.fake_options:get())
            var.freestanding_desync:override(custom_aa_stand.desync_freestand:get())
            var.on_shot:override(custom_aa_stand.desync_on_shot:get())
            var.lby:override(custom_aa_stand.lby_mode:get())
            var.offset:override(bInverter and custom_aa_stand.yaw_add_left:get() or custom_aa_stand.yaw_add_right:get())
            var.yaw_offset:override(custom_aa_stand.yaw_degree:get())
        end
        if custom_aa_move.enable:get() and (in_air(get_local_player) == false and is_crouching(get_local_player) == false and var.walk:get() == false and get_velocity(get_local_player) > 3) then
            yaw_add = bInverter and custom_aa_move.yaw_add_left:get() or custom_aa_move.yaw_add_right:get()
            var.pitch:override("Down")
            var.yaw_mod:override(custom_aa_move.yaw_mod:get())
            var.body_yaw:override(true)
            var.left_limit:override(custom_aa_move.left_limit:get())
            var.right_limit:override(custom_aa_move.right_limit:get())
            var.options:override(custom_aa_move.fake_options:get())
            var.freestanding_desync:override(custom_aa_move.desync_freestand:get())
            var.on_shot:override(custom_aa_move.desync_on_shot:get())
            var.lby:override(custom_aa_move.lby_mode:get())
            var.offset:override(bInverter and custom_aa_move.yaw_add_left:get() or custom_aa_move.yaw_add_right:get())
            var.yaw_offset:override(custom_aa_move.yaw_degree:get())
        end
        if custom_aa_air.enable:get() and (in_air(get_local_player) and is_crouching(get_local_player) == false) then
            yaw_add = bInverter and custom_aa_air.yaw_add_left:get() or custom_aa_air.yaw_add_right:get()
            var.pitch:override("Down")
            var.yaw_mod:override(custom_aa_air.yaw_mod:get())
            var.body_yaw:override(true)
            var.left_limit:override(custom_aa_air.left_limit:get())
            var.right_limit:override(custom_aa_air.right_limit:get())
            var.options:override(custom_aa_air.fake_options:get())
            var.freestanding_desync:override(custom_aa_air.desync_freestand:get())
            var.on_shot:override(custom_aa_air.desync_on_shot:get())
            var.lby:override(custom_aa_air.lby_mode:get())
            var.offset:override(bInverter and custom_aa_air.yaw_add_left:get() or custom_aa_air.yaw_add_right:get())
            var.yaw_offset:override(custom_aa_air.yaw_degree:get())
        end
        if custom_aa_crouch.enable:get() and (in_air(get_local_player) == false and is_crouching(get_local_player)) then
            yaw_add = bInverter and custom_aa_crouch.yaw_add_left:get() or custom_aa_crouch.yaw_add_right:get()
            var.pitch:override("Down")
            var.yaw_mod:override(custom_aa_crouch.yaw_mod:get())
            var.body_yaw:override(true)
            var.left_limit:override(custom_aa_crouch.left_limit:get())
            var.right_limit:override(custom_aa_crouch.right_limit:get())
            var.options:override(custom_aa_crouch.fake_options:get())
            var.freestanding_desync:override(custom_aa_crouch.desync_freestand:get())
            var.on_shot:override(custom_aa_crouch.desync_on_shot:get())
            var.lby:override(custom_aa_crouch.lby_mode:get())
            var.offset:override(bInverter and custom_aa_crouch.yaw_add_left:get() or custom_aa_crouch.yaw_add_right:get())
            var.yaw_offset:override(custom_aa_crouch.yaw_degree:get())
        end
        if custom_aa_walk.enable:get() and (in_air(get_local_player) == false and is_crouching(get_local_player) == false and var.walk:get()) then
            yaw_add = bInverter and custom_aa_walk.yaw_add_left:get() or custom_aa_walk.yaw_add_right:get()
            var.pitch:override("Down")
            var.yaw_mod:override(custom_aa_walk.yaw_mod:get())
            var.body_yaw:override(true)
            var.left_limit:override(custom_aa_walk.left_limit:get())
            var.right_limit:override(custom_aa_walk.right_limit:get())
            var.options:override(custom_aa_walk.fake_options:get())
            var.freestanding_desync:override(custom_aa_walk.desync_freestand:get())
            var.on_shot:override(custom_aa_walk.desync_on_shot:get())
            var.lby:override(custom_aa_walk.lby_mode:get())
            var.offset:override(bInverter and custom_aa_walk.yaw_add_left:get() or custom_aa_walk.yaw_add_right:get())
            var.yaw_offset:override(custom_aa_walk.yaw_degree:get())
        end
        if custom_aa_air_duck.enable:get() and (in_air(get_local_player) and is_crouching(get_local_player)) then
            yaw_add = bInverter and custom_aa_air_duck.yaw_add_left:get() or custom_aa_air_duck.yaw_add_right:get()
            var.pitch:override("Down")
            var.yaw_mod:override(custom_aa_air_duck.yaw_mod:get())
            var.body_yaw:override(true)
            var.left_limit:override(custom_aa_air_duck.left_limit:get())
            var.right_limit:override(custom_aa_air_duck.right_limit:get())
            var.options:override(custom_aa_air_duck.fake_options:get())
            var.freestanding_desync:override(custom_aa_air_duck.desync_freestand:get())
            var.on_shot:override(custom_aa_air_duck.desync_on_shot:get())
            var.lby:override(custom_aa_air_duck.lby_mode:get())
            var.offset:override(bInverter and custom_aa_air_duck.yaw_add_left:get() or custom_aa_air_duck.yaw_add_right:get())
            var.yaw_offset:override(custom_aa_air_duck.yaw_degree:get())
        end
    end
    if(base:get() == "Disabled") then
        var.yaw:override("Disabled")
        var.offset:override(0 + yaw_add)
        var.at_target:override("Local View")
        var.freestanding:override(false)
    elseif(base:get() == "Left") then
        var.yaw:override("Backward")
        var.offset:override(-90 + yaw_add)
        var.at_target:override("Local View")
        var.freestanding:override(false)
    elseif(base:get() == "Right") then
        var.yaw:override("Backward")
        var.offset:override(90 + yaw_add)
        var.at_target:override("Local View")
        var.freestanding:override(false)
    elseif(base:get() == "Backward") then
        var.yaw:override("Backward")
        var.offset:override(0 + yaw_add)
        var.at_target:override("Local View")
        var.freestanding:override(false)
    elseif(base:get() == "At Target") then
        var.yaw:override("Backward")
        var.offset:override(0 + yaw_add)
        var.at_target:override("At Target")
        var.freestanding:override(false)
    elseif(base:get() == "Freestanding") then
        var.yaw:override("Backward")
        var.at_target:override("At Target")
        var.freestanding:set(false)
        var.freestanding:override(true)
    elseif(base:get() == "Forward") then
        var.yaw:override("Backward")
        var.offset:override(180 + yaw_add)
        var.at_target:override("Local View")
        var.freestanding:override(false)
    end
end

local base64 = require("neverlose/base64")
local Clipboard, ffi_handler = {}, {}, {}

ffi.cdef[[
    typedef int(__thiscall* get_clipboard_text_length)(void*);
    typedef void(__thiscall* set_clipboard_text)(void*, const char*, int);
    typedef void(__thiscall* get_clipboard_text)(void*, int, const char*, int);
]]

ffi_handler.VGUI_System = ffi.cast(ffi.typeof("void***"), utils.create_interface("vgui2.dll", "VGUI_System010"))
ffi_handler.get_clipboard_text_length = ffi.cast("get_clipboard_text_length", ffi_handler.VGUI_System[0][7])
ffi_handler.get_clipboard_text = ffi.cast("get_clipboard_text", ffi_handler.VGUI_System[0][11])
ffi_handler.set_clipboard_text = ffi.cast("set_clipboard_text", ffi_handler.VGUI_System[0][9])


function Clipboard.Get()
    local clipboard_text_length = ffi_handler.get_clipboard_text_length(ffi_handler.VGUI_System)

    if (clipboard_text_length > 0) then
        local buffer = ffi.new("char[?]", clipboard_text_length)

        ffi_handler.get_clipboard_text(ffi_handler.VGUI_System, 0, buffer, clipboard_text_length * ffi.sizeof("char[?]", clipboard_text_length))
        return ffi.string(buffer, clipboard_text_length - 1)
    end

    return ""
end

function Clipboard.Set(text)
    ffi_handler.set_clipboard_text(ffi_handler.VGUI_System, text, #text)
end

local JSON = panorama.loadstring([[
    return {
        stringify: JSON.stringify,
        parse: JSON.parse
    };
]])()


local cfg_data = {
    bools = {
        custom_aa_stand.enable,
        custom_aa_move.enable,
        custom_aa_air.enable,
        custom_aa_crouch.enable,
        custom_aa_walk.enable,
        custom_aa_air_duck.enable
    },

    ints = {
        presets,
        base,
        anim_breakers,
        cur_cond,
      
        custom_aa.yaw_add_left,
        custom_aa.yaw_add_right,
        custom_aa.yaw_mod,
        custom_aa.yaw_degree,
        custom_aa.desync_freestand,
        custom_aa.desync_on_shot,
        custom_aa.fake_options,
        custom_aa.left_limit,
        custom_aa.right_limit,

        custom_aa_stand.yaw_add_left,
        custom_aa_stand.yaw_add_right,
        custom_aa_stand.yaw_mod,
        custom_aa_stand.yaw_degree,
        custom_aa_stand.desync_freestand,
        custom_aa_stand.desync_on_shot,
        custom_aa_stand.fake_options,
        custom_aa_stand.left_limit,
        custom_aa_stand.right_limit,

        custom_aa_move.yaw_add_left,
        custom_aa_move.yaw_add_right,
        custom_aa_move.yaw_mod,
        custom_aa_move.yaw_degree,
        custom_aa_move.desync_freestand,
        custom_aa_move.desync_on_shot,
        custom_aa_move.fake_options,
        custom_aa_move.left_limit,
        custom_aa_move.right_limit,

        custom_aa_air.yaw_add_left,
        custom_aa_air.yaw_add_right,
        custom_aa_air.yaw_mod,
        custom_aa_air.yaw_degree,
        custom_aa_air.desync_freestand,
        custom_aa_air.desync_on_shot,
        custom_aa_air.fake_options,
        custom_aa_air.left_limit,
        custom_aa_air.right_limit,

        custom_aa_crouch.yaw_add_left,
        custom_aa_crouch.yaw_add_right,
        custom_aa_crouch.yaw_mod,
        custom_aa_crouch.yaw_degree,
        custom_aa_crouch.desync_freestand,
        custom_aa_crouch.desync_on_shot,
        custom_aa_crouch.fake_options,
        custom_aa_crouch.left_limit,
        custom_aa_crouch.right_limit,

        custom_aa_walk.yaw_add_left,
        custom_aa_walk.yaw_add_right,
        custom_aa_walk.yaw_mod,
        custom_aa_walk.yaw_degree,
        custom_aa_walk.desync_freestand,
        custom_aa_walk.desync_on_shot,
        custom_aa_walk.fake_options,
        custom_aa_walk.left_limit,
        custom_aa_walk.right_limit,

        custom_aa_air_duck.yaw_add_left,
        custom_aa_air_duck.yaw_add_right,
        custom_aa_air_duck.yaw_mod,
        custom_aa_air_duck.yaw_degree,
        custom_aa_air_duck.desync_freestand,
        custom_aa_air_duck.desync_on_shot,
        custom_aa_air_duck.fake_options,
        custom_aa_air_duck.left_limit,
        custom_aa_air_duck.right_limit,

        windows
    },

    floats = {
    },

    strings = {
        custom_name
    }
}

cfg_s:button("Copy Settings", function()

    local Code = {{}, {}, {}, {}, {}}

    for _, bools in pairs(cfg_data.bools) do
        table.insert(Code[1], bools:get())
    end

    for _, ints in pairs(cfg_data.ints) do
        table.insert(Code[2], ints:get())
    end

    for _, floats in pairs(cfg_data.floats) do
        table.insert(Code[3], floats:get())
    end

    for _, strings in pairs(cfg_data.strings) do
        table.insert(Code[4], strings:get())
    end

    Clipboard.Set(base64.encode(JSON.stringify(Code)))
end)

cfg_s:button("Load Settings", function()

    for k, v in pairs(JSON.parse(base64.decode(Clipboard.Get()))) do

        k = ({[1] = "bools", [2] = "ints", [3] = "floats", [4] = "strings", [5] = "colors"})[k]

        for k2, v2 in pairs(v) do
            if (k == "bools") then
                cfg_data[k][k2]:set(v2)
            end

            if (k == "ints") then
                cfg_data[k][k2]:set(v2)
            end

            if (k == "floats") then
                cfg_data[k][k2]:set(v2)
            end

            if (k == "strings") then
                cfg_data[k][k2]:set(v2)
            end
        end
    end
end)

cfg_s:button("Load Default Settings", function()
    presets:set("customs")

    custom_aa_stand.enable:set(true)
    custom_aa_move.enable:set(true)
    custom_aa_air.enable:set(true)
    custom_aa_crouch.enable:set(true)
    custom_aa_walk.enable:set(true)
    custom_aa_air_duck.enable:set(true)

    custom_aa_stand.yaw_add_left:set(6)
    custom_aa_stand.yaw_add_right:set(6)
    custom_aa_stand.yaw_mod:set("Center")
    custom_aa_stand.yaw_degree:set(-66)
    custom_aa_stand.desync_freestand:set("off")
    custom_aa_stand.desync_on_shot:set("freestanding")
    custom_aa_stand.fake_options:set("jitter")
    custom_aa_stand.left_limit:set(60)
    custom_aa_stand.right_limit:set(60)

    custom_aa_move.yaw_add_left:set(0)
    custom_aa_move.yaw_add_right:set(0)
    custom_aa_move.yaw_mod:set("Center")
    custom_aa_move.yaw_degree:set(-72)
    custom_aa_move.desync_freestand:set("off")
    custom_aa_move.desync_on_shot:set("freestanding")
    custom_aa_move.fake_options:set("jitter")
    custom_aa_move.left_limit:set(60)
    custom_aa_move.right_limit:set(60)

    custom_aa_air.yaw_add_left:set(6)
    custom_aa_air.yaw_add_right:set(6)
    custom_aa_air.yaw_mod:set("center")
    custom_aa_air.yaw_degree:set(-66)
    custom_aa_air.desync_freestand:set("off")
    custom_aa_air.desync_on_shot:set("freestanding")
    custom_aa_air.fake_options:set("jitter")
    custom_aa_air.left_limit:set(60)
    custom_aa_air.right_limit:set(60)
    custom_aa_air.lby_mode:set("opposite")

    custom_aa_crouch.yaw_add_left:set(6)
    custom_aa_crouch.yaw_add_right:set(6)
    custom_aa_crouch.yaw_mod:set("Center")
    custom_aa_crouch.yaw_degree:set(-66)
    custom_aa_crouch.desync_on_shot:set("Switch")
    custom_aa_crouch.fake_options:set("jitter")
    custom_aa_crouch.left_limit:set(60)
    custom_aa_crouch.right_limit:set(60)

    custom_aa_walk.yaw_add_left:set(0)
    custom_aa_walk.yaw_add_right:set(0)
    custom_aa_walk.yaw_mod:set("center")
    custom_aa_walk.yaw_degree:set(-88)
    custom_aa_walk.desync_freestand:set("off")
    custom_aa_walk.desync_on_shot:set("freestanding")
    custom_aa_walk.fake_options:set("jitter")
    custom_aa_walk.left_limit:set(60)
    custom_aa_walk.right_limit:set(60)
    custom_aa_walk.lby_mode:set("opposite")

    custom_aa_air_duck.yaw_add_left:set(6)
    custom_aa_air_duck.yaw_add_right:set(6)
    custom_aa_air_duck.yaw_mod:set("center")
    custom_aa_air_duck.yaw_degree:set(-66)
    custom_aa_air_duck.desync_freestand:set("off")
    custom_aa_air_duck.desync_on_shot:set("freestanding")
    custom_aa_air_duck.fake_options:set("jitter")
    custom_aa_air_duck.left_limit:set(60)
    custom_aa_air_duck.right_limit:set(60)
end)

globalss:button("Discord server", function(link)
    panorama.SteamOverlayAPI.OpenExternalBrowserURL("https://discord.gg/eQRBcycFjH")
end)

function menu_hanlde()

    cur_cond:set_visible(presets:get() == "customs")
    custom_aa.yaw_add_left:set_visible(presets:get() == "customs" and cur_cond:get() == "global")
    custom_aa.yaw_add_right:set_visible(presets:get() == "customs" and cur_cond:get() == "global")
    custom_aa.yaw_degree:set_visible(presets:get() == "customs" and cur_cond:get() == "global")
    custom_aa.yaw_mod:set_visible(presets:get() == "customs" and cur_cond:get() == "global")
    custom_aa.fake_options:set_visible(presets:get() == "customs" and cur_cond:get() == "global")
    custom_aa.lby_mode:set_visible(presets:get() == "customs" and cur_cond:get() == "global")
    custom_aa.desync_freestand:set_visible(presets:get() == "customs" and cur_cond:get() == "global")
    custom_aa.desync_on_shot:set_visible(presets:get() == "customs" and cur_cond:get() == "global")
    custom_aa.left_limit:set_visible(presets:get() == "customs" and cur_cond:get() == "global")
    custom_aa.right_limit:set_visible(presets:get() == "customs" and cur_cond:get() == "global")

    custom_aa_stand.enable:set_visible(presets:get() == "customs" and cur_cond:get() == "standing")
    custom_aa_stand.yaw_add_left:set_visible(presets:get() == "customs" and cur_cond:get() == "standing")
    custom_aa_stand.yaw_add_right:set_visible(presets:get() == "customs" and cur_cond:get() == "standing")
    custom_aa_stand.yaw_degree:set_visible(presets:get() == "customs" and cur_cond:get() == "standing")
    custom_aa_stand.yaw_mod:set_visible(presets:get() == "customs" and cur_cond:get() == "standing")
    custom_aa_stand.fake_options:set_visible(presets:get() == "customs" and cur_cond:get() == "standing")
    custom_aa_stand.lby_mode:set_visible(presets:get() == "customs" and cur_cond:get() == "standing")
    custom_aa_stand.desync_freestand:set_visible(presets:get() == "customs" and cur_cond:get() == "standing")
    custom_aa_stand.desync_on_shot:set_visible(presets:get() == "customs" and cur_cond:get() == "standing")
    custom_aa_stand.left_limit:set_visible(presets:get() == "customs" and cur_cond:get() == "standing")
    custom_aa_stand.right_limit:set_visible(presets:get() == "customs" and cur_cond:get() == "standing")

    custom_aa_move.enable:set_visible(presets:get() == "customs" and cur_cond:get() == "moving")
    custom_aa_move.yaw_add_left:set_visible(presets:get() == "customs" and cur_cond:get() == "moving")
    custom_aa_move.yaw_add_right:set_visible(presets:get() == "customs" and cur_cond:get() == "moving")
    custom_aa_move.yaw_degree:set_visible(presets:get() == "customs" and cur_cond:get() == "moving")
    custom_aa_move.yaw_mod:set_visible(presets:get() == "customs" and cur_cond:get() == "moving")
    custom_aa_move.fake_options:set_visible(presets:get() == "customs" and cur_cond:get() == "moving")
    custom_aa_move.lby_mode:set_visible(presets:get() == "customs" and cur_cond:get() == "moving")
    custom_aa_move.desync_freestand:set_visible(presets:get() == "customs" and cur_cond:get() == "moving")
    custom_aa_move.desync_on_shot:set_visible(presets:get() == "customs" and cur_cond:get() == "moving")
    custom_aa_move.left_limit:set_visible(presets:get() == "customs" and cur_cond:get() == "moving")
    custom_aa_move.right_limit:set_visible(presets:get() == "customs" and cur_cond:get() == "moving")

    custom_aa_air.enable:set_visible(presets:get() == "customs" and cur_cond:get() == "air")
    custom_aa_air.yaw_add_left:set_visible(presets:get() == "customs" and cur_cond:get() == "air")
    custom_aa_air.yaw_add_right:set_visible(presets:get() == "customs" and cur_cond:get() == "air")
    custom_aa_air.yaw_degree:set_visible(presets:get() == "customs" and cur_cond:get() == "air")
    custom_aa_air.yaw_mod:set_visible(presets:get() == "customs" and cur_cond:get() == "air")
    custom_aa_air.fake_options:set_visible(presets:get() == "customs" and cur_cond:get() == "air")
    custom_aa_air.lby_mode:set_visible(presets:get() == "customs" and cur_cond:get() == "air")
    custom_aa_air.desync_freestand:set_visible(presets:get() == "customs" and cur_cond:get() == "air")
    custom_aa_air.desync_on_shot:set_visible(presets:get() == "customs" and cur_cond:get() == "air")
    custom_aa_air.left_limit:set_visible(presets:get() == "customs" and cur_cond:get() == "air")
    custom_aa_air.right_limit:set_visible(presets:get() == "customs" and cur_cond:get() == "air")

    custom_aa_crouch.enable:set_visible(presets:get() == "customs" and cur_cond:get() == "crouch")
    custom_aa_crouch.yaw_add_left:set_visible(presets:get() == "customs" and cur_cond:get() == "crouch")
    custom_aa_crouch.yaw_add_right:set_visible(presets:get() == "customs" and cur_cond:get() == "crouch")
    custom_aa_crouch.yaw_degree:set_visible(presets:get() == "customs" and cur_cond:get() == "crouch")
    custom_aa_crouch.yaw_mod:set_visible(presets:get() == "customs" and cur_cond:get() == "crouch")
    custom_aa_crouch.fake_options:set_visible(presets:get() == "customs" and cur_cond:get() == "crouch")
    custom_aa_crouch.lby_mode:set_visible(presets:get() == "customs" and cur_cond:get() == "crouch")
    custom_aa_crouch.desync_freestand:set_visible(presets:get() == "customs" and cur_cond:get() == "crouch")
    custom_aa_crouch.desync_on_shot:set_visible(presets:get() == "customs" and cur_cond:get() == "crouch")
    custom_aa_crouch.left_limit:set_visible(presets:get() == "customs" and cur_cond:get() == "crouch")
    custom_aa_crouch.right_limit:set_visible(presets:get() == "customs" and cur_cond:get() == "crouch")

    custom_aa_walk.enable:set_visible(presets:get() == "customs" and cur_cond:get() == "walk")
    custom_aa_walk.yaw_add_left:set_visible(presets:get() == "customs" and cur_cond:get() == "walk")
    custom_aa_walk.yaw_add_right:set_visible(presets:get() == "customs" and cur_cond:get() == "walk")
    custom_aa_walk.yaw_degree:set_visible(presets:get() == "customs" and cur_cond:get() == "walk")
    custom_aa_walk.yaw_mod:set_visible(presets:get() == "customs" and cur_cond:get() == "walk")
    custom_aa_walk.fake_options:set_visible(presets:get() == "customs" and cur_cond:get() == "walk")
    custom_aa_walk.lby_mode:set_visible(presets:get() == "customs" and cur_cond:get() == "walk")
    custom_aa_walk.desync_freestand:set_visible(presets:get() == "customs" and cur_cond:get() == "walk")
    custom_aa_walk.desync_on_shot:set_visible(presets:get() == "customs" and cur_cond:get() == "walk")
    custom_aa_walk.left_limit:set_visible(presets:get() == "customs" and cur_cond:get() == "walk")
    custom_aa_walk.right_limit:set_visible(presets:get() == "customs" and cur_cond:get() == "walk")

    custom_aa_air_duck.enable:set_visible(presets:get() == "customs" and cur_cond:get() == "air-crouching")
    custom_aa_air_duck.yaw_add_left:set_visible(presets:get() == "customs" and cur_cond:get() == "air-crouching")
    custom_aa_air_duck.yaw_add_right:set_visible(presets:get() == "customs" and cur_cond:get() == "air-crouching")
    custom_aa_air_duck.yaw_degree:set_visible(presets:get() == "customs" and cur_cond:get() == "air-crouching")
    custom_aa_air_duck.yaw_mod:set_visible(presets:get() == "customs" and cur_cond:get() == "air-crouching")
    custom_aa_air_duck.fake_options:set_visible(presets:get() == "customs" and cur_cond:get() == "air-crouching")
    custom_aa_air_duck.lby_mode:set_visible(presets:get() == "customs" and cur_cond:get() == "air-crouching")
    custom_aa_air_duck.desync_freestand:set_visible(presets:get() == "customs" and cur_cond:get() == "air-crouching")
    custom_aa_air_duck.desync_on_shot:set_visible(presets:get() == "customs" and cur_cond:get() == "air-crouching")
    custom_aa_air_duck.left_limit:set_visible(presets:get() == "customs" and cur_cond:get() == "air-crouching")
    custom_aa_air_duck.right_limit:set_visible(presets:get() == "customs" and cur_cond:get() == "air-crouching")
end

local ffi = require("ffi")
ffi.cdef[[

    typedef struct
    {
        float x;
        float y;
        float z;
    } Vector_t;
  
    int VirtualProtect(void* lpAddress, unsigned long dwSize, unsigned long flNewProtect, unsigned long* lpflOldProtect);
    void* VirtualAlloc(void* lpAddress, unsigned long dwSize, unsigned long  flAllocationType, unsigned long flProtect);
    int VirtualFree(void* lpAddress, unsigned long dwSize, unsigned long dwFreeType);
    typedef uintptr_t (__thiscall* GetClientEntity_4242425_t)(void*, int);

    typedef struct
    {
        char    pad0[0x60]; // 0x00
        void* pEntity; // 0x60
        void* pActiveWeapon; // 0x64
        void* pLastActiveWeapon; // 0x68
        float        flLastUpdateTime; // 0x6C
        int            iLastUpdateFrame; // 0x70
        float        flLastUpdateIncrement; // 0x74
        float        flEyeYaw; // 0x78
        float        flEyePitch; // 0x7C
        float        flGoalFeetYaw; // 0x80
        float        flLastFeetYaw; // 0x84
        float        flMoveYaw; // 0x88
        float        flLastMoveYaw; // 0x8C // changes when moving/jumping/hitting ground
        float        flLeanAmount; // 0x90
        char         pad1[0x4]; // 0x94
        float        flFeetCycle; // 0x98 0 to 1
        float        flMoveWeight; // 0x9C 0 to 1
        float        flMoveWeightSmoothed; // 0xA0
        float        flDuckAmount; // 0xA4
        float        flHitGroundCycle; // 0xA8
        float        flRecrouchWeight; // 0xAC
        Vector_t        vecOrigin; // 0xB0
        Vector_t        vecLastOrigin;// 0xBC
        Vector_t        vecVelocity; // 0xC8
        Vector_t        vecVelocityNormalized; // 0xD4
        Vector_t        vecVelocityNormalizedNonZero; // 0xE0
        float        flVelocityLenght2D; // 0xEC
        float        flJumpFallVelocity; // 0xF0
        float        flSpeedNormalized; // 0xF4 // clamped velocity from 0 to 1
        float        flRunningSpeed; // 0xF8
        float        flDuckingSpeed; // 0xFC
        float        flDurationMoving; // 0x100
        float        flDurationStill; // 0x104
        bool        bOnGround; // 0x108
        bool        bHitGroundAnimation; // 0x109
        char    pad2[0x2]; // 0x10A
        float        flNextLowerBodyYawUpdateTime; // 0x10C
        float        flDurationInAir; // 0x110
        float        flLeftGroundHeight; // 0x114
        float        flHitGroundWeight; // 0x118 // from 0 to 1, is 1 when standing
        float        flWalkToRunTransition; // 0x11C // from 0 to 1, doesnt change when walking or crouching, only running
        char    pad3[0x4]; // 0x120
        float        flAffectedFraction; // 0x124 // affected while jumping and running, or when just jumping, 0 to 1
        char    pad4[0x208]; // 0x128
        float        flMinBodyYaw; // 0x330
        float        flMaxBodyYaw; // 0x334
        float        flMinPitch; //0x338
        float        flMaxPitch; // 0x33C
        int            iAnimsetVersion; // 0x340
    } CCSGOPlayerAnimationState_534535_t;

]]

entity_list_pointer = ffi.cast('void***', utils.create_interface('client.dll', 'VClientEntityList003'))
get_client_entity_fn = ffi.cast('GetClientEntity_4242425_t', entity_list_pointer[0][3])
function get_entity_address(ent_index)
    local addr = get_client_entity_fn(entity_list_pointer, ent_index)
    return addr
end

hook_helper = {
    copy = function(dst, src, len)
    return ffi.copy(ffi.cast('void*', dst), ffi.cast('const void*', src), len)
    end,

    virtual_protect = function(lpAddress, dwSize, flNewProtect, lpflOldProtect)
    return ffi.C.VirtualProtect(ffi.cast('void*', lpAddress), dwSize, flNewProtect, lpflOldProtect)
    end,

    virtual_alloc = function(lpAddress, dwSize, flAllocationType, flProtect, blFree)
    local alloc = ffi.C.VirtualAlloc(lpAddress, dwSize, flAllocationType, flProtect)
    if blFree then
        table.insert(buff.free, function()
        ffi.C.VirtualFree(alloc, 0, 0x8000)
        end)
    end
    return ffi.cast('intptr_t', alloc)
end
}

buff = {free = {}}
vmt_hook = {hooks = {}}

function vmt_hook.new(vt)
    local new_hook = {}
    local org_func = {}
    local old_prot = ffi.new('unsigned long[1]')
    local virtual_table = ffi.cast('intptr_t**', vt)[0]

    new_hook.this = virtual_table
    new_hook.hookMethod = function(cast, func, method)
    org_func[method] = virtual_table[method]
    hook_helper.virtual_protect(virtual_table + method, 4, 0x4, old_prot)

    virtual_table[method] = ffi.cast('intptr_t', ffi.cast(cast, func))
    hook_helper.virtual_protect(virtual_table + method, 4, old_prot[0], old_prot)

    return ffi.cast(cast, org_func[method])
end

new_hook.unHookMethod = function(method)
    hook_helper.virtual_protect(virtual_table + method, 4, 0x4, old_prot)
    local alloc_addr = hook_helper.virtual_alloc(nil, 5, 0x1000, 0x40, false)
    local trampoline_bytes = ffi.new('uint8_t[?]', 5, 0x90)

    trampoline_bytes[0] = 0xE9
    ffi.cast('int32_t*', trampoline_bytes + 1)[0] = org_func[method] - tonumber(alloc_addr) - 5

    hook_helper.copy(alloc_addr, trampoline_bytes, 5)
    virtual_table[method] = ffi.cast('intptr_t', alloc_addr)

    hook_helper.virtual_protect(virtual_table + method, 4, old_prot[0], old_prot)
    org_func[method] = nil
end

new_hook.unHookAll = function()
    for method, func in pairs(org_func) do
        new_hook.unHookMethod(method)
    end
end

table.insert(vmt_hook.hooks, new_hook.unHookAll)
    return new_hook
end

local function in_air2()
    local localplayer = entity.get_local_player()
    local b = entity.get_local_player()
        if b == nil then
            return
        end
    local flags = localplayer["m_fFlags"]
  
    if bit.band(flags, 1) == 0 then
        return true
    end
  
    return false
end

events.shutdown:set(function()
    for _, reset_function in ipairs(vmt_hook.hooks) do
        reset_function()
    end
end)

hooked_function = nil
ground_ticks, end_time = 1, 0
function updateCSA_hk(thisptr, edx)
    if entity.get_local_player() == nil or ffi.cast('uintptr_t', thisptr) == nil then return end
    if anim_breakers:get("Follow direction") then
        ffi.cast('float*', ffi.cast('uintptr_t', thisptr) + 10104)[0] = 1
        var.legmovement:set('Sliding')
    end
    hooked_function(thisptr, edx)
    if anim_breakers:get("Static legs in air") then
        ffi.cast('float*', ffi.cast('uintptr_t', thisptr) + 10104)[6] = 1
    end
end

function anim_state_hook()
    local local_player = entity.get_local_player()
    if not local_player then return end

    local local_player_ptr = get_entity_address(local_player:get_index())
    if not local_player_ptr or hooked_function then return end
    local C_CSPLAYER = vmt_hook.new(local_player_ptr)
    hooked_function = C_CSPLAYER.hookMethod('void(__fastcall*)(void*, void*)', updateCSA_hk, 224)
end

events.render:set(menu_hanlde)
events.createmove_run:set(anim_state_hook)
events.createmove:set(antiaims)
for k, v = 1, states do
для каво?
 
Забаненный
Статус
Оффлайн
Регистрация
23 Авг 2020
Сообщения
2,110
Реакции[?]
597
Поинты[?]
10K
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
Пользователь
Статус
Оффлайн
Регистрация
3 Июл 2021
Сообщения
825
Реакции[?]
93
Поинты[?]
10K
дерьмо ебаное, удаляй
для тебя так, а для изучающих соидет
Код:
local function in_air2()
    local localplayer = entity.get_local_player()
    local b = entity.get_local_player()
        if b == nil then
            return
        end
    local flags = localplayer["m_fFlags"]
  
    if bit.band(flags, 1) == 0 then
        return true
    end
  
    return false
end
эксперементировал
 
Пользователь
Статус
Оффлайн
Регистрация
28 Янв 2020
Сообщения
244
Реакции[?]
80
Поинты[?]
7K
code_language.lua:
local custom_aa = {
    yaw_add_left = aa_a:slider("Left Yaw Add", -180, 180, 0, ""),
    yaw_add_right = aa_a:slider("Right Yaw Add", -180, 180, 0, ""),
    yaw_mod = aa_a:combo("Yaw Modifier", {"Disabled","Center", "Offset", "Random", "Spin"}, 0, ""),
    yaw_degree = aa_a:slider("Modifier Degree", -180, 180, 0, ""),
    fake_options = aa_a:selectable("Fake Options", {"Avoid Overlap", "Jitter", "Randomize Jitter", "Anti Bruteforce"}, 0, ""),
    lby_mode = aa_a:combo("LBY Mode", {"Disabled","Opposite","Sway"}, 0, ""),
    desync_freestand = aa_a:combo("Freestanding", {"Off","Fake","Real"}, 0, ""),
    desync_on_shot = aa_a:combo("Onshot", {"Default","Opposite","Freestanding","Switch"  }, 0, ""),
    left_limit = aa_a:slider("Fake Left Limit", 0, 60, 0, ""),
    right_limit = aa_a:slider("Fake Right Limit", 0, 60, 0, ""),
}

local custom_aa_stand = {
    enable = aa_a:switch("Override Stand"),
    yaw_add_left = aa_a:slider("[S] Left Yaw Add", -180, 180, 0, ""),
    yaw_add_right = aa_a:slider("[S] Right Yaw Add", -180, 180, 0, ""),
    yaw_mod = aa_a:combo("[S] Yaw Modifier", {"Disabled","Center", "Offset", "Random", "Spin"}, 0, ""),
    yaw_degree = aa_a:slider("[S] Modifier Degree", -180, 180, 0, ""),
    fake_options = aa_a:selectable("[S] Fake Options", {"Avoid Overlap", "Jitter", "Randomize Jitter", "Anti Bruteforce"}, 0, ""),
    lby_mode = aa_a:combo("[S] LBY Mode", {"Disabled","Opposite","Sway"}, 0, ""),
    desync_freestand = aa_a:combo("[S] Freestanding", {"Off","Fake","Real"}, 0, ""),
    desync_on_shot = aa_a:combo("[S] Onshot", {"Default","Opposite","Freestanding","Switch"  }, 0, ""),
    left_limit = aa_a:slider("[S] Fake Left Limit", 0, 60, 0, ""),
    right_limit = aa_a:slider("[S] Fake Right Limit", 0, 60, 0, ""),
}

local custom_aa_move = {
    enable = aa_a:switch("Override Move"),
    yaw_add_left = aa_a:slider("[M] Left Yaw Add", -180, 180, 0, ""),
    yaw_add_right = aa_a:slider("[M] Right Yaw Add", -180, 180, 0, ""),
    yaw_mod = aa_a:combo("[M] Yaw Modifier", {"Disabled","Center", "Offset", "Random", "Spin"}, 0, ""),
    yaw_degree = aa_a:slider("[M] Modifier Degree", -180, 180, 0, ""),
    fake_options = aa_a:selectable("[M] Fake Options", {"Avoid Overlap", "Jitter", "Randomize Jitter", "Anti Bruteforce"}, 0, ""),
    lby_mode = aa_a:combo("[M] LBY Mode", {"Disabled","Opposite","Sway"}, 0, ""),
    desync_freestand = aa_a:combo("[M] Freestanding", {"Off","Fake","Real"}, 0, ""),
    desync_on_shot = aa_a:combo("[M] Onshot", {"Default","Opposite","Freestanding","Switch"  }, 0, ""),
    left_limit = aa_a:slider("[M] Fake Left Limit", 0, 60, 0, ""),
    right_limit = aa_a:slider("[M] Fake Right Limit", 0, 60, 0, ""),
}

local custom_aa_air = {
    enable = aa_a:switch("Override Air"),
    yaw_add_left = aa_a:slider("[A] Left Yaw Add", -180, 180, 0, ""),
    yaw_add_right = aa_a:slider("[A] Right Yaw Add", -180, 180, 0, ""),
    yaw_mod = aa_a:combo("[A] Yaw Modifier", {"Disabled","Center", "Offset", "Random", "Spin"}, 0, ""),
    yaw_degree = aa_a:slider("[A] Modifier Degree", -180, 180, 0, ""),
    fake_options = aa_a:selectable("[A] Fake Options", {"Avoid Overlap", "Jitter", "Randomize Jitter", "Anti Bruteforce"}, 0, ""),
    lby_mode = aa_a:combo("[A] LBY Mode", {"Disabled","Opposite","Sway"}, 0, ""),
    desync_freestand = aa_a:combo("[A] Freestanding", {"Off","Fake","Real"}, 0, ""),
    desync_on_shot = aa_a:combo("[A] Onshot", {"Default","Opposite","Freestanding","Switch"  }, 0, ""),
    left_limit = aa_a:slider("[A] Fake Left Limit", 0, 60, 0, ""),
    right_limit = aa_a:slider("[A] Fake Right Limit", 0, 60, 0, ""),
}

local custom_aa_crouch = {
    enable = aa_a:switch("Override Crouch"),
    yaw_add_left = aa_a:slider("[C] Left Yaw Add", -180, 180, 0, ""),
    yaw_add_right = aa_a:slider("[C] Right Yaw Add", -180, 180, 0, ""),
    yaw_mod = aa_a:combo("[C] Yaw Modifier", {"Disabled","Center", "Offset", "Random", "Spin"}, 0, ""),
    yaw_degree = aa_a:slider("[C] Modifier Degree", -180, 180, 0, ""),
    fake_options = aa_a:selectable("[C] Fake Options", {"Avoid Overlap", "Jitter", "Randomize Jitter", "Anti Bruteforce"}, 0, ""),
    lby_mode = aa_a:combo("[C] LBY Mode", {"Disabled","Opposite","Sway"}, 0, ""),
    desync_freestand = aa_a:combo("[C] Freestanding", {"Off","Fake","Real"}, 0, ""),
    desync_on_shot = aa_a:combo("[C] Onshot", {"Default","Opposite","Freestanding","Switch"  }, 0, ""),
    left_limit = aa_a:slider("[C] Fake Left Limit", 0, 60, 0, ""),
    right_limit = aa_a:slider("[C] Fake Right Limit", 0, 60, 0, ""),
}

local custom_aa_walk = {
    enable = aa_a:switch("Override Walk"),
    yaw_add_left = aa_a:slider("[W] Left Yaw Add", -180, 180, 0, ""),
    yaw_add_right = aa_a:slider("[W] Right Yaw Add", -180, 180, 0, ""),
    yaw_mod = aa_a:combo("[W] Yaw Modifier", {"Disabled","Center", "Offset", "Random", "Spin"}, 0, ""),
    yaw_degree = aa_a:slider("[W] Modifier Degree", -180, 180, 0, ""),
    fake_options = aa_a:selectable("[W] Fake Options", {"Avoid Overlap", "Jitter", "Randomize Jitter", "Anti Bruteforce"}, 0, ""),
    lby_mode = aa_a:combo("[W] LBY Mode", {"Disabled","Opposite","Sway"}, 0, ""),
    desync_freestand = aa_a:combo("[W] Freestanding", {"Off","Fake","Real"}, 0, ""),
    desync_on_shot = aa_a:combo("[W] Onshot", {"Default","Opposite","Freestanding","Switch"  }, 0, ""),
    left_limit = aa_a:slider("[W] Fake Left Limit", 0, 60, 0, ""),
    right_limit = aa_a:slider("[W] Fake Right Limit", 0, 60, 0, ""),
}

local custom_aa_air_duck = {
    enable = aa_a:switch("Override Air+Crouch"),
    yaw_add_left = aa_a:slider("[A+C] Left Yaw Add", -180, 180, 0, ""),
    yaw_add_right = aa_a:slider("[A+C] Right Yaw Add", -180, 180, 0, ""),
    yaw_mod = aa_a:combo("[A+C] Yaw Modifier", {"Disabled","Center", "Offset", "Random", "Spin"}, 0, ""),
    yaw_degree = aa_a:slider("[A+C] Modifier Degree", -180, 180, 0, ""),
    fake_options = aa_a:selectable("[A+C] Fake Options", {"Avoid Overlap", "Jitter", "Randomize Jitter", "Anti Bruteforce"}, 0, ""),
    lby_mode = aa_a:combo("[A+C] LBY Mode", {"Disabled","Opposite","Sway"}, 0, ""),
    desync_freestand = aa_a:combo("[A+C] Freestanding", {"Off","Fake","Real"}, 0, ""),
    desync_on_shot = aa_a:combo("[A+C] Onshot", {"Default","Opposite","Freestanding","Switch"  }, 0, ""),
    left_limit = aa_a:slider("[A+C] Fake Left Limit", 0, 60, 0, ""),
    right_limit = aa_a:slider("[A+C] Fake Right Limit", 0, 60, 0, ""),
}
ебать мой хуй вселенная..
Хватит пожалуй на сегодня интернета...
я две вещи понять не могу
Для вас библиотеки шутка?
Пожалуйста, авторизуйтесь для просмотра ссылки.
Конфиги с буфера такой ущерб. Нахуя?
code_language.lua:
function antiaims(cmd)
    local get_local_player = entity.get_local_player()
    if get_local_player == nil then return end
    local weapon = get_local_player:get_player_weapon()
    if weapon == nil then return end

    bInverter = not bInverter;
    yaw_add = 0

    --lunarity-yaw
    if presets:get() == "lunarity-yaw" then
        --stand
        if (in_air(get_local_player) == false and is_crouching(get_local_player) == false and var.walk:get() == false and get_velocity(get_local_player) < 3) then
            yaw_add = bInverter and -26 or 26
            var.pitch:override("Down")
            var.yaw_mod:override("Center")
            var.at_target:override("At target")
            var.body_yaw:override(true)
            var.left_limit:override(60)
            var.right_limit:override(60)
            var.options:override("jitter")
            var.freestanding_desync:override("off")
            var.on_shot:override("freestanding")
            var.lby:override("opposite")
            var.offset:override(bInverter and -26 or 26)
            var.yaw_offset:override(35)
        end
        --duck
        if (in_air(get_local_player) == false and is_crouching(get_local_player)) then
            yaw_add = bInverter and -24 or 22
            var.pitch:override("Down")
            var.yaw_mod:override("Center")
            var.at_target:override("At target")
            var.body_yaw:override(true)
            var.left_limit:override(60)
            var.right_limit:override(60)
            var.options:override("jitter")
            var.freestanding_desync:override("off")
            var.on_shot:override("freestanding")
            var.lby:override("opposite")
            var.offset:override(bInverter and -22 or 22)
            var.yaw_offset:override(42)
        end
        --air
        if (in_air(get_local_player) and is_crouching(get_local_player) == false) then
            yaw_add = bInverter and -20 or 22
            var.pitch:override("Down")
            var.yaw_mod:override("Center")
            var.at_target:override("At target")
            var.body_yaw:override(true)
            var.left_limit:override(60)
            var.right_limit:override(60)
            var.options:override("jitter")
            var.freestanding_desync:override("off")
            var.on_shot:override("freestanding")
            var.lby:override("opposite")
            var.offset:override(bInverter and -20 or 22)
            var.yaw_offset:override(32)
        end
        --move
        if (in_air(get_local_player) == false and is_crouching(get_local_player) == false and var.walk:get() == false and get_velocity(get_local_player) > 3) then
            yaw_add = bInverter and -24 or 22
            var.pitch:override("Down")
            var.yaw_mod:override("Center")
            var.at_target:override("At target")
            var.body_yaw:override(true)
            var.left_limit:override(60)
            var.right_limit:override(60)
            var.options:override("jitter")
            var.freestanding_desync:override("off")
            var.on_shot:override("freestanding")
            var.lby:override("opposite")
            var.offset:override(bInverter and -24 or 22)
            var.yaw_offset:override(32)
        end
        --air+duck
        if (in_air(get_local_player) and is_crouching(get_local_player)) then
            yaw_add = bInverter and -7 or 12
            var.pitch:override("Down")
            var.yaw_mod:override("Center")
            var.at_target:override("At target")
            var.body_yaw:override(true)
            var.left_limit:override(60)
            var.right_limit:override(60)
            var.options:override("jitter")
            var.freestanding_desync:override("off")
            var.on_shot:override("freestanding")
            var.lby:override("opposite")
            var.offset:override(bInverter and -7 or 12)
            var.yaw_offset:override(60)
        end
        --walk
        if (in_air(get_local_player) == false and is_crouching(get_local_player) == false and var.walk:get()) then
            yaw_add = bInverter and -24 or 22
            var.pitch:override("Down")
            var.yaw_mod:override("Center")
            var.at_target:override("At target")
            var.body_yaw:override(true)
            var.left_limit:override(60)
            var.right_limit:override(60)
            var.options:override("jitter")
            var.freestanding_desync:override("off")
            var.on_shot:override("freestanding")
            var.lby:override("opposite")
            var.offset:override(bInverter and -24 or 22)
            var.yaw_offset:override(32)
        end
    end
    if presets:get() == "customs" then
        yaw_add = bInverter and custom_aa.yaw_add_left:get() or custom_aa.yaw_add_right:get()
        var.pitch:override("Down")
        var.yaw_mod:override(custom_aa.yaw_mod:get())
        var.body_yaw:override(true)
        var.left_limit:override(custom_aa.left_limit:get())
        var.right_limit:override(custom_aa.right_limit:get())
        var.options:override(custom_aa.fake_options:get())
        var.freestanding_desync:override(custom_aa.desync_freestand:get())
        var.on_shot:override(custom_aa.desync_on_shot:get())
        var.lby:override(custom_aa.lby_mode:get())
        var.offset:override(bInverter and custom_aa.yaw_add_left:get() or custom_aa.yaw_add_right:get())
        var.yaw_offset:override(custom_aa.yaw_degree:get())
   
        if custom_aa_stand.enable:get() and (in_air(get_local_player) == false and is_crouching(get_local_player) == false and var.walk:get() == false and get_velocity(get_local_player) < 3) then
            yaw_add = bInverter and custom_aa_stand.yaw_add_left:get() or custom_aa_stand.yaw_add_right:get()
            var.pitch:override("Down")
            var.yaw_mod:override(custom_aa_stand.yaw_mod:get())
            var.body_yaw:override(true)
            var.left_limit:override(custom_aa_stand.left_limit:get())
            var.right_limit:override(custom_aa_stand.right_limit:get())
            var.options:override(custom_aa_stand.fake_options:get())
            var.freestanding_desync:override(custom_aa_stand.desync_freestand:get())
            var.on_shot:override(custom_aa_stand.desync_on_shot:get())
            var.lby:override(custom_aa_stand.lby_mode:get())
            var.offset:override(bInverter and custom_aa_stand.yaw_add_left:get() or custom_aa_stand.yaw_add_right:get())
            var.yaw_offset:override(custom_aa_stand.yaw_degree:get())
        end
        if custom_aa_move.enable:get() and (in_air(get_local_player) == false and is_crouching(get_local_player) == false and var.walk:get() == false and get_velocity(get_local_player) > 3) then
            yaw_add = bInverter and custom_aa_move.yaw_add_left:get() or custom_aa_move.yaw_add_right:get()
            var.pitch:override("Down")
            var.yaw_mod:override(custom_aa_move.yaw_mod:get())
            var.body_yaw:override(true)
            var.left_limit:override(custom_aa_move.left_limit:get())
            var.right_limit:override(custom_aa_move.right_limit:get())
            var.options:override(custom_aa_move.fake_options:get())
            var.freestanding_desync:override(custom_aa_move.desync_freestand:get())
            var.on_shot:override(custom_aa_move.desync_on_shot:get())
            var.lby:override(custom_aa_move.lby_mode:get())
            var.offset:override(bInverter and custom_aa_move.yaw_add_left:get() or custom_aa_move.yaw_add_right:get())
            var.yaw_offset:override(custom_aa_move.yaw_degree:get())
        end
        if custom_aa_air.enable:get() and (in_air(get_local_player) and is_crouching(get_local_player) == false) then
            yaw_add = bInverter and custom_aa_air.yaw_add_left:get() or custom_aa_air.yaw_add_right:get()
            var.pitch:override("Down")
            var.yaw_mod:override(custom_aa_air.yaw_mod:get())
            var.body_yaw:override(true)
            var.left_limit:override(custom_aa_air.left_limit:get())
            var.right_limit:override(custom_aa_air.right_limit:get())
            var.options:override(custom_aa_air.fake_options:get())
            var.freestanding_desync:override(custom_aa_air.desync_freestand:get())
            var.on_shot:override(custom_aa_air.desync_on_shot:get())
            var.lby:override(custom_aa_air.lby_mode:get())
            var.offset:override(bInverter and custom_aa_air.yaw_add_left:get() or custom_aa_air.yaw_add_right:get())
            var.yaw_offset:override(custom_aa_air.yaw_degree:get())
        end
        if custom_aa_crouch.enable:get() and (in_air(get_local_player) == false and is_crouching(get_local_player)) then
            yaw_add = bInverter and custom_aa_crouch.yaw_add_left:get() or custom_aa_crouch.yaw_add_right:get()
            var.pitch:override("Down")
            var.yaw_mod:override(custom_aa_crouch.yaw_mod:get())
            var.body_yaw:override(true)
            var.left_limit:override(custom_aa_crouch.left_limit:get())
            var.right_limit:override(custom_aa_crouch.right_limit:get())
            var.options:override(custom_aa_crouch.fake_options:get())
            var.freestanding_desync:override(custom_aa_crouch.desync_freestand:get())
            var.on_shot:override(custom_aa_crouch.desync_on_shot:get())
            var.lby:override(custom_aa_crouch.lby_mode:get())
            var.offset:override(bInverter and custom_aa_crouch.yaw_add_left:get() or custom_aa_crouch.yaw_add_right:get())
            var.yaw_offset:override(custom_aa_crouch.yaw_degree:get())
        end
        if custom_aa_walk.enable:get() and (in_air(get_local_player) == false and is_crouching(get_local_player) == false and var.walk:get()) then
            yaw_add = bInverter and custom_aa_walk.yaw_add_left:get() or custom_aa_walk.yaw_add_right:get()
            var.pitch:override("Down")
            var.yaw_mod:override(custom_aa_walk.yaw_mod:get())
            var.body_yaw:override(true)
            var.left_limit:override(custom_aa_walk.left_limit:get())
            var.right_limit:override(custom_aa_walk.right_limit:get())
            var.options:override(custom_aa_walk.fake_options:get())
            var.freestanding_desync:override(custom_aa_walk.desync_freestand:get())
            var.on_shot:override(custom_aa_walk.desync_on_shot:get())
            var.lby:override(custom_aa_walk.lby_mode:get())
            var.offset:override(bInverter and custom_aa_walk.yaw_add_left:get() or custom_aa_walk.yaw_add_right:get())
            var.yaw_offset:override(custom_aa_walk.yaw_degree:get())
        end
        if custom_aa_air_duck.enable:get() and (in_air(get_local_player) and is_crouching(get_local_player)) then
            yaw_add = bInverter and custom_aa_air_duck.yaw_add_left:get() or custom_aa_air_duck.yaw_add_right:get()
            var.pitch:override("Down")
            var.yaw_mod:override(custom_aa_air_duck.yaw_mod:get())
            var.body_yaw:override(true)
            var.left_limit:override(custom_aa_air_duck.left_limit:get())
            var.right_limit:override(custom_aa_air_duck.right_limit:get())
            var.options:override(custom_aa_air_duck.fake_options:get())
            var.freestanding_desync:override(custom_aa_air_duck.desync_freestand:get())
            var.on_shot:override(custom_aa_air_duck.desync_on_shot:get())
            var.lby:override(custom_aa_air_duck.lby_mode:get())
            var.offset:override(bInverter and custom_aa_air_duck.yaw_add_left:get() or custom_aa_air_duck.yaw_add_right:get())
            var.yaw_offset:override(custom_aa_air_duck.yaw_degree:get())
        end
    end
    if(base:get() == "Disabled") then
        var.yaw:override("Disabled")
        var.offset:override(0 + yaw_add)
        var.at_target:override("Local View")
        var.freestanding:override(false)
    elseif(base:get() == "Left") then
        var.yaw:override("Backward")
        var.offset:override(-90 + yaw_add)
        var.at_target:override("Local View")
        var.freestanding:override(false)
    elseif(base:get() == "Right") then
        var.yaw:override("Backward")
        var.offset:override(90 + yaw_add)
        var.at_target:override("Local View")
        var.freestanding:override(false)
    elseif(base:get() == "Backward") then
        var.yaw:override("Backward")
        var.offset:override(0 + yaw_add)
        var.at_target:override("Local View")
        var.freestanding:override(false)
    elseif(base:get() == "At Target") then
        var.yaw:override("Backward")
        var.offset:override(0 + yaw_add)
        var.at_target:override("At Target")
        var.freestanding:override(false)
    elseif(base:get() == "Freestanding") then
        var.yaw:override("Backward")
        var.at_target:override("At Target")
        var.freestanding:set(false)
        var.freestanding:override(true)
    elseif(base:get() == "Forward") then
        var.yaw:override("Backward")
        var.offset:override(180 + yaw_add)
        var.at_target:override("Local View")
        var.freestanding:override(false)
    end
end
Как креститься парни?
эксперементировал
Скорее на вере в бога делал
для тебя так, а для изучающих соидет
Сойдет только для 8-летних гениев как ты.
Вывод:Иди нахуй?(это не 2.1 это вопрос), 122 тонны говна, удаляй
дерьмо ебаное, удаляй
ты уточняй какого объёма говно
Считаем:
общее количество строк = 996
1 строка shitкода = 2 целых 45 сотых ( центнер )
общее количество shitкода = 500+
[1] 500 * 2,45 = 1225 - общая масса говна в центнерах
[2 - переводим в КГ] 1225 * 100 = 122500 - общая масса говна в килограммах
Ответ:122500+ килограмм говна
 
Последнее редактирование:
Пользователь
Статус
Оффлайн
Регистрация
3 Июл 2021
Сообщения
825
Реакции[?]
93
Поинты[?]
10K
ебать мой хуй вселенная..
Хватит пожалуй на сегодня интернета...

я две вещи понять не могу
Для вас библиотеки шутка?
Пожалуйста, авторизуйтесь для просмотра ссылки.
Конфиги с буфера такой ущерб. Нахуя?

Как креститься парни?

Скорее на вере в бога делал

Сойдет только для 8-летних гениев как ты.
Вывод:Иди нахуй?(это не 2.1 это вопрос), 122 тонны говна, удаляй

ты уточняй какого объёма говно
Считаем:
общее количество строк = 996
1 строка shitкода = 2 целых 45 сотых ( центнер )
общее количество shitкода = 500+
[1] 500 * 2,45 = 1225 - общая масса говна в центнерах
[2 - переводим в КГ] 1225 * 100 = 122500 - общая масса говна в килограммах
Ответ:122500+ килограмм говна
ну и времений у тебя лишнего много чел, кому надо тот будет использовать, в ты прежде чем что-то писать представь свой работы(если их вобще есть) а после пиши что-то( в теме я уже предупреждал что делал это когда только вышел в3 с новым апи и я изучал его, что тебе за фрии не нравится, как по мне идеальный вариянт изучить как работает аа система и как ее вобще делать(просто других нету)
рекодни плиз аситеч под нови апдейт нла
это моя самая первая работа, а больше мне нечего сливать то что мне не жалко
 
Эксперт
Статус
Оффлайн
Регистрация
19 Дек 2018
Сообщения
2,957
Реакции[?]
492
Поинты[?]
1K
ты уточняй какого объёма говно
Считаем:
общее количество строк = 996
1 строка shitкода = 2 целых 45 сотых ( центнер )
общее количество shitкода = 500+
[1] 500 * 2,45 = 1225 - общая масса говна в центнерах
[2 - переводим в КГ] 1225 * 100 = 122500 - общая масса говна в килограммах
Ответ:122500+ килограмм говна
Ты долбаёб?
 
Пользователь
Статус
Оффлайн
Регистрация
28 Янв 2020
Сообщения
244
Реакции[?]
80
Поинты[?]
7K
ну и времений у тебя лишнего много чел, кому надо тот будет использовать, в ты прежде чем что-то писать представь свой работы(если их вобще есть) а после пиши что-то( в теме я уже предупреждал что делал это когда только вышел в3 с новым апи и я изучал его, что тебе за фрии не нравится, как по мне идеальный вариянт изучить как работает аа система и как ее вобще делать(просто других нету)
КОМУ ЭТО ПОНАДОБИТЬСЯ БЛЯТЬ? :NotLikeThis:
Причём нахуй тут мои работы?:FailFish:
Скажи на милость кому нахуй понадобиться скрипт где блять у каждого condition'a свой массив сука...

в теме я уже предупреждал что делал это когда только вышел в3 с новым апи и я изучал его, что тебе за фрии не нравится, как по мне идеальный вариянт изучить как работает аа система и как ее вобще делать(просто других нету)
Интересный ты кадр блять:roflanPominki:
И бесплатных скриптов есть дохуище и дохуя лучше твоего shitкода

Да.
 
Пользователь
Статус
Оффлайн
Регистрация
3 Июл 2021
Сообщения
825
Реакции[?]
93
Поинты[?]
10K
КОМУ ЭТО ПОНАДОБИТЬСЯ БЛЯТЬ? :NotLikeThis:
Причём нахуй тут мои работы?:FailFish:
Скажи на милость кому нахуй понадобиться скрипт где блять у каждого condition'a свой массив сука...


Интересный ты кадр блять:roflanPominki:
И бесплатных скриптов есть дохуище и дохуя лучше твоего shitкода


Да.
надо челам которые только только начинают изучать луа в нл, челам которые хотят сделать свой скрипт, а твой работы тут притом что ты осуждаеш а сам ничего не предлогаеш.
 
Пользователь
Статус
Оффлайн
Регистрация
28 Янв 2020
Сообщения
244
Реакции[?]
80
Поинты[?]
7K
надо челам которые только только начинают изучать луа в нл, челам которые хотят сделать свой скрипт, а твой работы тут притом что ты осуждаеш а сам ничего не предлогаеш.
СУКА Инсульт с тобой схвачу.
Нахуй мне предлагать что то?
Я ничего не должен :roflanPominki:
Изучать луа в нл, что то новое:FeelsBadMan:
В чём проблема использовать пейрс/ипейрс?
Для тебя исключение сделаю.
code_language.lua:
local aui = require "neverlose/aui"
local condition = {} -- создаём пустую таблицу
aa_states = {"Disabled", "Global", "Standing", "Moving", "Slow-Walk", "Crouch", "In-Air"}
for k, v in pairs(aa_states) do
    condition[k] = { -- создаём переменную заносим в неё таблицу.
        enable = aui.switch({"test", "test"}, "Override " .. aa_states[k]),
    }
end
 
Пользователь
Статус
Оффлайн
Регистрация
3 Июл 2021
Сообщения
825
Реакции[?]
93
Поинты[?]
10K
СУКА Инсульт с тобой схвачу.
Нахуй мне предлагать что то?
Я ничего не должен :roflanPominki:
Изучать луа в нл, что то новое:FeelsBadMan:
В чём проблема использовать пейрс/ипейрс?
Для тебя исключение сделаю.
code_language.lua:
local aui = require "neverlose/aui"
local condition = {} -- создаём пустую таблицу
aa_states = {"Disabled", "Global", "Standing", "Moving", "Slow-Walk", "Crouch", "In-Air"}
for k, v in pairs(aa_states) do
    condition[k] = { -- создаём переменную заносим в неё таблицу.
        enable = aui.switch({"test", "test"}, "Override " .. aa_states[k]),
    }
end
я выше написал что писал когда изучал, хватит доебыватся я бесплатно сливаю
 
Пользователь
Статус
Оффлайн
Регистрация
28 Янв 2020
Сообщения
244
Реакции[?]
80
Поинты[?]
7K
я выше написал что писал когда изучал, хватит доебыватся я бесплатно сливаю
что делал это когда только вышел в3 с новым апи и я изучал его,
КАК НАХУЙ СВЯЗАНО ИЗУЧЕНИЕ АПИ БЛЯТЬ И ФУНКЦИЯ pairs()? ОБЬЯСНИ НАХУЙ
"поцыки, поцыки! Я его остановил!"
 
Последнее редактирование:
Сверху Снизу