Advertisement
natie3

Door

Oct 18th, 2019
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.36 KB | None | 0 0
  1. chat = peripheral.wrap("bottom")
  2.  
  3. function move(side)
  4.   for i = 1, 3 do
  5.     rs.setOutput(side, true)
  6.     os.sleep(0.5)
  7.     rs.setOutput(side, false)
  8.     os.sleep(0.5)
  9.   end
  10. end
  11.  
  12. while true do
  13.   _, user, command = os.pullEvent("command")
  14.   if command[1] == "open" then
  15.     move("top")
  16.   elseif command[1] == "close" then
  17.     move("back")
  18.   end
  19. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement