Don't like ads? PRO users don't see any ads ;-)
Guest

startup

By: a guest on Aug 1st, 2012  |  syntax: Lua  |  size: 0.91 KB  |  hits: 10  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. os.pullEvent = os.pullEventRaw
  2. function printloginS()
  3.  local w, h = term.getSize()
  4.  term.clear()
  5.  term.setCursorPos(1,17)
  6.  print("==================================================")
  7.  term.setCursorPos(1,18)
  8.  print("DSC Password Program v2 Copyright 2012")
  9. end
  10. local password = "lolcat"
  11. local opentime = 2
  12. local side = "back"
  13. local crash = "divine"
  14. term.clear()
  15. printloginS()
  16. term.setCursorPos(4,4)
  17. print("Avengera's Room")
  18. term.setCursorPos(4,6)
  19. print("Password: ")
  20. term.setCursorPos(4,7)
  21. local input = read("*")
  22. if input == crash then
  23.  term.clear()
  24.  term.setCursorPos(1,1)
  25.  return
  26. end
  27. if input == password then
  28.  term.clear()
  29.  printloginS()
  30.  rs.setOutput(side,true)
  31.  term.setCursorPos(4,4)
  32.  print("Password Correct!")
  33.  sleep(opentime)
  34.  rs.setOutput(side,false)
  35.  os.reboot()
  36. else
  37.  term.clear()
  38.  printloginS()
  39.  term.setCursorPos(4,4)
  40.  print("Password Incorrect!")
  41.  sleep(2)
  42.  os.reboot()
  43. end