AUTO FISH
Key Required

AUTO FISH

Sol's RNG [ Eon 1-29 ]4yr64yr6 540 views 885 executesUpdated Aug 16, 2026
Unrated
00
Lua Script•278 lines (9079 chars)
--src from 09u dont skid
--src from 09u dont skid
--src from 09u dont skid

getgenv().AutoFish = true

local players = game:GetService("Players")
local replicatedStorage = game:GetService("ReplicatedStorage")
local pathfindingService = game:GetService("PathfindingService")

local packets = replicatedStorage:WaitForChild("Packets")
for _, module in ipairs(packets:GetChildren()) do
    if module:IsA("ModuleScript") then
        pcall(require, module)
    end
end
local fishing = require(packets.Fishing)

local localPlayer = players.LocalPlayer
local npcPosition = nil
local inventoryCapacity = 20
local fishingCooldown = 15
local fishingPoints = workspace.Map.Miscs.FishingPoints

local function getNpcPosition()
    local shop = workspace.Map.Miscs:FindFirstChild("FishShop")
    if shop then
        local npc = shop:FindFirstChild("NPC")
        if npc and npc:IsA("Model") then
            local pivot = npc:GetPivot()
            return Vector3.new(pivot.Position.X, pivot.Position.Y, pivot.Position.Z)
        end
    end
    return Vector3.new(100.5, 107.5, -296.75)
end
npcPosition = getNpcPosition()

local fishingState = getgenv().AutoFishState
if not fishingState then
    fishingState = {
        inventory = {},
        gameEndTime = nil,
        fishingBegan = false,
        sellAcknowledged = false,
        lastSellRequest = nil
    }
    getgenv().AutoFishState = fishingState
end

local function getCharacter()
    return localPlayer.Character or localPlayer.CharacterAdded:Wait()
end

local function getHumanoid()
    return getCharacter():WaitForChild("Humanoid")
end

local function getRootPart()
    return getCharacter():WaitForChild("HumanoidRootPart")
end

local function moveToPosition(targetPosition)
    local humanoid = getHumanoid()
    local rootPart = getRootPart()
    for attempt = 1, 6 do
        if not getgenv().AutoFish then
            return false
        end
        local path = pathfindingService:CreatePath({
            AgentRadius = 2,
            AgentHeight = 5,
            AgentCanJump = true,
            WaypointSpacing = 3
        })
        local success = pcall(function()
            path:ComputeAsync(rootPart.Position, targetPosition)
        end)
        if success and path.Status == Enum.PathStatus.Success then
            local waypoints = path:GetWaypoints()
            local reachedAll = true
            for index, waypoint in ipairs(waypoints) do
                if not getgenv().AutoFish then
                    return false
                end
                local startTime = tick()
                local lastPosition = rootPart.Position
                local stuckTime = 0
                local reached = false
                while tick() - startTime < 8 do
                    humanoid:MoveTo(waypoint.Position)
                    task.wait(0.12)
                    local offset = rootPart.Position - waypoint.Position
                    local horizontal = Vector3.new(offset.X, 0, offset.Z).Magnitude
                    local tolerance = (index == #waypoints) and 2.5 or 4
                    if (horizontal < tolerance and math.abs(offset.Y) < 4) or (horizontal < 2 and offset.Y > -1.5) then
                        reached = true
                        break
                    end
                    if (rootPart.Position - lastPosition).Magnitude < 0.3 then
                        stuckTime = stuckTime + 0.12
                        if stuckTime > 0.6 then
                            humanoid.Jump = true
                            task.wait(0.3)
                            stuckTime = 0
                        end
                    else
                        stuckTime = 0
                    end
                    lastPosition = rootPart.Position
                end
                if not reached then
                    reachedAll = false
                    break
                end
            end
            if reachedAll and (rootPart.Position - targetPosition).Magnitude < 9 then
                humanoid:MoveTo(rootPart.Position)
                return true
            end
        end
        task.wait(0.5)
    end
    return (getRootPart().Position - targetPosition).Magnitude < 11
end

local function findFishingSpot()
    local bestSpot = nil
    local bestDistance = nil
    for _, child in ipairs(fishingPoints:GetChildren()) do
        if child:IsA("Model") and not child:GetAttribute("occupied") and child:GetAttribute("spotId") then
            local spotCFrame = child:GetAttribute("plrLoc")
            if typeof(spotCFrame) == "CFrame" then
                local distance = (spotCFrame.Position - npcPosition).Magnitude
                if not bestDistance or distance < bestDistance then
                    bestSpot = child
                    bestDistance = distance
                end
            end
        end
    end
    return bestSpot
end

local function getInventoryCount()
    local count = 0
    for _ in pairs(fishingState.inventory) do
        count = count + 1
    end
    return count
end

local function collectOwnedFishIds()
    local fishIds = {}
    for _, fishId in pairs(fishingState.inventory) do
        fishIds[fishId] = true
    end
    return fishIds
end

local function fishOnce(spot)
    fishingState.gameEndTime = nil
    fishingState.fishingBegan = false
    fishing.start.send(spot:GetAttribute("spotId"))
    local startTime = tick()
    while getgenv().AutoFish and not fishingState.fishingBegan and tick() - startTime < 8 do
        task.wait(0.1)
    end
    if not fishingState.fishingBegan then
        fishing.quit.send()
        task.wait(0.5)
        return
    end
    startTime = tick()
    while getgenv().AutoFish and not fishingState.gameEndTime and tick() - startTime < 15 do
        task.wait(0.1)
    end
    if not fishingState.gameEndTime then
        fishing.quit.send()
        task.wait(fishingCooldown)
        return
    end
    while getgenv().AutoFish and workspace:GetServerTimeNow() < fishingState.gameEndTime - 0.35 do
        task.wait(0.02)
    end
    fishing.gameResult.send(true)
    task.wait(1)
    task.wait(10)
end

local function sellAllFish()
    while getgenv().AutoFish do
        local count = getInventoryCount()
        if count == 0 then
            return true
        end
        if not moveToPosition(npcPosition) then
            task.wait(1)
        elseif (getRootPart().Position - npcPosition).Magnitude < 18 then
            for fishId in pairs(collectOwnedFishIds()) do
                if not getgenv().AutoFish then
                    return false
                end
                for attempt = 1, 3 do
                    local countBefore = getInventoryCount()
                    fishingState.sellAcknowledged = false
                    fishing.sellAllFish.send(fishId)
                    local sendTime = tick()
                    while not fishingState.sellAcknowledged and tick() - sendTime < 1 do
                        task.wait(0.05)
                    end
                    if getInventoryCount() < countBefore then
                        break
                    end
                end
            end
            task.wait(0.3)
        else
            task.wait(1)
        end
    end
    return false
end

if not getgenv().AutoFishHooksConnected then
    getgenv().AutoFishHooksConnected = true
    fishing.addFish.listen(function(fish)
        fishingState.inventory[fish.uid] = fish.id
    end)
    fishing.removeFish.listen(function(uid)
        fishingState.inventory[uid] = nil
    end)
    fishing.sellAllFish.listen(function(fishId)
        fishingState.lastSellRequest = fishId
        fishing.sellAllFishConfirm.send(true)
    end)
    fishing.sellFish.listen(function()
        fishing.sellConfirm.send(true)
    end)
    fishing.sellAllFishConfirm.listen(function()
        fishingState.sellAcknowledged = true
    end)
    fishing.beginFishing.listen(function()
        fishingState.fishingBegan = true
    end)
    fishing.playGame.listen(function(params)
        fishingState.gameEndTime = tonumber(params.endTimestamp)
    end)
end

task.spawn(function()
    while getgenv().AutoFish do
        local count = getInventoryCount()
        if count >= inventoryCapacity then
            sellAllFish()
        else
            local spot = findFishingSpot()
            if spot then
                local spotCFrame = spot:GetAttribute("plrLoc")
                if typeof(spotCFrame) == "CFrame" then
                    local playerLocation = spotCFrame.Position
                    if (getRootPart().Position - playerLocation).Magnitude > 7 then
                        moveToPosition(playerLocation)
                    end
                    if (getRootPart().Position - playerLocation).Magnitude <= 10 then
                        fishOnce(spot)
                    else
                        task.wait(1)
                    end
                else
                    task.wait(2)
                end
            else
                task.wait(2)
            end
        end
        task.wait(0.3)
    end
end)

Features & Information

blablabla

Community Comments (0)

No comments yet for this script.

More Scripts for Sol's RNG [ Eon 1-29 ]