M
Description
the best fishing script in pixel blade
GAMEPixel Blade [Early Access]
UPDATEDOct 25, 2026
ACCESSKeyless
PLATFORMDesktop
Script source Luau
-- [[ BloxScripts Risk Notice ]]
-- This script has not been verified by BloxScripts.fun. Deal with caution.
--
-- Stay safe:
-- • Never log in on unofficial Roblox sites or lookalike domains.
-- • Real Roblox links use roblox.com (check the .com ending).
-- • Treat fake Roblox login / "claim reward" pages as phishing.
-- [[ End BloxScripts Risk Notice ]]
-- ============================================================
-- PB_AutoFish.lua (v11 - Dynamic 90% Bag, Page Crafting & Clovers)
-- ============================================================
local Players = game:GetService("Players")
local lp = Players.LocalPlayer
local Workspace = game:GetService("Workspace")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local VirtualInputManager = game:GetService("VirtualInputManager")
local VirtualUser = game:GetService("VirtualUser")
local GuiService = game:GetService("GuiService")
local UserInputService = game:GetService("UserInputService")
local CoreGui = game:GetService("CoreGui")
local remotes = ReplicatedStorage:WaitForChild("_network_remotes", 5)
local pg = lp:WaitForChild("PlayerGui")
local fishingHud = pg:WaitForChild("fishing_hud", 10)
local minigame = fishingHud
and fishingHud:WaitForChild("FishingHud", 5)
and fishingHud.FishingHud:WaitForChild("canvas", 5):WaitForChild("minigame", 5)
-- ================= ANTI-AFK =================
lp.Idled:Connect(function()
pcall(function()
VirtualUser:CaptureController()
VirtualUser:ClickButton2(Vector2.new(0, 0))
end)
pcall(function()
VirtualInputManager:SendKeyEvent(true, Enum.KeyCode.RightControl, false, game)
task.wait(0.05)
VirtualInputManager:SendKeyEvent(false, Enum.KeyCode.RightControl, false, game)
end)
end)
-- ================= GUI =================
local sg = Instance.new("ScreenGui")
sg.Name = "PB_AutoFish_UI"
sg.ResetOnSpawn = false
sg.Parent = CoreGui
local main = Instance.new("Frame", sg)
local MAIN_HEIGHT = 445
main.Size = UDim2.new(0, 360, 0, MAIN_HEIGHT)
main.Position = UDim2.new(0.04, 0, 0.22, 0)
main.BackgroundColor3 = Color3.fromRGB(15, 17, 22)
main.BorderSizePixel = 0
main.Active = true
main.Draggable = true
Instance.new("UICorner", main).CornerRadius = UDim.new(0, 10)
local stroke = Instance.new("UIStroke", main)
stroke.Color = Color3.fromRGB(0, 170, 255)
stroke.Thickness = 2
stroke.Transparency = 0.25
local tb = Instance.new("Frame", main)
tb.Size = UDim2.new(1, 0, 0, 36)
tb.BackgroundColor3 = Color3.fromRGB(18, 28, 45)
tb.BorderSizePixel = 0
Instance.new("UICorner", tb).CornerRadius = UDim.new(0, 10)
local title = Instance.new("TextLabel", tb)
title.Size = UDim2.new(1, -40, 1, 0)
title.Position = UDim2.new(0, 12, 0, 0)
title.BackgroundTransparency = 1
title.TextColor3 = Color3.fromRGB(0, 220, 255)
title.Font = Enum.Font.GothamBold
title.TextSize = 13
title.TextXAlignment = Enum.TextXAlignment.Left
title.Text = "PIXEL BLADE AUTOFISH v11 [End=Panic]"
local xb = Instance.new("TextButton", tb)
xb.Size = UDim2.new(0, 26, 0, 26)
xb.Position = UDim2.new(1, -30, 0, 5)
xb.BackgroundColor3 = Color3.fromRGB(150, 30, 30)
xb.TextColor3 = Color3.new(1, 1, 1)
xb.Text = "X"
xb.Font = Enum.Font.GothamBold
xb.TextSize = 12
xb.BorderSizePixel = 0
Instance.new("UICorner", xb).CornerRadius = UDim.new(0, 4)
local stateLbl = Instance.new("TextLabel", main)
stateLbl.Size = UDim2.new(1, -24, 0, 20)
stateLbl.Position = UDim2.new(0, 12, 0, 42)
stateLbl.BackgroundTransparency = 1
stateLbl.TextColor3 = Color3.fromRGB(255, 230, 100)
stateLbl.Font = Enum.Font.GothamBold
stateLbl.TextSize = 12
stateLbl.TextXAlignment = Enum.TextXAlignment.Left
stateLbl.Text = "Stan: IDLE"
local bobberLbl = Instance.new("TextLabel", main)
bobberLbl.Size = UDim2.new(1, -24, 0, 18)
bobberLbl.Position = UDim2.new(0, 12, 0, 64)
bobberLbl.BackgroundTransparency = 1
bobberLbl.TextColor3 = Color3.fromRGB(180, 220, 255)
bobberLbl.Font = Enum.Font.Gotham
bobberLbl.TextSize = 11
bobberLbl.TextXAlignment = Enum.TextXAlignment.Left
bobberLbl.Text = "Wedka w wodzie: NIE"
local targetLbl = Instance.new("TextLabel", main)
targetLbl.Size = UDim2.new(1, -24, 0, 18)
targetLbl.Position = UDim2.new(0, 12, 0, 84)
targetLbl.BackgroundTransparency = 1
targetLbl.TextColor3 = Color3.fromRGB(160, 255, 160)
targetLbl.Font = Enum.Font.GothamMedium
targetLbl.TextSize = 11
targetLbl.TextXAlignment = Enum.TextXAlignment.Left
targetLbl.Text = "Cel: Szukanie strefy..."
local bagCapacityLbl = Instance.new("TextLabel", main)
bagCapacityLbl.Size = UDim2.new(1, -24, 0, 18)
bagCapacityLbl.Position = UDim2.new(0, 12, 0, 104)
bagCapacityLbl.BackgroundTransparency = 1
bagCapacityLbl.TextColor3 = Color3.fromRGB(255, 210, 130)
bagCapacityLbl.Font = Enum.Font.GothamBold
bagCapacityLbl.TextSize = 11
bagCapacityLbl.TextXAlignment = Enum.TextXAlignment.Left
bagCapacityLbl.Text = "Plecak: Skanowanie..."
local pagesLbl = Instance.new("TextLabel", main)
pagesLbl.Size = UDim2.new(1, -24, 0, 18)
pagesLbl.Position = UDim2.new(0, 12, 0, 124)
pagesLbl.BackgroundTransparency = 1
pagesLbl.TextColor3 = Color3.fromRGB(220, 170, 255)
pagesLbl.Font = Enum.Font.GothamBold
pagesLbl.TextSize = 11
pagesLbl.TextXAlignment = Enum.TextXAlignment.Left
pagesLbl.Text = "Strony (Pages): 0 szt."
-- TOGGLE 1: Auto-Sell
local sellToggle = Instance.new("TextButton", main)
sellToggle.Size = UDim2.new(1, -24, 0, 24)
sellToggle.Position = UDim2.new(0, 12, 0, 146)
sellToggle.BackgroundColor3 = Color3.fromRGB(35, 60, 40)
sellToggle.TextColor3 = Color3.fromRGB(160, 255, 160)
sellToggle.Text = "Auto-Sell (przy >= 90% pojemnosci): ON"
sellToggle.Font = Enum.Font.GothamBold
sellToggle.TextSize = 11
sellToggle.BorderSizePixel = 0
Instance.new("UICorner", sellToggle).CornerRadius = UDim.new(0, 6)
local autoSell = true
sellToggle.MouseButton1Click:Connect(function()
autoSell = not autoSell
sellToggle.Text = "Auto-Sell (przy >= 90% pojemnosci): " .. (autoSell and "ON" or "OFF")
sellToggle.TextColor3 = autoSell and Color3.fromRGB(160, 255, 160) or Color3.fromRGB(255, 140, 140)
sellToggle.BackgroundColor3 = autoSell and Color3.fromRGB(35, 60, 40) or Color3.fromRGB(50, 30, 30)
end)
-- TOGGLE 2: Auto-Craft Pages
local craftToggle = Instance.new("TextButton", main)
craftToggle.Size = UDim2.new(1, -24, 0, 24)
craftToggle.Position = UDim2.new(0, 12, 0, 174)
craftToggle.BackgroundColor3 = Color3.fromRGB(45, 35, 65)
craftToggle.TextColor3 = Color3.fromRGB(210, 170, 255)
craftToggle.Text = "Auto-Craft Book (przy >= 32 Page): ON"
craftToggle.Font = Enum.Font.GothamBold
craftToggle.TextSize = 11
craftToggle.BorderSizePixel = 0
Instance.new("UICorner", craftToggle).CornerRadius = UDim.new(0, 6)
local autoCraft = true
local PAGE_CRAFT_THRESHOLD = 32
craftToggle.MouseButton1Click:Connect(function()
autoCraft = not autoCraft
craftToggle.Text = "Auto-Craft Book (przy >= 32 Page): " .. (autoCraft and "ON" or "OFF")
craftToggle.TextColor3 = autoCraft and Color3.fromRGB(210, 170, 255) or Color3.fromRGB(255, 140, 140)
craftToggle.BackgroundColor3 = autoCraft and Color3.fromRGB(45, 35, 65) or Color3.fromRGB(50, 30, 30)
end)
-- TOGGLE 3: Pomijaj Page w sprzedaży
local pageToggle = Instance.new("TextButton", main)
pageToggle.Size = UDim2.new(1, -24, 0, 24)
pageToggle.Position = UDim2.new(0, 12, 0, 202)
pageToggle.BackgroundColor3 = Color3.fromRGB(30, 50, 40)
pageToggle.TextColor3 = Color3.fromRGB(140, 255, 180)
pageToggle.Text = "Pomiń 'Page' w sprzedaży: ON"
pageToggle.Font = Enum.Font.GothamBold
pageToggle.TextSize = 11
pageToggle.BorderSizePixel = 0
Instance.new("UICorner", pageToggle).CornerRadius = UDim.new(0, 6)
local keepPage = true
pageToggle.MouseButton1Click:Connect(function()
keepPage = not keepPage
pageToggle.Text = "Pomiń 'Page' w sprzedaży: " .. (keepPage and "ON" or "OFF")
pageToggle.TextColor3 = keepPage and Color3.fromRGB(140, 255, 180) or Color3.fromRGB(255, 140, 140)
pageToggle.BackgroundColor3 = keepPage and Color3.fromRGB(30, 50, 40) or Color3.fromRGB(50, 30, 30)
end)
-- TOGGLE 4: Teleport + Lewitacja
local tpToggle = Instance.new("TextButton", main)
tpToggle.Size = UDim2.new(1, -24, 0, 24)
tpToggle.Position = UDim2.new(0, 12, 0, 230)
tpToggle.BackgroundColor3 = Color3.fromRGB(28, 38, 52)
tpToggle.TextColor3 = Color3.fromRGB(180, 255, 180)
tpToggle.Text = "Teleport + Lewitacja: ON"
tpToggle.Font = Enum.Font.GothamBold
tpToggle.TextSize = 11
tpToggle.BorderSizePixel = 0
Instance.new("UICorner", tpToggle).CornerRadius = UDim.new(0, 6)
local autoTp = true
tpToggle.MouseButton1Click:Connect(function()
autoTp = not autoTp
tpToggle.Text = "Teleport + Lewitacja: " .. (autoTp and "ON" or "OFF")
tpToggle.TextColor3 = autoTp and Color3.fromRGB(180, 255, 180) or Color3.fromRGB(255, 150, 150)
end)
-- START / STOP
local toggleBtn = Instance.new("TextButton", main)
toggleBtn.Size = UDim2.new(1, -24, 0, 34)
toggleBtn.Position = UDim2.new(0, 12, 0, 260)
toggleBtn.BackgroundColor3 = Color3.fromRGB(0, 170, 80)
toggleBtn.TextColor3 = Color3.new(1, 1, 1)
toggleBtn.Text = "START AUTOFISH"
toggleBtn.Font = Enum.Font.GothamBold
toggleBtn.TextSize = 13
toggleBtn.BorderSizePixel = 0
Instance.new("UICorner", toggleBtn).CornerRadius = UDim.new(0, 6)
local statsBox = Instance.new("TextLabel", main)
statsBox.Size = UDim2.new(1, -24, 0, 135)
statsBox.Position = UDim2.new(0, 12, 0, 300)
statsBox.BackgroundColor3 = Color3.fromRGB(10, 12, 16)
statsBox.TextColor3 = Color3.fromRGB(160, 180, 200)
statsBox.Font = Enum.Font.Code
statsBox.TextSize = 10
statsBox.TextWrapped = true
statsBox.Text = "v11: Dynamiczny plecak 90% & Auto-Wymiana Page\n- Monitoruje pojemnosc eq w czasie rzeczywistym (>=90%)\n- Zlicza ryby, koniczynki (charms) i zyczenia (wishes)\n- Auto-Crafting: >=32 Page -> teleport do NPC -> ksiazki\n- Watchdog 30s: brak brania resetuje rzut (tylko lowienie)\n- Synchronizacja FSM: brak przerywania rzutu/minigry"
Instance.new("UICorner", statsBox).CornerRadius = UDim.new(0, 6)
-- ================= ZMIENNE STANU =================
local running = false
local currentCatches = 0
local inMinigame = false
local isSellingNow = false
local isCraftingNow = false
local FINN_POS = Vector3.new(3187.8, 186.8, -72.0)
local MAGICIAN_POS = Vector3.new(3114.6, 225.2, -104.5)
local MAGICIAN_LOOK = Vector3.new(3107.7, 226.3, -104.3)
local function setState(txt)
stateLbl.Text = "Stan: " .. txt
end
-- ================= LEWITACJA =================
local hoverVelocity = nil
local function enableHover(hrp)
if not hoverVelocity or hoverVelocity.Parent ~= hrp then
hoverVelocity = Instance.new("BodyVelocity")
hoverVelocity.Name = "PB_Hover"
hoverVelocity.MaxForce = Vector3.new(1e6, 1e6, 1e6)
hoverVelocity.Velocity = Vector3.zero
hoverVelocity.Parent = hrp
end
end
local function disableHover()
if hoverVelocity then
hoverVelocity:Destroy()
hoverVelocity = nil
end
local char = lp.Character
local hrp = char and char:FindFirstChild("HumanoidRootPart")
if hrp then
local old = hrp:FindFirstChild("PB_Hover")
if old then old:Destroy() end
end
end
local function cleanup()
running = false
disableHover()
sg:Destroy()
end
xb.MouseButton1Click:Connect(cleanup)
UserInputService.InputBegan:Connect(function(i, g)
if g then return end
if i.KeyCode == Enum.KeyCode.End then cleanup() end
end)
-- ================= KLIKANIE GUI & POMOCNIKI =================
local function isVisible(inst)
if not inst then return false end
if not inst.Parent then return false end
if inst:IsA("ScreenGui") then return inst.Enabled end
if inst:IsA("GuiObject") then return inst.Visible end
return true
end
local function clickGui(btn)
if not btn then return end
local inset = GuiService:GetGuiInset()
local pos = btn.AbsolutePosition + (btn.AbsoluteSize / 2)
local x = pos.X + inset.X
local y = pos.Y + inset.Y
pcall(function()
VirtualInputManager:SendMouseMoveEvent(x, y, game)
task.wait(0.03)
VirtualInputManager:SendMouseButtonEvent(x, y, 0, true, game, 1)
task.wait(0.06)
VirtualInputManager:SendMouseButtonEvent(x, y, 0, false, game, 1)
end)
end
-- ================= DETEKCJA PLECAKA & PAGE =================
local function getBagInfo()
local stash = pg:FindFirstChild("fishing_stash")
if stash then
local fig = stash:FindFirstChild("figure", true)
if fig and fig.Text then
local cur, maxSlots = fig.Text:match("(%d+)%s*/%s*(%d+)")
if cur and maxSlots then
return tonumber(cur), tonumber(maxSlots)
end
end
local countFrame = stash:FindFirstChild("count", true)
if countFrame then
for _, d in ipairs(countFrame:GetDescendants()) do
if d:IsA("TextLabel") and d.Text and d.Text:match("^%d+%s*/%s*%d+$") then
local cur, maxSlots = d.Text:match("(%d+)%s*/%s*(%d+)")
if cur and maxSlots then
return tonumber(cur), tonumber(maxSlots)
end
end
end
end
end
return nil, nil
end
local function getPageCount()
local stash = pg:FindFirstChild("fishing_stash")
if stash then
local cardPage = stash:FindFirstChild("card_Page", true)
if cardPage then
for _, d in ipairs(cardPage:GetDescendants()) do
if d:IsA("TextLabel") and d.Text then
local p = d.Text:match("^(%d+)%s*/")
if p then return tonumber(p) end
local single = d.Text:match("^(%d+)$")
if single then return tonumber(single) end
end
end
end
end
local armory = pg:FindFirstChild("armory_menu")
if armory then
local wallet = armory:FindFirstChild("wallet", true)
if wallet then
local fig = wallet:FindFirstChild("figure", true)
if fig and fig.Text and tonumber(fig.Text) then
return tonumber(fig.Text)
end
end
end
return 0
end
local function isBagFull()
local cur, maxSlots = getBagInfo()
if cur and maxSlots and maxSlots > 0 then
local pct = (cur / maxSlots) * 100
return (cur / maxSlots) >= 0.90, cur, maxSlots, pct
end
-- Fallback
local fallbackCur = currentCatches
local fallbackMax = 45
return fallbackCur >= fallbackMax, fallbackCur, fallbackMax, (fallbackCur / fallbackMax) * 100
end
local function updateUIStatus()
local cur, maxSlots = getBagInfo()
if cur and maxSlots then
local pct = math.floor((cur / maxSlots) * 100)
bagCapacityLbl.Text = string.format("Plecak: %d / %d (%d%%) [Auto-Sell >=90%%]", cur, maxSlots, pct)
if pct >= 90 then
bagCapacityLbl.TextColor3 = Color3.fromRGB(255, 90, 90)
else
bagCapacityLbl.TextColor3 = Color3.fromRGB(255, 210, 130)
end
else
bagCapacityLbl.Text = string.format("Zlowione lupy: %d / 45 (Licznik)", currentCatches)
bagCapacityLbl.TextColor3 = Color3.fromRGB(200, 200, 255)
end
local pages = getPageCount()
pagesLbl.Text = string.format("Strony (Pages): %d szt. [Cel: >= %d]", pages, PAGE_CRAFT_THRESHOLD)
if pages >= PAGE_CRAFT_THRESHOLD then
pagesLbl.TextColor3 = Color3.fromRGB(120, 255, 120)
else
pagesLbl.TextColor3 = Color3.fromRGB(220, 170, 255)
end
end
-- Petla w tle aktualizujaca stan plecaka i stron
task.spawn(function()
while true do
task.wait(1.0)
pcall(updateUIStatus)
end
end)
-- ================= WERYFIKACJA SPŁAWIKA & WĘDKI =================
local lastFishActionTime = tick()
local function getMyBobber(currentSpot)
local char = lp.Character
if not char then return nil end
local hrp = char:FindFirstChild("HumanoidRootPart")
if not hrp then return nil end
local rod = char:FindFirstChild("held_fishing_rod")
if not rod then return nil end
for _, d in ipairs(char:GetDescendants()) do
if d:IsA("Constraint") then
local a0 = d.Attachment0
local a1 = d.Attachment1
local p0 = a0 and a0.Parent
local p1 = a1 and a1.Parent
if p0 and p0.Name == "fishing_bob" and p0:IsA("BasePart") then return p0 end
if p1 and p1.Name == "fishing_bob" and p1:IsA("BasePart") then return p1 end
end
end
local lookVec = hrp.CFrame.LookVector
local bestBob = nil
local bestScore = math.huge
for _, obj in ipairs(Workspace:GetChildren()) do
if obj.Name == "fishing_bob" and obj:IsA("BasePart") then
local toBob = obj.Position - hrp.Position
local dist = toBob.Magnitude
if dist >= 8 and dist <= 45 then
local dot = lookVec:Dot(toBob.Unit)
if dot > 0.5 then
local spotDist = currentSpot and (obj.Position - currentSpot.pos).Magnitude or 0
if not currentSpot or spotDist < 30 then
local score = currentSpot and spotDist or dist
if score < bestScore then
bestScore = score
bestBob = obj
end
end
end
end
end
end
return bestBob
end
-- ================= STREFY LUCK =================
local function getBestFishingSpot()
local spots = {}
for _, d in ipairs(Workspace:GetDescendants()) do
if d:IsA("TextLabel") and d.Name == "TextLabel"
and d.Parent and d.Parent.Name == "Gui" then
local percent = d.Text:match("%+(%d+)%%")
if percent then
local luckVal = tonumber(percent)
local part = d:FindFirstAncestorWhichIsA("BasePart")
if part then
table.insert(spots, {
luck = luckVal,
pos = part.Position,
part = part,
name = string.format("+%d%% Luck", luckVal)
})
end
end
end
end
if #spots == 0 then return nil end
table.sort(spots, function(a, b)
if a.luck == b.luck and lp.Character and lp.Character:FindFirstChild("HumanoidRootPart") then
local myPos = lp.Character.HumanoidRootPart.Position
return (a.pos - myPos).Magnitude < (b.pos - myPos).Magnitude
end
return a.luck > b.luck
end)
return spots[1]
end
local function isSpotAlive(spot)
return spot and spot.part and spot.part.Parent
end
-- ================= MINIGRA =================
task.spawn(function()
while true do
task.wait(0.015)
if running and not isSellingNow and not isCraftingNow and minigame then
local ripple = minigame:FindFirstChild("Ripple")
local reel = minigame:FindFirstChild("Reel")
if (ripple and ripple.Visible) or (reel and reel.Visible) then
inMinigame = true
lastFishActionTime = tick()
end
if ripple and ripple.Visible then
setState("Ripple QTE...")
VirtualInputManager:SendKeyEvent(true, Enum.KeyCode.E, false, game)
local fill = ripple:FindFirstChild("fill")
local t = 0
while ripple and ripple.Parent and t < 1.7 do
task.wait(0.02)
t = t + 0.02
if fill and fill.Size.X.Scale >= 0.86 then break end
end
VirtualInputManager:SendKeyEvent(false, Enum.KeyCode.E, false, game)
task.wait(0.18)
end
if reel and reel.Visible then
setState("Reel finisz...")
local btnPos = reel.AbsolutePosition + (reel.AbsoluteSize / 2)
for _ = 1, 16 do
if not reel.Parent or not running then break end
VirtualInputManager:SendMouseButtonEvent(btnPos.X, btnPos.Y, 0, true, game, 1)
VirtualInputManager:SendKeyEvent(true, Enum.KeyCode.E, false, game)
task.wait(0.02)
VirtualInputManager:SendMouseButtonEvent(btnPos.X, btnPos.Y, 0, false, game, 1)
VirtualInputManager:SendKeyEvent(false, Enum.KeyCode.E, false, game)
task.wait(0.03)
end
task.wait(0.5)
inMinigame = false
end
end
end
end)
-- OBSŁUGA WSZYSTKICH TYPÓW ŁUPÓW (RYBY, KONICZYNKI/CHARMY, ŻYCZENIA)
local function onLootCaught()
currentCatches = currentCatches + 1
lastFishActionTime = tick()
inMinigame = false
task.spawn(updateUIStatus)
end
if remotes then
if remotes:FindFirstChild("fishing_caught_item") then
remotes.fishing_caught_item.OnClientEvent:Connect(onLootCaught)
end
if remotes:FindFirstChild("fishing_caught_charm") then
remotes.fishing_caught_charm.OnClientEvent:Connect(onLootCaught)
end
if remotes:FindFirstChild("fishing_caught_wish") then
remotes.fishing_caught_wish.OnClientEvent:Connect(onLootCaught)
end
end
-- ================= ZAMYKANIE OKIEN (Q) & WATCHDOG =================
local function isShopOpen()
local fg = pg:FindFirstChild("fish_shop")
if not fg or not isVisible(fg) then return false end
local fs = fg:FindFirstChild("FishShop") or fg:FindFirstChild("strip_area", true)
return fs ~= nil and isVisible(fs)
end
local function isArmoryOpen()
local am = pg:FindFirstChild("armory_menu")
if not am or not isVisible(am) then return false end
local arm = am:FindFirstChild("ArmoryMenu") or am:FindFirstChild("enchant_stage", true)
return arm ~= nil and isVisible(arm)
end
local function forceCloseGUI(guiType)
VirtualInputManager:SendKeyEvent(true, Enum.KeyCode.Q, false, game)
task.wait(0.06)
VirtualInputManager:SendKeyEvent(false, Enum.KeyCode.Q, false, game)
task.wait(0.2)
if guiType == "shop" and isShopOpen() then
local fg = pg:FindFirstChild("fish_shop")
local close = fg and fg:FindFirstChild("close", true)
local b = close and (close:FindFirstChild("button", true) or close:FindFirstChildWhichIsA("GuiButton", true))
if b and isVisible(b) then clickGui(b) end
elseif guiType == "armory" and isArmoryOpen() then
local am = pg:FindFirstChild("armory_menu")
local close = am and am:FindFirstChild("close", true)
local b = close and (close:FindFirstChild("button", true) or close:FindFirstChildWhichIsA("GuiButton", true))
if b and isVisible(b) then clickGui(b) end
end
end
-- Watchdog: co 4 sekundy sprawdza czy okno sklepu lub kowala nie zostalo przypadkowo otwarte podczas lowienia
task.spawn(function()
while true do
task.wait(4)
if running and not isSellingNow and not isCraftingNow then
if isShopOpen() then
forceCloseGUI("shop")
end
if isArmoryOpen() then
forceCloseGUI("armory")
end
end
end
end)
-- ================= AUTO-SELL =================
local function _performAutoSellInternal()
setState("AUTO-SELL: Anuluje lowienie...")
if remotes and remotes:FindFirstChild("fishing_cancel") then
pcall(function() remotes.fishing_cancel:FireServer() end)
end
task.wait(0.35)
local char = lp.Character
local hrp = char and char:FindFirstChild("HumanoidRootPart")
if not hrp then return end
disableHover()
-- 1. Teleport do budki sprzedazy
setState("AUTO-SELL: Teleport do budki...")
hrp.CFrame = CFrame.new(FINN_POS)
task.wait(0.65)
-- 2. Otworz sklep (E)
setState("AUTO-SELL: Otwieram sklep (E)...")
VirtualInputManager:SendKeyEvent(true, Enum.KeyCode.E, false, game)
task.wait(0.08)
VirtualInputManager:SendKeyEvent(false, Enum.KeyCode.E, false, game)
-- Czekaj na FishShop GUI
setState("AUTO-SELL: Czekam na GUI...")
local fishShop = nil
local waitStart = tick()
while tick() - waitStart < 3.5 do
local fg = pg:FindFirstChild("fish_shop")
if fg and isVisible(fg) then
local fs = fg:FindFirstChild("FishShop") or fg:FindFirstChild("strip_area", true)
if fs then
fishShop = fg:FindFirstChild("FishShop") or fg
break
end
end
task.wait(0.2)
end
if not fishShop then
setState("AUTO-SELL: Brak GUI sklepu - wracam.")
task.wait(0.8)
return
end
task.wait(0.4)
-- Pomocnik: Czy to karta 'Page'?
local function isPageCard(card)
if card.Name:lower():find("page") then return true end
for _, d in ipairs(card:GetDescendants()) do
if (d:IsA("TextLabel") or d:IsA("TextButton")) and d.Text and d.Text:lower():find("page") then
return true
end
end
return false
end
-- Pomocnik: Karty ryb w strip_area posortowane OD LEWEJ DO PRAWEJ
local function getCards()
local result = {}
local stripArea = fishShop:FindFirstChild("strip_area", true)
if stripArea then
for _, ch in ipairs(stripArea:GetDescendants()) do
if ch.Name:sub(1, 5) == "card_" and ch:IsA("GuiButton") and isVisible(ch) then
if not (keepPage and isPageCard(ch)) then
table.insert(result, ch)
end
end
end
end
table.sort(result, function(a, b)
return a.AbsolutePosition.X < b.AbsolutePosition.X
end)
return result
end
local function getCardCount(card)
for _, d in ipairs(card:GetDescendants()) do
if d:IsA("TextLabel") or d:IsA("TextButton") then
local n = (d.Text or ""):match("^x(%d+)")
if n then return tonumber(n) end
end
end
return 1
end
local function findSellButton(qty)
local startT = tick()
while tick() - startT < 1.0 do
local actionAll = fishShop:FindFirstChild("action_sell_all", true)
local actionOne = fishShop:FindFirstChild("action_sell", true)
local btnAll = actionAll and (actionAll:FindFirstChild("body", true) or actionAll:FindFirstChildWhichIsA("GuiButton", true))
local btnOne = actionOne and (actionOne:FindFirstChild("body", true) or actionOne:FindFirstChildWhichIsA("GuiButton", true))
if qty > 1 then
if btnAll and isVisible(btnAll) and isVisible(actionAll) then
return btnAll, "SELL ALL"
elseif btnOne and isVisible(btnOne) and isVisible(actionOne) then
return btnOne, "SELL"
end
else
if btnOne and isVisible(btnOne) and isVisible(actionOne) then
return btnOne, "SELL"
end
end
task.wait(0.08)
end
return nil, nil
end
local function checkConfirm()
local t0 = tick()
while tick() - t0 < 0.35 do
local sc = pg:FindFirstChild("sell_confirm", true)
if sc and sc.Visible then
setState("AUTO-SELL: Potwierdzam (SELL)...")
task.wait(0.06)
local confirmFrame = sc:FindFirstChild("confirm", true)
local confirmBtn = confirmFrame and (confirmFrame:FindFirstChild("body", true) or confirmFrame:FindFirstChildWhichIsA("TextButton", true))
if confirmBtn then
clickGui(confirmBtn)
task.wait(0.12)
if sc.Visible then
clickGui(confirmBtn)
task.wait(0.12)
end
end
local hideT = tick()
while sc.Visible and tick() - hideT < 0.8 do
task.wait(0.04)
end
return true
end
task.wait(0.04)
end
return false
end
-- 3. Glowna petla sprzedazy
local maxIters = 80
local iter = 0
while iter < maxIters do
iter = iter + 1
local cards = getCards()
if #cards == 0 then
setState("AUTO-SELL: Wszystko sprzedane!")
break
end
local card = cards[1]
local cardName = card.Name
local qty = getCardCount(card)
local cleanName = cardName:gsub("card_", "")
setState(string.format("AUTO-SELL: %s (x%d)...", cleanName, qty))
clickGui(card)
task.wait(0.15)
local sellBtn, sellMode = findSellButton(qty)
if not sellBtn then
clickGui(card)
task.wait(0.15)
sellBtn, sellMode = findSellButton(qty)
end
if sellBtn then
setState(string.format("AUTO-SELL: %s (%s)...", sellMode, cleanName))
clickGui(sellBtn)
task.wait(0.08)
checkConfirm()
local waitSoldT = tick()
while tick() - waitSoldT < 0.8 do
if not card.Parent or not card:IsDescendantOf(fishShop) then
break
end
task.wait(0.04)
end
else
setState("AUTO-SELL: Brak przycisku dla " .. cleanName)
task.wait(0.2)
break
end
end
-- 4. Zamknij sklep (klawisz Q)
setState("AUTO-SELL: Zamykam sklep (Q)...")
local closeTries = 0
while isShopOpen() and closeTries < 5 do
closeTries = closeTries + 1
forceCloseGUI("shop")
task.wait(0.25)
end
task.wait(0.2)
currentCatches = 0
updateUIStatus()
setState("AUTO-SELL zakonczony! Wracam do lowienia.")
task.wait(0.2)
end
local function performAutoSell()
isSellingNow = true
local ok, err = pcall(_performAutoSellInternal)
if not ok then
warn("PB_AutoFish SELL ERROR: " .. tostring(err))
setState("BŁĄD SELL: " .. tostring(err):sub(1, 35))
task.wait(1.5)
end
isSellingNow = false
lastFishActionTime = tick() -- Reset licznika czasu lowienia po sprzedazy
end
-- ================= AUTO-CRAFTING (PAGE -> BOOK) =================
local function findUnveilButton(armoryMenu)
if not armoryMenu then return nil end
local roll = armoryMenu:FindFirstChild("roll", true)
if roll then
local b = roll:FindFirstChild("body", true)
or roll:FindFirstChildWhichIsA("GuiButton", true)
or (roll:IsA("GuiButton") and roll)
if b and isVisible(b) then return b end
end
-- Fallback: szukanie po tekscie
for _, d in ipairs(armoryMenu:GetDescendants()) do
if d:IsA("GuiButton") and isVisible(d) then
local txt = (d:IsA("TextButton") and d.Text or "")
for _, ch in ipairs(d:GetChildren()) do
if ch:IsA("TextLabel") and ch.Text then
txt = txt .. " " .. ch.Text
end
end
if txt:upper():find("UNVEIL") or txt:upper():find("BOOK") then
return d
end
end
end
return nil
end
local function _performAutoCraftPagesInternal()
setState("CRAFT: Anuluje lowienie...")
if remotes and remotes:FindFirstChild("fishing_cancel") then
pcall(function() remotes.fishing_cancel:FireServer() end)
end
task.wait(0.35)
local char = lp.Character
local hrp = char and char:FindFirstChild("HumanoidRootPart")
if not hrp then return end
disableHover()
-- 1. Teleport do NPC Magika
setState("CRAFT: Teleport do NPC Magika...")
hrp.CFrame = CFrame.new(MAGICIAN_POS, MAGICIAN_LOOK)
task.wait(0.65)
-- 2. Otworz dialog (E)
setState("CRAFT: Otwieram menu (E)...")
VirtualInputManager:SendKeyEvent(true, Enum.KeyCode.E, false, game)
task.wait(0.08)
VirtualInputManager:SendKeyEvent(false, Enum.KeyCode.E, false, game)
-- Czekaj na ArmoryMenu
setState("CRAFT: Czekam na ArmoryMenu...")
local armoryMenu = nil
local waitStart = tick()
while tick() - waitStart < 3.5 do
local am = pg:FindFirstChild("armory_menu")
if am and isVisible(am) then
local arm = am:FindFirstChild("ArmoryMenu") or am:FindFirstChild("enchant_stage", true)
if arm then
armoryMenu = am:FindFirstChild("ArmoryMenu") or am
break
end
end
task.wait(0.2)
end
if not armoryMenu then
setState("CRAFT: Brak ArmoryMenu - wracam.")
task.wait(0.8)
return
end
task.wait(0.4)
-- 3. Petla zamiany stron na ksiazki (kazda ksiazka wymaga 8 stron)
local craftIters = 0
local maxCrafts = 25 -- Ograniczenie bezpieczenstwa
while craftIters < maxCrafts do
local pagesLeft = getPageCount()
if pagesLeft < 8 then
setState(string.format("CRAFT: Pozostalo %d stron (< 8). Koniec!", pagesLeft))
break
end
craftIters = craftIters + 1
setState(string.format("CRAFT: Tworze ksiazke #%d (Stron: %d)...", craftIters, pagesLeft))
local unveilBtn = findUnveilButton(armoryMenu)
if not unveilBtn then
task.wait(0.2)
unveilBtn = findUnveilButton(armoryMenu)
end
if unveilBtn then
-- Pierwsze klikniecie: UNVEIL BOOK
clickGui(unveilBtn)
task.wait(0.3)
-- Drugie klikniecie: potwierdzenie UNVEIL BOOK
local unveilBtn2 = findUnveilButton(armoryMenu) or unveilBtn
clickGui(unveilBtn2)
task.wait(0.7)
else
setState("CRAFT: Brak przycisku Unveil Book!")
task.wait(0.4)
break
end
end
-- 4. Zamknij ArmoryMenu (klawisz Q)
setState("CRAFT: Zamykam menu (Q)...")
local closeTries = 0
while isArmoryOpen() and closeTries < 5 do
closeTries = closeTries + 1
forceCloseGUI("armory")
task.wait(0.25)
end
task.wait(0.2)
updateUIStatus()
setState("CRAFT zakonczony! Wracam do lowienia.")
task.wait(0.2)
end
local function performAutoCraftPages()
isCraftingNow = true
local ok, err = pcall(_performAutoCraftPagesInternal)
if not ok then
warn("PB_AutoFish CRAFT ERROR: " .. tostring(err))
setState("BŁĄD CRAFT: " .. tostring(err):sub(1, 35))
task.wait(1.5)
end
isCraftingNow = false
lastFishActionTime = tick() -- Reset licznika czasu lowienia po craftingu
end
-- ================= RZUT WEDKA =================
local function doCast()
local cam = Workspace.CurrentCamera
local vp = cam.ViewportSize
local midX = math.floor(vp.X / 2)
local midY = math.floor(vp.Y / 2)
setState("Ladowanie rzutu...")
VirtualInputManager:SendMouseButtonEvent(midX, midY, 0, true, game, 1)
task.wait(0.62)
VirtualInputManager:SendMouseButtonEvent(midX, midY, 0, false, game, 1)
lastFishActionTime = tick()
end
-- ================= GLOWNA PETLA (FSM) =================
local TARGET_CAST_DISTANCE = 20
local function autoFishLoop()
-- Na starcie sprawdz stan plecaka i stron
updateUIStatus()
lastFishActionTime = tick()
if autoSell then
local full = isBagFull()
if full then performAutoSell() end
end
local currentFarmedSpot = nil
while running do
task.wait(0.12)
-- Jesli trwa minigra, sprzedawanie lub crafting - nie rob nic
if inMinigame or isSellingNow or isCraftingNow then
continue
end
local char = lp.Character
local hrp = char and char:FindFirstChild("HumanoidRootPart")
if not hrp then continue end
-- 1. Sprawdz czy nasz wlasny splawik jest w wodzie
local myBob = getMyBobber(currentFarmedSpot)
local inWater = (myBob ~= nil)
if inWater then
-- Watchdog: jesli przez 30s nie zlowi zadnej ryby, uznaj ze splawik nie jest zarzucony!
local elapsedNoFish = tick() - lastFishActionTime
if elapsedNoFish > 30 then
setState("Brak brania (>30s)! Resetuje i powtarza teleport...")
bobberLbl.Text = "Wedka w wodzie: NIE (Timeout 30s - reTP)"
bobberLbl.TextColor3 = Color3.fromRGB(255, 140, 0)
-- Anuluj zarzucenie
if remotes and remotes:FindFirstChild("fishing_cancel") then
pcall(function() remotes.fishing_cancel:FireServer() end)
end
task.wait(0.4)
-- Wymus ponowne odszukanie i teleport do najlepszej strefy Luck
currentFarmedSpot = getBestFishingSpot()
if currentFarmedSpot and autoTp then
setState("Timeout - ponowny teleport do: " .. currentFarmedSpot.name)
local char2 = lp.Character
local hrp2 = char2 and char2:FindFirstChild("HumanoidRootPart")
if hrp2 then
local spotPos = currentFarmedSpot.pos
local offsetDir = Vector3.new(0, 0, 1)
local diff = hrp2.Position - spotPos
if diff.Magnitude > 2 then
offsetDir = Vector3.new(diff.X, 0, diff.Z).Unit
end
local hoverPos = spotPos + offsetDir * TARGET_CAST_DISTANCE
hoverPos = Vector3.new(hoverPos.X, spotPos.Y + 2.5, hoverPos.Z)
hrp2.CFrame = CFrame.new(hoverPos, spotPos)
enableHover(hrp2)
pcall(function()
local cam = Workspace.CurrentCamera
local camEye = hoverPos + Vector3.new(0, 3.5, 0) - offsetDir * 4.5
cam.CFrame = CFrame.new(camEye, spotPos)
end)
end
task.wait(0.3)
end
lastFishActionTime = tick()
continue
end
bobberLbl.Text = string.format("Wedka w wodzie: TAK (%ds/30s)", math.floor(elapsedNoFish))
bobberLbl.TextColor3 = Color3.fromRGB(120, 255, 120)
setState(string.format("Czekam na rybe... (%ds)", math.floor(elapsedNoFish)))
continue
else
bobberLbl.Text = "Wedka w wodzie: NIE"
bobberLbl.TextColor3 = Color3.fromRGB(255, 120, 120)
end
-- ================= PUNKT DECYZYJNY (PO WYCIAGNIECIU WEDKI) =================
-- Wędka jest zwinięta, brak minigry. Sprawdzamy czy wykonać akcje poboczne:
-- PRIORYTET 1: Wymiana Stron na Książki (Page >= 32)
if autoCraft and not isCraftingNow and not isSellingNow then
local pages = getPageCount()
if pages >= PAGE_CRAFT_THRESHOLD then
performAutoCraftPages()
currentFarmedSpot = nil
continue
end
end
-- PRIORYTET 2: Auto-Sell przy zapełnieniu plecaka >= 90%
if autoSell and not isSellingNow and not isCraftingNow then
local full = isBagFull()
if full then
performAutoSell()
currentFarmedSpot = nil
continue
end
end
-- 2. Wyszukaj i ustaw strefe z najlepszym Luckiem
if not isSpotAlive(currentFarmedSpot) then
currentFarmedSpot = getBestFishingSpot()
end
if currentFarmedSpot then
targetLbl.Text = "Cel: " .. currentFarmedSpot.name
if autoTp then
local spotPos = currentFarmedSpot.pos
local offsetDir = Vector3.new(0, 0, 1)
local diff = hrp.Position - spotPos
if diff.Magnitude > 2 then
offsetDir = Vector3.new(diff.X, 0, diff.Z).Unit
end
local hoverPos = spotPos + offsetDir * TARGET_CAST_DISTANCE
hoverPos = Vector3.new(hoverPos.X, spotPos.Y + 2.5, hoverPos.Z)
hrp.CFrame = CFrame.new(hoverPos, spotPos)
enableHover(hrp)
-- Nakieruj kamere DOKLADNIE w srodek strefy Luck w wodzie
pcall(function()
local cam = Workspace.CurrentCamera
local camEye = hoverPos + Vector3.new(0, 3.5, 0) - offsetDir * 4.5
cam.CFrame = CFrame.new(camEye, spotPos)
end)
end
end
task.wait(0.2)
-- 3. Upewnij sie, ze wedka jest wyposazona
local hasRod = char:FindFirstChild("held_fishing_rod")
if not hasRod then
local fishSlot = pg:FindFirstChild("toolbar")
and pg.toolbar:FindFirstChild("ToolbarHUD", true)
and pg.toolbar.ToolbarHUD:FindFirstChild("slot_fish", true)
if fishSlot and fishSlot:IsA("GuiButton") then
clickGui(fishSlot)
end
task.wait(0.3)
end
-- 4. Rzut wedka prosto w strefe Luck
doCast()
task.wait(1.4)
end
disableHover()
end
-- START / STOP
toggleBtn.MouseButton1Click:Connect(function()
running = not running
if running then
toggleBtn.Text = "STOP AUTOFISH"
toggleBtn.BackgroundColor3 = Color3.fromRGB(180, 40, 40)
setState("Uruchomiono")
task.spawn(autoFishLoop)
else
toggleBtn.Text = "START AUTOFISH"
toggleBtn.BackgroundColor3 = Color3.fromRGB(0, 170, 80)
setState("Zatrzymano")
disableHover()
end
end)
Review the source before using it. Executions count successful copies, capped at 10 per user and network per script in 24 hours.
Community discussion
0Start the conversation.


Your community, in one place