Advertisement
Guest User

gen.lua

a guest
Aug 5th, 2018
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.89 KB | None | 0 0
  1. Username = "gen"
  2. Password = "5337"
  3. DebugPsw = "134"
  4. DebugText = "Debug Mode active"
  5. Side = "bottom"
  6. Seconds = 5
  7. MainText = "Welcome to Prederian"
  8. AccessYes = "Access Granted, Enjoy your stay"
  9. AccessNo = "Access Denied, Alarms now Sounding"
  10.  
  11. term.clear()
  12. term.setCursorPos(2,2)
  13. print(MainText)
  14. term.setCursorPos(4,4)
  15. write("Username: ")
  16. user = read()
  17. write("Password:")
  18. psw = read("*")
  19.  
  20. program = true
  21. while program do
  22.  
  23.  if Username == user and Password == psw then
  24.   term.setCursorPos(2,2)
  25.   print(AccessYes)
  26.   rs.setOutput(Side,true)
  27.   os.sleep(Seconds)
  28.   rs.setOutput(Side,false)
  29.   os.reboot()
  30.  
  31.  elseif Username == user and DebugPsw == psw then
  32.   term.setCursorPos(2,2)
  33.   print(DebugText)
  34.   os.sleep(1,5)
  35.   term.clear()
  36.   term.setCursorPos(1,1)
  37.   program = false
  38.  
  39.  else
  40.   term.setCursorPos(2,6)
  41.   print(AccessNo)
  42.   os.sleep(1,5)
  43.   os.reboot()
  44.   end
  45.  
  46. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement