Advertisement
LokeYourLord

Untitled

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