Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- mon = peripheral.wrap("monitor_1")
- SensDoor = peripheral.wrap("top")
- users = {"LokeYourLord","00yoshi"}
- while true do
- sleep(5)
- mon.clear()
- mon.setCursorPos(1,3)
- mon.setTextScale(0.5)
- mon.write("Stand on the")
- mon.setCursorPos(1,4)
- mon.setTextScale(0.5)
- mon.write("Scanner Block")
- mon.setCursorPos(1,5)
- mon.setTextScale(0.5)
- mon.write("for 5 seconds!")
- OpenDoor = false
- --Check for players
- for value,name in pairs(users) do
- for T,PlayerTable in pairs(SensDoor.getPlayers()) do
- if PlayerTable.name==name then
- OpenDoor = true
- end
- end
- end
- --Do stuff
- if OpenDoor then
- mon.clear()
- mon.setCursorPos(1,4)
- mon.setTextScale(0.5)
- mon.write("The doors are")
- mon.setCursorPos(1,5)
- mon.setTextScale(0.5)
- mon.write("opening, stand by!")
- rs.setOutput("left", true)
- sleep(6)
- rs.setOutput("left", false)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment