View difference between Paste ID: rC2EVgtv and fpUZJ0XV
SHOW: | | - or go back to the newest paste.
1
mon = peripheral.wrap("monitor_1")
2
SensDoor = peripheral.wrap("top")
3
users = {"LokeYourLord","00yoshi"}
4
while true do
5-
 sleep(5)
5+
6
 mon.setCursorPos(1,4)
7
 mon.setTextScale(0.5)
8
 mon.write("Stand on the")
9
 mon.setCursorPos(1,5)
10
 mon.setTextScale(0.5)
11
 mon.write("Scanner Block")
12
 mon.setCursorPos(1,6)
13
 mon.setTextScale(0.5)
14
 mon.write("for 5 seconds!")
15
 OpenDoor = false
16
 --Check for players
17
 for value,name in pairs(users) do
18
  for T,PlayerTable in pairs(SensDoor.getPlayers()) do
19
   if PlayerTable.name==name then
20
    sleep(5)
21
    OpenDoor = true
22
   end 
23
  end
24
 end
25
 --Do stuff
26
 if OpenDoor then
27
  mon.clear()
28
  mon.setCursorPos(1,4)
29
  mon.setTextScale(0.5)
30
  mon.write("The doors are")
31
  mon.setCursorPos(1,5)
32
  mon.setTextScale(0.5)
33
  mon.write("opening, please")
34
  mon.setCursorPos(1,6)
35
  mon.setTextScale(0.5)
36
  mon.write("stand by!")
37
  rs.setOutput("left", true)
38
  sleep(6)
39
  rs.setOutput("left", false)
40
 end
41
end