1. --keep in mind certains ores require certain pickaxes
  2. _G.toggle =true
  3. local pick = "Old Pickaxe"--[[
  4. Iron Pickaxe
  5. Old Pickaxe
  6. Bronze Pickaxe
  7. Gemstone Pickaxe
  8. ]]
  9. local cavedir = workspace.Ores.PrairieCave--[[change this for different farming locations
  10. ColdCliff
  11. Underground
  12. WestCliffside
  13. BearIsland
  14. ForestCave
  15. Savanna
  16. EggIsland
  17. BlackenedCove
  18. Prairie
  19. MountainOutpost
  20. PrairieCave
  21. PrairieCave
  22. MountainCave
  23. DeepDesertCave
  24. DeepDesert
  25. VolcanoQuarry
  26. MountainUpper
  27. MountainLower
  28. Desert
  29. ]]
  30. local workspace = game:GetService("Workspace")
  31. local Players = game:GetService("Players")
  32. local LocalP = Players.LocalPlayer
  33. local Character = LocalP.Character or LocalP.CharacterAdded:Wait()
  34. local RootPart = Character:FindFirstChild("HumanoidRootPart")
  35. local function run()
  36. while wait() do
  37. if _G.toggle then
  38. game:GetService("Players").LocalPlayer.Character.Humanoid.Died:connect(function()
  39. wait(7)
  40. end
  41. )
  42. for i,v in pairs(game.Players.LocalPlayer.Backpack:GetChildren()) do
  43. if v.name == pick then
  44. v.Parent = game.Players.LocalPlayer.Character
  45. end
  46. end
  47. wait(0.2)
  48. local LocalP = Players.LocalPlayer
  49. local Character = LocalP.Character or LocalP.CharacterAdded:Wait()
  50. local RootPart = Character:FindFirstChild("HumanoidRootPart")
  51. local ores = cavedir:GetChildren()
  52. local currentore = ores[1]
  53. local current = currentore.Part
  54. local CFrameLocation = CFrame.new(current.CFrame.x, current.CFrame.y, current.CFrame.z + 7)
  55. RootPart.CFrame = CFrameLocation
  56. RootPart.Parent = Character
  57. wait(0.01)
  58. local args = {
  59. [1] = 1
  60. }
  61. game:GetService("Players").LocalPlayer.Character:FindFirstChild(pick).Slash:FireServer(unpack(args))
  62. while wait() do
  63. if _G.toggle then
  64. wait()
  65. local ores = cavedir:GetChildren()
  66. local currentore = ores[1]
  67. local current = currentore.Part
  68. local CFrameLocation = CFrame.new(current.CFrame.x, current.CFrame.y, current.CFrame.z + 7)
  69. RootPart.CFrame = CFrameLocation
  70. RootPart.Parent = Character
  71. wait(0.01)
  72. local args = {
  73. [1] = 1
  74. }
  75. game:GetService("Players").LocalPlayer.Character:FindFirstChild(pick).Slash:FireServer(unpack(args))
  76. else
  77. break
  78. end
  79. end
  80. end
  81. end
  82. end
  83. while _G.toggle do
  84. pcall(run)
  85. end