Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- This program will wait for the "player" event with my username and emit redstone to the left if the player is me.
- term.clear()
- term.setCursorPos(1,1)
- local pd, param1 = os.pullEvent()
- function openDoor()
- rs.setOutput("left", true)
- sleep(2)
- rs.setOutput("left", false)
- end
- if pd == "player" and param1 == "dyl421421" then
- print("Player Detected. Door is Open.")
- openDoor()
- print("Door Closed")
- sleep(.5)
- end
- term.clear()
- shell.run("startup")
Advertisement
Add Comment
Please, Sign In to add comment