Advertisement
Guest User

Untitled

a guest
Dec 20th, 2017
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.06 KB | None | 0 0
  1. --PullEvent=PullEventRaw
  2. --Variabeln Block----------------------------------------
  3.  
  4. lock=1
  5. username=0
  6. password=1
  7. trys=6
  8. menu=0
  9. read=0
  10.  
  11. --Untenstahende Variabeln als 2-16 ebenfalls initialisieren
  12.  
  13. task1="Unknwon"
  14. status1="Unknwon"
  15. energie1="Unknwon"
  16. in1a="Unknwon"
  17. out1a="Unknwon"
  18.  
  19. power1="Offline"
  20. input1="Offline"
  21. output1="Offline"
  22.  
  23. --Funktions Block----------------------------------------
  24. --Login
  25.  
  26. function Login()
  27.  
  28. if username==1 then
  29. print("Enter your Username : ")
  30. username=read()
  31. else
  32. username="User"
  33. end
  34.  
  35. while lock==1 do
  36.  
  37. trys=trys-1
  38. if trys==0 then
  39. print("You not autorised to Use this Computeri")
  40. sleep(1)
  41. shutdown()
  42. else
  43. clear()
  44. end
  45.  
  46. if password==1 then
  47. print("Enter your Password : ")
  48. password=read("*")
  49. elseif password==0 then
  50. password=akUbUqe4
  51. end
  52.  
  53.  
  54. if username=="User" then
  55. if password=="akUbUqe4" then
  56. lock=0
  57. end
  58. elseif username=="sven002986" then
  59. if password=="002986" then
  60. lock=0
  61. end
  62. elseif username=="SparkofPhönix"then
  63. if password=="SoP" then
  64. lock=0
  65. end
  66. elseif username=="skate702"then
  67. if password=="702" then
  68. lock=0
  69. end
  70. elseif username=="Benjamin"then
  71. if password=="Beispiel" then
  72. lock=0
  73. end
  74. elseif username=="Ezekiel Jones"then
  75. if password=="Meisterdieb" then
  76. lock=0
  77. end
  78. else
  79. clear()
  80. print("Your Password is Wrongi")
  81. print("Please try again.")
  82. sleep(1)
  83. clear()
  84. end
  85. end
  86.  
  87. clear()
  88. print("Welcome ",username)
  89. sleep(1)
  90. Menu0()
  91.  
  92. end
  93.  
  94. --Login
  95. --Menu0
  96.  
  97. function Menu0()
  98.  
  99. clear()
  100. print("0.Mainmenu")
  101. print()
  102. print("[1.Login]")
  103. print("[2.Status]")
  104. print("[3.Controle]")
  105. print("[4.Log]")
  106. print("[5.Shutdown]")
  107. print("[6.Open OS]")
  108.  
  109. menu=read()
  110. if menu==1 then
  111. Menu1()
  112. elseif menu==2 then
  113. Menu2()
  114. elseif menu==3 then
  115. Menu3()
  116. elseif menu==4 then
  117. Menu4()
  118. elseif menu==5 then
  119. Menu5()
  120. elseif menu==6 then
  121. Menu6()
  122. else
  123. Menu0()
  124. end
  125. end
  126.  
  127. --Menu0
  128. --Menu1
  129.  
  130. function Menu1()
  131.  
  132. clear()
  133. print("1.Login")
  134. print()
  135. print(" 1.Username:[",username,"]")
  136. print(" 2.Password:[",password,"]")
  137. print("[3.Screen keybord]")
  138. print("[4.Back]")
  139.  
  140. menu=read()
  141. if menu==1 then
  142. Menu11()
  143. elseif menu==2 then
  144. Menu12()
  145. elseif menu==3 then
  146. Menu13()
  147. elseif menu==4 then
  148. Menu0()
  149. else
  150. Menu1()
  151. end
  152.  
  153. end
  154.  
  155. --Menu1
  156. --Menu2
  157.  
  158. function Menu2()
  159.  
  160. clear()
  161. print("2.Status")
  162. print()
  163. print(" --------------- ")
  164. print(" ----22222-33333---- ")
  165. print(" -111-22222-33333-444- ")
  166. print("--111-22222-33333-444--")
  167. print("------22222-33333------")
  168. print("-55555-----------88888-")
  169. print("-55555-6660-0777-88888-")
  170. print("-55555-6660-0777-88888-")
  171. print("-55555-000XXX000-88888-")
  172. print("----------XXX----------")
  173. print("-99999-000XXX000-CCCCC-")
  174. print("-99999-AAA0-0BBB-CCCCC-")
  175. print("-99999-AAA0-0BBB-CCCCC-")
  176. print("-99999-----------CCCCC-")
  177. print("------EEEEE-FFFFF------")
  178. print("--DDD-EEEEE-FFFFF-GGG--")
  179. print("--DDD-EEEEE-FFFFF-GGG- ")
  180. print(" ----EEEEE-FFFFF---- ")
  181. print(" --------------- ")
  182. print("[0.Back]")
  183.  
  184. menu=read()
  185. if menu==0 then
  186. Menu0()
  187. elseif menu==1 then
  188. Menu21()
  189. elseif menu==2 then
  190. Menu22()
  191. elseif menu==3 then
  192. Menu23()
  193. elseif menu==4 then
  194. Menu24()
  195. elseif menu==5 then
  196. Menu25()
  197. elseif menu==6 then
  198. Menu26()
  199. elseif menu==7 then
  200. Menu27()
  201. elseif menu==8 then
  202. Menu28()
  203. elseif menu==9 then
  204. Menu29()
  205. elseif menu==A then
  206. Menu210()
  207. elseif menu==1 then
  208. Menu21()
  209. elseif menu==B then
  210. Menu211()
  211. elseif menu==C then
  212. Menu212()
  213. elseif menu==D then
  214. Menu213()
  215. elseif menu==E then
  216. Menu214()
  217. elseif menu==F then
  218. Menu215()
  219. elseif menu==G then
  220. Menu216()
  221. else
  222. Menu2()
  223. end
  224.  
  225. end
  226.  
  227. --Menu2
  228. --Menu3
  229.  
  230. function Menu3()
  231.  
  232. clear()
  233. print("3.Controle")
  234. print()
  235. print("[01.Sektor 1] [Online] [02.Sektor 2] [Online]")
  236. print()
  237. print("[03.Sektor 3] [Online] [04.Sektor 4] [Online]")
  238. print()
  239. print("[05.Sektor 5] [Online] [06.Sektor 6] [Online]")
  240. print()
  241. print("[07.Sektor 7] [Online] [08.Sektor 8] [Online]")
  242. print()
  243. print("[09.Sektor 9] [Online] [10.Sektor A] [Online]")
  244. print()
  245. print("[11.Sektor B] [Online] [12.Sektor C] [Online]")
  246. print()
  247. print("[13.Sektor D] [Online] [14.Sektor E] [Online]")
  248. print()
  249. print("[15.Sektor F] [Online] [16.Sektor G] [Online]")
  250. print()
  251. print("[17.Back]")
  252.  
  253. menu=read()
  254. if menu==1 then
  255. Menu31()
  256. elseif menu==2 then
  257. Menu32()
  258. elseif menu==3 then
  259. Menu33()
  260. elseif menu==4 then
  261. Menu34()
  262. elseif menu==5 then
  263. Menu35()
  264. elseif menu==6 then
  265. Menu36()
  266. elseif menu==7 then
  267. Menu37()
  268. elseif menu==8 then
  269. Menu38()
  270. elseif menu==9 then
  271. Menu39()
  272. elseif menu==10 then
  273. Menu310()
  274. elseif menu==11 then
  275. Menu311()
  276. elseif menu==12 then
  277. Menu312()
  278. elseif menu==13 then
  279. Menu313()
  280. elseif menu==14 then
  281. Menu314()
  282. elseif menu==15 then
  283. Menu315()
  284. elseif menu==16 then
  285. Menu316()
  286. elseif menu==17 then
  287. Menu0()
  288. else
  289. Menu3()
  290. end
  291.  
  292. end
  293.  
  294. --Menu3
  295. --Menu4
  296.  
  297. function Menu4()
  298.  
  299. clear()
  300. print("4.Log")
  301. print()
  302. print("[1.clear() Log]")
  303. print("[2.Back]")
  304. print("No Log Entrys.")
  305.  
  306.  
  307. menu=read()
  308. if menu==1 then
  309. Menu41()
  310. elseif menu==2 then
  311. Menu0()
  312. else
  313. Menu4()
  314. end
  315.  
  316. end
  317.  
  318. --Menu4
  319. --Menu5
  320.  
  321. function Menu5()
  322.  
  323. clear()
  324. print("5.Shutdown")
  325. print()
  326. print("[1.Logout]")
  327. print("[2.Restart]")
  328. print("[3.Shutdown Computer]")
  329. print("[4.STOP System]")
  330. print("[5.Back]")
  331.  
  332. menu=read()
  333. if menu==1 then
  334. Menu51()
  335. elseif menu==2 then
  336. Menu52()
  337. elseif menu==3 then
  338. Menu53()
  339. elseif menu==4 then
  340. Menu54()
  341. elseif menu==5 then
  342. Menu0()
  343. else
  344. Menu5()
  345. end
  346.  
  347. end
  348.  
  349. --Menu5
  350. --Menu6
  351.  
  352. function Menu6()
  353.  
  354. clear()
  355. print("6.Open OS")
  356. print()
  357. print("[1.Back]")
  358.  
  359. menu=read()
  360. if menu==1 then
  361. Menu0()
  362. else
  363. Menu6()
  364. end
  365.  
  366. end
  367.  
  368. --Menu6
  369. --Menu11
  370.  
  371. function Menu11()
  372.  
  373. setcursorPos=({14,3})
  374. username=read()
  375. Menu1()
  376.  
  377. end
  378.  
  379. --Menu11
  380. --Menu12
  381.  
  382. function Menu12()
  383.  
  384. setcursorPos=({14,4})
  385. password=read()
  386. Menu1()
  387.  
  388. end
  389.  
  390. --Menu12
  391. --Menu13
  392.  
  393. function Menu13()
  394.  
  395. clear()
  396. print("Zurzeit NICHT verfügbar!")
  397. sleep(1)
  398. Menu1()
  399.  
  400. end
  401.  
  402. --Menu13
  403. --Menu21
  404.  
  405. function Menu21()
  406.  
  407. clear()
  408. print("2.1 Sektor 1")
  409. print()
  410. print("Task: ",task1)
  411. print("Status: ",status1)
  412. print("Energie: ",energie1,"rf/t")
  413. print("Input: ","1.",in1a)
  414. print("Output: ","1.",out1a)
  415. print("[1.Controle: ","3.1]")
  416. print("[2.Back]")
  417.  
  418. menu=read()
  419. if menu==1 then
  420. Menu31()
  421. elseif menu==2 then
  422. Menu2()
  423. else
  424. Menu21()
  425. end
  426.  
  427. end
  428.  
  429. --Menu21
  430. --Menu2X
  431.  
  432. function Menu22()
  433. end
  434. function Menu23()
  435. end
  436. function Menu24()
  437. end
  438. function Menu25()
  439. end
  440. function Menu26()
  441. end
  442. function Menu27()
  443. end
  444. function Menu28()
  445. end
  446. function Menu29()
  447. end
  448. function Menu210()
  449. end
  450. function Menu211()
  451. end
  452. function Menu212()
  453. end
  454. function Menu213()
  455. end
  456. function Menu214()
  457. end
  458. function Menu215()
  459. end
  460. function Menu216()
  461. end
  462.  
  463. --Menu2X
  464. --Menu31
  465.  
  466. function menu31()
  467.  
  468. clear()
  469. print("3.1 Sektor 1 Controle ")
  470. print()
  471. print("Task: ",task1)
  472. print("Status: [",status1,"]")
  473. print("Energie: [",power1,"]")
  474. print("Input: [",input1)
  475. print(" [",in1a)
  476. print("Output: [",output1)
  477. print("[1.Status: ","2.1]")
  478. print("[2.Back]")
  479.  
  480. menu=read()
  481. if menu==1 then
  482. Menu21()
  483. elseif menu==2 then
  484. Menu3()
  485. else
  486. Menu31()
  487. end
  488.  
  489. end
  490.  
  491. --Menu31
  492. --!!!Settings Menu31
  493.  
  494. function Menu31s()
  495.  
  496. cursorpos=({17,4})
  497. read=read()
  498. if read=="on" then
  499. status1="Online"
  500. elseif read=="On" then
  501. status1="Online"
  502. elseif read=="ON" then
  503. status="Online"
  504. elseif read=="off" then
  505. status1="Offline"
  506. elseif read=="Off" then
  507. status1="Offline"
  508. elseif read=="OFF" then
  509. status="Offline"
  510. else
  511. clear()
  512. print("Use On or Off to Change status.")
  513. sleep(1)
  514. Menu31()
  515. end
  516.  
  517. end
  518.  
  519. --!!!Controle Settings Menu31s
  520. --Menu3X
  521.  
  522. function Menu32()
  523. end
  524. function Menu33()
  525. end
  526. function Menu34()
  527. end
  528. function Menu35()
  529. end
  530. function Menu36()
  531. end
  532. function Menu37()
  533. end
  534. function Menu38()
  535. end
  536. function Menu39()
  537. end
  538. function Menu310()
  539. end
  540. function Menu311()
  541. end
  542. function Menu312()
  543. end
  544. function Menu313()
  545. end
  546. function Menu314()
  547. end
  548. function Menu315()
  549. end
  550. function Menu316()
  551. end
  552.  
  553. --Menu3X
  554. --Menu41
  555.  
  556. function Menu41()
  557.  
  558. clear()
  559. print("4.Log")
  560. print()
  561. print("[1.clear() Log]")
  562. print("[2.Back]")
  563. print("All Log Entrys removed.")
  564.  
  565.  
  566. menu=read()
  567. if menu==1 then
  568. Menu41()
  569. elseif menu==2 then
  570. Menu0()
  571. else
  572. Menu4()
  573. end
  574.  
  575. end
  576.  
  577. --Menu41
  578. --Menu51
  579.  
  580. function Menu51()
  581.  
  582. lock=1
  583. trys=trys+6
  584. Login()
  585.  
  586. end
  587.  
  588. --Menu51
  589. --Menu52
  590.  
  591. function Menu52()
  592.  
  593. os.restart()
  594.  
  595. end
  596.  
  597. --Menu52
  598. --Menu53
  599.  
  600. function Menu53()
  601.  
  602. os.shutdown()
  603.  
  604. end
  605.  
  606. --Menu53
  607. --Menu54
  608.  
  609. function Menu54()
  610.  
  611. status1= "Offline"
  612. status2= "Offline"
  613. status3= "Offline"
  614. status4= "Offline"
  615. status5= "Offline"
  616. status6= "Offline"
  617. status7= "Offline"
  618. status8= "Offline"
  619. status9= "Offline"
  620. status10="Offline"
  621. status11="Offline"
  622. status12="Offline"
  623. status13="Offline"
  624. status14="Offline"
  625. status15="Offline"
  626. status16="Offline"
  627. Menu2()
  628.  
  629. end
  630.  
  631. --Menu54
  632. --Funktions Block ENDE-----------------
  633.  
  634. Login()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement