Crack Lua Neverlose killaura.lua src leak

Забаненный
Статус
Оффлайн
Регистрация
16 Фев 2022
Сообщения
51
Реакции[?]
27
Поинты[?]
0
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.

Данный скрипт не проверялся модераторами, так как является кряком приватной LUA и в нём может присутствовать обфускация. Даже известные пользователи могут выложить вредоносный скрипт под видом крякнутого, поэтому любое использование исключительно на свой страх и риск.

Ну вот и все, k1mbor#1052 - не имейте никаких связей с этим человеком
Credits: Hellfish#9343
strexxter#1234 прости, ты крут <3

Код:
--- @region: all math & vector * other operations
local math = {
    abs = math.abs, ceil = math.ceil, cos = math.cos, deg = math.deg, floor = math.floor, huge = math.huge, max = math.max, min = math.min, pi = math.pi,
    modf = math.modf, rad = math.rad, pow = math.pow, random = math.random, sin = math.sin, sqrt = math.sqrt, acos = math.acos, atan = math.atan,
    atan2 = math.atan2, log = math.log, fmod = math.fmod,

    round = function(self, number)
        return number >= 0 and self.floor(number + 0.5) or self.ceil(number - 0.5)
    end,

    clamp = function(number, minimal, maximal)
        return number < minimal and minimal or number > maximal and maximal or number
    end,

    lerp = function(start, vend, time)
        return start + (vend - start) * time
    end,

    normalize = function(value)
        while value > 180.0 do
            value = value - 360.0
        end

        while value < -180.0 do
            value = value + 360.0
        end

        return value
    end,

    world_to_screen = function(self, x_position, y_position)
        if x_position == 0 and y_position == 0 then return 0 end

        local atan_position = self.atan2(y_position, x_position)
        local deg_position = self.deg(atan_position)

        return deg_position
    end,

    closest_point_on_ray = function(start_point, final_point, desired_point)
        local to = desired_point - start_point
        local direction = final_point - start_point
        local ray_length = direction:Length()
  
        direction.x = direction.x / ray_length
        direction.y = direction.y / ray_length
        direction.z = direction.z / ray_length
  
        local direction_along = direction.x * to.x + direction.y * to.y + direction.z * to.z
        if direction_along < 0 then return start_point end
        if direction_along > ray_length then return final_point end
  
        local final_vector = Vector.new(
            start_point.x + direction.x * direction_along,
            start_point.y + direction.y * direction_along,
            start_point.z + direction.z * direction_along
        )

        return final_vector
    end
}

local bit = {
    band = bit.band,
    lshift = bit.lshift,
    rshift = bit.rshift,
    bor = bit.bor,
    bnot = bit.bnot
}

local ffi = require("ffi")
local ffi = {
    C = ffi.C,
    cdef = ffi.cdef,
    cast = ffi.cast,
    typeof = ffi.typeof,
    sizeof = ffi.sizeof,
    new = ffi.new,
    load = ffi.load,
    string = ffi.string
}

local Utils = {
    CreateInterface = Utils.CreateInterface,
    RandomFloat = Utils.RandomFloat,
    PatternScan = Utils.PatternScan
}

local table = {
    concat = table.concat,
    insert = table.insert,
    remove = table.remove,
    sort = table.sort
}

local string = {
    char = string.char
}

local Color = {
    RGBA = Color.RGBA,
    new = Color.new
}

local EngineClient = {
    GetScreenSize = EngineClient.GetScreenSize,
    ExecuteClientCmd = EngineClient.ExecuteClientCmd,
    GetLocalPlayer = EngineClient.GetLocalPlayer,
    IsInGame = EngineClient.IsInGame,
    IsConnected = EngineClient.IsConnected,
    GetViewAngles = EngineClient.GetViewAngles
}

local EngineTrace = {
    TraceRay = EngineTrace.TraceRay
}

local EntityList = {
    GetClientEntity = EntityList.GetClientEntity,
    GetPlayer = EntityList.GetPlayer,
    GetPlayerResource = EntityList.GetPlayerResource,
    GetEntitiesByName = EntityList.GetEntitiesByName,
    GetPlayerForUserID = EntityList.GetPlayerForUserID
}

local Panorama = {
    Open = Panorama.Open,
    LoadString = Panorama.LoadString
}

local Vector = {
    new = Vector.new
}

local Vector2 = {
    new = Vector2.new
}

local Http = {
    GetAsync = Http.GetAsync
}

local Render = {
    InitFont = Render.InitFont,
    Text = Render.Text,
    BoxFilled = Render.BoxFilled,
    GradientBoxFilled = Render.GradientBoxFilled,
    CalcTextSize = Render.CalcTextSize,
    WorldToScreen = Render.WorldToScreen,
    GetMenuPos = Render.GetMenuPos,
    GetMenuSize = Render.GetMenuSize,
    CircleFilled = Render.CircleFilled,
    Line = Render.Line,
    PolyFilled = Render.PolyFilled
}

local QAngle = {
    new = QAngle.new
}

local RageBot = {
    OverrideHitchance = RageBot.OverrideHitchance
}

local Cheat = {
    GetCheatUserName = Cheat.GetCheatUserName,
    AddNotify = Cheat.AddNotify,
    RegisterCallback = Cheat.RegisterCallback,
    GetBinds = Cheat.GetBinds,
    FireBullet = Cheat.FireBullet,
    VectorToAngle = Cheat.VectorToAngle,
    AngleToForward = Cheat.AngleToForward,
    SetThirdPersonAnim = Cheat.SetThirdPersonAnim,
    IsMenuVisible = Cheat.IsMenuVisible,
    GetMousePos = Cheat.GetMousePos
}

local Menu = {
    Text = Menu.Text,
    Button = Menu.Button,
    Switch = Menu.Switch,
    Combo = Menu.Combo,
    MultiCombo = Menu.MultiCombo,
    SliderInt = Menu.SliderInt,
    DestroyItem = Menu.DestroyItem,
    FindVar = Menu.FindVar,
    SliderFloat = Menu.SliderFloat
}

local Exploits = {
    ForceTeleport = Exploits.ForceTeleport,
    OverrideDoubleTapSpeed = Exploits.OverrideDoubleTapSpeed,
    GetCharge = function()
        return Exploits.GetCharge()
    end
}

local CVar = {
    FindVar = CVar.FindVar
}

local tostring, print, type, pairs, ipairs, unpack, pcall, _G, error, tonumber = tostring, print, type, pairs, ipairs, unpack, pcall, _G, error, tonumber
local screen_size = EngineClient.GetScreenSize()
--- @endregion

--- @region: ffi elements
ffi.cdef[[
    typedef struct
    {
        uint8_t r;
        uint8_t g;
        uint8_t b;
        uint8_t a;
    } color_struct_t;

    typedef void (__cdecl* console_color_print)(void*, const color_struct_t&, const char*, ...);
    typedef void*(__thiscall* get_list_of_client_entities)(void*, int);
  
    void* GetProcAddress(void* hModule, const char* lpProcName);
    void* GetModuleHandleA(const char* lpModuleName);

    bool CreateDirectoryA(const char* lpPathName, void* lpSecurityAttributes);
    void* __stdcall URLDownloadToFileA(void* LPUNKNOWN, const char* LPCSTR, const char* LPCSTR2, int a, int LPBINDSTATUSCALLBACK);
    bool DeleteUrlCacheEntryA(const char* lpszUrlName);

    struct pose_parameters_t
    {
        char pad[8];
        float m_flStart;
        float m_flEnd;
        float m_flState;
    };
]]

local math_vector_lerp = function(vecSource, vecDestination, flPercentage)
    return vecSource + (vecDestination - vecSource) * flPercentage
end

local ffi_handler = {}
ffi_handler.interface_type = ffi.typeof("uintptr_t**")

ffi_handler.cvar_interface = ffi.cast(ffi_handler.interface_type, Utils.CreateInterface("vstdlib.dll", "VEngineCvar007"))
ffi_handler.color_print = ffi.cast("console_color_print", ffi_handler.cvar_interface[0][25])

local color_print = function(text, color)
    local new_color = ffi.new("color_struct_t")
    local rgba_table = {"r", "g", "b", "a"}

    for index, current_color in ipairs(rgba_table) do
        new_color[current_color] = color[current_color] * 255
    end
  
    ffi_handler.color_print(ffi_handler.cvar_interface, new_color, tostring(text))
end

ffi_handler.bind_argument = function(fn, arg)
    return function(...)
        return fn(arg, ...)
    end
end

ffi_handler.entity_list = ffi.cast(ffi_handler.interface_type, Utils.CreateInterface("client.dll", "VClientEntityList003"))
ffi_handler.get_client_entity = ffi_handler.bind_argument(ffi.cast("get_list_of_client_entities", ffi_handler.entity_list[0][3]), ffi_handler.entity_list)

ffi_handler.engine_sound_client = ffi.cast(ffi_handler.interface_type, Utils.CreateInterface("engine.dll", "IEngineSoundClient003"))
ffi_handler.play_custom_sound = ffi_handler.bind_argument(
    ffi.cast("void*(__thiscall*)(void*, const char*, float, int, int, float)", ffi_handler.engine_sound_client[0][12]), ffi_handler.engine_sound_client
)

ffi_handler.vgui_system = ffi.cast(ffi_handler.interface_type, Utils.CreateInterface("vgui2.dll", "VGUI_System010"))
ffi_handler.get_clipboard_text_count = ffi_handler.bind_argument(ffi.cast("int(__thiscall*)(void*)", ffi_handler.vgui_system[0][7]), ffi_handler.vgui_system)

ffi_handler.set_clipboard_text = ffi_handler.bind_argument(ffi.cast("void(__thiscall*)(void*, const char*, int)", ffi_handler.vgui_system[0][9]), ffi_handler.vgui_system)
ffi_handler.get_clipboard_text_fn = ffi_handler.bind_argument(
    ffi.cast("void(__thiscall*)(void*, int, const char*, int)", ffi_handler.vgui_system[0][11]), ffi_handler.vgui_system
)

ffi_handler.get_clipboard_text = function()
    local clipboard_text_length = ffi_handler.get_clipboard_text_count()
    if clipboard_text_length > 0 then
        local buffer = ffi.new("char[?]", clipboard_text_length)
        local size = clipboard_text_length * ffi.sizeof("char[?]", clipboard_text_length)
  
        ffi_handler.get_clipboard_text_fn(0, buffer, size)
        return ffi.string(buffer, clipboard_text_length-1)
    end
    return ""
end

local pose_parameter_pattern = "55 8B EC 8B 45 08 57 8B F9 8B 4F 04 85 C9 75 15"
ffi_handler.get_pose_parameters = ffi.cast("struct pose_parameters_t*(__thiscall* )(void*, int)", Utils.PatternScan("client.dll", pose_parameter_pattern))
--- @enderegion

--- @region: second helpers for the script
local custom_printer = function(...)
    local data = {...}
    local current_table_with_strings = {}

    if #data == 0 then
        local length = not ... and -1 or #...
        if length ~= -1 and type(...) == "nil" then
            current_table_with_strings[#current_table_with_strings + 1] = "No values selected to debug [Spotted a nil value]."
        else
            current_table_with_strings[#current_table_with_strings + 1] = "No values selected to debug!"
        end
    else
        for index = 1, #data do
            local current_element = data[index]
            if type(current_element) == "function" then
                current_table_with_strings[index] = ("function %s: %s"):format(
                    (tostring(current_element)):gsub("function: ", ""), current_element() or "nil"
                )
            elseif type(current_element) == "table" then
                for additional_elements = 1, #current_element do
                    if type(current_element[additional_elements]) == "function" then
                        current_element[additional_elements] = ("function %s: %s"):format(
                            (tostring(current_element[additional_elements])):gsub("function: ", ""), current_element[additional_elements]() or "nil"
                        )
                    elseif type(current_element[additional_elements]) == "string" then
                        current_element[additional_elements] = ("\"%s\""):format(current_element[additional_elements])
                    else
                        current_element[additional_elements] = tostring(current_element[additional_elements])
                    end
                end

                current_table_with_strings[index] = ("{%s}"):format(table.concat(current_element, ", "))
            else
                current_table_with_strings[index] = tostring(current_element)
            end
        end
    end

    color_print("[Killaura.lua debugger] ", Color.RGBA(170, 178, 255, 255))
    print(table.concat(current_table_with_strings, " | "))
end

local default_print = print
local print = custom_printer
--- @endregion

--- @region: menu elements
local menu_database = {}
menu_database.elements = {}
menu_database.references = {}

menu_database.update_elements = function()
    for _, current_element in pairs(menu_database.references) do
        if current_element.condition ~= nil then
            current_element.reference:SetVisible(current_element.condition())
        end
    end
end

menu_database.add_element = function(is_color, callback_name, directory, condition)
    menu_database.references[callback_name] = {
        is_color = is_color,
        reference = directory,
        name = callback_name,
        condition = condition
    }

    local on_touch_callback = function(new_value)
        menu_database.elements[callback_name] = new_value
        menu_database.update_elements()
    end

    on_touch_callback(directory:Get())
    directory:RegisterCallback(on_touch_callback)
end

menu_database.phases = {}
menu_database.remove_phase_key = function(rtn_table, key)
    local element = rtn_table[key]
    rtn_table[key] = nil

    return element
end

local add_new_phase = function()
    if #menu_database.phases > 11 then
        Cheat.AddNotify("Killaura.lua", "You cant create more than 11 phases!")
        return
    end

    local phase_counter = ("Phase #%s"):format(#menu_database.phases + 1)
    menu_database.add_element(false, phase_counter, Menu.SliderInt("Killaura: Anti-Brute", "Phase controller", phase_counter, 0, -60, 60), function()
        return menu_database.elements["Enable anti-bruteforce system"]
    end)

    table.insert(menu_database.phases, menu_database.references[phase_counter].reference)
    menu_database.references["Phase counter"].reference:SetInt(#menu_database.phases)
end

local remove_old_phase = function()
    if #menu_database.phases <= 2 or type(menu_database.phases[#menu_database.phases]) ~= "userdata" then
        Cheat.AddNotify("Killaura.lua", "There must be at least 2 phases!")
        return
    end

    local reference = ("Phase #%s"):format(#menu_database.phases)
    menu_database.remove_phase_key(menu_database.elements, reference)
    menu_database.remove_phase_key(menu_database.references, reference)

    Menu.DestroyItem(menu_database.phases[#menu_database.phases])
    table.remove(menu_database.phases, #menu_database.phases)

    menu_database.references["Phase counter"].reference:SetInt(#menu_database.phases)
end

(function()
    local add_element = menu_database.add_element
    --- @region: information tab
    local information_texts = {
        ("Welcome back, %s!"):format(Cheat.GetCheatUserName()), "Thanks for the purchasing killaura.lua!", "Build date: 19.02.2022", "Current version: 2.0.0",
        "Contact with owner: k1mbor#1052", "Find bug? Contact: strexxter#1234", "All rights reserved."
    }

    for element = 1, #information_texts do
        local current_element = information_texts[element]
        add_element(false, current_element, Menu.Text("Killaura: Global", "Information", current_element))
    end

    local download_fonts_button = "                          Download all files!                   "
    local join_discord_button = "                     Join our discord server!              "

    add_element(false, "Download all files", Menu.Button("Killaura: Global", "Other functions", download_fonts_button, "Click to download all needed files!"))
    add_element(false, "Join discord server", Menu.Button("Killaura: Global", "Other functions", join_discord_button, "Click to join our discord server!"))

    local file_utils = {
        url_mon = ffi.load("UrlMon"),
        win_internet = ffi.load("WinInet"),

        create_directory = function(self, directory)
            ffi.C.CreateDirectoryA(directory, nil)
        end,

        download_file = function(self, link, path)
            self.win_internet.DeleteUrlCacheEntryA(link)
            self.url_mon.URLDownloadToFileA(nil, link, path, 0, 0)
        end,

        setup_logic = function(self)
            self:create_directory("nl\\killaura.lua\\")
            self:create_directory("nl\\killaura.lua\\fonts\\")

            local smallest_pixel_7_link = "https://cdn.discordapp.com/attachments/897931346373128274/936931900059156500/smallest_pixel-7.ttf"
            local hitsound_link = "https://cdn.discordapp.com/attachments/942464526215966750/944279851190325248/hitok.wav"

            self:download_file(smallest_pixel_7_link, "nl\\killaura.lua\\fonts\\smallest_pixel-7.ttf")
            self:download_file(hitsound_link, "csgo\\sound\\killaura_hitsound.wav")
        end
    }

    menu_database.references["Download all files"].reference:RegisterCallback(function()
        file_utils:setup_logic()
    end)

    menu_database.references["Join discord server"].reference:RegisterCallback(function()
        local panorama_handle = Panorama.Open()
        local steam_overlay_API = panorama_handle.SteamOverlayAPI
        local open_external_browser_url = steam_overlay_API.OpenExternalBrowserURL

        local discord_link = "https://discord.gg/CxwncFn3nW"
        open_external_browser_url(discord_link)
    end)
    --- @endregion

    --- @region: ragebot elements
    add_element(false, "Enable ragebot manipulators", Menu.Switch("Killaura: Ragebot", "Ragebot manipulating", "Enable ragebot manipulators", false))
    add_element(false, "Ragebot manipulators", Menu.MultiCombo("Killaura: Ragebot", "Ragebot manipulating", "Manipulators", {
        "Noscope hitchance", "In air hitchance"
    }, 0), function()
        return menu_database.elements["Enable ragebot manipulators"]
    end)

    local manipulate_sliders = {{50, 0, 100}, {70, 0, 100}}
    local manipulate_names = {"Noscope hitchance", "In air hitchance"}

    for element = 1, #manipulate_sliders do
        local current_element = manipulate_sliders[element]
        local callback_and_name = manipulate_names[element]

        add_element(false, callback_and_name, Menu.SliderInt("Killaura: Ragebot", "Ragebot manipulating", callback_and_name, unpack(current_element)), function()
            return menu_database.elements["Enable ragebot manipulators"]
            and bit.band(menu_database.elements["Ragebot manipulators"], bit.lshift(1, element - 1)) ~= 0
        end)
    end

    add_element(false, "Enable dormant aimbot", Menu.Switch("Killaura: Ragebot", "Dormant aimbot", "Enable dormant aimbot", false))
    add_element(false, "Dormant aimbot minimum damage", Menu.SliderInt("Killaura: Ragebot", "Dormant aimbot", "Minimum damage", 5, 0, 100), function()
        return menu_database.elements["Enable dormant aimbot"]
    end)

    add_element(false, "Enable doubletap improvements", Menu.Switch("Killaura: Ragebot", "Doubletap improvements", "Enable doubletap improvements", false))
    add_element(false, "Doubletap improvements", Menu.MultiCombo("Killaura: Ragebot", "Doubletap improvements", "Improvements", {
        "Auto teleport in air", "Modify speed ticks"
    }, 0), function()
        return menu_database.elements["Enable doubletap improvements"]
    end)

    add_element(false, "Custom doubletap ticks", Menu.SliderInt("Killaura: Ragebot", "Doubletap improvements", "Doubletap ticks", 13, 4, 16), function()
        return menu_database.elements["Enable doubletap improvements"]
        and bit.band(menu_database.elements["Doubletap improvements"], bit.lshift(1, 1)) ~= 0
    end)
    --- @endregion

    --- @region: anti-aim elements
    add_element(false, "Enable anti-aim builder", Menu.Switch("Killaura: Anti-Aim", "Anti-aim builder", "Enable anti-aim builder", false))
    add_element(false, "Anti-aim manual yaw base", Menu.Combo("Killaura: Anti-Aim", "Anti-aim builder", "Manual yaw base:", {
        "Disabled", "Forward", "Backward", "Right", "Left", "At Target", "Freestanding"
    }, 0), function()
        return menu_database.elements["Enable anti-aim builder"]
    end)
      
    local all_conditions = {"On use", "Standing", "Crouch", "Slowwalk", "Moving", "In air"}
    add_element(false, "Anti-aim condition chooser", Menu.Combo("Killaura: Anti-Aim", "Anti-aim builder", "Select a condition:", all_conditions, 0), function()
        return menu_database.elements["Enable anti-aim builder"]
    end)

    for table = 1, #all_conditions do
        local current_condition = all_conditions[table]
        if current_condition ~= nil then
            local all_modes = {
                "Yaw Base", "Yaw Add Left", "Yaw Add Right", "Yaw Modifier", "Modifier Degree",
                "Fake Limit Type", "Fake Limit Left", "Fake Limit Right",
                "Fake Options", "LBY Mode", "Fake Desync", "Desync On Shot"
            }

            for value = 1, #all_modes do
                local current_mode = all_modes[value]
                local functions = {
                    Menu.Combo, Menu.SliderInt, Menu.SliderInt, Menu.Combo, Menu.SliderInt,
                    Menu.Combo, Menu.SliderInt, Menu.SliderInt,
                    Menu.MultiCombo, Menu.Combo, Menu.Combo, Menu.Combo
                }

                local sub_functions = {
                    {{"Forward", "Backward", "Right", "Left", "At Target", "Freestanding"}, 0},
                    {0, -180, 180}, {0, -180, 180}, {{"Disabled", "Center", "Offset", "Random", "Spin"}, 0}, {0, -180, 180},
                    {{"Static", "Jitter"}, 0}, {60, 0, 60}, {60, 0, 60},
                    {{"Avoid Overlap", "Jitter", "Randomize Jitter", "Anti Bruteforce"}, 0},
                    {{"Disabled", "Opposite", "Sway"}, 0},
                    {{"Off", "Peek Fake", "Peek Real"}, 0},
                    {{"Disabled", "Opposite", "Freestanding", "Switch"}, 0}
                }

                local anti_aim_callbacks = ("%s %s"):format(current_condition, current_mode)
                local anti_aim_names = ("[%s] %s"):format(table, current_mode)

                add_element(false, anti_aim_callbacks, functions[value](
                    "Killaura: Anti-Aim", "Anti-aim builder", anti_aim_names, unpack(sub_functions[value])
                ), function()
                    return menu_database.elements["Enable anti-aim builder"]
                    and menu_database.elements["Anti-aim condition chooser"] == table - 1
                end)
            end
        end
    end

    local anti_aim_stuff = {"Edge yaw"}
    local edge_yaw_disablers = {"On air", "On fakeduck", "On slowwalk", "On crouch"}

    add_element(false, "Enable anti-aim stuff", Menu.Switch("Killaura: Anti-Aim", "Additional anti-aim stuff", "Enable additional anti-aim stuff", false))
    add_element(false, "Anti-aim stuff", Menu.MultiCombo("Killaura: Anti-Aim", "Additional anti-aim stuff", "Anti-aim stuff", anti_aim_stuff, 0), function()
        return menu_database.elements["Enable anti-aim stuff"]
    end)

    add_element(false, "Edge yaw disablers", Menu.MultiCombo("Killaura: Anti-Aim", "Additional anti-aim stuff", "Edge yaw disablers:", edge_yaw_disablers, 0), function()
        return menu_database.elements["Enable anti-aim stuff"]
        and bit.band(menu_database.elements["Anti-aim stuff"], bit.lshift(1, 0)) ~= 0
    end)
    --- @endregion

    --- @region: anti-bruteforce phase system
    local add_phase = "                               Add new phase                        "
    local remove_phase = "                           Remove old phase                      "

    add_element(false, "Enable anti-bruteforce system", Menu.Switch("Killaura: Anti-Brute", "Phase system", "Enable anti-bruteforce", false))
    add_element(false, "Add phase", Menu.Button("Killaura: Anti-Brute", "Phase system", add_phase, "Click to add phase for your anti-bruteforce!"), function()
        return menu_database.elements["Enable anti-bruteforce system"]
    end)

    add_element(false, "Remove phase", Menu.Button("Killaura: Anti-Brute", "Phase system", remove_phase, "Click to remove phase from your anti-bruteforce!"), function()
        return menu_database.elements["Enable anti-bruteforce system"]
    end)

    add_element(false, "Phase counter", Menu.SliderInt("Killaura: Anti-Brute", "Phase system", "Phase counter", 2, 2, 20), function()
        return false
    end)

    menu_database.references["Add phase"].reference:RegisterCallback(add_new_phase)
    menu_database.references["Remove phase"].reference:RegisterCallback(remove_old_phase)

    for phase_counter = 1, menu_database.elements["Phase counter"] do
        add_new_phase()
    end
    --- @endregion

    --- @region: all visual functions
    add_element(false, "Enable visual controller", Menu.Switch("Killaura: Visuals", "Visual controller", "Enable visual controller", false))

    local all_visuals = {"Under crosshair", "Damage markers", "3rd person animation", "Menu effects", "Weapons in scope"}
    add_element(false, "Visual controllers", Menu.MultiCombo("Killaura: Visuals", "Visual controller", "Visual controllers", all_visuals, 0), function()
        return menu_database.elements["Enable visual controller"]
    end)

    add_element(false, "Enable other controllers", Menu.Switch("Killaura: Visuals", "Other controllers", "Enable other stuff controller", false))
    local others = {"Teamskeet arrows"}

    add_element(false, "Other controllers", Menu.MultiCombo("Killaura: Visuals", "Other controllers", "Other stuff controller", others, 0), function()
        return menu_database.elements["Enable other controllers"]
    end)

    add_element(false, "Teamskeet distance", Menu.SliderFloat("Killaura: Visuals", "Other controllers", "Teamskeet distance", 2.5, 1, 5), function()
        return menu_database.elements["Enable other controllers"]
        and bit.band(menu_database.elements["Other controllers"], bit.lshift(1, 0)) ~= 0
    end)
    --- @endregion

    --- @region: miscellaneous elements
    add_element(false, "Enable hitsound", Menu.Switch("Killaura: Miscellaneous", "All features", "Enable hitsound", false))
    add_element(false, "Hitsound volume", Menu.SliderInt("Killaura: Miscellaneous", "All features", "Hitsound volume", 50, 1, 100), function()
        return menu_database.elements["Enable hitsound"]
    end)

    add_element(false, "Enable trashtalk", Menu.Switch("Killaura: Miscellaneous", "All features", "Enable trashtalk", false))
    add_element(false, "Enable hitlogs", Menu.Switch("Killaura: Miscellaneous", "All features", "Enable hitlogs", false))

    add_element(false, "Enable animation breakers", Menu.Switch("Killaura: Miscellaneous", "Animation breakers", "Enable animation breakers", false))
    add_element(false, "Animation breakers", Menu.MultiCombo("Killaura: Miscellaneous", "Animation breakers", "Animation breakers", {
        "Static legs in air", "Pitch 0 on land", "Break leg animations"
    }, 0), function()
        return menu_database.elements["Enable animation breakers"]
    end)
    --- @endregion
end)()
--- @endregion

--- @region: player helpers
local is_local_player_valid = function()
    local local_player = EngineClient.GetLocalPlayer()
    if not local_player then return false, nil end

    local local_player_entity = EntityList.GetClientEntity(local_player)
    if not local_player_entity then return false, nil end
  
    local my_index = local_player_entity:GetPlayer()
    if not my_index then return false, nil end

    if not EngineClient.IsInGame() and not EngineClient.IsConnected() then return false, nil end
    if not my_index:IsAlive() then return false, nil end

    return true, my_index
end

local player_flags = {
    FL_ONGROUND = bit.lshift(1, 0),
    FL_DUCKING = bit.lshift(1, 1),
    FL_WATERJUMP = bit.lshift(1, 3),
    FL_ONTRAIN = bit.lshift(1, 4),
    FL_INRAIN = bit.lshift(1, 5),
    FL_FROZEN = bit.lshift(1, 6),
    FL_ATCONTROLS = bit.lshift(1, 7),
    FL_CLIENT = bit.lshift(1, 8),
    FL_FAKECLIENT = bit.lshift(1, 9),
    FL_INWATER = bit.lshift(1, 10)
}

local player_states = {
    IN_ATTACK = bit.lshift(1, 0),
    IN_JUMP    = bit.lshift(1, 1),
    IN_DUCK    = bit.lshift(1, 2),
    IN_FORWARD = bit.lshift(1, 3),
    IN_BACK    = bit.lshift(1, 4),
    IN_USE = bit.lshift(1, 5),
    IN_CANCEL = bit.lshift(1, 6),
    IN_LEFT    = bit.lshift(1, 7),
    IN_RIGHT = bit.lshift(1, 8),
    IN_MOVELEFT = bit.lshift(1, 9),
    IN_MOVERIGHT = bit.lshift(1, 10),
    IN_ATTACK2 = bit.lshift(1, 11),
    IN_RUN = bit.lshift(1, 12),
    IN_RELOAD = bit.lshift(1, 13),
    IN_ALT1    = bit.lshift(1, 14),
    IN_ALT2    = bit.lshift(1, 15),
    IN_SCORE = bit.lshift(1, 16),
    IN_SPEED = bit.lshift(1, 17),
    IN_WALK    = bit.lshift(1, 18),
    IN_ZOOM    = bit.lshift(1, 19),
    IN_WEAPON1 = bit.lshift(1, 20),
    IN_WEAPON2 = bit.lshift(1, 21),
    IN_BULLRUSH = bit.lshift(1, 22)
}

local directories = {
    isDT = Menu.FindVar("Aimbot", "Ragebot", "Exploits", "Double Tap"),
    isHS = Menu.FindVar("Aimbot", "Ragebot", "Exploits", "Hide Shots"),
    isAutopeek = Menu.FindVar("Miscellaneous", "Main", "Movement", "Auto Peek"),
    isSW = Menu.FindVar("Aimbot", "Anti Aim", "Misc", "Slow Walk"),
    isFD = Menu.FindVar("Aimbot", "Anti Aim", "Misc", "Fake Duck"),

    pitch = Menu.FindVar("Aimbot", "Anti Aim", "Main", "Pitch"),
    yaw_base = Menu.FindVar("Aimbot", "Anti Aim", "Main", "Yaw Base"),

    defHC = Menu.FindVar("Aimbot", "Ragebot", "Accuracy", "Hit Chance"),
    defDMG = Menu.FindVar("Aimbot", "Ragebot", "Accuracy", "Minimum Damage"),

    leg_movement = Menu.FindVar("Aimbot", "Anti Aim", "Misc", "Leg Movement")
}

local get_binds = function()
    local isDMG, curDMG, isBaim, isSafe, isPing, isHC, curHC = false, 0, false, false, false, false, 0
    local binds = Cheat.GetBinds()

    for i = 1, #binds do
        local bind = binds[i]
        if bind:IsActive() then
            if bind:GetName() == "Minimum Damage" then
                isDMG = true
                curDMG = bind:GetValue()
            end

            if bind:GetName() == "Hit Chance" then
                isHC = true
                curHC = bind:GetValue()
            end

            if bind:GetName() == "Body Aim" then
                isBaim = true
            end

            if bind:GetName() == "Safe Points" then
                isSafe = true
            end

            if bind:GetName() == "Fake Ping" then
                isPing = true
            end
        end
    end

    return ({
        isDT = directories.isDT:Get(),
        isHS = directories.isHS:Get(),
        isAutopeek = directories.isAutopeek:Get(),
        isFD = directories.isFD:Get(),
        isSW = directories.isSW:Get(),

        isForward = directories.yaw_base:Get() == 0,
        isBackward = directories.yaw_base:Get() == 1,
        isRight = directories.yaw_base:Get() == 2,
        isLeft = directories.yaw_base:Get() == 3,
        isAT = directories.yaw_base:Get() == 4,
        isFS = directories.yaw_base:Get() == 5,

        isDMG = isDMG,
        curDMG = curDMG,

        isHC = isHC,
        curHC = curHC,

        defHC = directories.defHC:Get(),
        defDMG = directories.defDMG:Get(),

        isBaim = isBaim,
        isSafe = isSafe,
        isPing = isPing
    })
end

local loaded_cvars = {
    sv_maxusrcmdprocessticks = CVar.FindVar("sv_maxusrcmdprocessticks"),
    fov_cs_debug = CVar.FindVar("fov_cs_debug")
}

function C_BaseEntity:GetOrigin()
    if self ~= nil then
        return self:GetProp("m_vecOrigin")
    end
end
--- @endregion

--- @region: all ragebot functions
local all_ragebot_functions = {}
local all_noscope_weapons = {
    [261] = true,
    [242] = true,
    [233] = true,
    [267] = true
}

all_ragebot_functions.ragebot_manipulating = {}
all_ragebot_functions.doubletap_improvements = {}
all_ragebot_functions.dormant_aimbot = {}

all_ragebot_functions.ragebot_manipulating.noscope_hitchance = function()
    if not menu_database.elements["Enable ragebot manipulators"] then return end
    if bit.band(menu_database.elements["Ragebot manipulators"], bit.lshift(1, 0)) == 0 then return end

    local is_local_player_valid, my_index = is_local_player_valid()
    if is_local_player_valid then
        local active_weapon = my_index:GetActiveWeapon()
        if not active_weapon then return end

        if not all_noscope_weapons[active_weapon:GetClassId()] then return end
        local noscope_value = menu_database.elements["Noscope hitchance"]

        for all_player_indexes = 1, 64 do
            RageBot.OverrideHitchance(all_player_indexes, noscope_value)
        end
    end
end

all_ragebot_functions.ragebot_manipulating.in_air_hitchance = function()
    if not menu_database.elements["Enable ragebot manipulators"] then return end
    if bit.band(menu_database.elements["Ragebot manipulators"], bit.lshift(1, 1)) == 0 then return end

    local is_local_player_valid, my_index = is_local_player_valid()
    if is_local_player_valid then
        local active_weapon = my_index:GetActiveWeapon()
        if not active_weapon then return end

        local get_local_flags = my_index:GetProp("m_fFlags")
        local is_in_air = bit.band(get_local_flags, player_flags.FL_ONGROUND) == 0

        if is_in_air then
            local in_air_hitchance_value = menu_database.elements["In air hitchance"]
            for all_player_indexes = 1, 64 do
                RageBot.OverrideHitchance(all_player_indexes, in_air_hitchance_value)
            end
        end
    end
end

all_ragebot_functions.doubletap_improvements.automatic_teleport_in_the_air = function()
    if not menu_database.elements["Enable doubletap improvements"] then return end
    if bit.band(menu_database.elements["Doubletap improvements"], bit.lshift(1, 0)) == 0 then return end

    local is_local_player_valid, my_index = is_local_player_valid()
    if is_local_player_valid then
        local binds = get_binds()
        local get_local_flags = my_index:GetProp("m_fFlags")
        local is_in_air = bit.band(get_local_flags, player_flags.FL_ONGROUND) == 0

        if binds.isDT and is_in_air then
            for all_player_indexes = 1, 64 do
                local enemy = EntityList.GetPlayer(all_player_indexes)
                if enemy and not enemy:IsTeamMate() then
                    if enemy:IsAlive() then
                        local enemy_head_position = enemy:GetHitboxCenter(0)
                        local is_enemy_visible = enemy:IsVisible(enemy_head_position)

                        if is_enemy_visible then
                            Exploits.ForceTeleport()
                        end
                    end
                end
            end
        end
    end
end

all_ragebot_functions.doubletap_improvements.modify_doubletap_ticks = function()
    if not menu_database.elements["Enable doubletap improvements"] then return end
    if bit.band(menu_database.elements["Doubletap improvements"], bit.lshift(1, 1)) == 0 then return end

    local is_local_player_valid, my_index = is_local_player_valid()
    if is_local_player_valid then
        local selected_doubletap_ticks = menu_database.elements["Custom doubletap ticks"]
        local max_usr_ticks = selected_doubletap_ticks + 2

        loaded_cvars.sv_maxusrcmdprocessticks:SetInt(max_usr_ticks)
        Exploits.OverrideDoubleTapSpeed(selected_doubletap_ticks)
    end
end

all_ragebot_functions.dormant_aimbot.minimum_time_to_react = 0.5
all_ragebot_functions.dormant_aimbot.minimum_hitchance = 84

all_ragebot_functions.dormant_aimbot.all_players_information = {}
for all_player_indexes = 1, 64 do
    all_ragebot_functions.dormant_aimbot.all_players_information[all_player_indexes] = {
        origin = Vector.new(0, 0, 0),
        tick = 0,
        velocity = Vector.new(0, 0, 0)
    }
end

all_ragebot_functions.dormant_aimbot.automatic_autoscope = function(cmd, my_index, active_weapon)
    local get_player_flags = my_index:GetProp("m_fFlags")
    local is_self_scoped = my_index:GetProp("m_bIsScoped")

    if active_weapon:IsSniper() and not is_self_scoped and bit.band(get_player_flags, 1) == 1 then
        cmd.buttons = bit.bor(cmd.buttons, 2048)
        return false
    end

    return true
end

all_ragebot_functions.dormant_aimbot.calculate_hitchance = function(my_index, active_weapon, current_angle, enemy_index, distance)
    local ffi_entity = ffi_handler.get_client_entity(enemy_index)
    local get_client_entity = EntityList.GetClientEntity(enemy_index)

    local get_weapon_inaccuracy = active_weapon:GetInaccuracy(active_weapon) + active_weapon:GetSpread(active_weapon)
    local self_eye_position = my_index:GetEyePosition()
    local rays, hit_variables = 128, 0

    for point = 1, rays do
        local angle_to_vector = Cheat.AngleToForward(current_angle)

        angle_to_vector.x = angle_to_vector.x + Utils.RandomFloat(-get_weapon_inaccuracy, get_weapon_inaccuracy)
        angle_to_vector.y = angle_to_vector.y + Utils.RandomFloat(-get_weapon_inaccuracy, get_weapon_inaccuracy)
        angle_to_vector.z = angle_to_vector.z + Utils.RandomFloat(-get_weapon_inaccuracy, get_weapon_inaccuracy)
        angle_to_vector = angle_to_vector * distance

        local bullet_data = Cheat.FireBullet(my_index, self_eye_position, self_eye_position + angle_to_vector)
        local bullet_damage = bullet_data.damage

        if bullet_damage > 0 then
            hit_variables = hit_variables + 1
        end
    end

    local chance = math:round((hit_variables / rays) * 100)
    return chance >= all_ragebot_functions.dormant_aimbot.minimum_hitchance
end

all_ragebot_functions.dormant_aimbot.decrease_player_speed = function(cmd, my_index, goal_speed)
    local min_speed = math.sqrt(cmd.forwardmove * cmd.forwardmove + cmd.sidemove * cmd.sidemove)
    if goal_speed <= 0 or min_speed <= 0 then return end

    local get_local_flags = my_index:GetProp("m_fFlags")
    local in_crouch = bit.band(get_local_flags, player_flags.FL_DUCKING) ~= 0
    local is_in_air = bit.band(get_local_flags, player_flags.FL_ONGROUND) == 0

    if is_in_air then return end
    if in_crouch then
        goal_speed = goal_speed * 2.94117647
    end

    if min_speed <= goal_speed then return end
    local speed_factor = goal_speed / min_speed * 0.01

    cmd.forwardmove = cmd.forwardmove * speed_factor
    cmd.sidemove = cmd.sidemove * speed_factor
end

all_ragebot_functions.dormant_aimbot.setup_logic = function(cmd)
    if not menu_database.elements["Enable dormant aimbot"] then return end
    local is_local_player_valid, my_index = is_local_player_valid()

    if is_local_player_valid then
        local active_weapon = my_index:GetActiveWeapon()
        if not active_weapon then return end

        if active_weapon:IsGrenade() or active_weapon:IsKnife() then
            return
        end

        local player_data = {
            target_position = nil,
            best_target = nil
        }

        local self_eye_position = my_index:GetEyePosition()
        local player_resource = EntityList.GetPlayerResource()
        local get_weapon_max_speed = active_weapon:GetMaxSpeed() / 10

        local maximal_damage = menu_database.elements["Dormant aimbot minimum damage"]
        local minimum_ticks = math:round(all_ragebot_functions.dormant_aimbot.minimum_time_to_react / GlobalVars.interval_per_tick + 0.5)

        for all_player_indexes = 1, 64 do
            local enemy = EntityList.GetPlayer(all_player_indexes)
            if enemy and not enemy:IsTeamMate() then
                local information_directory = all_ragebot_functions.dormant_aimbot.all_players_information[all_player_indexes]
                local network_state = enemy:GetNetworkState()

                if enemy:IsAlive() and network_state ~= -1 and enemy:IsDormant() then
                    local ffi_entity = ffi_handler.get_client_entity(all_player_indexes)
                    local enemy_origin = enemy:GetOrigin()
                    local delta_of_vectors = enemy_origin - information_directory.origin

                    if #delta_of_vectors > 0.0 then
                        information_directory.velocity = delta_of_vectors * GlobalVars.interval_per_tick
                        information_directory.tick = cmd.tick_count
                    end
                  
                    information_directory.origin = enemy_origin
                    if cmd.tick_count - information_directory.tick < minimum_ticks then
                        for hitbox_index = 1, 24, 4 do
                            local center_vector = enemy_origin + Vector.new(0, 0, 32 + hitbox_index)

                            local bullet_data = Cheat.FireBullet(my_index, self_eye_position, center_vector)
                            local bullet_damage = bullet_data.damage

                            if bullet_damage > maximal_damage then
                                maximal_damage = bullet_damage
                                player_data.target_position = center_vector
                                player_data.best_target = all_player_indexes
                            end

                            local bullet_hit_entity = bullet_data.trace.hit_entity
                            if bullet_hit_entity ~= nil and player_data.best_target ~= nil then
                                if bullet_hit_entity:EntIndex() ~= player_data.best_target then
                                    player_data.best_target = nil
                                end
                            end
                        end

                        information_directory.tick = cmd.tick_count
                    end
                else
                    information_directory.tick = cmd.tick_count
                end
            end
        end

        local get_binds = get_binds()
        local isHS = get_binds.isHS

        local current_attack_timer = isHS and 0.3 or 0
        local next_attack = my_index:GetProp("m_flNextAttack") + current_attack_timer
        local next_primary_attack = active_weapon:GetProp("m_flNextPrimaryAttack") + current_attack_timer

        local best_target = player_data.best_target
        local target_position = player_data.target_position

        if best_target ~= nil and target_position then
            if next_attack <= GlobalVars.curtime and next_primary_attack <= GlobalVars.curtime then
                local delta_of_vectors = target_position - self_eye_position
                local vector_to_angles = Cheat.VectorToAngle(delta_of_vectors)

                local hitchance_check = all_ragebot_functions.dormant_aimbot.calculate_hitchance(my_index, active_weapon, vector_to_angles, best_target, #delta_of_vectors)
                local is_autoscoping = all_ragebot_functions.dormant_aimbot.automatic_autoscope(cmd, my_index, active_weapon)

                local is_available = is_autoscoping and hitchance_check
                if is_autoscoping and maximal_damage > 0 then
                    all_ragebot_functions.dormant_aimbot.decrease_player_speed(cmd, my_index, get_weapon_max_speed)
                end

                if is_available then
                    vector_to_angles.yaw = math.normalize(vector_to_angles.yaw)
                    vector_to_angles.pitch = math.normalize(vector_to_angles.pitch)
                    vector_to_angles.roll = 0

                    cmd.viewangles = vector_to_angles
                    cmd.buttons = bit.bor(cmd.buttons, 1)
                end
            end
        end
    end
end
--- @endregion

--- @region: all anti-aim functions
local all_anti_aim_functions = {}
all_anti_aim_functions.anti_aim_builder = {}

all_anti_aim_functions.anti_aim_builder.is_available_to_press_e = false
all_anti_aim_functions.anti_aim_builder.is_pressing_e = function(cmd, my_index)
    all_anti_aim_functions.anti_aim_builder.is_available_to_press_e = false
    if my_index ~= nil then
        local active_weapon = my_index:GetActiveWeapon()
        if not active_weapon then return end

        local is_pressing_e = bit.band(cmd.buttons, player_states.IN_USE) > 0
        local is_holding_bomb = active_weapon:GetClassName() == "CC4"
        local is_in_bombzone = my_index:GetProp("m_bInBombZone")

        local is_planting = is_in_bombzone and is_holding_bomb
        local all_planted_bombs = EntityList.GetEntitiesByName("CPlantedC4")

        local is_bomb_planted = #all_planted_bombs > 0
        local bomb_distance = 100

        if is_bomb_planted then
            local current_bomb = all_planted_bombs[#is_bomb_planted]

            local bomb_origin = current_bomb:GetOrigin()
            local self_origin = my_index:GetOrigin()

            bomb_distance = self_origin:DistTo(bomb_origin)
        end

        local self_team = my_index:GetProp("m_iTeamNum")
        local is_defusing = bomb_distance < 62 and self_team == 3
        if is_defusing then return end

        local local_view_angles = EngineClient.GetViewAngles()
        local self_eye_position = my_index:GetEyePosition()
        local angle_to_vector = Cheat.AngleToForward(local_view_angles)

        local final_point = self_eye_position + angle_to_vector * 8192
        local mask_offset = 0x4600400B

        local trace_data = EngineTrace.TraceRay(self_eye_position, final_point, my_index, mask_offset)
        local trace_fraction = trace_data.fraction
        local trace_hit_entity = trace_data.hit_entity

        local is_using = false
        if trace_data ~= nil then
            if trace_fraction < 1 and trace_hit_entity ~= nil then
                local entity_classname = trace_hit_entity:GetClassName()
                is_using = entity_classname ~= "CWorld" and entity_classname ~= "CFuncBrush" and entity_classname ~= "CCSPlayer"
            end
        end

        if not is_using and not is_planting then
            cmd.buttons = bit.band(cmd.buttons, bit.bnot(player_states.IN_USE))
            all_anti_aim_functions.anti_aim_builder.is_available_to_press_e = is_pressing_e
        end
    end
end

local indicator_state = "DEFAULT"
all_anti_aim_functions.anti_aim_builder.get_current_state = function(cmd, my_index, flags)
    local in_crouch = bit.band(flags, player_flags.FL_DUCKING) ~= 0
    local in_air = bit.band(flags, player_flags.FL_ONGROUND) == 0

    local get_binds = get_binds()
    local slow_walk_bind = get_binds.isSW

    local execute_legit_aa_check = all_anti_aim_functions.anti_aim_builder.is_pressing_e(cmd, my_index)
    local is_legit_aa = all_anti_aim_functions.anti_aim_builder.is_available_to_press_e

    local forward_move = cmd.forwardmove
    local side_move = cmd.sidemove
    local up_move = cmd.upmove

    local is_standing = not is_legit_aa and not in_crouch and forward_move == 0 and side_move == 0 and up_move == 0 and not in_air and not slow_walk_bind
    local is_moving = not in_crouch and not in_air and (forward_move ~= 0 or side_move ~= 0) and not slow_walk_bind
    local is_crouching = not in_air and in_crouch
    local is_slow_walking = slow_walk_bind and not in_air
    local is_manual = menu_database.elements["Anti-aim manual yaw base"] > 0 and not is_legit_aa
  
    local current_state = (
        is_manual and "Manual" or is_legit_aa and "On use" or is_standing and "Standing" or is_crouching and "Crouch"
        or is_slow_walking and "Slowwalk" or is_moving and "Moving" or in_air and "In air" or "Unknown"
    )

    indicator_state = current_state
    return current_state
end

all_anti_aim_functions.anti_aim_builder.apply_anti_aim_settings = function()
    directories.pitch:SetInt(0)
    local get_binds = get_binds()
    local is_manual = get_binds.isLeft or get_binds.isRight or menu_database.elements["Anti-aim manual yaw base"] > 0

    if is_manual then
        AntiAim.OverrideLimit(58)
    end
end

all_anti_aim_functions.anti_aim_builder.is_jittering = true
all_anti_aim_functions.anti_aim_builder.apply_settings = function(cmd, my_index, get_local_flags)
    local current_state = all_anti_aim_functions.anti_aim_builder.get_current_state(cmd, my_index, get_local_flags)
    if current_state == "Unknown" then return end

    local get_value = function(condition)
        return menu_database.elements[("%s %s"):format(current_state, condition)]
    end

    if not all_anti_aim_functions.anti_aim_builder.is_edge_yaw_working then
        if current_state == "Manual" then
            local directory = menu_database.elements["Anti-aim manual yaw base"] - 1
            Menu.FindVar("Aimbot", "Anti Aim", "Main", "Yaw Base"):SetInt(directory)
        end

        if ClientState.m_choked_commands == 0 then
            local inverter_state = AntiAim.GetInverterState()
            local fake_limit_type = menu_database.elements[("%s Fake Limit Type"):format(current_state)]

            directories.pitch:SetInt(1)
            Menu.FindVar("Aimbot", "Anti Aim", "Main", "Yaw Base"):SetInt(get_value("Yaw Base"))
            Menu.FindVar("Aimbot", "Anti Aim", "Main", "Yaw Add"):SetInt(inverter_state and get_value("Yaw Add Left") or get_value("Yaw Add Right"))

            Menu.FindVar("Aimbot", "Anti Aim", "Main", "Yaw Modifier"):SetInt(get_value("Yaw Modifier"))
            Menu.FindVar("Aimbot", "Anti Aim", "Main", "Modifier Degree"):SetInt(get_value("Modifier Degree"))

            Menu.FindVar("Aimbot", "Anti Aim", "Fake Angle", "Left Limit"):SetInt(
                fake_limit_type == 0 and get_value("Fake Limit Left") or fake_limit_type == 1
                and (all_anti_aim_functions.anti_aim_builder.is_jittering and 18 or get_value("Fake Limit Left"))
            )

            Menu.FindVar("Aimbot", "Anti Aim", "Fake Angle", "Right Limit"):SetInt(
                fake_limit_type == 0 and get_value("Fake Limit Right") or fake_limit_type == 1
                and (all_anti_aim_functions.anti_aim_builder.is_jittering and 18 or get_value("Fake Limit Right"))
            )

            Menu.FindVar("Aimbot", "Anti Aim", "Fake Angle", "Fake Options"):SetInt(get_value("Fake Options"))
            Menu.FindVar("Aimbot", "Anti Aim", "Fake Angle", "LBY Mode"):SetInt(get_value("LBY Mode"))
            Menu.FindVar("Aimbot", "Anti Aim", "Fake Angle", "Freestanding Desync"):SetInt(get_value("Fake Desync"))
            Menu.FindVar("Aimbot", "Anti Aim", "Fake Angle", "Desync On Shot"):SetInt(get_value("Desync On Shot"))
          
            if current_state == "On use" then
                all_anti_aim_functions.anti_aim_builder.apply_anti_aim_settings()
            end

            all_anti_aim_functions.anti_aim_builder.is_jittering = not all_anti_aim_functions.anti_aim_builder.is_jittering
        end
    end
end

all_anti_aim_functions.anti_aim_builder.build_anti_aim = function(cmd)
    if not menu_database.elements["Enable anti-aim builder"] then return end
    local is_local_player_valid, my_index = is_local_player_valid()

    if is_local_player_valid then
        local get_local_flags = my_index:GetProp("m_fFlags")
        local apply_settings = all_anti_aim_functions.anti_aim_builder.apply_settings(cmd, my_index, get_local_flags)
    end
end

all_anti_aim_functions.anti_aim_builder.is_working = function(my_index)
    local directory = menu_database.elements["Edge yaw disablers"]
    local flags = my_index:GetProp("m_fFlags")
    local get_binds = get_binds()

    local in_air = bit.band(flags, player_flags.FL_ONGROUND) == 0
    local in_crouch = bit.band(flags, player_flags.FL_DUCKING) ~= 0

    local isFD = get_binds.isFD
    local isSW = get_binds.isSW

    local is_disabled_in_air = bit.band(directory, bit.lshift(1, 0)) ~= 0 and in_air
    local is_disabled_while_fakeducking = bit.band(directory, bit.lshift(1, 1)) ~= 0 and isFD
    local is_disabled_while_slowwalking = bit.band(directory, bit.lshift(1, 2)) ~= 0 and isSW
    local is_disabled_while_crouching = bit.band(directory, bit.lshift(1, 3)) ~= 0 and in_crouch

    local is_menu_manual = get_binds.isLeft or get_binds.isRight
    local is_manual = menu_database.elements["Anti-aim manual yaw base"] == 3 or menu_database.elements["Anti-aim manual yaw base"] == 4

    if is_menu_manual or is_manual then
        return false
    end

    if is_disabled_in_air or is_disabled_while_fakeducking or is_disabled_while_slowwalking or is_disabled_while_crouching then
        return false
    end

    return true
end

all_anti_aim_functions.anti_aim_builder.start_point = Vector.new()
all_anti_aim_functions.anti_aim_builder.is_edge_yaw_working = false

all_anti_aim_functions.anti_aim_builder.edge_yaw = function()
    all_anti_aim_functions.anti_aim_builder.is_edge_yaw_working = false

    if not menu_database.elements["Enable anti-aim stuff"] then return end
    if bit.band(menu_database.elements["Anti-aim stuff"], bit.lshift(1, 0)) == 0 then return end

    local is_local_player_valid, my_index = is_local_player_valid()
    if is_local_player_valid then
        local is_should_work = all_anti_aim_functions.anti_aim_builder.is_working(my_index)
        if is_should_work then
            if ClientState.m_choked_commands == 0 then
                all_anti_aim_functions.anti_aim_builder.start_point = my_index:GetEyePosition()
            end

            local distances = {}
            local final_point_vector = {}

            local start_point = all_anti_aim_functions.anti_aim_builder.start_point
            local self_view_angles = EngineClient.GetViewAngles()

            for yaw = 18, 360, 18 do
                yaw = math.normalize(yaw)

                local mask_offset = 0x46004003
                local edge_angle = QAngle.new(0, yaw, 0)
      
                local final_point = start_point + Cheat.AngleToForward(edge_angle) * 198
                local trace_data = EngineTrace.TraceRay(start_point, final_point, my_index, mask_offset)

                local trace_fraction = trace_data.fraction
                local trace_hit_entity = trace_data.hit_entity
                local trace_end_position = trace_data.endpos

                table.insert(distances, start_point:DistTo(trace_end_position))
                if trace_hit_entity ~= nil then
                    local entity_classname = trace_hit_entity:GetClassName()
                    if entity_classname == "CWorld" and trace_fraction < 0.3 then
                        final_point_vector[#final_point_vector + 1] = {
                            final_point = final_point,
                            yaw = yaw
                        }
                    end
                end
            end

            table.sort(distances)
            if distances[1] > 30 then
                return
            end
      
            table.sort(final_point_vector, function(first_yaw, second_yaw)
                return first_yaw.yaw < second_yaw.yaw
            end)

            table.remove(final_point_vector, #final_point_vector)
            local edge_angle = nil

            if #final_point_vector >= 3 then
                local center_vector = math.lerp(final_point_vector[1].final_point, final_point_vector[#final_point_vector].final_point, 0.5)
                edge_angle = Cheat.VectorToAngle(start_point - center_vector)
            end

            if edge_angle ~= nil then
                local yaw = self_view_angles.yaw
                local edge_yaw = edge_angle.yaw
                local difference = math.normalize(edge_yaw - yaw)
      
                if math.abs(difference) < 90 then
                    difference = 0
                    edge_yaw = math.normalize(edge_yaw + 180)
                end
      
                local new_static_yaw = -edge_yaw

                new_static_yaw = math.normalize(new_static_yaw + edge_yaw)
                new_static_yaw = math.normalize(new_static_yaw + difference + 180)
      
                directories.yaw_base:SetInt(0)
                AntiAim.OverrideYawOffset(new_static_yaw)
                all_anti_aim_functions.anti_aim_builder.is_edge_yaw_working = true
            end
        end
    end
end

all_anti_aim_functions.anti_aim_builder.anti_bruteforce = {}
all_anti_aim_functions.anti_aim_builder.anti_bruteforce.minimum_distance = 64

all_anti_aim_functions.anti_aim_builder.anti_bruteforce.reset_timer = 0
all_anti_aim_functions.anti_aim_builder.anti_bruteforce.maximum_time = 2
all_anti_aim_functions.anti_aim_builder.anti_bruteforce.trigger_last_tick = 0

all_anti_aim_functions.anti_aim_builder.anti_bruteforce.current_phase = 0
all_anti_aim_functions.anti_aim_builder.anti_bruteforce.current_angle = 0

all_anti_aim_functions.anti_aim_builder.anti_bruteforce.check_bullet_impact = function(bullet_position, enemy_eye_position, self_eye_position)
    local get_closest_point = math.closest_point_on_ray(bullet_position, enemy_eye_position, self_eye_position)
    local distance_between_bullet_and_me = get_closest_point:DistTo(self_eye_position)

    local distance_to_trigger = all_anti_aim_functions.anti_aim_builder.anti_bruteforce.minimum_distance
    if distance_between_bullet_and_me > distance_to_trigger then return end

    local inverter_state = AntiAim.GetInverterState()
    local phase_counter = menu_database.phases

    if all_anti_aim_functions.anti_aim_builder.anti_bruteforce.reset_timer < GlobalVars.realtime then
        for current_phase = 1, #phase_counter do
            local phase_directory = ("Phase #%s"):format(current_phase)
            local phase_return_value = menu_database.elements[phase_directory]
          
            all_anti_aim_functions.anti_aim_builder.anti_bruteforce.current_phase = current_phase
        end
    else
        all_anti_aim_functions.anti_aim_builder.anti_bruteforce.current_phase = 1 + (
            all_anti_aim_functions.anti_aim_builder.anti_bruteforce.current_phase % #phase_counter
        )
    end

    local new_hase_directory = ("Phase #%s"):format(all_anti_aim_functions.anti_aim_builder.anti_bruteforce.current_phase)
    local new_phase_return_value = menu_database.elements[new_hase_directory]

    all_anti_aim_functions.anti_aim_builder.anti_bruteforce.reset_timer = GlobalVars.realtime + all_anti_aim_functions.anti_aim_builder.anti_bruteforce.maximum_time
    all_anti_aim_functions.anti_aim_builder.anti_bruteforce.current_angle = new_phase_return_value

    while not all_anti_aim_functions.anti_aim_builder.anti_bruteforce.current_angle do
        all_anti_aim_functions.anti_aim_builder.anti_bruteforce.current_phase = 1 + (
            all_anti_aim_functions.anti_aim_builder.anti_bruteforce.current_phase % #phase_counter
        )

        all_anti_aim_functions.anti_aim_builder.anti_bruteforce.current_angle = new_phase_return_value
    end

    all_anti_aim_functions.anti_aim_builder.anti_bruteforce.trigger_last_tick = GlobalVars.tickcount
end

all_anti_aim_functions.anti_aim_builder.anti_bruteforce.execute_bullet_impact_checks = function(e)
    if not menu_database.elements["Enable anti-bruteforce system"] then return end
    if all_anti_aim_functions.anti_aim_builder.anti_bruteforce.trigger_last_tick == GlobalVars.tickcount then
        return
    end

    if e:GetName() == "bullet_impact" then
        local is_local_player_valid, my_index = is_local_player_valid()
        if is_local_player_valid then
            local attacker = e:GetInt("userid")
            local get_attacker_as_player = EntityList.GetPlayerForUserID(attacker)

            if not get_attacker_as_player or get_attacker_as_player:IsDormant() or get_attacker_as_player:IsTeamMate() then
                return
            end

            local self_eye_position = my_index:GetEyePosition()
            local enemy_eye_position = get_attacker_as_player:GetEyePosition()
            local bullet_vector = Vector.new(e:GetInt("x"), e:GetInt("y"), e:GetInt("z"))

            return all_anti_aim_functions.anti_aim_builder.anti_bruteforce.check_bullet_impact(bullet_vector, enemy_eye_position, self_eye_position)
        end
    end
end

all_anti_aim_functions.anti_aim_builder.anti_bruteforce.apply_anti_brute_settings = function()
    if not menu_database.elements["Enable anti-bruteforce system"] then return end
    local is_local_player_valid, my_index = is_local_player_valid()

    if is_local_player_valid then
        if all_anti_aim_functions.anti_aim_builder.anti_bruteforce.reset_timer < GlobalVars.realtime then
            return
        end

        AntiAim.OverrideInverter(all_anti_aim_functions.anti_aim_builder.anti_bruteforce.current_angle < 0)
        AntiAim.OverrideLimit(math.abs(all_anti_aim_functions.anti_aim_builder.anti_bruteforce.current_angle))
    end
end
--- @endregion

--- @region: all visual functions
local all_visual_functions = {}
all_visual_functions.is_available_to_render_indicators = false
all_visual_functions.is_available_to_render_arrows = false

all_visual_functions.start_render = function()
    local is_local_player_valid, my_index = is_local_player_valid()
    if is_local_player_valid then
        all_visual_functions.is_available_to_render_indicators = menu_database.elements["Enable visual controller"]
        all_visual_functions.is_available_to_render_arrows = menu_database.elements["Enable other controllers"]
    end
end

all_visual_functions.get_desync_angle = function()
    local is_local_player_valid, my_index = is_local_player_valid()
    if is_local_player_valid then
        local current_real_rotation = AntiAim.GetCurrentRealRotation()
        local min_desync_delta, max_desync_delta = AntiAim.GetMinDesyncDelta(), AntiAim.GetMaxDesyncDelta()

        local self_eye_angles = my_index:GetProp("m_angEyeAngles[1]")
        local degree = math.normalize(current_real_rotation - self_eye_angles)

        local clamped_delta = math.clamp(degree, min_desync_delta, max_desync_delta)
        local rounded_delta = math:round(clamped_delta)
        local absed_delta = math.abs(rounded_delta)

        return absed_delta
    end
end

all_visual_functions.is_color_equals = function(first_color, second_color)
    return first_color.r == second_color.r and first_color.g == second_color.g and first_color.b == second_color.b and first_color.a == second_color.a
end

all_visual_functions.animation_lerp = function(start_position, final_position, time)
    if not time then
        time = 0.095
    end

    time = math.clamp(GlobalVars.frametime * (time * 175), 0, 1)
    if type(start_position) == "userdata" then
        local r, g, b, a = start_position.r, start_position.g, start_position.b, start_position.a
        local e_r, e_g, e_b, e_a = final_position.r, final_position.g, final_position.b, final_position.a

        r = all_visual_functions.animation_lerp(r, e_r, time)
        g = all_visual_functions.animation_lerp(g, e_g, time)
        b = all_visual_functions.animation_lerp(b, e_b, time)
        a = all_visual_functions.animation_lerp(a, e_a, time)

        return Color.new(r, g, b, a)
    end

    local delta = final_position - start_position
    delta = delta * time
    delta = delta + start_position

    if final_position == 0 and delta < 0.01 and delta > -0.01 then
        delta = 0
    elseif final_position == 1 and delta < 1.01 and delta > 0.99 then
        delta = 1
    end

    return delta
end

all_visual_functions.animation_list = {}
all_visual_functions.animation_speed = 0.095

all_visual_functions.update_animations = function()
    for k, v in pairs(all_visual_functions.animation_list) do
        if not all_visual_functions.animation_list[k].called_this_frame then
            if all_visual_functions.create_animation(k, 0, true) == 0 then
                all_visual_functions.animation_list[k] = nil
            end
            goto skip
        end

        all_visual_functions.animation_list[k].called_this_frame = false
        ::skip::
    end
end

all_visual_functions.create_animation = function(name, new_value, removing)
    if not all_visual_functions.animation_list[name] then
        all_visual_functions.animation_list[name] = {}
        all_visual_functions.animation_list[name].color = Color.RGBA(0, 0, 0, 0)
        all_visual_functions.animation_list[name].number = 0
        all_visual_functions.animation_list[name].called_this_frame = true
    end

    if not removing then
        all_visual_functions.animation_list[name].called_this_frame = true
    end

    if type(new_value) == "userdata" then
        local lerping = all_visual_functions.animation_lerp(all_visual_functions.animation_list[name].color, new_value, all_visual_functions.animation_speed)
        all_visual_functions.animation_list[name].color = lerping
      
        return lerping
    end

    local lerping = all_visual_functions.animation_lerp(all_visual_functions.animation_list[name].number, new_value, all_visual_functions.animation_speed)
    all_visual_functions.animation_list[name].number = lerping

    return lerping
end

all_visual_functions.get_animation = function(name)
    return all_visual_functions.animation_list[name] == nil and {number = 0, color = Color.RGBA(255, 255, 255, 0), called_this_frame = false} or all_visual_functions.animation_list[name]
end

local font = {}
font.list = {}

font.initialize = function(font_name, size, anti_aliasing, bold, italic)
    local array_index = ("name[%s]size[%d]flags[%d%d%d]"):format(font_name, size, anti_aliasing and 1 or 0, bold and 1 or 0, italic and 1 or 0)
    if font.list[array_index] ~= nil then
        return font.list[array_index]
    end

    local flags = {}
    if anti_aliasing then
        table.insert(flags, "r")
    end

    if bold then
        table.insert(flags, "b")
    end

    if italic then
        table.insert(flags, "i")
    end

    local final_font = Render.InitFont(font_name, size, flags)
    font.list[array_index] = final_font

    return final_font
end

all_visual_functions.under_crosshair_indicator_font = font.initialize("nl\\killaura.lua\\fonts\\smallest_pixel-7.ttf", 9, false, false, false)
all_visual_functions.under_crosshair_indicator = function()
    local font = all_visual_functions.under_crosshair_indicator_font
    local inverter_state = AntiAim.GetInverterState()

    local add_y = 30
    local main_color = Color.RGBA(164, 202, 255, 255)

    local get_binds = get_binds()
    local isDT = get_binds.isDT
    local isHS = get_binds.isHS
    local isDMG = get_binds.isDMG
    local isFS = get_binds.isFS

    Render.Text("KILLAURA", Vector2.new(screen_size.x / 2, screen_size.y / 2 + add_y), main_color, 9, font, true)
    Render.Text(inverter_state and ">" or "<", Vector2.new(screen_size.x / 2 + 42, screen_size.y / 2 + add_y), main_color, 9, font, true)

    add_y = add_y + 11
    local current_text = ("M: %s"):format(indicator_state)
    local text_size = Render.CalcTextSize(current_text, 9, font)
    local constant_x_position = 58

    Render.BoxFilled(
        Vector2.new(screen_size.x / 2, screen_size.y / 2 + add_y), Vector2.new(screen_size.x / 2 + constant_x_position, screen_size.y / 2 + add_y + 1),
        Color.RGBA(255, 255, 255, 255)
    )

    Render.GradientBoxFilled(
        Vector2.new(screen_size.x / 2, screen_size.y / 2 + add_y), Vector2.new(screen_size.x / 2 + constant_x_position, screen_size.y / 2 + add_y + 30),
        Color.RGBA(255, 255, 255, 50), Color.RGBA(255, 255, 255, 50), Color.RGBA(0, 0, 0, 0), Color.RGBA(0, 0, 0, 0)
    )
  
    Render.BoxFilled(
        Vector2.new(screen_size.x / 2, screen_size.y / 2 + add_y + 29), Vector2.new(screen_size.x / 2 + constant_x_position, screen_size.y / 2 + add_y + 30),
        Color.RGBA(255, 255, 255, 255)
    )

    local desync_angle = all_visual_functions.get_desync_angle()
    local danger_situation = desync_angle > 50 and 1 or (desync_angle <= 50 and desync_angle >= 15) and 2 or 3
    local desync_text = ("A: %s°; %sx"):format(desync_angle, danger_situation)

    Render.Text(desync_text, Vector2.new(screen_size.x / 2 + 1, screen_size.y / 2 + add_y), main_color, 9, font, true)
    add_y = add_y + 9

    Render.Text(current_text, Vector2.new(screen_size.x / 2, screen_size.y / 2 + add_y), main_color, 9, font, true)
    add_y = add_y + 9
  
    local second_color = Color.RGBA(255, 255, 255, 150)
    Render.Text("DT", Vector2.new(screen_size.x / 2, screen_size.y / 2 + add_y), isDT and main_color or second_color, 9, font, true)
    Render.Text("HS", Vector2.new(screen_size.x / 2 + 12, screen_size.y / 2 + add_y), isHS and main_color or second_color, 9, font, true)
    Render.Text("DMG", Vector2.new(screen_size.x / 2 + 26, screen_size.y / 2 + add_y), isDMG and main_color or second_color, 9, font, true)
    Render.Text("FS", Vector2.new(screen_size.x / 2 + 46, screen_size.y / 2 + add_y), isFS and main_color or second_color, 9, font, true)
end

all_visual_functions.menu_effects = {}

all_visual_functions.menu_effects.all_points = 200
all_visual_functions.menu_effects.distance = 200

all_visual_functions.menu_effects.global_alpha = 0
all_visual_functions.menu_effects.dots = ffi.new(("float[%s][6]"):format(all_visual_functions.menu_effects.all_points))

all_visual_functions.menu_effects.generate = function(value)
    all_visual_functions.menu_effects.dots = {}
    for i = 0, value - 1 do
        local particle_settings = ffi.new("float[?]", 6)

        particle_settings[0] = math.random(0, screen_size.x)
        particle_settings[1] = math.random(0, screen_size.y)

        particle_settings[2] = math.random(0.75, 1)
        particle_settings[3] = math.random(1, 2)

        particle_settings[4] = math.random(-2, 2) * 25
        particle_settings[5] = math.random(-2, 2) * 25

        all_visual_functions.menu_effects.dots[i] = particle_settings
    end
end

all_visual_functions.menu_effects.c_velocity = ffi.new("float[?]", 2)
all_visual_functions.menu_effects.c_connections = ffi.new("float[?]", 10)
all_visual_functions.menu_effects.screen_size = ffi.new("float[?]", 2)

all_visual_functions.menu_effects.render_stuff = function()
    if Cheat.IsMenuVisible() then
        local mouse_position = Cheat.GetMousePos()
        local menu_position = Render.GetMenuPos()
        local menu_size = Render.GetMenuSize()
        local directory = all_visual_functions.menu_effects

        directory.c_connections[0] = mouse_position.x
        directory.c_connections[1] = mouse_position.y
  
        directory.c_connections[2] = menu_position.x
        directory.c_connections[3] = menu_position.y
  
        directory.c_connections[4] = menu_position.x + menu_size.x
        directory.c_connections[5] = menu_position.y
  
        directory.c_connections[6] = menu_position.x + menu_size.x
        directory.c_connections[7] = menu_position.y + menu_size.y
  
        directory.c_connections[8] = menu_position.x
        directory.c_connections[9] = menu_position.y + menu_size.y

        local frametime = GlobalVars.frametime
        local color = all_visual_functions.copy_color(Color.RGBA(255, 255, 255, 255))

        for i = 0, directory.all_points - 1 do
            local current_element = directory.dots[i]

            directory.c_velocity[0] = current_element[4] * frametime
            directory.c_velocity[1] = current_element[5] * frametime

            if current_element[0] + directory.c_velocity[0] > screen_size.x or current_element[0] + directory.c_velocity[0] < 0 then
                directory.dots[i][4] = -current_element[4]
                directory.c_velocity[0] = -directory.c_velocity[0]
            end
  
            if current_element[1] + directory.c_velocity[1] > screen_size.y or current_element[1] + directory.c_velocity[1] < 0 then
                directory.dots[i][5] = -current_element[5]
                directory.c_velocity[1] = -directory.c_velocity[1]
            end

            directory.dots[i][0] = current_element[0] + directory.c_velocity[0]
            directory.dots[i][1] = current_element[1] + directory.c_velocity[1]
  
            color.a = current_element[2]
            Render.CircleFilled(Vector2.new(current_element[0], current_element[1]), current_element[3], 7, color)

            for i = 0, 9, 2 do
                local current_distance = math.abs(current_element[0] - directory.c_connections[i]) + math.abs(current_element[1] - directory.c_connections[i + 1])
                if current_distance < directory.distance then
                    color.a = 1 - (current_distance / directory.distance)
                    Render.Line(Vector2.new(directory.c_connections[i], directory.c_connections[i + 1]), Vector2.new(current_element[0], current_element[1]), color)

                    break
                end
            end
        end
    end
end

all_visual_functions.menu_effects.generate(all_visual_functions.menu_effects.all_points)
all_visual_functions.convert_value_to_x_offset = function(value)
    return Vector2.new((screen_size.x / 100) * value, 0)
end

all_visual_functions.create_arrow_positions = function(distance)
    local converted_x_position = all_visual_functions.convert_value_to_x_offset(distance)
    local new_positions = {
        ["Left"] = {
            Vector2.new(0, -10),
            Vector2.new(-15, 0),
            Vector2.new(0, 10),
        },

        ["Right"] = {
            Vector2.new(0, -10),
            Vector2.new(15, 0),
            Vector2.new(0, 10),
        }
    }

    local new_x_position = Vector2.new(0, converted_x_position.x)
    local old_positions = {
        ["Left"] = Vector2.new(screen_size.x / 2, screen_size.y / 2) - converted_x_position,
        ["Right"] = Vector2.new(screen_size.x / 2, screen_size.y / 2) + converted_x_position
    }

    for key, offset in pairs(new_positions) do
        for table, new_position in ipairs(offset) do
            new_positions[key][table] = new_position + old_positions[key]
        end
    end

    return new_positions, old_positions
end

all_visual_functions.teamskeet_arrows = function()
    local selected_distance = menu_database.elements["Teamskeet distance"]
    all_visual_functions.arrow_new_positions, all_visual_functions.arrow_old_positions = all_visual_functions.create_arrow_positions(selected_distance)

    local inverter_state = AntiAim.GetInverterState()
    local line_color = Color.RGBA(255, 255, 255, 255)
    local base_color = Color.RGBA(175, 255, 0, 255)

    local yaw_base = directories.yaw_base:GetInt()
    local current_yaw_base = yaw_base == 2 and "Right" or yaw_base == 3 and "Left" or "None"
    local current_side = inverter_state and "Right" or "Left"

    local new_positions = all_visual_functions.arrow_new_positions
    local old_positions = all_visual_functions.arrow_old_positions

    for key, positions in pairs(new_positions) do
        local side_value = key == "Right" and -1 or 1
        local side_color = Color.new(
            key == current_side and line_color.r or 0,
            key == current_side and line_color.g or 0,
            key == current_side and line_color.b or 0,
            key == current_side and line_color.a or 0.35
        )

        local yaw_color = Color.new(
            key == current_yaw_base and base_color.r or 0,
            key == current_yaw_base and base_color.g or 0,
            key == current_yaw_base and base_color.b or 0,
            key == current_yaw_base and base_color.a or 0.35
        )

        Render.PolyFilled(yaw_color, unpack(positions))
        Render.BoxFilled(old_positions[key] + Vector2.new(side_value, -10), old_positions[key] + Vector2.new(3 * side_value, 10), side_color)

        ::skip::
    end
end

all_visual_functions.end_render = function()
    all_visual_functions.update_animations()
    all_visual_functions.is_available_to_render_indicators = false
    all_visual_functions.is_available_to_render_arrows = false
end

all_visual_functions.weapons_in_scope = {}
all_visual_functions.weapons_in_scope.cache = nil

all_visual_functions.weapons_in_scope.setup_logic = function(stage)
    if stage == 5 then
        if not menu_database.elements["Enable visual controller"] or bit.band(menu_database.elements["Visual controllers"], bit.lshift(1, 4)) == 0 then
            loaded_cvars.fov_cs_debug:SetInt(0)
            return
        end

        local is_local_player_valid, my_index = is_local_player_valid()
        if is_local_player_valid then
            all_visual_functions.weapons_in_scope.cache = my_index:GetProp("m_bIsScoped")
            loaded_cvars.fov_cs_debug:SetInt(all_visual_functions.weapons_in_scope.cache and 90 or 0)
        end
    end
end

all_visual_functions.weapons_in_scope.on_destroy = function()
    loaded_cvars.fov_cs_debug:SetInt(0)
end
--- @endregion

--- @region: all miscellaneous functions
local all_miscellaneous_functions = {}
all_miscellaneous_functions.hitsound_work = function(e)
    if not menu_database.elements["Enable hitsound"] then return end
    local is_local_player_valid, my_index = is_local_player_valid()

    if is_local_player_valid then
        if e:GetName() == "player_hurt" then
            local victim = e:GetInt("userid")
            local attacker = e:GetInt("attacker")
  
            local get_victim_as_player = EntityList.GetPlayerForUserID(victim)
            local get_target_as_player = EntityList.GetPlayerForUserID(attacker)

            if get_victim_as_player == get_target_as_player or get_target_as_player ~= my_index then
                return
            end

            local sound_directory = "killaura_hitsound.wav"
            local sound_volume = menu_database.elements["Hitsound volume"] / 100

            ffi_handler.play_custom_sound(sound_directory, sound_volume, 100, 0, 0)
        end
    end
end

all_miscellaneous_functions.trashtalk_phrases = {
    "полощи рот спермой шлюха дырявая",
    "прикупи конфиг у кимбора нищий хуесос",
    "еще че в хуй своего отца скажешь",
    "i think you need this, https://shoppy.gg/@k1mbor ",
    "выебан by killaura.technologies.",
    "天安门大屠杀REAL HACK KILLAURA??八九民运WTF天安门事件NEVERLOSE CFG?",
    "тихий час, спать нахуй",
    "ты один из тех людей кто занимает 3 место при игре 1x1",
    "я ебал твою vfnm",
    "я твою мать на батеной жигули сбил к хуям"
}

all_miscellaneous_functions.trashtalk = function(e)
    if not menu_database.elements["Enable trashtalk"] then return end
    local is_local_player_valid, my_index = is_local_player_valid()

    if is_local_player_valid then
        if e:GetName() == "player_death" then
            local victim = e:GetInt("userid")
            local attacker = e:GetInt("attacker")

            local get_victim_as_player = EntityList.GetPlayerForUserID(victim)
            local get_target_as_player = EntityList.GetPlayerForUserID(attacker)

            if get_victim_as_player == get_target_as_player or get_target_as_player ~= my_index then
                return
            end

            local phrases = all_miscellaneous_functions.trashtalk_phrases
            local get_phrase = phrases[math.random(1, #phrases)]:gsub('\"', '')

            local command = ("say \"%s\""):format(get_phrase)
            EngineClient.ExecuteClientCmd(command)
        end
    end
end

all_miscellaneous_functions.animation_breakers = {}
all_miscellaneous_functions.animation_breakers.collected_cache = {}

all_miscellaneous_functions.animation_breakers.studio_hdr_offset = 0x2950
all_miscellaneous_functions.animation_breakers.animstate_offset = 0x9960
all_miscellaneous_functions.animation_breakers.landing_offset = 0x109

all_miscellaneous_functions.animation_breakers.set_custom_pose_parameters_settings = function(self_pointer, layer, start_value, end_value)
    local new_player_pointer = ffi.cast("unsigned int", self_pointer)
    local NULL = 0x0

    if new_player_pointer == NULL then
        return false
    end

    local studio_hdr_offset = all_miscellaneous_functions.animation_breakers.studio_hdr_offset
    local studio_hdr = ffi.cast("void**", new_player_pointer + studio_hdr_offset)[0]

    if not studio_hdr or studio_hdr == NULL then
        return false
    end

    local pose_parameters = ffi_handler.get_pose_parameters(studio_hdr, layer)
    if not pose_parameters or pose_parameters == NULL then
        return false
    end

    if all_miscellaneous_functions.animation_breakers.collected_cache[layer] == nil then
        all_miscellaneous_functions.animation_breakers.collected_cache[layer] = {}

        all_miscellaneous_functions.animation_breakers.collected_cache[layer].m_flStart = pose_parameters.m_flStart
        all_miscellaneous_functions.animation_breakers.collected_cache[layer].m_flEnd = pose_parameters.m_flEnd
        all_miscellaneous_functions.animation_breakers.collected_cache[layer].m_flState = pose_parameters.m_flState

        all_miscellaneous_functions.animation_breakers.collected_cache[layer].is_applied = false
        return true
    end

    if start_value ~= nil and not all_miscellaneous_functions.animation_breakers.collected_cache[layer].is_applied then
        pose_parameters.m_flStart = start_value
        pose_parameters.m_flEnd = end_value

        pose_parameters.m_flState = (pose_parameters.m_flStart + pose_parameters.m_flEnd) / 2
        all_miscellaneous_functions.animation_breakers.collected_cache[layer].is_applied = true

        return true
    end

    if all_miscellaneous_functions.animation_breakers.collected_cache[layer].is_applied then
        pose_parameters.m_flStart = all_miscellaneous_functions.animation_breakers.collected_cache[layer].m_flStart
        pose_parameters.m_flEnd = all_miscellaneous_functions.animation_breakers.collected_cache[layer].m_flEnd
        pose_parameters.m_flState = all_miscellaneous_functions.animation_breakers.collected_cache[layer].m_flState

        all_miscellaneous_functions.animation_breakers.collected_cache[layer].is_applied = false
        return true
    end
  
    return false
end

all_miscellaneous_functions.animation_breakers.on_prediction = function(cmd)
    if not menu_database.elements["Enable animation breakers"] then return end
    local is_local_player_valid, my_index = is_local_player_valid()

    if is_local_player_valid then
        local self_index = my_index:EntIndex()
        local local_player = ffi_handler.get_client_entity(self_index)
        local NULL = 0x0
      
        if not local_player or local_player == NULL then
            return
        end

        local local_player_address = ffi.cast("unsigned int", local_player)
        if not local_player_address or local_player_address == NULL then
            return
        end

        local animstate_offset = all_miscellaneous_functions.animation_breakers.animstate_offset
        local animstate = ffi.cast("void**", local_player_address + animstate_offset)[0]

        if not animstate or animstate == NULL then
            return
        end

        animstate = ffi.cast("unsigned int", animstate)
        if not animstate or animstate == 0x0 then
            return
        end
      
        local landing_offset = all_miscellaneous_functions.animation_breakers.landing_offset
        local animation_on_landing = ffi.cast("bool*", animstate + landing_offset)[0]
      
        if not landing_offset or landing_offset == NULL then
            return
        end

        local addons_direction = menu_database.elements["Animation breakers"]
        local set_pose_parameters = all_miscellaneous_functions.animation_breakers.set_custom_pose_parameters_settings

        if bit.band(addons_direction, bit.lshift(1, 0)) ~= 0 then
            set_pose_parameters(local_player, 6, 0.9, 1)
        end

        if bit.band(addons_direction, bit.lshift(1, 1)) ~= 0 then
            if animation_on_landing and bit.band(cmd.buttons, 2) == 0 then
                set_pose_parameters(local_player, 12, 0.999, 1)
            end
        end

        if bit.band(addons_direction, bit.lshift(1, 2)) ~= 0 then
            directories.leg_movement:Set(cmd.command_number % 3 == 0 and 0 or 1)
            set_pose_parameters(local_player, 0, -180, -179)
        end
    end
end

all_miscellaneous_functions.animation_breakers.on_create_move = function()
    if not menu_database.elements["Enable animation breakers"] then return end
    local is_local_player_valid, my_index = is_local_player_valid()

    if is_local_player_valid then
        local self_index = my_index:EntIndex()
        local local_player = ffi_handler.get_client_entity(self_index)
        local NULL = 0x0
      
        if not local_player or local_player == NULL then
            return
        end

        local pose_parameters_cache = all_miscellaneous_functions.animation_breakers.collected_cache
        local set_pose_parameters = all_miscellaneous_functions.animation_breakers.set_custom_pose_parameters_settings

        for key, cache in pairs(pose_parameters_cache) do
            set_pose_parameters(local_player, key)
        end
    end
end

all_miscellaneous_functions.hitgroups = {
    [0] = "generic",
    [1] = "head",
    [2] = "chest",
    [3] = "stomach",
    [4] = "left arm",
    [5] = "right arm",
    [6] = "left leg",
    [7] = "right leg",
    [10] = "gear"
}

all_miscellaneous_functions.miss_reasons = {
    [1] = "resolver",
    [2] = "spread",
    [3] = "occlusion",
    [4] = "pred. error"
}

all_miscellaneous_functions.hitlogs = function(shot)
    if not menu_database.elements["Enable hitlogs"] then return end
    local is_local_player_valid, my_index = is_local_player_valid()

    if is_local_player_valid then
        local final_text = ""
        local index = EntityList.GetClientEntity(shot.target_index)
        if not index then
            return
        end

        local target = index:GetPlayer()
        local target_name = target:GetName()
        local simtime, flags, exploits = GlobalVars.tickcount % 17, "", 0

        local get_binds = get_binds()
        local isDT, isHS = get_binds.isDT, get_binds.isHS

        if isDT then
            exploits = 2
            flags = "T"
        elseif isHS then
            exploits = 1
            flags = "H"
        else
            flags = "B"
            exploits = 0
        end

        if shot.reason == 0 then
            final_text = ("[%s/%s] [%s/%s] Hit %s's %s for %s(%s) (%s remaining) aimed=%s(%s%%%%) bt=%s (%s) (%s:%s)"):format(
                math.random(0, 100), math.random(0, 100), math.random(0, 100), math.random(0, 100), target_name,
                all_miscellaneous_functions.hitgroups[math.min(shot.hitgroup, 10)], shot.damage,
                shot.wanted_damage, math.max(0, target:GetProp("m_iHealth") - shot.damage), all_miscellaneous_functions.hitgroups[math.min(shot.wanted_hitgroup, 10)],
                shot.hitchance, shot.backtrack, flags, simtime, exploits
            )
        else
            final_text = ("[%s/%s] [%s/%s] Missed %s's %s(%s)(%s%%%%) due to %s, bt=%s, (%s) (%s:%s)"):format(
                math.random(0, 100), math.random(0, 100), math.random(0, 100), math.random(0, 100), target_name,
                all_miscellaneous_functions.hitgroups[math.min(shot.wanted_hitgroup, 10)], shot.wanted_damage,
                shot.hitchance, all_miscellaneous_functions.miss_reasons[shot.reason], shot.backtrack, flags, simtime, exploits
            )
        end

        color_print("[Killaura.lua] ", Color.RGBA(247, 132, 207, 255))
        default_print(final_text)
    end
end
--- @endregion

--- @region: callback controller
local callback_controller = {}
callback_controller.check_for_errors = function()
    for callback_index = 1, #callback_controller do
        local current_callback = callback_controller[callback_index]
        local functions_in_callback = current_callback.functions
      
        local execute_callbacks = function(...)
            for function_index = 1, #functions_in_callback do
                local current_function = functions_in_callback[function_index]
                local status, message = pcall(current_function.r_function, ...)

                if not status then
                    local error_field = "execute_callbacks"
                    local all_error_messages = {
                        "Something went wrong! Send that error in our discord server!",
                        ("Function information: name - %s; address - %s!"):format(current_function.name, current_function.r_function),
                        ("Error message - %s"):format(message)
                    }

                    for error = 1, #all_error_messages do
                        local current_error_mesage = all_error_messages[error]
                        --print(current_error_mesage)
                    end

                    --_G[error_field]()
                end
            end
        end
      
        Cheat.RegisterCallback(current_callback.callback, execute_callbacks)
    end
end

callback_controller.subscribe = function(callback, name, r_function)
    name = name or "unknown"
    local is_callback_exists = false

    for callback_index = 1, #callback_controller do
        local current_callback = callback_controller[callback_index]
        local callback_name = current_callback.callback

        if callback_name == callback then
            is_callback_exists = true
            break
        end
    end

    if not is_callback_exists then
        table.insert(callback_controller, {callback = callback, functions = {}})
        is_callback_exists = true
    end
  
    for callback_index = 1, #callback_controller do
        local current_callback = callback_controller[callback_index]
        local callback_name = current_callback.callback

        if callback_name == callback then
            table.insert(current_callback.functions, {r_function = r_function, name = name})
            break
        end
    end

    callback_controller.check_for_errors()
    return true
end

--- @note: entrance to the zone of callbacking
local add_function = callback_controller.subscribe
add_function("prediction", "third_person_animation", function()
    local is_enabled = menu_database.elements["Enable visual controller"] and bit.band(menu_database.elements["Visual controllers"], bit.lshift(1, 2)) ~= 0
    Cheat.SetThirdPersonAnim(is_enabled)
end)

--- @note: ragebot functions
add_function("prediction", "noscope_hitchance", all_ragebot_functions.ragebot_manipulating.noscope_hitchance)
add_function("prediction", "in_air_hitchance", all_ragebot_functions.ragebot_manipulating.in_air_hitchance)
add_function("prediction", "automatic_teleport_in_the_air", all_ragebot_functions.doubletap_improvements.automatic_teleport_in_the_air)
add_function("prediction", "modify_doubletap_ticks", all_ragebot_functions.doubletap_improvements.modify_doubletap_ticks)
add_function("prediction", "dormant_aimbot [cmd]", all_ragebot_functions.dormant_aimbot.setup_logic)

--- @note: anti-aim functions
add_function("pre_prediction", "anti_aim_builder [cmd]", all_anti_aim_functions.anti_aim_builder.build_anti_aim)
add_function("prediction", "edge_yaw", all_anti_aim_functions.anti_aim_builder.edge_yaw)

add_function("events", "anti_bruteforce [execute_bullet_impact_checks] [events]", all_anti_aim_functions.anti_aim_builder.anti_bruteforce.execute_bullet_impact_checks)
add_function("pre_prediction", "anti_aim_builder [apply_anti_brute_settings]", all_anti_aim_functions.anti_aim_builder.anti_bruteforce.apply_anti_brute_settings)

--- @note: visual functions
add_function("draw", "start_render", all_visual_functions.start_render)
add_function("draw", "under_crosshair_indicator", function()
    local indicator_directory = menu_database.elements["Visual controllers"]
    local is_available = all_visual_functions.is_available_to_render_indicators

    if is_available and bit.band(indicator_directory, bit.lshift(1, 0)) ~= 0 then
        all_visual_functions.under_crosshair_indicator()
    end
end)

add_function("draw", "menu_effects", function()
    local indicator_directory = menu_database.elements["Visual controllers"]
    if bit.band(indicator_directory, bit.lshift(1, 3)) ~= 0 then
        all_visual_functions.menu_effects.render_stuff()
    end
end)

add_function("draw", "teamskeet_arrows", function()
    local indicator_directory = menu_database.elements["Other controllers"]
    local is_available = all_visual_functions.is_available_to_render_arrows

    if is_available and bit.band(indicator_directory, bit.lshift(1, 0)) ~= 0 then
        all_visual_functions.teamskeet_arrows()
    end
end)

add_function("draw", "end_render", all_visual_functions.end_render)
add_function("frame_stage", "weapons_in_scope", all_visual_functions.weapons_in_scope.setup_logic)
add_function("destroy", "weapons_in_scope [destroy]", all_visual_functions.weapons_in_scope.on_destroy)

--- @note: misc functions
add_function("events", "hitsound", all_miscellaneous_functions.hitsound_work)
add_function("events", "trashtalk", all_miscellaneous_functions.trashtalk)

add_function("createmove", "animation_breaker [on_create_move]", all_miscellaneous_functions.animation_breakers.on_create_move)
add_function("prediction", "animation_breaker [on_prediction] [cmd]", all_miscellaneous_functions.animation_breakers.on_prediction)

add_function("registered_shot", "hitlogs", all_miscellaneous_functions.hitlogs)
--- @endregion

--- @region: config section xD
local add_element = menu_database.add_element
local default_config = "                         Load default config                   "
local export_config = "             Export your config to clipboard       "
local import_config = "             Import your config to clipboard       "

local config_controller = {}
config_controller.validation_key = "3805ca8ff0dc26a4a236a8f26d6bd51a"

config_controller.convert_color = function(color)
    return {
        r = math:round(color.r * 255),
        g = math:round(color.g * 255),
        b = math:round(color.b * 255),
        a = math:round(color.a * 255),
    }
end

local json = Panorama.LoadString([[
    return {
        stringify: JSON.stringify,
        parse: JSON.parse
    };
]])()

local base64 = {}
local extract = function(v, from, width)
    return bit.band(bit.rshift(v, from), bit.lshift(1, width) - 1)
end

function base64.make_encoder(alphabet)
    local encoder = {}
    local t_alphabet = {}

    for i = 1, #alphabet do
        t_alphabet[i - 1] = alphabet:sub(i, i)
    end

    for b64code, char in pairs(t_alphabet) do
        encoder[b64code] = char:byte()
    end

    return encoder
end

function base64.make_decoder(alphabet)
    local decoder = {}
    for b64code, charcode in pairs(base64.make_encoder(alphabet)) do
        decoder[charcode] = b64code
    end

    return decoder
end

local default_encoder = base64.make_encoder("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=")
local default_decoder = base64.make_decoder("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=")

local custom_encoder = base64.make_encoder("KmAWpuFBOhdbI1orP2UN5vnSJcxVRgazk97ZfQqL0yHCl84wTj3eYXiD6stEGM+/=")
local custom_decoder = base64.make_decoder("KmAWpuFBOhdbI1orP2UN5vnSJcxVRgazk97ZfQqL0yHCl84wTj3eYXiD6stEGM+/=")

function base64.encode(str, encoder, usecaching)
    str = tostring(str)
    encoder = encoder or default_encoder

    local t, k, n = {}, 1, #str
    local lastn = n % 3
    local cache = {}

    for i = 1, n - lastn, 3 do
        local a, b, c = str:byte(i, i + 2)
        local v = a * 0x10000 + b * 0x100 + c
        local s = nil

        if usecaching then
            s = cache[v]
            if not s then
                s = string.char(encoder[extract(v, 18, 6)], encoder[extract(v, 12, 6)], encoder[extract(v, 6, 6)], encoder[extract(v, 0, 6)])
                cache[v] = s
            end
        else
            s = string.char(encoder[extract(v, 18, 6)], encoder[extract(v, 12, 6)], encoder[extract(v, 6, 6)], encoder[extract(v, 0, 6)])
        end

        t[k] = s
        k = k + 1
    end

    if lastn == 2 then
        local a, b = str:byte(n - 1, n)
        local v = a * 0x10000 + b * 0x100

        t[k] = string.char(encoder[extract(v, 18, 6)], encoder[extract(v, 12, 6)], encoder[extract(v, 6, 6)], encoder[64])
    elseif lastn == 1 then
        local v = str:byte(n) * 0x10000
        t[k] = string.char(encoder[extract(v, 18, 6)], encoder[extract(v, 12, 6)], encoder[64], encoder[64])
    end

    return table.concat(t)
end

function base64.decode(b64, decoder, usecaching)
    decoder = decoder or default_decoder
    local pattern = "[^%w%+%/%=]"

    if decoder then
        local s62, s63 = nil, nil
        for charcode, b64code in pairs(decoder) do
            if b64code == 62 then
                s62 = charcode
            elseif b64code == 63 then
                s63 = charcode
            end
        end
        pattern = ("[^%%w%%%s%%%s%%=]"):format(string.char(s62), string.char(s63))
    end

    b64 = b64:gsub(pattern, "")
    local cache = usecaching and {}
    local t, k = {}, 1
    local n = #b64
    local padding = b64:sub(-2) == "==" and 2 or b64:sub(-1) == "=" and 1 or 0

    for i = 1, padding > 0 and n - 4 or n, 4 do
        local a, b, c, d = b64:byte(i, i + 3)
        local s = nil

        if usecaching then
            local v0 = a * 0x1000000 + b * 0x10000 + c * 0x100 + d
            s = cache[v0]

            if not s then
                local v = decoder[a] * 0x40000 + decoder[b] * 0x1000 + decoder[c] * 0x40 + decoder[d]
                s = string.char(extract(v, 16, 8), extract(v, 8, 8), extract(v, 0, 8))
                cache[v0] = s
            end
        else
            local v = decoder[a] * 0x40000 + decoder[b] * 0x1000 + decoder[c] * 0x40 + decoder[d]
            s = string.char(extract(v, 16, 8), extract(v, 8, 8), extract(v, 0, 8))
        end

        t[k] = s
        k = k + 1
    end

    if padding == 1 then
        local a, b, c = b64:byte(n - 3, n - 1)
        local v = decoder[a] * 0x40000 + decoder[b] * 0x1000 + decoder[c] * 0x40

        t[k] = string.char(extract(v, 16, 8), extract(v, 8, 8))
    elseif padding == 2 then
        local a, b = b64:byte(n - 3, n - 2)
        local v = decoder[a] * 0x40000 + decoder[b] * 0x1000

        t[k] = string.char(extract(v, 16, 8))
    end

    return table.concat(t)
end

config_controller.export_data = function()
    local all_menu_elements = {}
    local all_references = menu_database.references
    local convert_color = config_controller.convert_color

    for key, element in pairs(all_references) do
        local element_cache = {}
        element_cache.value = element.reference:Get()

        if type(element_cache.value) == "userdata" then
            element_cache.color = convert_color(element_cache.value)
            element_cache.value = nil
        else
            element_cache.color = element.is_color and convert_color(element.reference:GetColor()) or false
        end

        if not element_cache.color and not element_cache.value then
            goto skip
        end

        ::skip::
        all_menu_elements[key] = element_cache
    end

    all_menu_elements[config_controller.validation_key] = true
    local json_config = json.stringify(all_menu_elements)
    local base_64_decoded = base64.encode(json_config, custom_encoder)

    ffi_handler.set_clipboard_text(base_64_decoded, #base_64_decoded)
end

config_controller.load_data = function(text)
    local protected = function()
        local final_text = text or ffi_handler.get_clipboard_text()
        local json_config = base64.decode(final_text, custom_decoder)

        if not json_config:match(config_controller.validation_key) then
            print("Your validation key is wrong!")
            error()
            return
        end

        json_config = json.parse(json_config)
        if not json_config then
            print("Your JSON-config is wrong!")
            error()
            return
        end

        local anti_bruteforce_phases = -1
        for key, element in pairs(json_config) do
            if key == config_controller.validation_key then
                goto skip
            end

            if key:find("^Phase #") ~= nil then
                local ab_value = tonumber(key:sub(#"Phase #" + 1, #key))
                anti_bruteforce_phases = math.max(ab_value, anti_bruteforce_phases)
            end

            if menu_database.references[key] ~= nil then
                if element.value ~= nil then
                    menu_database.references[key].reference:Set(element.value)
                    menu_database.elements[key] = element.value
                end

                if element.color ~= false then
                    menu_database.references[key].reference:SetColor(Color.RGBA(v.color.r, v.color.g, v.color.b, v.color.a))
                end
            end

            ::skip::
        end

        if #menu_database.phases > anti_bruteforce_phases then
            while #menu_database.phases > anti_bruteforce_phases do
                remove_old_phase()
            end
        else
            while #menu_database.phases < anti_bruteforce_phases do
                add_new_phase()
            end
        end

        for phase = 1, anti_bruteforce_phases do
            local phase_counter = ("Phase #%s"):format(phase)
            menu_database.references[phase_counter].reference:Set(json_config[phase_counter].value)
            menu_database.elements[phase_counter] = json_config[phase_counter].value
        end

        menu_database.update_elements()
        Cheat.AddNotify("Killaura.lua", "Config successfully loaded!")
    end

    local is_successfull, error_message = pcall(protected)
    if not is_successfull then
        Cheat.AddNotify("Killaura.lua", "Failed to load config!")
        return
    end
end

local default_config_link = "https://raw.githubusercontent.com/strexxter/killaura_configs/main/default_config"
add_element(false, "Load default config", Menu.Button("Killaura: Miscellaneous", "Config system", default_config, "Click to load default config!", function()
    Http.GetAsync(default_config_link, function(data_from_link)
        config_controller.load_data(data_from_link)
    end)
end))

add_element(false, "Export config to clipboard", Menu.Button("Killaura: Miscellaneous", "Config system", export_config, "Click to export your config to the clipboard!",
function()
    config_controller.export_data()
end))

add_element(false, "Import config from clipboard", Menu.Button("Killaura: Miscellaneous", "Config system", import_config, "Click to import your config from the clipboard!",
function()
    config_controller.load_data()
end))
--- @endregion
 
Последнее редактирование:
Забаненный
Статус
Оффлайн
Регистрация
16 Фев 2022
Сообщения
51
Реакции[?]
27
Поинты[?]
0
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
nikogda nikogda
Пользователь
Статус
Оффлайн
Регистрация
29 Окт 2018
Сообщения
305
Реакции[?]
99
Поинты[?]
0
Пиздец... Это даже на сурсы стыдно разбирать :anguished:
 
Забаненный
Статус
Оффлайн
Регистрация
16 Фев 2022
Сообщения
51
Реакции[?]
27
Поинты[?]
0
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
Забаненный
Статус
Оффлайн
Регистрация
6 Сен 2021
Сообщения
94
Реакции[?]
22
Поинты[?]
0
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
local bit = { band = bit.band, lshift = bit.lshift, rshift = bit.rshift, bor = bit.bor, bnot = bit.bnot } local ffi = require("ffi") local ffi = { C = ffi.C, cdef = ffi.cdef, cast = ffi.cast, typeof = ffi.typeof, sizeof = ffi.sizeof, new = ffi.new, load = ffi.load, string = ffi.string } local Utils = { CreateInterface = Utils.CreateInterface, RandomFloat = Utils.RandomFloat, PatternScan = Utils.PatternScan } local table = { concat = table.concat, insert = table.insert, remove = table.remove, sort = table.sort } local string = { char = string.char } local Color = { RGBA = Color.RGBA, new = Color.new } local EngineClient = { GetScreenSize = EngineClient.GetScreenSize, ExecuteClientCmd = EngineClient.ExecuteClientCmd, GetLocalPlayer = EngineClient.GetLocalPlayer, IsInGame = EngineClient.IsInGame, IsConnected = EngineClient.IsConnected, GetViewAngles = EngineClient.GetViewAngles } local EngineTrace = { TraceRay = EngineTrace.TraceRay } local EntityList = { GetClientEntity = EntityList.GetClientEntity, GetPlayer = EntityList.GetPlayer, GetPlayerResource = EntityList.GetPlayerResource, GetEntitiesByName = EntityList.GetEntitiesByName, GetPlayerForUserID = EntityList.GetPlayerForUserID } local Panorama = { Open = Panorama.Open, LoadString = Panorama.LoadString } local Vector = { new = Vector.new } local Vector2 = { new = Vector2.new } local Http = { GetAsync = Http.GetAsync } local Render = { InitFont = Render.InitFont, Text = Render.Text, BoxFilled = Render.BoxFilled, GradientBoxFilled = Render.GradientBoxFilled, CalcTextSize = Render.CalcTextSize, WorldToScreen = Render.WorldToScreen, GetMenuPos = Render.GetMenuPos, GetMenuSize = Render.GetMenuSize, CircleFilled = Render.CircleFilled, Line = Render.Line, PolyFilled = Render.PolyFilled } local QAngle = { new = QAngle.new } local RageBot = { OverrideHitchance = RageBot.OverrideHitchance } local Cheat = { GetCheatUserName = Cheat.GetCheatUserName, AddNotify = Cheat.AddNotify, RegisterCallback = Cheat.RegisterCallback, GetBinds = Cheat.GetBinds, FireBullet = Cheat.FireBullet, VectorToAngle = Cheat.VectorToAngle, AngleToForward = Cheat.AngleToForward, SetThirdPersonAnim = Cheat.SetThirdPersonAnim, IsMenuVisible = Cheat.IsMenuVisible, GetMousePos = Cheat.GetMousePos } local Menu = { Text = Menu.Text, Button = Menu.Button, Switch = Menu.Switch, Combo = Menu.Combo, MultiCombo = Menu.MultiCombo, SliderInt = Menu.SliderInt, DestroyItem = Menu.DestroyItem, FindVar = Menu.FindVar, SliderFloat = Menu.SliderFloat } local Exploits = { ForceTeleport = Exploits.ForceTeleport, OverrideDoubleTapSpeed = Exploits.OverrideDoubleTapSpeed, GetCharge = function() return Exploits.GetCharge() end } local CVar = { FindVar = CVar.FindVar }
человек долбаеб или это реально может нести каокй то смысл?
 
Сверху Снизу