Advertisement
Guest User

password

a guest
Mar 31st, 2015
215
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.05 KB | None | 0 0
  1. function open()
  2.   rs.setOutput("right", true)
  3.   os.sleep(5)
  4.   rs.setOutput("right", false)
  5. end
  6.  
  7. local pullEvent = os.pullEvent
  8. os.pullEvent = os.pullEventRaw
  9.  
  10. while true do
  11.   term.clear()
  12.   local w, h = term.getSize()
  13.   term.setCursorPos(math.floor(w-string.len("Property of IBO"))/2,h/2-1)
  14.   print("Property of IBO")
  15.   term.setCursorPos(math.floor(w-string.len("Login Attempts Are Logged"))/2,h)
  16.   print("Login Attempts Are Logged")
  17.   term.setCursorPos(math.floor(w-string.len("Password"))/2,h/2)
  18.   print("Password")
  19.   term.setCursorPos(w/2-4,h/2+1)
  20.   local input = read("*")
  21.   if input == "pasmal" then
  22.     os.pullEvent = pullEvent
  23.     print("Closing out...")
  24.     os.sleept(1)
  25.     error("Exited")
  26.   end
  27.   if input == "nyancat" then
  28.     term.clear()
  29.     term.setCursorPos(math.floor(w-string.len("Access Granted"))/2,h/2)
  30.     print("Access Granted")
  31.     open()
  32.     os.reboot()
  33.   else
  34.     term.clear()
  35.     term.setCursorPos(math.floor(w-string.len("Access Denied"))/2,h/2)
  36.     print("Acess Denied")
  37.     sleep(1)
  38.     os.reboot()
  39.   end
  40. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement