Advertisement
Guest User

Untitled

a guest
Mar 22nd, 2017
385
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.83 KB | None | 0 0
  1. Security = "true"
  2. user = "Ridan"
  3. Password = "pass"
  4.  
  5.  
  6. -- To Enable Password Security, Change The False
  7. -- In The Security Var To true, To Set The
  8. -- Security Off, Just Set The "true" To False.
  9. -- CASE SENSITIVE!
  10. function clear()
  11. term.clear()
  12. term.setCursorPos(1, 1)
  13. end
  14. function programEnder()
  15. n = lol
  16. if n == "lol" then
  17. back()
  18. else
  19. back()
  20. end
  21. end
  22. function back()
  23. write("Console: ")
  24. input = read()
  25. if input == "OSHelp" then
  26. OSHelp()
  27. else if input == "Lights" then
  28. lights()
  29. else if input == "lights" then
  30. lights()
  31. else if input == "shutdown" then
  32. shutdown()
  33. else if input == "worm" then
  34. worm()
  35. else if input == "lua" then
  36. lua()
  37. else if input == "adventure" then
  38. adventure()
  39. else if input == "OSCommands" then
  40. OSCommands()
  41. else if input == "id" then
  42. id()
  43. else if input == "version.stats" then
  44. versionstats()
  45. else
  46. print("No Such Program!")
  47. programEnder()
  48. end
  49. end
  50. end
  51. end
  52. end
  53. end
  54. end
  55. end
  56. end
  57. end
  58. end
  59. function lights()
  60. print("Want the lights on or off?")
  61. lig = read()
  62. if lig == "on" then
  63. redstone.setOutput("bottom", true)
  64. programEnder()
  65. else if lig == "off" then
  66. redstone.setOutput("bottom", false)
  67. programEnder()
  68. else
  69. print("Please enter on / off.")
  70. programEnder()
  71. end
  72. end
  73. end
  74. function worm()
  75. write("Starting Worm")
  76. sleep(0.2)
  77. write(".")
  78. sleep(1)
  79. write(".")
  80. sleep(0.5)
  81. print(".")
  82. sleep(0.3)
  83. shell.run("worm")
  84. programEnder()
  85. end
  86. clear()
  87. function gui()
  88. clear()
  89. print("Password Locked")
  90. term.setCursorPos(1, 3)
  91. print("+-----------------------------------------------+")
  92. print("|Password: |")
  93. print("+-----------------------------------------------+")
  94. term.setCursorPos(12, 4)
  95. end
  96.  
  97. if Security == "true" then
  98. gui()
  99. n = read("*")
  100. if n == Password then
  101. clear()
  102. print("Acess Granted!")
  103. sleep(2)
  104. clear()
  105. write("Programs Loading")
  106. sleep(0.5)
  107. write "."
  108. sleep(0.5)
  109. write "."
  110. sleep(0.5)
  111. write "."
  112. sleep(1)
  113. clear()
  114. redstone.setOutput("bottom", true)
  115. print("Lights Are Too On!")
  116. print("Programs Loaded!")
  117. write("Welcome ")
  118. print(user)
  119. else
  120. clear()
  121. print("Acess Denied!")
  122. sleep(5)
  123. os.reboot()
  124. sleep(1)
  125. end
  126. else if Security == "false" then
  127. write("Programs Loading")
  128. sleep(0.5)
  129. write "."
  130. sleep(0.5)
  131. write "."
  132. sleep(0.5)
  133. write "."
  134. sleep(1)
  135. clear()
  136. redstone.setOutput("bottom", true)
  137. print("Lights Are Too On!")
  138. print("Programs Loaded!")
  139. write("Welcome ")
  140. print(user)
  141. else
  142. print("Somethings Rong With The Security Var! Please Now Terminate The Program And Edit Startup! (Change the security var to true (put quotes around the true) You to can chance it to false)")
  143. end
  144. end
  145. textutils.slowPrint("----------------------------------------------------")
  146. textutils.slowPrint("MegaOS 0.2 Loaded")
  147. textutils.slowPrint("No FireWall Found!")
  148. textutils.slowPrint("Please Enter OSHelp To Get Information!")
  149. textutils.slowPrint("Warning: Commands are CASE SENSITIVE!")
  150. textutils.slowPrint("----------------------------------------------------")
  151.  
  152. -- Functions
  153.  
  154. --+ Gui
  155. --+ Clear
  156. --+ Header
  157. --+ Back
  158. --+ ProgramEnder
  159. ----ProgramFuncs-----------
  160. ----+ Adventure
  161. ----+ OSHelp
  162. ----+ Shutdown
  163. ----+ Lua
  164. ----+ OSCommands
  165. ----+ Id
  166. ----+ Version.stats
  167. ---------------------------
  168. function header()
  169. clear()
  170. textutils.slowPrint("----------------------------------------------------")
  171. end
  172. function adventure()
  173. print("Starting Adventure Game..")
  174. sleep(1)
  175. shell.run("adventure")
  176. end
  177. function OSHelp()
  178. textutils.slowPrint("OperatingSystemHelpCenter Loading..")
  179. sleep(1)
  180. textutils.slowPrint("Loaded!")
  181. textutils.slowPrint("MegaOS Information:")
  182. textutils.slowPrint("MegaOS is a minecraft OperatingSystem Made By Ridan")
  183. textutils.slowPrint("To Get Out Of MegaOS, Just terminate the program (Ctrl + T for some secons) and u shud get ur > back (The CraftOS Console) If you wanna contact the coder of this, just send a email to ridan@live.be. Wanna know all the OS commands? type OSCommands!")
  184. programEnder()
  185. end
  186. function shutdown()
  187. print("Shutting Down..")
  188. sleep(0.5)
  189. print("Saving..")
  190. sleep(0.5)
  191. os.shutdown()
  192. end
  193. function lua()
  194. print("Warning: When U Exit Lua, You Will Be Exited Out Of The OS.")
  195. shell.run("lua")
  196. programEnder()
  197. end
  198. function OSCommands()
  199. print("List Of Commands Loading..")
  200. sleep(1)
  201. print("shutdown OSHelp")
  202. print("lua Lights")
  203. print("worm adventure")
  204. print("id version.stats")
  205. programEnder()
  206. end
  207. function id()
  208. shell.run("id")
  209. programEnder()
  210. end
  211. function versionstats()
  212. print("Current Version: 0.2")
  213. print("BugStats: Still Buggy, Not Even Buggy As 0.1")
  214. print("Commands: 8 commands")
  215. print("Public: No.")
  216. programEnder()
  217. end
  218. -- Programs
  219.  
  220. -- OSHelp
  221. -- Lights
  222.  
  223. -- Starter
  224. back()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement