View difference between Paste ID: wwkGAXtL and vmXiwWWQ
SHOW: | | - or go back to the newest paste.
1
-- This program will wait for the "player" event with my username and emit redstone to the left if the player is me.
2
term.clear()
3
term.setCursorPos(1,1)
4
local pd, param1 = os.pullEvent()
5
function openDoor()
6
  rs.setOutput("left", true)
7
  sleep(2)
8
  rs.setOutput("left", false)
9
end
10
11
if pd == "player" and param1 == "dyl421421" then
12
  print("Player Detected. Door is Open.")
13
  openDoor()
14
  print("Door Closed")
15
  sleep(.5)
16
end
17
term.clear()
18
shell.run("startup")