Advertisement
Guest User

startup

a guest
Jul 12th, 2018
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.63 KB | None | 0 0
  1. term.clear()
  2. term.setCursorPos(1,1)
  3. repeat
  4.     print("Insert username")
  5.     user = read()
  6.     term.clear()
  7.     term.setCursorPos(1,1)
  8.     print("Insert password")
  9.     pass = read("*")
  10.     term.clear()
  11.     term.setCursorPos(1,1)
  12.     if user ~= "hooman" or pass ~= "base" then
  13.         term.clear()
  14.         term.setCursorPos(1,1)
  15.         print("Incorrect login credentials")
  16.         sleep(1)
  17.         term.clear()
  18.         term.setCursorPos(1,1)
  19.     end
  20.  
  21. until user == "hooman" and pass == "base"
  22.     print("Access Granted")
  23.     redstone.setOutput("right",true)
  24.     sleep(5)
  25.     redstone.setOutput("right",false)
  26.     os.reboot()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement