Advertisement
Guest User

startup

a guest
Dec 3rd, 2016
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 4.80 KB | None | 0 0
  1. User1 = "Dan"
  2. User1p = "Littlelady10"
  3. User1a = "2"
  4.  
  5. User2 = "Ash"
  6. User2p = "AB"
  7. User2a = "1"
  8.  
  9. User3 = "Tony"
  10. User3p = ""
  11. User3a = "1"
  12.  
  13. User4 = "Chris"
  14. User4p = ""
  15. User4a = "1"
  16.  
  17. User5 = ""
  18. User5p = ""
  19. User5a = "1"
  20.  
  21. term.clear()
  22. term.setCursorPos(1,1)
  23.  
  24. function Login()
  25.     print("Welcome to Dan's Train station.")
  26.     sleep(1)
  27.     print("To contiune please insert your Username:")
  28.     input = read()
  29.     if input == User1 then
  30.         U1()
  31.     elseif input == User2 then
  32.         U2()
  33.     elseif input == User3 then
  34.         U3()
  35.     elseif input == User4 then
  36.         U4()
  37.     end
  38. end
  39.  
  40. function U1()
  41.     term.clear()
  42.     term.setCursorPos(1,1)
  43.     print("Username: "..User1)
  44.     sleep(1)
  45.     print("Please insert password:")
  46.     input = read("x")
  47.     if input == User1p then
  48.         print("User Verified")
  49.         sleep(1)
  50.         term.clear()
  51.         term.setCursorPos(1,1)
  52.         print("Welcome "..User1)
  53.         sleep(1)
  54.         if User1a == "1" then
  55.             A1()
  56.         elseif User1a == "2" then
  57.             A2()
  58.         end
  59.     else
  60.         print("Incorrect password")
  61.         sleep(1)
  62.         os.reboot()
  63.     end
  64. end
  65.  
  66. function U2()
  67.     term.clear()
  68.     term.setCursorPos(1,1)
  69.     print("Username: "..User2)
  70.     sleep(1)
  71.     print("Please insert password:")
  72.     input = read("x")
  73.     if input == User2p then
  74.         print("User Verified")
  75.         sleep(1)
  76.         term.clear()
  77.         term.setCursorPos(1,1)
  78.         print("Welcome "..User2)
  79.         sleep(1)
  80.         if User2a == "1" then
  81.             A1()
  82.         elseif User2a == "2" then
  83.             A2()
  84.         end
  85.     else
  86.         print("Incorrect password")
  87.         sleep(1)
  88.         os.reboot()
  89.     end
  90. end
  91.  
  92. function U3()
  93.     term.clear()
  94.     term.setCursorPos(1,1)
  95.     print("Username: "..User3)
  96.     sleep(1)
  97.     print("Please insert password:")
  98.     input = read("x")
  99.     if input == User3p then
  100.         print("User Verified")
  101.         sleep(1)
  102.         term.clear()
  103.         term.setCursorPos(1,3)
  104.         print("Welcome "..User3)
  105.         sleep(1)
  106.         if User3a == "1" then
  107.             A1()
  108.         elseif User3a == "2" then
  109.             A2()
  110.         end
  111.     else
  112.         print("Incorrect password")
  113.         sleep(1)
  114.         os.reboot()
  115.     end
  116. end
  117.  
  118. function U4()
  119.     term.clear()
  120.     term.setCursorPos(1,1)
  121.     print("Username: "..User4)
  122.     sleep(1)
  123.     print("Please insert password:")
  124.     input = read("x")
  125.     if input == User4p then
  126.         print("User Verified")
  127.         sleep(1)
  128.         term.clear()
  129.         term.setCursorPos(1,1)
  130.         print("Welcome "..User4)
  131.         sleep(1)
  132.         if User4a == "1" then
  133.             A1()
  134.         elseif User4a == "2" then
  135.             A2()
  136.         end
  137.     else
  138.         print("Incorrect password")
  139.         sleep(1)
  140.         os.reboot()
  141.     end
  142. end
  143.  
  144. function U5()
  145.     term.clear()
  146.     term.setCursorPos(1,1)
  147.     print("Username: "..User5)
  148.     sleep(1)
  149.     print("Please insert password:")
  150.     input = read("x")
  151.     if input == User5p then
  152.         print("User Verified")
  153.         sleep(1)
  154.         term.clear()
  155.         term.setCursorPos(1,1)
  156.         print("Welcome "..User5)
  157.         sleep(1)
  158.         if User5a == "1" then
  159.             A1()
  160.         elseif User5a == "2" then
  161.             A2()
  162.         end
  163.     else
  164.         print("Incorrect password")
  165.         sleep(1)
  166.         os.reboot()
  167.     end
  168. end
  169.  
  170. function A1()
  171.     print("")
  172.     print("Please select one of the following:")
  173.     sleep(1)
  174.     print("To request Minecart. Press 1")
  175.     sleep(1)
  176.     print("To travel to a Station. Press 2")
  177.     sleep(1)
  178.     print("To restart logout. Press 3")
  179.     input = read()
  180.     if input == "1" then
  181.         Mrequest()
  182.     elseif input == "2" then
  183.         Station()
  184.     elseif input == "3" then
  185.         os.reboot()
  186.     end
  187. end
  188.  
  189. function A2()
  190.     print("")
  191.     print("Please select one of the following:")
  192.     sleep(1)
  193.     print("To request Minecart. Press 1")
  194.     sleep(1)
  195.     print("To travel to a Station. Press 2")
  196.     sleep(1)
  197.     print("To proceed to admin panel. Press 3")
  198.     sleep(1)
  199.     print("To terminate program. Press 4")
  200.     sleep(1)
  201.     print("To restart logout. Press 5")
  202.     input = read()
  203.     if input == "1" then
  204.         Mrequest()
  205.     elseif input == "2" then
  206.         Station()
  207.     elseif input == "3" then
  208.         Admin()
  209.     elseif input == "4" then
  210.         Terminate()
  211.     elseif input == "5" then
  212.         os.reboot()
  213.     end
  214. end
  215.  
  216. function Mrequest()
  217.  
  218. end
  219.  
  220. function Station()
  221.     term.clear()
  222.     term.setCursorPos(1,1)
  223.     print("--------------------------")
  224.     sleep(1)
  225.     print("Stations Menu")
  226.     sleep(1)
  227.     print("--------------------------")
  228.     print("")
  229.     sleep(1)
  230.     print("To travel to the capital. Press 1")
  231.     sleep(1)
  232.     print("To travel to Redstown. Press 2")
  233.     sleep(1)
  234.     print("To travel to Zenith. Press 3")
  235.     sleep(1)
  236.     print("To logout. Press 4")
  237.     input = read()
  238.     if input == "1" then
  239.         Capital()
  240.     elseif input == "2" then
  241.         Redstown()
  242.     elseif input == "3" then
  243.         Zenith()
  244.     elseif input == "4" then
  245.         os.reboot()
  246.     end
  247. end
  248.  
  249. function Capital()
  250.  
  251. end
  252.  
  253. function Redstown()
  254.  
  255. end
  256.  
  257. function Zenith()
  258.  
  259. end
  260.  
  261. function Admin()
  262.     term.clear()
  263.     term.setCursorPos(1,1)
  264.     print("--------------------------")
  265.     sleep(1)
  266.     print("Admin Panel")
  267.     sleep(1)
  268.     print("--------------------------")
  269.     print("")
  270.     sleep(1)
  271.     print("To change someones password. Press 1")
  272.     sleep(1)
  273.     print("To logout. Press 2")
  274.     input = read()
  275.     if input == "1" then
  276.        
  277.     elseif input == "2" then
  278.         os.reboot()
  279.     end
  280. end
  281.  
  282. function Terminate()
  283.  
  284. end
  285.  
  286. Login()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement