Advertisement
TheRobloxPlayer2509

REx: Reborn mine specific ores by YeetusOffACliff

Mar 6th, 2022
1,526
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.27 KB | None | 0 0
  1. local plr = game.Players.LocalPlayer
  2. local character = plr.Character
  3. local root = character.HumanoidRootPart
  4. local mine = game.ReplicatedStorage.MineEvent
  5.  
  6. local nextMsg = false
  7. local ready = true
  8. local stop = false
  9.  
  10. local cn;cn = plr.Chatted:Connect(function(msg)
  11.     if string.lower(msg) == "/e stop" or string.lower(msg) == "stop" then
  12.         stop = true
  13.         cn:Disconnect()
  14.     end
  15.     if not ready then print("NOT READY") return end
  16.     if nextMsg then
  17.         nextMsg = false
  18.         ready = false
  19.         local originalPos = root.CFrame
  20.         wait(.5)
  21.         root.Anchored = true
  22.         wait(.25)
  23.         for i,v in pairs(workspace.Mine:GetChildren()) do
  24.             if stop then break end
  25.             if v.Name == msg or v.Name == string.sub(msg, 4) then
  26.                 root.CFrame = v.CFrame
  27.                 spawn(function()
  28.                     mine:InvokeServer(v)
  29.                 end)
  30.                 wait(.1)
  31.             end
  32.         end
  33.         wait(.25)
  34.         root.CFrame = originalPos
  35.         wait(.25)
  36.         root.Anchored = false
  37.         ready = true
  38.         return
  39.     end
  40.     if string.lower(msg) == "/e mine" or string.lower(msg) == "mine" then
  41.         nextMsg = true
  42.         wait(20)
  43.         nextMsg = false
  44.     end
  45. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement