Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local plr = game.Players.LocalPlayer
- local character = plr.Character
- local root = character.HumanoidRootPart
- local mine = game.ReplicatedStorage.MineEvent
- local nextMsg = false
- local ready = true
- local stop = false
- local cn;cn = plr.Chatted:Connect(function(msg)
- if string.lower(msg) == "/e stop" or string.lower(msg) == "stop" then
- stop = true
- cn:Disconnect()
- end
- if not ready then print("NOT READY") return end
- if nextMsg then
- nextMsg = false
- ready = false
- local originalPos = root.CFrame
- wait(.5)
- root.Anchored = true
- wait(.25)
- for i,v in pairs(workspace.Mine:GetChildren()) do
- if stop then break end
- if v.Name == msg or v.Name == string.sub(msg, 4) then
- root.CFrame = v.CFrame
- spawn(function()
- mine:InvokeServer(v)
- end)
- wait(.1)
- end
- end
- wait(.25)
- root.CFrame = originalPos
- wait(.25)
- root.Anchored = false
- ready = true
- return
- end
- if string.lower(msg) == "/e mine" or string.lower(msg) == "mine" then
- nextMsg = true
- wait(20)
- nextMsg = false
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement