LUA скрипт [Neverlose] Anti Aim States

Забаненный
Статус
Оффлайн
Регистрация
22 Апр 2023
Сообщения
1
Реакции[?]
0
Поинты[?]
0
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
This is to get your Local Anti Aim states f.e "Anti Aim Builders". it's a compact version and will return states in numbers.

Use this code to learn and don't just copy paste and sell it in your lua.

Function:
-- Code created by ak47.
local FLAGS = {
    ON_GROUND = 257,
    DUCKING = 263,
    IN_AIR = 256,
    IN_AIR_DUCKING = 262,
}

local STATES = {
    STAND = 1,
    WALK = 2,
    SLOW_WALK = 3,
    DUCK = 4,
    AIR = 5,
    AIR_DUCK = 6,
}

local function anti_aim_states()
    local lp = entity.get_local_player()
    local velocity = lp.m_vecVelocity:length2d()
    local flags = lp.m_fFlags

    local state_table = {
        [FLAGS.ON_GROUND] = {
            [velocity < 3] = STATES.STAND,
            [velocity > 3 and velocity < 81] = STATES.SLOW_WALK,
            [velocity > 81] = STATES.WALK,
        },
        [FLAGS.DUCKING] = STATES.DUCK,
        [FLAGS.IN_AIR] = STATES.AIR,
        [FLAGS.IN_AIR_DUCKING] = STATES.AIR_DUCK,
    }

    local state = state_table[flags]
    if state then
        if type(state) == "table" then
            for condition, value in pairs(state) do
                if condition then
                    return value
                end
            end
        else
            return state
        end
    end
end
Code Example:
events.createmove(function()
     if anti_aim_states() == 1 then
          print('Your standing on the ground')
     end
end)
If you like the code or maybe learnt something new please give a reaction, thanks in advanced.
 
Последнее редактирование:
Femboy Access
Эксперт
Статус
Оффлайн
Регистрация
11 Ноя 2020
Сообщения
1,335
Реакции[?]
428
Поинты[?]
96K
Код:
local FLAGS = {
    DUCKING = bit.lshift(1,1), -- Player flag -- Player is fully crouched
    ONGROUND = bit.lshift(1,0), -- At rest / on the ground
}

local STATE = {
    AIRDUCK = 1,
    AIR = 2,
    SLOWWWALK = 3,
    DUCK = 4,
    RUN = 5,
    STAND = 6
}

function get_condition(ent)
    local flags = ent.m_fFlags
  
    local in_air = bit.band(flags, FLAGS.ONGROUND) == 0
    local ducking = bit.band(flags, FLAGS.DUCKING) ~= 0
    local velocity = ent.m_vecVelocity:length2d()

    if in_air and ducking then return STATE.AIRDUCK
    elseif in_air then return STATE.AIR
    elseif velocity > 5 and __.refs.slowwalk:get() then return STATE.SLOWWALK
    elseif ducking then return STATE.DUCK
    elseif velocity > 5 then return STATE.RUN end
    return STATE.STAND
end
 
Сверху Снизу