Advertisement
Guest User

Untitled

a guest
Dec 11th, 2016
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. local allowed = {
  2. ["name 1"] = true,
  3. ["name 2"] = true
  4. }
  5.  
  6. local component = require("component")
  7. local event = require("event")
  8. local sides = require("sides")
  9. local redstone = component.redstone
  10.  
  11. while true do
  12. local _, _, username, message = event.pull("chat_message")
  13. if allowed[username] and message == "open" then
  14. redstone.setOutput(sides.front, 15) -- replace front with the correct side
  15. os.sleep(1) -- replace with how long you want it to stay open
  16. redstone.setOutput(sides.front, 0) -- replace front with the correct side
  17. end
  18. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement