Advertisement
Guest User

startup

a guest
Dec 8th, 2019
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.52 KB | None | 0 0
  1. rednet.open("top")
  2. a, cmd, b = rednet.receive()
  3. print("recieved")
  4. if cmd == "open" then
  5.   redstone.setOutput("bottom",true)
  6.   shell.run("startup")
  7. elseif cmd == "test" then
  8.   print("testing")
  9.   test = redstone.getOutput("bottom")
  10.   print(test)
  11.   if test == true then
  12.     rednet.send(8,"true")
  13.     print("reported true")
  14.     shell.run("startup")
  15.   else
  16.     rednet.send(8,"false")
  17.     print("reported false")
  18.     shell.run("startup")
  19.   end
  20. else
  21.   redstone.setOutput("bottom",false)
  22.   shell.run("startup")
  23. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement