Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local allowed = {
- ["name 1"] = true,
- ["name 2"] = true
- }
- local component = require("component")
- local event = require("event")
- local sides = require("sides")
- local redstone = component.redstone
- while true do
- local _, _, username, message = event.pull("chat_message")
- if allowed[username] and message == "open" then
- redstone.setOutput(sides.front, 15) -- replace front with the correct side
- os.sleep(1) -- replace with how long you want it to stay open
- redstone.setOutput(sides.front, 0) -- replace front with the correct side
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement