Guest User

Untitled

a guest
Apr 30th, 2015
249
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. mon = peripheral.wrap("monitor_0")
  2. SensDoor = peripheral.wrap("top")
  3. users = {"LokeYourLord","00yoshi"}
  4. while true do
  5. sleep(5)
  6. mon.clear()
  7. mon.setCursorPos(1,1)
  8. mon.setTextScale(0.5)
  9. mon.write("Stand on the")
  10. mon.setCursorPos(1,2)
  11. mon.setTextScale(0.5)
  12. mon.write("Scanner Block")
  13. mon.setCursorPos(1,3)
  14. mon.setTextScale(0.5)
  15. mon.write("for 5 seconds!")
  16. OpenDoor = false
  17. --Check for players
  18. for value,name in pairs(users) do
  19. for T,PlayerTable in pairs(SensDoor.getPlayers()) do
  20. if PlayerTable.name==name then
  21. OpenDoor = true
  22. end
  23. end
  24. end
  25. --Do stuff
  26. if OpenDoor then
  27. mon.clear()
  28. mon.setCursorPos(1,1)
  29. mon.setTextScale(0.5)
  30. mon.write("The doors are")
  31. mon.setCursorPos(1,2)
  32. mon.setTextScale(0.5)
  33. mon.write("opening, stand by!")
  34. rs.setOutput("left", true)
  35. sleep(6)
  36. rs.setOutput("left", false)
  37. end
  38. end
Advertisement
Add Comment
Please, Sign In to add comment