--======================================================== -- HP TEAM PRO V1 - VICTORY AUTOPILOT -- 100 Days at Sea | Delta Mobile | Client-side prototype -- -- IMPORTANT: -- This is a generic client-side automation framework. -- It cannot know the game's actual victory conditions, resource -- recipes, or server-side rules without game-specific data. -- It scans visible ProximityPrompts and can navigate to them. -- It does NOT guarantee a win and does not bypass server checks. --======================================================== 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 a previous copy created by this script. if getgenv and getgenv().HP_VICTORY_STOP then pcall(getgenv().HP_VICTORY_STOP) end local AI = { Running = false, Paused = false, Status = "WAITING", Objective = "Scan for interactable objects", Target = nil, TargetPrompt = nil, Radius = 300, ScanCount = 0, Interactions = 0, LastAction = "None", Busy = false, Generation = 0, Connections = {}, Destroyed = false } 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, 75, 90), GRAY = Color3.fromRGB(165, 155, 180) } --======================================================== -- GUI --======================================================== local oldGui = PlayerGui:FindFirstChild("HP_VICTORY_V1") if oldGui then oldGui:Destroy() end local GUI = Instance.new("ScreenGui") GUI.Name = "HP_VICTORY_V1" GUI.ResetOnSpawn = false GUI.ZIndexBehavior = Enum.ZIndexBehavior.Sibling GUI.Parent = PlayerGui local Main = Instance.new("Frame") Main.Name = "Main" Main.Size = UDim2.fromOffset(340, 465) Main.Position = UDim2.new(0.5, -170, 0.5, -232) Main.BackgroundColor3 = COLORS.BG Main.BorderSizePixel = 0 Main.Active = true Main.Draggable = true Main.Parent = GUI local mainCorner = Instance.new("UICorner") mainCorner.CornerRadius = UDim.new(0, 14) mainCorner.Parent = Main local mainStroke = Instance.new("UIStroke") mainStroke.Color = COLORS.PURPLE mainStroke.Thickness = 2 mainStroke.Parent = Main local function makeLabel(parent, text, position, size, color, textSize) local label = Instance.new("TextLabel") label.BackgroundTransparency = 1 label.Position = position label.Size = size label.Text = text label.TextColor3 = color or COLORS.WHITE label.TextSize = textSize or 12 label.Font = Enum.Font.GothamBold label.TextXAlignment = Enum.TextXAlignment.Left label.TextYAlignment = Enum.TextYAlignment.Center label.TextWrapped = true label.Parent = parent return label end local function makeButton(parent, text, position, callback) local button = Instance.new("TextButton") button.Position = position button.Size = UDim2.new(1, -20, 0, 38) button.BackgroundColor3 = COLORS.PANEL button.Text = text button.TextColor3 = COLORS.WHITE button.TextSize = 13 button.Font = Enum.Font.GothamBold button.AutoButtonColor = true button.Parent = parent local corner = Instance.new("UICorner") corner.CornerRadius = UDim.new(0, 8) corner.Parent = button local stroke = Instance.new("UIStroke") stroke.Color = COLORS.PURPLE stroke.Thickness = 1 stroke.Parent = button button.Activated:Connect(callback) return button end local Header = Instance.new("Frame") Header.Size = UDim2.new(1, 0, 0, 48) Header.BackgroundColor3 = COLORS.PANEL Header.BorderSizePixel = 0 Header.Parent = Main makeLabel( Header, "HP TEAM PRO V1", UDim2.fromOffset(12, 0), UDim2.new(0.72, 0, 1, 0), COLORS.PURPLE, 16 ) local Minimize = Instance.new("TextButton") Minimize.Size = UDim2.fromOffset(36, 36) Minimize.Position = UDim2.new(1, -42, 0, 6) Minimize.Text = "—" Minimize.TextColor3 = COLORS.WHITE Minimize.TextSize = 20 Minimize.BackgroundColor3 = COLORS.BG Minimize.Parent = Header local miniCorner = Instance.new("UICorner") miniCorner.CornerRadius = UDim.new(0, 8) miniCorner.Parent = Minimize local Body = Instance.new("Frame") Body.Position = UDim2.fromOffset(0, 48) Body.Size = UDim2.new(1, 0, 1, -48) Body.BackgroundTransparency = 1 Body.Parent = Main makeLabel( Body, "VICTORY AUTOPILOT | SOLO", UDim2.fromOffset(12, 5), UDim2.new(1, -24, 0, 24), COLORS.PURPLE, 13 ) local StatusLabel = makeLabel( Body, "STATUS: WAITING", UDim2.fromOffset(12, 34), UDim2.new(1, -24, 0, 22), COLORS.GREEN ) local ObjectiveLabel = makeLabel( Body, "OBJECTIVE: SCAN", UDim2.fromOffset(12, 59), UDim2.new(1, -24, 0, 22) ) local TargetLabel = makeLabel( Body, "TARGET: NONE", UDim2.fromOffset(12, 84), UDim2.new(1, -24, 0, 22) ) local DistanceLabel = makeLabel( Body, "DISTANCE: --", UDim2.fromOffset(12, 109), UDim2.new(1, -24, 0, 22) ) local ScanLabel = makeLabel( Body, "PROMPTS FOUND: 0", UDim2.fromOffset(12, 134), UDim2.new(1, -24, 0, 22) ) local InteractionLabel = makeLabel( Body, "INTERACTIONS: 0", UDim2.fromOffset(12, 159), UDim2.new(1, -24, 0, 22) ) makeLabel( Body, "AI ACTIVITY LOG", UDim2.fromOffset(12, 187), UDim2.new(1, -24, 0, 20), COLORS.PURPLE ) local LogBox = Instance.new("TextLabel") LogBox.Position = UDim2.fromOffset(12, 210) LogBox.Size = UDim2.new(1, -24, 0, 76) 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 = "System ready.\nWaiting for START AUTOPILOT..." LogBox.Parent = Body local logCorner = Instance.new("UICorner") logCorner.CornerRadius = UDim.new(0, 7) logCorner.Parent = LogBox local function addLog(message) local stamp = os.date("%H:%M:%S") local oldText = LogBox.Text or "" local lines = {stamp .. " | " .. tostring(message)} for line in string.gmatch(oldText, "[^\n]+") do if #lines < 5 then table.insert(lines, line) end end LogBox.Text = table.concat(lines, "\n") end local StartButton local PauseButton local StopButton local ScanButton --======================================================== -- CHARACTER HELPERS --======================================================== local function getCharacter() return Player.Character end local function getHumanoid() local character = getCharacter() if not character then return nil end return character:FindFirstChildOfClass("Humanoid") end local function getRoot() local character = getCharacter() if not character then return nil end return character:FindFirstChild("HumanoidRootPart") end local function isAlive() local humanoid = getHumanoid() return humanoid ~= nil and humanoid.Health > 0 end local function getPromptPart(prompt) local parent = prompt.Parent if not parent then return nil end 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 --======================================================== -- SCANNER -- Scans visible ProximityPrompts, not arbitrary resource names. --======================================================== local function scanPrompts() local root = getRoot() if not root then AI.Status = "WAITING FOR CHARACTER" return {} end local found = {} 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(AI.Radius, item.MaxActivationDistance + 5) if distance <= maxDistance then table.insert(found, { Prompt = item, Part = part, Name = item.ObjectText ~= "" and item.ObjectText or (item.ActionText ~= "" and item.ActionText or item.Parent.Name), Distance = distance, Position = part.Position }) end end end end table.sort(found, function(a, b) return a.Distance < b.Distance end) AI.ScanCount = #found return found end --======================================================== -- PATHFINDING --======================================================== local function moveToPosition(position, generation) local humanoid = getHumanoid() local root = getRoot() if not humanoid or not root or not isAlive() then return false, "Character unavailable" end if (root.Position - position).Magnitude < 7 then return true, "Already near target" 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 not ok or path.Status ~= Enum.PathStatus.Success then humanoid:MoveTo(position) local reached = humanoid.MoveToFinished:Wait(5) return reached, reached and "Reached" or "Path unavailable" end for _, waypoint in ipairs(path:GetWaypoints()) do if not AI.Running or AI.Paused or generation ~= AI.Generation then humanoid:MoveTo(root.Position) return false, "Stopped" end if not isAlive() then return false, "Character dead" end if waypoint.Action == Enum.PathWaypointAction.Jump then humanoid.Jump = true end humanoid:MoveTo(waypoint.Position) local reached = humanoid.MoveToFinished:Wait(4) if not reached then return false, "Waypoint blocked" end end return true, "Reached" end --======================================================== -- SAFE PROMPT INTERACTION -- Uses normal ProximityPrompt input methods. -- The game/server still decides whether the action is valid. --======================================================== local function interactWithPrompt(prompt, generation) if not prompt or not prompt.Parent or not prompt.Enabled then return false, "Prompt unavailable" end local root = getRoot() local part = getPromptPart(prompt) if not root or not part then return false, "Target unavailable" end local distance = (root.Position - part.Position).Magnitude if distance > prompt.MaxActivationDistance then return false, "Too far from prompt" end if generation ~= AI.Generation or not AI.Running or AI.Paused then return false, "Cancelled" end local ok, err = pcall(function() prompt:InputHoldBegin() task.wait(math.max(prompt.HoldDuration, 0.15)) prompt:InputHoldEnd() end) if not ok then return false, tostring(err) end AI.Interactions = AI.Interactions + 1 return true, "Prompt input sent" end --======================================================== -- VICTORY BRAIN -- Generic strategy: find nearest enabled prompt, navigate, -- interact, then rescan. It cannot infer game-specific victory. --======================================================== local function runOneDecision(generation) if not AI.Running or AI.Paused then return end if not isAlive() then AI.Status = "WAITING FOR RESPAWN" AI.Objective = "Wait for character" return end AI.Status = "SCANNING" AI.Objective = "Find nearest enabled interaction" local prompts = scanPrompts() local target = prompts[1] if not target then AI.Target = nil AI.Status = "SEARCHING" AI.Objective = "No enabled prompt nearby" AI.LastAction = "Rescan environment" addLog("No enabled prompt found") return end AI.Target = target AI.Status = "TARGET FOUND" AI.Objective = "Approach and inspect interaction" AI.LastAction = "Selected " .. target.Name addLog("Target: " .. 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 = "Move to " .. target.Name AI.LastAction = "Pathfinding" local reached, reason = moveToPosition(target.Position, generation) if not reached then addLog("Navigation: " .. reason) return end end if not AI.Running or AI.Paused or generation ~= AI.Generation then return end AI.Status = "INTERACTING" AI.Objective = "Attempt interaction: " .. target.Name local success, reason = interactWithPrompt(target.Prompt, generation) if success then AI.LastAction = "Interaction input sent" addLog("Interaction attempted: " .. target.Name) else AI.LastAction = reason addLog("Interaction skipped: " .. reason) end task.wait(1) end --======================================================== -- BUTTONS --======================================================== StartButton = makeButton( Body, "▶ START AUTOPILOT", UDim2.fromOffset(10, 298), function() if AI.Running then addLog("Autopilot already running") return end AI.Generation = AI.Generation + 1 AI.Running = true AI.Paused = false AI.Status = "STARTING" AI.Objective = "Initialize victory loop" local generation = AI.Generation addLog("Victory autopilot started") task.spawn(function() while AI.Running and not AI.Paused and generation == AI.Generation do AI.Busy = true local ok, err = pcall(runOneDecision, generation) AI.Busy = false if not ok then AI.Status = "AI ERROR" AI.LastAction = tostring(err) addLog("Error: " .. tostring(err)) end for _ = 1, 10 do if not AI.Running or AI.Paused or generation ~= AI.Generation then break end task.wait(0.2) end end end) end ) PauseButton = makeButton( Body, "Ⅱ PAUSE / RESUME", UDim2.fromOffset(10, 342), function() if not AI.Running then addLog("Start autopilot first") return end AI.Paused = not AI.Paused if AI.Paused then AI.Status = "PAUSED" AI.Objective = "Waiting for resume" AI.Generation = AI.Generation + 1 addLog("Autopilot paused") else AI.Status = "RESUMING" addLog("Autopilot resumed") AI.Running = false task.wait() AI.Running = true AI.Generation = AI.Generation + 1 local generation = AI.Generation AI.Paused = false task.spawn(function() while AI.Running and not AI.Paused and generation == AI.Generation do AI.Busy = true local ok, err = pcall(runOneDecision, generation) AI.Busy = false if not ok then AI.Status = "AI ERROR" addLog(tostring(err)) end task.wait(2) end end) end end ) StopButton = makeButton( Body, "■ STOP AUTOPILOT", UDim2.fromOffset(10, 386), function() AI.Running = false AI.Paused = false AI.Generation = AI.Generation + 1 AI.Target = nil AI.Status = "STOPPED" AI.Objective = "None" AI.LastAction = "Stopped" local humanoid = getHumanoid() local root = getRoot() if humanoid and root then humanoid:MoveTo(root.Position) end addLog("Autopilot stopped") end ) ScanButton = makeButton( Body, "⌕ SCAN NOW", UDim2.fromOffset(10, 430), function() local ok, result = pcall(scanPrompts) if ok then addLog("Scan complete: " .. tostring(#result) .. " prompts") else addLog("Scan failed: " .. tostring(result)) end end ) --======================================================== -- MINIMIZE --======================================================== local minimized = false Minimize.Activated:Connect(function() minimized = not minimized Body.Visible = not minimized Main.Size = minimized and UDim2.fromOffset(340, 48) or UDim2.fromOffset(340, 465) Minimize.Text = minimized and "+" or "—" end) --======================================================== -- UI MONITOR --======================================================== local monitor = RunService.Heartbeat:Connect(function() if not GUI.Parent then return end StatusLabel.Text = "STATUS: " .. AI.Status ObjectiveLabel.Text = "OBJECTIVE: " .. AI.Objective ScanLabel.Text = "PROMPTS FOUND: " .. AI.ScanCount InteractionLabel.Text = "INTERACTIONS: " .. AI.Interactions if AI.Target and AI.Target.Prompt and AI.Target.Prompt.Parent then TargetLabel.Text = "TARGET: " .. AI.Target.Name local root = getRoot() local part = getPromptPart(AI.Target.Prompt) if root and part then local d = (root.Position - part.Position).Magnitude DistanceLabel.Text = "DISTANCE: " .. math.floor(d) .. " studs" else DistanceLabel.Text = "DISTANCE: --" end else TargetLabel.Text = "TARGET: NONE" DistanceLabel.Text = "DISTANCE: --" end StatusLabel.TextColor3 = AI.Running and not AI.Paused and COLORS.GREEN or COLORS.GRAY end) table.insert(AI.Connections, monitor) --======================================================== -- CLEANUP --======================================================== local function cleanup() if AI.Destroyed then return end AI.Destroyed = true AI.Running = false AI.Paused = false AI.Generation = AI.Generation + 1 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_VICTORY_STOP = cleanup end print("HP TEAM PRO V1 - VICTORY AUTOPILOT LOADED") addLog("System ready. Press START AUTOPILOT.")