LayZee

Plazters Door

Oct 18th, 2013
215
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. whitelist = {
  2.   ['jona8773'] = true,
  3.   ['plazter'] = true,
  4.   ['lantow'] = true,
  5.   ['antol2765'] = true,
  6.   ['steenkiller'] = true,
  7.   ['layzeedk'] = true,
  8.   ['bunyipcrush'] = true,
  9. }
  10.  
  11. chat = peripheral.wrap("top")
  12.  
  13. function open()
  14.   rs.setBundledOutput("left", colors.white)
  15.   sleep(5)
  16.   rs.setBundledOutput("left", 0)
  17. end
  18.  
  19. while true do
  20.   local event, p1, chat = os.pullEvent("chat")
  21.  
  22.   if whitelist[p1:lower()]  then
  23.     if chat == "open" then
  24.       open()
  25.     elseif chat == "stay" then
  26.       rs.setBundledOutput("left", colors.white)
  27.     elseif chat == "close" then
  28.       rs.setBundledOutput("left", 0)
  29.     end
  30.   end
  31.  
  32.   sleep(1)
  33. end
Advertisement
Add Comment
Please, Sign In to add comment