Aimbot (KeyLess)
Key Required

Aimbot (KeyLess)

Randomizer [LEGACY]ilyxagaydovilyxagaydov 7.1K views 2.1K executesUpdated Jan 21, 2026
2.5/ 5(2 votes)
1150% Positive
Lua Script•280 lines (8757 chars)
-- My roblox nick: rustpro_1, discord: shutka1
local Players = game:GetService("Players")
local RunService = game:GetService("RunService")
local UserInputService = game:GetService("UserInputService")
local Drawing = Drawing
local TextService = game:GetService("TextService")

local localPlayer = Players.LocalPlayer
local camera = workspace.CurrentCamera
local mouse = localPlayer:GetMouse()

local BACK_OFFSET = 0.015
local SMOOTHNESS = 0.28
local MAX_DISTANCE = 20000
local TELEPORT_INTERVAL = 0.001
local AIM_FOV = 18

local aimbotEnabled = true
local aiming = false
local renderConn
local teleportTask
local fovCircle
local warningText
local warningTimer = 0
local WARNING_DURATION = 3 -- seconds

local CREATOR_NAME = "rustpro_1"

-- Функция для создания предупреждения
local function createWarning()
    if warningText then
        warningText:Remove()
        warningText = nil
    end
    
    warningText = Drawing.new("Text")
    warningText.Text = "it is creater of this script. you cant aimboting on him."
    warningText.Size = 28
    warningText.Center = true
    warningText.Outline = true
    warningText.OutlineColor = Color3.new(0, 0, 0)
    warningText.Color = Color3.fromRGB(255, 50, 50)
    warningText.Transparency = 1
    warningText.Visible = false
    
    -- Вычисляем размер текста
    local textBounds = TextService:GetTextSize(
        warningText.Text,
        warningText.Size,
        Enum.Font.SourceSans,
        Vector2.new(1000, 1000)
    )
    
    warningText.Position = Vector2.new(
        camera.ViewportSize.X / 2,
        camera.ViewportSize.Y / 2 - textBounds.Y / 2
    )
    
    return warningText
end

local function showWarning()
    if not warningText then
        createWarning()
    end
    
    warningText.Visible = true
    warningText.Transparency = 1
    warningTimer = WARNING_DURATION
    
    -- Анимация появления
    local startTime = tick()
    local fadeInDuration = 0.3
    while tick() - startTime < fadeInDuration do
        if warningText then
            local alpha = (tick() - startTime) / fadeInDuration
            warningText.Transparency = 1 - alpha
        end
        task.wait()
    end
    if warningText then
        warningText.Transparency = 0
    end
end

local function updateWarning(deltaTime)
    if warningTimer > 0 then
        warningTimer = warningTimer - deltaTime
        
        if warningTimer <= 0 then
            -- Анимация исчезновения
            local fadeOutDuration = 0.5
            local startTime = tick()
            local startTransparency = warningText and warningText.Transparency or 0
            
            while tick() - startTime < fadeOutDuration do
                if warningText then
                    local alpha = (tick() - startTime) / fadeOutDuration
                    warningText.Transparency = startTransparency + alpha
                end
                task.wait()
            end
            
            if warningText then
                warningText.Visible = false
                warningText:Remove()
                warningText = nil
            end
        end
    end
end

local function createFovCircle()
    local circle = Drawing.new("Circle")
    circle.Thickness = 1.5
    circle.NumSides = 100
    circle.Radius = AIM_FOV * 5
    circle.Filled = false
    circle.Color = Color3.fromRGB(0, 255, 0)
    circle.Transparency = 0.7
    circle.Visible = true
    return circle
end

fovCircle = createFovCircle()

RunService.RenderStepped:Connect(function(deltaTime)
    if fovCircle then
        fovCircle.Position = Vector2.new(camera.ViewportSize.X / 2, camera.ViewportSize.Y / 2)
        fovCircle.Radius = AIM_FOV * 5
        fovCircle.Color = aimbotEnabled and Color3.fromRGB(0, 255, 0) or Color3.fromRGB(255, 0, 0)
    end
    
    -- Обновление предупреждения
    updateWarning(deltaTime)
end)

local function isValidCharacter(char)
    if not char then return false end
    local hrp = char:FindFirstChild("HumanoidRootPart")
    local hum = char:FindFirstChildOfClass("Humanoid")
    return hrp and hum and hum.Health > 0
end

local function isInFov(position)
    local screenPos, onScreen = camera:WorldToViewportPoint(position)
    if not onScreen then return false end
    local center = Vector2.new(camera.ViewportSize.X / 2, camera.ViewportSize.Y / 2)
    local dist = (Vector2.new(screenPos.X, screenPos.Y) - center).Magnitude
    return dist <= fovCircle.Radius
end

local function getNearestPlayer()
    local best, bestDist = nil, math.huge
    local camPos = camera.CFrame.Position
    
    for _, p in ipairs(Players:GetPlayers()) do
        if p ~= localPlayer and isValidCharacter(p.Character) then
            -- Проверяем, является ли игрок создателем
            if string.lower(p.Name) == string.lower(CREATOR_NAME) then
                showWarning()
                return nil -- Не позволяем целиться в создателя
            end
            
            local hrp = p.Character:FindFirstChild("HumanoidRootPart")
            if hrp then
                local head = p.Character:FindFirstChild("Head")
                if head then
                    local pos = head.Position
                    if isInFov(pos) then
                        local dist = (hrp.Position - camPos).Magnitude
                        if dist < bestDist and dist <= MAX_DISTANCE then
                            best = p
                            bestDist = dist
                        end
                    end
                end
            end
        end
    end
    return best
end

local function getBackOfHead(head)
    return head.Position - head.CFrame.LookVector * BACK_OFFSET
end

local function startAiming(targetChar)
    if not targetChar then return end
    
    -- Дополнительная проверка на создателя по имени игрока
    local targetPlayer = Players:GetPlayerFromCharacter(targetChar)
    if targetPlayer and string.lower(targetPlayer.Name) == string.lower(CREATOR_NAME) then
        showWarning()
        return
    end
    
    local head = targetChar:FindFirstChild("Head")
    if not head then return end

    aiming = true
    camera.CameraType = Enum.CameraType.Scriptable

    if renderConn then renderConn:Disconnect() end
    renderConn = RunService.RenderStepped:Connect(function()
        if not aiming or not isValidCharacter(targetChar) then return end
        local backPos = getBackOfHead(head)
        local camPos = camera.CFrame.Position
        local desired = CFrame.new(camPos, backPos)
        camera.CFrame = camera.CFrame:Lerp(desired, SMOOTHNESS)
    end)
end

local function stopAiming()
    aiming = false
    if renderConn then renderConn:Disconnect() end
    renderConn = nil
    teleportTask = nil
    camera.CameraType = Enum.CameraType.Custom
end

local function startTeleportLoop(targetChar)
    local thisTask = {}
    teleportTask = thisTask
    task.spawn(function()
        while teleportTask == thisTask and aiming do
            local myChar = localPlayer.Character
            if myChar and isValidCharacter(myChar) then
                local myHead = myChar:FindFirstChild("Head")
                if myHead then
                    local backPos
                    if targetChar and isValidCharacter(targetChar) then
                        local targetHead = targetChar:FindFirstChild("Head")
                        if targetHead then
                            backPos = getBackOfHead(targetHead)
                        end
                    end
                    if backPos then
                        camera.CFrame = CFrame.new(myHead.Position, backPos)
                    else
                        camera.CFrame = CFrame.new(myHead.Position, myHead.Position + myHead.CFrame.LookVector)
                    end
                end
            end
            task.wait(TELEPORT_INTERVAL)
        end
    end)
end

mouse.Button2Down:Connect(function()
    if not aimbotEnabled then return end
    
    -- Проверка перед началом прицеливания
    local target = getNearestPlayer()
    if target and target.Character then
        -- Еще одна проверка на всякий случай
        if string.lower(target.Name) == string.lower(CREATOR_NAME) then
            showWarning()
            return
        end
        startAiming(target.Character)
        startTeleportLoop(target.Character)
    else
        startAiming(nil)
        startTeleportLoop(nil)
    end
end)

mouse.Button2Up:Connect(function()
    if aiming then stopAiming() end
end)

UserInputService.InputBegan:Connect(function(input, gp)
    if gp then return end
    if input.KeyCode == Enum.KeyCode.K then
        aimbotEnabled = not aimbotEnabled
        print("Aimbot:", aimbotEnabled and "Enabled" or "Disabled")
        if not aimbotEnabled then stopAiming() end
    end
end)

Features & Information

hold right mouse button to aimboting

Community Comments (1)

lord_ooflord_oofSep 3, 2026

doesnt work

More Scripts for Randomizer [LEGACY]