Advertisement
Guest User

startup

a guest
Jul 19th, 2017
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.01 KB | None | 0 0
  1. -- Stop Termination
  2. os.pullEvent = os.pullEventRaw
  3. -- Clear Screen
  4. term.clear()
  5. term.setCursorPos(20,8)
  6.  
  7. -- Username
  8. username = "TheBernster"
  9. -- Pasword
  10. password = "thehouseonfire"
  11. -- Get User Info
  12. print("LOGIN")
  13. term.setCursorPos(11,9)
  14. write("Username: ")
  15. user = read()
  16. term.setCursorPos(11,10)
  17. write("Password: ")
  18. pass = read("*")
  19.  
  20. -- Verify
  21. term.setCursorPos(14,11)
  22. textutils.slowPrint("Verifying...")
  23. if (user == username) then
  24.   if (pass == password) then
  25.     term.setCursorPos(13,12)
  26.     print("Open")
  27.     sleep(1)
  28.     term.clear()
  29.     term.setCursorPos(1,1)
  30.     print("Bernardo's House")
  31.     redstone.setOutput("left", true)
  32.     os.sleep(7)
  33.     redstone.setOutput("left", false)
  34.    
  35.     write("Type exit to exit: ")
  36.      
  37.     if read() ~= "exit" then
  38.       os.reboot()
  39.     end
  40.   else
  41.     term.setCursorPos(14,12)
  42.     print("Step Away From the Door")
  43.     sleep(1)
  44.     os.reboot()
  45.   end
  46. else
  47.   term.setCursorPos(14,12)
  48.   print("Step Away From the Door")
  49.   sleep(1)
  50.   os.reboot()
  51. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement