Advertisement
jared314

Untitled

Jul 17th, 2014
325
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.96 KB | None | 0 0
  1. while true do
  2. m = peripheral.wrap("left")
  3. state = rs.getInput("back")
  4. if state == false then
  5. m.clear()
  6. m.setCursorPos(1,1)
  7. m.write("Workshop")
  8. m.setCursorPos(1,3)
  9. m.write("Status: ")
  10. m.setCursorPos(9,3)
  11. m.setBackgroundColor(colors.green)
  12. m.write(" Sealed ")
  13. m.setBackgroundColor(colors.black)
  14. m.setCursorPos(1,4)
  15. m.write("Time:")
  16. time = os.time()
  17. ftime = textutils.formatTime(time, false)
  18. m.setCursorPos(10,4)
  19. m.write(ftime)
  20. else
  21. m.clear()
  22. m.setCursorPos(1,4)
  23. m.write("Time:")
  24. time = os.time()
  25. ftime = textutils.formatTime(time, false)
  26. m.setCursorPos(10,4)
  27. m.write(ftime)
  28. m.setCursorPos(1,1)
  29. m.write("Workshop")
  30. m.setCursorPos(1,3)
  31. m.write("Status: ")
  32. m.setCursorPos(9,3)
  33. m.setBackgroundColor(colors.red)
  34. m.write(" Unsealed ")
  35. m.setBackgroundColor(colors.black)
  36. sleep(1)
  37. m.setCursorPos(9,3)
  38. m.write(" Unsealed ")
  39. m.setCursorPos(10,4)
  40. m.write(ftime)
  41. end
  42. sleep(1)
  43. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement