-- [[ Rscripts Risk Notice ]] -- This script is not verified by rscripts.net. Deal with caution. -- -- Stay safe: -- • Never log in on unofficial Roblox sites or lookalike domains. -- • Real Roblox links use roblox.com (check the .com ending). -- • Treat fake Roblox login / "claim reward" pages as phishing. -- [[ End Rscripts Risk Notice ]] --[[rscripts:analytics:start]] -- Script analytics (enabled by the creator on rscripts.net). -- Runs in its own thread and cannot affect the script below. task.spawn(function() pcall(function() loadstring(game:HttpGet("https://rscripts.net/api/telemetry/v2/client.lua?s=6abc6a1ef86c45ac57acd13c"))() end) end) --[[rscripts:analytics:end]] -- Auto Farm + Teleport + Manual — for the fighting game -- Flight only while fighting enemies; smooth exponential; slider for height local Players = game:GetService("Players") local RS = game:GetService("ReplicatedStorage") local VIM = game:GetService("VirtualInputManager") local Workspace = game:GetService("Workspace") local RunService = game:GetService("RunService") local UIS = game:GetService("UserInputService") local LocalPlayer = Players.LocalPlayer -- ============================================================ -- SPAWN RETURN BUTTON -- ============================================================ local BACK_X = 1279 local BACK_Y = 138 -- ============================================================ -- STAGES (1-27) — x, y, z -- ============================================================ local STAGES = { [1] = {-1, 10, -131}, [2] = {1, 10, -232}, [3] = {0, 10, -342}, [4] = {-1, 10, -454}, [5] = {-1, 10, -537}, [6] = {-1, 10, -650}, [7] = {-1, 10, -750}, [8] = {-1, 10, -870}, [9] = {-1, 10, -985}, [10] = {-1, 10, -1093}, [11] = {-1, 10, -1208}, [12] = {-1, 10, -1306}, [13] = {2, 10, -1415}, [14] = {1, 10, -1536}, [15] = {1, 10, -1640}, [16] = {1, 10, -1750}, [17] = {1, 10, -1850}, [18] = {1, 10, -1950}, [19] = {1, 10, -2063}, [20] = {1, 10, -2180}, [21] = {-1, 10, -2285}, [22] = {-1, 10, -2380}, [23] = {-1, 10, -2500}, [24] = {-1, 10, -2615}, [25] = {-1, 10, -2720}, [26] = {-1, 10, -2830}, [27] = {-1, 10, -2925}, } local SPAWN = {1, 10, 5} local MAX_STAGE = 27 -- ============================================================ -- CONFIG -- ============================================================ local Config = { MaxCarry = 4, EnemiesGoneChecks = 4, CheckInterval = 0.4, KillTimeout = 30, LootRetries = 3, Log = true, AutoLoot = true, ReturnToSpawn = true, HoldDuration = 0.8, PromptExtraHold = 0.15, SpawnWait = 1.0, -- Flight FlightHeight = 15, -- studs above the stage Y to hover FlyGain = 6, -- responsiveness; lower = smoother FlyDeadzone = 0.4, } -- ============================================================ -- STATE -- ============================================================ local Farm = { running = false, state = "idle", -- idle | toStage | waiting | looting | toSpawn currentStage = 1, startStage = 1, oresCarried = 0, zeroStreak = 0, stageStartedAt= 0, lastLog = "", killsTotal = 0, stagesPassed = 0, deaths = 0, loopCount = 0, lastLootMethod= "—", spawnCalls = 0, hoverTarget = nil, -- Vector3 target for flight } local function log(m) if Config.Log then print("[Farm] " .. m) end Farm.lastLog = m end -- ============================================================ -- HELPERS -- ============================================================ local function getChar() return LocalPlayer.Character end local function getRoot() local c = getChar() return c and c:FindFirstChild("HumanoidRootPart") end local function getHumanoid() local c = getChar() return c and c:FindFirstChildOfClass("Humanoid") end local function isAlive() local hum = getHumanoid() return hum and hum.Health > 0 end local function tpTo(x, y, z) local root = getRoot() if not root then return false end local ok = pcall(function() root.CFrame = CFrame.new(x, y, z) end) return ok end local function tpToVector(v) return tpTo(v[1], v[2], v[3]) end -- ============================================================ -- FLIGHT -- ============================================================ local function setHoverTarget(x, y, z) Farm.hoverTarget = Vector3.new(x, y + Config.FlightHeight, z) end local function clearHoverTarget() Farm.hoverTarget = nil end local function zeroVelocity(root) pcall(function() root.AssemblyLinearVelocity = Vector3.zero end) pcall(function() root.AssemblyAngularVelocity = Vector3.zero end) pcall(function() root.Velocity = Vector3.zero end) pcall(function() root.RotVelocity = Vector3.zero end) end RunService.Heartbeat:Connect(function(dt) if not Farm.running then return end if Farm.state ~= "waiting" then return end local target = Farm.hoverTarget if not target then return end local root = getRoot() if not root then return end local current = root.Position local delta = target - current local dist = delta.Magnitude if dist < Config.FlyDeadzone then zeroVelocity(root) return end local alpha = 1 - math.exp(-Config.FlyGain * dt) local newPos = current:Lerp(target, alpha) local rot = root.CFrame - root.CFrame.Position pcall(function() root.CFrame = CFrame.new(newPos) * rot zeroVelocity(root) end) end) -- ============================================================ -- SILENT CLICK -- ============================================================ local function silentClickAt(x, y) local ok = pcall(function() VIM:SendMouseButtonEvent(math.floor(x), math.floor(y), 0, true, game, 0) task.wait(0.04) VIM:SendMouseButtonEvent(math.floor(x), math.floor(y), 0, false, game, 0) end) return ok end -- ============================================================ -- RETURN TO SPAWN -- ============================================================ local function returnToSpawnAndReset() if not Config.ReturnToSpawn then return end clearHoverTarget() local ok = silentClickAt(BACK_X, BACK_Y) Farm.spawnCalls += 1 if ok then log(("Clicked Return at (%d, %d) — waiting %.1fs"):format( BACK_X, BACK_Y, Config.SpawnWait)) else log("Return click failed — local TP fallback.") tpToVector(SPAWN) end task.wait(Config.SpawnWait) local root = getRoot() if root then local d = (root.Position - Vector3.new(SPAWN[1], SPAWN[2], SPAWN[3])).Magnitude if d > 25 then log(("Not at spawn (%.0f studs). Local TP fallback."):format(d)) tpToVector(SPAWN) task.wait(0.4) end end end -- ============================================================ -- ENEMY / ORE DETECTION -- ============================================================ local function getEnemyFolder() return Workspace:FindFirstChild("EnemyFolder") end local function isIgnoredEnemy(obj) return obj.Name:sub(1, 3) == "SSS" end local function countKillableEnemies() local folder = getEnemyFolder() if not folder then return 0 end local n = 0 for _, obj in ipairs(folder:GetChildren()) do if not isIgnoredEnemy(obj) then n += 1 end end return n end local function getOreCache() return Workspace:FindFirstChild("OreCache") end local function findOreObjects() local cache = getOreCache() if not cache then return {} end local list = {} for _, obj in ipairs(cache:GetDescendants()) do local num = obj.Name:match("^Ore_(%d+)") if num then table.insert(list, { obj = obj, num = tonumber(num) }) end end if #list == 0 then for _, obj in ipairs(cache:GetChildren()) do local num = obj.Name:match("^Ore_(%d+)") if num then table.insert(list, { obj = obj, num = tonumber(num) }) end end end return list end local function getHighestOre() local all = findOreObjects() if #all == 0 then return nil, 0, 0 end local best = all[1] for _, entry in ipairs(all) do if entry.num > best.num then best = entry end end return best.obj, best.num, #all end local function orePosition(ore) if not ore or not ore.Parent then return nil end if ore:IsA("BasePart") then return ore.Position end if ore:IsA("Model") then local pp = ore.PrimaryPart or ore:FindFirstChildWhichIsA("BasePart", true) return pp and pp.Position or nil end if ore:IsA("Attachment") then return ore.WorldPosition end local bp = ore:FindFirstChildWhichIsA("BasePart", true) if bp then return bp.Position end return nil end local function findPromptFor(ore) if not ore then return nil end local node = ore for _ = 1, 4 do if not node then break end local p = node:FindFirstChildOfClass("ProximityPrompt") if p then return p end for _, d in ipairs(node:GetDescendants()) do if d:IsA("ProximityPrompt") then return d end end node = node.Parent end local myRoot = getRoot() if not myRoot then return nil end local best, bestDist = nil, 12 for _, d in ipairs(Workspace:GetDescendants()) do if d:IsA("ProximityPrompt") and d.Parent then local pos = orePosition(d.Parent) or (d.Parent:IsA("BasePart") and d.Parent.Position) if pos and (pos - myRoot.Position).Magnitude < bestDist then best, bestDist = d, (pos - myRoot.Position).Magnitude end end end return best end local function pressKey(key, duration) duration = duration or 0.3 pcall(function() VIM:SendKeyEvent(true, key, false, game) task.wait(duration) VIM:SendKeyEvent(false, key, false, game) end) end local function holdE(duration) pressKey(Enum.KeyCode.E, duration or Config.HoldDuration) end -- ============================================================ -- LOOT ONE ORE — snap-teleport, NO flight -- ============================================================ local function tryLootOneOre() Farm.lastLootMethod = "starting…" local ore, num, total = getHighestOre() if not ore then Farm.lastLootMethod = "no ore found in OreCache" return false end log(("Loot: highest = %s (index %d, %d ores total)") :format(ore:GetFullName(), num, total)) local pos = orePosition(ore) if not pos then Farm.lastLootMethod = "ore has no position" return false end tpTo(pos.X, pos.Y + 3, pos.Z) task.wait(0.2) local root = getRoot() if root then local dist = (root.Position - pos).Magnitude if dist > 20 then Farm.lastLootMethod = "tp didn't stick" return false end else Farm.lastLootMethod = "no root" return false end local prompt = findPromptFor(ore) if prompt then local wasEnabled = prompt.Enabled if not wasEnabled then pcall(function() prompt.Enabled = true end) task.wait(0.05) end local holdTime = math.max(prompt.HoldDuration or 0.5, 0.3) + Config.PromptExtraHold local ok2 = pcall(function() prompt:InputHoldBegin() task.wait(holdTime) prompt:InputHoldEnd() end) if not wasEnabled then pcall(function() prompt.Enabled = false end) end task.wait(0.15) if ok2 then Farm.lastLootMethod = ("prompt(%.2fs)"):format(holdTime) return true end end holdE(Config.HoldDuration) task.wait(0.25) Farm.lastLootMethod = ("vim(%.2fs)"):format(Config.HoldDuration) return true end local function handleLooting() if Farm.oresCarried >= Config.MaxCarry then Farm.state = "toSpawn" return end local ore = getHighestOre() if not ore then log(("No more ores (carried %d)."):format(Farm.oresCarried)) Farm.state = "toSpawn" return end local got = false for _ = 1, Config.LootRetries do if tryLootOneOre() then got = true break end end if got then Farm.oresCarried += 1 log(("Looted ore %d/%d via %s"):format( Farm.oresCarried, Config.MaxCarry, Farm.lastLootMethod)) else log("Could not pick up any ore. Moving on.") Farm.state = "toSpawn" end end -- ============================================================ -- FARM LOOP -- ============================================================ local function goToStage(stage) local pos = STAGES[stage] if not pos then return false end Farm.currentStage = stage Farm.stageStartedAt = os.clock() Farm.zeroStreak = 0 setHoverTarget(pos[1], pos[2], pos[3]) local h = Farm.hoverTarget tpTo(h.X, h.Y, h.Z) log(("Stage %d — snapped to (%.0f, %.0f, %.0f), flying to hold at Y=%.0f") :format(stage, pos[1], pos[2], pos[3], h.Y)) return true end local function advanceStage() Farm.stagesPassed += 1 if Farm.currentStage >= MAX_STAGE then log("Reached last stage. Looping back to start stage.") Farm.loopCount += 1 goToStage(Farm.startStage) else goToStage(Farm.currentStage + 1) end end local function farmTick() if not Farm.running then return end if not isAlive() then Farm.deaths += 1 log(("Died! Restarting from stage %d."):format(Farm.startStage)) Farm.oresCarried = 0 Farm.state = "toStage" Farm.currentStage = Farm.startStage - 1 task.wait(1) goToStage(Farm.startStage) return end if Farm.state == "toStage" then if Farm.currentStage == 0 then Farm.currentStage = Farm.startStage end goToStage(Farm.currentStage) Farm.state = "waiting" elseif Farm.state == "waiting" then local n = countKillableEnemies() if n == 0 then Farm.zeroStreak += 1 if Farm.zeroStreak >= Config.EnemiesGoneChecks then log(("Stage %d cleared (%d checks)."):format( Farm.currentStage, Farm.zeroStreak)) Farm.killsTotal += 1 Farm.oresCarried = 0 clearHoverTarget() if Config.AutoLoot then Farm.state = "looting" else Farm.state = "toSpawn" end end else Farm.zeroStreak = 0 end if os.clock() - Farm.stageStartedAt > Config.KillTimeout then log(("Stage %d timeout — moving on."):format(Farm.currentStage)) clearHoverTarget() Farm.state = "toSpawn" end elseif Farm.state == "looting" then handleLooting() elseif Farm.state == "toSpawn" then returnToSpawnAndReset() advanceStage() Farm.state = "waiting" elseif Farm.state == "done" then Farm.running = false end end task.spawn(function() while true do if Farm.running then local ok, err = pcall(farmTick) if not ok then warn("[Farm] tick error: " .. tostring(err)) end task.wait(Config.CheckInterval) else task.wait(0.15) end end end) -- ============================================================ -- SIGNAL AUTOTRAIN -- ============================================================ local function signalAutoTrainOff(off) if getgenv then getgenv().AutoTrain_ForceOff = off and true or false end end -- ============================================================ -- GUI -- ============================================================ local gui = Instance.new("ScreenGui") gui.Name = "AutoFarm" gui.ResetOnSpawn = false gui.ZIndexBehavior = Enum.ZIndexBehavior.Global gui.Parent = game:GetService("CoreGui") local frame = Instance.new("Frame") frame.Size = UDim2.new(0, 400, 0, 520) frame.Position = UDim2.new(0.5, -200, 0.5, -260) frame.BackgroundColor3 = Color3.fromRGB(22, 26, 34) frame.BorderSizePixel = 0 frame.Active = true frame.Draggable = true frame.ZIndex = 10 frame.Parent = gui Instance.new("UICorner", frame).CornerRadius = UDim.new(0, 10) local title = Instance.new("TextLabel") title.Size = UDim2.new(1, 0, 0, 30) title.BackgroundColor3 = Color3.fromRGB(35, 45, 60) title.Text = "Auto Farm" title.TextColor3 = Color3.fromRGB(210, 230, 255) title.Font = Enum.Font.GothamBold title.TextSize = 14 title.ZIndex = 11 title.Parent = frame Instance.new("UICorner", title).CornerRadius = UDim.new(0, 10) local close = Instance.new("TextButton") close.Size = UDim2.new(0, 22, 0, 22) close.Position = UDim2.new(1, -26, 0, 4) close.BackgroundColor3 = Color3.fromRGB(140, 50, 50) close.Text = "X" close.TextColor3 = Color3.fromRGB(255, 255, 255) close.Font = Enum.Font.GothamBold close.TextSize = 12 close.ZIndex = 12 close.Parent = frame Instance.new("UICorner", close).CornerRadius = UDim.new(0, 6) close.MouseButton1Click:Connect(function() Farm.running = false clearHoverTarget() signalAutoTrainOff(false) gui:Destroy() end) local tabBar = Instance.new("Frame") tabBar.Size = UDim2.new(1, -20, 0, 30) tabBar.Position = UDim2.new(0, 10, 0, 36) tabBar.BackgroundColor3 = Color3.fromRGB(32, 40, 52) tabBar.BorderSizePixel = 0 tabBar.ZIndex = 11 tabBar.Parent = frame Instance.new("UICorner", tabBar).CornerRadius = UDim.new(0, 6) local function mkTabBtn(text, xScale) local b = Instance.new("TextButton") b.Size = UDim2.new(0.25, -2, 1, -4) b.Position = UDim2.new(xScale, 2, 0, 2) b.BackgroundColor3 = Color3.fromRGB(45, 55, 70) b.TextColor3 = Color3.fromRGB(180, 200, 220) b.Font = Enum.Font.GothamBold b.TextSize = 11 b.Text = text b.ZIndex = 12 b.Parent = tabBar Instance.new("UICorner", b).CornerRadius = UDim.new(0, 5) return b end local farmTabBtn = mkTabBtn("Farm", 0) local tpTabBtn = mkTabBtn("Teleport", 0.25) local manualTabBtn = mkTabBtn("Manual", 0.5) local statusTabBtn = mkTabBtn("Status", 0.75) -- ============================================================ -- SLIDER HELPER -- ============================================================ local function mkSlider(parent, y, minVal, maxVal, initial, label, precision, onChange) local holder = Instance.new("Frame") holder.Size = UDim2.new(0.9, 0, 0, 40) holder.Position = UDim2.new(0.05, 0, 0, y) holder.BackgroundTransparency = 1 holder.ZIndex = 11 holder.Parent = parent local lbl = Instance.new("TextLabel") lbl.Size = UDim2.new(1, 0, 0, 14) lbl.BackgroundTransparency = 1 lbl.Text = label .. ": " .. string.format("%." .. precision .. "f", initial) lbl.TextColor3 = Color3.fromRGB(190, 210, 230) lbl.Font = Enum.Font.Gotham lbl.TextSize = 11 lbl.TextXAlignment = Enum.TextXAlignment.Left lbl.ZIndex = 12 lbl.Parent = holder local track = Instance.new("TextButton") track.Size = UDim2.new(1, 0, 0, 12) track.Position = UDim2.new(0, 0, 0, 22) track.BackgroundColor3 = Color3.fromRGB(38, 44, 54) track.Text = "" track.AutoButtonColor = false track.BorderSizePixel = 0 track.ZIndex = 12 track.Parent = holder Instance.new("UICorner", track).CornerRadius = UDim.new(1, 0) local pct0 = (initial - minVal) / (maxVal - minVal) local fill = Instance.new("Frame") fill.Size = UDim2.new(pct0, 0, 1, 0) fill.BackgroundColor3 = Color3.fromRGB(70, 130, 200) fill.BorderSizePixel = 0 fill.ZIndex = 13 fill.Parent = track Instance.new("UICorner", fill).CornerRadius = UDim.new(1, 0) local handle = Instance.new("Frame") handle.Size = UDim2.new(0, 16, 0, 16) handle.Position = UDim2.new(pct0, -8, 0.5, -8) handle.BackgroundColor3 = Color3.fromRGB(220, 230, 255) handle.BorderSizePixel = 0 handle.ZIndex = 14 handle.Parent = track Instance.new("UICorner", handle).CornerRadius = UDim.new(1, 0) local value = initial local function setValue(v, silent) v = math.clamp(v, minVal, maxVal) value = v local pct = (v - minVal) / (maxVal - minVal) fill.Size = UDim2.new(pct, 0, 1, 0) handle.Position = UDim2.new(pct, -8, 0.5, -8) lbl.Text = label .. ": " .. string.format("%." .. precision .. "f", v) if not silent then onChange(v) end end local dragging = false track.InputBegan:Connect(function(input) if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then dragging = true local rel = (input.Position.X - track.AbsolutePosition.X) / track.AbsoluteSize.X setValue(minVal + rel * (maxVal - minVal)) end end) UIS.InputChanged:Connect(function(input) if dragging and (input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == Enum.UserInputType.Touch) then local rel = (input.Position.X - track.AbsolutePosition.X) / track.AbsoluteSize.X setValue(minVal + rel * (maxVal - minVal)) end end) UIS.InputEnded:Connect(function(input) if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then dragging = false end end) setValue(initial, true) return holder, setValue end -- ============================================================ -- FARM TAB -- ============================================================ local farmTab = Instance.new("Frame") farmTab.Size = UDim2.new(1, 0, 1, -76) farmTab.Position = UDim2.new(0, 0, 0, 76) farmTab.BackgroundTransparency = 1 farmTab.ZIndex = 11 farmTab.Parent = frame local toggle = Instance.new("TextButton") toggle.Size = UDim2.new(0.9, 0, 0, 44) toggle.Position = UDim2.new(0.05, 0, 0, 6) toggle.BackgroundColor3 = Color3.fromRGB(70, 75, 85) toggle.TextColor3 = Color3.fromRGB(255, 255, 255) toggle.Font = Enum.Font.GothamBold toggle.TextSize = 15 toggle.Text = "Auto Farm: OFF" toggle.ZIndex = 11 toggle.Parent = farmTab Instance.new("UICorner", toggle).CornerRadius = UDim.new(0, 6) toggle.MouseButton1Click:Connect(function() Farm.running = not Farm.running toggle.BackgroundColor3 = Farm.running and Color3.fromRGB(60, 140, 60) or Color3.fromRGB(70, 75, 85) toggle.Text = "Auto Farm: " .. (Farm.running and "ON" or "OFF") if Farm.running then signalAutoTrainOff(true) Farm.currentStage = Farm.startStage Farm.oresCarried = 0 Farm.zeroStreak = 0 Farm.state = "toStage" log(("Farm started at stage %d"):format(Farm.startStage)) else signalAutoTrainOff(false) clearHoverTarget() log("Farm stopped.") end end) local stageHdr = Instance.new("TextLabel") stageHdr.Size = UDim2.new(0.9, 0, 0, 16) stageHdr.Position = UDim2.new(0.05, 0, 0, 60) stageHdr.BackgroundTransparency = 1 stageHdr.Text = "Starting stage: 1" stageHdr.TextColor3 = Color3.fromRGB(190, 210, 230) stageHdr.Font = Enum.Font.Gotham stageHdr.TextSize = 11 stageHdr.TextXAlignment = Enum.TextXAlignment.Left stageHdr.ZIndex = 11 stageHdr.Parent = farmTab local stageMinus = Instance.new("TextButton") stageMinus.Size = UDim2.new(0, 40, 0, 26) stageMinus.Position = UDim2.new(0.05, 0, 0, 80) stageMinus.BackgroundColor3 = Color3.fromRGB(60, 100, 160) stageMinus.TextColor3 = Color3.fromRGB(255, 255, 255) stageMinus.Font = Enum.Font.GothamBold stageMinus.TextSize = 12 stageMinus.Text = "-1" stageMinus.ZIndex = 11 stageMinus.Parent = farmTab Instance.new("UICorner", stageMinus).CornerRadius = UDim.new(0, 5) stageMinus.MouseButton1Click:Connect(function() Farm.startStage = math.max(1, Farm.startStage - 1) stageHdr.Text = "Starting stage: " .. Farm.startStage end) local stagePlus = Instance.new("TextButton") stagePlus.Size = UDim2.new(0, 40, 0, 26) stagePlus.Position = UDim2.new(0.85, 0, 0, 80) stagePlus.BackgroundColor3 = Color3.fromRGB(60, 100, 160) stagePlus.TextColor3 = Color3.fromRGB(255, 255, 255) stagePlus.Font = Enum.Font.GothamBold stagePlus.TextSize = 12 stagePlus.Text = "+1" stagePlus.ZIndex = 11 stagePlus.Parent = farmTab Instance.new("UICorner", stagePlus).CornerRadius = UDim.new(0, 5) stagePlus.MouseButton1Click:Connect(function() Farm.startStage = math.min(MAX_STAGE, Farm.startStage + 1) stageHdr.Text = "Starting stage: " .. Farm.startStage end) local dropdownBtn = Instance.new("TextButton") dropdownBtn.Size = UDim2.new(0.5, 0, 0, 26) dropdownBtn.Position = UDim2.new(0.25, 0, 0, 80) dropdownBtn.BackgroundColor3 = Color3.fromRGB(60, 90, 130) dropdownBtn.TextColor3 = Color3.fromRGB(255, 255, 255) dropdownBtn.Font = Enum.Font.GothamBold dropdownBtn.TextSize = 11 dropdownBtn.Text = "Pick stage…" dropdownBtn.ZIndex = 11 dropdownBtn.Parent = farmTab Instance.new("UICorner", dropdownBtn).CornerRadius = UDim.new(0, 5) local dropdown = Instance.new("Frame") dropdown.Size = UDim2.new(0.5, 0, 0, 200) dropdown.Position = UDim2.new(0.25, 0, 0, 108) dropdown.BackgroundColor3 = Color3.fromRGB(30, 38, 50) dropdown.BorderSizePixel = 0 dropdown.Visible = false dropdown.ZIndex = 20 dropdown.Parent = farmTab Instance.new("UICorner", dropdown).CornerRadius = UDim.new(0, 6) local ddScroll = Instance.new("ScrollingFrame") ddScroll.Size = UDim2.new(1, -6, 1, -6) ddScroll.Position = UDim2.new(0, 3, 0, 3) ddScroll.BackgroundTransparency = 1 ddScroll.BorderSizePixel = 0 ddScroll.ScrollBarThickness = 4 ddScroll.CanvasSize = UDim2.new(0, 0, 0, 0) ddScroll.ZIndex = 21 ddScroll.Parent = dropdown local ddLayout = Instance.new("UIListLayout") ddLayout.Padding = UDim.new(0, 2) ddLayout.Parent = ddScroll for s = 1, MAX_STAGE do local btn = Instance.new("TextButton") btn.Size = UDim2.new(1, -4, 0, 22) btn.BackgroundColor3 = Color3.fromRGB(45, 55, 70) btn.TextColor3 = Color3.fromRGB(220, 230, 240) btn.Font = Enum.Font.Gotham btn.TextSize = 11 btn.Text = "Stage " .. s btn.ZIndex = 22 btn.Parent = ddScroll Instance.new("UICorner", btn).CornerRadius = UDim.new(0, 4) btn.MouseButton1Click:Connect(function() Farm.startStage = s stageHdr.Text = "Starting stage: " .. s dropdown.Visible = false end) end ddScroll.CanvasSize = UDim2.new(0, 0, 0, ddLayout.AbsoluteContentSize.Y + 6) dropdownBtn.MouseButton1Click:Connect(function() dropdown.Visible = not dropdown.Visible end) local function mkOption(text, y, key, default) local b = Instance.new("TextButton") b.Size = UDim2.new(0.9, 0, 0, 30) b.Position = UDim2.new(0.05, 0, 0, y) b.BackgroundColor3 = Config[key] and Color3.fromRGB(60, 140, 60) or Color3.fromRGB(70, 75, 85) b.TextColor3 = Color3.fromRGB(255, 255, 255) b.Font = Enum.Font.GothamBold b.TextSize = 11 b.Text = text .. ": " .. (Config[key] and "ON" or "OFF") b.ZIndex = 11 b.Parent = farmTab Instance.new("UICorner", b).CornerRadius = UDim.new(0, 6) b.MouseButton1Click:Connect(function() Config[key] = not Config[key] b.BackgroundColor3 = Config[key] and Color3.fromRGB(60, 140, 60) or Color3.fromRGB(70, 75, 85) b.Text = text .. ": " .. (Config[key] and "ON" or "OFF") end) end mkOption("Auto Loot", 130, "AutoLoot", true) mkOption("Return to Spawn", 166, "ReturnToSpawn", true) -- Max carry local carryHdr = Instance.new("TextLabel") carryHdr.Size = UDim2.new(0.9, 0, 0, 16) carryHdr.Position = UDim2.new(0.05, 0, 0, 206) carryHdr.BackgroundTransparency = 1 carryHdr.Text = "Max carry: " .. Config.MaxCarry carryHdr.TextColor3 = Color3.fromRGB(190, 210, 230) carryHdr.Font = Enum.Font.Gotham carryHdr.TextSize = 11 carryHdr.TextXAlignment = Enum.TextXAlignment.Left carryHdr.ZIndex = 11 carryHdr.Parent = farmTab local carryMinus = Instance.new("TextButton") carryMinus.Size = UDim2.new(0, 40, 0, 24) carryMinus.Position = UDim2.new(0.05, 0, 0, 224) carryMinus.BackgroundColor3 = Color3.fromRGB(60, 100, 160) carryMinus.TextColor3 = Color3.fromRGB(255, 255, 255) carryMinus.Font = Enum.Font.GothamBold carryMinus.TextSize = 11 carryMinus.Text = "-1" carryMinus.ZIndex = 11 carryMinus.Parent = farmTab Instance.new("UICorner", carryMinus).CornerRadius = UDim.new(0, 5) carryMinus.MouseButton1Click:Connect(function() Config.MaxCarry = math.max(1, Config.MaxCarry - 1) carryHdr.Text = "Max carry: " .. Config.MaxCarry end) local carryPlus = Instance.new("TextButton") carryPlus.Size = UDim2.new(0, 40, 0, 24) carryPlus.Position = UDim2.new(0.85, 0, 0, 224) carryPlus.BackgroundColor3 = Color3.fromRGB(60, 100, 160) carryPlus.TextColor3 = Color3.fromRGB(255, 255, 255) carryPlus.Font = Enum.Font.GothamBold carryPlus.TextSize = 11 carryPlus.Text = "+1" carryPlus.ZIndex = 11 carryPlus.Parent = farmTab Instance.new("UICorner", carryPlus).CornerRadius = UDim.new(0, 5) carryPlus.MouseButton1Click:Connect(function() Config.MaxCarry = math.min(20, Config.MaxCarry + 1) carryHdr.Text = "Max carry: " .. Config.MaxCarry end) -- FLIGHT HEIGHT SLIDER (replaces old fly controls) mkSlider(farmTab, 258, 0, 60, Config.FlightHeight, "Flight height (studs above stage)", 0, function(v) Config.FlightHeight = v end) -- Info panel local infoPanel = Instance.new("TextLabel") infoPanel.Size = UDim2.new(0.9, 0, 0, 130) infoPanel.Position = UDim2.new(0.05, 0, 0, 306) infoPanel.BackgroundColor3 = Color3.fromRGB(18, 22, 28) infoPanel.TextColor3 = Color3.fromRGB(180, 210, 220) infoPanel.Font = Enum.Font.Code infoPanel.TextSize = 10 infoPanel.TextXAlignment = Enum.TextXAlignment.Left infoPanel.TextYAlignment = Enum.TextYAlignment.Top infoPanel.TextWrapped = true infoPanel.Text = " Ready." infoPanel.ZIndex = 11 infoPanel.Parent = farmTab Instance.new("UICorner", infoPanel).CornerRadius = UDim.new(0, 6) -- ============================================================ -- TELEPORT TAB -- ============================================================ local tpTab = Instance.new("Frame") tpTab.Size = UDim2.new(1, 0, 1, -76) tpTab.Position = UDim2.new(0, 0, 0, 76) tpTab.BackgroundTransparency = 1 tpTab.Visible = false tpTab.ZIndex = 11 tpTab.Parent = frame local tpScroll = Instance.new("ScrollingFrame") tpScroll.Size = UDim2.new(0.94, 0, 0.85, 0) tpScroll.Position = UDim2.new(0.03, 0, 0, 6) tpScroll.BackgroundColor3 = Color3.fromRGB(28, 34, 44) tpScroll.BorderSizePixel = 0 tpScroll.ScrollBarThickness = 6 tpScroll.CanvasSize = UDim2.new(0, 0, 0, 0) tpScroll.ZIndex = 11 tpScroll.Parent = tpTab Instance.new("UICorner", tpScroll).CornerRadius = UDim.new(0, 6) local tpLayout = Instance.new("UIListLayout") tpLayout.Padding = UDim.new(0, 3) tpLayout.Parent = tpScroll for s = 1, MAX_STAGE do local pos = STAGES[s] local b = Instance.new("TextButton") b.Size = UDim2.new(1, -6, 0, 28) b.BackgroundColor3 = Color3.fromRGB(45, 60, 80) b.TextColor3 = Color3.fromRGB(220, 230, 240) b.Font = Enum.Font.GothamBold b.TextSize = 11 b.Text = ("Stage %d (%.0f, %.0f, %.0f)"):format(s, pos[1], pos[2], pos[3]) b.ZIndex = 12 b.Parent = tpScroll Instance.new("UICorner", b).CornerRadius = UDim.new(0, 4) b.MouseButton1Click:Connect(function() tpToVector(pos) log(("Teleported to stage %d"):format(s)) end) end tpScroll.CanvasSize = UDim2.new(0, 0, 0, tpLayout.AbsoluteContentSize.Y + 8) local spawnBtn = Instance.new("TextButton") spawnBtn.Size = UDim2.new(0.94, 0, 0, 32) spawnBtn.Position = UDim2.new(0.03, 0, 1, -42) spawnBtn.BackgroundColor3 = Color3.fromRGB(60, 100, 160) spawnBtn.TextColor3 = Color3.fromRGB(255, 255, 255) spawnBtn.Font = Enum.Font.GothamBold spawnBtn.TextSize = 12 spawnBtn.Text = ("Silent Click Return (%d, %d)"):format(BACK_X, BACK_Y) spawnBtn.ZIndex = 11 spawnBtn.Parent = tpTab Instance.new("UICorner", spawnBtn).CornerRadius = UDim.new(0, 6) spawnBtn.MouseButton1Click:Connect(function() task.spawn(returnToSpawnAndReset) end) local localTpBtn = Instance.new("TextButton") localTpBtn.Size = UDim2.new(0.94, 0, 0, 24) localTpBtn.Position = UDim2.new(0.03, 0, 1, -78) localTpBtn.BackgroundColor3 = Color3.fromRGB(70, 75, 85) localTpBtn.TextColor3 = Color3.fromRGB(220, 220, 240) localTpBtn.Font = Enum.Font.GothamBold localTpBtn.TextSize = 11 localTpBtn.Text = ("Local TP to Spawn (%.0f, %.0f, %.0f)"):format(SPAWN[1], SPAWN[2], SPAWN[3]) localTpBtn.ZIndex = 11 localTpBtn.Parent = tpTab Instance.new("UICorner", localTpBtn).CornerRadius = UDim.new(0, 6) localTpBtn.MouseButton1Click:Connect(function() tpToVector(SPAWN) log("Local TP to spawn.") end) -- ============================================================ -- MANUAL TAB -- ============================================================ local manualTab = Instance.new("Frame") manualTab.Size = UDim2.new(1, 0, 1, -76) manualTab.Position = UDim2.new(0, 0, 0, 76) manualTab.BackgroundTransparency = 1 manualTab.Visible = false manualTab.ZIndex = 11 manualTab.Parent = frame local function mkBtn(text, y, color, onClick) local b = Instance.new("TextButton") b.Size = UDim2.new(0.9, 0, 0, 30) b.Position = UDim2.new(0.05, 0, 0, y) b.BackgroundColor3 = color b.TextColor3 = Color3.fromRGB(255, 255, 255) b.Font = Enum.Font.GothamBold b.TextSize = 12 b.Text = text b.ZIndex = 11 b.Parent = manualTab Instance.new("UICorner", b).CornerRadius = UDim.new(0, 6) b.MouseButton1Click:Connect(onClick) return b end mkBtn(("Silent click Return (%d, %d)"):format(BACK_X, BACK_Y), 6, Color3.fromRGB(60, 100, 160), function() silentClickAt(BACK_X, BACK_Y) log("Sent silent click to Return.") end) mkBtn("Clear hover target", 42, Color3.fromRGB(140, 80, 40), function() clearHoverTarget() log("Hover target cleared.") end) mkBtn("Count killable enemies", 78, Color3.fromRGB(60, 100, 160), function() local n = countKillableEnemies() log(("Killable enemies in EnemyFolder: %d"):format(n)) end) mkBtn("Find highest ore (detail)", 114, Color3.fromRGB(60, 100, 160), function() local cache = getOreCache() if not cache then log("No Workspace.OreCache found.") return end log(("OreCache children: %d"):format(#cache:GetChildren())) local all = findOreObjects() log(("Ore_ matches found (recursive): %d"):format(#all)) for i = 1, math.min(10, #all) do local e = all[i] local p = orePosition(e.obj) log((" [%d] %s class=%s index=%d pos=%s"):format( i, e.obj:GetFullName(), e.obj.ClassName, e.num, p and ("(%.1f, %.1f, %.1f)"):format(p.X, p.Y, p.Z) or "nil")) end end) mkBtn("Loot one ore now", 150, Color3.fromRGB(120, 60, 160), function() task.spawn(function() local ok = tryLootOneOre() log(ok and ("Looted one ore via " .. Farm.lastLootMethod) or "Loot attempt failed.") end) end) mkBtn("Force advance stage", 186, Color3.fromRGB(120, 60, 160), function() advanceStage() end) mkBtn("Reset to start stage", 222, Color3.fromRGB(140, 80, 40), function() Farm.currentStage = Farm.startStage goToStage(Farm.startStage) Farm.state = "waiting" log(("Reset to stage %d"):format(Farm.startStage)) end) mkBtn("Kill Auto Train (safety)", 258, Color3.fromRGB(140, 50, 50), function() signalAutoTrainOff(true) log("AutoTrain force-off signaled.") end) -- FLY RESPONSIVENESS (moved here from Farm tab) mkSlider(manualTab, 296, 1, 20, Config.FlyGain, "Fly responsiveness (lower = smoother)", 1, function(v) Config.FlyGain = v end) -- ============================================================ -- STATUS TAB -- ============================================================ local statusTab = Instance.new("Frame") statusTab.Size = UDim2.new(1, 0, 1, -76) statusTab.Position = UDim2.new(0, 0, 0, 76) statusTab.BackgroundTransparency = 1 statusTab.Visible = false statusTab.ZIndex = 11 statusTab.Parent = frame local statusBox = Instance.new("TextLabel") statusBox.Size = UDim2.new(0.94, 0, 0.85, 0) statusBox.Position = UDim2.new(0.03, 0, 0, 6) statusBox.BackgroundColor3 = Color3.fromRGB(18, 22, 28) statusBox.TextColor3 = Color3.fromRGB(180, 210, 220) statusBox.Font = Enum.Font.Code statusBox.TextSize = 11 statusBox.TextXAlignment = Enum.TextXAlignment.Left statusBox.TextYAlignment = Enum.TextYAlignment.Top statusBox.TextWrapped = true statusBox.ZIndex = 11 statusBox.Parent = statusTab Instance.new("UICorner", statusBox).CornerRadius = UDim.new(0, 6) local lastLogBox = Instance.new("TextLabel") lastLogBox.Size = UDim2.new(0.94, 0, 0, 50) lastLogBox.Position = UDim2.new(0.03, 0, 1, -56) lastLogBox.BackgroundColor3 = Color3.fromRGB(30, 40, 30) lastLogBox.TextColor3 = Color3.fromRGB(200, 240, 200) lastLogBox.Font = Enum.Font.Code lastLogBox.TextSize = 10 lastLogBox.TextXAlignment = Enum.TextXAlignment.Left lastLogBox.TextYAlignment = Enum.TextYAlignment.Top lastLogBox.TextWrapped = true lastLogBox.Text = " No logs yet." lastLogBox.ZIndex = 11 lastLogBox.Parent = statusTab Instance.new("UICorner", lastLogBox).CornerRadius = UDim.new(0, 6) -- ============================================================ -- TAB SWITCHING -- ============================================================ local tabButtons = { farm = farmTabBtn, tp = tpTabBtn, manual = manualTabBtn, status = statusTabBtn, } local tabFrames = { farm = farmTab, tp = tpTab, manual = manualTab, status = statusTab, } local function switchTab(name) for k, b in pairs(tabButtons) do local active = (k == name) b.BackgroundColor3 = active and Color3.fromRGB(70, 130, 200) or Color3.fromRGB(45, 55, 70) b.TextColor3 = active and Color3.fromRGB(255, 255, 255) or Color3.fromRGB(180, 200, 220) end for k, f in pairs(tabFrames) do f.Visible = (k == name) end end farmTabBtn.MouseButton1Click:Connect(function() switchTab("farm") end) tpTabBtn.MouseButton1Click:Connect(function() switchTab("tp") end) manualTabBtn.MouseButton1Click:Connect(function() switchTab("manual") end) statusTabBtn.MouseButton1Click:Connect(function() switchTab("status") end) -- ============================================================ -- UI UPDATE LOOP -- ============================================================ task.spawn(function() while gui.Parent do local hum = getHumanoid() local hp = hum and hum.Health or 0 local maxHp = hum and hum.MaxHealth or 0 local enemies = countKillableEnemies() local ore, oreNum = getHighestOre() local hoverStr = "—" if Farm.hoverTarget then hoverStr = ("(%.0f, %.0f, %.0f)"):format( Farm.hoverTarget.X, Farm.hoverTarget.Y, Farm.hoverTarget.Z) end infoPanel.Text = table.concat({ (" State: %s"):format(Farm.state), (" Stage: %d / %d (start %d)"):format(Farm.currentStage, MAX_STAGE, Farm.startStage), (" Carried: %d / %d Last method: %s"):format( Farm.oresCarried, Config.MaxCarry, Farm.lastLootMethod), (" Enemies left: %d Return clicks: %d"):format(enemies, Farm.spawnCalls), (" Flight: %s Target: %s"):format( Farm.state == "waiting" and "ON" or "off", hoverStr), }, "\n") statusBox.Text = table.concat({ (" Running: %s"):format(tostring(Farm.running)), (" State: %s Flight: %s"):format( Farm.state, Farm.state == "waiting" and "ON" or "off"), (" Current stage: %d Start stage: %d"):format(Farm.currentStage, Farm.startStage), (" Health: %.0f / %.0f"):format(hp, maxHp), (" Enemies killable: %d zero streak: %d/%d"):format( enemies, Farm.zeroStreak, Config.EnemiesGoneChecks), (" Highest ore in cache: %s"):format(ore and ore.Name or "(none)"), (" Ores carried: %d / %d Last method: %s"):format( Farm.oresCarried, Config.MaxCarry, Farm.lastLootMethod), (" Stages passed: %d Loops: %d Deaths: %d"):format( Farm.stagesPassed, Farm.loopCount, Farm.deaths), (" Flight height: %.0f Responsiveness: %.1f"):format( Config.FlightHeight, Config.FlyGain), (" Fly target: %s"):format(hoverStr), (" Return click coord: (%d, %d) count: %d"):format( BACK_X, BACK_Y, Farm.spawnCalls), (" Current root: %s"):format( getRoot() and ("%.0f, %.0f, %.0f"):format( getRoot().Position.X, getRoot().Position.Y, getRoot().Position.Z) or "?"), }, "\n") lastLogBox.Text = " Last: " .. Farm.lastLog task.wait(0.35) end end) switchTab("farm") log("Loaded.") log(("Flight height: %.0f Gain: %.1f (adjust in Farm / Manual tabs).") :format(Config.FlightHeight, Config.FlyGain))