Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- cmd = peripheral.wrap("left")
- chat = peripheral.wrap("right")
- while true do
- local event, player, message, side = os.pullEvent("endernet_chat_message")
- if message:sub(1,12):lower() == "teleport to " then
- x = message:sub(13,#message)
- cmd.setCommand("tpx "..player.." "..x)
- cmd.runCommand()
- print("Teleported: "..player.."to: "..x)
- end
- if message:sub(1,12):lower() == "take me home" then
- cmd.setCommand("tpx "..player.." 0 218 41 358")
- cmd.runCommand()
- print("Teleported: "..player.." Home successfully")
- end
- if message:sub(1,5):lower()=="time " then
- cmd.setCommand("time set "..message.." 0")
- cmd.runCommand()
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment