-- Services local Players = game:GetService("Players") local player = Players.LocalPlayer -- Toggle state local autofarm = false local farmThread -- UI Creation local ScreenGui = Instance.new("ScreenGui") ScreenGui.Name = "AutoFarmGui" ScreenGui.Parent = player:WaitForChild("PlayerGui") local Main = Instance.new("Frame") Main.Size = UDim2.fromOffset(400, 300) Main.Position = UDim2.fromScale(0.5, 0.5) Main.AnchorPoint = Vector2.new(0.5, 0.5) Main.BackgroundColor3 = Color3.fromRGB(0, 0, 0) Main.Active = true Main.Draggable = true -- classic drag Main.Parent = ScreenGui -- Soft Cyan Outline local Stroke = Instance.new("UIStroke") Stroke.Color = Color3.fromRGB(64, 224, 255) -- soft cyan-blue Stroke.Thickness = 2 Stroke.Parent = Main -- Button local Button = Instance.new("TextButton") Button.Size = UDim2.fromOffset(200, 50) Button.Position = UDim2.fromScale(0.5, 0.5) Button.AnchorPoint = Vector2.new(0.5, 0.5) Button.BackgroundColor3 = Color3.fromRGB(20, 20, 20) Button.TextColor3 = Color3.fromRGB(64, 224, 255) -- soft cyan-blue Button.Text = "Auto Farm OFF" Button.Font = Enum.Font.GothamBold Button.TextSize = 18 Button.Parent = Main -- Button Outline local BtnStroke = Instance.new("UIStroke") BtnStroke.Color = Color3.fromRGB(64, 224, 255) -- soft cyan-blue BtnStroke.Thickness = 1.5 BtnStroke.Parent = Button -- Auto Farm Function local function startFarm() while autofarm do local character = player.Character local hrp = character and character:FindFirstChild("HumanoidRootPart") if hrp then for _, obj in ipairs(workspace:GetDescendants()) do if not autofarm then break end if obj:IsA("SpecialMesh") and obj.MeshId == "rbxassetid://129768917989779" and obj.Parent:IsA("BasePart") then hrp.CFrame = obj.Parent.CFrame + Vector3.new(0, 3, 0) task.wait(0.1) end end end task.wait(0.2) end end -- Button Toggle Button.MouseButton1Click:Connect(function() autofarm = not autofarm if autofarm then Button.Text = "Auto Farm ON" farmThread = task.spawn(startFarm) else Button.Text = "Auto Farm OFF" end end)