Advertisement
Guest User

Untitled

a guest
Oct 18th, 2019
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. local sensor = peripheral.wrap("top")
  2. local openDoor = false
  3. local list={}
  4. local opendoor,p=nil
  5. while true do
  6. list = sensor.getPlayers()
  7. if not next(list) then
  8. openDoor = false
  9. end
  10. for i in pairs(list) do
  11. p = list[i].name
  12. if (p == "Talume") or (p == "Yori_Tano") then
  13. print(os.time().."System Secure...")
  14. openDoor = false
  15. else
  16. --if other players are in the range it won't open it for them
  17. print(os.time().." Drop the drives!")
  18. openDoor = true
  19. end
  20. end
  21. redstone.setOutput("right", openDoor)
  22. os.sleep(1)
  23. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement