Advertisement
CaliRailfan

Jesse.lua

Apr 3rd, 2018
166
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 3.79 KB | None | 0 0
  1. --New JESSE boot script
  2.  
  3. --Remove comment from command lines for OpenComputers
  4.  
  5. --[[local component = require("component")
  6. local c = component.computer
  7. local gpu = component.gpu
  8. gpu.setForeground(0x00FF00)]]
  9.  
  10. function sleep(s) local ntime = os.clock() + s repeat until os.clock() > ntime end
  11.  
  12. ::CLSLogin:: --Clears screen for login and displays the JESSE info.
  13. if not os.execute("clear") then os.execute("cls") elseif not os.execute("cls") then for i = 1,25 do print("\n\n") end end
  14. print ("Java-runtime Environment Script Software Emulator- JESSE")
  15. ::Logon:: --Asks for the Username and
  16. print ("Enter username:")
  17. User = io.read ()
  18. print ("Enter password:")
  19. Pass = io.read ()
  20. if User == "CaliRailfan" and Pass == "pass" then
  21.     goto LoadUIcls
  22. else
  23.     print "Incorrect information entered"
  24.     goto Logon
  25.     end
  26. ::LoadUIcls:: --Clears the screen for the options menu.
  27. if not os.execute("clear") then os.execute("cls") elseif not os.execute("cls") then for i = 1,25 do print("\n\n") end end
  28. print ("")
  29. print ("")
  30. print ("")
  31. print ("")
  32. print ("")
  33. print ("")
  34. print ("")
  35. print ("")
  36. print ("")
  37. print ("")
  38. print ("")
  39. print ("")
  40. print ("")
  41. print ("")
  42. print ("")
  43. --gpu.setForeground (0xFFFFFF)
  44. print ("                                                                                   ___")
  45. print ("                                                                                  |T T|")
  46. print ("                                                                                  | - |")
  47. print ("                                                                                  [  -]")
  48. --gpu.setForeground (0x00FF00)
  49. --computer.beep(600,1)
  50. sleep(1)
  51. if not os.execute("clear") then os.execute("cls") elseif not os.execute("cls") then for i = 1,25 do print("\n\n") end end
  52. print ("Welcome to JESSE, the script software computer made for Minecraft.")
  53. ::ContCom:: --Restarts every time you need to enter a command
  54. print ("Type a command to continue:")
  55. print ("Execute, Exit, EditSrc, ErrCodes")
  56. Command = io.read ()
  57. if Command == "I am not a furry" then
  58.     goto ErrF08
  59. elseif Command == "Exit" then
  60.     goto CLSLogin
  61. elseif Command == "ErrCodes" then
  62.     goto ErrCodes
  63. --[[
  64. elseif Command == "Execute" then
  65.     print ("Enter OpenOS command to execute")
  66.     Exec = io.read ()
  67.     os.execute(Exec)
  68. elseif Command == "EditSrc"
  69.     os.execute("edit /home/Jesse.lua")
  70. ]]
  71. else
  72.     print("Command Invalid")
  73.     goto ContCom
  74.     end
  75.  
  76. ::ErrCodes::
  77. print ("Error Codes:")
  78. print ("0x444E43: DNC- Does not compute. Used when the computer cannot handle a command")
  79. print ("0x434e46: CNF- Code not Finished.")
  80. goto ContCom
  81. ::ErrF08::
  82. if not os.execute("clear") then os.execute("cls") elseif not os.execute("cls") then for i = 1,25 do print("\n\n") end end
  83. --computer.beep(800,0.25)
  84. sleep(0.5)
  85. --computer.beep(800,0.25)
  86. print ("")
  87. print ("")
  88. print ("")
  89. print ("")
  90. print ("")
  91. print ("")
  92. print ("")
  93. print ("")
  94. print ("")
  95. print ("")
  96. print ("")
  97. print ("")
  98. print ("")
  99. print ("")
  100. print ("")
  101. --gpu.setForeground (0xFFFFFF)
  102. print ("                                                                                   ___")
  103. print ("                                                                                  |x x|")
  104. print ("                                                                                  | ^ |")
  105. print ("                                                                                  [  -]")
  106. --gpu.setForeground (0xFF0000)
  107. print ("                                                                                 0444E43")
  108. print ("                                                                                  ERROR")
  109. print ("")
  110. print ("")
  111. print ("")
  112. print ("The fatal error 0x444E43 has occurred.")
  113. print ("")
  114. print ("")
  115. print ("The computer will now open the shell.")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement