-- Services
local Players = game:GetService("Players")
local UIS = game:GetService("UserInputService")
local StarterGui = game:GetService("StarterGui")
local RunService = game:GetService("RunService")

-- Player and camera references
local localPlayer = Players.LocalPlayer
local camera = workspace.CurrentCamera

-- Aimbot toggle
local aiming = false

-- Function to get closest enemy player
local function getClosest()
    local closestDistance = math.huge
    local closestPlayer = nil

    for _, player in pairs(Players:GetPlayers()) do
        if player ~= localPlayer and player.Team ~= localPlayer.Team and player.Character and player.Character:FindFirstChild("HumanoidRootPart") then
            local myHRP = localPlayer.Character and localPlayer.Character:FindFirstChild("HumanoidRootPart")
            if myHRP then
                local distance = (myHRP.Position - player.Character.HumanoidRootPart.Position).Magnitude
                if distance < closestDistance then
                    closestDistance = distance
                    closestPlayer = player
                end
            end
        end
    end

    return closestPlayer
end

-- GUI creation
local screenGui = Instance.new("ScreenGui", localPlayer:WaitForChild("PlayerGui"))
screenGui.Name = "DarkHubAimbotGui"

local frame = Instance.new("Frame", screenGui)
frame.Position = UDim2.new(1, -150, 0, 50)
frame.Size = UDim2.new(0, 140, 0, 80)
frame.BackgroundColor3 = Color3.fromRGB(25, 25, 25)
frame.BorderSizePixel = 0

local title = Instance.new("TextLabel", frame)
title.Text = "Dark Hub - Aimbot"
title.Size = UDim2.new(1, 0, 0.5, 0)
title.BackgroundTransparency = 1
title.TextColor3 = Color3.fromRGB(255, 255, 255)
title.Font = Enum.Font.Gotham
title.TextScaled = true

local toggle = Instance.new("TextButton", frame)
toggle.Text = "OFF"
toggle.Size = UDim2.new(1, 0, 0.5, 0)
toggle.Position = UDim2.new(0, 0, 0.5, 0)
toggle.BackgroundColor3 = Color3.fromRGB(70, 70, 70)
toggle.TextColor3 = Color3.fromRGB(255, 255, 255)
toggle.Font = Enum.Font.Gotham
toggle.TextScaled = true

-- Aimbot loop
RunService.RenderStepped:Connect(function()
    if aiming then
        local target = getClosest()
        if target and target.Character and target.Character:FindFirstChild("Head") then
            camera.CFrame = CFrame.new(camera.CFrame.Position, target.Character.Head.Position)
        end
    end
end)

-- Button toggle logic
toggle.MouseButton1Click:Connect(function()
    aiming = not aiming
    toggle.Text = aiming and "ON" or "OFF"
    toggle.BackgroundColor3 = aiming and Color3.fromRGB(0, 170, 0) or Color3.fromRGB(70, 70, 70)
end)

Embed on website

To embed this program on your website, copy the following code and paste it into your website's HTML: