Advertisement
BillBodkin

door123

Sep 17th, 2017
258
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.29 KB | None | 0 0
  1. state = 1
  2. redstone.setOutput("right", true)
  3. rednet.open("top")
  4. while true do
  5.     id, message  = rednet.receive()
  6.     if message == "door123" then
  7.         if state == 1 then
  8.             redstone.setOutput("right", false)
  9.             state = 0
  10.         else
  11.             redstone.setOutput("right", true)
  12.             state = 1
  13.         end
  14.     end
  15. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement