local oresFolder = workspace.CurrentGame.Important.Ores local player = game.Players.LocalPlayer local runService = game:GetService("RunService") local Library = loadstring(game:HttpGet("https://raw.githubusercontent.com/bloodball/-back-ups-for-libs/main/Revenant", true))() local Flags = Library.Flags local remotes = { Mine_RE = game:GetService("ReplicatedStorage").CurrentGame.Tools.ToolHandlers_o.Shovel.Mining.Mining_m.Mine_RE, FreeRevive = game:GetService("ReplicatedStorage").CurrentGame.UI.Death.Death_m.UseFreeRevive, RemoveLava = workspace.CurrentGame.Important.LavaPockets, ClaimFinalChest = game:GetService("ReplicatedStorage").CurrentGame.Shops.FinalChest.FinalChest_m.ClaimFinalChest, SellOres = game:GetService("ReplicatedStorage").CurrentGame.Shops.Sell.Sell_m.SellInventory } local ignoredOres = { Coal = true, Iron = true, Rock = true, Steel = true } local Window = Library:Window({Text = "Ore Auto Farm"}) Window:Toggle({ Text = "Enable Auto Farm", Flag = "FarmToggle", Callback = function(bool) Flags.FarmToggle = bool end }) Window:Button({ Text = "Explode All Napalms", Callback = function() for _, v in pairs(workspace.CurrentGame.Important.Napalm:GetChildren()) do remotes.Mine_RE:FireServer(v) end end }) Window:Button({ Text = "Free Revive", Callback = function() remotes.FreeRevive:InvokeServer() end }) Window:Button({ Text = "Remove Lava", Callback = function() remotes.RemoveLava:Destroy() end }) Window:Button({ Text = "Claim Final Chest", Callback = function() remotes.ClaimFinalChest:InvokeServer() end }) Window:Button({ Text = "Collect Fossils", Callback = function() for _, v in pairs(workspace.CurrentGame.SpawnPool:GetChildren()) do if v:IsA("Model") and v.Name == "Fossil" then local highlight = Instance.new("Highlight") highlight.Adornee = v highlight.Parent = v highlight.OutlineTransparency = 0.5 highlight.FillTransparency = 0.2 highlight.FillColor = Color3.fromRGB(255, 255, 0) highlight.OutlineColor = Color3.fromRGB(255, 0, 0) end end end }) Window:Button({ Text = "Sell Ores", Callback = function() remotes.ClaimFinalChest:InvokeServer() end }) Window:Toggle({ Text = "Auto Sell Ores", Flag = "AutoSellToggle", Callback = function(bool) Flags.AutoSellToggle = bool end }) local function mineClosestOre() if not Flags.FarmToggle then return end local character = player.Character or player.CharacterAdded:Wait() local humanoidRootPart = character:FindFirstChild("HumanoidRootPart") if not humanoidRootPart then return end local closestOre, closestDistance = nil, math.huge for _, ore in ipairs(oresFolder:GetChildren()) do if ore:IsA("Model") and ore:FindFirstChild("Base") and not ignoredOres[ore.Name] then local distance = (humanoidRootPart.Position - ore.Base.Position).Magnitude if distance < closestDistance then closestDistance = distance closestOre = ore end end end if closestOre then humanoidRootPart.CFrame = closestOre.Base.CFrame remotes.Mine_RE:FireServer(closestOre.Base.CFrame, Enum.Material.Air, tick(), tick(), closestOre.Base) end end local function autoSellOres() while true do if Flags.AutoSellToggle then remotes.SellOres:InvokeServer() end task.wait(1) end end spawn(autoSellOres) runService.Heartbeat:Connect(mineClosestOre)