-- ========================================================== -- DEFINITIVE BOTS HUB FOR DELTA (WITH GUI, ANIMATIONS AND TOGGLE) -- ========================================================== local Players = game:GetService("Players") local Workspace = game:GetService("Workspace") local TweenService = game:GetService("TweenService") local UserInputService = game:GetService("UserInputService") local LocalPlayer = Players.LocalPlayer -- Remove previous interface if it already existed to avoid duplicates local PlayerGui = LocalPlayer:FindFirstChildOfClass("PlayerGui") if PlayerGui then local oldHub = PlayerGui:FindFirstChild("BotsHubUI") if oldHub then oldHub:Destroy() end end local BotsFolder = Workspace:FindFirstChild("BotsHubVisualsGlobal") if BotsFolder then BotsFolder:Destroy() end BotsFolder = Instance.new("Folder") BotsFolder.Name = "BotsHubVisualsGlobal" BotsFolder.Parent = Workspace local botsActive = false local maxBots = 12 -- ========================================================== -- CREATION OF THE GRAPHICAL INTERFACE (BOTS HUB) -- ========================================================== local ScreenGui = Instance.new("ScreenGui") ScreenGui.Name = "BotsHubUI" ScreenGui.ResetOnSpawn = false ScreenGui.Parent = PlayerGui -- Main Window local MainFrame = Instance.new("Frame") MainFrame.Name = "MainFrame" MainFrame.Size = UDim2.new(0, 320, 0, 220) MainFrame.Position = UDim2.new(0.5, -160, 0.5, -110) MainFrame.BackgroundColor3 = Color3.fromRGB(20, 20, 30) MainFrame.BorderSizePixel = 0 MainFrame.ClipsDescendants = true MainFrame.Parent = ScreenGui local UICornerMain = Instance.new("UICorner") UICornerMain.CornerRadius = UDim.new(0, 12) UICornerMain.Parent = MainFrame -- Top Bar (To drag the UI) local TopBar = Instance.new("Frame") TopBar.Name = "TopBar" TopBar.Size = UDim2.new(1, 0, 0, 40) TopBar.BackgroundColor3 = Color3.fromRGB(30, 30, 45) TopBar.BorderSizePixel = 0 TopBar.Parent = MainFrame local UICornerTop = Instance.new("UICorner") UICornerTop.CornerRadius = UDim.new(0, 12) TopBar.Parent = MainFrame local TitleLabel = Instance.new("TextLabel") TitleLabel.Size = UDim2.new(1, -50, 1, 0) TitleLabel.Position = UDim2.new(0, 15, 0, 0) TitleLabel.BackgroundTransparency = 1 TitleLabel.Text = "🤖 BOTS HUB (DELTA)" TitleLabel.TextColor3 = Color3.fromRGB(255, 255, 255) TitleLabel.TextSize = 16 TitleLabel.Font = Enum.Font.GothamBold TitleLabel.TextXAlignment = Enum.TextXAlignment.Left TitleLabel.Parent = TopBar -- Hide / Minimize Button (-) local MinimizeButton = Instance.new("TextButton") MinimizeButton.Size = UDim2.new(0, 35, 0, 35) MinimizeButton.Position = UDim2.new(1, -40, 0, 2.5) MinimizeButton.BackgroundColor3 = Color3.fromRGB(45, 45, 65) MinimizeButton.Text = "-" MinimizeButton.TextColor3 = Color3.fromRGB(255, 255, 255) MinimizeButton.TextSize = 20 MinimizeButton.Font = Enum.Font.GothamBold MinimizeButton.Parent = TopBar local UICornerMin = Instance.new("UICorner") UICornerMin.CornerRadius = UDim.new(0, 8) UICornerMin.Parent = MinimizeButton -- Internal Content Container local ContentFrame = Instance.new("Frame") ContentFrame.Size = UDim2.new(1, 0, 1, -40) ContentFrame.Position = UDim2.new(0, 0, 0, 40) ContentFrame.BackgroundTransparency = 1 ContentFrame.Parent = MainFrame -- Toggle Button (Start / Disable) local ToggleButton = Instance.new("TextButton") ToggleButton.Size = UDim2.new(0, 260, 0, 50) ToggleButton.Position = UDim2.new(0.5, -130, 0.25, 0) ToggleButton.BackgroundColor3 = Color3.fromRGB(0, 170, 127) ToggleButton.Text = "STATUS: OFF" ToggleButton.TextColor3 = Color3.fromRGB(255, 255, 255) ToggleButton.TextSize = 15 ToggleButton.Font = Enum.Font.GothamBold ToggleButton.Parent = ContentFrame local UICornerToggle = Instance.new("UICorner") UICornerToggle.CornerRadius = UDim.new(0, 10) UICornerToggle.Parent = ToggleButton -- Bots Status (Info label) local StatusLabel = Instance.new("TextLabel") StatusLabel.Size = UDim2.new(1, 0, 0, 30) StatusLabel.Position = UDim2.new(0, 0, 0.65, 0) StatusLabel.BackgroundTransparency = 1 StatusLabel.Text = "Click Start to spawn bots" StatusLabel.TextColor3 = Color3.fromRGB(180, 180, 180) StatusLabel.TextSize = 13 StatusLabel.Font = Enum.Font.Gotham StatusLabel.Parent = ContentFrame -- ========================================================== -- INTERFACE DRAGGING SYSTEM (DRAG & DROP) -- ========================================================== local dragging, dragInput, dragStart, startPos TopBar.InputBegan:Connect(function(input) if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then dragging = true dragStart = input.Position startPos = MainFrame.Position input.Changed:Connect(function() if input.UserInputState == Enum.UserInputState.End then dragging = false end end) end end) TopBar.InputChanged:Connect(function(input) if input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == Enum.UserInputType.Touch then dragInput = input end end) UserInputService.InputChanged:Connect(function(input) if input == dragInput and dragging then local delta = input.Position - dragStart MainFrame.Position = UDim2.new(startPos.X.Scale, startPos.X.Offset + delta.X, startPos.Y.Scale, startPos.Y.Offset + delta.Y) end end) -- ========================================================== -- MINIMIZE / HIDE ANIMATIONS -- ========================================================== local minimized = false MinimizeButton.MouseButton1Click:Connect(function() minimized = not minimized local targetSize = minimized and UDim2.new(0, 320, 0, 40) or UDim2.new(0, 320, 0, 220) local tweenInfo = TweenInfo.new(0.3, Enum.EasingStyle.Quad, Enum.EasingDirection.Out) TweenService:Create(MainFrame, tweenInfo, {Size = targetSize}):Play() ContentFrame.Visible = not minimized MinimizeButton.Text = minimized and "+" or "-" end) -- ========================================================== -- CREATION AND MOVEMENT LOGIC FOR BOTS -- ========================================================== local function CreateBot(isSpy) if not botsActive then return end local charLocal = LocalPlayer.Character if not charLocal then return end local rootLocal = charLocal:FindFirstChild("HumanoidRootPart") or charLocal:FindFirstChild("Head") if not rootLocal then return end local prefix = isSpy and "Spy_" or "Bot_" local part = Instance.new("Part") part.Name = prefix .. math.random(1000, 9999) part.Size = Vector3.new(3, 5, 3) part.Position = rootLocal.Position + Vector3.new(math.random(-10, 10), 3, math.random(-10, 10)) part.BrickColor = isSpy and BrickColor.new("Bright red") or BrickColor.new("Medium blue") part.Material = Enum.Material.Neon part.CanCollide = false part.Anchored = false part.Parent = BotsFolder -- Billboard with text label local billboard = Instance.new("BillboardGui") billboard.Size = UDim2.new(0, 200, 0, 40) billboard.StudsOffset = Vector3.new(0, 4, 0) billboard.AlwaysOnTop = true billboard.Parent = part local textLabel = Instance.new("TextLabel") textLabel.Size = UDim2.new(1, 0, 1, 0) textLabel.BackgroundTransparency = 1 textLabel.Text = part.Name textLabel.TextColor3 = Color3.new(1, 1, 1) textLabel.TextScaled = true textLabel.Font = Enum.Font.GothamBold textLabel.Parent = billboard -- Independent bot loop task.spawn(function() while botsActive and part and part.Parent do task.wait(0.05) local targetFinal = nil if isSpy then -- Find closest other player local minDist = math.huge for _, p in ipairs(Players:GetPlayers()) do if p ~= LocalPlayer and p.Character then local r = p.Character:FindFirstChild("HumanoidRootPart") or p.Character:FindFirstChild("Head") if r then local dist = (part.Position - r.Position).Magnitude if dist < minDist then minDist = dist targetFinal = r.Position end end end end end if not targetFinal and LocalPlayer.Character then local rLocal = LocalPlayer.Character:FindFirstChild("HumanoidRootPart") or LocalPlayer.Character:FindFirstChild("Head") if rLocal then targetFinal = rLocal.Position end end if targetFinal then local dir = (targetFinal - part.Position).Unit local remainingDist = (targetFinal - part.Position).Magnitude if remainingDist > 6 then part.CFrame = part.CFrame + (dir * 0.6) end end end part:Destroy() end) end -- ========================================================== -- TOGGLE BUTTON (TURN ON / OFF) -- ========================================================== ToggleButton.MouseButton1Click:Connect(function() botsActive = not botsActive if botsActive then ToggleButton.Text = "STATUS: ACTIVE" ToggleButton.BackgroundColor3 = Color3.fromRGB(170, 0, 0) StatusLabel.Text = "Bots active and chasing!" -- Spawn initial wave task.spawn(function() for i = 1, maxBots do if not botsActive then break end local isASpy = (i <= 3) CreateBot(isASpy) task.wait(0.1) end end) else ToggleButton.Text = "STATUS: OFF" ToggleButton.BackgroundColor3 = Color3.fromRGB(0, 170, 127) StatusLabel.Text = "Bots successfully deactivated." BotsFolder:ClearAllChildren() end end)