local Players = game:GetService("Players") local Workspace = game:GetService("Workspace") local CoreGui = game:GetService("CoreGui") local Player = Players.LocalPlayer -- CONFIGURATION local NPCPosition = Vector3.new(-722, 11, 1490) local NPC = Workspace.Interactables .Halloween.NPCs.GhostCaptain local NPCPrompt = NPC.GhostCaptainPrompt -- GUI local GUI = Instance.new("ScreenGui") GUI.Name = "RelicFarmGUI" GUI.ResetOnSpawn = false local parent = CoreGui if gethui then parent = gethui() end GUI.Parent = parent local Main = Instance.new("Frame") Main.Size = UDim2.new(0, 280, 0, 205) Main.Position = UDim2.new(0.5, -140, 0.5, -102) Main.BackgroundColor3 = Color3.fromRGB(25, 25, 32) Main.BorderSizePixel = 0 Main.Active = true Main.Draggable = true Main.Parent = GUI local Corner = Instance.new("UICorner") Corner.CornerRadius = UDim.new(0, 10) Corner.Parent = Main local function createLabel(name, text, position, size) local label = Instance.new("TextLabel") label.Name = name label.Size = size label.Position = position label.BackgroundTransparency = 1 label.Text = text label.TextColor3 = Color3.fromRGB(255, 255, 255) label.Font = Enum.Font.GothamBold label.TextSize = 14 label.Parent = Main return label end -- TITLE local Title = createLabel( "Title", "RELIC FARM", UDim2.new(0, 10, 0, 5), UDim2.new(0, 190, 0, 30) ) -- CREATOR CREDIT (BOTTOM LEFT) local Creator = createLabel( "Creator", "made by donutmaster5126", UDim2.new(0, 10, 1, -14), UDim2.new(0, 180, 0, 12) ) Creator.TextSize = 8 Creator.TextColor3 = Color3.fromRGB(130, 130, 140) Creator.Font = Enum.Font.Gotham Creator.TextXAlignment = Enum.TextXAlignment.Left Creator.ZIndex = 5 -- MINIMIZE BUTTON local Minimize = Instance.new("TextButton") Minimize.Size = UDim2.new(0, 30, 0, 25) Minimize.Position = UDim2.new(1, -75, 0, 7) Minimize.Text = "-" Minimize.TextSize = 20 Minimize.TextColor3 = Color3.new(1, 1, 1) Minimize.BackgroundColor3 = Color3.fromRGB(55, 55, 65) Minimize.Parent = Main -- CLOSE BUTTON local Close = Instance.new("TextButton") Close.Size = UDim2.new(0, 30, 0, 25) Close.Position = UDim2.new(1, -40, 0, 7) Close.Text = "X" Close.TextSize = 14 Close.Font = Enum.Font.GothamBold Close.TextColor3 = Color3.new(1, 1, 1) Close.BackgroundColor3 = Color3.fromRGB(190, 55, 55) Close.Parent = Main local Status = createLabel( "Status", "Status: Idle", UDim2.new(0, 15, 0, 45), UDim2.new(0, 250, 0, 25) ) local Stage = createLabel( "Stage", "Stage: Waiting", UDim2.new(0, 15, 0, 72), UDim2.new(0, 250, 0, 25) ) local function createButton(name, text, position, color, height) local button = Instance.new("TextButton") button.Name = name button.Size = UDim2.new(0, 245, 0, height or 35) button.Position = position button.Text = text button.TextSize = 14 button.Font = Enum.Font.GothamBold button.TextColor3 = Color3.new(1, 1, 1) button.BackgroundColor3 = color button.Parent = Main local corner = Instance.new("UICorner") corner.CornerRadius = UDim.new(0, 7) corner.Parent = button return button end local StartButton = createButton( "Start", "START FARMING", UDim2.new(0, 17, 0, 110), Color3.fromRGB(0, 170, 110), 35 ) local StopButton = createButton( "Stop", "STOP FARMING", UDim2.new(0, 17, 0, 145), Color3.fromRGB(190, 55, 55), 30 ) -- FARM VARIABLES local Running = false local Minimized = false local function updateStatus(status, stage) Status.Text = "Status: " .. status Stage.Text = "Stage: " .. stage end local function teleport(position) local character = Player.Character local root = character and character:FindFirstChild("HumanoidRootPart") if root then root.CFrame = CFrame.new(position) end end local function interact(prompt) if not prompt or not prompt.Enabled then return false end if typeof(fireproximityprompt) == "function" then fireproximityprompt(prompt) return true end updateStatus("Error", "Prompt function unavailable") Running = false return false end local function waitCancelable(seconds) local elapsed = 0 while elapsed < seconds and Running do task.wait(0.1) elapsed += 0.1 end return Running end local function farm() while Running do -- NPC QUEST updateStatus("Running", "Traveling to NPC") teleport(NPCPosition) if not waitCancelable(1) then break end updateStatus("Running", "Starting quest") if not interact(NPCPrompt) then break end if not waitCancelable(7.5) then break end -- FIND RELIC updateStatus("Running", "Searching for relic") local relic = Workspace:FindFirstChild("PersonalRelic") while not relic and Running do task.wait(0.5) relic = Workspace:FindFirstChild("PersonalRelic") end if not Running then break end -- TELEPORT TO RELIC updateStatus("Running", "Traveling to relic") teleport( (relic:GetPivot() * CFrame.new(0, 3, 0)).Position ) -- WAIT BEFORE COLLECTION if not waitCancelable(5) then break end -- COLLECT updateStatus("Running", "Collecting relic") local relicPrompt = relic:FindFirstChildWhichIsA( "ProximityPrompt", true ) if not interact(relicPrompt) then break end -- WAIT FOR COLLECTION CUTSCENE if not waitCancelable(4) then break end -- RETURN TO NPC updateStatus("Running", "Returning to NPC") teleport(NPCPosition) -- WAIT FOR NPC COOLDOWN updateStatus("Running", "Waiting for NPC cooldown") if not waitCancelable(15) then break end -- TURN IN RELIC updateStatus("Running", "Turning in relic") if not interact(NPCPrompt) then break end -- WAIT FOR THANK-YOU DIALOGUE if not waitCancelable(5) then break end end Running = false updateStatus("Stopped", "Waiting") end -- BUTTON CONNECTIONS StartButton.MouseButton1Click:Connect(function() if Running then return end Running = true updateStatus("Running", "Starting") task.spawn(farm) end) StopButton.MouseButton1Click:Connect(function() Running = false updateStatus("Stopped", "Waiting") end) Minimize.MouseButton1Click:Connect(function() Minimized = not Minimized Status.Visible = not Minimized Stage.Visible = not Minimized StartButton.Visible = not Minimized StopButton.Visible = not Minimized Creator.Visible = not Minimized Main.Size = Minimized and UDim2.new(0, 280, 0, 40) or UDim2.new(0, 280, 0, 205) Minimize.Text = Minimized and "+" or "-" end) -- CLOSE ENTIRE GUI Close.MouseButton1Click:Connect(function() Running = false GUI:Destroy() end) print("Relic Farm GUI loaded!") print("Made by donutmaster5126")