Advertisement
Guest User

startup

a guest
Oct 21st, 2017
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.33 KB | None | 0 0
  1. m = peripheral.wrap("bottom")
  2. rednet.open("top")
  3.  
  4. function stock()
  5.    if rs.getInput("front") == false then
  6.    rednet.send(14, "on")
  7.    m.setBackgroundColor(colors.red)
  8.    m.clear()
  9.    else
  10.    m.setBackgroundColor(colors.green)
  11.    rednet.send(14, "off")
  12.    m.clear()
  13.  end
  14. end
  15.  
  16. while true do
  17.   stock()
  18.   os.sleep(1)
  19. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement