--======================================================== -- HP TEAM PRO V2 - ADAPTIVE LEARNING AUTOPILOT -- Target: 100 Days at Sea | Delta Mobile | Client-side -- -- V2 upgrades over V1: -- * Classifies prompt/object names into tentative game categories -- * Scores targets instead of blindly choosing the nearest prompt -- * Learns from observed prompt outcomes and applies cooldowns -- * Replans after blocked movement or failed interactions -- * Tracks character health and respawn state -- * Optional executor-file memory (writefile/readfile) with fallback -- * Mobile GUI with live decision/debug information -- -- IMPORTANT LIMITATIONS: -- * This is adaptive heuristic automation, not a trained vision model. -- * It cannot read arbitrary screen pixels or infer unknown game rules. -- * Client-side input does not bypass server validation. -- * No verified game-specific victory recipe/objective data was provided. -- * Unknown objects are explored cautiously; do not assume victory. --======================================================== repeat task.wait() until game:IsLoaded() local Players = game:GetService("Players") local Workspace = game:GetService("Workspace") local PathfindingService = game:GetService("PathfindingService") local RunService = game:GetService("RunService") local Player = Players.LocalPlayer local PlayerGui = Player:WaitForChild("PlayerGui") -- Stop an older HP Team copy if present. if getgenv and getgenv().HP_TEAM_PRO_STOP then pcall(getgenv().HP_TEAM_PRO_STOP) end local CONFIG = { ScanRadius = 350, ScanInterval = 1.5, DecisionInterval = 0.35, TargetCooldown = 12, FailureCooldown = 25, MaxPathRetries = 2, InteractionVerifyTime = 1.2, MemoryFile = "HP_TEAM_PRO_V2_MEMORY.json", SaveMemoryEvery = 20, AllowUnknownExploration = true, UnknownExploreScore = 8, LowHealthRatio = 0.28, } local AI = { Running = false, Paused = false, Destroyed = false, Generation = 0, Status = "WAITING", Objective = "Press START to begin observing", LastAction = "None", Target = nil, ScanCount = 0, Interactions = 0, SuccessfulChanges = 0, FailedActions = 0, Decisions = 0, Knowledge = {}, Cooldowns = {}, FailureCounts = {}, RecentLog = {}, LastSave = 0, Busy = false, Connections = {}, Mode = "LEARN + PLAY", } local COLORS = { BG = Color3.fromRGB(15, 10, 27), PANEL = Color3.fromRGB(30, 20, 48), PURPLE = Color3.fromRGB(160, 90, 255), WHITE = Color3.fromRGB(245, 240, 255), GREEN = Color3.fromRGB(75, 255, 145), RED = Color3.fromRGB(255, 85, 105), YELLOW = Color3.fromRGB(255, 205, 85), GRAY = Color3.fromRGB(165, 155, 180) } local function safeCall(fn, ...) local ok, result = pcall(fn, ...) if ok then return true, result end return false, result end local function getCharacter() return Player.Character end local function getHumanoid() local character = getCharacter() return character and character:FindFirstChildOfClass("Humanoid") end local function getRoot() local character = getCharacter() return character and character:FindFirstChild("HumanoidRootPart") end local function isAlive() local h = getHumanoid() return h ~= nil and h.Health > 0 end local function clamp(n, low, high) return math.max(low, math.min(high, n)) end local function cleanText(value) return string.lower(tostring(value or "")):gsub("[%c]", " ") end local function getPromptPart(prompt) if not prompt or not prompt.Parent then return nil end local parent = prompt.Parent if parent:IsA("Attachment") then parent = parent.Parent end if parent and parent:IsA("BasePart") then return parent end if parent and parent:IsA("Model") then return parent.PrimaryPart or parent:FindFirstChildWhichIsA("BasePart", true) end return nil end local function getObjectLabel(prompt) local parts = {} if prompt then if prompt.ObjectText and prompt.ObjectText ~= "" then table.insert(parts, prompt.ObjectText) end if prompt.ActionText and prompt.ActionText ~= "" then table.insert(parts, prompt.ActionText) end local p = prompt.Parent if p then table.insert(parts, p.Name) if p.Parent then table.insert(parts, p.Parent.Name) end end end return table.concat(parts, " ") end -- Tentative keyword knowledge. These are clues, not guaranteed game rules. local CATEGORY_RULES = { danger = {"shark", "monster", "enemy", "boss", "attack", "danger", "hostile"}, food = {"food", "fish", "meat", "mushroom", "fruit", "eat", "cook", "hunger"}, water = {"water", "drink", "thirst", "bottle"}, wood = {"wood", "log", "plank", "timber"}, resource = {"resource", "rock", "stone", "ore", "scrap", "metal", "fiber"}, crafting = {"craft", "workbench", "build", "upgrade", "recipe", "forge"}, boat = {"boat", "raft", "ship", "sail", "anchor", "steer", "repair"}, objective = {"day", "survive", "rescue", "island", "quest", "objective", "escape", "finish"}, loot = {"chest", "crate", "loot", "collect", "pickup", "open"}, } local CATEGORY_BASE_SCORE = { objective = 42, food = 34, water = 32, boat = 28, crafting = 25, wood = 22, resource = 18, loot = 16, danger = -100, unknown = CONFIG.UnknownExploreScore, } local function classifyText(text) local s = cleanText(text) local found = {} for category, words in pairs(CATEGORY_RULES) do for _, word in ipairs(words) do if string.find(s, word, 1, true) then found[category] = true break end end end local best, bestScore = "unknown", -math.huge for category in pairs(found) do local score = CATEGORY_BASE_SCORE[category] or 0 if score > bestScore then best, bestScore = category, score end end return best, found end local function makeTargetKey(prompt, label) local path = "" local node = prompt local depth = 0 while node and depth < 4 do path = node.Name .. "/" .. path node = node.Parent depth = depth + 1 end return string.sub(cleanText(label) .. "|" .. cleanText(path), 1, 180) end -- Optional persistence. Delta/executor builds differ; gracefully fall back to session memory. local function loadMemory() if type(readfile) ~= "function" or type(isfile) ~= "function" then AI.LastAction = "Session memory only (file API unavailable)" return end local exists, hasFile = safeCall(isfile, CONFIG.MemoryFile) if not exists or not hasFile then return end local ok, raw = safeCall(readfile, CONFIG.MemoryFile) if not ok or type(raw) ~= "string" then return end local decoded, data = safeCall(function() return game:GetService("HttpService"):JSONDecode(raw) end) if decoded and type(data) == "table" then if type(data.Knowledge) == "table" then AI.Knowledge = data.Knowledge end if type(data.FailureCounts) == "table" then AI.FailureCounts = data.FailureCounts end AI.LastAction = "Loaded saved learning memory" end end local function saveMemory() if type(writefile) ~= "function" then return false end local payload = { Knowledge = AI.Knowledge, FailureCounts = AI.FailureCounts, SavedAt = os.time(), Version = 2 } local ok, raw = safeCall(function() return game:GetService("HttpService"):JSONEncode(payload) end) if not ok then return false end local wrote = safeCall(writefile, CONFIG.MemoryFile, raw) AI.LastSave = os.clock() return wrote == true end local function addLog(message) local stamp = os.date("%H:%M:%S") table.insert(AI.RecentLog, 1, stamp .. " | " .. tostring(message)) while #AI.RecentLog > 5 do table.remove(AI.RecentLog) end end -- GUI local oldGui = PlayerGui:FindFirstChild("HP_TEAM_PRO_V2") if oldGui then oldGui:Destroy() end local GUI = Instance.new("ScreenGui") GUI.Name = "HP_TEAM_PRO_V2" GUI.ResetOnSpawn = false GUI.ZIndexBehavior = Enum.ZIndexBehavior.Sibling GUI.Parent = PlayerGui local Main = Instance.new("Frame") Main.Size = UDim2.fromOffset(330, 500) Main.Position = UDim2.new(0.5, -165, 0.5, -250) Main.BackgroundColor3 = COLORS.BG Main.BorderSizePixel = 0 Main.Active = true Main.Draggable = true Main.Parent = GUI Instance.new("UICorner", Main).CornerRadius = UDim.new(0, 14) local outline = Instance.new("UIStroke", Main) outline.Color = COLORS.PURPLE outline.Thickness = 2 local function label(parent, text, pos, size, color, textSize) local x = Instance.new("TextLabel") x.BackgroundTransparency = 1 x.Position = pos x.Size = size x.Text = text x.TextColor3 = color or COLORS.WHITE x.TextSize = textSize or 12 x.Font = Enum.Font.GothamBold x.TextXAlignment = Enum.TextXAlignment.Left x.TextYAlignment = Enum.TextYAlignment.Center x.TextWrapped = true x.Parent = parent return x end local function button(parent, text, pos, size, callback) local b = Instance.new("TextButton") b.Position = pos b.Size = size b.BackgroundColor3 = COLORS.PANEL b.Text = text b.TextColor3 = COLORS.WHITE b.TextSize = 12 b.Font = Enum.Font.GothamBold b.Parent = parent Instance.new("UICorner", b).CornerRadius = UDim.new(0, 8) local st = Instance.new("UIStroke", b) st.Color = COLORS.PURPLE st.Thickness = 1 b.Activated:Connect(callback) return b end local Header = Instance.new("Frame") Header.Size = UDim2.new(1, 0, 0, 46) Header.BackgroundColor3 = COLORS.PANEL Header.BorderSizePixel = 0 Header.Parent = Main label(Header, "HP TEAM PRO V2 | ADAPTIVE AI", UDim2.fromOffset(11, 0), UDim2.new(1, -58, 1, 0), COLORS.PURPLE, 14) local Minimize = button(Header, "—", UDim2.new(1, -43, 0, 6), UDim2.fromOffset(35, 34), function() end) local Body = Instance.new("Frame") Body.Position = UDim2.fromOffset(0, 46) Body.Size = UDim2.new(1, -0, 1, -46) Body.BackgroundTransparency = 1 Body.Parent = Main label(Body, "LEARN + PLAY | CLIENT AUTOPILOT", UDim2.fromOffset(12, 4), UDim2.new(1, -24, 0, 22), COLORS.PURPLE, 12) local StatusLabel = label(Body, "STATUS: WAITING", UDim2.fromOffset(12, 29), UDim2.new(1, -24, 0, 20), COLORS.GREEN) local ObjectiveLabel = label(Body, "PLAN: Observe the environment", UDim2.fromOffset(12, 52), UDim2.new(1, -24, 0, 32)) local TargetLabel = label(Body, "TARGET: NONE", UDim2.fromOffset(12, 86), UDim2.new(1, -24, 0, 20)) local CategoryLabel = label(Body, "CATEGORY: --", UDim2.fromOffset(12, 108), UDim2.new(1, -24, 0, 20)) local HealthLabel = label(Body, "HEALTH: --", UDim2.fromOffset(12, 130), UDim2.new(1, -24, 0, 20)) local StatsLabel = label(Body, "SEEN: 0 | ACTIONS: 0 | LEARNED: 0", UDim2.fromOffset(12, 152), UDim2.new(1, -24, 0, 20)) label(Body, "AI THOUGHT / ACTIVITY", UDim2.fromOffset(12, 177), UDim2.new(1, -24, 0, 18), COLORS.PURPLE) local LogBox = Instance.new("TextLabel") LogBox.Position = UDim2.fromOffset(12, 198) LogBox.Size = UDim2.new(1, -24, 0, 112) LogBox.BackgroundColor3 = COLORS.PANEL LogBox.TextColor3 = COLORS.WHITE LogBox.TextSize = 10 LogBox.Font = Enum.Font.Code LogBox.TextXAlignment = Enum.TextXAlignment.Left LogBox.TextYAlignment = Enum.TextYAlignment.Top LogBox.TextWrapped = true LogBox.Text = "Ready.\nThe AI learns from observed names and action outcomes." LogBox.Parent = Body Instance.new("UICorner", LogBox).CornerRadius = UDim.new(0, 7) local function refreshLog() LogBox.Text = table.concat(AI.RecentLog, "\n") end local StartButton, PauseButton, StopButton, ScanButton, SaveButton -- Scan enabled prompts and nearby tagged/physical objects for knowledge. local function scanWorld() local root = getRoot() if not root then return {}, 0 end local candidates = {} local seen = {} for _, item in ipairs(Workspace:GetDescendants()) do if item:IsA("ProximityPrompt") and item.Enabled then local part = getPromptPart(item) if part then local distance = (part.Position - root.Position).Magnitude local maxDistance = math.max(CONFIG.ScanRadius, item.MaxActivationDistance + 8) if distance <= maxDistance then local text = getObjectLabel(item) local category = classifyText(text) local key = makeTargetKey(item, text) local learned = AI.Knowledge[key] or {} local record = { Prompt = item, Part = part, Name = text, Category = category, Key = key, Distance = distance, Position = part.Position, Learned = learned } table.insert(candidates, record) seen[key] = true AI.Knowledge[key] = learned learned.Category = category learned.LastSeen = os.time() learned.SeenCount = (learned.SeenCount or 0) + 1 end end end end AI.ScanCount = #candidates return candidates, #candidates end local function getHealthRatio() local h = getHumanoid() if not h or h.MaxHealth <= 0 then return nil end return h.Health / h.MaxHealth end -- Score target importance, distance, learned successes and repeated failures. local function scoreTarget(target) local now = os.clock() local cooldown = AI.Cooldowns[target.Key] if cooldown and now < cooldown then return -math.huge end if target.Category == "danger" then return -math.huge end local base = CATEGORY_BASE_SCORE[target.Category] or CONFIG.UnknownExploreScore local learned = AI.Knowledge[target.Key] or {} local successes = learned.Successes or 0 local failures = learned.Failures or 0 local healthRatio = getHealthRatio() if healthRatio and healthRatio <= CONFIG.LowHealthRatio then if target.Category == "food" then base = base + 38 end if target.Category == "objective" or target.Category == "loot" then base = base - 20 end end -- Reward targets that have produced a positive state change before. base = base + math.min(successes * 5, 20) base = base - math.min(failures * 12, 60) base = base - (target.Distance * 0.045) if target.Prompt.HoldDuration > 4 then base = base - 5 end if not CONFIG.AllowUnknownExploration and target.Category == "unknown" then return -math.huge end return base end local function chooseTarget(candidates) local best, bestScore = nil, -math.huge for _, candidate in ipairs(candidates) do local score = scoreTarget(candidate) candidate.Score = score if score > bestScore then best, bestScore = candidate, score end end return best, bestScore end -- Movement with bounded waits, path recomputation, and stop/pause checks. local function waitForMove(humanoid, destination, timeout, generation) humanoid:MoveTo(destination) local started = os.clock() while os.clock() - started < timeout do if not AI.Running or AI.Paused or generation ~= AI.Generation then return false, "Cancelled" end if not isAlive() then return false, "Character unavailable" end local root = getRoot() if root and (root.Position - destination).Magnitude <= 4.5 then return true, "Reached" end task.wait(0.12) end return false, "Move timeout" end local function moveToPosition(position, generation) local humanoid, root = getHumanoid(), getRoot() if not humanoid or not root or not isAlive() then return false, "Character unavailable" end if (root.Position - position).Magnitude <= 6 then return true, "Already close" end for attempt = 1, CONFIG.MaxPathRetries do if generation ~= AI.Generation or not AI.Running or AI.Paused then return false, "Cancelled" end local path = PathfindingService:CreatePath({ AgentRadius = 2, AgentHeight = 5, AgentCanJump = true, AgentCanClimb = true, WaypointSpacing = 5 }) local ok = pcall(function() path:ComputeAsync(root.Position, position) end) if ok and path.Status == Enum.PathStatus.Success then local allReached = true for _, waypoint in ipairs(path:GetWaypoints()) do if waypoint.Action == Enum.PathWaypointAction.Jump then humanoid.Jump = true end local reached, reason = waitForMove(humanoid, waypoint.Position, 4.5, generation) if not reached then allReached = false AI.LastAction = "Path retry " .. attempt .. ": " .. reason break end end if allReached then return true, "Path reached" end else AI.LastAction = "Path unavailable; direct MoveTo attempt" local reached = waitForMove(humanoid, position, 5, generation) if reached then return true, "Direct move reached" end end task.wait(0.25) root = getRoot() if not root then return false, "Root missing" end end return false, "Could not reach target after replanning" end local function recordOutcome(target, success, reason) if not target then return end local memory = AI.Knowledge[target.Key] or {} AI.Knowledge[target.Key] = memory memory.Category = target.Category memory.LastResult = success and "success" or "failure" memory.LastReason = tostring(reason or "") memory.LastAttempt = os.time() if success then memory.Successes = (memory.Successes or 0) + 1 AI.SuccessfulChanges = AI.SuccessfulChanges + 1 AI.Cooldowns[target.Key] = os.clock() + CONFIG.TargetCooldown else memory.Failures = (memory.Failures or 0) + 1 AI.FailureCounts[target.Key] = (AI.FailureCounts[target.Key] or 0) + 1 AI.FailedActions = AI.FailedActions + 1 AI.Cooldowns[target.Key] = os.clock() + CONFIG.FailureCooldown end end local function interact(target, generation) local prompt = target and target.Prompt if not prompt or not prompt.Parent or not prompt.Enabled then return false, "Prompt disappeared" end local root, part = getRoot(), getPromptPart(prompt) if not root or not part then return false, "Target part missing" end if (root.Position - part.Position).Magnitude > prompt.MaxActivationDistance + 1 then return false, "Outside activation range" end if generation ~= AI.Generation or not AI.Running or AI.Paused then return false, "Cancelled" end local beforeHealth = getHumanoid() and getHumanoid().Health or 0 local beforeParent = prompt.Parent local ok, err = pcall(function() prompt:InputHoldBegin() local duration = clamp(prompt.HoldDuration, 0.15, 8) local started = os.clock() while os.clock() - started < duration do if generation ~= AI.Generation or not AI.Running or AI.Paused then prompt:InputHoldEnd() error("Cancelled") end task.wait(0.05) end prompt:InputHoldEnd() end) if not ok then return false, tostring(err) end AI.Interactions = AI.Interactions + 1 task.wait(CONFIG.InteractionVerifyTime) -- Verify only observable local changes. A server may accept an action without -- changing these signals immediately, so uncertain outcomes are not called success. local changed = false if not prompt.Parent or prompt.Parent ~= beforeParent or not prompt.Enabled then changed = true end local afterHealth = getHumanoid() and getHumanoid().Health or 0 if math.abs(afterHealth - beforeHealth) > 0.01 then changed = true end if changed then return true, "Observable game state changed" end return false, "No observable result; target placed on cooldown" end local function runDecision(generation) if not AI.Running or AI.Paused then return end AI.Decisions = AI.Decisions + 1 if not isAlive() then AI.Status = "WAITING RESPAWN" AI.Objective = "Wait for character to respawn" AI.Target = nil return end local healthRatio = getHealthRatio() if healthRatio and healthRatio <= CONFIG.LowHealthRatio then AI.Status = "SURVIVAL CHECK" AI.Objective = "Health is low; avoid risky targets and prioritize food-like prompts" else AI.Status = "OBSERVING" AI.Objective = "Scan and classify nearby interactions" end local candidates = scanWorld() local target, score = chooseTarget(candidates) if not target then AI.Target = nil AI.Status = "LEARNING / SEARCHING" AI.Objective = "No safe available prompt; wait and rescan" AI.LastAction = "No candidate passed scoring" addLog("No safe target; will rescan") refreshLog() return end AI.Target = target AI.Status = "PLANNING" AI.Objective = "Selected " .. target.Category .. " (score " .. math.floor(score) .. ")" AI.LastAction = "Plan: approach " .. target.Name addLog("Plan: " .. target.Category .. " / " .. target.Name) local root = getRoot() if not root then return end local distance = (root.Position - target.Position).Magnitude if distance > target.Prompt.MaxActivationDistance then AI.Status = "NAVIGATING" AI.Objective = "Pathfinding to " .. target.Category local reached, reason = moveToPosition(target.Position, generation) if not reached then recordOutcome(target, false, reason) AI.LastAction = reason addLog("Replan: " .. reason) refreshLog() return end end if not AI.Running or AI.Paused or generation ~= AI.Generation then return end AI.Status = "INTERACTING" AI.Objective = "Trying " .. target.Category .. ": " .. target.Name local success, reason = interact(target, generation) recordOutcome(target, success, reason) if success then AI.LastAction = "Learned positive outcome: " .. target.Category addLog("Observed change; reward recorded") else AI.LastAction = "No success: " .. reason addLog("Failed attempt; cooldown + strategy update") end if os.clock() - AI.LastSave >= CONFIG.SaveMemoryEvery then saveMemory() end refreshLog() end -- Buttons StartButton = button(Body, "▶ START LEARN + PLAY", UDim2.fromOffset(10, 322), UDim2.new(1, -20, 0, 38), function() if AI.Running and not AI.Paused then addLog("AI is already running") refreshLog() return end AI.Generation = AI.Generation + 1 AI.Running = true AI.Paused = false local generation = AI.Generation addLog("Adaptive AI started") refreshLog() task.spawn(function() while AI.Running and not AI.Paused and generation == AI.Generation do AI.Busy = true local ok, err = pcall(runDecision, generation) AI.Busy = false if not ok then AI.Status = "RECOVERING" AI.LastAction = tostring(err) addLog("Recovered from error: " .. tostring(err)) refreshLog() end local elapsed = 0 while elapsed < CONFIG.DecisionInterval do if not AI.Running or AI.Paused or generation ~= AI.Generation then break end task.wait(0.1) elapsed = elapsed + 0.1 end end end) end) PauseButton = button(Body, "Ⅱ PAUSE", UDim2.fromOffset(10, 365), UDim2.new(0.5, -15, 0, 36), function() if not AI.Running then addLog("Start AI first") else AI.Paused = true AI.Generation = AI.Generation + 1 AI.Status = "PAUSED" AI.Objective = "Waiting for resume" addLog("AI paused") end refreshLog() end) local ResumeButton = button(Body, "▶ RESUME", UDim2.new(0.5, 5, 0, 365), UDim2.new(0.5, -15, 0, 36), function() if not AI.Running or not AI.Paused then addLog("AI is not paused") else AI.Paused = false AI.Generation = AI.Generation + 1 local generation = AI.Generation addLog("AI resumed") task.spawn(function() while AI.Running and not AI.Paused and generation == AI.Generation do AI.Busy = true local ok, err = pcall(runDecision, generation) AI.Busy = false if not ok then AI.Status = "RECOVERING" addLog("Recovered: " .. tostring(err)) refreshLog() end task.wait(CONFIG.DecisionInterval) end end) end refreshLog() end) StopButton = button(Body, "■ STOP", UDim2.fromOffset(10, 406), UDim2.new(0.5, -15, 0, 36), function() AI.Running = false AI.Paused = false AI.Generation = AI.Generation + 1 AI.Target = nil AI.Status = "STOPPED" AI.Objective = "Autopilot stopped" local h, root = getHumanoid(), getRoot() if h and root then h:MoveTo(root.Position) end addLog("AI stopped") refreshLog() end) ScanButton = button(Body, "⌕ SCAN", UDim2.new(0.5, 5, 0, 406), UDim2.new(0.5, -15, 0, 36), function() local ok, result = pcall(scanWorld) if ok then addLog("Scan complete: " .. tostring(#result) .. " prompts") else addLog("Scan error: " .. tostring(result)) end refreshLog() end) SaveButton = button(Body, "SAVE LEARNING MEMORY", UDim2.fromOffset(10, 447), UDim2.new(1, -20, 0, 34), function() if saveMemory() then addLog("Learning memory saved") else addLog("Save unavailable; memory remains for this session") end refreshLog() end) local minimized = false Minimize.Activated:Connect(function() minimized = not minimized Body.Visible = not minimized Main.Size = minimized and UDim2.fromOffset(330, 46) or UDim2.fromOffset(330, 500) Minimize.Text = minimized and "+" or "—" end) -- Restore memory once at startup. loadMemory() addLog("V2 ready; knowledge starts from visible prompt metadata") refreshLog() local monitor = RunService.Heartbeat:Connect(function() if not GUI.Parent then return end StatusLabel.Text = "STATUS: " .. AI.Status ObjectiveLabel.Text = "PLAN: " .. AI.Objective StatsLabel.Text = "SEEN: " .. AI.ScanCount .. " | ACTIONS: " .. AI.Interactions .. " | LEARNED: " .. tostring((function() local n = 0 for _ in pairs(AI.Knowledge) do n = n + 1 end return n end)()) local h = getHumanoid() if h then HealthLabel.Text = "HEALTH: " .. math.floor(h.Health) .. "/" .. math.floor(h.MaxHealth) HealthLabel.TextColor3 = (h.Health / math.max(h.MaxHealth, 1) <= CONFIG.LowHealthRatio) and COLORS.RED or COLORS.WHITE else HealthLabel.Text = "HEALTH: --" end if AI.Target then TargetLabel.Text = "TARGET: " .. string.sub(AI.Target.Name, 1, 38) CategoryLabel.Text = "CATEGORY: " .. string.upper(AI.Target.Category) else TargetLabel.Text = "TARGET: NONE" CategoryLabel.Text = "CATEGORY: --" end StatusLabel.TextColor3 = AI.Running and not AI.Paused and COLORS.GREEN or COLORS.GRAY end) table.insert(AI.Connections, monitor) local function cleanup() if AI.Destroyed then return end AI.Destroyed = true AI.Running = false AI.Paused = false AI.Generation = AI.Generation + 1 saveMemory() for _, connection in ipairs(AI.Connections) do pcall(function() connection:Disconnect() end) end if GUI and GUI.Parent then GUI:Destroy() end end if getgenv then getgenv().HP_TEAM_PRO_STOP = cleanup end print("HP TEAM PRO V2 - ADAPTIVE LEARNING AUTOPILOT LOADED")