Advertisement
Alakazard12

Door Client

Dec 1st, 2012
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.47 KB | None | 0 0
  1. rednet.open("bottom")
  2.  
  3. local serv = 99
  4.  
  5. term.clear()
  6. term.setCursorPos(1, 1)
  7.  
  8. os.pullEvent = os.pullEventRaw
  9.  
  10. print("Tech Industries")
  11.  
  12. write("Password: ")
  13.  
  14. local ps = read("*")
  15.  
  16. rednet.send(serv, ps)
  17.  
  18. repeat
  19.   id, msg = rednet.receive()
  20. until id == serv
  21.  
  22. if msg == "no" then
  23.   term.setTextColor(colors.red)
  24.   print("Access denied")
  25.   sleep(2.5)
  26.   os.reboot()
  27. else
  28.   term.setTextColor(colors.green)
  29.   print("Access granted")
  30.   sleep(2.5)
  31.   os.reboot()
  32. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement