Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local event
- local name
- local found
- function door()
- redstone.setOutput("left", 1)
- sleep(5)
- redstone.setOutput("left", 0)
- sleep(5)
- end
- function reset()
- name = ""
- found = false
- end
- function waitClick()
- event, name = os.pullEvent("player", "right")
- print(name)
- end
- function checkName()
- file = io.open("perms", "r")
- for line in file:lines() do
- if name == line then
- found = true
- end
- end
- end
- function run()
- if found == true then
- print("Yay")
- door()
- else
- print("Boo")
- end
- end
- while true do
- reset()
- waitclick()
- checkname()
- run()
- end
Advertisement
Add Comment
Please, Sign In to add comment