Aimbot script
Key RequiredUniversal

Aimbot script

Universal ScriptJOHNDOE999JOHNDOE999 495 views 4K executesUpdated Oct 5, 2026
Unrated
00
Lua Script•221 lines (7512 chars)
-- โหลดบริการและตัวแปรหลัก
local Players = game:GetService("Players")
local RunService = game:GetService("RunService")
local LocalPlayer = Players.LocalPlayer
local Camera = workspace.CurrentCamera

-- สร้าง ScreenGui
local ScreenGui = Instance.new("ScreenGui")
ScreenGui.Name = "AdvancedAimbotGui_Rainbow"
ScreenGui.Parent = game.CoreGui

-- ตัวแปรตั้งค่าระบบ
getgenv().AimbotEnabled = false
getgenv().AimbotMode = "Closest" -- "Closest" หรือ "FOV"
getgenv().FOVShow = false
getgenv().FOVRadius = 120 -- ขนาดรัศมีเริ่มต้น

-- สร้างวงกลม FOV (Drawing API)
local FOVCircle = Drawing.new("Circle")
FOVCircle.Visible = false
FOVCircle.Radius = getgenv().FOVRadius
FOVCircle.Thickness = 2
FOVCircle.Transparency = 0.8
FOVCircle.Filled = false

-- ฟังก์ชันคำนวณสีรุ้งตามเวลา (Rainbow Color)
local function GetRainbowColor()
    local tickTime = tick() * 5
    local r = math.sin(tickTime) * 127 + 128
    local g = math.sin(tickTime + 2) * 127 + 128
    local b = math.sin(tickTime + 4) * 127 + 128
    return Color3.fromRGB(r, g, b)
end

-- อัปเดตตำแหน่งและสีวงกลมทุกเฟรม
RunService.RenderStepped:Connect(function()
    FOVCircle.Position = Vector2.new(Camera.ViewportSize.X / 2, Camera.ViewportSize.Y / 2)
    FOVCircle.Radius = getgenv().FOVRadius
    if getgenv().FOVShow then
        FOVCircle.Visible = true
        FOVCircle.Color = GetRainbowColor()
    else
        FOVCircle.Visible = false
    end
end)

-- สร้างกรอบหลัก (Frame)
local MainFrame = Instance.new("Frame")
MainFrame.Size = UDim2.new(0, 200, 0, 210)
MainFrame.Position = UDim2.new(0.05, 0, 0.2, 0)
MainFrame.BackgroundColor3 = Color3.fromRGB(35, 35, 35)
MainFrame.BorderSizePixel = 0
MainFrame.Active = true
MainFrame.Draggable = true
MainFrame.Parent = ScreenGui

-- ข้อความหัวข้อ [New]
local Title = Instance.new("TextLabel")
Title.Size = UDim2.new(1, 0, 0, 30)
Title.BackgroundColor3 = Color3.fromRGB(20, 20, 20)
Title.TextColor3 = Color3.fromRGB(255, 255, 255)
Title.Text = "Aimbot [New]"
Title.TextSize = 14
Title.Font = Enum.Font.SourceSansBold
Title.Parent = MainFrame

-- ปุ่มเปิด-ปิด Aimbot
local ToggleBtn = Instance.new("TextButton")
ToggleBtn.Size = UDim2.new(0.85, 0, 0, 28)
ToggleBtn.Position = UDim2.new(0.075, 0, 0.17, 0)
ToggleBtn.BackgroundColor3 = Color3.fromRGB(200, 50, 50)
ToggleBtn.TextColor3 = Color3.fromRGB(255, 255, 255)
ToggleBtn.Text = "Aimbot: OFF"
ToggleBtn.TextSize = 13
ToggleBtn.Font = Enum.Font.SourceSansBold
ToggleBtn.Parent = MainFrame

-- ปุ่มสลับโหมด
local ModeBtn = Instance.new("TextButton")
ModeBtn.Size = UDim2.new(0.85, 0, 0, 28)
ModeBtn.Position = UDim2.new(0.075, 0, 0.33, 0)
ModeBtn.BackgroundColor3 = Color3.fromRGB(50, 100, 200)
ModeBtn.TextColor3 = Color3.fromRGB(255, 255, 255)
ModeBtn.Text = "Mode: Closest"
ModeBtn.TextSize = 13
ModeBtn.Font = Enum.Font.SourceSansBold
ModeBtn.Parent = MainFrame

-- ปุ่มเปิด-ปิดวงกลม FOV
local FOVBtn = Instance.new("TextButton")
FOVBtn.Size = UDim2.new(0.85, 0, 0, 28)
FOVBtn.Position = UDim2.new(0.075, 0, 0.49, 0)
FOVBtn.BackgroundColor3 = Color3.fromRGB(100, 100, 100)
FOVBtn.TextColor3 = Color3.fromRGB(255, 255, 255)
FOVBtn.Text = "FOV Circle: OFF"
FOVBtn.TextSize = 13
FOVBtn.Font = Enum.Font.SourceSansBold
FOVBtn.Parent = MainFrame

-- ปุ่มเพิ่มขนาด FOV (+)
local PlusBtn = Instance.new("TextButton")
PlusBtn.Size = UDim2.new(0.4, 0, 0, 28)
PlusBtn.Position = UDim2.new(0.075, 0, 0.68, 0)
PlusBtn.BackgroundColor3 = Color3.fromRGB(70, 70, 70)
PlusBtn.TextColor3 = Color3.fromRGB(255, 255, 255)
PlusBtn.Text = "FOV +"
PlusBtn.TextSize = 12
PlusBtn.Font = Enum.Font.SourceSansBold
PlusBtn.Parent = MainFrame

-- ปุ่มลดขนาด FOV (-)
local MinusBtn = Instance.new("TextButton")
MinusBtn.Size = UDim2.new(0.4, 0, 0, 28)
MinusBtn.Position = UDim2.new(0.525, 0, 0.68, 0)
MinusBtn.BackgroundColor3 = Color3.fromRGB(70, 70, 70)
MinusBtn.TextColor3 = Color3.fromRGB(255, 255, 255)
MinusBtn.Text = "FOV -"
MinusBtn.TextSize = 12
MinusBtn.Font = Enum.Font.SourceSansBold
MinusBtn.Parent = MainFrame

-- แสดงค่าขนาด FOV ปัจจุบัน
local FOVLabel = Instance.new("TextLabel")
FOVLabel.Size = UDim2.new(0.85, 0, 0, 20)
FOVLabel.Position = UDim2.new(0.075, 0, 0.84, 0)
FOVLabel.BackgroundTransparency = 1
FOVLabel.TextColor3 = Color3.fromRGB(200, 200, 200)
FOVLabel.Text = "FOV Size: 120"
FOVLabel.TextSize = 12
FOVLabel.Font = Enum.Font.SourceSans
FOVLabel.Parent = MainFrame

-- ควบคุมปุ่มเปิด/ปิด Aimbot
ToggleBtn.MouseButton1Click:Connect(function()
    getgenv().AimbotEnabled = not getgenv().AimbotEnabled
    if getgenv().AimbotEnabled then
        ToggleBtn.Text = "Aimbot: ON"
        ToggleBtn.BackgroundColor3 = Color3.fromRGB(50, 200, 50)
    else
        ToggleBtn.Text = "Aimbot: OFF"
        ToggleBtn.BackgroundColor3 = Color3.fromRGB(200, 50, 50)
    end
end)

-- ควบคุมปุ่มสลับโหมด
ModeBtn.MouseButton1Click:Connect(function()
    if getgenv().AimbotMode == "Closest" then
        getgenv().AimbotMode = "FOV"
        ModeBtn.Text = "Mode: FOV Target"
    else
        getgenv().AimbotMode = "Closest"
        ModeBtn.Text = "Mode: Closest"
    end
end)

-- ควบคุมปุ่มเปิด/ปิดวงกลม FOV
FOVBtn.MouseButton1Click:Connect(function()
    getgenv().FOVShow = not getgenv().FOVShow
    if getgenv().FOVShow then
        FOVBtn.Text = "FOV Circle: ON"
        FOVBtn.BackgroundColor3 = Color3.fromRGB(50, 150, 200)
    else
        FOVBtn.Text = "FOV Circle: OFF"
        FOVBtn.BackgroundColor3 = Color3.fromRGB(100, 100, 100)
    end
end)

-- ปรับเพิ่มขนาดวงกลม
PlusBtn.MouseButton1Click:Connect(function()
    getgenv().FOVRadius = math.min(getgenv().FOVRadius + 20, 400)
    FOVLabel.Text = "FOV Size: " .. tostring(getgenv().FOVRadius)
end)

-- ปรับลดขนาดวงกลม
MinusBtn.MouseButton1Click:Connect(function()
    getgenv().FOVRadius = math.max(getgenv().FOVRadius - 20, 20)
    FOVLabel.Text = "FOV Size: " .. tostring(getgenv().FOVRadius)
end)

-- ฟังก์ชันค้นหาเป้าหมาย
local function GetTarget()
    local target = nil
    local shortestDist = math.huge
    local screenCenter = Vector2.new(Camera.ViewportSize.X / 2, Camera.ViewportSize.Y / 2)

    for _, player in pairs(Players:GetPlayers()) do
        if player ~= LocalPlayer and player.Character and player.Character:FindFirstChild("HumanoidRootPart") then
            local humanoid = player.Character:FindFirstChild("Humanoid")
            if humanoid and humanoid.Health > 0 then
                local pos, onScreen = Camera:WorldToViewportPoint(player.Character.HumanoidRootPart.Position)
                if onScreen then
                    local screenPos = Vector2.new(pos.X, pos.Y)
                    local dist = (screenPos - screenCenter).Magnitude

                    if getgenv().AimbotMode == "Closest" then
                        if dist < shortestDist then
                            shortestDist = dist
                            target = player.Character.HumanoidRootPart
                        end
                    elseif getgenv().AimbotMode == "FOV" then
                        if dist <= getgenv().FOVRadius and dist < shortestDist then
                            shortestDist = dist
                            target = player.Character.HumanoidRootPart
                        end
                    end
                end
            end
        end
    end
    return target
end

-- ลูปการทำงานล็อกเป้า
RunService.RenderStepped:Connect(function()
    if getgenv().AimbotEnabled then
        local targetPart = GetTarget()
        if targetPart then
            Camera.CFrame = CFrame.new(Camera.CFrame.Position, targetPart.Position)
        end
    end
end)

Features & Information

Just Aimbot with Nothing

Community Comments (0)

No comments yet for this script.

More Scripts for Universal Scripts