explore
key systems
new
docs
discord
search scripts
⌘K
explore
key systems
new
docs
discord
sign in
⌘↵
--
publishes from anywhere on this page
new paste
untitled.luau
empty
/ 512kb
open file
⌘O
explore
key systems
new
docs
sign in
ghostblox-bloxfruit-copy.lua
1312 lines · 42.1kb
/ 512kb
open file
⌘O
-- GHOSTBLOX Farm UI v2 (tabbed, compact, scrollable, manual teleport) -- Run AFTER your main script has loaded (or paste at the very bottom of it). -- RightShift = show/hide the window. local Players = game:GetService("Players") local UIS = game:GetService("UserInputService") local TweenService = game:GetService("TweenService") local RS = game:GetService("RunService") local VIM = game:GetService("VirtualInputManager") local lp = Players.LocalPlayer -- ===== parent + remove old copy ===== local parent do local ok, h = pcall(function() return gethui and gethui() end) if ok and h then parent = h end if not parent then local ok2 = pcall(function() local t = Instance.new("Folder", game:GetService("CoreGui")) t:Destroy() end) parent = ok2 and game:GetService("CoreGui") or lp:WaitForChild("PlayerGui") end end for _, p in ipairs({ parent, lp:WaitForChild("PlayerGui") }) do if p:FindFirstChild("FarmUI") then p.FarmUI:Destroy() end end -- ===== defaults ===== _G.ChooseWP = _G.ChooseWP or "Melee" getgenv().TweenSpeedFar = getgenv().TweenSpeedFar or 150 getgenv().TweenSpeedNear = getgenv().TweenSpeedNear or 180 _B = _B == nil and true or _B local state = { AutoFarm = false, TPEvery = true, AutoQuest = true, Bring = true, NPCMode = "Tween", MobMode = "Tween", ManualMode = "Tween", -- used by the Teleport tab } local function applyFarm() _G.AutoFarmNear = false _G.Level = (state.AutoFarm and not state.TPEvery) and true or false end -- ===== UI helpers ===== local theme = { bg = Color3.fromRGB(24, 24, 30), panel = Color3.fromRGB(34, 34, 44), accent = Color3.fromRGB(0, 200, 255), text = Color3.fromRGB(235, 235, 240), off = Color3.fromRGB(60, 60, 74), dim = Color3.fromRGB(150, 160, 180), } local function corner(o, r) local c = Instance.new("UICorner", o) c.CornerRadius = UDim.new(0, r or 8) return c end local WIN_W, WIN_H = 250, 320 local TOP_H, TAB_H, FOOT_H = 30, 26, 20 local gui = Instance.new("ScreenGui") gui.Name = "FarmUI" gui.ResetOnSpawn = false gui.Parent = parent local main = Instance.new("Frame", gui) main.Size = UDim2.fromOffset(WIN_W, WIN_H) main.Position = UDim2.new(0, 30, 0.5, -WIN_H / 2) main.BackgroundColor3 = theme.bg main.BorderSizePixel = 0 main.ClipsDescendants = true corner(main, 10) main.Visible = false local mainScale = Instance.new("UIScale", main) do local st = Instance.new("UIStroke", main) st.Thickness = 1.5 st.Color = theme.accent st.Transparency = 0.3 local g = Instance.new("UIGradient", main) g.Rotation = 90 g.Color = ColorSequence.new(Color3.fromRGB(28, 30, 48), Color3.fromRGB(12, 14, 26)) end -- title bar local top = Instance.new("Frame", main) top.Size = UDim2.new(1, 0, 0, TOP_H) top.BackgroundColor3 = theme.panel top.BorderSizePixel = 0 corner(top, 10) local title = Instance.new("TextLabel", top) title.Size = UDim2.new(1, -70, 1, 0) title.Position = UDim2.fromOffset(10, 0) title.BackgroundTransparency = 1 title.Text = "GHOSTBLOX SCRIPT" title.Font = Enum.Font.GothamBlack title.TextSize = 12 title.TextColor3 = theme.text title.TextXAlignment = Enum.TextXAlignment.Left do local g = Instance.new("UIGradient", title) g.Color = ColorSequence.new({ ColorSequenceKeypoint.new(0, Color3.fromRGB(0, 230, 255)), ColorSequenceKeypoint.new(0.5, Color3.fromRGB(150, 110, 255)), ColorSequenceKeypoint.new(1, Color3.fromRGB(0, 230, 255)), }) task.spawn(function() local r = 0 while title.Parent do r = (r + 2) % 360 g.Rotation = r task.wait(0.04) end end) end local function topBtn(txt, x) local b = Instance.new("TextButton", top) b.Size = UDim2.fromOffset(22, 20) b.Position = UDim2.new(1, x, 0.5, -10) b.BackgroundColor3 = theme.off b.Text = txt b.Font = Enum.Font.GothamBold b.TextSize = 12 b.TextColor3 = theme.text corner(b, 6) return b end local minBtn = topBtn("-", -52) local closeBtn = topBtn("X", -26) -- everything below the title bar lives in `content` (hidden when minimized) local content = Instance.new("Frame", main) content.Position = UDim2.fromOffset(0, TOP_H) content.Size = UDim2.new(1, 0, 1, -TOP_H) content.BackgroundTransparency = 1 -- tab bar local tabBar = Instance.new("Frame", content) tabBar.Size = UDim2.new(1, -12, 0, TAB_H) tabBar.Position = UDim2.fromOffset(6, 4) tabBar.BackgroundTransparency = 1 do local l = Instance.new("UIListLayout", tabBar) l.FillDirection = Enum.FillDirection.Horizontal l.Padding = UDim.new(0, 4) end -- pages area local pages = Instance.new("Frame", content) pages.Position = UDim2.fromOffset(0, TAB_H + 8) pages.Size = UDim2.new(1, 0, 1, -(TAB_H + 8 + FOOT_H)) pages.BackgroundTransparency = 1 -- status footer (always visible) local status = Instance.new("TextLabel", content) status.Size = UDim2.new(1, -12, 0, FOOT_H) status.Position = UDim2.new(0, 6, 1, -FOOT_H) status.BackgroundTransparency = 1 status.Font = Enum.Font.Gotham status.TextSize = 11 status.TextColor3 = theme.accent status.TextXAlignment = Enum.TextXAlignment.Left status.TextTruncate = Enum.TextTruncate.AtEnd status.Text = "Idle" -- ===== tabs ===== local tabs, pageFrames = {}, {} local P -- page currently being built; widget helpers parent into it local function selectTab(name) for n, b in pairs(tabs) do local on = n == name TweenService:Create(b, TweenInfo.new(0.12), { BackgroundColor3 = on and theme.accent or theme.off, TextColor3 = on and Color3.fromRGB(10, 14, 24) or theme.text, }):Play() pageFrames[n].Visible = on end end local tabCount = 4 local function newPage(name) local b = Instance.new("TextButton", tabBar) b.Size = UDim2.new(1 / tabCount, -4 + 4 / tabCount, 1, 0) b.BackgroundColor3 = theme.off b.Text = name b.Font = Enum.Font.GothamBold b.TextSize = 11 b.TextColor3 = theme.text b.AutoButtonColor = false corner(b, 6) tabs[name] = b local sf = Instance.new("ScrollingFrame", pages) sf.Size = UDim2.fromScale(1, 1) sf.BackgroundTransparency = 1 sf.BorderSizePixel = 0 sf.ScrollBarThickness = 6 -- thicker bar = easy to grab sf.ScrollBarImageColor3 = theme.accent sf.ScrollBarImageTransparency = 0.2 sf.ScrollingDirection = Enum.ScrollingDirection.Y sf.ElasticBehavior = Enum.ElasticBehavior.Never sf.CanvasSize = UDim2.new() sf.AutomaticCanvasSize = Enum.AutomaticSize.Y sf.Visible = false local l = Instance.new("UIListLayout", sf) l.Padding = UDim.new(0, 5) l.HorizontalAlignment = Enum.HorizontalAlignment.Center l.SortOrder = Enum.SortOrder.LayoutOrder local pd = Instance.new("UIPadding", sf) pd.PaddingTop = UDim.new(0, 2) pd.PaddingBottom = UDim.new(0, 8) pd.PaddingRight = UDim.new(0, 4) pageFrames[name] = sf b.MouseButton1Click:Connect(function() selectTab(name) end) P = sf return sf end local ROW_H = 30 local function header(text) local l = Instance.new("TextLabel", P) l.Size = UDim2.new(1, -16, 0, 16) l.BackgroundTransparency = 1 l.Font = Enum.Font.GothamBold l.TextSize = 11 l.TextColor3 = theme.dim l.TextXAlignment = Enum.TextXAlignment.Left l.Text = string.upper(text) return l end local function toggle(text, default, callback) local row = Instance.new("TextButton", P) row.Size = UDim2.new(1, -16, 0, ROW_H) row.BackgroundColor3 = theme.panel row.Text = "" row.AutoButtonColor = false corner(row, 7) local lbl = Instance.new("TextLabel", row) lbl.Size = UDim2.new(1, -56, 1, 0) lbl.Position = UDim2.fromOffset(10, 0) lbl.BackgroundTransparency = 1 lbl.Text = text lbl.Font = Enum.Font.Gotham lbl.TextSize = 12 lbl.TextColor3 = theme.text lbl.TextXAlignment = Enum.TextXAlignment.Left local pill = Instance.new("Frame", row) pill.Size = UDim2.fromOffset(34, 18) pill.Position = UDim2.new(1, -42, 0.5, -9) pill.BackgroundColor3 = theme.off corner(pill, 9) local knob = Instance.new("Frame", pill) knob.Size = UDim2.fromOffset(14, 14) knob.Position = UDim2.fromOffset(2, 2) knob.BackgroundColor3 = Color3.new(1, 1, 1) corner(knob, 7) local on = default local function render() TweenService:Create(pill, TweenInfo.new(0.15), { BackgroundColor3 = on and theme.accent or theme.off }):Play() TweenService:Create(knob, TweenInfo.new(0.15), { Position = on and UDim2.fromOffset(18, 2) or UDim2.fromOffset(2, 2) }):Play() end render() row.MouseButton1Click:Connect(function() on = not on render() callback(on) end) callback(on) end local function cycle(text, options, default, callback) local row = Instance.new("TextButton", P) row.Size = UDim2.new(1, -16, 0, ROW_H) row.BackgroundColor3 = theme.panel row.AutoButtonColor = false row.Font = Enum.Font.Gotham row.TextSize = 12 row.TextColor3 = theme.text corner(row, 7) local i = table.find(options, default) or 1 local function render() row.Text = text .. ": " .. options[i] end render() row.MouseButton1Click:Connect(function() i = i % #options + 1 render() callback(options[i]) end) end local function button(text, callback, color) local row = Instance.new("TextButton", P) row.Size = UDim2.new(1, -16, 0, ROW_H - 2) row.BackgroundColor3 = color or theme.panel row.Font = Enum.Font.GothamBold row.TextSize = 12 row.TextColor3 = theme.text row.Text = text corner(row, 7) row.MouseButton1Click:Connect(callback) return row end local function slider(text, min, max, default, callback) local row = Instance.new("Frame", P) row.Size = UDim2.new(1, -16, 0, 42) row.BackgroundColor3 = theme.panel corner(row, 7) local lbl = Instance.new("TextLabel", row) lbl.Size = UDim2.new(1, -20, 0, 18) lbl.Position = UDim2.fromOffset(10, 3) lbl.BackgroundTransparency = 1 lbl.Font = Enum.Font.Gotham lbl.TextSize = 12 lbl.TextColor3 = theme.text lbl.TextXAlignment = Enum.TextXAlignment.Left local bar = Instance.new("Frame", row) bar.Size = UDim2.new(1, -20, 0, 6) bar.Position = UDim2.new(0, 10, 0, 28) bar.BackgroundColor3 = theme.off corner(bar, 3) local fill = Instance.new("Frame", bar) fill.BackgroundColor3 = theme.accent fill.Size = UDim2.new(0, 0, 1, 0) corner(fill, 3) local function set(v) local value = math.clamp(math.floor(v), min, max) fill.Size = UDim2.new((value - min) / (max - min), 0, 1, 0) lbl.Text = text .. ": " .. value callback(value) end set(default) local dragging = false local function fromX(x) set(min + (max - min) * math.clamp((x - bar.AbsolutePosition.X) / bar.AbsoluteSize.X, 0, 1)) end bar.InputBegan:Connect(function(inp) if inp.UserInputType == Enum.UserInputType.MouseButton1 or inp.UserInputType == Enum.UserInputType.Touch then dragging = true fromX(inp.Position.X) end end) UIS.InputChanged:Connect(function(inp) if dragging and (inp.UserInputType == Enum.UserInputType.MouseMovement or inp.UserInputType == Enum.UserInputType.Touch) then fromX(inp.Position.X) end end) UIS.InputEnded:Connect(function(inp) if inp.UserInputType == Enum.UserInputType.MouseButton1 or inp.UserInputType == Enum.UserInputType.Touch then dragging = false end end) end -- hooks filled in further down (teleport logic needs functions defined later in the file) local hooks = {} -- ===== TAB 1: FARM ===== newPage("Farm") header("Auto farm") toggle("Auto Farm", false, function(v) state.AutoFarm = v applyFarm() end) toggle("TP to Every Monster", true, function(v) state.TPEvery = v applyFarm() end) toggle("Auto Quest", true, function(v) state.AutoQuest = v end) toggle("Bring Mobs", true, function(v) state.Bring = v _B = v end) header("Combat") cycle("Weapon", { "Melee", "Sword", "Gun", "Blox Fruit" }, _G.ChooseWP, function(v) _G.ChooseWP = v end) toggle("Auto Buso Haki", false, function(v) Boud = v end) toggle("Safe Mode (low HP)", false, function(v) _G.Safemode = v end) -- ===== TAB 2: TRAVEL (how the farm moves) ===== newPage("Travel") header("Farm movement") cycle("NPC Travel", { "Tween", "Instant" }, "Tween", function(v) state.NPCMode = v end) cycle("Mob Travel", { "Tween", "Instant" }, "Tween", function(v) state.MobMode = v end) header("Tween speed") slider("Far", 50, 350, getgenv().TweenSpeedFar, function(v) getgenv().TweenSpeedFar = v end) slider("Near", 50, 350, getgenv().TweenSpeedNear, function(v) getgenv().TweenSpeedNear = v end) -- ===== TAB 3: TELEPORT (manual) ===== newPage("Teleport") header("Manual teleport") cycle("Teleport Mode", { "Tween", "Instant" }, "Tween", function(v) state.ManualMode = v end) button("Stop moving", function() if hooks.stop then hooks.stop() end end, Color3.fromRGB(120, 50, 60)) header("Monsters (tap to go)") button("Refresh monster list", function() if hooks.refreshMobs then hooks.refreshMobs() end end, Color3.fromRGB(40, 90, 120)) local mobListAnchor = Instance.new("Frame", P) -- marker so items sort after the buttons mobListAnchor.Size = UDim2.fromOffset(1, 1) mobListAnchor.BackgroundTransparency = 1 mobListAnchor.Name = "MobAnchor" local mobPage = P header("Quest NPCs (tap to go)") local npcPage = P hooks.mobPage, hooks.npcPage = mobPage, npcPage -- ===== TAB 4: MISC ===== newPage("Misc") header("Player") toggle("No Clip", false, function(v) getgenv().NoClip = v end) header("Window") button("Reset window position", function() main.Position = UDim2.new(0, 30, 0.5, -WIN_H / 2) end) button("Destroy UI", function() state.AutoFarm = false applyFarm() gui:Destroy() end, Color3.fromRGB(120, 50, 60)) selectTab("Farm") -- ===== window behaviour ===== local minimized = false minBtn.MouseButton1Click:Connect(function() minimized = not minimized content.Visible = not minimized main.Size = minimized and UDim2.fromOffset(WIN_W, TOP_H) or UDim2.fromOffset(WIN_W, WIN_H) end) closeBtn.MouseButton1Click:Connect(function() state.AutoFarm = false applyFarm() gui:Destroy() end) do local dragging, startPos, startInput top.InputBegan:Connect(function(inp) if inp.UserInputType == Enum.UserInputType.MouseButton1 or inp.UserInputType == Enum.UserInputType.Touch then dragging = true startInput = inp.Position startPos = main.Position end end) UIS.InputChanged:Connect(function(inp) if dragging and (inp.UserInputType == Enum.UserInputType.MouseMovement or inp.UserInputType == Enum.UserInputType.Touch) then local d = inp.Position - startInput main.Position = UDim2.new(startPos.X.Scale, startPos.X.Offset + d.X, startPos.Y.Scale, startPos.Y.Offset + d.Y) end end) UIS.InputEnded:Connect(function(inp) if inp.UserInputType == Enum.UserInputType.MouseButton1 or inp.UserInputType == Enum.UserInputType.Touch then dragging = false end end) end UIS.InputBegan:Connect(function(inp, gp) if not gp and inp.KeyCode == Enum.KeyCode.RightShift then main.Visible = not main.Visible end end) -- ===================== FARM CORE ===================== local moveTarget, moveInstant = nil, false local function getChar() local c = lp.Character local h = c and c:FindFirstChildOfClass("Humanoid") local r = c and c:FindFirstChild("HumanoidRootPart") if h and r and h.Health > 0 then return c, h, r end end local function aliveRoot(m) local h = m:FindFirstChildOfClass("Humanoid") local r = m:FindFirstChild("HumanoidRootPart") if h and r and h.Health > 0 then return r end end local function nearestMob(root, filter) local best, bd for _, m in ipairs(workspace.Enemies:GetChildren()) do local r = aliveRoot(m) if r and (not filter or string.find(m.Name, filter, 1, true)) then local d = (r.Position - root.Position).Magnitude if not bd or d < bd then best, bd = m, d end end end return best end local function equip(h) local c = lp.Character local tool = c and c:FindFirstChildOfClass("Tool") if tool and tool.ToolTip == _G.ChooseWP then return end for _, t in ipairs(lp.Backpack:GetChildren()) do if t:IsA("Tool") and t.ToolTip == _G.ChooseWP then h:EquipTool(t) return end end if not tool then local any = lp.Backpack:FindFirstChildOfClass("Tool") if any then h:EquipTool(any) end end end local function active() return state.AutoFarm and state.TPEvery end -- farm mover RS.Heartbeat:Connect(function(dt) local c, h, r = getChar() if not r then return end local clip = r:FindFirstChild("FarmClip") if not active() then if clip then clip:Destroy() end return end if not clip then clip = Instance.new("BodyVelocity") clip.Name = "FarmClip" clip.MaxForce = Vector3.new(1e6, 1e6, 1e6) clip.Parent = r end clip.Velocity = Vector3.zero for _, p in ipairs(c:GetDescendants()) do if p:IsA("BasePart") then p.CanCollide = false end end if moveTarget then if moveInstant then r.CFrame = moveTarget return end local diff = moveTarget.Position - r.Position local dist = diff.Magnitude local speed = dist > 25 and getgenv().TweenSpeedFar or getgenv().TweenSpeedNear local step = speed * dt if dist <= step then r.CFrame = moveTarget else r.CFrame = CFrame.new(r.Position + diff.Unit * step) * (moveTarget - moveTarget.Position) end end end) -- No Clip toggle (Misc tab) - works even when not farming RS.Stepped:Connect(function() if getgenv().NoClip and not active() then local c = lp.Character if c then for _, p in ipairs(c:GetDescendants()) do if p:IsA("BasePart") then p.CanCollide = false end end end end end) -- ===================== ATTACK AURA ===================== local AURA_RANGE = 60 local RepStorage = game:GetService("ReplicatedStorage") local Net = RepStorage:WaitForChild("Modules"):WaitForChild("Net") local RegisterAttack = Net:WaitForChild("RE/RegisterAttack") local RegisterHit = Net:WaitForChild("RE/RegisterHit") local idRemote, idAttr local function scanId() for _, f in ipairs({ RepStorage.Util, RepStorage.Common, RepStorage.Remotes, RepStorage.Assets, RepStorage.FX }) do for _, ch in ipairs(f:GetChildren()) do if ch:IsA("RemoteEvent") and ch:GetAttribute("Id") then idRemote, idAttr = ch, ch:GetAttribute("Id") end end f.ChildAdded:Connect(function(ch) if ch:IsA("RemoteEvent") and ch:GetAttribute("Id") then idRemote, idAttr = ch, ch:GetAttribute("Id") end end) end end pcall(scanId) local function auraTargets(root) local list, firstHead = {}, nil for _, m in ipairs(workspace.Enemies:GetChildren()) do local r = aliveRoot(m) if r and (r.Position - root.Position).Magnitude <= AURA_RANGE then firstHead = firstHead or m:FindFirstChild("Head") or r for _, p in ipairs(m:GetChildren()) do if p:IsA("BasePart") then table.insert(list, { m, p }) end end end end return list, firstHead end local function aura() local c, h, r = getChar() if not r or not c:FindFirstChildOfClass("Tool") then return end local targets, head = auraTargets(r) if #targets == 0 or not head then return end RegisterAttack:FireServer(2e-9) RegisterHit:FireServer(head, targets) pcall(function() local seed = Net.seed:InvokeServer() RegisterAttack:FireServer() RegisterHit:FireServer(head, targets, {}) if idRemote and seed then local k = math.floor(workspace:GetServerTimeNow() / 10 % 10) + 1 local enc = string.gsub("RE/RegisterHit", ".", function(ch) return string.char(bit32.bxor(string.byte(ch), k)) end) local sig = bit32.bxor(idAttr + 909090, seed * 2) cloneref(idRemote):FireServer(enc, sig, head, targets) end end) end task.spawn(function() while gui.Parent do task.wait(0.05) if active() then pcall(aura) end end end) -- ===================== BRING MOBS ===================== local curTarget = nil local lastSim = 0 RS.Heartbeat:Connect(function() if not (active() and state.Bring) or not curTarget or not curTarget.Parent then return end local tr = curTarget:FindFirstChild("HumanoidRootPart") if not tr then return end local _, _, me = getChar() if not me then return end if os.clock() - lastSim > 1 then lastSim = os.clock() pcall(function() if sethiddenproperty then sethiddenproperty(lp, "SimulationRadius", math.huge) end end) end local center = tr.CFrame for _, m in ipairs(workspace.Enemies:GetChildren()) do if m ~= curTarget and m.Name == curTarget.Name then local hum = m:FindFirstChildOfClass("Humanoid") local r = m:FindFirstChild("HumanoidRootPart") if hum and r and hum.Health > 0 and (r.Position - me.Position).Magnitude <= 400 then pcall(function() r.CanCollide = false hum.WalkSpeed = 0 hum.JumpPower = 0 if not r:FindFirstChild("BringVel") then local bv = Instance.new("BodyVelocity") bv.Name = "BringVel" bv.MaxForce = Vector3.new(1e6, 1e6, 1e6) bv.Velocity = Vector3.zero bv.Parent = r end r.CFrame = center end) end end end end) -- ===================== AUTO QUEST ===================== local QUEST_NPC = { -- Sea 1 BanditQuest1 = CFrame.new(1059.37, 15.45, 1550.42), JungleQuest = CFrame.new(-1598.09, 35.55, 153.38), BuggyQuest1 = CFrame.new(-1141.07, 4.10, 3831.55), DesertQuest = CFrame.new(894.49, 5.14, 4392.43), SnowQuest = CFrame.new(1389.74, 88.15, -1298.91), MarineQuest2 = CFrame.new(-5039.59, 24.20, 4324.68), SkyQuest = CFrame.new(-4839.53, 716.37, -2619.44), PrisonerQuest = CFrame.new(5308.93, 1.66, 475.12), ColosseumQuest = CFrame.new(-1580.05, 6.35, -2986.47), MagmaQuest = CFrame.new(-5313.37, 10.95, 8515.29), FishmanQuest = CFrame.new(61122.65, 18.49, 1569.39), SkyExp1Quest = CFrame.new(-4721.88, 843.87, -1949.97), SkyExp2Quest = CFrame.new(-7906.82, 5634.66, -1411.99), FountainQuest = CFrame.new(5254.60, 38.50, 4049.21), -- Sea 2 Area1Quest = CFrame.new(-429.54, 71.76, 1836.18), Area2Quest = CFrame.new(638.43, 71.77, 918.28), MarineQuest3 = CFrame.new(-2440.79, 71.71, -3216.06), ZombieQuest = CFrame.new(-5497.06, 47.59, -795.23), SnowMountainQuest = CFrame.new(609.86, 400.12, -5372.26), IceSideQuest = CFrame.new(-6064.07, 15.24, -4902.98), FireSideQuest = CFrame.new(-5428.03, 15.06, -5299.43), ShipQuest1 = CFrame.new(1037.80, 125.09, 32911.60), ShipQuest2 = CFrame.new(968.80, 125.09, 33244.12), FrostQuest = CFrame.new(5667.66, 26.80, -6486.09), ForgottenQuest = CFrame.new(-3054.44, 235.54, -10142.82), -- Sea 3 PiratePortQuest = CFrame.new(-289.62, 43.82, 5579.94), AmazonQuest = CFrame.new(5832.84, 51.68, -1101.52), AmazonQuest2 = CFrame.new(5445.04, 601.62, 751.74), MarineTreeIsland = CFrame.new(2180.54, 27.82, -6741.55), DeepForestIsland3 = CFrame.new(-10581.66, 330.87, -8761.19), DeepForestIsland = CFrame.new(-13234.04, 331.49, -7625.40), DeepForestIsland2 = CFrame.new(-12680.38, 389.97, -9902.02), HauntedQuest1 = CFrame.new(-9479.22, 141.22, 5566.09), HauntedQuest2 = CFrame.new(-9516.99, 172.02, 6078.47), NutsIslandQuest = CFrame.new(-2104.39, 38.10, -10194.22), IceCreamIslandQuest = CFrame.new(-820.65, 65.82, -10965.80), CakeQuest1 = CFrame.new(-2021.32, 37.80, -12028.73), CakeQuest2 = CFrame.new(-1927.92, 37.80, -12842.54), ChocQuest1 = CFrame.new(233.23, 29.88, -12201.23), CandyQuest1 = CFrame.new(-1150.04, 20.38, -14446.33), TikiQuest1 = CFrame.new(-16548.82, 55.69, -179.11), TikiQuest2 = CFrame.new(-16541.02, 54.77, 1051.46), } local RepS = game:GetService("ReplicatedStorage") local CommF = RepS:WaitForChild("Remotes"):WaitForChild("CommF_") local QuestsMod = nil pcall(function() QuestsMod = require(RepS:WaitForChild("Quests", 10)) end) local function seaNumber() local id = game.PlaceId if id == 2753915549 or id == 85211729168715 then return 1 end if id == 4442272183 or id == 79091703265657 then return 2 end return 3 end local EXCLUDED = { MarineQuest = true, BartiloQuest = true, CitizenQuest = true, Trainees = true } local function getQuest() local lvl = lp.Data.Level.Value local sea = seaNumber() if lvl >= 700 and sea == 1 then return { Mob = "Galley Captain", NameQuest = "FountainQuest", ID = 2 } end if lvl >= 1500 and sea == 2 then return { Mob = "Water Fighter", NameQuest = "ForgottenQuest", ID = 2 } end if QuestsMod then local best, bl = nil, 0 for name, quest in pairs(QuestsMod) do if not EXCLUDED[name] then for id, v in pairs(quest) do local req = v.LevelReq if req and req <= lvl and bl <= req and type(v.Task) == "table" then for mob, cnt in pairs(v.Task) do if cnt > 1 then best = { Mob = mob, NameQuest = name, ID = id } bl = req end end end end end end if best then return best end end if GetQuests then local q = GetQuests() if q and q.Mob then return q end end end local function questActive() local pg = lp:FindFirstChild("PlayerGui") if not pg then return false end local mainGui = pg:FindFirstChild("Main") local q = mainGui and mainGui:FindFirstChild("Quest") if q and q.Visible then return true end local tr = pg:FindFirstChild("TrackedQuestFrame") if tr and tr.Enabled then local f = tr:FindFirstChild("Frame") if f and f.Visible then return true end end return false end local current = nil local failUntil = 0 local function findNpcNearMob(mob) local spawns = workspace:FindFirstChild("_WorldOrigin") and workspace._WorldOrigin:FindFirstChild("EnemySpawns") local sp if spawns then for _, x in ipairs(spawns:GetChildren()) do if string.find(x.Name, mob, 1, true) then sp = x break end end end if not sp then return nil end local best, bd for _, folder in ipairs({ workspace:FindFirstChild("NPCs"), RepS:FindFirstChild("NPCs") }) do if folder then for _, npc in ipairs(folder:GetChildren()) do local hrp = npc:FindFirstChild("HumanoidRootPart") if hrp then local d = (hrp.Position - sp.Position).Magnitude if not bd or d < bd then best, bd = hrp.CFrame, d end end end end end return best end local function flyTo(pt, label, timeout) local t0 = tick() while active() and tick() - t0 < (timeout or 120) do local _, _, r = getChar() if not r then return false end moveInstant = state.NPCMode == "Instant" moveTarget = pt status.Text = label if (r.Position - pt.Position).Magnitude <= 6 then return true end task.wait(0.1) end return false end local function doQuest() local q = getQuest() if not q or not q.Mob then status.Text = "Auto Quest: no quest for your level" return nil, false end if questActive() then if current and current.name == q.NameQuest and current.id == q.ID then return q.Mob, true end if not current then local txt = (QuestText and QuestText() or ""):lower() if txt:find(q.Mob:lower(), 1, true) then current = { name = q.NameQuest, id = q.ID } return q.Mob, true end end pcall(function() CommF:InvokeServer("AbandonQuest") end) current = nil task.wait(0.5) else current = nil end if tick() < failUntil then return q.Mob, false end local pt = QUEST_NPC[q.NameQuest] or (GetQuestPoint and GetQuestPoint()) or findNpcNearMob(q.Mob) if not pt then status.Text = "Quest NPC not found: " .. tostring(q.NameQuest) failUntil = tick() + 20 return q.Mob, false end for attempt = 1, 3 do if not active() then return nil, false end if not flyTo(pt, "To quest NPC: " .. q.NameQuest) then break end task.wait(0.6) status.Text = "Accepting quest: " .. q.Mob .. " (try " .. attempt .. ")" pcall(function() CommF:InvokeServer("StartQuest", q.NameQuest, q.ID) end) local t0 = tick() while tick() - t0 < 2 and not questActive() do task.wait(0.1) end if questActive() then current = { name = q.NameQuest, id = q.ID } return q.Mob, true end end status.Text = "Could not accept " .. q.NameQuest .. " - farming anyway" failUntil = tick() + 30 return q.Mob, false end local function findMobSpawn(name) for _, m in ipairs(RepS:GetChildren()) do if m:IsA("Model") and string.find(m.Name, name, 1, true) then local r = m:FindFirstChild("HumanoidRootPart") if r then return CFrame.new(r.Position + Vector3.new(0, 20, 0)), "replicated " .. m.Name end end end local spawns = workspace:FindFirstChild("_WorldOrigin") and workspace._WorldOrigin:FindFirstChild("EnemySpawns") if spawns then local best, bn local _, _, r = getChar() for _, x in ipairs(spawns:GetChildren()) do if string.find(x.Name, name, 1, true) then if not best or (r and (x.Position - r.Position).Magnitude < (best.Position - r.Position).Magnitude) then best, bn = x, x.Name end end end if best then return CFrame.new(best.Position + Vector3.new(0, 20, 0)), bn end end end local spawnIdx = 1 task.spawn(function() while gui.Parent do task.wait(0.1) if not active() then moveTarget = nil else local ok, err = pcall(function() local c, h, r = getChar() if not r then status.Text = "Waiting for respawn..." return end if Boud and not c:FindFirstChild("HasBuso") then pcall(function() CommF:InvokeServer("Buso") end) end equip(h) local filter, questOn = nil, false if state.AutoQuest then filter, questOn = doQuest() end local _, _, r2 = getChar() if not r2 then return end r = r2 local mob = nearestMob(r, filter) if mob then local t0 = tick() local goneSince while active() and mob.Parent and aliveRoot(mob) and tick() - t0 < 40 do local _, h2, rr = getChar() if not rr then break end if questOn and state.AutoQuest then if questActive() then goneSince = nil else goneSince = goneSince or tick() if tick() - goneSince > 1.2 then break end end end local mr = mob.HumanoidRootPart moveInstant = state.MobMode == "Instant" curTarget = mob moveTarget = CFrame.new(mr.Position + Vector3.new(0, 10, 0), mr.Position) status.Text = "Farming -> " .. mob.Name equip(h2) if _G.ChooseWP == "Gun" or _G.ChooseWP == "Blox Fruit" then pcall(function() VIM:SendMouseButtonEvent(0, 0, 0, true, game, 1) VIM:SendMouseButtonEvent(0, 0, 0, false, game, 1) end) end task.wait() end curTarget = nil else local target, label = nil, nil if filter then target, label = findMobSpawn(filter) end if target then status.Text = "Flying to " .. filter .. " spawn" local t0 = tick() while active() and tick() - t0 < 6 and not nearestMob(r, filter) do moveInstant = state.MobMode == "Instant" moveTarget = target task.wait(0.2) end else local spawns = workspace:FindFirstChild("_WorldOrigin") and workspace._WorldOrigin:FindFirstChild("EnemySpawns") local list = spawns and spawns:GetChildren() or {} if #list > 0 then spawnIdx = spawnIdx % #list + 1 local sp = list[spawnIdx] moveInstant = state.MobMode == "Instant" moveTarget = CFrame.new(sp.Position + Vector3.new(0, 20, 0)) status.Text = "Searching: " .. sp.Name local t0 = tick() while active() and tick() - t0 < 4 and not nearestMob(r, filter) do task.wait(0.2) end else status.Text = "No monsters found" end end end end) if not ok then status.Text = "Err: " .. tostring(err):sub(1, 60) end end end end) -- when farming is off, show Idle (unless a manual teleport is running) task.spawn(function() while gui.Parent do task.wait(0.5) if not active() and not hooks.busy and status.Text ~= "Idle" and not tostring(status.Text):find("^Arrived") then status.Text = "Idle" end end end) -- ===================== MANUAL TELEPORT (Teleport tab) ===================== local manualTarget, manualInstant, manualLabel = nil, false, "" function hooks.stop() manualTarget = nil hooks.busy = false status.Text = "Stopped" end local function manualGo(cf, label) if active() then status.Text = "Turn off Auto Farm first" return end if not getChar() then status.Text = "Waiting for respawn..." return end manualTarget = cf manualInstant = state.ManualMode == "Instant" manualLabel = label hooks.busy = true status.Text = (manualInstant and "Teleporting -> " or "Tweening -> ") .. label end RS.Heartbeat:Connect(function(dt) local c, h, r = getChar() if not r then return end local clip = r:FindFirstChild("ManualClip") if not manualTarget or active() then if clip then clip:Destroy() end if manualTarget and active() then manualTarget = nil hooks.busy = false end return end if not clip then clip = Instance.new("BodyVelocity") clip.Name = "ManualClip" clip.MaxForce = Vector3.new(1e6, 1e6, 1e6) clip.Parent = r end clip.Velocity = Vector3.zero for _, p in ipairs(c:GetDescendants()) do if p:IsA("BasePart") then p.CanCollide = false end end if manualInstant then r.CFrame = manualTarget manualTarget = nil hooks.busy = false status.Text = "Arrived: " .. manualLabel return end local diff = manualTarget.Position - r.Position local dist = diff.Magnitude local speed = dist > 25 and getgenv().TweenSpeedFar or getgenv().TweenSpeedNear local step = speed * dt if dist <= step then r.CFrame = manualTarget manualTarget = nil hooks.busy = false status.Text = "Arrived: " .. manualLabel else r.CFrame = CFrame.new(r.Position + diff.Unit * step) * (manualTarget - manualTarget.Position) end end) -- monster list: every distinct monster name currently loaded + spawn names local function listButton(pageFrame, text, callback) local row = Instance.new("TextButton", pageFrame) row.Name = "ListItem" row.Size = UDim2.new(1, -16, 0, 26) row.BackgroundColor3 = theme.panel row.Font = Enum.Font.Gotham row.TextSize = 12 row.TextColor3 = theme.text row.Text = text row.TextTruncate = Enum.TextTruncate.AtEnd corner(row, 6) row.MouseButton1Click:Connect(callback) return row end local mobItems = {} function hooks.refreshMobs() for _, b in ipairs(mobItems) do b:Destroy() end mobItems = {} local seen, names = {}, {} for _, m in ipairs(workspace.Enemies:GetChildren()) do if aliveRoot(m) and not seen[m.Name] then seen[m.Name] = true table.insert(names, m.Name) end end local spawns = workspace:FindFirstChild("_WorldOrigin") and workspace._WorldOrigin:FindFirstChild("EnemySpawns") if spawns then for _, x in ipairs(spawns:GetChildren()) do local n = x.Name:gsub("%s*%[?Lv%.?%s*%d+%]?", ""):gsub("%d+$", "") n = n:gsub("^%s+", ""):gsub("%s+$", "") if n ~= "" and not seen[n] then seen[n] = true table.insert(names, n) end end end table.sort(names) for i, name in ipairs(names) do local b = listButton(hooks.mobPage, name, function() local _, _, r = getChar() local mob = r and nearestMob(r, name) if mob then local mr = mob.HumanoidRootPart manualGo(CFrame.new(mr.Position + Vector3.new(0, 10, 0), mr.Position), name) else local cf = findMobSpawn(name) if cf then manualGo(cf, name .. " spawn") else status.Text = "Can't locate " .. name end end end) b.LayoutOrder = 100 + i table.insert(mobItems, b) end if #names == 0 then status.Text = "No monsters found here" end end -- NPC list (built once, sorted) do local keys = {} for k in pairs(QUEST_NPC) do table.insert(keys, k) end table.sort(keys) for i, k in ipairs(keys) do local b = listButton(hooks.npcPage, k, function() manualGo(QUEST_NPC[k], k) end) b.LayoutOrder = 1000 + i end end -- keep section order: header/buttons first, then mob items, then NPC header + NPCs do local order = 0 for _, ch in ipairs(hooks.mobPage:GetChildren()) do if ch:IsA("TextLabel") and ch.Text == "QUEST NPCS (TAP TO GO)" then ch.LayoutOrder = 999 end end end pcall(hooks.refreshMobs) -- ===================== LOADING SCREEN ===================== task.spawn(function() local Lighting = game:GetService("Lighting") local blur = Instance.new("BlurEffect") blur.Size = 0 blur.Parent = Lighting TweenService:Create(blur, TweenInfo.new(0.6), { Size = 22 }):Play() local lg = Instance.new("ScreenGui") lg.Name = "FarmUILoading" lg.IgnoreGuiInset = true lg.ResetOnSpawn = false lg.DisplayOrder = 999 lg.Parent = parent local root = Instance.new("CanvasGroup", lg) root.Size = UDim2.fromScale(1, 1) root.BackgroundColor3 = Color3.fromRGB(6, 10, 24) root.BorderSizePixel = 0 local bgGrad = Instance.new("UIGradient", root) bgGrad.Rotation = 90 bgGrad.Color = ColorSequence.new({ ColorSequenceKeypoint.new(0, Color3.fromRGB(4, 8, 22)), ColorSequenceKeypoint.new(0.55, Color3.fromRGB(10, 30, 70)), ColorSequenceKeypoint.new(1, Color3.fromRGB(2, 6, 16)), }) local waves = {} for i = 1, 3 do local w = Instance.new("Frame", root) w.Size = UDim2.new(1.4, 0, 0, 90 + i * 14) w.AnchorPoint = Vector2.new(0.5, 1) w.Position = UDim2.new(0.5, 0, 1, 20 - i * 10) w.BackgroundColor3 = Color3.fromRGB(0, 90 + i * 25, 160 + i * 20) w.BackgroundTransparency = 0.7 + i * 0.07 w.BorderSizePixel = 0 corner(w, 60) waves[i] = w end local particles = {} for i = 1, 36 do local p = Instance.new("Frame", root) local s = math.random(3, 8) p.Size = UDim2.fromOffset(s, s) p.BackgroundColor3 = (i % 2 == 0) and Color3.fromRGB(0, 220, 255) or Color3.fromRGB(160, 120, 255) p.BackgroundTransparency = 0.35 p.BorderSizePixel = 0 corner(p, 8) particles[i] = { f = p, x = math.random(), y = math.random(), sp = 0.02 + math.random() * 0.05, ph = math.random() * 6.28 } end local vp = Instance.new("ViewportFrame", root) vp.BackgroundTransparency = 1 vp.Size = UDim2.fromOffset(300, 300) vp.AnchorPoint = Vector2.new(0.5, 0.5) vp.Position = UDim2.new(0.5, 0, 0.3, 0) vp.Ambient = Color3.fromRGB(110, 110, 150) vp.LightColor = Color3.fromRGB(180, 220, 255) vp.LightDirection = Vector3.new(-1, -1.2, -1) local cam = Instance.new("Camera") cam.FieldOfView = 40 cam.CFrame = CFrame.new(Vector3.new(0, 1.2, 13), Vector3.new(0, 0, 0)) cam.Parent = vp vp.CurrentCamera = cam local function mk(model, shape, size, color, mat, cf, trans) local p = Instance.new("Part") p.Anchored = true p.CanCollide = false p.Shape = shape p.Size = size p.Color = color p.Material = mat p.Transparency = trans or 0 p.CFrame = cf p.Parent = model return p end local fruit = Instance.new("Model", vp) mk(fruit, Enum.PartType.Ball, Vector3.new(3, 3, 3), Color3.fromRGB(0, 240, 255), Enum.Material.Neon, CFrame.new()) mk(fruit, Enum.PartType.Ball, Vector3.new(4.4, 4.2, 4.4), Color3.fromRGB(120, 70, 255), Enum.Material.Glass, CFrame.new(), 0.3) mk(fruit, Enum.PartType.Cylinder, Vector3.new(1.4, 0.45, 0.45), Color3.fromRGB(70, 200, 120), Enum.Material.SmoothPlastic, CFrame.new(0, 2.4, 0) * CFrame.Angles(0, 0, math.rad(90))) mk(fruit, Enum.PartType.Block, Vector3.new(1.6, 0.12, 0.7), Color3.fromRGB(60, 190, 110), Enum.Material.SmoothPlastic, CFrame.new(0.9, 2.9, 0) * CFrame.Angles(0, 0, math.rad(25))) for i = 1, 3 do mk(fruit, Enum.PartType.Cylinder, Vector3.new(0.1, 4.5, 4.5), Color3.fromRGB(200, 170, 255), Enum.Material.Neon, CFrame.new() * CFrame.Angles(math.rad(i * 60), 0, math.rad(90)), 0.35) end local rings = {} for i = 1, 3 do local m = Instance.new("Model", vp) mk(m, Enum.PartType.Cylinder, Vector3.new(0.12, 7 + i * 1.3, 7 + i * 1.3), i == 2 and Color3.fromRGB(160, 120, 255) or Color3.fromRGB(0, 230, 255), Enum.Material.Neon, CFrame.new(), 0.15) rings[i] = m end local function titleLabel(text, size, yOff, color, z, ox, oy) local l = Instance.new("TextLabel", root) l.AnchorPoint = Vector2.new(0.5, 0.5) l.Position = UDim2.new(0.5, ox or 0, 0.57, yOff + (oy or 0)) l.Size = UDim2.fromOffset(700, size + 10) l.BackgroundTransparency = 1 l.Text = text l.Font = Enum.Font.GothamBlack l.TextSize = size l.TextColor3 = color l.ZIndex = z return l end for i = 8, 1, -1 do titleLabel("GHOSTBLOX", 62, 0, Color3.fromRGB(0, 40 + i * 6, 90 + i * 8), 1, i * 0.6, i * 1.2) end local top3d = titleLabel("GHOSTBLOX", 62, 0, Color3.new(1, 1, 1), 5) local tg = Instance.new("UIGradient", top3d) tg.Color = ColorSequence.new({ ColorSequenceKeypoint.new(0, Color3.fromRGB(190, 250, 255)), ColorSequenceKeypoint.new(0.5, Color3.fromRGB(0, 220, 255)), ColorSequenceKeypoint.new(1, Color3.fromRGB(170, 130, 255)), }) titleLabel("S C R I P T", 26, 52, Color3.fromRGB(190, 170, 255), 5) local tag = titleLabel("Blox Fruits | Auto Farm Edition", 14, 84, Color3.fromRGB(150, 190, 230), 5) tag.Font = Enum.Font.Gotham local barBack = Instance.new("Frame", root) barBack.AnchorPoint = Vector2.new(0.5, 0.5) barBack.Position = UDim2.new(0.5, 0, 0.82, 0) barBack.Size = UDim2.fromOffset(380, 14) barBack.BackgroundColor3 = Color3.fromRGB(16, 24, 48) barBack.BorderSizePixel = 0 corner(barBack, 7) local bs = Instance.new("UIStroke", barBack) bs.Color = Color3.fromRGB(0, 200, 255) bs.Thickness = 1.2 bs.Transparency = 0.4 local fill = Instance.new("Frame", barBack) fill.Size = UDim2.new(0, 0, 1, 0) fill.BackgroundColor3 = Color3.new(1, 1, 1) fill.BorderSizePixel = 0 corner(fill, 7) local fg = Instance.new("UIGradient", fill) fg.Color = ColorSequence.new(Color3.fromRGB(0, 200, 255), Color3.fromRGB(160, 120, 255)) local gloss = Instance.new("Frame", fill) gloss.Size = UDim2.new(1, 0, 0.45, 0) gloss.BackgroundColor3 = Color3.new(1, 1, 1) gloss.BackgroundTransparency = 0.7 gloss.BorderSizePixel = 0 corner(gloss, 7) local pct = Instance.new("TextLabel", root) pct.AnchorPoint = Vector2.new(0.5, 0.5) pct.Position = UDim2.new(0.5, 0, 0.82, 26) pct.Size = UDim2.fromOffset(380, 20) pct.BackgroundTransparency = 1 pct.Font = Enum.Font.GothamBold pct.TextSize = 14 pct.TextColor3 = Color3.fromRGB(220, 235, 255) pct.Text = "0%" local msg = Instance.new("TextLabel", root) msg.AnchorPoint = Vector2.new(0.5, 0.5) msg.Position = UDim2.new(0.5, 0, 0.82, 48) msg.Size = UDim2.fromOffset(380, 18) msg.BackgroundTransparency = 1 msg.Font = Enum.Font.Gotham msg.TextSize = 12 msg.TextColor3 = Color3.fromRGB(130, 170, 220) msg.Text = "" local messages = { "Charting the Seas...", "Awakening the Ghost Fruit...", "Hooking attack remotes...", "Calibrating tween engine...", "Loading quest database...", "Ready to set sail!", } local t0 = tick() local DURATION = 3.5 local conn conn = RS.RenderStepped:Connect(function() local t = tick() - t0 fruit:PivotTo(CFrame.Angles(math.rad(8), t * 1.2, math.rad(10)) * CFrame.new(0, math.sin(t * 2) * 0.35, 0)) rings[1]:PivotTo(CFrame.Angles(t * 1.5, 0, math.rad(20))) rings[2]:PivotTo(CFrame.Angles(math.rad(70), -t * 1.1, t * 0.6)) rings[3]:PivotTo(CFrame.Angles(0, t * 0.8, math.rad(-35) + math.sin(t) * 0.3)) tg.Rotation = (t * 60) % 360 for i, w in ipairs(waves) do w.Position = UDim2.new(0.5, math.sin(t * (0.6 + i * 0.2) + i) * 40, 1, 20 - i * 10 + math.sin(t * 1.4 + i) * 6) end for _, p in ipairs(particles) do p.y = p.y - p.sp * 0.016 if p.y < -0.05 then p.y = 1.05 p.x = math.random() end p.f.Position = UDim2.new(p.x + math.sin(t + p.ph) * 0.01, 0, p.y, 0) end end) while true do local a = math.clamp((tick() - t0) / DURATION, 0, 1) local eased = a * a * (3 - 2 * a) fill.Size = UDim2.new(eased, 0, 1, 0) pct.Text = math.floor(eased * 100) .. "%" msg.Text = messages[math.clamp(math.ceil(eased * #messages), 1, #messages)] if a >= 1 then break end task.wait() end task.wait(0.3) TweenService:Create(root, TweenInfo.new(0.7), { GroupTransparency = 1 }):Play() TweenService:Create(blur, TweenInfo.new(0.7), { Size = 0 }):Play() task.wait(0.75) conn:Disconnect() blur:Destroy() lg:Destroy() mainScale.Scale = 0.8 main.Visible = true TweenService:Create(mainScale, TweenInfo.new(0.35, Enum.EasingStyle.Back, Enum.EasingDirection.Out), { Scale = 1 }):Play() end)