-- Configuration & State Toggle getgenv().AutoTaskCompleter = true -- Reusable function to fire server networks for tasks local function completeTask(taskType, petId) -- Adopt Me relies on specific network remotes to update pet states local remotePath = game:GetService("ReplicatedStorage"):WaitForChild("API"):WaitForChild("HousingAPI/ActivateFurniture") if taskType == "Sleepy" then -- Simulates placing the pet in a crib/bed remotePath:FireServer(petId, "Crib", "Sleep") elseif taskType == "Bored" then -- Simulates interacting with a playground or piano remotePath:FireServer(petId, "Piano", "Play") elseif taskType == "Hungry" then -- Simulates feeding the pet remotePath:FireServer(petId, "PetBowl", "Feed") elseif taskType == "Thirsty" then -- Simulates giving the pet a drink remotePath:FireServer(petId, "WaterBowl", "Drink") end end -- Main automation thread task.spawn(function() while getgenv().AutoTaskCompleter do -- 1. Locate the player's equipped pet from the DataData client module local playerData = game:GetService("ReplicatedStorage"):WaitForChild("ClientModules"):WaitForChild("Core"):WaitForChild("InteriorsM"):WaitForChild("DataData") local equippedPet = nil -- Logic to get active pet ID from player data pcall(function() for _, pet in pairs(require(playerData).get_data().inventory.pets) do if pet.equipped then equippedPet = pet.unique_id break end end end) -- 2. Check for active ailments/tasks if a pet is equipped if equippedPet then local activeTasks = game:GetService("Players").LocalPlayer.PlayerGui.AilmentsMonitorApp.BabyAilments -- Path varies by game updates for _, ailment in pairs(activeTasks:GetChildren()) do if ailment:IsA("Frame") and ailment.Name ~= "Templates" then local taskName = ailment.Name print("Found active task: " .. taskName) -- Execute network trigger to complete the specific task completeTask(taskName, equippedPet) task.wait(2) -- Small buffer to mimic human timing and avoid instantly crashing end end end task.wait(5) -- Checks for new tasks every 5 seconds end end) -- Services local Players = game:GetService("Players") local UserInputService = game:GetService("UserInputService") local TweenService = game:GetService("TweenService") local player = Players.LocalPlayer local playerGui = player:WaitForChild("PlayerGui") -- 1. Create the Main Screen GUI Container local screenGui = Instance.new("ScreenGui") screenGui.Name = "GBIS_Interface" screenGui.ResetOnSpawn = false screenGui.Parent = playerGui -- 2. Create the GBIS Loading Screen Frame local loadingFrame = Instance.new("Frame") loadingFrame.Name = "GBIS_Frame" loadingFrame.Size = UDim2.new(1, 0, 1, 0) -- Full screen loadingFrame.BackgroundColor3 = Color3.fromRGB(20, 20, 20) -- Dark sleek background loadingFrame.BorderSizePixel = 0 loadingFrame.Visible = true loadingFrame.Parent = screenGui -- Add Title Text to Loading Screen local titleLabel = Instance.new("TextLabel") titleLabel.Size = UDim2.new(0, 400, 0, 100) titleLabel.Position = UDim2.new(0.5, -200, 0.4, -50) titleLabel.BackgroundTransparency = 1 titleLabel.Text = "GBIS SYSTEM LOADING..." titleLabel.TextColor3 = Color3.fromRGB(255, 255, 255) titleLabel.TextSize = 36 titleLabel.Font = Enum.Font.GothamBold titleLabel.Parent = loadingFrame -- Add Subtext for instructions local hintLabel = Instance.new("TextLabel") hintLabel.Size = UDim2.new(0, 400, 0, 50) hintLabel.Position = UDim2.new(0.5, -200, 0.5, 20) hintLabel.BackgroundTransparency = 1 hintLabel.Text = "Press [A] on your keyboard to exit" hintLabel.TextColor3 = Color3.fromRGB(150, 150, 150) hintLabel.TextSize = 18 hintLabel.Font = Enum.Font.Gotham hintLabel.Parent = loadingFrame -- 3. Create the Red Star Restore Button (Initially Hidden) local starButton = Instance.new("TextButton") starButton.Name = "RestoreButton" starButton.Size = UDim2.new(0, 60, 0, 60) starButton.Position = UDim2.new(0.02, 0, 0.05, 0) -- Top-left corner of the screen starButton.BackgroundColor3 = Color3.fromRGB(200, 30, 30) -- Deep Red starButton.Text = "★" -- Unicode character for a star starButton.TextColor3 = Color3.fromRGB(255, 255, 255) starButton.TextSize = 32 starButton.Visible = false -- Hidden until the main frame is closed starButton.Parent = screenGui -- Optional: Make the star button circular local uiCorner = Instance.new("UICorner") uiCorner.CornerRadius = UDim.new(0.5, 0) -- 50% radius creates a perfect circle uiCorner.Parent = starButton -- 4. Logic Functions for Closing and Opening local function closeLoadingScreen() if loadingFrame.Visible then loadingFrame.Visible = false starButton.Visible = true print("GBIS Screen Hidden. Use the Red Star to reopen.") end end local function openLoadingScreen() if not loadingFrame.Visible then loadingFrame.Visible = true starButton.Visible = false print("GBIS Screen Restored.") end end -- 5. Event Listeners -- Keyboard Listener: Detects when "A" is pressed to exit UserInputService.InputBegan:Connect(function(input, gameProcessed) -- Ignore keypresses if the user is currently typing in the game chat if gameProcessed then return end if input.KeyCode == Enum.KeyCode.A then closeLoadingScreen() end end) -- Mouse Click Listener: Detects when the Red Star is clicked to open back up starButton.MouseButton1Click:Connect(function() openLoadingScreen() end) -- Services local Players = game:GetService("Players") local ServerStorage = game:GetService("ServerStorage") -- Fetch the pet template from secure storage local petTemplate = ServerStorage:WaitForChild("ExamplePet") -- Function to spawn and attach the pet to a player local function spawnPetForPlayer(player) -- Ensure the player's character has fully loaded into the world local character = player.Character or player.CharacterAdded:Wait() local humanoidRootPart = character:WaitForChild("HumanoidRootPart") -- Prevent duplicate pets if one already exists for this player if character:FindFirstChild(player.Name .. "_Pet") then character[player.Name .. "_Pet"]:Destroy() end -- Duplicate the pet model from ServerStorage local newPet = petTemplate:Clone() newPet.Name = player.Name .. "_Pet" -- Position the pet slightly behind and to the side of the player local spawnOffset = Vector3.new(3, 1, 3) newPet:SetPrimaryPartCFrame(humanoidRootPart.CFrame * CFrame.new(spawnOffset)) -- Parent the pet to the character so it replicates to all players on the server newPet.Parent = character -- Create a physical constraint to make the pet follow the player smoothly local alignPosition = Instance.new("AlignPosition") local alignOrientation = Instance.new("AlignOrientation") local attachmentCharacter = Instance.new("Attachment", humanoidRootPart) local attachmentPet = Instance.new("Attachment", newPet.PrimaryPart) -- Configure physical movement parameters alignPosition.Attachment0 = attachmentPet alignPosition.Attachment1 = attachmentCharacter alignPosition.MaxForce = 10000 alignPosition.Responsiveness = 15 alignPosition.Parent = newPet.PrimaryPart alignOrientation.Attachment0 = attachmentPet alignOrientation.Attachment1 = attachmentCharacter alignOrientation.MaxTorque = 10000 alignOrientation.Responsiveness = 15 alignOrientation.Parent = newPet.PrimaryPart print("Successfully spawned server-visible pet for: " .. player.Name) end -- Listen for whenever a player joins the server Players.PlayerAdded:Connect(function(player) player.CharacterAdded:Connect(function(character) -- Spawn the pet automatically 2 seconds after they load in task.wait(2) spawnPetForPlayer(player) end) end)