-- LocalScript - AI HUB -- StarterPlayer > StarterPlayerScripts local Players = game:GetService("Players") local player = Players.LocalPlayer local playerGui = player:WaitForChild("PlayerGui", 15) if not playerGui then warn("PlayerGui not found.") return end local UserInputService = game:GetService("UserInputService") local TweenService = game:GetService("TweenService") local VirtualInputManager = game:GetService("VirtualInputManager") local GuiService = game:GetService("GuiService") for _, name in ipairs({"NukeTeleporter", "AIHub", "InspectorTest", "InspectorTest2", "InspectorTest3", "InspectorOutput", "NukeOwnershipInspector"}) do local old = playerGui:FindFirstChild(name) if old then old:Destroy() end end -- ================= CONFIG ================= local TP_DELAY = 1.2 local CLICK_DELAY = 0.35 local loopingAutoInf = false local speedValue = 16 local jumpValue = 50 local infiniteJumpEnabled = false local espEnabled = false local visitedQueue = {} local visitedSet = {} local MAX_HISTORY_SIZE = 6 local espHighlights = {} -- ================= BASE DETECTION (dynamic, re-checked every call) ================= local function detectMyBase() local myUserId = player.UserId local basesFolder = workspace:FindFirstChild("Bases") if not basesFolder then return nil end for _, obj in ipairs(workspace:GetDescendants()) do if obj.Name == "Nuke" and (obj:IsA("BasePart") or obj:IsA("Model")) then local ok, ownerId = pcall(function() return obj:GetAttribute("OwnerUserId") end) if ok and ownerId == myUserId then local current = obj while current and current.Parent and current.Parent ~= basesFolder do current = current.Parent end if current and current.Parent == basesFolder then return current.Name end end end end return nil end -- ================= CORE FUNCTIONS ================= local function addToHistory(nuke) if visitedSet[nuke] then return end table.insert(visitedQueue, nuke) visitedSet[nuke] = true if #visitedQueue > MAX_HISTORY_SIZE then local oldest = table.remove(visitedQueue, 1) visitedSet[oldest] = nil end end local function getHumanoidRootPart() local char = player.Character or player.CharacterAdded:Wait() return char:WaitForChild("HumanoidRootPart") end local function getPosition(inst) if inst:IsA("BasePart") then return inst.Position elseif inst:IsA("Model") then return inst:GetPivot().Position end return nil end local function getCarriedNukeValue() local char = player.Character if not char then return nil end for _, child in ipairs(char:GetDescendants()) do if child.Name == "Nuke" or (child:IsA("Model") and child:FindFirstChild("BillboardGui")) then local billboard = child:FindFirstChildOfClass("BillboardGui") or child:FindFirstChild("BillboardGui", true) if billboard then local textLabel = billboard:FindFirstChildOfClass("TextLabel") if textLabel then local val = textLabel.Text:match("%d+") if val then return tonumber(val) end end end end end return nil end local function getNukeValue(nuke) local billboard = nuke:FindFirstChildOfClass("BillboardGui") or nuke:FindFirstChild("BillboardGui", true) if billboard then local textLabel = billboard:FindFirstChildOfClass("TextLabel") if textLabel then local val = textLabel.Text:match("%d+") if val then return tonumber(val) end end end return nil end local function getRandomNukeDifferent() local char = player.Character local available = {} local carriedValue = getCarriedNukeValue() -- Re-detectar la base CADA VEZ (por si cambió de base entre partidas) local myBaseName = detectMyBase() local basesFolder = workspace:FindFirstChild("Bases") local myBaseFolder = myBaseName and basesFolder and basesFolder:FindFirstChild(myBaseName) local function isInMyBase(obj) if not myBaseFolder then return false end -- si no se detectó base, no arriesgar: no tomar nada return obj:IsDescendantOf(myBaseFolder) end for _, obj in ipairs(workspace:GetDescendants()) do if obj.Name == "Nuke" and (obj:IsA("BasePart") or obj:IsA("Model")) then if char and obj:IsDescendantOf(char) then continue end if not isInMyBase(obj) then continue end if carriedValue then local nukeVal = getNukeValue(obj) if nukeVal and nukeVal ~= carriedValue then continue end end if not visitedSet[obj] then local pos = getPosition(obj) if pos then table.insert(available, {inst = obj, pos = pos}) end end end end if #available == 0 then visitedQueue = {} visitedSet = {} for _, obj in ipairs(workspace:GetDescendants()) do if obj.Name == "Nuke" and (obj:IsA("BasePart") or obj:IsA("Model")) then if not (char and obj:IsDescendantOf(char)) then if not isInMyBase(obj) then continue end if carriedValue then local nukeVal = getNukeValue(obj) if nukeVal and nukeVal ~= carriedValue then continue end end local pos = getPosition(obj) if pos then table.insert(available, {inst = obj, pos = pos}) end end end end end if #available > 0 then return available[math.random(1, #available)] end return nil end -- ================= DROP BUTTON ================= local function getDropButton() local candidates = { function() return playerGui.ScreenGui.HoldingFrame.Drop end, function() return playerGui.ScreenGui.HoldingFrame.Drop.TextButton end, function() return playerGui.ScreenGui["OLD UI"].HoldingFrameOld.Frame.Drop end, } for _, getFn in ipairs(candidates) do local ok, btn = pcall(getFn) if ok and btn then return btn end end for _, desc in ipairs(playerGui:GetDescendants()) do if desc:IsA("GuiButton") and desc.Name == "Drop" then return desc end end return nil end local function clickDropButton() local drop = getDropButton() if not drop then return false end local success = pcall(function() local pos = drop.AbsolutePosition local size = drop.AbsoluteSize local inset = GuiService:GetGuiInset() local randomX = math.random(-5, 5) local randomY = math.random(-5, 5) local centerX = pos.X + (size.X / 2) + inset.X + randomX local centerY = pos.Y + (size.Y / 2) + inset.Y + randomY VirtualInputManager:SendMouseButtonEvent(centerX, centerY, 0, true, game, 1) task.wait(0.05) VirtualInputManager:SendMouseButtonEvent(centerX, centerY, 0, false, game, 1) end) return success end -- ================= PHYSICS (FUN) ================= local function updateCharacterPhysics(char) local hum = char:WaitForChild("Humanoid", 10) if hum then hum.WalkSpeed = speedValue hum.JumpPower = jumpValue end end player.CharacterAdded:Connect(function(char) task.wait(1) updateCharacterPhysics(char) end) UserInputService.JumpRequest:Connect(function() if infiniteJumpEnabled then local char = player.Character local hum = char and char:FindFirstChildOfClass("Humanoid") if hum then hum:ChangeState(Enum.HumanoidStateType.Jumping) end end end) -- ================= ESP ================= local function applyESP(obj) if obj.Name == "Nuke" and (obj:IsA("BasePart") or obj:IsA("Model")) then local carriedValue = getCarriedNukeValue() local nukeVal = getNukeValue(obj) if carriedValue and nukeVal and nukeVal ~= carriedValue then local oldHl = obj:FindFirstChild("NukeHighlight") if oldHl then oldHl:Destroy() end return end if obj:FindFirstChild("NukeHighlight") then return end local highlight = Instance.new("Highlight") highlight.Name = "NukeHighlight" highlight.FillColor = carriedValue and Color3.fromRGB(0, 220, 255) or Color3.fromRGB(0, 255, 160) highlight.FillTransparency = 0.45 highlight.OutlineColor = Color3.fromRGB(255, 255, 255) highlight.OutlineTransparency = 0.15 highlight.Adornee = obj highlight.Parent = obj table.insert(espHighlights, highlight) end end local function cleanESP() for _, hl in ipairs(espHighlights) do if hl and hl.Parent then hl:Destroy() end end table.clear(espHighlights) end local function scanAndApplyESP() if not espEnabled then return end for _, obj in ipairs(workspace:GetDescendants()) do applyESP(obj) end end -- ================= UI CONSTRUCTION (wrapped in pcall) ================= local uiSuccess, uiError = pcall(function() local BG = Color3.fromRGB(13, 15, 18) local PANEL = Color3.fromRGB(19, 22, 27) local CARD = Color3.fromRGB(24, 28, 34) local ACCENT = Color3.fromRGB(0, 214, 180) local ACCENT_DIM = Color3.fromRGB(0, 150, 130) local TEXT_MAIN = Color3.fromRGB(235, 238, 240) local TEXT_SUB = Color3.fromRGB(140, 148, 158) local DANGER = Color3.fromRGB(220, 70, 70) local gui = Instance.new("ScreenGui") gui.Name = "AIHub" gui.ResetOnSpawn = false gui.DisplayOrder = 9999 gui.Parent = playerGui local function playTween(instance, duration, properties) local info = TweenInfo.new(duration, Enum.EasingStyle.Quad, Enum.EasingDirection.Out) TweenService:Create(instance, info, properties):Play() end local shadowFrame = Instance.new("Frame") shadowFrame.Size = UDim2.new(0, 300, 0, 360) shadowFrame.Position = UDim2.new(0.5, -150, 0.5, -180) shadowFrame.BackgroundColor3 = BG shadowFrame.BorderSizePixel = 0 shadowFrame.Active = true shadowFrame.Draggable = true shadowFrame.Parent = gui local sCorner = Instance.new("UICorner"); sCorner.CornerRadius = UDim.new(0, 16); sCorner.Parent = shadowFrame local shadowStroke = Instance.new("UIStroke") shadowStroke.Color = Color3.fromRGB(40, 45, 52) shadowStroke.Thickness = 1 shadowStroke.Parent = shadowFrame local header = Instance.new("Frame") header.Size = UDim2.new(1, 0, 0, 56) header.BackgroundColor3 = PANEL header.BorderSizePixel = 0 header.Parent = shadowFrame local headerCorner = Instance.new("UICorner"); headerCorner.CornerRadius = UDim.new(0, 16); headerCorner.Parent = header local headerFix = Instance.new("Frame") headerFix.Size = UDim2.new(1, 0, 0, 16) headerFix.Position = UDim2.new(0, 0, 1, -16) headerFix.BackgroundColor3 = PANEL headerFix.BorderSizePixel = 0 headerFix.Parent = header local accentDot = Instance.new("Frame") accentDot.Size = UDim2.new(0, 8, 0, 8) accentDot.Position = UDim2.new(0, 18, 0.5, -4) accentDot.BackgroundColor3 = ACCENT accentDot.Parent = header local dotCorner = Instance.new("UICorner"); dotCorner.CornerRadius = UDim.new(1, 0); dotCorner.Parent = accentDot local title = Instance.new("TextLabel") title.Size = UDim2.new(1, -110, 1, 0) title.Position = UDim2.new(0, 34, 0, 0) title.Text = "AI HUB" title.Font = Enum.Font.GothamBold title.TextSize = 17 title.TextColor3 = TEXT_MAIN title.BackgroundTransparency = 1 title.TextXAlignment = Enum.TextXAlignment.Left title.Parent = header local openButton = Instance.new("TextButton") openButton.Size = UDim2.new(0, 50, 0, 50) openButton.Position = UDim2.new(0.05, 0, 0.15, 0) openButton.BackgroundColor3 = PANEL openButton.Text = "AI" openButton.Font = Enum.Font.GothamBold openButton.TextSize = 16 openButton.TextColor3 = ACCENT openButton.Visible = false openButton.Active = true openButton.Draggable = true openButton.Parent = gui local obCorner = Instance.new("UICorner"); obCorner.CornerRadius = UDim.new(0, 25); obCorner.Parent = openButton local obStroke = Instance.new("UIStroke"); obStroke.Color = ACCENT; obStroke.Thickness = 1.5; obStroke.Parent = openButton local function makeIconButton(icon, parent) local btn = Instance.new("TextButton") btn.Size = UDim2.new(0, 30, 0, 30) btn.BackgroundColor3 = CARD btn.Text = icon btn.Font = Enum.Font.GothamBold btn.TextSize = 13 btn.TextColor3 = TEXT_SUB btn.AutoButtonColor = false btn.Parent = parent local c = Instance.new("UICorner"); c.CornerRadius = UDim.new(0, 8); c.Parent = btn return btn end local lockBtn = makeIconButton("🔓", header) lockBtn.Position = UDim2.new(1, -74, 0.5, -15) local uiLocked = false lockBtn.MouseButton1Click:Connect(function() uiLocked = not uiLocked shadowFrame.Draggable = not uiLocked lockBtn.Text = uiLocked and "🔒" or "🔓" playTween(lockBtn, 0.2, {BackgroundColor3 = uiLocked and DANGER or CARD}) end) local minBtn = makeIconButton("–", header) minBtn.Position = UDim2.new(1, -36, 0.5, -15) minBtn.TextSize = 16 minBtn.MouseButton1Click:Connect(function() shadowFrame.Visible = false openButton.Visible = true end) openButton.MouseButton1Click:Connect(function() openButton.Visible = false shadowFrame.Visible = true end) local tabContainer = Instance.new("Frame") tabContainer.Size = UDim2.new(1, -24, 0, 34) tabContainer.Position = UDim2.new(0, 12, 0, 64) tabContainer.BackgroundColor3 = CARD tabContainer.Parent = shadowFrame local tabContainerCorner = Instance.new("UICorner"); tabContainerCorner.CornerRadius = UDim.new(0, 10); tabContainerCorner.Parent = tabContainer local tabLayout = Instance.new("UIListLayout") tabLayout.FillDirection = Enum.FillDirection.Horizontal tabLayout.Padding = UDim.new(0, 2) tabLayout.Parent = tabContainer local tabPadding = Instance.new("UIPadding") tabPadding.PaddingLeft = UDim.new(0, 3) tabPadding.PaddingRight = UDim.new(0, 3) tabPadding.PaddingTop = UDim.new(0, 3) tabPadding.PaddingBottom = UDim.new(0, 3) tabPadding.Parent = tabContainer local function makeTabButton(text) local btn = Instance.new("TextButton") btn.Size = UDim2.new(0.5, -2, 1, 0) btn.BackgroundColor3 = CARD btn.Text = text btn.Font = Enum.Font.GothamBold btn.TextSize = 13 btn.TextColor3 = TEXT_SUB btn.AutoButtonColor = false btn.Parent = tabContainer local bc = Instance.new("UICorner"); bc.CornerRadius = UDim.new(0, 8); bc.Parent = btn return btn end local tabMainBtn = makeTabButton("MAIN") local tabFunBtn = makeTabButton("FUN") local allTabButtons = {tabMainBtn, tabFunBtn} tabMainBtn.BackgroundColor3 = ACCENT tabMainBtn.TextColor3 = Color3.fromRGB(10, 10, 12) local contentFrame = Instance.new("Frame") contentFrame.Size = UDim2.new(1, -24, 1, -140) contentFrame.Position = UDim2.new(0, 12, 0, 108) contentFrame.BackgroundTransparency = 1 contentFrame.Parent = shadowFrame local tabMainContent = Instance.new("Frame") tabMainContent.Size = UDim2.new(1, 0, 1, 0) tabMainContent.BackgroundTransparency = 1 tabMainContent.Parent = contentFrame local mainLayout = Instance.new("UIListLayout") mainLayout.Padding = UDim.new(0, 8) mainLayout.Parent = tabMainContent local tabFunContent = Instance.new("ScrollingFrame") tabFunContent.Size = UDim2.new(1, 0, 1, 0) tabFunContent.BackgroundTransparency = 1 tabFunContent.ScrollBarThickness = 2 tabFunContent.ScrollBarImageColor3 = ACCENT tabFunContent.Visible = false tabFunContent.Parent = contentFrame local funLayout = Instance.new("UIListLayout") funLayout.Padding = UDim.new(0, 8) funLayout.Parent = tabFunContent funLayout:GetPropertyChangedSignal("AbsoluteContentSize"):Connect(function() tabFunContent.CanvasSize = UDim2.new(0, 0, 0, funLayout.AbsoluteContentSize.Y + 10) end) local function makeCardButton(text, sub, baseColor, parent, filled) local btn = Instance.new("TextButton") btn.Size = UDim2.new(1, 0, 0, 44) btn.BackgroundColor3 = filled and baseColor or CARD btn.Text = "" btn.AutoButtonColor = false btn.Parent = parent local bc = Instance.new("UICorner"); bc.CornerRadius = UDim.new(0, 10); bc.Parent = btn if not filled then local btnStroke = Instance.new("UIStroke") btnStroke.Color = baseColor btnStroke.Thickness = 1.3 btnStroke.Transparency = 0.3 btnStroke.Parent = btn end local accentBar = Instance.new("Frame") accentBar.Size = UDim2.new(0, 3, 0.6, 0) accentBar.Position = UDim2.new(0, 0, 0.2, 0) accentBar.BackgroundColor3 = filled and Color3.fromRGB(10,10,12) or baseColor accentBar.BorderSizePixel = 0 accentBar.Visible = filled accentBar.Parent = btn local label = Instance.new("TextLabel") label.Size = UDim2.new(1, -24, 1, 0) label.Position = UDim2.new(0, 16, 0, 0) label.BackgroundTransparency = 1 label.Text = text label.Font = Enum.Font.GothamBold label.TextSize = 14 label.TextColor3 = filled and Color3.fromRGB(10, 10, 12) or TEXT_MAIN label.TextXAlignment = Enum.TextXAlignment.Left label.Parent = btn local baseBg = filled and baseColor or CARD btn.MouseEnter:Connect(function() playTween(btn, 0.15, {BackgroundColor3 = filled and baseColor:Lerp(Color3.new(1,1,1), 0.12) or Color3.fromRGB(32, 37, 44)}) end) btn.MouseLeave:Connect(function() playTween(btn, 0.15, {BackgroundColor3 = baseBg}) end) return btn, label end local btnRandom, lblRandom = makeCardButton("Teleport to Random Nuke", nil, ACCENT, tabMainContent, false) local btnDrop, lblDrop = makeCardButton("Click DROP", nil, ACCENT, tabMainContent, false) local btnAutoInf, lblAutoInf = makeCardButton("Auto TP Random + Drop", nil, ACCENT, tabMainContent, true) local btnCoverScreen, lblCoverScreen = makeCardButton("Cover Screen", nil, TEXT_SUB, tabMainContent, false) -- ================= COVER SCREEN OVERLAY ================= local coverGui = Instance.new("ScreenGui") coverGui.Name = "ScreenCoverOverlay" coverGui.ResetOnSpawn = false coverGui.DisplayOrder = 10000 coverGui.IgnoreGuiInset = true coverGui.Enabled = false coverGui.Parent = playerGui local coverFrame = Instance.new("Frame") coverFrame.Size = UDim2.new(1, 0, 1, 0) coverFrame.Position = UDim2.new(0, 0, 0, 0) coverFrame.BackgroundColor3 = Color3.new(0, 0, 0) coverFrame.BorderSizePixel = 0 coverFrame.ZIndex = 1 coverFrame.Parent = coverGui local coverText = Instance.new("TextLabel") coverText.Size = UDim2.new(0.8, 0, 0, 40) coverText.Position = UDim2.new(0.1, 0, 0.45, 0) coverText.BackgroundTransparency = 1 coverText.Text = "Screen Covered" coverText.Font = Enum.Font.GothamBold coverText.TextSize = 22 coverText.TextColor3 = ACCENT coverText.ZIndex = 2 coverText.Parent = coverFrame local uncoverBtn = Instance.new("TextButton") uncoverBtn.Size = UDim2.new(0, 180, 0, 44) uncoverBtn.Position = UDim2.new(0.5, -90, 0.55, 10) uncoverBtn.BackgroundColor3 = ACCENT uncoverBtn.Text = "Tap to Uncover" uncoverBtn.Font = Enum.Font.GothamBold uncoverBtn.TextSize = 15 uncoverBtn.TextColor3 = Color3.fromRGB(10, 10, 12) uncoverBtn.ZIndex = 2 uncoverBtn.Parent = coverFrame local uncoverCorner = Instance.new("UICorner"); uncoverCorner.CornerRadius = UDim.new(0, 10); uncoverCorner.Parent = uncoverBtn local screenCovered = false local function setCover(state) screenCovered = state coverGui.Enabled = state lblCoverScreen.Text = state and "Uncover Screen" or "Cover Screen" end btnCoverScreen.MouseButton1Click:Connect(function() setCover(not screenCovered) end) uncoverBtn.MouseButton1Click:Connect(function() setCover(false) end) -- ================= DROPDOWNS (Fun) ================= local activeDropdown = nil local function createDropdown(text, options, parent, callback) local container = Instance.new("Frame") container.Size = UDim2.new(1, 0, 0, 40) container.BackgroundTransparency = 1 container.Parent = parent local mainBtn = Instance.new("TextButton") mainBtn.Size = UDim2.new(1, 0, 0, 40) mainBtn.BackgroundColor3 = CARD mainBtn.Text = " " .. text .. ": Default" mainBtn.Font = Enum.Font.GothamBold mainBtn.TextSize = 12 mainBtn.TextColor3 = TEXT_SUB mainBtn.TextXAlignment = Enum.TextXAlignment.Left mainBtn.AutoButtonColor = false mainBtn.Parent = container local btnCorner = Instance.new("UICorner"); btnCorner.CornerRadius = UDim.new(0, 10); btnCorner.Parent = mainBtn local arrow = Instance.new("TextLabel") arrow.Size = UDim2.new(0, 30, 1, 0) arrow.Position = UDim2.new(1, -34, 0, 0) arrow.BackgroundTransparency = 1 arrow.Text = "▾" arrow.TextColor3 = ACCENT arrow.Font = Enum.Font.GothamBold arrow.TextSize = 14 arrow.Parent = mainBtn local optionsFrame = Instance.new("Frame") optionsFrame.Size = UDim2.new(1, 0, 0, #options * 30) optionsFrame.Position = UDim2.new(0, 0, 0, 44) optionsFrame.BackgroundColor3 = PANEL optionsFrame.BorderSizePixel = 0 optionsFrame.ZIndex = 10 optionsFrame.Visible = false optionsFrame.Parent = container local ofCorner = Instance.new("UICorner"); ofCorner.CornerRadius = UDim.new(0, 8); ofCorner.Parent = optionsFrame local ofStroke = Instance.new("UIStroke") ofStroke.Color = ACCENT ofStroke.Thickness = 1 ofStroke.Transparency = 0.5 ofStroke.Parent = optionsFrame local ofLayout = Instance.new("UIListLayout") ofLayout.Parent = optionsFrame for _, opt in ipairs(options) do local optBtn = Instance.new("TextButton") optBtn.Size = UDim2.new(1, 0, 0, 30) optBtn.BackgroundTransparency = 1 optBtn.Text = " " .. tostring(opt.name) optBtn.Font = Enum.Font.Gotham optBtn.TextSize = 12 optBtn.TextColor3 = TEXT_SUB optBtn.TextXAlignment = Enum.TextXAlignment.Left optBtn.ZIndex = 11 optBtn.Parent = optionsFrame optBtn.MouseButton1Click:Connect(function() mainBtn.Text = " " .. text .. ": " .. opt.name optionsFrame.Visible = false container.Size = UDim2.new(1, 0, 0, 40) if activeDropdown == optionsFrame then activeDropdown = nil end callback(opt.value) end) end mainBtn.MouseButton1Click:Connect(function() if activeDropdown and activeDropdown ~= optionsFrame then activeDropdown.Visible = false activeDropdown.Parent.Size = UDim2.new(1, 0, 0, 40) end optionsFrame.Visible = not optionsFrame.Visible if optionsFrame.Visible then activeDropdown = optionsFrame container.Size = UDim2.new(1, 0, 0, 44 + (#options * 30) + 4) else activeDropdown = nil container.Size = UDim2.new(1, 0, 0, 40) end end) end createDropdown("Run Speed", { {name = "Normal (16)", value = 16}, {name = "Fast (38)", value = 38}, {name = "Super (80)", value = 80}, {name = "Extreme (120)", value = 120} }, tabFunContent, function(val) speedValue = val if player.Character then updateCharacterPhysics(player.Character) end end) createDropdown("High Jump", { {name = "Normal (50)", value = 50}, {name = "High (90)", value = 90}, {name = "Super (150)", value = 150}, {name = "Extreme (250)", value = 250} }, tabFunContent, function(val) jumpValue = val if player.Character then updateCharacterPhysics(player.Character) end end) local function createToggle(text, parent, callback) local btn = Instance.new("TextButton") btn.Size = UDim2.new(1, 0, 0, 40) btn.BackgroundColor3 = CARD btn.Text = "" btn.AutoButtonColor = false btn.Parent = parent local btnCorner = Instance.new("UICorner"); btnCorner.CornerRadius = UDim.new(0, 10); btnCorner.Parent = btn local label = Instance.new("TextLabel") label.Size = UDim2.new(1, -60, 1, 0) label.Position = UDim2.new(0, 14, 0, 0) label.BackgroundTransparency = 1 label.Text = text label.Font = Enum.Font.GothamBold label.TextSize = 12 label.TextColor3 = TEXT_SUB label.TextXAlignment = Enum.TextXAlignment.Left label.Parent = btn local switchBg = Instance.new("Frame") switchBg.Size = UDim2.new(0, 40, 0, 20) switchBg.Position = UDim2.new(1, -52, 0.5, -10) switchBg.BackgroundColor3 = Color3.fromRGB(50, 55, 62) switchBg.Parent = btn local swBgCorner = Instance.new("UICorner"); swBgCorner.CornerRadius = UDim.new(1, 0); swBgCorner.Parent = switchBg local knob = Instance.new("Frame") knob.Size = UDim2.new(0, 16, 0, 16) knob.Position = UDim2.new(0, 2, 0.5, -8) knob.BackgroundColor3 = Color3.fromRGB(200, 205, 210) knob.Parent = switchBg local knobCorner = Instance.new("UICorner"); knobCorner.CornerRadius = UDim.new(1, 0); knobCorner.Parent = knob local active = false btn.MouseButton1Click:Connect(function() active = not active label.TextColor3 = active and TEXT_MAIN or TEXT_SUB playTween(switchBg, 0.15, {BackgroundColor3 = active and ACCENT_DIM or Color3.fromRGB(50, 55, 62)}) playTween(knob, 0.15, {Position = active and UDim2.new(1, -18, 0.5, -8) or UDim2.new(0, 2, 0.5, -8), BackgroundColor3 = active and ACCENT or Color3.fromRGB(200, 205, 210)}) callback(active) end) end createToggle("Infinite Jump (Fly)", tabFunContent, function(state) infiniteJumpEnabled = state end) createToggle("Smart ESP (Level Filter)", tabFunContent, function(state) espEnabled = state if espEnabled then scanAndApplyESP() else cleanESP() end end) local statusLabel = Instance.new("TextLabel") statusLabel.Size = UDim2.new(1, -24, 0, 20) statusLabel.Position = UDim2.new(0, 12, 1, -26) statusLabel.BackgroundTransparency = 1 statusLabel.Text = "AI HUB ready." statusLabel.Font = Enum.Font.Code statusLabel.TextSize = 10 statusLabel.TextColor3 = TEXT_SUB statusLabel.TextXAlignment = Enum.TextXAlignment.Left statusLabel.Parent = shadowFrame local tabContents = {tabMainContent, tabFunContent} local function selectTab(index) for i, btn in ipairs(allTabButtons) do if i == index then btn.BackgroundColor3 = ACCENT btn.TextColor3 = Color3.fromRGB(10, 10, 12) else btn.BackgroundColor3 = CARD btn.TextColor3 = TEXT_SUB end end for i, content in ipairs(tabContents) do content.Visible = (i == index) end end tabMainBtn.MouseButton1Click:Connect(function() selectTab(1) end) tabFunBtn.MouseButton1Click:Connect(function() selectTab(2) end) task.spawn(function() while true do task.wait(1) if espEnabled then cleanESP() scanAndApplyESP() end end end) btnRandom.MouseButton1Click:Connect(function() local data = getRandomNukeDifferent() if data then local hrp = getHumanoidRootPart() hrp.CFrame = CFrame.new(data.pos + Vector3.new(0, 5, 0)) addToHistory(data.inst) statusLabel.Text = "Random TP successful (your base only)." else statusLabel.Text = "No nukes found in your base." end end) btnDrop.MouseButton1Click:Connect(function() local clicked = clickDropButton() statusLabel.Text = clicked and "DROP clicked successfully." or "Drop button not found." end) btnAutoInf.MouseButton1Click:Connect(function() if loopingAutoInf then loopingAutoInf = false return end loopingAutoInf = true lblAutoInf.Text = "Stop Auto TP" task.spawn(function() while loopingAutoInf do local data = getRandomNukeDifferent() if not data then statusLabel.Text = "No nukes found in your base..." task.wait(1.5) continue end local hrp = getHumanoidRootPart() hrp.CFrame = CFrame.new(data.pos + Vector3.new(0, 5, 0)) addToHistory(data.inst) task.wait(CLICK_DELAY) clickDropButton() statusLabel.Text = "Processing nuke (your base)..." task.wait(TP_DELAY + math.random(-20, 20)/100) end loopingAutoInf = false lblAutoInf.Text = "Auto TP Random + Drop" statusLabel.Text = "Auto TP stopped." end) end) end) if not uiSuccess then warn("UI BUILD ERROR: " .. tostring(uiError)) end