View difference between Paste ID: HmYT7fZY and vUBh4mWy
SHOW: | | - or go back to the newest paste.
1
mon = peripheral.wrap("monitor_0")
2
SensDoor = peripheral.wrap("top")
3
users = {"LokeYourLord","00yoshi"}
4
while true do
5
 sleep(5)
6
 mon.clear()
7-
 mon.setCursorPos(1,1)
7+
8
 mon.setTextScale(0.5)
9
 mon.write("Stand on the")
10-
 mon.setCursorPos(1,2)
10+
 mon.setCursorPos(1,4)
11
 mon.setTextScale(0.5)
12
 mon.write("Scanner Block")
13
 mon.setCursorPos(1,5)
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,1)
28+
  mon.setCursorPos(1,4)
29
  mon.setTextScale(0.5)
30
  mon.write("The doors are")
31-
  mon.setCursorPos(1,2)
31+
  mon.setCursorPos(1,5)
32
  mon.setTextScale(0.5)
33
  mon.write("opening, stand by!")
34
  rs.setOutput("left", true)
35
  sleep(6)
36
  rs.setOutput("left", false)
37
 end
38
end