Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[
- Gleavin Hub // Level Farm
- Standalone level farming script for Blox Fruits
- Rayfield UI
- Run one Gleavin Hub script at a time
- ]]
- if getgenv().__GLEAVIN_LEVEL_LOADED then return end
- getgenv().__GLEAVIN_LEVEL_LOADED = true
- -- ============================================================================
- -- RAYFIELD UI
- -- ============================================================================
- local Rayfield = loadstring(game:HttpGet('https://sirius.menu/rayfield'))()
- if not Rayfield then
- warn("[Gleavin] Rayfield failed to load")
- return
- end
- -- ============================================================================
- -- SERVICES
- -- ============================================================================
- local Players = game:GetService("Players")
- local RunService = game:GetService("RunService")
- local TweenService = game:GetService("TweenService")
- local ReplicatedStorage = game:GetService("ReplicatedStorage")
- local VirtualUser = game:GetService("VirtualUser")
- local VirtualInputManager = game:GetService("VirtualInputManager")
- local HttpService = game:GetService("HttpService")
- local Lighting = game:GetService("Lighting")
- local LP = Players.LocalPlayer
- local t = LP
- local CommF = ReplicatedStorage:WaitForChild("Remotes"):WaitForChild("CommF_")
- local GuiService = game:GetService("GuiService")
- -- Blox Fruits world ID checks
- getgenv().CheckPlaceId = game.PlaceId == 100117331123089 and 100117331123089 or 7449423635 -- Sea 3
- getgenv().CheckPlaceId2 = game.PlaceId == 4442272183 and 4442272183 or 79091703265657 -- Sea 2
- getgenv().CheckPlaceId3 = game.PlaceId == 2753915549 and 2753915549 or 85211729168715 -- Sea 1
- -- ============================================================================
- -- WAIT FOR GAME
- -- ============================================================================
- repeat task.wait() until game:IsLoaded() and LP:FindFirstChild("DataLoaded")
- -- ============================================================================
- -- SETTINGS PERSISTENCE
- -- ============================================================================
- local FolderName = "GleavinHub"
- if not isfolder(FolderName) then makefolder(FolderName) end
- local SaveFileName = FolderName .. "/LevelFarm.json"
- local Settings = {}
- local function SaveSettings(key, value, subkey)
- if subkey ~= nil then
- Settings[key] = Settings[key] or {}
- Settings[key][subkey] = value
- elseif key ~= nil then
- Settings[key] = value
- end
- pcall(function()
- writefile(SaveFileName, HttpService:JSONEncode(Settings))
- end)
- end
- local function LoadSettings()
- local ok, data = pcall(function()
- return HttpService:JSONDecode(readfile(SaveFileName))
- end)
- if ok and type(data) == "table" then
- Settings = data
- end
- end
- LoadSettings()
- local function Notify(title, desc)
- pcall(function()
- Rayfield:Notify({
- Title = title or "Gleavin Hub",
- Content = desc or "",
- Duration = 5,
- Image = 4483362458
- })
- end)
- end
- -- ============================================================================
- -- CORE UTILITIES
- -- ============================================================================
- local function getChar()
- return t.Character or t.CharacterAdded:Wait()
- end
- local function getHRP()
- local c = getChar()
- return c:FindFirstChild("HumanoidRootPart") or c:WaitForChild("HumanoidRootPart", 10)
- end
- local function IsAlive()
- local c = t.Character
- if not c then return false end
- local h = c:FindFirstChildOfClass("Humanoid")
- if not h then return false end
- return h.Health > 0
- end
- -- ============================================================================
- -- TWEEN MANAGER (verbatim from source)
- -- ============================================================================
- local _l = TweenService
- getgenv().TweenManager = {
- currentTween = nil,
- currentPart = nil,
- currentGoal = nil,
- TweenRunning = false,
- CancelTweenOnly = function()
- local Q, S = getgenv().TweenManager.currentTween, getgenv().Tween
- if Q then pcall(function() Q:Cancel(); Q:Destroy() end) end
- if S and S ~= Q then pcall(function() S:Cancel(); S:Destroy() end) end
- getgenv().TweenManager.currentTween = nil
- getgenv().TweenManager.currentPart = nil
- getgenv().TweenManager.currentGoal = nil
- getgenv().TweenManager.TweenRunning = false
- getgenv().Tween = nil
- end,
- PlayTween = function(Q, S, L, d)
- if not Q or not S or not L or not L.CFrame then return end
- local I = (d or {}).TargetEpsilon or 12
- if getgenv().TweenManager.currentTween
- and getgenv().TweenManager.currentPart == Q
- and getgenv().TweenManager.currentGoal
- and I >= (getgenv().TweenManager.currentGoal.Position - L.CFrame.Position).Magnitude
- then
- return getgenv().TweenManager.currentTween
- end
- getgenv().TweenManager.CancelTweenOnly()
- local tw = _l:Create(Q, S, L)
- getgenv().TweenManager.currentTween = tw
- getgenv().TweenManager.currentPart = Q
- getgenv().TweenManager.currentGoal = L.CFrame
- getgenv().TweenManager.TweenRunning = true
- getgenv().Tween = tw
- tw.Completed:Connect(function()
- if getgenv().TweenManager.currentTween == tw then
- getgenv().TweenManager.currentTween = nil
- getgenv().TweenManager.currentPart = nil
- getgenv().TweenManager.currentGoal = nil
- getgenv().TweenManager.TweenRunning = false
- getgenv().Tween = nil
- pcall(function() tw:Destroy() end)
- end
- end)
- tw:Play()
- return tw
- end,
- CancelCurrent = function()
- local ch = t.Character
- local hrp = ch and ch:FindFirstChild("HumanoidRootPart")
- if getgenv().TweenManager.currentTween or getgenv().Tween or (hrp and hrp:FindFirstChild("FloatForce")) then
- getgenv().TweenManager.CancelTweenOnly()
- pcall(function()
- if not ch then return end
- for _, p in ipairs(ch:GetDescendants()) do
- if p:IsA("BasePart") then p.CanCollide = true end
- end
- local h = ch:FindFirstChildOfClass("Humanoid")
- if h then h.PlatformStand = false end
- if hrp and hrp:FindFirstChild("FloatForce") then hrp.FloatForce:Destroy() end
- end)
- end
- end,
- }
- TweenManager = getgenv().TweenManager
- -- ============================================================================
- -- toTarget (level-farm scope: direct teleport when close, tween when far)
- -- ============================================================================
- local _G_Tweening = false
- local ReadyToDodge = false
- local function AddFloatForce(hrp)
- if hrp:FindFirstChild("FloatForce") then return end
- local bv = Instance.new("BodyVelocity")
- bv.Name = "FloatForce"
- bv.Velocity = Vector3.new(0, 0, 0)
- bv.MaxForce = Vector3.new(100000, 100000, 100000)
- bv.P = 10000
- bv.Parent = hrp
- end
- function toTarget(P, skipCheck)
- if typeof(P) ~= "CFrame" then return end
- local char = t.Character
- if not char then return end
- local hrp = char:FindFirstChild("HumanoidRootPart")
- local hum = char:FindFirstChildOfClass("Humanoid")
- if not hrp or not hum then return end
- if hum.Sit then
- TweenManager.CancelCurrent()
- task.wait(0.1)
- getgenv().noclip = false
- VirtualInputManager:SendKeyEvent(true, "Space", false, game)
- task.wait()
- VirtualInputManager:SendKeyEvent(false, "Space", false, game)
- task.wait(0.1)
- if hrp:FindFirstChild("EffectsSY") then hrp.EffectsSY:Destroy() end
- hum.Jump = true
- task.wait(0.1)
- hrp.CFrame = hrp.CFrame * CFrame.new(0, 10, 0)
- return
- end
- AddFloatForce(hrp)
- local dist = (P.Position - hrp.Position).Magnitude
- if Settings["Teleport Y"] then
- local pct = Settings["% Health Player"] or 40
- local hp = hum.Health / hum.MaxHealth
- if hp < pct / 100 then
- _G_Tweening = true
- elseif hp > 0.8 then
- _G_Tweening = false
- end
- end
- if dist < (skipCheck and 8 or 150) and not _G_Tweening and not ReadyToDodge then
- TweenManager.CancelTweenOnly()
- hrp.CFrame = P
- return
- end
- if hrp.Position.Y < -60 and hrp.Position.Y > -100 then
- hrp.CFrame = hrp.CFrame * CFrame.new(0, 20, 0)
- end
- local offset = CFrame.new()
- if ReadyToDodge then
- offset = CFrame.new(0, 200, 0)
- elseif _G_Tweening then
- offset = CFrame.new(0, Settings["Distance Teleport Y"] or 800, 0)
- end
- local goal = P * offset
- local speed = Settings["Speed Tween "] or 300
- if (goal.Position - hrp.Position).Magnitude < 3 and not ReadyToDodge and not _G_Tweening then
- TweenManager.CancelTweenOnly()
- hrp.CFrame = goal
- return
- end
- TweenManager.PlayTween(hrp, TweenInfo.new(dist / speed, Enum.EasingStyle.Linear), { CFrame = goal })
- end
- getgenv().BackupTween = toTarget
- -- ============================================================================
- -- COMBAT (verbatim from source)
- -- ============================================================================
- local S = Players
- local G_Combat = require(ReplicatedStorage.Modules.CombatUtil)
- local NetMod = require(ReplicatedStorage.Modules.Net)
- local Mouse = require(ReplicatedStorage.Mouse)
- local RegisterAttack = ReplicatedStorage.Modules.Net:WaitForChild("RE/RegisterAttack")
- local RegisterHit = NetMod:RemoteEvent("RegisterHit", true)
- v_u_27 = 0
- v_u_28 = false
- v_u_33 = false
- v_u_31 = nil
- v_u_32 = 0
- v_u_21 = 0
- v_u_16 = 1
- local function bladeBoxHits(mob, origin, radius)
- local hits = {}
- for _, part in pairs(mob:GetChildren()) do
- if part:IsA("BasePart") and (part.Position - origin).Magnitude <= radius then
- table.insert(hits, part)
- end
- end
- return hits
- end
- local function AllTargets(includePlayers)
- local list = {}
- local enemies = workspace:WaitForChild("Enemies")
- for _, v in pairs(enemies:GetChildren()) do table.insert(list, v) end
- if includePlayers then
- local chars = workspace:WaitForChild("Characters")
- for _, v in pairs(chars:GetChildren()) do table.insert(list, v) end
- end
- return list
- end
- getgenv().getBladeHits = function(selfChar, origins, baseRadius, includePlayers)
- local hits = {}
- for _, mob in pairs(AllTargets(includePlayers)) do
- if mob:IsDescendantOf(Workspace) and mob ~= selfChar and mob:FindFirstChild("HumanoidRootPart") then
- local hrp = mob.HumanoidRootPart
- local radius = S:GetPlayerFromCharacter(mob) and (baseRadius / 1.5) or baseRadius
- local points = { hrp.Position }
- if hrp.Size.Y > 5 then
- table.insert(points, (hrp.CFrame * CFrame.new(0, -hrp.Size.Y * 1.5 + 3, 0)).Position)
- end
- for _, pt in pairs(points) do
- if (pt - origins[1].Position).Magnitude < 10 + radius + hrp.Size.X / 2 then
- for _, hit in pairs(bladeBoxHits(mob, origins[1].Position, radius + hrp.Size.X / 2)) do
- table.insert(hits, hit)
- end
- break
- end
- end
- end
- end
- return hits
- end
- local BODY_PARTS = {
- RightUpperArm = true, RightLowerArm = true, RightHand = true,
- RightUpperLeg = true, RightLowerLeg = true, RightFoot = true,
- LeftUpperArm = true, LeftLowerArm = true, LeftHand = true,
- LeftUpperLeg = true, LeftLowerLeg = true, LeftFoot = true,
- UpperTorso = true, LowerTorso = true, Head = true,
- }
- local function AttackAOE(radius, includePlayers)
- local found, seen = {}, {}
- local origins = { t.Character.HumanoidRootPart }
- for _, part in pairs(getgenv().getBladeHits(t.Character, origins, radius or 80, includePlayers)) do
- local rig = G_Combat:GetRigOfHitPart(part)
- if rig and not seen[rig] and BODY_PARTS[part.Name] and G_Combat:IsVulnerable(rig) then
- local summoner, selfSummoner = rig:FindFirstChild("Summoner"), t.Character:FindFirstChild("Summoner")
- if rig ~= t.Character
- and (not selfSummoner or rig ~= selfSummoner.Value.Character)
- and (not S:GetPlayerFromCharacter(t.Character) or not summoner or summoner.Value ~= S:GetPlayerFromCharacter(t.Character))
- then
- table.insert(found, { rig, part })
- seen[rig] = true
- end
- end
- end
- return #found > 0 and found or nil
- end
- function attackMelee(radius)
- local tool = t.Character:FindFirstChildOfClass("Tool")
- if not tool then return end
- local hits = AttackAOE(radius, false)
- if not hits then return end
- local hum = t.Character.Humanoid
- local root = hum and hum.RootPart
- root = root and root.Parent
- local anims = G_Combat:GetMovesetAnimCache(hum)
- if anims then
- local weaponName = G_Combat:GetWeaponName(tool)
- local data = G_Combat:GetWeaponData(weaponName)
- local weaponType, moveset = data.WeaponType, data.Moveset
- if G_Combat:CanAttack(root, weaponType) then
- v_u_33 = true
- v_u_32 = 5
- v_u_21 = os.clock()
- v_u_27 += 1
- if v_u_27 > #moveset.Basic then v_u_27 = 1 end
- local anim = anims[G_Combat:GetPureWeaponName(weaponName) .. "-basic" .. v_u_27]
- RegisterAttack:FireServer(anim.Length / (anim:GetAttribute("SpeedMult") or 1))
- RegisterHit:FireServer(table.remove(hits, 1)[2], hits)
- anim:Play(0.1, 1, 1 * (anim:GetAttribute("SpeedMult") or 1))
- v_u_28 = true
- task.delay(anim.Length / (anim:GetAttribute("SpeedMult") or 1) * v_u_16, function()
- v_u_28 = false
- end)
- v_u_31 = anim
- table.clear(hits)
- end
- end
- end
- function AttackFunction(radius)
- if t.Character.Stun.Value ~= 0 then return end
- if not Settings["Attack No Animation "] then
- attackMelee(radius)
- else
- local hits = AttackAOE(radius, false)
- if not hits then return end
- RegisterAttack:FireServer(0)
- RegisterHit:FireServer(table.remove(hits, 1)[2], hits)
- table.clear(hits)
- end
- end
- -- Fruit M1
- local function useFruitM1(target, isBoat, usePrimary)
- local char = t.Character
- local root = char and (char.PrimaryPart or char:FindFirstChild("HumanoidRootPart"))
- if not root or not target then return false end
- local targetPos = usePrimary and target.Position or (target.PrimaryPart and target.PrimaryPart.Position)
- if not targetPos then return false end
- local lookDir = (targetPos - root.Position).Unit
- local flatDir = ((Mouse.Hit.Position - root.Position) * Vector3.new(1, 0, 1)).Unit
- local fruitTool = char:FindFirstChild(NameWeapon("Blox Fruit"))
- if not fruitTool then return false end
- local lc = fruitTool:FindFirstChild("LeftClickRemote")
- local rf = fruitTool:FindFirstChild("RemoteFunction")
- local re = fruitTool:FindFirstChild("RemoteEvent")
- if not lc and rf then
- if re then re:FireServer(targetPos) end
- rf:InvokeServer("TAP")
- return true
- end
- if lc then
- if fruitTool.Name == "Mammoth-Mammoth" then
- lc:FireServer(targetPos)
- return true
- end
- local seq = math.random(1, 5)
- lc:FireServer(lookDir, seq)
- if isBoat then lc:FireServer(flatDir, seq) end
- return true
- end
- return false
- end
- getgenv().UseFruitM1 = function(target, primary)
- return useFruitM1(target, false, primary)
- end
- getgenv().UseFruitM1Boat = function(target, primary)
- return useFruitM1(target, true, primary)
- end
- local function inMeleeRange(mob)
- return t.Character
- and t.Character:FindFirstChild("HumanoidRootPart")
- and mob
- and mob:FindFirstChild("HumanoidRootPart")
- and mob.Humanoid.Health > 0
- and (t.Character.HumanoidRootPart.Position - mob.HumanoidRootPart.Position).Magnitude < 70
- end
- function ClickM1(mob, isBoat)
- if not inMeleeRange(mob) then return end
- if Settings["Select Weapon"] == "Blox Fruit" then
- if getgenv().UseFruitM1(mob) then return end
- end
- AttackFunction(isBoat and 80 or 30)
- end
- getgenv().ClickM1 = ClickM1
- function equiptool(name)
- if name and t:FindFirstChild("Backpack") and t.Backpack:FindFirstChild(name) and not t.Character.Humanoid.Sit then
- t.Character.Humanoid:EquipTool(t.Backpack:FindFirstChild(name))
- end
- end
- function NameWeapon(tooltip, returnTool)
- local function find(container)
- for _, item in pairs(container:GetChildren()) do
- if item:IsA("Tool") and item.ToolTip == tooltip then
- return returnTool and item or item.Name
- end
- end
- end
- return find(t.Backpack) or find(t.Character)
- end
- function UsedualFlock()
- equiptool(NameWeapon(Settings["Select Weapon"] or "Melee"))
- end
- -- ============================================================================
- -- FAST ATTACK (PASS32 pattern)
- -- ============================================================================
- local CombatFrameworkR = nil
- pcall(function()
- local cfMod = require(t.PlayerScripts:WaitForChild("CombatFramework"))
- local ups = debug.getupvalues(cfMod)
- CombatFrameworkR = ups and ups[2]
- end)
- pcall(function()
- local shaker = require(ReplicatedStorage.Util.CameraShaker)
- if shaker and shaker.Stop then shaker:Stop() end
- end)
- local function FastAttackOnce()
- if not (getgenv().Usefastattack or getgenv().SuperFastAttack) then return end
- if not CombatFrameworkR then return end
- local controller = CombatFrameworkR.activeController
- if not controller then return end
- pcall(function()
- controller.hitboxMagnitude = getgenv().SuperFastAttack and 60 or 55
- controller.timeToNextAttack = 0
- controller.attacking = false
- controller.increment = 3
- controller.blocking = false
- controller.timeToNextBlock = 0
- if controller.attack then controller:attack() end
- local hum = t.Character and t.Character:FindFirstChildOfClass("Humanoid")
- if hum then hum.Sit = false end
- end)
- end
- getgenv().FastAttackOnce = FastAttackOnce
- task.spawn(function()
- while task.wait() do
- if getgenv().Usefastattack or getgenv().SuperFastAttack then
- FastAttackOnce()
- end
- end
- end)
- -- ============================================================================
- -- DETECTION
- -- ============================================================================
- function IsMobAlive(mob)
- return mob
- and mob.Parent
- and mob:FindFirstChild("HumanoidRootPart")
- and mob:FindFirstChildWhichIsA("Humanoid")
- and mob.Humanoid.Health > 0
- end
- function DetectMob(nameOrList)
- local best, bestDist = nil, math.huge
- for _, mob in pairs(workspace.Enemies:GetChildren()) do
- if (typeof(nameOrList) == "table" and table.find(nameOrList, mob.Name) or mob.Name == nameOrList)
- and IsMobAlive(mob) then
- local d = (mob.HumanoidRootPart.Position - t.Character.HumanoidRootPart.Position).Magnitude
- if d < bestDist then bestDist, best = d, mob end
- end
- end
- return best
- end
- function CheckNameBoss(nameOrList)
- for _, model in pairs(ReplicatedStorage:GetChildren()) do
- if (typeof(nameOrList) == "table" and table.find(nameOrList, model.Name) or model.Name == nameOrList)
- and IsMobAlive(model) then
- return model
- end
- end
- for _, model in pairs(workspace.Enemies:GetChildren()) do
- if (typeof(nameOrList) == "table" and table.find(nameOrList, model.Name) or model.Name == nameOrList)
- and IsMobAlive(model) then
- return model
- end
- end
- end
- function DetectMobAura()
- local range = tonumber(Settings["Distance Farm Aura"]) or 300
- local closestName, closestDist = nil, range
- for _, mob in pairs(workspace.Enemies:GetChildren()) do
- if IsMobAlive(mob) then
- local d = (mob.HumanoidRootPart.Position - t.Character.HumanoidRootPart.Position).Magnitude
- if d < closestDist then
- closestDist, closestName = d, mob.Name
- end
- end
- end
- return closestName
- end
- -- ============================================================================
- -- MOB MANAGEMENT
- -- ============================================================================
- getgenv().TableMobSpawn = {}
- spawn(function()
- for _, part in pairs(getnilinstances()) do
- if part:GetAttribute("DisplayName") and string.find(part:GetAttribute("DisplayName"), "Lv.") then
- table.insert(getgenv().TableMobSpawn, part)
- end
- end
- for _, part in pairs(game:GetService("Workspace")._WorldOrigin.EnemySpawns:GetChildren()) do
- if part:GetAttribute("DisplayName") and string.find(part:GetAttribute("DisplayName"), "Lv.") then
- table.insert(getgenv().TableMobSpawn, part)
- end
- end
- end)
- function DeleteIgnoredMob()
- for _, mob in pairs(workspace.Enemies:GetChildren()) do
- if mob:IsA("Model") and mob:FindFirstChild("Ignored") then
- mob.Ignored:Destroy()
- end
- end
- end
- function sizepart(mob)
- AttackingMob = mob
- if not mob or not mob.Parent or not mob:FindFirstChild("HumanoidRootPart") then return end
- if t:DistanceFromCharacter(mob.HumanoidRootPart.Position) <= 50 then
- for _, part in pairs(mob:GetDescendants()) do
- if (part:IsA("Part") or part:IsA("MeshPart")) and part.CanCollide then
- part.CanCollide = false
- end
- end
- end
- end
- function isnetworkowner2(part)
- for _, char in pairs(workspace.Characters:GetChildren()) do
- if char.Name ~= t.Name and char:FindFirstChild("HumanoidRootPart")
- and (char.HumanoidRootPart.Position - part.Position).Magnitude <= 300 then
- return false
- end
- end
- return true
- end
- local _BringMobState = { lastMob = nil, lastCFrame = nil }
- function BringMob(mob)
- if not Settings["Bring Mob"] then return end
- if mob and _BringMobState.lastMob ~= mob then
- _BringMobState.lastMob = mob
- local nearest = DetectPartMobBring(mob.Name, mob, true)
- _BringMobState.lastCFrame = nearest and nearest.CFrame or mob.HumanoidRootPart.CFrame
- local isCyborg = t.Data.Race.Value == "Cyborg"
- and t.Character:FindFirstChild("RaceTransformed")
- and t.Character.RaceTransformed.Value
- if isCyborg then
- _BringMobState.lastCFrame = getcenter(mob.Name) or _BringMobState.lastCFrame
- end
- DeleteIgnoredMob()
- end
- if DaBringMob then
- delay(0.1, function() getgenv().DaBringMob = false end)
- return
- end
- local toBring = {}
- if not mob:FindFirstChild("Ignored") then table.insert(toBring, mob) end
- local maxCount = Settings["Bring Mob Count"] or 2
- local radius, cap = maxCount > 2 and 350 or 200, maxCount
- local isCyborg = t.Data.Race.Value == "Cyborg"
- and t.Character:FindFirstChild("RaceTransformed")
- and t.Character.RaceTransformed.Value
- if isCyborg then radius, cap = 300, 6 end
- for _, other in pairs(workspace.Enemies:GetChildren()) do
- if other ~= mob and other.Name == mob.Name
- and not other:FindFirstChild("Ignored")
- and IsMobAlive(other)
- and isnetworkowner2(other.HumanoidRootPart) then
- if (other.HumanoidRootPart.Position - _BringMobState.lastCFrame.Position).Magnitude <= radius
- and #toBring < cap then
- table.insert(toBring, other)
- end
- end
- end
- if _BringMobState.lastCFrame
- and (t.Character.HumanoidRootPart.Position - mob.HumanoidRootPart.Position).Magnitude <= 50
- and isnetworkowner2(t.Character.HumanoidRootPart)
- and #toBring >= 2 then
- for _, target in pairs(toBring) do
- sizepart(target)
- if not isnetworkowner2(target.HumanoidRootPart) then
- target.HumanoidRootPart.CFrame = target.WorldPivot
- Instance.new("IntValue", target).Name = "Ignored"
- task.wait(0.3)
- else
- target.HumanoidRootPart.CFrame = _BringMobState.lastCFrame * CFrame.new(0, math.random(0, 2), math.random(0, 2))
- task.spawn(function()
- local hp = target.Humanoid.Health
- task.wait(2.2)
- if target.Humanoid.Health == hp and not target:FindFirstChild("Ignored") then
- target.HumanoidRootPart.CFrame = target.WorldPivot
- Instance.new("IntValue", target).Name = "Ignored"
- task.wait(0.3)
- end
- end)
- end
- getgenv().DaBringMob = true
- end
- end
- end
- function DetectPartMobBring(name, mob, nearestOnly)
- local mobs, baseName = {}, string.find(name, "Lv.") and name:gsub(" %pLv. %d+%p", "") or name
- for _, part in pairs(getgenv().TableMobSpawn) do
- local pName = string.find(part.Name, "Lv.") and part.Name:gsub(" %pLv. %d+%p", "") or nil
- if part:IsA("Part") and (pName and pName == name or name == part.Name or baseName and part.Name == baseName) then
- table.insert(mobs, part)
- end
- end
- if nearestOnly then
- local bestDist, best = math.huge
- for _, part in pairs(mobs) do
- local d = (mob.HumanoidRootPart.Position - part.Position).Magnitude
- if d < bestDist then bestDist, best = d, part end
- end
- return best
- else
- local close = {}
- for _, part in pairs(mobs) do
- if (part.Position - mob.HumanoidRootPart.Position).Magnitude <= 200 then
- table.insert(close, part)
- end
- end
- if #close < #mobs then return true end
- end
- end
- function DetectPartSpawnMob(name, preferIgnored)
- local function baseName(s) return s:gsub(" %p?Lv%.? %d+%p?", "") end
- local cleanName = string.find(name, "Lv.") and baseName(name) or name
- for _, part in pairs(getgenv().TableMobSpawn) do
- if part:IsA("Part") then
- local pName = string.find(part.Name, "Lv.") and baseName(part.Name) or part.Name
- if (pName == name or pName == cleanName) and (not preferIgnored or not part:FindFirstChild("Ignored")) then
- return part
- end
- end
- end
- for _, part in pairs(workspace._WorldOrigin.EnemySpawns:GetChildren()) do
- if part:IsA("Part") then
- local pName = string.find(part.Name, "Lv.") and baseName(part.Name) or part.Name
- if (pName == name or pName == cleanName) and (not preferIgnored or not part:FindFirstChild("Ignored")) then
- table.insert(getgenv().TableMobSpawn, part)
- return part
- end
- end
- end
- for _, part in pairs(getnilinstances()) do
- if part:IsA("Part") then
- local pName = string.find(part.Name, "Lv.") and baseName(part.Name) or part.Name
- if (pName == name or pName == cleanName) and (not preferIgnored or not part:FindFirstChild("Ignored")) then
- table.insert(getgenv().TableMobSpawn, part)
- return part
- end
- end
- end
- return nil
- end
- function DeleteIgnoredMobSpawn()
- for _, part in pairs(getgenv().TableMobSpawn) do
- if part:FindFirstChild("Ignored") then part.Ignored:Destroy() end
- end
- end
- function DetectNameTablePart(list)
- for name, _ in pairs(list) do
- if not table.find(getgenv()._usedSpawnTracker or {}, name) then
- return name
- end
- end
- end
- function getcenter(name)
- if string.find(name, "Lv.") then
- name1 = name:gsub(" %pLv. %d+%p", "")
- end
- local sum, count = nil, 0
- for _, part in pairs(getgenv().TableMobSpawn) do
- local pName = string.find(part.Name, "Lv.") and part.Name:gsub(" %pLv. %d+%p", "") or nil
- if part:IsA("Part") and (pName and pName == name or name == part.Name or name1 and part.Name == name1) then
- if sum == nil then sum, count = part.Position, count + 1
- else sum, count = sum + part.Position, count + 1 end
- end
- end
- if sum then
- sum = sum / count
- return CFrame.new(sum)
- end
- end
- -- ============================================================================
- -- QUEST SYSTEM (verbatim from source)
- -- ============================================================================
- local QuestsModule = require(ReplicatedStorage.Quests)
- local GuideModule = require(ReplicatedStorage:WaitForChild("GuideModule"))
- local H = QuestsModule
- local Z = GuideModule
- local V_excluded = { "BartiloQuest", "Trainees", "MarineQuest", "CitizenQuest" }
- local N_scanState = {}
- getgenv().NameMobQuest = ""
- getgenv().NameQuest = ""
- getgenv().IDQuest = 0
- getgenv().questpoint = {}
- local function B_getBestNPC(level)
- local currentTask = Z.Data.QuestData
- local bestLevel, result = 0, {}
- for _, npc in pairs(Z.Data.NPCList) do
- if not table.find(V_excluded, npc.InternalQuestName) then
- for questId, lvl in pairs(npc.Levels) do
- local questData = H[npc.InternalQuestName][questId]
- if questData then
- local mob, count = next(questData.Task)
- if count and count > 1 and lvl <= level and lvl >= bestLevel then
- result = {
- Level = lvl,
- Name = npc.NPCName,
- QuestName = npc.InternalQuestName,
- Pos = npc.Position,
- Id = questId,
- Mob = mob,
- }
- if currentTask == mob and questId > 1 then
- local prev = H[npc.InternalQuestName][questId - 1]
- if prev and prev.Task then
- for m, c in pairs(prev.Task) do
- if m ~= currentTask and c > 1 then
- result.Mob = m
- result.Id = questId - 1
- break
- end
- end
- end
- end
- bestLevel = lvl
- end
- end
- end
- end
- end
- return result
- end
- function TakeQuestLevel()
- local quest = B_getBestNPC(t.Data.Level.Value)
- if not quest or not quest.Pos then return end
- local targetPos = typeof(quest.Pos) == "CFrame" and quest.Pos.Position or quest.Pos
- local hrp = t.Character and t.Character:FindFirstChild("HumanoidRootPart")
- local hum = t.Character and t.Character:FindFirstChild("Humanoid")
- if not hrp or not hum then return end
- if (targetPos - hrp.Position).Magnitude <= 8 and hum.Health > 0 then
- task.wait(2)
- CommF:InvokeServer("StartQuest", tostring(quest.QuestName), quest.Id)
- else
- toTarget(CFrame.new(targetPos) * CFrame.new(0, 4, 2), true)
- end
- end
- function CFrameQuest()
- local levelMap = {}
- for qName, q in next, H, nil do
- if qName ~= "MarineQuest" then
- for _, quest in next, q, nil do
- levelMap[quest.LevelReq] = qName
- end
- end
- end
- getgenv().questpoint = {}
- for _, npc in next, Z.Data.NPCList, nil do
- for _, lvl in next, npc.Levels, nil do
- local qName = levelMap[lvl]
- if qName and not getgenv().questpoint[qName] then
- getgenv().questpoint[qName] = CFrame.new(npc.Position)
- end
- end
- end
- end
- function QuestBoneAndkatakuri(questName, questId)
- local point = getgenv().questpoint[questName]
- if not point then
- CFrameQuest()
- task.wait(1.5)
- point = getgenv().questpoint[questName]
- if not point then return end
- end
- local hrp = t.Character and t.Character:FindFirstChild("HumanoidRootPart")
- local hum = t.Character and t.Character:FindFirstChildOfClass("Humanoid")
- if not hrp or not hum then return end
- if (point.Position - hrp.Position).Magnitude <= 8 then
- if hum.Health > 0 then
- CommF:InvokeServer("StartQuest", questName, questId)
- task.wait(0.5)
- end
- else
- toTarget(point * CFrame.new(0, 4, 2), true)
- end
- end
- function DontQuest()
- return Z.Data and Z.Data.QuestData ~= nil
- end
- function GetNameDoubleQuest()
- if DontQuest() then
- for name in next, Z.Data.QuestData.Task, nil do
- return name
- end
- end
- end
- -- ============================================================================
- -- FARM MASTERY (verbatim)
- -- ============================================================================
- function DetectNameAbility(container)
- for _, c in pairs(container:GetChildren()) do
- if c:IsA("Frame") and c.Name ~= "Template" then return true end
- end
- end
- local TRANSFORM_FRUITS = { "Control-Control", "Buddha-Buddha", "Diamond-Diamond", "Falcon-Falcon" }
- local function skillReady(skillData, key)
- local frame = t.PlayerGui.Main.Skills[skillData]:FindFirstChild(key)
- if not frame then return false end
- return frame:IsA("Frame")
- and frame.Title.TextColor3 == Color3.new(1, 1, 1)
- and (frame.Cooldown.Size == UDim2.new(0, 0, 1, -1) or frame.Cooldown.Size == UDim2.new(1, 0, 1, -1))
- end
- local function transformSkill(fruit)
- if skillReady(fruit, "Z") then
- local vim = game:GetService("VirtualInputManager")
- vim:SendKeyEvent(true, "Z", false, game)
- vim:SendKeyEvent(false, "Z", false, game)
- end
- end
- local function findCastSkill(tool)
- local skills = t.PlayerGui.Main.Skills[tool.Name]
- if not skills then return nil end
- for _, frame in ipairs(skills:GetChildren()) do
- if frame:IsA("Frame")
- and frame.Name ~= "Template"
- and (frame.Name ~= "Z" or not table.find(TRANSFORM_FRUITS, tool.Name))
- and Settings["Select Skills " .. tool.ToolTip]
- and Settings["Select Skills " .. tool.ToolTip][frame.Name]
- and (frame.Title.TextColor3 == Color3.new(1, 1, 1) and frame.Cooldown.Size == UDim2.new(0, 0, 1, -1)
- or frame.Cooldown.Size == UDim2.new(1, 0, 1, -1)) then
- return frame.Name
- end
- end
- end
- function FarmMastery(mob)
- if not mob or not mob:FindFirstChild("Humanoid") or not mob:FindFirstChild("HumanoidRootPart") then return end
- getgenv().AimPos = mob.HumanoidRootPart.CFrame
- if not Settings["Farm Mastery"] then
- UsedualFlock()
- return
- end
- if mob.Humanoid.Health / mob.Humanoid.MaxHealth > (Settings["Health %"] or 100) / 100 then
- UsedualFlock()
- return
- end
- local weaponType = Settings["Select Method Farm Mastery"]
- local weaponName = NameWeapon(weaponType)
- local weaponTool = NameWeapon(weaponType, true)
- if not weaponName or not weaponTool then return end
- if weaponType == "Gun" and t.Character:FindFirstChild(weaponName) then
- -- gun shoot (kept simple here)
- end
- equiptool(weaponName)
- if weaponName == "Control-Control" then
- local globe = workspace._WorldOrigin:FindFirstChild("Globe")
- if not globe or t:DistanceFromCharacter(globe.Position) > globe.AB.CurveSize0 / 1.75 then
- transformSkill(weaponName)
- return
- end
- elseif weaponName == "Buddha-Buddha" then
- if not t.Character.HumanoidRootPart:FindFirstChild("Buddha") then transformSkill(weaponName); return end
- elseif weaponName == "Diamond-Diamond" then
- if not t.Character:FindFirstChild("DiamondBody") then transformSkill(weaponName); return end
- elseif weaponName == "Falcon-Falcon" then
- if not t.Character:FindFirstChild("FalconWings") then transformSkill(weaponName); return end
- end
- local castKey = findCastSkill(weaponTool)
- if castKey then
- local hold = Settings["Skill " .. castKey .. " " .. weaponTool.ToolTip] or 0.5
- local vim = game:GetService("VirtualInputManager")
- vim:SendKeyEvent(true, castKey, false, game)
- if Settings["Use skill fast dont hold"] then task.wait(0.05) else task.wait(hold) end
- vim:SendKeyEvent(false, castKey, false, game)
- end
- end
- -- ============================================================================
- -- FARM METHOD (verbatim, adapted for QuestController-less mode)
- -- ============================================================================
- local KATAKURI_MOBS = { "Baking Staff", "Head Baker", "Cake Guard", "Cookie Crafter" }
- local BONES_MOBS = { "Reborn Skeleton", "Demonic Soul", "Living Zombie", "Posessed Mummy" }
- local TYRANT_MOBS = { "Isle Champion", "Serpent Hunter", "Skull Slayer", "Sun-kissed Warrior" }
- function FarmMethod()
- local method = Settings["Select Method Farm"]
- local mobList, questGroup = nil, nil
- if method == "Farm Katakuri" then
- mobList, questGroup = KATAKURI_MOBS, "CakeQuest2"
- elseif method == "Farm Bones" then
- mobList, questGroup = BONES_MOBS, "HauntedQuest2"
- elseif method == "Farm Tyrant of the Skies" then
- mobList, questGroup = TYRANT_MOBS, "TikiQuest3"
- elseif method == "Aura Farm" then
- local auraName = DetectMobAura()
- if auraName then mobList = { auraName } end
- end
- -- Farm Material override
- if Settings["Farm Material"] then
- local material = Settings["Select Material"]
- -- name -> mob list lookup (copied from source)
- local nameMaterials = {
- Ectoplasm = { "Ship Deckhand", "Ship Engineer", "Ship Steward", "Ship Officer", "Cursed Captain" },
- ["Magma Ore"] = { "Lava Pirate", "Magma Ninja" },
- Leather = { "Jungle Pirate", "Musketeer Pirate" },
- ["Scrap Metal"] = { "Jungle Pirate" },
- ["Angel Wings"] = { "God's Guard", "Shanda", "Royal Squad", "Royal Soldier" },
- ["Fish Tail"] = { "Fishman Raider", "Fishman Captain" },
- ["Radioactive Material"] = { "Factory Staff" },
- ["Vampire Fang"] = { "Vampire" },
- ["Mystic Droplet"] = { "Sea Soldier", "Water Fighter" },
- ["Mini Tusk"] = { "Mythological Pirate" },
- Gunpowder = { "Pistol Billionaire" },
- ["Demonic Wisp"] = { "Demonic Soul" },
- ["Dragon Scale"] = { "Dragon Crew Archer", "Dragon Crew Warrior" },
- ["Conjured Cocoa"] = { "Cocoa Warrior", "Chocolate Bar Battler" },
- Bones = { "Reborn Skeleton", "Demonic Soul", "Living Zombie", "Posessed Mummy" },
- }
- mobList = material and nameMaterials[material] or nil
- end
- -- Quest-driven mob
- local questTitle = t.PlayerGui.Main.Quest.Container.QuestTitle.Title
- local currentQuest = GetNameDoubleQuest()
- if not Settings["Farm Material"] and questGroup and Settings["Auto Quest [Katakuri/Bone/Tyrant]"] then
- if not t.PlayerGui.Main.Quest.Visible and t.Data.Level.Value >= (method == "Farm Katakuri" and 2275
- or method == "Farm Bones" and 2050 or 2575) then
- QuestBoneAndkatakuri(questGroup, method == "Farm Katakuri" and 2 or method == "Farm Bones" and 2 or 2)
- return
- end
- end
- local searchName = mobList or currentQuest or ""
- -- If no quest visible, take one
- if not t.PlayerGui.Main.Quest.Visible and type(searchName) == "string" and not Settings["Farm Material"] then
- TakeQuestLevel()
- return
- end
- -- Try to find a mob
- local mob = type(searchName) == "table" and DetectMob(searchName) or (type(searchName) == "string" and DetectMob(searchName) or nil)
- if not mob then
- if type(searchName) == "table" then
- if #N_scanState >= #searchName then N_scanState = {}; return end
- local nextName = DetectNameTablePart(searchName)
- local spawnPart = DetectPartSpawnMob(nextName)
- if spawnPart then
- table.insert(N_scanState, nextName)
- repeat
- task.wait(0.05)
- toTarget(spawnPart.CFrame * CFrame.new(0, 60, 0))
- until (spawnPart.Position - t.Character.HumanoidRootPart.Position).Magnitude <= 100
- or DetectMob(searchName)
- or not Settings["Start Farm"]
- task.wait(0.25)
- end
- elseif type(searchName) == "string" and searchName ~= "" then
- local spawnPart = DetectPartSpawnMob(searchName, true)
- if spawnPart then
- if not spawnPart:FindFirstChild("Ignored") then
- Instance.new("IntValue", spawnPart).Name = "Ignored"
- end
- repeat
- task.wait(0.05)
- toTarget(spawnPart.CFrame * CFrame.new(0, 60, 0))
- until (spawnPart.Position - t.Character.HumanoidRootPart.Position).Magnitude <= 100
- or DetectMob(searchName)
- or not Settings["Start Farm"]
- task.wait(0.25)
- else
- DeleteIgnoredMobSpawn()
- end
- end
- return
- end
- -- Attack loop
- repeat
- task.wait()
- if not IsMobAlive(mob) then break end
- sizepart(mob)
- BringMob(mob)
- FarmMastery(mob)
- if Settings["Select Weapon"] == "Blox Fruit" then
- toTarget(mob.HumanoidRootPart.CFrame * CFrame.new(-7, 20, 0))
- else
- toTarget(mob.HumanoidRootPart.CFrame * CFrame.new(7, 20, 0))
- end
- ClickM1(mob)
- until not IsMobAlive(mob) or not Settings["Start Farm"]
- end
- -- ============================================================================
- -- HOP SERVER
- -- ============================================================================
- function CheckJobIdServer()
- local keys = {}
- local ok, data = pcall(function()
- return HttpService:JSONDecode(readfile(FolderName .. "/Jobid.json"))
- end)
- if ok and type(data) == "table" then
- for k in pairs(data) do table.insert(keys, k) end
- end
- return keys
- end
- function HopServer()
- Notify("Gleavin Hub", "Hop Server")
- for page = 1, 100 do
- for jobId in pairs(ReplicatedStorage.__ServerBrowser:InvokeServer(page)) do
- if jobId ~= game.JobId and not table.find(CheckJobIdServer(), jobId) then
- pcall(function()
- ReplicatedStorage.__ServerBrowser:InvokeServer("teleport", jobId)
- end)
- return
- end
- end
- end
- end
- -- ============================================================================
- -- AUTO STATS
- -- ============================================================================
- task.spawn(function()
- while task.wait(0.3) do
- if Settings["Auto Stats"] then
- pcall(function()
- for stat, enabled in next, Settings["Select Stats"] or {}, nil do
- if enabled and t.Data.Points.Value > 0
- and t.Data.Stats[stat].Level.Value < 2800 then
- CommF:InvokeServer("AddPoint", stat, 9999)
- task.wait(3)
- end
- end
- end)
- end
- end
- end)
- -- ============================================================================
- -- BUSO / OBSERVATION / V3 / V4 LOOPS
- -- ============================================================================
- local function hasBusoLayer()
- for _, c in pairs(t.Character:GetChildren()) do
- if string.match(c.Name, "_BusoLayer1") then return c end
- end
- end
- task.spawn(function()
- while task.wait(1) do
- if Settings["Auto Turn On Buso"] then
- pcall(function()
- if not hasBusoLayer() and not t.Character:FindFirstChild("HasBuso") then
- CommF:InvokeServer("Buso")
- task.wait(2)
- end
- end)
- end
- end
- end)
- task.spawn(function()
- while task.wait(1) do
- if Settings["Auto Turn On Observation"] then
- pcall(function()
- if not Lighting.Blur.Enabled then
- VirtualInputManager:SendKeyEvent(true, "E", false, game)
- task.wait()
- VirtualInputManager:SendKeyEvent(false, "E", false, game)
- task.wait(3)
- end
- end)
- end
- end
- end)
- task.spawn(function()
- while task.wait(1) do
- if Settings["Auto Turn On V3"] then
- pcall(function()
- ReplicatedStorage.Remotes.CommE:FireServer("ActivateAbility")
- task.wait(2)
- end)
- end
- end
- end)
- local function TurnOnV4()
- local char = t.Character
- local energy = char and char:FindFirstChild("RaceEnergy")
- local transformed = char and char:FindFirstChild("RaceTransformed")
- if not energy or energy.Value < 1 or not transformed or transformed.Value then return end
- local awaken = t.Backpack:FindFirstChild("Awakening") or char:FindFirstChild("Awakening")
- if awaken then awaken.RemoteFunction:InvokeServer(true) end
- end
- task.spawn(function()
- while task.wait(1) do
- if Settings["Auto Turn On V4"] then pcall(TurnOnV4) end
- end
- end)
- -- ============================================================================
- -- AUTO NEW WORLD
- -- ============================================================================
- task.spawn(function()
- while task.wait() do
- pcall(function()
- if Settings["Auto New World"] and game.PlaceId == getgenv().CheckPlaceId3
- and t.Data.Level.Value >= 700 then
- if CommF:InvokeServer("DressrosaQuestProgress", "Dressrosa") ~= 0 then
- if workspace.Map.Ice.Door.CanCollide then
- if not t.Character:FindFirstChild("Key") and not t.Backpack:FindFirstChild("Key") then
- local pos = CFrame.new(4852.2895507813, 5.651451587677, 718.53070068359)
- if (pos.Position - t.Character.HumanoidRootPart.Position).Magnitude < 5 then
- CommF:InvokeServer("DressrosaQuestProgress", "Detective")
- equiptool("Key")
- else
- toTarget(pos)
- end
- else
- equiptool("Key")
- if t.Character:FindFirstChild("Key") then
- toTarget(workspace.Map.Ice.Door.CFrame)
- end
- end
- elseif CheckNameBoss("Ice Admiral") then
- local boss = CheckNameBoss("Ice Admiral")
- repeat
- task.wait()
- sizepart(boss)
- if Settings["Select Weapon"] == "Blox Fruit" then
- toTarget(boss.HumanoidRootPart.CFrame * CFrame.new(-7, 20, 0))
- else
- toTarget(boss.HumanoidRootPart.CFrame * CFrame.new(7, 20, 0))
- end
- ClickM1(boss)
- UsedualFlock()
- until not IsMobAlive(boss) or not Settings["Auto New World"]
- end
- else
- CommF:InvokeServer("TravelDressrosa")
- end
- end
- end)
- end
- end)
- -- ============================================================================
- -- DRIVER LOOPS
- -- ============================================================================
- spawn(function()
- while task.wait() do
- pcall(function()
- if Settings["Start Farm"] then
- FarmMethod()
- end
- end)
- end
- end)
- -- Noclip
- task.spawn(function()
- while task.wait() do
- if Settings["Noclip"] then
- pcall(function()
- local char = t.Character
- if char then
- for _, part in pairs(char:GetDescendants()) do
- if (part:IsA("MeshPart") or part:IsA("Part")) and part.CanCollide then
- part.CanCollide = false
- end
- end
- end
- end)
- end
- end
- end)
- -- Reset HP
- task.spawn(function()
- while task.wait(2) do
- pcall(function()
- if Settings["Auto Rejoin Disconnect"] then
- local errorPrompt = game:GetService("CoreGui"):FindFirstChild("RobloxPromptGui")
- if errorPrompt and errorPrompt:FindFirstChild("promptOverlay") then
- local msg = errorPrompt.promptOverlay:FindFirstChild("ErrorPrompt")
- if msg and msg:FindFirstChild("MessageArea") and msg.MessageArea:FindFirstChild("ErrorFrame") then
- local text = msg.MessageArea.ErrorFrame:FindFirstChild("ErrorMessage")
- if text and not string.find(text.Text, "Teleport") then
- game:GetService("TeleportService"):TeleportToPlaceInstance(game.PlaceId, game.JobId, t)
- end
- end
- end
- end
- end)
- end
- end)
- -- Metatable aimhook
- do
- local mt = getrawmetatable(game)
- local oldNamecall = mt.__namecall
- setreadonly(mt, false)
- mt.__namecall = newcclosure(function(self, ...)
- local method = getnamecallmethod()
- local args = { ... }
- local aimPos = getgenv().AimPos
- if method == "FireServer" and self.Name == "RemoteEvent" and aimPos
- and tostring(aimPos.X) ~= "nan"
- and (Settings["Start Farm"] or getgenv().Usefastattack) then
- if #args == 1 and typeof(args[1]) == "Vector3" then
- args[1] = aimPos.Position
- elseif #args == 1 and typeof(args[1]) == "CFrame" then
- args[1] = aimPos
- end
- end
- return oldNamecall(self, unpack(args))
- end)
- setreadonly(mt, true)
- end
- -- ============================================================================
- -- RAYFIELD UI
- -- ============================================================================
- local Window = Rayfield:CreateWindow({
- Name = "Gleavin Hub // Level Farm",
- LoadingTitle = "Gleavin Hub",
- LoadingSubtitle = "Level Farm",
- Theme = "Default",
- ConfigurationSaving = {
- Enabled = true,
- FolderName = "GleavinHub",
- FileName = "LevelFarmConfig"
- },
- KeySystem = false,
- })
- -- =========== TAB 1: FARM ===========
- local FarmTab = Window:CreateTab("Farm", 4483362458)
- FarmTab:CreateSection("Main Controls")
- FarmTab:CreateToggle({
- Name = "Start Farm",
- CurrentValue = Settings["Start Farm"] or false,
- Flag = "StartFarmFlag",
- Callback = function(v)
- Settings["Start Farm"] = v
- SaveSettings("Start Farm", v)
- end,
- })
- FarmTab:CreateDropdown({
- Name = "Method",
- Options = { "Level Farm", "Farm Bones", "Farm Katakuri", "Farm Tyrant of the Skies", "Aura Farm" },
- CurrentOption = Settings["Select Method Farm"] or "Level Farm",
- MultipleOptions = false,
- Flag = "MethodFlag",
- Callback = function(v)
- local m = type(v) == "table" and v[1] or v
- Settings["Select Method Farm"] = m
- SaveSettings("Select Method Farm", m)
- end,
- })
- FarmTab:CreateSlider({
- Name = "Aura Farm Distance",
- Range = { 0, 1000 },
- Increment = 10,
- Suffix = "studs",
- CurrentValue = Settings["Distance Farm Aura"] or 300,
- Flag = "DistanceAuraFlag",
- Callback = function(v)
- Settings["Distance Farm Aura"] = v
- SaveSettings("Distance Farm Aura", v)
- end,
- })
- FarmTab:CreateToggle({
- Name = "Auto Quest (Katakuri / Bone / Tyrant)",
- CurrentValue = Settings["Auto Quest [Katakuri/Bone/Tyrant]"] or false,
- Flag = "AutoQuestFlag",
- Callback = function(v)
- Settings["Auto Quest [Katakuri/Bone/Tyrant]"] = v
- SaveSettings("Auto Quest [Katakuri/Bone/Tyrant]", v)
- end,
- })
- FarmTab:CreateToggle({
- Name = "Ignore Attack Katakuri",
- CurrentValue = Settings["Ignore Attack Katakuri"] or false,
- Flag = "IgnoreKatakuriFlag",
- Callback = function(v)
- Settings["Ignore Attack Katakuri"] = v
- SaveSettings("Ignore Attack Katakuri", v)
- end,
- })
- FarmTab:CreateToggle({
- Name = "Hop Find Katakuri",
- CurrentValue = Settings["Hop Find Katakuri"] or false,
- Flag = "HopKatakuriFlag",
- Callback = function(v)
- Settings["Hop Find Katakuri"] = v
- SaveSettings("Hop Find Katakuri", v)
- end,
- })
- FarmTab:CreateSection("Mastery")
- FarmTab:CreateDropdown({
- Name = "Mastery Weapon",
- Options = { "Blox Fruit", "Gun" },
- CurrentOption = Settings["Select Method Farm Mastery"] or "Blox Fruit",
- MultipleOptions = false,
- Flag = "MasteryWeaponFlag",
- Callback = function(v)
- local m = type(v) == "table" and v[1] or v
- Settings["Select Method Farm Mastery"] = m
- SaveSettings("Select Method Farm Mastery", m)
- end,
- })
- FarmTab:CreateSlider({
- Name = "Health % Threshold",
- Range = { 0, 100 },
- Increment = 1,
- Suffix = "%",
- CurrentValue = Settings["Health %"] or 40,
- Flag = "HealthPctFlag",
- Callback = function(v)
- Settings["Health %"] = v
- SaveSettings("Health %", v)
- end,
- })
- FarmTab:CreateToggle({
- Name = "Farm Mastery",
- CurrentValue = Settings["Farm Mastery"] or false,
- Flag = "FarmMasteryFlag",
- Callback = function(v)
- Settings["Farm Mastery"] = v
- SaveSettings("Farm Mastery", v)
- if v and not Settings["Start Farm"] then
- Notify("Gleavin Hub", "Turn on Start Farm too")
- end
- end,
- })
- FarmTab:CreateSection("Material")
- FarmTab:CreateDropdown({
- Name = "Material",
- Options = { "Ectoplasm", "Magma Ore", "Leather", "Scrap Metal", "Angel Wings", "Fish Tail",
- "Radioactive Material", "Vampire Fang", "Mystic Droplet", "Mini Tusk", "Gunpowder",
- "Demonic Wisp", "Dragon Scale", "Conjured Cocoa", "Bones" },
- CurrentOption = Settings["Select Material"] or "Bones",
- MultipleOptions = false,
- Flag = "MaterialFlag",
- Callback = function(v)
- local m = type(v) == "table" and v[1] or v
- Settings["Select Material"] = m
- SaveSettings("Select Material", m)
- end,
- })
- FarmTab:CreateToggle({
- Name = "Farm Material",
- CurrentValue = Settings["Farm Material"] or false,
- Flag = "FarmMaterialFlag",
- Callback = function(v)
- Settings["Farm Material"] = v
- SaveSettings("Farm Material", v)
- if v and not Settings["Start Farm"] then
- Notify("Gleavin Hub", "Turn on Start Farm too")
- end
- end,
- })
- -- =========== TAB 2: COMBAT ===========
- local CombatTab = Window:CreateTab("Combat", 4483362458)
- CombatTab:CreateSection("Weapon")
- CombatTab:CreateDropdown({
- Name = "Select Weapon",
- Options = { "Melee", "Sword", "Blox Fruit" },
- CurrentOption = Settings["Select Weapon"] or "Melee",
- MultipleOptions = false,
- Flag = "WeaponFlag",
- Callback = function(v)
- local m = type(v) == "table" and v[1] or v
- Settings["Select Weapon"] = m
- SaveSettings("Select Weapon", m)
- end,
- })
- CombatTab:CreateToggle({
- Name = "Attack No Animation",
- CurrentValue = Settings["Attack No Animation "] == true,
- Flag = "NoAnimFlag",
- Callback = function(v)
- Settings["Attack No Animation "] = v
- SaveSettings("Attack No Animation ", v)
- end,
- })
- CombatTab:CreateSlider({
- Name = "Time Delay Kill",
- Range = { 0, 5 },
- Increment = 0.1,
- Suffix = "s",
- CurrentValue = Settings["Time Delay Kill"] or 5,
- Flag = "DelayKillFlag",
- Callback = function(v)
- Settings["Time Delay Kill"] = v
- SaveSettings("Time Delay Kill", v)
- end,
- })
- CombatTab:CreateToggle({
- Name = "Auto Click",
- CurrentValue = Settings["Auto Click"] or false,
- Flag = "AutoClickFlag",
- Callback = function(v)
- Settings["Auto Click"] = v
- SaveSettings("Auto Click", v)
- end,
- })
- CombatTab:CreateSection("Haki / Transform")
- CombatTab:CreateToggle({
- Name = "Auto Turn On Buso",
- CurrentValue = Settings["Auto Turn On Buso"] ~= false,
- Flag = "BusoFlag",
- Callback = function(v)
- Settings["Auto Turn On Buso"] = v
- SaveSettings("Auto Turn On Buso", v)
- end,
- })
- CombatTab:CreateToggle({
- Name = "Auto Turn On Observation",
- CurrentValue = Settings["Auto Turn On Observation"] or false,
- Flag = "ObsFlag",
- Callback = function(v)
- Settings["Auto Turn On Observation"] = v
- SaveSettings("Auto Turn On Observation", v)
- end,
- })
- CombatTab:CreateToggle({
- Name = "Auto Turn On V3",
- CurrentValue = Settings["Auto Turn On V3"] or false,
- Flag = "V3Flag",
- Callback = function(v)
- Settings["Auto Turn On V3"] = v
- SaveSettings("Auto Turn On V3", v)
- end,
- })
- CombatTab:CreateToggle({
- Name = "Auto Turn On V4",
- CurrentValue = Settings["Auto Turn On V4"] or false,
- Flag = "V4Flag",
- Callback = function(v)
- Settings["Auto Turn On V4"] = v
- SaveSettings("Auto Turn On V4", v)
- end,
- })
- CombatTab:CreateSection("Fast Attack")
- CombatTab:CreateToggle({
- Name = "Fast Attack",
- CurrentValue = Settings["Fast Attack"] or false,
- Flag = "FastAttackFlag",
- Callback = function(v)
- getgenv().Usefastattack = v
- getgenv().fastattect = v
- SaveSettings("Fast Attack", v)
- end,
- })
- CombatTab:CreateToggle({
- Name = "Super Fast Attack",
- CurrentValue = Settings["Super Fast Attack"] or false,
- Flag = "SuperFastFlag",
- Callback = function(v)
- getgenv().SuperFastAttack = v
- if v then
- getgenv().Usefastattack = true
- getgenv().fastattect = true
- end
- SaveSettings("Super Fast Attack", v)
- end,
- })
- CombatTab:CreateSection("Dodge")
- CombatTab:CreateToggle({
- Name = "Auto Dodge Skill Mobs",
- CurrentValue = Settings["Auto Dodge Skill Mobs"] or false,
- Flag = "DodgeFlag",
- Callback = function(v)
- Settings["Auto Dodge Skill Mobs"] = v
- SaveSettings("Auto Dodge Skill Mobs", v)
- end,
- })
- -- =========== TAB 3: MOVEMENT ===========
- local MoveTab = Window:CreateTab("Movement", 4483362458)
- MoveTab:CreateSection("Tween")
- MoveTab:CreateSlider({
- Name = "Speed Tween",
- Range = { 0, 1000 },
- Increment = 10,
- Suffix = "studs/s",
- CurrentValue = Settings["Speed Tween "] or 300,
- Flag = "SpeedTweenFlag",
- Callback = function(v)
- Settings["Speed Tween "] = v
- SaveSettings("Speed Tween ", v)
- end,
- })
- MoveTab:CreateToggle({
- Name = "Noclip",
- CurrentValue = Settings["Noclip"] or false,
- Flag = "NoclipFlag",
- Callback = function(v)
- Settings["Noclip"] = v
- SaveSettings("Noclip", v)
- end,
- })
- MoveTab:CreateSection("Bring Mob")
- MoveTab:CreateToggle({
- Name = "Bring Mob",
- CurrentValue = Settings["Bring Mob"] ~= false,
- Flag = "BringMobFlag",
- Callback = function(v)
- Settings["Bring Mob"] = v
- SaveSettings("Bring Mob", v)
- end,
- })
- MoveTab:CreateSlider({
- Name = "Bring Mob Count",
- Range = { 2, 6 },
- Increment = 1,
- CurrentValue = Settings["Bring Mob Count"] or 2,
- Flag = "BringCountFlag",
- Callback = function(v)
- Settings["Bring Mob Count"] = v
- SaveSettings("Bring Mob Count", v)
- end,
- })
- MoveTab:CreateSection("Health Safety")
- MoveTab:CreateToggle({
- Name = "Teleport Y if low health",
- CurrentValue = Settings["Teleport Y"] or false,
- Flag = "TeleportYFlag",
- Callback = function(v)
- Settings["Teleport Y"] = v
- SaveSettings("Teleport Y", v)
- end,
- })
- MoveTab:CreateSlider({
- Name = "Health % Threshold",
- Range = { 0, 100 },
- Increment = 1,
- Suffix = "%",
- CurrentValue = Settings["% Health Player"] or 40,
- Flag = "HPThresholdFlag",
- Callback = function(v)
- Settings["% Health Player"] = v
- SaveSettings("% Health Player", v)
- end,
- })
- MoveTab:CreateSlider({
- Name = "Y Teleport Distance",
- Range = { 0, 10000 },
- Increment = 50,
- Suffix = "studs",
- CurrentValue = Settings["Distance Teleport Y"] or 800,
- Flag = "DistanceYFlag",
- Callback = function(v)
- Settings["Distance Teleport Y"] = v
- SaveSettings("Distance Teleport Y", v)
- end,
- })
- -- =========== TAB 4: STATS ===========
- local StatsTab = Window:CreateTab("Stats", 4483362458)
- StatsTab:CreateSection("Point Allocation")
- StatsTab:CreateDropdown({
- Name = "Select Stats",
- Options = { "Melee", "Defense", "Sword", "Gun", "Demon Fruit" },
- CurrentOption = (function()
- local saved = {}
- for k, v in pairs(Settings["Select Stats"] or {}) do
- if v then table.insert(saved, k) end
- end
- if #saved == 0 then table.insert(saved, "Melee") end
- return saved
- end)(),
- MultipleOptions = true,
- Flag = "StatsFlag",
- Callback = function(v)
- local stats = {}
- for _, name in ipairs(v) do stats[name] = true end
- Settings["Select Stats"] = stats
- SaveSettings("Select Stats", stats)
- end,
- })
- StatsTab:CreateToggle({
- Name = "Auto Stats",
- CurrentValue = Settings["Auto Stats"] or false,
- Flag = "AutoStatsFlag",
- Callback = function(v)
- Settings["Auto Stats"] = v
- SaveSettings("Auto Stats", v)
- end,
- })
- StatsTab:CreateSection("Team")
- StatsTab:CreateDropdown({
- Name = "Select Team",
- Options = { "Pirate", "Marine" },
- CurrentOption = Settings["Select Team"] or "Pirate",
- MultipleOptions = false,
- Flag = "TeamFlag",
- Callback = function(v)
- local m = type(v) == "table" and v[1] or v
- Settings["Select Team"] = m
- SaveSettings("Select Team", m)
- end,
- })
- StatsTab:CreateButton({
- Name = "Change Team",
- Callback = function()
- local team = Settings["Select Team"] or "Pirate"
- pcall(function()
- CommF:InvokeServer("SetTeam", team == "Pirate" and "Pirates" or "Marines")
- end)
- Notify("Gleavin Hub", "Team change sent: " .. team)
- end,
- })
- -- =========== TAB 5: WORLD ===========
- local WorldTab = Window:CreateTab("World", 4483362458)
- WorldTab:CreateSection("Sea Progression")
- WorldTab:CreateToggle({
- Name = "Auto New World (Sea 2)",
- CurrentValue = Settings["Auto New World"] or false,
- Flag = "NewWorldFlag",
- Callback = function(v)
- Settings["Auto New World"] = v
- SaveSettings("Auto New World", v)
- end,
- })
- WorldTab:CreateSection("Server Hop")
- WorldTab:CreateSlider({
- Name = "Time Hop Server",
- Range = { 0, 60 },
- Increment = 1,
- Suffix = "s",
- CurrentValue = Settings["Time Hop Server"] or 10,
- Flag = "HopTimeFlag",
- Callback = function(v)
- Settings["Time Hop Server"] = v
- SaveSettings("Time Hop Server", v)
- end,
- })
- WorldTab:CreateButton({
- Name = "Hop Server",
- Callback = function()
- HopServer()
- end,
- })
- WorldTab:CreateToggle({
- Name = "Auto Rejoin Disconnect",
- CurrentValue = Settings["Auto rejoin Disconnect"] or false,
- Flag = "RejoinFlag",
- Callback = function(v)
- Settings["Auto rejoin Disconnect"] = v
- SaveSettings("Auto rejoin Disconnect", v)
- end,
- })
- -- =========== TAB 6: SKILLS ===========
- local SkillsTab = Window:CreateTab("Skills", 4483362458)
- local function skillDefault(key, list, fallback)
- local saved = Settings[key]
- if type(saved) ~= "table" then
- return fallback
- end
- local out = {}
- for _, name in ipairs(list) do
- if saved[name] ~= false then table.insert(out, name) end
- end
- return out
- end
- SkillsTab:CreateSection("Melee (Z / X / C)")
- SkillsTab:CreateDropdown({
- Name = "Melee Skills",
- Options = { "Z", "X", "C" },
- CurrentOption = skillDefault("Select Skills Melee", { "Z", "X", "C" }, { "Z", "X", "C" }),
- MultipleOptions = true,
- Flag = "MeleeSkillsFlag",
- Callback = function(v)
- local out = {}
- for _, name in ipairs(v) do out[name] = true end
- Settings["Select Skills Melee"] = out
- SaveSettings("Select Skills Melee", out)
- end,
- })
- SkillsTab:CreateSection("Sword (Z / X)")
- SkillsTab:CreateDropdown({
- Name = "Sword Skills",
- Options = { "Z", "X" },
- CurrentOption = skillDefault("Select Skills Sword", { "Z", "X" }, { "Z", "X" }),
- MultipleOptions = true,
- Flag = "SwordSkillsFlag",
- Callback = function(v)
- local out = {}
- for _, name in ipairs(v) do out[name] = true end
- Settings["Select Skills Sword"] = out
- SaveSettings("Select Skills Sword", out)
- end,
- })
- SkillsTab:CreateSection("Gun (Z / X)")
- SkillsTab:CreateDropdown({
- Name = "Gun Skills",
- Options = { "Z", "X" },
- CurrentOption = skillDefault("Select Skills Gun", { "Z", "X" }, { "Z", "X" }),
- MultipleOptions = true,
- Flag = "GunSkillsFlag",
- Callback = function(v)
- local out = {}
- for _, name in ipairs(v) do out[name] = true end
- Settings["Select Skills Gun"] = out
- SaveSettings("Select Skills Gun", out)
- end,
- })
- SkillsTab:CreateSection("Blox Fruit (Z / X / C / V / F)")
- SkillsTab:CreateDropdown({
- Name = "Fruit Skills",
- Options = { "Z", "X", "C", "V", "F" },
- CurrentOption = skillDefault("Select Skills Blox Fruit", { "Z", "X", "C", "V", "F" }, { "Z", "X", "C", "V", "F" }),
- MultipleOptions = true,
- Flag = "FruitSkillsFlag",
- Callback = function(v)
- local out = {}
- for _, name in ipairs(v) do out[name] = true end
- Settings["Select Skills Blox Fruit"] = out
- SaveSettings("Select Skills Blox Fruit", out)
- end,
- })
- SkillsTab:CreateSection("Timing")
- SkillsTab:CreateToggle({
- Name = "Use Skill Fast (No Hold)",
- CurrentValue = Settings["Use skill fast dont hold"] or false,
- Flag = "FastSkillFlag",
- Callback = function(v)
- Settings["Use skill fast dont hold"] = v
- SaveSettings("Use skill fast dont hold", v)
- end,
- })
- -- =========== TAB 7: INFO ===========
- local InfoTab = Window:CreateTab("Info", 4483362458)
- InfoTab:CreateSection("Gleavin Hub // Level Farm")
- InfoTab:CreateParagraph({
- Title = "How to use",
- Content = "1. Select Weapon (Combat tab)\n" ..
- "2. Choose Method (Farm tab)\n" ..
- "3. Toggle Start Farm (Farm tab)\n" ..
- "4. Bot walks to mobs and kills them\n\n" ..
- "If you need a different hub (Chest Farm, Sea Event, etc.), unload this one first — do not run two Gleavin Hub scripts at once.",
- })
- InfoTab:CreateButton({
- Name = "Unload Gleavin Hub",
- Callback = function()
- getgenv().__GLEAVIN_LEVEL_LOADED = false
- if Rayfield and Rayfield.Destroy then Rayfield:Destroy() end
- end,
- })
- -- ============================================================================
- -- INITIALIZE
- -- ============================================================================
- Rayfield:LoadConfiguration()
- Notify("Gleavin Hub", "Level Farm loaded")
Advertisement