Geavin

Idk farm

Oct 22nd, 2026
7
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 18.14 KB | None | 0 0
  1. -- ============================================================================
  2. -- GLEAVIN HUB // LEVEL FARM (Custom Lightweight UI)
  3. -- ============================================================================
  4.  
  5. task.spawn(function()
  6. if getgenv().__GLEAVIN_LEVEL_LOADED then return end
  7. getgenv().__GLEAVIN_LEVEL_LOADED = true
  8.  
  9. -- Services
  10. local Players = game:GetService("Players")
  11. local RunService = game:GetService("RunService")
  12. local TweenService = game:GetService("TweenService")
  13. local ReplicatedStorage = game:GetService("ReplicatedStorage")
  14. local VirtualInputManager = game:GetService("VirtualInputManager")
  15. local HttpService = game:GetService("HttpService")
  16. local LP = Players.LocalPlayer
  17. local t = LP
  18.  
  19. local CommF = ReplicatedStorage:WaitForChild("Remotes"):WaitForChild("CommF_")
  20. local UserInputService = game:GetService("UserInputService")
  21.  
  22. -- Safe Wait for Game Load
  23. local startWait = tick()
  24. while not (game:IsLoaded() and LP:FindFirstChild("DataLoaded")) do
  25. if tick() - startWait > 15 then break end
  26. task.wait(0.5)
  27. end
  28.  
  29. -- Settings Table
  30. local Settings = {
  31. StartFarm = false,
  32. Weapon = "Melee",
  33. FastAttack = false,
  34. SpeedTween = 300,
  35. AutoQuest = true,
  36. }
  37.  
  38. -- ============================================================================
  39. -- CORE LOGIC
  40. -- ============================================================================
  41. local function getHRP()
  42. local c = t.Character or t.CharacterAdded:Wait()
  43. return c:FindFirstChild("HumanoidRootPart")
  44. end
  45.  
  46. getgenv().TweenManager = {
  47. currentTween = nil,
  48. CancelTweenOnly = function()
  49. if getgenv().TweenManager.currentTween then
  50. pcall(function() getgenv().TweenManager.currentTween:Cancel() end)
  51. getgenv().TweenManager.currentTween = nil
  52. end
  53. end,
  54. PlayTween = function(part, info, goal)
  55. getgenv().TweenManager.CancelTweenOnly()
  56. local tw = TweenService:Create(part, info, goal)
  57. getgenv().TweenManager.currentTween = tw
  58. tw:Play()
  59. return tw
  60. end
  61. }
  62. TweenManager = getgenv().TweenManager
  63.  
  64. function toTarget(P, skipCheck)
  65. if typeof(P) ~= "CFrame" then return end
  66. local char = t.Character
  67. if not char then return end
  68. local hrp = char:FindFirstChild("HumanoidRootPart")
  69. if not hrp then return end
  70.  
  71. if not hrp:FindFirstChild("FloatForce") then
  72. local bv = Instance.new("BodyVelocity")
  73. bv.Name = "FloatForce"
  74. bv.Velocity = Vector3.new(0, 0, 0)
  75. bv.MaxForce = Vector3.new(100000, 100000, 100000)
  76. bv.Parent = hrp
  77. end
  78.  
  79. local dist = (P.Position - hrp.Position).Magnitude
  80. if dist < (skipCheck and 8 or 150) then
  81. TweenManager.CancelTweenOnly()
  82. hrp.CFrame = P
  83. return
  84. end
  85.  
  86. local speed = Settings.SpeedTween or 300
  87. TweenManager.PlayTween(hrp, TweenInfo.new(dist / speed, Enum.EasingStyle.Linear), { CFrame = P })
  88. end
  89.  
  90. function equiptool(name)
  91. if name and t:FindFirstChild("Backpack") and t.Backpack:FindFirstChild(name) then
  92. t.Character.Humanoid:EquipTool(t.Backpack:FindFirstChild(name))
  93. end
  94. end
  95.  
  96. function NameWeapon(tooltip, returnTool)
  97. local function find(container)
  98. for _, item in pairs(container:GetChildren()) do
  99. if item:IsA("Tool") and item.ToolTip == tooltip then return returnTool and item or item.Name end
  100. end
  101. end
  102. return find(t.Backpack) or find(t.Character)
  103. end
  104.  
  105. function UsedualFlock() equiptool(NameWeapon(Settings.Weapon or "Melee")) end
  106.  
  107. -- Combat
  108. local G_Combat, NetMod
  109. pcall(function()
  110. G_Combat = require(ReplicatedStorage.Modules.CombatUtil)
  111. NetMod = require(ReplicatedStorage.Modules.Net)
  112. end)
  113.  
  114. local RegisterAttack = ReplicatedStorage.Modules.Net:WaitForChild("RE/RegisterAttack")
  115. local RegisterHit = NetMod and NetMod:RemoteEvent("RegisterHit", true)
  116.  
  117. local function AttackAOE(radius)
  118. local found = {}
  119. local myHRP = t.Character.HumanoidRootPart
  120. for _, mob in pairs(workspace.Enemies:GetChildren()) do
  121. if mob:FindFirstChild("HumanoidRootPart") and mob.Humanoid.Health > 0 then
  122. if (mob.HumanoidRootPart.Position - myHRP.Position).Magnitude <= radius + 15 then
  123. table.insert(found, { mob, mob.HumanoidRootPart })
  124. end
  125. end
  126. end
  127. return #found > 0 and found or nil
  128. end
  129.  
  130. function AttackFunction(radius)
  131. if t.Character.Stun.Value ~= 0 then return end
  132. local hits = AttackAOE(radius)
  133. if not hits then return end
  134. if RegisterAttack and RegisterHit then
  135. RegisterAttack:FireServer(0)
  136. RegisterHit:FireServer(table.remove(hits, 1)[2], hits)
  137. end
  138. end
  139.  
  140. function ClickM1(mob, isBoat)
  141. if not mob or not mob:FindFirstChild("HumanoidRootPart") then return end
  142. if Settings.Weapon == "Blox Fruit" then
  143. local fruitTool = t.Character:FindFirstChild(NameWeapon("Blox Fruit"))
  144. if fruitTool and fruitTool:FindFirstChild("LeftClickRemote") then
  145. local lookDir = (mob.HumanoidRootPart.Position - t.Character.HumanoidRootPart.Position).Unit
  146. fruitTool.LeftClickRemote:FireServer(lookDir, math.random(1, 5))
  147. return
  148. end
  149. end
  150. AttackFunction(isBoat and 80 or 30)
  151. end
  152.  
  153. -- Fast Attack
  154. local CombatFrameworkR = nil
  155. pcall(function()
  156. local cfMod = require(t.PlayerScripts:WaitForChild("CombatFramework"))
  157. local ups = getupvalues or (debug and debug.getupvalues)
  158. CombatFrameworkR = ups and ups(cfMod) and ups(cfMod)[2]
  159. end)
  160.  
  161. task.spawn(function()
  162. while task.wait() do
  163. if Settings.FastAttack and CombatFrameworkR and CombatFrameworkR.activeController then
  164. pcall(function()
  165. local c = CombatFrameworkR.activeController
  166. c.hitboxMagnitude = 60
  167. c.timeToNextAttack = 0
  168. c.attacking = false
  169. if c.attack then c:attack() end
  170. end)
  171. end
  172. end
  173. end)
  174.  
  175. -- Mob Detection
  176. function IsMobAlive(mob)
  177. return mob and mob.Parent and mob:FindFirstChild("HumanoidRootPart") and mob.Humanoid.Health > 0
  178. end
  179.  
  180. function DetectMob(nameOrList)
  181. local best, bestDist = nil, math.huge
  182. for _, mob in pairs(workspace.Enemies:GetChildren()) do
  183. if (typeof(nameOrList) == "table" and table.find(nameOrList, mob.Name) or mob.Name == nameOrList) and IsMobAlive(mob) then
  184. local d = (mob.HumanoidRootPart.Position - t.Character.HumanoidRootPart.Position).Magnitude
  185. if d < bestDist then bestDist, best = d, mob end
  186. end
  187. end
  188. return best
  189. end
  190.  
  191. function sizepart(mob)
  192. if t:DistanceFromCharacter(mob.HumanoidRootPart.Position) <= 50 then
  193. for _, part in pairs(mob:GetDescendants()) do if part:IsA("BasePart") and part.CanCollide then part.CanCollide = false end end
  194. end
  195. end
  196.  
  197. -- Quest Logic
  198. function TakeQuestLevel()
  199. local quests = {
  200. {lvl = 1, name = "Bandit", quest = "BanditQuest1", id = 1},
  201. {lvl = 10, name = "Monkey", quest = "JungleQuest", id = 1},
  202. {lvl = 15, name = "Gorilla", quest = "JungleQuest", id = 2},
  203. {lvl = 30, name = "Pirate", quest = "BuggyQuest1", id = 1},
  204. {lvl = 60, name = "Desert Bandit", quest = "DesertQuest", id = 1},
  205. {lvl = 90, name = "Snow Bandit", quest = "SnowQuest", id = 1},
  206. {lvl = 120, name = "Chief Petty Officer", quest = "MarineQuest2", id = 1},
  207. {lvl = 150, name = "Sky Bandit", quest = "SkyQuest", id = 1},
  208. }
  209. local currentLvl = t.Data.Level.Value
  210. local target = nil
  211. for _, q in ipairs(quests) do if currentLvl >= q.lvl then target = q end end
  212. if target then
  213. CommF:InvokeServer("StartQuest", target.quest, target.id)
  214. end
  215. end
  216.  
  217. -- Main Farm Loop
  218. function FarmMethod()
  219. if not t.PlayerGui.Main.Quest.Visible then
  220. if Settings.AutoQuest then TakeQuestLevel() end
  221. task.wait(1)
  222. return
  223. end
  224.  
  225. local questTitle = t.PlayerGui.Main.Quest.Container.QuestTitle.Title.Text
  226. local mobName = ""
  227. for word in string.gmatch(questTitle, "%[([^%]]+)%]") do mobName = word end
  228. if mobName == "" then mobName = string.match(questTitle, "Defeat %d+ (.*)") end
  229. if not mobName or mobName == "" then return end
  230.  
  231. local mob = DetectMob(mobName)
  232. if mob then
  233. repeat
  234. task.wait()
  235. if not IsMobAlive(mob) then break end
  236. sizepart(mob)
  237. UsedualFlock()
  238. if Settings.Weapon == "Blox Fruit" then
  239. toTarget(mob.HumanoidRootPart.CFrame * CFrame.new(-7, 20, 0))
  240. else
  241. toTarget(mob.HumanoidRootPart.CFrame * CFrame.new(7, 20, 0))
  242. end
  243. ClickM1(mob)
  244. until not IsMobAlive(mob) or not Settings.StartFarm
  245. else
  246. task.wait(1)
  247. end
  248. end
  249.  
  250. task.spawn(function()
  251. while task.wait(0.1) do
  252. if Settings.StartFarm then
  253. pcall(FarmMethod)
  254. end
  255. end
  256. end)
  257.  
  258. -- ============================================================================
  259. -- CUSTOM LIGHTWEIGHT UI (Mobile Friendly, Zero HTTP Requests)
  260. -- ============================================================================
  261. local ScreenGui = Instance.new("ScreenGui")
  262. ScreenGui.Name = "GleavinHubUI"
  263. ScreenGui.ResetOnSpawn = false
  264. ScreenGui.Parent = game:GetService("CoreGui")
  265.  
  266. local MainFrame = Instance.new("Frame")
  267. MainFrame.Size = UDim2.new(0, 260, 0, 350)
  268. MainFrame.Position = UDim2.new(0.5, -130, 0.5, -175)
  269. MainFrame.BackgroundColor3 = Color3.fromRGB(20, 20, 25)
  270. MainFrame.BorderSizePixel = 0
  271. MainFrame.Active = true
  272. MainFrame.Draggable = true
  273. MainFrame.Parent = ScreenGui
  274.  
  275. local UICorner = Instance.new("UICorner")
  276. UICorner.CornerRadius = UDim.new(0, 8)
  277. UICorner.Parent = MainFrame
  278.  
  279. local TitleBar = Instance.new("Frame")
  280. TitleBar.Size = UDim2.new(1, 0, 0, 40)
  281. TitleBar.BackgroundColor3 = Color3.fromRGB(30, 30, 40)
  282. TitleBar.BorderSizePixel = 0
  283. TitleBar.Parent = MainFrame
  284.  
  285. local TitleCorner = Instance.new("UICorner")
  286. TitleCorner.CornerRadius = UDim.new(0, 8)
  287. TitleCorner.Parent = TitleBar
  288.  
  289. local TitleText = Instance.new("TextLabel")
  290. TitleText.Size = UDim2.new(1, -20, 1, 0)
  291. TitleText.Position = UDim2.new(0, 10, 0, 0)
  292. TitleText.BackgroundTransparency = 1
  293. TitleText.Text = "Gleavin Hub // Level Farm"
  294. TitleText.TextColor3 = Color3.fromRGB(255, 255, 255)
  295. TitleText.Font = Enum.Font.GothamBold
  296. TitleText.TextSize = 14
  297. TitleText.TextXAlignment = Enum.TextXAlignment.Left
  298. TitleText.Parent = TitleBar
  299.  
  300. local ScrollFrame = Instance.new("ScrollingFrame")
  301. ScrollFrame.Size = UDim2.new(1, -20, 1, -50)
  302. ScrollFrame.Position = UDim2.new(0, 10, 0, 45)
  303. ScrollFrame.BackgroundTransparency = 1
  304. ScrollFrame.BorderSizePixel = 0
  305. ScrollFrame.ScrollBarThickness = 2
  306. ScrollFrame.ScrollBarImageColor3 = Color3.fromRGB(100, 100, 120)
  307. ScrollFrame.CanvasSize = UDim2.new(0, 0, 0, 0)
  308. ScrollFrame.Parent = MainFrame
  309.  
  310. local UIListLayout = Instance.new("UIListLayout")
  311. UIListLayout.Padding = UDim.new(0, 8)
  312. UIListLayout.Parent = ScrollFrame
  313.  
  314. -- Helper: Toggle Button
  315. local function CreateToggle(name, defaultState, callback)
  316. local Btn = Instance.new("TextButton")
  317. Btn.Size = UDim2.new(1, -6, 0, 35)
  318. Btn.BackgroundColor3 = defaultState and Color3.fromRGB(40, 150, 60) or Color3.fromRGB(40, 40, 50)
  319. Btn.BorderSizePixel = 0
  320. Btn.Text = name .. (defaultState and " [ON]" or " [OFF]")
  321. Btn.TextColor3 = Color3.fromRGB(255, 255, 255)
  322. Btn.Font = Enum.Font.GothamMedium
  323. Btn.TextSize = 13
  324. Btn.Parent = ScrollFrame
  325.  
  326. local c = Instance.new("UICorner")
  327. c.CornerRadius = UDim.new(0, 6)
  328. c.Parent = Btn
  329.  
  330. local state = defaultState
  331. Btn.MouseButton1Click:Connect(function()
  332. state = not state
  333. Btn.BackgroundColor3 = state and Color3.fromRGB(40, 150, 60) or Color3.fromRGB(40, 40, 50)
  334. Btn.Text = name .. (state and " [ON]" or " [OFF]")
  335. callback(state)
  336. end)
  337. end
  338.  
  339. -- Helper: Dropdown (cycles on click for mobile simplicity)
  340. local function CreateDropdown(name, options, default, callback)
  341. local Btn = Instance.new("TextButton")
  342. Btn.Size = UDim2.new(1, -6, 0, 35)
  343. Btn.BackgroundColor3 = Color3.fromRGB(40, 40, 50)
  344. Btn.BorderSizePixel = 0
  345. Btn.Text = name .. ": " .. default
  346. Btn.TextColor3 = Color3.fromRGB(255, 255, 255)
  347. Btn.Font = Enum.Font.GothamMedium
  348. Btn.TextSize = 13
  349. Btn.Parent = ScrollFrame
  350.  
  351. local c = Instance.new("UICorner")
  352. c.CornerRadius = UDim.new(0, 6)
  353. c.Parent = Btn
  354.  
  355. local currentIdx = 1
  356. for i, v in ipairs(options) do if v == default then currentIdx = i break end end
  357.  
  358. Btn.MouseButton1Click:Connect(function()
  359. currentIdx = currentIdx + 1
  360. if currentIdx > #options then currentIdx = 1 end
  361. local newVal = options[currentIdx]
  362. Btn.Text = name .. ": " .. newVal
  363. callback(newVal)
  364. end)
  365. end
  366.  
  367. -- Helper: Slider (+/- Buttons for mobile)
  368. local function CreateSlider(name, min, max, default, callback)
  369. local Frame = Instance.new("Frame")
  370. Frame.Size = UDim2.new(1, -6, 0, 40)
  371. Frame.BackgroundColor3 = Color3.fromRGB(40, 40, 50)
  372. Frame.BorderSizePixel = 0
  373. Frame.Parent = ScrollFrame
  374. local c = Instance.new("UICorner")
  375. c.CornerRadius = UDim.new(0, 6)
  376. c.Parent = Frame
  377.  
  378. local Label = Instance.new("TextLabel")
  379. Label.Size = UDim2.new(1, -60, 1, 0)
  380. Label.Position = UDim2.new(0, 10, 0, 0)
  381. Label.BackgroundTransparency = 1
  382. Label.Text = name .. ": " .. default
  383. Label.TextColor3 = Color3.fromRGB(255, 255, 255)
  384. Label.Font = Enum.Font.GothamMedium
  385. Label.TextSize = 12
  386. Label.TextXAlignment = Enum.TextXAlignment.Left
  387. Label.Parent = Frame
  388.  
  389. local Minus = Instance.new("TextButton")
  390. Minus.Size = UDim2.new(0, 25, 0, 25)
  391. Minus.Position = UDim2.new(1, -60, 0.5, -12.5)
  392. Minus.BackgroundColor3 = Color3.fromRGB(30, 30, 40)
  393. Minus.Text = "-"
  394. Minus.TextColor3 = Color3.fromRGB(255, 255, 255)
  395. Minus.Parent = Frame
  396.  
  397. local Plus = Instance.new("TextButton")
  398. Plus.Size = UDim2.new(0, 25, 0, 25)
  399. Plus.Position = UDim2.new(1, -30, 0.5, -12.5)
  400. Plus.BackgroundColor3 = Color3.fromRGB(30, 30, 40)
  401. Plus.Text = "+"
  402. Plus.TextColor3 = Color3.fromRGB(255, 255, 255)
  403. Plus.Parent = Frame
  404.  
  405. local val = default
  406. local step = math.max(1, math.floor((max - min) / 20))
  407.  
  408. local function update()
  409. val = math.clamp(val, min, max)
  410. Label.Text = name .. ": " .. val
  411. callback(val)
  412. end
  413.  
  414. Minus.MouseButton1Click:Connect(function() val = val - step; update() end)
  415. Plus.MouseButton1Click:Connect(function() val = val + step; update() end)
  416. end
  417.  
  418. -- Build UI Elements
  419. CreateToggle("Start Farm", Settings.StartFarm, function(v) Settings.StartFarm = v end)
  420. CreateDropdown("Select Weapon", {"Melee", "Sword", "Blox Fruit"}, Settings.Weapon, function(v) Settings.Weapon = v end)
  421. CreateToggle("Fast Attack", Settings.FastAttack, function(v) Settings.FastAttack = v end)
  422. CreateToggle("Auto Quest", Settings.AutoQuest, function(v) Settings.AutoQuest = v end)
  423. CreateSlider("Tween Speed", 50, 500, Settings.SpeedTween, function(v) Settings.SpeedTween = v end)
  424.  
  425. -- Update Canvas Size dynamically
  426. UIListLayout:GetPropertyChangedSignal("AbsoluteContentSize"):Connect(function()
  427. ScrollFrame.CanvasSize = UDim2.new(0, 0, 0, UIListLayout.AbsoluteContentSize.Y + 20)
  428. end)
  429.  
  430. -- Close Button
  431. local CloseBtn = Instance.new("TextButton")
  432. CloseBtn.Size = UDim2.new(0, 30, 0, 30)
  433. CloseBtn.Position = UDim2.new(1, -35, 0, 5)
  434. CloseBtn.BackgroundColor3 = Color3.fromRGB(200, 50, 50)
  435. CloseBtn.Text = "X"
  436. CloseBtn.TextColor3 = Color3.fromRGB(255, 255, 255)
  437. CloseBtn.Font = Enum.Font.GothamBold
  438. CloseBtn.TextSize = 14
  439. CloseBtn.Parent = TitleBar
  440. local cc = Instance.new("UICorner")
  441. cc.CornerRadius = UDim.new(0, 6)
  442. cc.Parent = CloseBtn
  443.  
  444. CloseBtn.MouseButton1Click:Connect(function()
  445. ScreenGui:Destroy()
  446. getgenv().__GLEAVIN_LEVEL_LOADED = false
  447. end)
  448.  
  449. -- Notification Popup
  450. local NotifyFrame = Instance.new("Frame")
  451. NotifyFrame.Size = UDim2.new(0, 200, 0, 40)
  452. NotifyFrame.Position = UDim2.new(0.5, -100, 0, 20)
  453. NotifyFrame.BackgroundColor3 = Color3.fromRGB(40, 150, 60)
  454. NotifyFrame.Parent = ScreenGui
  455. local nc = Instance.new("UICorner")
  456. nc.CornerRadius = UDim.new(0, 6)
  457. nc.Parent = NotifyFrame
  458. local NText = Instance.new("TextLabel")
  459. NText.Size = UDim2.new(1, 0, 1, 0)
  460. NText.BackgroundTransparency = 1
  461. NText.Text = "Gleavin Hub Loaded!"
  462. NText.TextColor3 = Color3.fromRGB(255, 255, 255)
  463. NText.Font = Enum.Font.GothamBold
  464. NText.Parent = NotifyFrame
  465.  
  466. task.delay(3, function()
  467. NotifyFrame:Destroy()
  468. end)
  469. end)
Advertisement
Add Comment
Please, Sign In to add comment