Guest User

door

a guest
Oct 18th, 2013
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.62 KB | None | 0 0
  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.  
  21.  local event, p1, chat = os.pullEvent("chat")
  22.  
  23.   if whitelist [ p1:lower() ]  then
  24.   if chat == "open" then
  25.    open()
  26.   elseif chat == "stay" then
  27.    rs.setBundledOutput("left", colors.white)
  28.   elseif chat == "close" then
  29.    rs.setBundledOutput("left", 0)
  30.   end
  31.  end
  32. sleep(1)
  33. end
Advertisement
Add Comment
Please, Sign In to add comment