Guest User

Untitled

a guest
Apr 30th, 2015
212
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  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.write("Stand on the Scanner Block for 5 seconds!")
  9. OpenDoor = false
  10. --Check for players
  11. for value,name in pairs(users) do
  12. for T,PlayerTable in pairs(SensDoor.getPlayers()) do
  13. if PlayerTable.name==name then
  14. OpenDoor = true
  15. end
  16. end
  17. end
  18. --Do stuff
  19. if OpenDoor then
  20. mon.write("The doors are opening, stand by!")
  21. rs.setOutput("left", true)
  22. sleep(6)
  23. rs.setOutput("left", false)
  24. end
  25. end
Advertisement
Add Comment
Please, Sign In to add comment