LUA скрипт [Gamesense] - skeetsense

ЧВК EB_LAN
Эксперт
Статус
Оффлайн
Регистрация
26 Янв 2021
Сообщения
1,567
Реакции[?]
522
Поинты[?]
185K
Сливаю свою недоделанную луашку, были планы но я проленился.
Из готового только в целом большой антиаим билдер, в планах было добавить много чего но я поленился, есть кнопки мануалов но я не доделал тк поленился опять же, используйте фристенды.
луашка на геймсенс кстати
code_language.lua:
-- @Note from Hatori: Translate some API documentated functions from "snake_case" to "CamelCase" codestyle.
local Get, Set, Find, AddCheckbox, AddSlider, AddCombo, AddMultiCombo, AddLabel, AddHotkey, SetVisible, RegisterCallback, GetProp = ui.get, ui.set, ui.reference, ui.new_checkbox, ui.new_slider, ui.new_combobox, ui.new_multiselect, ui.new_label, ui.new_hotkey, ui.set_visible, client.set_event_callback, entity.get_prop
-- @Note from Hatori: Reduce tab namings.
local Strings = {
    Tabs = {"Home", "Ragebot", "Antiaim", "Visuals", "Misc"},
    AntiaimConditions = {"Config", "Standing", "On walking", "On running", "On duck", "On moving in duck", "In air", "Crouching in air"},
    YawModes = {"Default", "Switch"},
    YawCustomize = {"Default", "Advanced"},
    YawAdditivies = {"Default", "Centered", "Delayed", "Half-swayed"},
    JitterModes = {"Disabled", "Offset", "Center", "Ways"},
    DesyncModes = {"Static", "Freestand", "Jitter", "Cycle"},
    LagExploitModes = {"Cycle", "Always"},
    PitchModeLag = {"Down", "Up", "Zero", "Ideal", "Step", "Random", "Cycle"},
    YawModeLag = {"None", "Jitter", "Step", "Spin", "Half-sway", "Random", "Forward"}
}
-- @Note from Hatori: Fuck LUA & B, all my homies makes.
local LuaTab, LuaChild = "LUA", "A"
-- @Note from Hatori: Reference to cheat functions and create lua elements.
local Cheat = {
    Ui = {
        Rage = {
            MinDamage = Find('RAGE', 'Aimbot', 'Minimum damage'),
            MinDamageOverride = { Find('RAGE', 'Aimbot', 'Minimum damage override') },
            ForceSafepoint = Find('RAGE', 'Aimbot', 'Force safe point'),
            ForceBodyaim = Find('RAGE', 'Aimbot', 'Force body aim')
        },
        Antiaim = {
            Enabled = Find('AA', 'Anti-aimbot angles', 'Enabled'),
            PitchMode = { Find('AA', 'Anti-aimbot angles', 'Pitch') },
            YawBase = Find('AA', 'Anti-aimbot angles', 'Yaw base'),
            Angles = {
                Yaw = { Find('AA', 'Anti-aimbot angles', 'Yaw') },
                YawJitter = { Find('AA', 'Anti-aimbot angles', 'Yaw jitter') },
                Desync = { Find('AA', 'Anti-aimbot angles', 'Body yaw') },
                Roll = Find('AA', 'Anti-aimbot angles', 'Roll')
            },
            DesyncFreestanding = Find('AA', 'Anti-aimbot angles', 'Freestanding body yaw'),
            EdgeYaw = Find('AA', 'Anti-aimbot angles', 'Edge yaw'),
            Freestanding = { Find('AA', 'Anti-aimbot angles', 'Freestanding') }
        },
        Exploits = {
            Doubletap = { Find('RAGE', 'Aimbot', 'Double tap') },
            Hideshots = { Find('AA', 'Other', 'On shot anti-aim') },
            Fakeduck = Find('RAGE', 'Other', 'Duck peek assist'),
            Fakelag = {
                Enabled = Find('AA', 'Fake lag', 'Enabled'),
                Mode = Find('AA', 'Fake lag', 'Amount'),
                Amount = Find('AA', 'Fake lag', 'Limit'),
                RandomizeAmount = Find('AA', 'Fake lag', 'Variance')
            }
        },
        Misc = {
            Autopeek = { Find('RAGE', 'Other', 'Quick peek assist') }
        }
    },
    Lua = {
        Home = AddLabel(LuaTab, LuaChild, "Welcome to skeetsense [beta]"),
        Enable = AddCheckbox(LuaTab, LuaChild, "Enable script"),
        Main = { Tabs = AddCombo(LuaTab, LuaChild, "Tabs", Strings.Tabs) },
        Antiaim = {
            Override = AddCheckbox(LuaTab, LuaChild, "Override antiaim"),
            Manual = {
                Left = AddHotkey(LuaTab, LuaChild, "Manual antiaim [Left]", false),
                Right = AddHotkey(LuaTab, LuaChild, "Manual antiaim [Right]", false),
                Back = AddHotkey(LuaTab, LuaChild, "Manual antiaim [Back]", false)
            }
        }
    },
    Cache = {
        Exploits = {
            Doubletap = {
                Command = 0,
                Check = 0,
                Defensive = 0
            }
        }
    }
}
-- @Note from Hatori: Config reference.
local Config = {
    Antiaim = {
        Conditions = nil
    }
}
-- @Note from Hatori: Create combo to make conditions selectable.
Config.Antiaim.Conditions = AddCombo(LuaTab, LuaChild, "Antiaim conditions", Strings.AntiaimConditions)
-- @Note from Hatori: Sorry, I forgot the naming of this piece of shit.
local AntiaimBuilder = {}
local OverrideAntiaimConditions = {}
-- @Note from Hatori: I added this shit to hide sets from prying eyes by pressing 1 button while i navigate through the menu.
for i = 2, #Strings.AntiaimConditions do 
    OverrideAntiaimConditions[i] = AddCheckbox(LuaTab, LuaChild, "[" .. Strings.AntiaimConditions[i] .. "] - Show settings")
end
-- @Note from Hatori: Loop for antiaim builder to create all elements and check conditions.
for i = 1, #Strings.AntiaimConditions do
    AntiaimBuilder[i] = {
        AddCheckbox(LuaTab, LuaChild, "[" .. Strings.AntiaimConditions[i] .. "] - Override yaw"),
        AddCombo(LuaTab, LuaChild, "[" .. Strings.AntiaimConditions[i] .. "] - Yaw mode", Strings.YawModes),
        AddCombo(LuaTab, LuaChild, "[" .. Strings.AntiaimConditions[i] .. "] - Yaw switch mode", Strings.YawAdditivies),
        AddCombo(LuaTab, LuaChild, "[" .. Strings.AntiaimConditions[i] .. "] - Yaw customize", Strings.YawCustomize),
        AddSlider(LuaTab, LuaChild, "[" .. Strings.AntiaimConditions[i] .. "] - Yaw amount", -180, 180, 0),
        AddSlider(LuaTab, LuaChild, "[" .. Strings.AntiaimConditions[i] .. "] - Left yaw amount", -180, 180, 0),
        AddSlider(LuaTab, LuaChild, "[" .. Strings.AntiaimConditions[i] .. "] - Right yaw amount", -180, 180, 0),
        AddCheckbox(LuaTab, LuaChild, "[" .. Strings.AntiaimConditions[i] .. "] - Synchronize with desync side"),
        AddCheckbox(LuaTab, LuaChild, "[" .. Strings.AntiaimConditions[i] .. "] - Override jitter"),
        AddCombo(LuaTab, LuaChild, "[" .. Strings.AntiaimConditions[i] .. "] - Jitter mode", Strings.JitterModes),
        AddSlider(LuaTab, LuaChild, "[" .. Strings.AntiaimConditions[i] .. "] - Jitter amount", -180, 180, 0),
        AddCheckbox(LuaTab, LuaChild, "[" .. Strings.AntiaimConditions[i] .. "] - Override desync"),
        AddCombo(LuaTab, LuaChild, "[" .. Strings.AntiaimConditions[i] .. "] - Desync mode", Strings.DesyncModes),
        AddSlider(LuaTab, LuaChild, "[" .. Strings.AntiaimConditions[i] .. "] - Desync amount", -58, 58, 0),
        AddCheckbox(LuaTab, LuaChild, "[" .. Strings.AntiaimConditions[i] .. "] - Synchronize with yaw switch time"),
        AddCheckbox(LuaTab, LuaChild, "[" .. Strings.AntiaimConditions[i] .. "] - Override lag exploit options"),
        AddCombo(LuaTab, LuaChild, "[" .. Strings.AntiaimConditions[i] .. "] - Lag exploit triggers", Strings.LagExploitModes),
        AddCombo(LuaTab, LuaChild, "[" .. Strings.AntiaimConditions[i] .. "] - Pitch on lag exploit", Strings.PitchModeLag),
        AddCombo(LuaTab, LuaChild, "[" .. Strings.AntiaimConditions[i] .. "] - Yaw on lag exploit", Strings.YawModeLag)
    }
end
-- @Note from Hatori: Hardcoded customize ui elements but works.
local CAntiaimBuilderElements = function()
    local CurrentCondition = 0
    local GetConditions = Get(Config.Antiaim.Conditions)
    if GetConditions == "Config" then
        CurrentCondition = 1
    elseif GetConditions == "Standing" then
        CurrentCondition = 2
    elseif GetConditions == "On walking" then
        CurrentCondition = 3
    elseif GetConditions == "On running" then
        CurrentCondition = 4
    elseif GetConditions == "On duck" then
        CurrentCondition = 6
    elseif GetConditions == "On moving in duck" then
        CurrentCondition = 5
    elseif GetConditions == "In air" then
        CurrentCondition = 7
    elseif GetConditions == "Crouching in air" then
        CurrentCondition = 8
    end
    for i = 1, #Strings.AntiaimConditions do
        for k = 1, #AntiaimBuilder[i] do
            if i > 1 then SetVisible(OverrideAntiaimConditions[i], CurrentCondition == i and Get(Cheat.Lua.Main.Tabs) == "Antiaim" and Get(Cheat.Lua.Antiaim.Override)) end
            if i > 1 and Get(Cheat.Lua.Antiaim.Override) and Get(Cheat.Lua.Main.Tabs) == "Antiaim" then
                local CurrentEnabledCondition = CurrentCondition == i and Get(OverrideAntiaimConditions[i])
                SetVisible(AntiaimBuilder[i][k], CurrentEnabledCondition)
                SetVisible(AntiaimBuilder[i][2], (CurrentEnabledCondition and Get(AntiaimBuilder[i][1])))
                SetVisible(AntiaimBuilder[i][3], (CurrentEnabledCondition and Get(AntiaimBuilder[i][1])) and Get(AntiaimBuilder[i][2]) == "Switch")
                SetVisible(AntiaimBuilder[i][4], (CurrentEnabledCondition and Get(AntiaimBuilder[i][1])) and Get(AntiaimBuilder[i][2]) == "Switch")
                SetVisible(AntiaimBuilder[i][5], (CurrentEnabledCondition and Get(AntiaimBuilder[i][1])) and (Get(AntiaimBuilder[i][2]) == "Default" or Get(AntiaimBuilder[i][2]) == "Switch") and Get(AntiaimBuilder[i][4]) ~= "Advanced")
                SetVisible(AntiaimBuilder[i][6], (CurrentEnabledCondition and Get(AntiaimBuilder[i][1])) and Get(AntiaimBuilder[i][4]) == "Advanced" and Get(AntiaimBuilder[i][2]) == "Switch")
                SetVisible(AntiaimBuilder[i][7], (CurrentEnabledCondition and Get(AntiaimBuilder[i][1])) and Get(AntiaimBuilder[i][4]) == "Advanced" and Get(AntiaimBuilder[i][2]) == "Switch")
                SetVisible(AntiaimBuilder[i][8], (CurrentEnabledCondition and Get(AntiaimBuilder[i][1])) and Get(AntiaimBuilder[i][2]) == "Switch")
                SetVisible(AntiaimBuilder[i][10], CurrentEnabledCondition and Get(AntiaimBuilder[i][9]))
                SetVisible(AntiaimBuilder[i][11], CurrentEnabledCondition and Get(AntiaimBuilder[i][9]))
                SetVisible(AntiaimBuilder[i][13], CurrentEnabledCondition and Get(AntiaimBuilder[i][12]))
                SetVisible(AntiaimBuilder[i][14], CurrentEnabledCondition and Get(AntiaimBuilder[i][12]))
                SetVisible(AntiaimBuilder[i][15], CurrentEnabledCondition and (Get(AntiaimBuilder[i][13]) == "Jitter") and (Get(AntiaimBuilder[i][2]) == "Switch"))
                SetVisible(AntiaimBuilder[i][17], CurrentEnabledCondition and Get(AntiaimBuilder[i][16]))
                SetVisible(AntiaimBuilder[i][18], CurrentEnabledCondition and Get(AntiaimBuilder[i][16]))
                SetVisible(AntiaimBuilder[i][19], CurrentEnabledCondition and Get(AntiaimBuilder[i][16]))
            else
                SetVisible(AntiaimBuilder[i][k], false)
            end
        end
    end
end
-- @Note from Hatori: Simple normalize yaw to bypass problem with out of bounds.
local NormalizeYaw = function(yaw)
    while yaw > 180 do yaw = yaw - 360 end
    while yaw < -180 do yaw = yaw + 360 end
    return yaw
end
-- @Note from Hatori: Skeet have only vector lerp, i created it to make int/float lerp
local Lerp = function(a, b, t) return a + (b - a) * t end
-- @Note from Hatori: Skeet doesn`t have this func by default.
local Clamp = function(value, min, max) return math.min(math.max(value, min), max) end
-- @Note from Hatori: Simple get normal velocity 2d.
local CGetVelocity = function(Entity)
    if Entity == nil then return 0 end
    local VelocityX, VelocityY, VelocityZ = GetProp(Entity, "m_vecVelocity")
    local VecVelocity = math.floor(math.sqrt(VelocityX*VelocityX + VelocityY*VelocityY + VelocityZ*VelocityZ))
    return VecVelocity > 5 and VecVelocity or 0
end
-- @Note from Hatori: Proper get antiaim condition function.
local CAntiaimCondition = function()
    local CurrentCondition = 0
    local LocalPlayer = entity.get_local_player()
    local OnGround = bit.band(GetProp(LocalPlayer, "m_fFlags"), 1) == 1
    if CGetVelocity(LocalPlayer) == 0 and OnGround then CurrentCondition = 2 end
    if CGetVelocity(LocalPlayer) > 0 and OnGround then CurrentCondition = CGetVelocity(LocalPlayer) > 100 and 4 or 3 end
    if GetProp(LocalPlayer, "m_flDuckAmount") > 0.1 and OnGround then CurrentCondition = CGetVelocity(LocalPlayer) > 0 and 5 or 6 end
    if not OnGround then CurrentCondition = 7 end
    if GetProp(LocalPlayer, "m_flDuckAmount") > 0.1 and not OnGround then CurrentCondition = 8 end
    return CurrentCondition
end
-- @Note from Hatori: If you not check this, ur antiaim being wrong on fakelags (example: ticks going when u sending packets (1,2,3), when u use fakelags ticks going like this (1, , ) and it updates only when you unchoke fakelag).
local CanOverrideAntiaim = function(cmd)
    if not Get(Cheat.Lua.Antiaim.Override) then return false end
    if not entity.get_local_player() then return false end
    if cmd.chokedcommands >= 1 then return false end
    return true
end
-- @Note from Hatori: Re-create antiaim side switcher (ik it useless but i like modules xd).
local CAntiaimInverter = function(cmd)
    return cmd.command_number % 4 >= 2 and 1 or -1
end
-- @Note from Hatori: I don't want to create one function and put everything in it, I like to create modules..
local CBuildedPitch = function(cmd)
    local CurrentPitch = 89
    local ShiftingLagExploit = (Cheat.Cache.Exploits.Doubletap.Defensive > 1 and Cheat.Cache.Exploits.Doubletap.Defensive < 14) and (Get(Cheat.Ui.Exploits.Doubletap[2]) or Get(Cheat.Ui.Exploits.Hideshots[2]))
    if Get(AntiaimBuilder[CAntiaimCondition()][16]) and ShiftingLagExploit then
        if Get(AntiaimBuilder[CAntiaimCondition()][18]) == "Down" then CurrentPitch = 89
        elseif Get(AntiaimBuilder[CAntiaimCondition()][18]) == "Up" then CurrentPitch = -89
        elseif Get(AntiaimBuilder[CAntiaimCondition()][18]) == "Zero" then CurrentPitch = 0
        elseif Get(AntiaimBuilder[CAntiaimCondition()][18]) == "Ideal" then CurrentPitch = -60
        elseif Get(AntiaimBuilder[CAntiaimCondition()][18]) == "Step" then 
            local Steps = ({[0] = 0, [1] = -23, [2] = -46, [3] = -69, [4] = -82})[cmd.command_number % 5]
            CurrentPitch = Steps
        elseif Get(AntiaimBuilder[CAntiaimCondition()][18]) == "Random" then CurrentPitch = client.random_int(-89, 89)
        elseif Get(AntiaimBuilder[CAntiaimCondition()][18]) == "Cycle" then
            local Cycle = math.fmod(globals.curtime() * -520, 89) * 2
            CurrentPitch = Clamp(Cycle, -89, 89)
        end
    else
        CurrentPitch = 89
    end
    return CurrentPitch
end
local AnimYaw = 0 -- @Note from Hatori: I cached this shit to make lerp working without any troubles.
-- @Note from Hatori: I don't want to create one function and put everything in it, I like to create modules..
local CBuildedYaw = function(cmd)
    local CurrentYaw = 0
    local ShiftingLagExploit = (Cheat.Cache.Exploits.Doubletap.Defensive > 1 and Cheat.Cache.Exploits.Doubletap.Defensive < 14) and (Get(Cheat.Ui.Exploits.Doubletap[2]) or Get(Cheat.Ui.Exploits.Hideshots[2]))
    local DesyncSide = 0
    if Get(AntiaimBuilder[CAntiaimCondition()][14]) > 0 then DesyncSide = 1 else DesyncSide = -1 end
    if Get(AntiaimBuilder[CAntiaimCondition()][16]) and ShiftingLagExploit then
        if Get(AntiaimBuilder[CAntiaimCondition()][19]) == "None" then
            CurrentYaw = CurrentYaw
        elseif Get(AntiaimBuilder[CAntiaimCondition()][19]) == "Jitter" then
            CurrentYaw = CurrentYaw + (90 * CAntiaimInverter(cmd))
        elseif Get(AntiaimBuilder[CAntiaimCondition()][19]) == "Step" then
            local Steps = ({[0] = 0, [1] = 60, [2] = 120, [3] = 180, [4] = -120, [5] = -60})[cmd.command_number % 6]
            CurrentYaw = CurrentYaw + Steps
        elseif Get(AntiaimBuilder[CAntiaimCondition()][19]) == "Spin" then
            local Spin = math.fmod(globals.curtime() * 520, 180) * 2
            CurrentYaw = CurrentYaw + Spin
        elseif Get(AntiaimBuilder[CAntiaimCondition()][19]) == "Half-sway" then
            Timer = (0.5 + (globals.curtime() / 1.0) / globals.tickinterval()) % 12
            AnimYaw = Lerp(AnimYaw, Timer > 6 and 180 or -180, 0.25)
            CurrentYaw = CurrentYaw + AnimYaw
        elseif Get(AntiaimBuilder[CAntiaimCondition()][19]) == "Random" then
            CurrentYaw = CurrentYaw + client.random_int(-180, 180)
        elseif Get(AntiaimBuilder[CAntiaimCondition()][19]) == "Forward" then
            CurrentYaw = CurrentYaw + 180
        end
    else
        if Get(AntiaimBuilder[CAntiaimCondition()][1]) then
            local Timer = 0
            Set(Cheat.Ui.Antiaim.YawBase, "At targets")
            if Get(AntiaimBuilder[CAntiaimCondition()][2]) == "Default" then
                CurrentYaw = Get(AntiaimBuilder[CAntiaimCondition()][5])
            else
                if Get(AntiaimBuilder[CAntiaimCondition()][4]) == "Default" then
                    if Get(AntiaimBuilder[CAntiaimCondition()][3]) == "Default" then
                        CurrentYaw = CurrentYaw + (Get(AntiaimBuilder[CAntiaimCondition()][5]) * CAntiaimInverter(cmd))
                        elseif Get(AntiaimBuilder[CAntiaimCondition()][3]) == "Centered" then
                        CurrentYaw = CurrentYaw + (Get(AntiaimBuilder[CAntiaimCondition()][5]) * CAntiaimInverter(cmd))
                    elseif Get(AntiaimBuilder[CAntiaimCondition()][3]) == "Delayed" then
                        Timer = (0.5 + (globals.curtime() / 1.0) / globals.tickinterval()) % 10
                        local DelayedMultiplier = Timer > 5 and 1 or -1
                        CurrentYaw = CurrentYaw + (Get(AntiaimBuilder[CAntiaimCondition()][5]) * DelayedMultiplier)
                    elseif Get(AntiaimBuilder[CAntiaimCondition()][3]) == "Half-swayed" then
                        Timer = (0.5 + (globals.curtime() / 1.0) / globals.tickinterval()) % 12
                        AnimYaw = Lerp(AnimYaw, Timer > 6 and Get(AntiaimBuilder[CAntiaimCondition()][5]) or -Get(AntiaimBuilder[CAntiaimCondition()][5]), 0.25)
                        CurrentYaw = CurrentYaw + AnimYaw
                    end
                else
                    if Get(AntiaimBuilder[CAntiaimCondition()][3]) == "Default" then
                        CurrentYaw = CurrentYaw + (CAntiaimInverter(cmd) == -1 and (Get(AntiaimBuilder[CAntiaimCondition()][6]) / 2) or Get(AntiaimBuilder[CAntiaimCondition()][7]))
                    elseif Get(AntiaimBuilder[CAntiaimCondition()][3]) == "Centered" then
                        CurrentYaw = CurrentYaw + (CAntiaimInverter(cmd) == 1 and Get(AntiaimBuilder[CAntiaimCondition()][7]) or Get(AntiaimBuilder[CAntiaimCondition()][6]))
                    elseif Get(AntiaimBuilder[CAntiaimCondition()][3]) == "Delayed" then
                        Timer = (0.5 + (globals.curtime() / 1.0) / globals.tickinterval()) % 10
                        local DelayedMultiplier = Timer > 5 and 1 or -1
                        CurrentYaw = CurrentYaw + (DelayedMultiplier == 1 and Get(AntiaimBuilder[CAntiaimCondition()][7]) or Get(AntiaimBuilder[CAntiaimCondition()][6]))
                    elseif Get(AntiaimBuilder[CAntiaimCondition()][3]) == "Half-swayed" then
                        Timer = (0.5 + (globals.curtime() / 1.0) / globals.tickinterval()) % 12
                        AnimYaw = Lerp(AnimYaw, Timer > 6 and Get(AntiaimBuilder[CAntiaimCondition()][6]) or Get(AntiaimBuilder[CAntiaimCondition()][7]), 0.25)
                        CurrentYaw = CurrentYaw + AnimYaw
                    end
                end
            end
        end
    end
    return NormalizeYaw(Get(AntiaimBuilder[CAntiaimCondition()][8]) and (CurrentYaw * DesyncSide) or CurrentYaw)
end
-- @Note from Hatori: I don't want to create one function and put everything in it, I like to create modules..
local CBuildedJitter = function()
    local CurrentJitter = 0
    if Get(AntiaimBuilder[CAntiaimCondition()][10]) == "Disabled" then
        Set(Cheat.Ui.Antiaim.Angles.YawJitter[1], "Off")
        CurrentJitter = Get(AntiaimBuilder[CAntiaimCondition()][11])
    elseif Get(AntiaimBuilder[CAntiaimCondition()][10]) == "Offset" then
        Set(Cheat.Ui.Antiaim.Angles.YawJitter[1], "Offset")
        CurrentJitter = Get(AntiaimBuilder[CAntiaimCondition()][11])
    elseif Get(AntiaimBuilder[CAntiaimCondition()][10]) == "Center" then
        Set(Cheat.Ui.Antiaim.Angles.YawJitter[1], "Center")
        CurrentJitter = Get(AntiaimBuilder[CAntiaimCondition()][11])
    elseif Get(AntiaimBuilder[CAntiaimCondition()][10]) == "Ways" then
        Set(Cheat.Ui.Antiaim.Angles.YawJitter[1], "Skitter")
        CurrentJitter = Get(AntiaimBuilder[CAntiaimCondition()][11])
    end
    return CurrentJitter
end
-- @Note from Hatori: I don't want to create one function and put everything in it, I like to create modules..
local CBuildedDesync = function(cmd)
    local CurrentDesync = 0
    local Timer = (0.5 + (globals.curtime() / 1.0) / globals.tickinterval()) % 10
    local DelayedMultiplier = Timer > 5 and 0 or 1
    if Get(AntiaimBuilder[CAntiaimCondition()][13]) == "Static" then
        Set(Cheat.Ui.Antiaim.Angles.Desync[1], "Static")
        CurrentDesync = CurrentDesync + Get(AntiaimBuilder[CAntiaimCondition()][14])
    elseif Get(AntiaimBuilder[CAntiaimCondition()][2]) == "Freestand" then
        Set(Cheat.Ui.Antiaim.Angles.Desync[1], "Opposite")
        CurrentDesync = CurrentDesync + Get(AntiaimBuilder[CAntiaimCondition()][14])
    elseif Get(AntiaimBuilder[CAntiaimCondition()][13]) == "Jitter" then
        if Get(AntiaimBuilder[CAntiaimCondition()][15]) then
            Set(Cheat.Ui.Antiaim.Angles.Desync[1], "Static")
            if Get(AntiaimBuilder[CAntiaimCondition()][3]) == "Delayed" then
                Timer = (0.5 + (globals.curtime() / 1.0) / globals.tickinterval()) % 10
                local DelayedMultiplier = Timer > 5 and 1 or -1
                CurrentDesync = CurrentDesync + DelayedMultiplier == 1 and Get(AntiaimBuilder[CAntiaimCondition()][14]) or -Get(AntiaimBuilder[CAntiaimCondition()][14]) 
            else
                CurrentDesync = CurrentDesync + CAntiaimInverter(cmd) == 1 and Get(AntiaimBuilder[CAntiaimCondition()][14]) or -Get(AntiaimBuilder[CAntiaimCondition()][14]) 
            end
        else
            Set(Cheat.Ui.Antiaim.Angles.Desync[1], "Jitter")
            CurrentDesync = CurrentDesync + Get(AntiaimBuilder[CAntiaimCondition()][14])
        end
    elseif Get(AntiaimBuilder[CAntiaimCondition()][13]) == "Cycle" then
        Set(Cheat.Ui.Antiaim.Angles.Desync[1], DelayedMultiplier == 1 and "Jitter" or "Static")
        CurrentDesync = CurrentDesync + Get(AntiaimBuilder[CAntiaimCondition()][14])
    end
    return Clamp(CurrentDesync * 3, -180, 180)
end
-- @Note from Hatori: Input antiaim settings into menu.
local CAntiaim = function(cmd)
    if not CanOverrideAntiaim(cmd) then return end
    cmd.force_defensive = Get(AntiaimBuilder[CAntiaimCondition()][17]) == "Always" and true or false
    Set(Cheat.Ui.Antiaim.Angles.Yaw[2], CBuildedYaw(cmd))
    Set(Cheat.Ui.Antiaim.Angles.YawJitter[2], CBuildedJitter())
    Set(Cheat.Ui.Antiaim.Angles.Desync[2], CBuildedDesync(cmd))
    Set(Cheat.Ui.Antiaim.PitchMode[1], "Custom")
    Set(Cheat.Ui.Antiaim.PitchMode[2], CBuildedPitch(cmd))
end
-- @Note from Hatori: Make local function to modificate lua elements.
local CModificateUi = function()
    local CurrentTab = Get(Cheat.Lua.Main.Tabs) -- @Note from Hatori: Tab names (Home, Ragebot, Antiaim, Visuals, Misc)
    SetVisible(Cheat.Lua.Main.Tabs, Get(Cheat.Lua.Enable))
    SetVisible(Cheat.Lua.Antiaim.Override, CurrentTab == "Antiaim")
    SetVisible(Cheat.Lua.Antiaim.Manual.Left, Get(Cheat.Lua.Antiaim.Override) and CurrentTab == "Antiaim")
    SetVisible(Cheat.Lua.Antiaim.Manual.Right, Get(Cheat.Lua.Antiaim.Override) and CurrentTab == "Antiaim")
    SetVisible(Cheat.Lua.Antiaim.Manual.Back, Get(Cheat.Lua.Antiaim.Override) and CurrentTab == "Antiaim")
    SetVisible(Config.Antiaim.Conditions, Get(Cheat.Lua.Antiaim.Override) and CurrentTab == "Antiaim")
    CAntiaimBuilderElements()
end
-- @Note from Hatori: Register ui callback to modificate lua elements.
RegisterCallback("paint_ui", function() CModificateUi() end)
RegisterCallback("setup_command", function(cmd) CAntiaim(cmd) end)
RegisterCallback("run_command", function(cmd) Cheat.Cache.Exploits.Doubletap.Command = cmd.command_number end)
RegisterCallback("predict_command", function(cmd) 
    if cmd.command_number == Cheat.Cache.Exploits.Doubletap.Command then
        local PredictedTickbase = GetProp(entity.get_local_player(), "m_nTickBase")
        Cheat.Cache.Exploits.Doubletap.Defensive = math.abs(PredictedTickbase - Cheat.Cache.Exploits.Doubletap.Check)
        Cheat.Cache.Exploits.Doubletap.Check = math.max(PredictedTickbase, Cheat.Cache.Exploits.Doubletap.Check or 0)
        Cheat.Cache.Exploits.Doubletap.Command = 0
    end
end)
-- @Note from Hatori: Fixed defensive check on level init (It stucks on change map and eth lul).
RegisterCallback("level_init", function() Cheat.Cache.Exploits.Doubletap.Check, Cheat.Cache.Exploits.Doubletap.Defensive = 0, 0 end)
 
Последнее редактирование:
Начинающий
Статус
Оффлайн
Регистрация
14 Авг 2023
Сообщения
5
Реакции[?]
1
Поинты[?]
1K
скит сенс, серьёзно? Antisense go
Сливаю свою недоделанную луашку, были планы но я проленился.
Из готового только в целом большой антиаим билдер, в планах было добавить много чего но я поленился, есть кнопки мануалов но я не доделал тк поленился опять же, используйте фристенды.
луашка на геймсенс кстати
code_language.lua:
-- @Note from Hatori: Translate some API documentated functions from "snake_case" to "CamelCase" codestyle.
local Get, Set, Find, AddCheckbox, AddSlider, AddCombo, AddMultiCombo, AddLabel, AddHotkey, SetVisible, RegisterCallback, GetProp = ui.get, ui.set, ui.reference, ui.new_checkbox, ui.new_slider, ui.new_combobox, ui.new_multiselect, ui.new_label, ui.new_hotkey, ui.set_visible, client.set_event_callback, entity.get_prop
-- @Note from Hatori: Reduce tab namings.
local Strings = {
    Tabs = {"Home", "Ragebot", "Antiaim", "Visuals", "Misc"},
    AntiaimConditions = {"Config", "Standing", "On walking", "On running", "On duck", "On moving in duck", "In air", "Crouching in air"},
    YawModes = {"Default", "Switch"},
    YawCustomize = {"Default", "Advanced"},
    YawAdditivies = {"Default", "Centered", "Delayed", "Half-swayed"},
    JitterModes = {"Disabled", "Offset", "Center", "Ways"},
    DesyncModes = {"Static", "Freestand", "Jitter", "Cycle"},
    LagExploitModes = {"Cycle", "Always"},
    PitchModeLag = {"Down", "Up", "Zero", "Ideal", "Step", "Random", "Cycle"},
    YawModeLag = {"None", "Jitter", "Step", "Spin", "Half-sway", "Random", "Forward"}
}
-- @Note from Hatori: Fuck LUA & B, all my homies makes.
local LuaTab, LuaChild = "LUA", "A"
-- @Note from Hatori: Reference to cheat functions and create lua elements.
local Cheat = {
    Ui = {
        Rage = {
            MinDamage = Find('RAGE', 'Aimbot', 'Minimum damage'),
            MinDamageOverride = { Find('RAGE', 'Aimbot', 'Minimum damage override') },
            ForceSafepoint = Find('RAGE', 'Aimbot', 'Force safe point'),
            ForceBodyaim = Find('RAGE', 'Aimbot', 'Force body aim')
        },
        Antiaim = {
            Enabled = Find('AA', 'Anti-aimbot angles', 'Enabled'),
            PitchMode = { Find('AA', 'Anti-aimbot angles', 'Pitch') },
            YawBase = Find('AA', 'Anti-aimbot angles', 'Yaw base'),
            Angles = {
                Yaw = { Find('AA', 'Anti-aimbot angles', 'Yaw') },
                YawJitter = { Find('AA', 'Anti-aimbot angles', 'Yaw jitter') },
                Desync = { Find('AA', 'Anti-aimbot angles', 'Body yaw') },
                Roll = Find('AA', 'Anti-aimbot angles', 'Roll')
            },
            DesyncFreestanding = Find('AA', 'Anti-aimbot angles', 'Freestanding body yaw'),
            EdgeYaw = Find('AA', 'Anti-aimbot angles', 'Edge yaw'),
            Freestanding = { Find('AA', 'Anti-aimbot angles', 'Freestanding') }
        },
        Exploits = {
            Doubletap = { Find('RAGE', 'Aimbot', 'Double tap') },
            Hideshots = { Find('AA', 'Other', 'On shot anti-aim') },
            Fakeduck = Find('RAGE', 'Other', 'Duck peek assist'),
            Fakelag = {
                Enabled = Find('AA', 'Fake lag', 'Enabled'),
                Mode = Find('AA', 'Fake lag', 'Amount'),
                Amount = Find('AA', 'Fake lag', 'Limit'),
                RandomizeAmount = Find('AA', 'Fake lag', 'Variance')
            }
        },
        Misc = {
            Autopeek = { Find('RAGE', 'Other', 'Quick peek assist') }
        }
    },
    Lua = {
        Home = AddLabel(LuaTab, LuaChild, "Welcome to skeetsense [beta]"),
        Enable = AddCheckbox(LuaTab, LuaChild, "Enable script"),
        Main = { Tabs = AddCombo(LuaTab, LuaChild, "Tabs", Strings.Tabs) },
        Antiaim = {
            Override = AddCheckbox(LuaTab, LuaChild, "Override antiaim"),
            Manual = {
                Left = AddHotkey(LuaTab, LuaChild, "Manual antiaim [Left]", false),
                Right = AddHotkey(LuaTab, LuaChild, "Manual antiaim [Right]", false),
                Back = AddHotkey(LuaTab, LuaChild, "Manual antiaim [Back]", false)
            }
        }
    },
    Cache = {
        Exploits = {
            Doubletap = {
                Command = 0,
                Check = 0,
                Defensive = 0
            }
        }
    }
}
-- @Note from Hatori: Config reference.
local Config = {
    Antiaim = {
        Conditions = nil
    }
}
-- @Note from Hatori: Create combo to make conditions selectable.
Config.Antiaim.Conditions = AddCombo(LuaTab, LuaChild, "Antiaim conditions", Strings.AntiaimConditions)
-- @Note from Hatori: Sorry, I forgot the naming of this piece of shit.
local AntiaimBuilder = {}
local OverrideAntiaimConditions = {}
-- @Note from Hatori: I added this shit to hide sets from prying eyes by pressing 1 button while i navigate through the menu.
for i = 2, #Strings.AntiaimConditions do
    OverrideAntiaimConditions[i] = AddCheckbox(LuaTab, LuaChild, "[" .. Strings.AntiaimConditions[i] .. "] - Show settings")
end
-- @Note from Hatori: Loop for antiaim builder to create all elements and check conditions.
for i = 1, #Strings.AntiaimConditions do
    AntiaimBuilder[i] = {
        AddCheckbox(LuaTab, LuaChild, "[" .. Strings.AntiaimConditions[i] .. "] - Override yaw"),
        AddCombo(LuaTab, LuaChild, "[" .. Strings.AntiaimConditions[i] .. "] - Yaw mode", Strings.YawModes),
        AddCombo(LuaTab, LuaChild, "[" .. Strings.AntiaimConditions[i] .. "] - Yaw switch mode", Strings.YawAdditivies),
        AddCombo(LuaTab, LuaChild, "[" .. Strings.AntiaimConditions[i] .. "] - Yaw customize", Strings.YawCustomize),
        AddSlider(LuaTab, LuaChild, "[" .. Strings.AntiaimConditions[i] .. "] - Yaw amount", -180, 180, 0),
        AddSlider(LuaTab, LuaChild, "[" .. Strings.AntiaimConditions[i] .. "] - Left yaw amount", -180, 180, 0),
        AddSlider(LuaTab, LuaChild, "[" .. Strings.AntiaimConditions[i] .. "] - Right yaw amount", -180, 180, 0),
        AddCheckbox(LuaTab, LuaChild, "[" .. Strings.AntiaimConditions[i] .. "] - Synchronize with desync side"),
        AddCheckbox(LuaTab, LuaChild, "[" .. Strings.AntiaimConditions[i] .. "] - Override jitter"),
        AddCombo(LuaTab, LuaChild, "[" .. Strings.AntiaimConditions[i] .. "] - Jitter mode", Strings.JitterModes),
        AddSlider(LuaTab, LuaChild, "[" .. Strings.AntiaimConditions[i] .. "] - Jitter amount", -180, 180, 0),
        AddCheckbox(LuaTab, LuaChild, "[" .. Strings.AntiaimConditions[i] .. "] - Override desync"),
        AddCombo(LuaTab, LuaChild, "[" .. Strings.AntiaimConditions[i] .. "] - Desync mode", Strings.DesyncModes),
        AddSlider(LuaTab, LuaChild, "[" .. Strings.AntiaimConditions[i] .. "] - Desync amount", -58, 58, 0),
        AddCheckbox(LuaTab, LuaChild, "[" .. Strings.AntiaimConditions[i] .. "] - Synchronize with yaw switch time"),
        AddCheckbox(LuaTab, LuaChild, "[" .. Strings.AntiaimConditions[i] .. "] - Override lag exploit options"),
        AddCombo(LuaTab, LuaChild, "[" .. Strings.AntiaimConditions[i] .. "] - Lag exploit triggers", Strings.LagExploitModes),
        AddCombo(LuaTab, LuaChild, "[" .. Strings.AntiaimConditions[i] .. "] - Pitch on lag exploit", Strings.PitchModeLag),
        AddCombo(LuaTab, LuaChild, "[" .. Strings.AntiaimConditions[i] .. "] - Yaw on lag exploit", Strings.YawModeLag)
    }
end
-- @Note from Hatori: Hardcoded customize ui elements but works.
local CAntiaimBuilderElements = function()
    local CurrentCondition = 0
    local GetConditions = Get(Config.Antiaim.Conditions)
    if GetConditions == "Config" then
        CurrentCondition = 1
    elseif GetConditions == "Standing" then
        CurrentCondition = 2
    elseif GetConditions == "On walking" then
        CurrentCondition = 3
    elseif GetConditions == "On running" then
        CurrentCondition = 4
    elseif GetConditions == "On duck" then
        CurrentCondition = 6
    elseif GetConditions == "On moving in duck" then
        CurrentCondition = 5
    elseif GetConditions == "In air" then
        CurrentCondition = 7
    elseif GetConditions == "Crouching in air" then
        CurrentCondition = 8
    end
    for i = 1, #Strings.AntiaimConditions do
        for k = 1, #AntiaimBuilder[i] do
            if i > 1 then SetVisible(OverrideAntiaimConditions[i], CurrentCondition == i and Get(Cheat.Lua.Main.Tabs) == "Antiaim" and Get(Cheat.Lua.Antiaim.Override)) end
            if i > 1 and Get(Cheat.Lua.Antiaim.Override) and Get(Cheat.Lua.Main.Tabs) == "Antiaim" then
                local CurrentEnabledCondition = CurrentCondition == i and Get(OverrideAntiaimConditions[i])
                SetVisible(AntiaimBuilder[i][k], CurrentEnabledCondition)
                SetVisible(AntiaimBuilder[i][2], (CurrentEnabledCondition and Get(AntiaimBuilder[i][1])))
                SetVisible(AntiaimBuilder[i][3], (CurrentEnabledCondition and Get(AntiaimBuilder[i][1])) and Get(AntiaimBuilder[i][2]) == "Switch")
                SetVisible(AntiaimBuilder[i][4], (CurrentEnabledCondition and Get(AntiaimBuilder[i][1])) and Get(AntiaimBuilder[i][2]) == "Switch")
                SetVisible(AntiaimBuilder[i][5], (CurrentEnabledCondition and Get(AntiaimBuilder[i][1])) and (Get(AntiaimBuilder[i][2]) == "Default" or Get(AntiaimBuilder[i][2]) == "Switch") and Get(AntiaimBuilder[i][4]) ~= "Advanced")
                SetVisible(AntiaimBuilder[i][6], (CurrentEnabledCondition and Get(AntiaimBuilder[i][1])) and Get(AntiaimBuilder[i][4]) == "Advanced" and Get(AntiaimBuilder[i][2]) == "Switch")
                SetVisible(AntiaimBuilder[i][7], (CurrentEnabledCondition and Get(AntiaimBuilder[i][1])) and Get(AntiaimBuilder[i][4]) == "Advanced" and Get(AntiaimBuilder[i][2]) == "Switch")
                SetVisible(AntiaimBuilder[i][8], (CurrentEnabledCondition and Get(AntiaimBuilder[i][1])) and Get(AntiaimBuilder[i][2]) == "Switch")
                SetVisible(AntiaimBuilder[i][10], CurrentEnabledCondition and Get(AntiaimBuilder[i][9]))
                SetVisible(AntiaimBuilder[i][11], CurrentEnabledCondition and Get(AntiaimBuilder[i][9]))
                SetVisible(AntiaimBuilder[i][13], CurrentEnabledCondition and Get(AntiaimBuilder[i][12]))
                SetVisible(AntiaimBuilder[i][14], CurrentEnabledCondition and Get(AntiaimBuilder[i][12]))
                SetVisible(AntiaimBuilder[i][15], CurrentEnabledCondition and (Get(AntiaimBuilder[i][13]) == "Jitter") and (Get(AntiaimBuilder[i][2]) == "Switch"))
                SetVisible(AntiaimBuilder[i][17], CurrentEnabledCondition and Get(AntiaimBuilder[i][16]))
                SetVisible(AntiaimBuilder[i][18], CurrentEnabledCondition and Get(AntiaimBuilder[i][16]))
                SetVisible(AntiaimBuilder[i][19], CurrentEnabledCondition and Get(AntiaimBuilder[i][16]))
            else
                SetVisible(AntiaimBuilder[i][k], false)
            end
        end
    end
end
-- @Note from Hatori: Simple normalize yaw to bypass problem with out of bounds.
local NormalizeYaw = function(yaw)
    while yaw > 180 do yaw = yaw - 360 end
    while yaw < -180 do yaw = yaw + 360 end
    return yaw
end
-- @Note from Hatori: Skeet have only vector lerp, i created it to make int/float lerp
local Lerp = function(a, b, t) return a + (b - a) * t end
-- @Note from Hatori: Skeet doesn`t have this func by default.
local Clamp = function(value, min, max) return math.min(math.max(value, min), max) end
-- @Note from Hatori: Simple get normal velocity 2d.
local CGetVelocity = function(Entity)
    if Entity == nil then return 0 end
    local VelocityX, VelocityY, VelocityZ = GetProp(Entity, "m_vecVelocity")
    local VecVelocity = math.floor(math.sqrt(VelocityX*VelocityX + VelocityY*VelocityY + VelocityZ*VelocityZ))
    return VecVelocity > 5 and VecVelocity or 0
end
-- @Note from Hatori: Proper get antiaim condition function.
local CAntiaimCondition = function()
    local CurrentCondition = 0
    local LocalPlayer = entity.get_local_player()
    local OnGround = bit.band(GetProp(LocalPlayer, "m_fFlags"), 1) == 1
    if CGetVelocity(LocalPlayer) == 0 and OnGround then CurrentCondition = 2 end
    if CGetVelocity(LocalPlayer) > 0 and OnGround then CurrentCondition = CGetVelocity(LocalPlayer) > 100 and 4 or 3 end
    if GetProp(LocalPlayer, "m_flDuckAmount") > 0.1 and OnGround then CurrentCondition = CGetVelocity(LocalPlayer) > 0 and 5 or 6 end
    if not OnGround then CurrentCondition = 7 end
    if GetProp(LocalPlayer, "m_flDuckAmount") > 0.1 and not OnGround then CurrentCondition = 8 end
    return CurrentCondition
end
-- @Note from Hatori: If you not check this, ur antiaim being wrong on fakelags (example: ticks going when u sending packets (1,2,3), when u use fakelags ticks going like this (1, , ) and it updates only when you unchoke fakelag).
local CanOverrideAntiaim = function(cmd)
    if not Get(Cheat.Lua.Antiaim.Override) then return false end
    if not entity.get_local_player() then return false end
    if cmd.chokedcommands >= 1 then return false end
    return true
end
-- @Note from Hatori: Re-create antiaim side switcher (ik it useless but i like modules xd).
local CAntiaimInverter = function(cmd)
    return cmd.command_number % 4 >= 2 and 1 or -1
end
-- @Note from Hatori: I don't want to create one function and put everything in it, I like to create modules..
local CBuildedPitch = function(cmd)
    local CurrentPitch = 89
    local ShiftingLagExploit = (Cheat.Cache.Exploits.Doubletap.Defensive > 1 and Cheat.Cache.Exploits.Doubletap.Defensive < 14) and (Get(Cheat.Ui.Exploits.Doubletap[2]) or Get(Cheat.Ui.Exploits.Hideshots[2]))
    if Get(AntiaimBuilder[CAntiaimCondition()][16]) and ShiftingLagExploit then
        if Get(AntiaimBuilder[CAntiaimCondition()][18]) == "Down" then CurrentPitch = 89
        elseif Get(AntiaimBuilder[CAntiaimCondition()][18]) == "Up" then CurrentPitch = -89
        elseif Get(AntiaimBuilder[CAntiaimCondition()][18]) == "Zero" then CurrentPitch = 0
        elseif Get(AntiaimBuilder[CAntiaimCondition()][18]) == "Ideal" then CurrentPitch = -60
        elseif Get(AntiaimBuilder[CAntiaimCondition()][18]) == "Step" then
            local Steps = ({[0] = 0, [1] = -23, [2] = -46, [3] = -69, [4] = -82})[cmd.command_number % 5]
            CurrentPitch = Steps
        elseif Get(AntiaimBuilder[CAntiaimCondition()][18]) == "Random" then CurrentPitch = client.random_int(-89, 89)
        elseif Get(AntiaimBuilder[CAntiaimCondition()][18]) == "Cycle" then
            local Cycle = math.fmod(globals.curtime() * -520, 89) * 2
            CurrentPitch = Clamp(Cycle, -89, 89)
        end
    else
        CurrentPitch = 89
    end
    return CurrentPitch
end
local AnimYaw = 0 -- @Note from Hatori: I cached this shit to make lerp working without any troubles.
-- @Note from Hatori: I don't want to create one function and put everything in it, I like to create modules..
local CBuildedYaw = function(cmd)
    local CurrentYaw = 0
    local ShiftingLagExploit = (Cheat.Cache.Exploits.Doubletap.Defensive > 1 and Cheat.Cache.Exploits.Doubletap.Defensive < 14) and (Get(Cheat.Ui.Exploits.Doubletap[2]) or Get(Cheat.Ui.Exploits.Hideshots[2]))
    local DesyncSide = 0
    if Get(AntiaimBuilder[CAntiaimCondition()][14]) > 0 then DesyncSide = 1 else DesyncSide = -1 end
    if Get(AntiaimBuilder[CAntiaimCondition()][16]) and ShiftingLagExploit then
        if Get(AntiaimBuilder[CAntiaimCondition()][19]) == "None" then
            CurrentYaw = CurrentYaw
        elseif Get(AntiaimBuilder[CAntiaimCondition()][19]) == "Jitter" then
            CurrentYaw = CurrentYaw + (90 * CAntiaimInverter(cmd))
        elseif Get(AntiaimBuilder[CAntiaimCondition()][19]) == "Step" then
            local Steps = ({[0] = 0, [1] = 60, [2] = 120, [3] = 180, [4] = -120, [5] = -60})[cmd.command_number % 6]
            CurrentYaw = CurrentYaw + Steps
        elseif Get(AntiaimBuilder[CAntiaimCondition()][19]) == "Spin" then
            local Spin = math.fmod(globals.curtime() * 520, 180) * 2
            CurrentYaw = CurrentYaw + Spin
        elseif Get(AntiaimBuilder[CAntiaimCondition()][19]) == "Half-sway" then
            Timer = (0.5 + (globals.curtime() / 1.0) / globals.tickinterval()) % 12
            AnimYaw = Lerp(AnimYaw, Timer > 6 and 180 or -180, 0.25)
            CurrentYaw = CurrentYaw + AnimYaw
        elseif Get(AntiaimBuilder[CAntiaimCondition()][19]) == "Random" then
            CurrentYaw = CurrentYaw + client.random_int(-180, 180)
        elseif Get(AntiaimBuilder[CAntiaimCondition()][19]) == "Forward" then
            CurrentYaw = CurrentYaw + 180
        end
    else
        if Get(AntiaimBuilder[CAntiaimCondition()][1]) then
            local Timer = 0
            Set(Cheat.Ui.Antiaim.YawBase, "At targets")
            if Get(AntiaimBuilder[CAntiaimCondition()][2]) == "Default" then
                CurrentYaw = Get(AntiaimBuilder[CAntiaimCondition()][5])
            else
                if Get(AntiaimBuilder[CAntiaimCondition()][4]) == "Default" then
                    if Get(AntiaimBuilder[CAntiaimCondition()][3]) == "Default" then
                        CurrentYaw = CurrentYaw + (Get(AntiaimBuilder[CAntiaimCondition()][5]) * CAntiaimInverter(cmd))
                        elseif Get(AntiaimBuilder[CAntiaimCondition()][3]) == "Centered" then
                        CurrentYaw = CurrentYaw + (Get(AntiaimBuilder[CAntiaimCondition()][5]) * CAntiaimInverter(cmd))
                    elseif Get(AntiaimBuilder[CAntiaimCondition()][3]) == "Delayed" then
                        Timer = (0.5 + (globals.curtime() / 1.0) / globals.tickinterval()) % 10
                        local DelayedMultiplier = Timer > 5 and 1 or -1
                        CurrentYaw = CurrentYaw + (Get(AntiaimBuilder[CAntiaimCondition()][5]) * DelayedMultiplier)
                    elseif Get(AntiaimBuilder[CAntiaimCondition()][3]) == "Half-swayed" then
                        Timer = (0.5 + (globals.curtime() / 1.0) / globals.tickinterval()) % 12
                        AnimYaw = Lerp(AnimYaw, Timer > 6 and Get(AntiaimBuilder[CAntiaimCondition()][5]) or -Get(AntiaimBuilder[CAntiaimCondition()][5]), 0.25)
                        CurrentYaw = CurrentYaw + AnimYaw
                    end
                else
                    if Get(AntiaimBuilder[CAntiaimCondition()][3]) == "Default" then
                        CurrentYaw = CurrentYaw + (CAntiaimInverter(cmd) == -1 and (Get(AntiaimBuilder[CAntiaimCondition()][6]) / 2) or Get(AntiaimBuilder[CAntiaimCondition()][7]))
                    elseif Get(AntiaimBuilder[CAntiaimCondition()][3]) == "Centered" then
                        CurrentYaw = CurrentYaw + (CAntiaimInverter(cmd) == 1 and Get(AntiaimBuilder[CAntiaimCondition()][7]) or Get(AntiaimBuilder[CAntiaimCondition()][6]))
                    elseif Get(AntiaimBuilder[CAntiaimCondition()][3]) == "Delayed" then
                        Timer = (0.5 + (globals.curtime() / 1.0) / globals.tickinterval()) % 10
                        local DelayedMultiplier = Timer > 5 and 1 or -1
                        CurrentYaw = CurrentYaw + (DelayedMultiplier == 1 and Get(AntiaimBuilder[CAntiaimCondition()][7]) or Get(AntiaimBuilder[CAntiaimCondition()][6]))
                    elseif Get(AntiaimBuilder[CAntiaimCondition()][3]) == "Half-swayed" then
                        Timer = (0.5 + (globals.curtime() / 1.0) / globals.tickinterval()) % 12
                        AnimYaw = Lerp(AnimYaw, Timer > 6 and Get(AntiaimBuilder[CAntiaimCondition()][6]) or Get(AntiaimBuilder[CAntiaimCondition()][7]), 0.25)
                        CurrentYaw = CurrentYaw + AnimYaw
                    end
                end
            end
        end
    end
    return NormalizeYaw(Get(AntiaimBuilder[CAntiaimCondition()][8]) and (CurrentYaw * DesyncSide) or CurrentYaw)
end
-- @Note from Hatori: I don't want to create one function and put everything in it, I like to create modules..
local CBuildedJitter = function()
    local CurrentJitter = 0
    if Get(AntiaimBuilder[CAntiaimCondition()][10]) == "Disabled" then
        Set(Cheat.Ui.Antiaim.Angles.YawJitter[1], "Off")
        CurrentJitter = Get(AntiaimBuilder[CAntiaimCondition()][11])
    elseif Get(AntiaimBuilder[CAntiaimCondition()][10]) == "Offset" then
        Set(Cheat.Ui.Antiaim.Angles.YawJitter[1], "Offset")
        CurrentJitter = Get(AntiaimBuilder[CAntiaimCondition()][11])
    elseif Get(AntiaimBuilder[CAntiaimCondition()][10]) == "Center" then
        Set(Cheat.Ui.Antiaim.Angles.YawJitter[1], "Center")
        CurrentJitter = Get(AntiaimBuilder[CAntiaimCondition()][11])
    elseif Get(AntiaimBuilder[CAntiaimCondition()][10]) == "Ways" then
        Set(Cheat.Ui.Antiaim.Angles.YawJitter[1], "Skitter")
        CurrentJitter = Get(AntiaimBuilder[CAntiaimCondition()][11])
    end
    return CurrentJitter
end
-- @Note from Hatori: I don't want to create one function and put everything in it, I like to create modules..
local CBuildedDesync = function(cmd)
    local CurrentDesync = 0
    local Timer = (0.5 + (globals.curtime() / 1.0) / globals.tickinterval()) % 10
    local DelayedMultiplier = Timer > 5 and 0 or 1
    if Get(AntiaimBuilder[CAntiaimCondition()][13]) == "Static" then
        Set(Cheat.Ui.Antiaim.Angles.Desync[1], "Static")
        CurrentDesync = CurrentDesync + Get(AntiaimBuilder[CAntiaimCondition()][14])
    elseif Get(AntiaimBuilder[CAntiaimCondition()][2]) == "Freestand" then
        Set(Cheat.Ui.Antiaim.Angles.Desync[1], "Opposite")
        CurrentDesync = CurrentDesync + Get(AntiaimBuilder[CAntiaimCondition()][14])
    elseif Get(AntiaimBuilder[CAntiaimCondition()][13]) == "Jitter" then
        if Get(AntiaimBuilder[CAntiaimCondition()][15]) then
            Set(Cheat.Ui.Antiaim.Angles.Desync[1], "Static")
            if Get(AntiaimBuilder[CAntiaimCondition()][3]) == "Delayed" then
                Timer = (0.5 + (globals.curtime() / 1.0) / globals.tickinterval()) % 10
                local DelayedMultiplier = Timer > 5 and 1 or -1
                CurrentDesync = CurrentDesync + DelayedMultiplier == 1 and Get(AntiaimBuilder[CAntiaimCondition()][14]) or -Get(AntiaimBuilder[CAntiaimCondition()][14])
            else
                CurrentDesync = CurrentDesync + CAntiaimInverter(cmd) == 1 and Get(AntiaimBuilder[CAntiaimCondition()][14]) or -Get(AntiaimBuilder[CAntiaimCondition()][14])
            end
        else
            Set(Cheat.Ui.Antiaim.Angles.Desync[1], "Jitter")
            CurrentDesync = CurrentDesync + Get(AntiaimBuilder[CAntiaimCondition()][14])
        end
    elseif Get(AntiaimBuilder[CAntiaimCondition()][13]) == "Cycle" then
        Set(Cheat.Ui.Antiaim.Angles.Desync[1], DelayedMultiplier == 1 and "Jitter" or "Static")
        CurrentDesync = CurrentDesync + Get(AntiaimBuilder[CAntiaimCondition()][14])
    end
    return Clamp(CurrentDesync * 3, -180, 180)
end
-- @Note from Hatori: Input antiaim settings into menu.
local CAntiaim = function(cmd)
    if not CanOverrideAntiaim(cmd) then return end
    cmd.force_defensive = Get(AntiaimBuilder[CAntiaimCondition()][17]) == "Always" and true or false
    Set(Cheat.Ui.Antiaim.Angles.Yaw[2], CBuildedYaw(cmd))
    Set(Cheat.Ui.Antiaim.Angles.YawJitter[2], CBuildedJitter())
    Set(Cheat.Ui.Antiaim.Angles.Desync[2], CBuildedDesync(cmd))
    Set(Cheat.Ui.Antiaim.PitchMode[1], "Custom")
    Set(Cheat.Ui.Antiaim.PitchMode[2], CBuildedPitch(cmd))
end
-- @Note from Hatori: Make local function to modificate lua elements.
local CModificateUi = function()
    local CurrentTab = Get(Cheat.Lua.Main.Tabs) -- @Note from Hatori: Tab names (Home, Ragebot, Antiaim, Visuals, Misc)
    SetVisible(Cheat.Lua.Main.Tabs, Get(Cheat.Lua.Enable))
    SetVisible(Cheat.Lua.Antiaim.Override, CurrentTab == "Antiaim")
    SetVisible(Cheat.Lua.Antiaim.Manual.Left, Get(Cheat.Lua.Antiaim.Override) and CurrentTab == "Antiaim")
    SetVisible(Cheat.Lua.Antiaim.Manual.Right, Get(Cheat.Lua.Antiaim.Override) and CurrentTab == "Antiaim")
    SetVisible(Cheat.Lua.Antiaim.Manual.Back, Get(Cheat.Lua.Antiaim.Override) and CurrentTab == "Antiaim")
    SetVisible(Config.Antiaim.Conditions, Get(Cheat.Lua.Antiaim.Override) and CurrentTab == "Antiaim")
    CAntiaimBuilderElements()
end
-- @Note from Hatori: Register ui callback to modificate lua elements.
RegisterCallback("paint_ui", function() CModificateUi() end)
RegisterCallback("setup_command", function(cmd) CAntiaim(cmd) end)
RegisterCallback("run_command", function(cmd) Cheat.Cache.Exploits.Doubletap.Command = cmd.command_number end)
RegisterCallback("predict_command", function(cmd)
    if cmd.command_number == Cheat.Cache.Exploits.Doubletap.Command then
        local PredictedTickbase = GetProp(entity.get_local_player(), "m_nTickBase")
        Cheat.Cache.Exploits.Doubletap.Defensive = math.abs(PredictedTickbase - Cheat.Cache.Exploits.Doubletap.Check)
        Cheat.Cache.Exploits.Doubletap.Check = math.max(PredictedTickbase, Cheat.Cache.Exploits.Doubletap.Check or 0)
        Cheat.Cache.Exploits.Doubletap.Command = 0
    end
end)
-- @Note from Hatori: Fixed defensive check on level init (It stucks on change map and eth lul).
RegisterCallback("level_init", function() Cheat.Cache.Exploits.Doubletap.Check, Cheat.Cache.Exploits.Doubletap.Defensive = 0, 0 end)
Но луа хорошая
 
Сверху Снизу