View difference between Paste ID: fpUZJ0XV and y5Frb6pY
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)
6
 mon.clear()
7-
 mon.setCursorPos(1,3)
7+
8
 mon.setTextScale(0.5)
9
 mon.write("Stand on the")
10
 mon.setCursorPos(1,5)
11
 mon.setTextScale(0.5)
12
 mon.write("Scanner Block")
13
 mon.setCursorPos(1,6)
14
 mon.setTextScale(0.5)
15
 mon.write("for 5 seconds!")
16
 OpenDoor = false
17
 --Check for players
18
 for value,name in pairs(users) do
19
  for T,PlayerTable in pairs(SensDoor.getPlayers()) do
20
   if PlayerTable.name==name then
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, stand by!")
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