Advertisement
sethxi

Untitled

Apr 29th, 2013
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. function table.contains(table, element)
  2. for _, value in pairs(table) do
  3. if value == element then
  4. return true
  5. end
  6. end
  7. return false
  8. end
  9.  
  10. allowed = {"sethxia"}
  11. mini.lock()
  12. mini.clear()
  13. print("Welcome to XiTech Home.")
  14. print("Please authenticate")
  15. while true do
  16. e,p=os.pullEvent("player")
  17. if table.contains(allowed, p) then
  18. rs.setOutput("left", true)
  19. rs.setOutput("right", true)
  20. sleep(3)
  21. os.reboot()
  22. else
  23. print("Access Denied")
  24. sleep(3)
  25. os.reboot()
  26. end
  27. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement