Advertisement
Guest User

startup

a guest
May 21st, 2018
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.53 KB | None | 0 0
  1. local rfid = peripheral.wrap("back")
  2. rednet.open("top")
  3. while true do
  4.   if not rfid.isScanning() then
  5.     rfid.scan(5)
  6.   end
  7.   local event,pass, = os.pullEvent()
  8.   if event == "rfid_detected" and pass == "test" then
  9.     rednet.send(25,"dorothy")
  10.     sleep(10)
  11.     redstone.setOutput("right",true)
  12.     sleep(3)
  13.     redstone.setOutput("right",false)
  14.   end
  15.   senderId,msg,protocol = rednet.receive(10)
  16.   if msg == "dorothy" then
  17.     redstone.setOutput("right",true)
  18.     sleep(3)
  19.     redstone.setOutput("right",false)
  20.   end
  21. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement