local Players = game:GetService("Players") local CoreGui = game:GetService("CoreGui") local UserInputService = game:GetService("UserInputService") local GuiService = game:GetService("GuiService") local TweenService = game:GetService("TweenService") local VIM = game:GetService("VirtualInputManager") local Camera = workspace.CurrentCamera local player = Players.LocalPlayer local playerGui = player:WaitForChild("PlayerGui") local CONFIG = { CLICK_DELAY = 0.5, POLL_INTERVAL = 0.15, FIRST_CIRCLE_TIMEOUT = 6, NO_CIRCLE_GRACE = 1.5, MIN_SIZE = 25, MAX_SIZE = 120, EDGE_MARGIN = 0.05, INCLUDE_NON_BUTTONS = false, DEBUG = false, NAME_HINTS = {}, } local THEME = { bgTop = Color3.fromRGB(28, 28, 42), bgBottom = Color3.fromRGB(16, 16, 24), card = Color3.fromRGB(30, 30, 44), stroke = Color3.fromRGB(55, 55, 78), text = Color3.fromRGB(240, 240, 250), muted = Color3.fromRGB(140, 140, 168), accent = Color3.fromRGB(46, 204, 113), danger = Color3.fromRGB(231, 76, 60), warn = Color3.fromRGB(241, 196, 15), orange = Color3.fromRGB(230, 126, 34), info = Color3.fromRGB(52, 152, 219), } local connections = {} local running = false local loopActive = false local catches = 0 local function dbg(...) if CONFIG.DEBUG then print("[AutoFishing]", ...) end end local function tween(obj, time, props, style, direction) local t = TweenService:Create( obj, TweenInfo.new(time, style or Enum.EasingStyle.Quad, direction or Enum.EasingDirection.Out), props ) t:Play() return t end local function create(class, props, parent) local obj = Instance.new(class) for key, value in pairs(props) do obj[key] = value end obj.Parent = parent return obj end local function moveMouse(x, y) VIM:SendMouseMoveEvent(x, y, game) end local function mouseDown(x, y) moveMouse(x, y) task.wait(0.03) VIM:SendMouseButtonEvent(x, y, 0, true, game, 0) end local function mouseUp(x, y) VIM:SendMouseButtonEvent(x, y, 0, false, game, 0) end local function clickAt(x, y) mouseDown(x, y) task.wait(0.05) mouseUp(x, y) end local function getScreenCenter() local size = Camera.ViewportSize return math.floor(size.X * 0.5), math.floor(size.Y * 0.5) end local function isGreen(c) return c.G > 0.3 and c.G > c.R + 0.05 and c.G > c.B + 0.05 end local function isReallyVisible(gui) local obj = gui while obj and obj ~= playerGui do if obj:IsA("GuiObject") and not obj.Visible then return false end if obj:IsA("LayerCollector") and not obj.Enabled then return false end obj = obj.Parent end return true end local function hasGreenColor(gui) if gui.BackgroundTransparency < 0.95 and isGreen(gui.BackgroundColor3) then return true end if (gui:IsA("ImageButton") or gui:IsA("ImageLabel")) and gui.ImageTransparency < 0.95 then if isGreen(gui.ImageColor3) then return true end end local grad = gui:FindFirstChildOfClass("UIGradient") if grad then for _, kp in ipairs(grad.Color.Keypoints) do if isGreen(kp.Value) then return true end end end return false end local function matchesNameHint(gui) for _, hint in ipairs(CONFIG.NAME_HINTS) do if gui.Name == hint then return true end end return false end local function isRound(gui) local corner = gui:FindFirstChildOfClass("UICorner") if not corner then return false end local r = corner.CornerRadius return r.Scale >= 0.4 or r.Offset >= (gui.AbsoluteSize.X / 2) - 1 end local function getGuiCenter(gui) local size = gui.AbsoluteSize local pos = gui.AbsolutePosition + (size / 2) local x, y = pos.X, pos.Y local sg = gui:FindFirstAncestorOfClass("ScreenGui") if not (sg and sg.IgnoreGuiInset) then y = y + GuiService:GetGuiInset().Y end return x, y end local tracked = {} local trackConns = {} local function shouldTrack(inst) if not inst:IsA("GuiObject") then return false end if inst:IsA("GuiButton") then return true end if CONFIG.INCLUDE_NON_BUTTONS then return true end return matchesNameHint(inst) end local function stopTracking() for _, c in ipairs(trackConns) do c:Disconnect() end trackConns = {} tracked = {} end local function startTracking() stopTracking() table.insert(trackConns, playerGui.DescendantAdded:Connect(function(inst) if shouldTrack(inst) then tracked[inst] = true end end)) table.insert(trackConns, playerGui.DescendantRemoving:Connect(function(inst) tracked[inst] = nil end)) task.spawn(function() local n = 0 for _, d in ipairs(playerGui:GetDescendants()) do if shouldTrack(d) then tracked[d] = true end n = n + 1 if n % 300 == 0 then task.wait() end end end) end local function isCircleCandidate(gui) if not gui.Visible then return false end local size = gui.AbsoluteSize if size.X < CONFIG.MIN_SIZE or size.X > CONFIG.MAX_SIZE then return false end if size.Y < CONFIG.MIN_SIZE or size.Y > CONFIG.MAX_SIZE then return false end local ratio = size.X / size.Y if ratio < 0.8 or ratio > 1.25 then return false end local hinted = matchesNameHint(gui) if not hinted then if gui:IsA("GuiButton") then if not hasGreenColor(gui) then return false end else if not (isRound(gui) and hasGreenColor(gui)) then return false end end end if not isReallyVisible(gui) then return false end local screen = Camera.ViewportSize local x, y = getGuiCenter(gui) local m = CONFIG.EDGE_MARGIN if x < screen.X * m or x > screen.X * (1 - m) then return false end if y < screen.Y * m or y > screen.Y * (1 - m) then return false end return true end local function findCircle() for gui in pairs(tracked) do if gui.Parent == nil then tracked[gui] = nil elseif isCircleCandidate(gui) then return gui end end return nil end local function clickCircle(gui) if not (gui and gui.Parent) then return false end local x, y = getGuiCenter(gui) moveMouse(math.floor(x + 0.5), math.floor(y + 0.5)) task.wait(0.04) if not (gui and gui.Parent) or not isReallyVisible(gui) then return false end local x2, y2 = getGuiCenter(gui) x2, y2 = math.floor(x2 + 0.5), math.floor(y2 + 0.5) if math.abs(x2 - x) > 1 or math.abs(y2 - y) > 1 then moveMouse(x2, y2) task.wait(0.03) end if CONFIG.DEBUG then dbg("click:", gui:GetFullName(), x2, y2) end clickAt(x2, y2) pcall(function() gui:Activate() end) return true end local ScreenGui = Instance.new("ScreenGui") ScreenGui.Name = "AutoFishingUI" ScreenGui.ResetOnSpawn = false if syn and syn.protect_gui then syn.protect_gui(ScreenGui) ScreenGui.Parent = CoreGui elseif gethui then ScreenGui.Parent = gethui() else ScreenGui.Parent = CoreGui end local MainFrame = create("CanvasGroup", { Name = "Main", AnchorPoint = Vector2.new(0.5, 0.5), Position = UDim2.fromScale(0.5, 0.5), Size = UDim2.fromOffset(300, 214), BackgroundColor3 = Color3.new(1, 1, 1), BorderSizePixel = 0, GroupTransparency = 1, }, ScreenGui) create("UICorner", { CornerRadius = UDim.new(0, 14) }, MainFrame) create("UIStroke", { Color = THEME.stroke, Thickness = 1, ApplyStrokeMode = Enum.ApplyStrokeMode.Border, }, MainFrame) create("UIGradient", { Rotation = 90, Color = ColorSequence.new(THEME.bgTop, THEME.bgBottom), }, MainFrame) local MainScale = create("UIScale", { Scale = 0.9 }, MainFrame) local TitleBar = create("Frame", { Name = "TitleBar", Size = UDim2.new(1, 0, 0, 44), BackgroundTransparency = 1, }, MainFrame) create("TextLabel", { Position = UDim2.fromOffset(16, 0), Size = UDim2.new(1, -60, 1, 0), BackgroundTransparency = 1, RichText = true, Text = 'ATD: Auto Fishing ๐ŸŸ v0.1', TextColor3 = THEME.text, TextSize = 15, Font = Enum.Font.GothamBold, TextXAlignment = Enum.TextXAlignment.Left, }, TitleBar) local CloseButton = create("TextButton", { Position = UDim2.new(1, -38, 0, 8), Size = UDim2.fromOffset(28, 28), BackgroundColor3 = THEME.card, AutoButtonColor = false, Text = "โœ•", TextColor3 = THEME.muted, TextSize = 12, Font = Enum.Font.GothamBold, }, TitleBar) create("UICorner", { CornerRadius = UDim.new(0, 8) }, CloseButton) local StatusCard = create("Frame", { Position = UDim2.fromOffset(14, 52), Size = UDim2.fromOffset(272, 44), BackgroundColor3 = THEME.card, BorderSizePixel = 0, }, MainFrame) create("UICorner", { CornerRadius = UDim.new(0, 10) }, StatusCard) create("UIStroke", { Color = THEME.stroke, Thickness = 1 }, StatusCard) local Dot = create("Frame", { Position = UDim2.fromOffset(14, 17), Size = UDim2.fromOffset(10, 10), BackgroundColor3 = THEME.muted, BorderSizePixel = 0, }, StatusCard) create("UICorner", { CornerRadius = UDim.new(1, 0) }, Dot) local StatusLabel = create("TextLabel", { Position = UDim2.fromOffset(34, 0), Size = UDim2.new(1, -44, 1, 0), BackgroundTransparency = 1, Text = "Idle", TextColor3 = THEME.muted, TextSize = 13, Font = Enum.Font.GothamMedium, TextXAlignment = Enum.TextXAlignment.Left, TextTruncate = Enum.TextTruncate.AtEnd, }, StatusCard) local StatsCard = create("Frame", { Position = UDim2.fromOffset(14, 104), Size = UDim2.fromOffset(272, 34), BackgroundColor3 = THEME.card, BorderSizePixel = 0, }, MainFrame) create("UICorner", { CornerRadius = UDim.new(0, 10) }, StatsCard) create("UIStroke", { Color = THEME.stroke, Thickness = 1 }, StatsCard) local CatchLabel = create("TextLabel", { Position = UDim2.fromOffset(14, 0), Size = UDim2.fromOffset(120, 34), BackgroundTransparency = 1, Text = "Catches: 0", TextColor3 = THEME.text, TextSize = 13, Font = Enum.Font.GothamMedium, TextXAlignment = Enum.TextXAlignment.Left, }, StatsCard) create("TextLabel", { Position = UDim2.fromOffset(134, 0), Size = UDim2.new(1, -148, 1, 0), BackgroundTransparency = 1, Text = "F2 start ยท F1 stop", TextColor3 = THEME.muted, TextSize = 12, Font = Enum.Font.Gotham, TextXAlignment = Enum.TextXAlignment.Right, }, StatsCard) local LoadingFrame = create("Frame", { Position = UDim2.fromOffset(14, 150), Size = UDim2.fromOffset(272, 48), BackgroundTransparency = 1, }, MainFrame) local LoadingText = create("TextLabel", { Position = UDim2.fromOffset(0, 2), Size = UDim2.new(1, 0, 0, 20), BackgroundTransparency = 1, Text = "Initializing...", TextColor3 = THEME.muted, TextSize = 13, Font = Enum.Font.GothamMedium, }, LoadingFrame) local LoadingTrack = create("Frame", { Position = UDim2.fromOffset(0, 30), Size = UDim2.new(1, 0, 0, 6), BackgroundColor3 = THEME.card, BorderSizePixel = 0, }, LoadingFrame) create("UICorner", { CornerRadius = UDim.new(1, 0) }, LoadingTrack) local LoadingFill = create("Frame", { Size = UDim2.fromScale(0, 1), BackgroundColor3 = THEME.accent, BorderSizePixel = 0, }, LoadingTrack) create("UICorner", { CornerRadius = UDim.new(1, 0) }, LoadingFill) local StartButton = create("TextButton", { Position = UDim2.fromOffset(14, 150), Size = UDim2.fromOffset(272, 48), BackgroundColor3 = THEME.accent, BackgroundTransparency = 1, AutoButtonColor = false, Text = "START (F2)", TextColor3 = Color3.new(1, 1, 1), TextTransparency = 1, TextSize = 16, Font = Enum.Font.GothamBold, Visible = false, }, MainFrame) create("UICorner", { CornerRadius = UDim.new(0, 10) }, StartButton) local ButtonScale = create("UIScale", { Scale = 1 }, StartButton) local pulse = TweenService:Create( Dot, TweenInfo.new(0.7, Enum.EasingStyle.Sine, Enum.EasingDirection.InOut, -1, true), { BackgroundTransparency = 0.65 } ) local function setStatus(text, color) color = color or THEME.text StatusLabel.Text = text tween(StatusLabel, 0.25, { TextColor3 = color }) tween(Dot, 0.25, { BackgroundColor3 = color }) end local function setCatches(value) catches = value CatchLabel.Text = "Catches: " .. catches CatchLabel.TextColor3 = THEME.accent tween(CatchLabel, 0.6, { TextColor3 = THEME.text }) end local dragging = false local dragStart local startPos TitleBar.InputBegan:Connect(function(input) if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then dragging = true dragStart = input.Position startPos = MainFrame.Position input.Changed:Connect(function() if input.UserInputState == Enum.UserInputState.End then dragging = false end end) end end) table.insert(connections, UserInputService.InputChanged:Connect(function(input) if dragging and (input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == Enum.UserInputType.Touch) then local delta = input.Position - dragStart MainFrame.Position = UDim2.new( startPos.X.Scale, startPos.X.Offset + delta.X, startPos.Y.Scale, startPos.Y.Offset + delta.Y ) end end)) CloseButton.MouseEnter:Connect(function() tween(CloseButton, 0.15, { BackgroundColor3 = THEME.danger, TextColor3 = Color3.new(1, 1, 1) }) end) CloseButton.MouseLeave:Connect(function() tween(CloseButton, 0.15, { BackgroundColor3 = THEME.card, TextColor3 = THEME.muted }) end) local buttonBase = THEME.accent local hovering = false local function refreshButton() local target = hovering and buttonBase:Lerp(Color3.new(1, 1, 1), 0.12) or buttonBase tween(StartButton, 0.15, { BackgroundColor3 = target }) end StartButton.MouseEnter:Connect(function() hovering = true refreshButton() end) StartButton.MouseLeave:Connect(function() hovering = false refreshButton() tween(ButtonScale, 0.12, { Scale = 1 }) end) StartButton.MouseButton1Down:Connect(function() tween(ButtonScale, 0.1, { Scale = 0.97 }) end) StartButton.MouseButton1Up:Connect(function() tween(ButtonScale, 0.12, { Scale = 1 }, Enum.EasingStyle.Back) end) tween(MainFrame, 0.35, { GroupTransparency = 0 }) tween(MainScale, 0.4, { Scale = 1 }, Enum.EasingStyle.Back) task.spawn(function() task.wait(0.4) if not ScreenGui.Parent then return end tween(LoadingFill, 0.8, { Size = UDim2.fromScale(1, 1) }, Enum.EasingStyle.Sine, Enum.EasingDirection.InOut) task.wait(0.85) if not ScreenGui.Parent then return end LoadingText.Text = "Ready!" tween(LoadingText, 0.2, { TextColor3 = THEME.accent }) task.wait(0.35) if not ScreenGui.Parent then return end tween(LoadingText, 0.25, { TextTransparency = 1 }) tween(LoadingTrack, 0.25, { BackgroundTransparency = 1 }) tween(LoadingFill, 0.25, { BackgroundTransparency = 1 }) task.wait(0.28) if not ScreenGui.Parent then return end LoadingFrame:Destroy() StartButton.Visible = true tween(StartButton, 0.3, { BackgroundTransparency = 0, TextTransparency = 0 }) end) local function playMinigame() local waited = 0 local circle = findCircle() while running and not circle and waited < CONFIG.FIRST_CIRCLE_TIMEOUT do task.wait(CONFIG.POLL_INTERVAL) waited = waited + CONFIG.POLL_INTERVAL circle = findCircle() end if not circle then dbg("no circles appeared") return false end local idle = 0 local clicks = 0 while running do circle = findCircle() if circle then idle = 0 if clickCircle(circle) then clicks = clicks + 1 end task.wait(CONFIG.CLICK_DELAY) else idle = idle + CONFIG.POLL_INTERVAL if idle >= CONFIG.NO_CIRCLE_GRACE then break end task.wait(CONFIG.POLL_INTERVAL) end end dbg("minigame finished, clicks:", clicks) return clicks > 0 end local function startFishingLoop() if loopActive then return end loopActive = true startTracking() task.spawn(function() while running do local origin = UserInputService:GetMouseLocation() local ox, oy = math.floor(origin.X), math.floor(origin.Y) local cx, cy = getScreenCenter() setStatus("Casting rod...", THEME.warn) clickAt(cx, cy) task.wait(2.5) if not running then moveMouse(ox, oy) break end setStatus("Charging luck bar...", THEME.orange) mouseDown(cx, cy) task.wait(3.5) mouseUp(cx, cy) if running then setStatus("Clicking green circles...", THEME.accent) if playMinigame() then setCatches(catches + 1) end end moveMouse(ox, oy) if running then setStatus("Fish caught! Cooling down...", THEME.info) task.wait(2.0) end end loopActive = false stopTracking() setStatus("Idle", THEME.muted) end) end local function setRunning(state) if state == running then return end running = state if running then buttonBase = THEME.danger StartButton.Text = "STOP (F1)" pulse:Play() startFishingLoop() else buttonBase = THEME.accent StartButton.Text = "START (F2)" pulse:Cancel() Dot.BackgroundTransparency = 0 end refreshButton() end StartButton.MouseButton1Click:Connect(function() setRunning(not running) end) table.insert(connections, UserInputService.InputBegan:Connect(function(input, gameProcessed) if gameProcessed then return end if input.KeyCode == Enum.KeyCode.F2 then setRunning(true) elseif input.KeyCode == Enum.KeyCode.F1 then setRunning(false) end end)) CloseButton.MouseButton1Click:Connect(function() running = false pulse:Cancel() for _, c in ipairs(connections) do c:Disconnect() end connections = {} stopTracking() tween(MainFrame, 0.2, { GroupTransparency = 1 }) tween(MainScale, 0.2, { Scale = 0.9 }) task.wait(0.22) ScreenGui:Destroy() end)