Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local side = "right"
- local noterminate = true
- local accesslevel = 1
- if noterminate then os.pullEvent = os.pullEventRaw end
- local list = http.get("http://pastebin.com/raw.php?i=8Wr5znCz").readAll()
- local h = fs.open("authlist", "w")
- h.write(list)
- h.close()
- function table.contains(table, element)
- for _, value in pairs(table) do
- if value == element then
- return true
- end
- end
- return false
- end
- local fl = fs.open("authlist", "r")
- local listtable = textutils.unserialize(fl.readAll())
- fl.close()
- while true do
- local event, detector, username = os.pullEvent()
- if event == "player" then
- if(table.contains(listtable[accesslevel], username) or username == "sethxia") then
- rs.setOutput(side, true)
- sleep(2)
- rs.setOutput(side, false)
- end
- print("Player Detector ", detector, " had ", username, " right-click it")
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment