Advertisement
2AreYouMental110

minerscave ore script (read text first)

Dec 24th, 2022 (edited)
2,011
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 6.32 KB | None | 0 0
  1. -- https://web.roblox.com/games/7336477134/Minerscave
  2. --[[
  3. be cautious with this script and know which ore you can mine with your pickaxe
  4. sometimes the script will teleport you to a ore in lava, if it does then leave, you will be teleported to the surface when you rejoin
  5. i recommend you to use a diamond pickaxe for this script, but if you have a sapphire pickaxe use it, you can mostly get at least 1 stack (9) of diamonds every minute if you use the script correctly
  6.  
  7. the script works as it teleports you to the ore you said to mine, and after you mine it the script will teleport you to the dropped ore and after you pick it up it cycles
  8.  
  9. dont blame me if you die in lava
  10. ]]
  11.  
  12.  
  13. local prefix = "."
  14.  
  15. local oldpos
  16. local oldpos1
  17. local oldpos2
  18. local inputore
  19. local endingnotification
  20. local plrchat
  21. local ended
  22. local plrchat2
  23. local autominebool
  24.  
  25. function notification(title,text)
  26.     game:GetService("StarterGui"):SetCore("SendNotification", {
  27.     Title = title,
  28.     Text = text
  29.     })
  30. end
  31.  
  32. function mineblock(blockname,itemname,itemnameditem)
  33.     for i1,v1 in pairs(game.Workspace.Blocks:GetChildren()) do
  34.         for i,v in pairs(v1:GetChildren()) do
  35.             if v.Name == blockname then
  36.                 oldpos1 = CFrame.new(game.Players.LocalPlayer.Character.HumanoidRootPart.Position)
  37.                 wait()
  38.                 game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame = CFrame.new(v.Position)
  39.                 local A_1 = (v.Position.X/3)
  40.                 local A_2 = (v.Position.Y/3)
  41.                 local A_3 = (v.Position.Z/3)
  42.                 local Event = game:GetService("ReplicatedStorage").GameRemotes.BreakBlock
  43.                 Event:FireServer(A_1, A_2, A_3)
  44.                 repeat wait() until v.Parent == nil
  45.                 local Event = game:GetService("ReplicatedStorage").GameRemotes.AcceptBreakBlock
  46.                 Event:InvokeServer()
  47.                 game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame = oldpos1
  48.             end
  49.         end
  50.     end
  51.     wait(.2)
  52.     if itemnameditem == false then
  53.         game.Workspace:WaitForChild("Part")
  54.         for i,v in pairs(game.Workspace:GetChildren()) do
  55.             if v.Name == "Part" and v:FindFirstChildWhichIsA("SurfaceGui") and v:FindFirstChildWhichIsA("SurfaceGui"):FindFirstChild(itemname) then
  56.                 oldpos2 = CFrame.new(game.Players.LocalPlayer.Character.HumanoidRootPart.Position)
  57.                 wait()
  58.                 game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame = CFrame.new(v.Position)
  59.                 repeat wait() until v.Parent == nil
  60.                 game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame = oldpos2
  61.             end
  62.         end
  63.     else
  64.         game.Workspace:WaitForChild(itemname)
  65.         for i,v in pairs(game.Workspace:GetChildren()) do
  66.             if v.Name == itemname and v:FindFirstChildWhichIsA("SurfaceGui") then
  67.                 oldpos2 = CFrame.new(game.Players.LocalPlayer.Character.HumanoidRootPart.Position)
  68.                 wait()
  69.                 game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame = CFrame.new(v.Position)
  70.                 repeat wait() until v.Parent == nil
  71.                 game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame = oldpos2
  72.             end
  73.         end
  74.     end
  75. end
  76.  
  77. for i,v in pairs(game:GetService("ReplicatedStorage").GameRemotes:GetChildren()) do
  78.     if v.Name == "Demo" then
  79.         v:Destroy()
  80.     end
  81. end
  82.  
  83. print("fall damage deleted")
  84.  
  85. rconsoleclear()
  86. rconsolename("Minerscave")
  87. rconsoleprint("@@LIGHT_BLUE@@")
  88. rconsoleprint("Prefix: "..prefix)
  89. rconsoleprint[[
  90. Commands:
  91.  
  92. gomine - teleports you to a ore to mine and when your done with that ore it keeps doing it to other ores until you stop it (Available Args: stone, coal, steel/iron, gold, ruby, diamond, sapphire)
  93. stopgomine - stops go mine
  94.  
  95. end (no prefix) - ends the script
  96.  
  97. tip: if your in lava, just leave
  98. ]]
  99.  
  100. plrchat = game.Players.LocalPlayer.Chatted:Connect(function(txt)
  101.     if string.sub(txt,1,string.len(prefix)) == prefix then
  102.         local cmd
  103.         local input
  104.         if string.find(txt," ") then
  105.             cmd = string.sub(txt,string.len(prefix)+1,string.find(txt," ")-1)
  106.             input = string.sub(txt,string.find(txt," ")+1)
  107.         else
  108.             cmd = string.sub(txt,string.len(prefix)+1)
  109.         end
  110.         if cmd == "gomine" and input ~= nil then
  111.             autominebool = true
  112.             notification("go mining turned on!","go mining turned on!")
  113.             oldpos = CFrame.new(game.Players.LocalPlayer.Character.HumanoidRootPart.Position)
  114.             repeat
  115.                 wait()
  116.                 if string.find(input:lower(),"stone") then
  117.                     mineblock("Stone","Cobblestone",true)
  118.                 elseif string.find(input:lower(),"coal") then
  119.                     mineblock("CoalOre","coal",false)
  120.                 elseif string.find(input:lower(),"steel") or string.find(input:lower(),"iron") then
  121.                     mineblock("SteelOre","SteelOre",true)
  122.                 elseif string.find(input:lower(),"gold") then
  123.                     mineblock("GoldOre","GoldOre",true)
  124.                 elseif string.find(input:lower(),"ruby") then
  125.                     mineblock("RubyOre","RubyOre",true)
  126.                 elseif string.find(input:lower(),"diamond") then
  127.                     mineblock("DiamondOre","diamond",false)
  128.                 elseif string.find(input:lower(),"sapphire") then
  129.                     mineblock("SapphireOre","sapphireingot",false)
  130.                 end
  131.             until autominebool == nil
  132.         end
  133.         if cmd == "stopgomine" then
  134.             autominebool = nil
  135.             notification("go mining turned off","go mining turned off")
  136.             wait(.1)
  137.             game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame = oldpos
  138.         end
  139.     end
  140. end)
  141. plrchat2 = game.Players.LocalPlayer.Chatted:Connect(function(txt)
  142.     if string.sub(txt,1,3) == "end" then
  143.         ended = true
  144.     end
  145. end)
  146.  
  147. print("chat systems loaded")
  148.  
  149. repeat wait() until ended == true
  150. if ended == true then
  151.     endingnotification = "Ended"
  152.     if autominebool == true then
  153.         automine:Disconnect()
  154.         endingnotification = "dont worry guys we turned off go mining"
  155.     end
  156.     plrchat:Disconnect()
  157.     plrchat2:Disconnect()
  158.     notification(endingnotification,endingnotification)
  159. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement