SHARE
TWEET

OS

a guest Dec 29th, 2016 64 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. --Load AI Image
  2. bGround = paintutils.loadImage(".AI")
  3. --Stop Termination
  4. os.pullEvent = os.pullEventRaw
  5. --Clear Terminal
  6. function loadAI()
  7. paintutils.drawImage(bGround,18,2)
  8. end
  9. function logIn()
  10. term.clear()
  11. term.setTextColor(colors.white)
  12. paintutils.drawImage(bGround,18,2)
  13. term.setCursorPos(1,1)
  14. print("Please Login")
  15. term.setCursorPos(1,2)
  16. term.write("Username : ")
  17. user = read()
  18. term.setCursorPos(1,3)
  19. term.write("Password : ")
  20. pass = read("*")
  21. --Verify
  22. term.setCursorPos(1,4)
  23. textutils.slowPrint("Verifying Information...")
  24. sleep(2)
  25. end
  26. logIn()
  27. function Verify()
  28. if (user == "Kami") or (user == "Delloga") then
  29.   if (pass == "4793") then
  30.     term.clear()
  31.     paintutils.drawImage(bGround,18,2)
  32.     term.setCursorPos(15,10)
  33.     term.setTextColor(colors.lime)
  34.     textutils.slowPrint("WELCOME MASTER")
  35.     sleep(2)
  36.   else
  37.     term.clear()
  38.     paintutils.drawImage(bGround,18,2)
  39.     term.setCursorPos(15,10)
  40.     term.setTextColor(colors.red)
  41.     textutils.slowPrint("WRONG PASSWORD")
  42.     sleep(2)
  43.     logIn()
  44.   end
  45. else
  46.   term.clear()
  47.   paintutils.drawImage(bGround,18,2)
  48.   term.setCursorPos(15,10)
  49.   term.setTextColor(colors.red)
  50.   textutils.slowPrint("WRONG USERNAME")
  51.   sleep(2)
  52.   logIn()
  53. end
  54. end
  55. Verify()
  56. --Mainmenu
  57. function mainMenu()  
  58. term.clear()
  59. Commands()
  60. end
  61. --Commands
  62. function Commands()
  63. term.clear()
  64. loadAI()
  65. term.setTextColor(colors.pink)
  66. term.setCursorPos(1,1)
  67. textutils.slowPrint("WHAT ARE WE GOING TO DO TODAY, MASTER?")
  68. term.setTextColor(colors.white)
  69. local optn = read()
  70. if (optn == "Programs") or (optn == "programs") then
  71.   term.clear()
  72.   loadAI()
  73.   term.setCursorPos(1,1)
  74.   term.setTextColor(colors.pink)
  75.   textutils.slowPrint("HERE IS A LIST OF AVAILABLE PROGRAMS")
  76.   term.setCursorPos(1,2)
  77.   print("------------------------------------")
  78.   term.setCursorPos(1,3)
  79.   term.setTextColor(colors.blue)
  80.   print("Lights --- Toggles the lights on or off.")
  81.   print("Danger --- Locks down all doors.")
  82.   print("Back   --- Brings you back to the main menu.")
  83.   print("Logout --- Logs the current user out.")
  84.   print("Programs --- Prints a list of available programs.")
  85.   term.setTextColor(colors.pink)
  86.   print("------------------------------------")
  87.   sleep(10)
  88.   Commands()
  89. elseif (optn == "Back") or (optn == "back") then
  90.     Commands()
  91. elseif (optn == "Logout") or (optn == "logout") then
  92.   term.clear()
  93.   loadAI()
  94.   term.setTextColor(colors.pink)
  95.   term.setCursorPos(2,10)
  96.   textutils.slowPrint("I AM NOW LOGGING YOU OUT, MASTER.")
  97.   sleep(2)
  98.   term.clear()
  99.   loadAI()
  100.   term.setCursorPos(10,10)
  101.   term.setTextColor(colors.pink)
  102.   textutils.slowPrint("ITTERASSHAI GOSHUJINSAMA!")
  103.   sleep(2)
  104.   logIn()
  105. elseif (optn == "Lights") or (optn == "lights") then
  106.   term.clear()
  107.   loadAI()
  108.   term.setTextColor(colors.pink)
  109.   term.setCursorPos(1,1)
  110.   textutils.slowPrint("I WILL NOW TURN THE LIGHTS OFF...")
  111.   sleep(3)
  112.   term.setCursorPos(1,5)
  113.   textutils.slowPrint("LIGHTS HAVE BEEN TURNED OFF.")
  114.   sleep(2)
  115.   Commands()
  116. elseif (optn == "Danger") or (optn == "danger") then
  117.   term.clear()
  118.   loadAI()
  119.   term.setTextColor(colors.red)
  120.   term.setCursorPos(1,1)
  121.   textutils.slowPrint("LABORATORY NOW GOING INTO QUARANTINE...")
  122.   sleep(1)
  123.   term.clear()
  124.   loadAI()
  125.   sleep(1)
  126.   term.setCursorPos(1,1)
  127.   print("LABORATORY NOW GOING INTO QUARANTINE...")
  128.   sleep(1)
  129.   term.clear()
  130.   loadAI()
  131.   sleep(1)
  132.   term.setCursorPos(1,1)
  133.   print("LABORATORY NOW GOING INTO QUARANTINE...")
  134.   sleep(3)
  135.   term.setCursorPos(1,3)
  136.   term.setTextColor(colors.pink)
  137.   textutils.slowPint("TO UNLOCK THE DOORS")
  138.   term.setCursorPos(1,4)
  139.   textutils.slowPrint("PRESS")
  140.   term.setTextColor(colors.blue)
  141.   term.setCursorPos(6,4)
  142.   textutils.slowPrint("ENTER")
  143.   term.setTextColor(colors.white)
  144.   local enterKey = read()
  145.   if (enterKey == " ") or (enterKey == "  ") then
  146.     term.setTextColor(colors.pink)
  147.     term.setCursorPos(1,6)
  148.     textutils.slowPrint("NOW UNLOCKING ALL DOORS")
  149.     sleep(3)
  150.     term.setCursorPos(1,8)
  151.     textutils.slowPrint("NOW RETURNING TO MAIN MENU...")
  152.     sleep(3)
  153.     Commands()
  154.   else
  155.     term.setTextColor(colors.pink)
  156.     term.setCursorPos(1,6)
  157.     textutils.slowPrint("NOW UNLOCKING ALL DOORS")
  158.     sleep(3)
  159.     term.setCursorPos(1,8)
  160.     textutils.slowPrint("NOW RETURNING TO MAIN MENU...")
  161.     sleep(3)
  162.     Commands()
  163.   end
  164. else
  165.   term.clear()
  166.   loadAI()
  167.   term.setTextColor(colors.pink)
  168.   term.setCursorPos(1,1)
  169.   textutils.slowPrint("NO PROGRAM CALLED "..optn.." FOUND")
  170.   term.setCursorPos(1,2)
  171.   textutils.slowPrint("MASTER, PLEASE TRY THE KEYWORD:")  
  172.   term.setTextColor(colors.blue)
  173.   term.setCursorPos(1,3)
  174.   textutils.slowPrint("PROGRAMS")
  175.   sleep(5)
  176.   Commands()
  177. end
  178. end  
  179. mainMenu()
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top