Guest User

Turbo

a guest
Oct 1st, 2014
245
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.65 KB | None | 0 0
  1. monitor = peripheral.wrap("right")
  2.  
  3. local myVar = getdeck()
  4. term.write("Welcome to Turbo Lift")
  5. print()
  6. write("Enter Deck Number: ")
  7. return read()
  8.  
  9. local commandBlock = peripheral.wrap("bottom")
  10. while true do
  11. if getdeck() == "break" then return
  12. if myVar == "1" then
  13. commandBlock.setCommand("tp @p[r=2] -211 106 405")
  14. commandBlock.runCommand()
  15. elseif myVar == "2" then
  16. commandBlock.setCommand("tp @p[r=2] -211 113 405")
  17. commandBlock.runCommand()
  18. elseif getdeck() == "3" then
  19. commandBlock.setCommand("tp @p[r=2] -211 120 405")
  20. commandBlock.runCommand()
  21. else
  22. term.clear()
  23. term.setCursorPos(1,1)
  24. Print("Invalid Destination Entered")
  25. end
  26. end
Advertisement
Add Comment
Please, Sign In to add comment