Aimbot And Esp Script
Key RequiredUniversal

Aimbot And Esp Script

Universal ScriptHilosHAXHilosHAX 8.3K views 304 executesUpdated Apr 26, 2025
3.3/ 5(3 votes)
2167% Positive
Lua Script•205 lines (7843 chars)
local Players = game:GetService("Players")
local RunService = game:GetService("RunService")
local UserInputService = game:GetService("UserInputService")
local LocalPlayer = Players.LocalPlayer
local Mouse = LocalPlayer:GetMouse()
local Camera = workspace.CurrentCamera

local aimbotEnabled = false
local showFOV = true
local aimbotFOV = 200
local ESP_Enabled = true
local GUIOpen = true
local holdingRightClick = false

local GUI = Instance.new("ScreenGui")
GUI.Name = "HilosHAX_UI"
GUI.ResetOnSpawn = false
GUI.Parent = game.CoreGui

local Frame = Instance.new("Frame")
Frame.Size = UDim2.new(0, 300, 0, 400)
Frame.Position = UDim2.new(0.5, -150, 0.5, -200)
Frame.BackgroundColor3 = Color3.fromRGB(30, 30, 30)
Frame.BorderSizePixel = 0
Frame.Active = true
Frame.Draggable = true
Frame.Parent = GUI

local Title = Instance.new("TextLabel")
Title.Size = UDim2.new(1, 0, 0, 40)
Title.BackgroundTransparency = 1
Title.Text = "HilosHAX - Aimbot & ESP"
Title.TextColor3 = Color3.fromRGB(255, 255, 255)
Title.Font = Enum.Font.GothamBold
Title.TextSize = 18
Title.Parent = Frame

local FOVSlider = Instance.new("TextButton")
FOVSlider.Size = UDim2.new(1, -20, 0, 30)
FOVSlider.Position = UDim2.new(0, 10, 0, 50)
FOVSlider.BackgroundColor3 = Color3.fromRGB(50, 50, 50)
FOVSlider.Text = "Increase FOV (Current: "..aimbotFOV..")"
FOVSlider.TextColor3 = Color3.fromRGB(255, 255, 255)
FOVSlider.Font = Enum.Font.Gotham
FOVSlider.TextSize = 14
FOVSlider.Parent = Frame

local FOVToggle = Instance.new("TextButton")
FOVToggle.Size = UDim2.new(1, -20, 0, 30)
FOVToggle.Position = UDim2.new(0, 10, 0, 90)
FOVToggle.BackgroundColor3 = Color3.fromRGB(50, 50, 50)
FOVToggle.Text = "Toggle FOV Circle"
FOVToggle.TextColor3 = Color3.fromRGB(255, 255, 255)
FOVToggle.Font = Enum.Font.Gotham
FOVToggle.TextSize = 14
FOVToggle.Parent = Frame

local AimbotToggle = Instance.new("TextButton")
AimbotToggle.Size = UDim2.new(1, -20, 0, 30)
AimbotToggle.Position = UDim2.new(0, 10, 0, 130)
AimbotToggle.BackgroundColor3 = Color3.fromRGB(50, 50, 50)
AimbotToggle.Text = "Toggle Aimbot (Hold RMB)"
AimbotToggle.TextColor3 = Color3.fromRGB(255, 255, 255)
AimbotToggle.Font = Enum.Font.Gotham
AimbotToggle.TextSize = 14
AimbotToggle.Parent = Frame

local Footer = Instance.new("TextLabel")
Footer.Size = UDim2.new(1, 0, 0, 20)
Footer.Position = UDim2.new(0, 0, 1, -20)
Footer.BackgroundTransparency = 1
Footer.Text = "--Made By HilosHAX--"
Footer.TextColor3 = Color3.fromRGB(150, 150, 150)
Footer.Font = Enum.Font.Gotham
Footer.TextSize = 12
Footer.Parent = Frame

local FOVCircle = Drawing.new("Circle")
FOVCircle.Color = Color3.fromRGB(255, 255, 255)
FOVCircle.Thickness = 2
FOVCircle.Transparency = 1
FOVCircle.Filled = false

FOVSlider.MouseButton1Click:Connect(function()
    aimbotFOV = aimbotFOV + 50
    if aimbotFOV > 1000 then
        aimbotFOV = 50
    end
    FOVSlider.Text = "Increase FOV (Current: "..aimbotFOV..")"
end)

FOVToggle.MouseButton1Click:Connect(function()
    showFOV = not showFOV
end)

AimbotToggle.MouseButton1Click:Connect(function()
    aimbotEnabled = not aimbotEnabled
end)

UserInputService.InputBegan:Connect(function(input, processed)
    if input.KeyCode == Enum.KeyCode.RightShift then
        GUIOpen = not GUIOpen
        GUI.Enabled = GUIOpen
    end

    if input.UserInputType == Enum.UserInputType.MouseButton2 then
        holdingRightClick = true
    end
end)

UserInputService.InputEnded:Connect(function(input, processed)
    if input.UserInputType == Enum.UserInputType.MouseButton2 then
        holdingRightClick = false
    end
end)

function getClosestPlayer()
    local closest, distance = nil, math.huge
    for _, player in ipairs(Players:GetPlayers()) do
        if player ~= LocalPlayer and player.Character and player.Character:FindFirstChild("HumanoidRootPart") then
            local pos, onscreen = Camera:WorldToViewportPoint(player.Character.HumanoidRootPart.Position)
            if onscreen then
                local diff = (Vector2.new(pos.X, pos.Y) - Vector2.new(Camera.ViewportSize.X/2, Camera.ViewportSize.Y/2)).Magnitude
                if diff < distance and diff < aimbotFOV then
                    closest = player
                    distance = diff
                end
            end
        end
    end
    return closest
end

RunService.RenderStepped:Connect(function()
    FOVCircle.Position = Vector2.new(Camera.ViewportSize.X/2, Camera.ViewportSize.Y/2)
    FOVCircle.Radius = aimbotFOV
    FOVCircle.Visible = showFOV and GUIOpen

    if aimbotEnabled and holdingRightClick then
        local target = getClosestPlayer()
        if target and target.Character and target.Character:FindFirstChild("HumanoidRootPart") then
            Camera.CFrame = CFrame.new(Camera.CFrame.Position, target.Character.HumanoidRootPart.Position)
        end
    end

    if ESP_Enabled then
        for _, player in ipairs(Players:GetPlayers()) do
            if player ~= LocalPlayer and player.Character and player.Character:FindFirstChild("HumanoidRootPart") then
                if not player.Character:FindFirstChild("ESPBox") then
                    local box = Instance.new("BillboardGui")
                    box.Name = "ESPBox"
                    box.Size = UDim2.new(4, 0, 5, 0)
                    box.Adornee = player.Character.HumanoidRootPart
                    box.AlwaysOnTop = true
                    box.Parent = player.Character

                    local frame = Instance.new("Frame")
                    frame.Size = UDim2.new(1, 0, 1, 0)
                    frame.BackgroundTransparency = 1
                    frame.BorderSizePixel = 2
                    frame.BorderColor3 = Color3.fromRGB(255, 0, 0)
                    frame.Parent = box

                    local distanceLabel = Instance.new("TextLabel")
                    distanceLabel.Size = UDim2.new(1, 0, 0, 20)
                    distanceLabel.Position = UDim2.new(0, 0, 1, 0)
                    distanceLabel.BackgroundTransparency = 1
                    distanceLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
                    distanceLabel.TextSize = 10
                    distanceLabel.Text = ""
                    distanceLabel.Parent = box

                    local healthLabel = Instance.new("TextLabel")
                    healthLabel.Size = UDim2.new(0, 40, 1, 0)
                    healthLabel.Position = UDim2.new(-0.3, 0, 0, 0)
                    healthLabel.BackgroundTransparency = 1
                    healthLabel.TextColor3 = Color3.fromRGB(0, 255, 0)
                    healthLabel.TextSize = 10
                    healthLabel.Text = ""
                    healthLabel.Parent = box
                else
                    local box = player.Character:FindFirstChild("ESPBox")
                    if box then
                        local root = player.Character:FindFirstChild("HumanoidRootPart")
                        if root then
                            local distance = (root.Position - Camera.CFrame.Position).Magnitude
                            box:FindFirstChildOfClass("TextLabel").Text = "Dist: "..math.floor(distance)
                            box.Frame.BorderColor3 = Color3.fromRGB(255, 0, 0)

                            local humanoid = player.Character:FindFirstChildOfClass("Humanoid")
                            if humanoid then
                                local labels = box:GetChildren()
                                for _, lbl in ipairs(labels) do
                                    if lbl:IsA("TextLabel") and lbl.Position.X.Scale < 0 then
                                        lbl.Text = math.floor(humanoid.Health).."%"
                                    end
                                end
                            end
                        end
                    end
                end
            end
        end
    end
end)

Features & Information

Features. (Currently) Increase FOV (Normal is 200. Max is 1000) Toggle FOV Circle Toggle Aimbot (Hold RMB for it to lock on) (MUST BE TOGGLED MANUALLY BEFORE HOLDING) Pretty much it and it will get updates soon :)

Community Comments (2)

VisprVisprApr 26, 2025

me when the 100th universal esp script doesnt auto update when new players join :D

HilosHAXHilosHAXApr 26, 2025

@Vispr i have another script posted on my profile. its an esp script and it auto updates once a new player joins

More Scripts for Universal Scripts