⚔️Aura

Авто-удар противников с настройкой дистанции

script:name("Example") -- Имя скрипта
script:devs({"Author"}) -- Разработчики
script:desc("Example Script") -- Описание

aura = module.new("Aura", "Ultra mega")
range = slider.new(aura, "Range"):set(3.3):min(3):max(6):inc(0.1)

local rotation = nil

events.motion:set(function(event)
    target = math:search_target(range:get())

    if target ~= nil then
        rotation = math:rotation(target)

        event:setYaw(rotation[0])
        event:setPitch(rotation[1])

        if player:fall_distance() > 0.08 and player:cooldown() >= 0.93 then
            player:attack(target)
            player:swing()
        end
    else
        rotation = nil
    end
end)

events.render_2d:set(function(events)
    if rotation ~= nil then
        player:set_head_yaw(rotation[1])
        player:set_head_pitch(rotation[2])
        player:set_body_yaw(rotation[1])
    end
end)

Last updated