Advertisement
Guest User

startup

a guest
Jun 26th, 2017
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.96 KB | None | 0 0
  1. while true do
  2.     term.clear()
  3.     term.setCursorPos(8,5)
  4.     print("Nat Power Grid Systems Login")
  5.     term.setCursorPos(8,6)
  6.     print("Username:")
  7.     term.setCursorPos(10,6)
  8.     input = read()
  9.     if input == "admin" then
  10.         term.setCursorPos(8,7)
  11.         print("Password:")
  12.         term.setCursorPos(10,7)
  13.         input = read("*")
  14.         if input == "admin" then
  15.             term.clear()
  16.             term.setCursorPos(8,5)
  17.             print("Please Wait,")
  18.             term.setCursorPos(8,6)
  19.             print("Logging in as ADMIN...")
  20.             sleep(5)
  21.             term.clear()
  22.             term.setCursorPos(8,6)
  23.             print("Success")
  24.             sleep(2)
  25.             term.clear()
  26.             term.setCursorPos(1,1)
  27.             print("Nat Power Grid Systems v1.0")
  28.             term.setCursorPos(11,1)
  29.             print("Logged in as ADMIN")
  30.             term.setCursorPos(8,5)
  31.             print("Enter a Command")
  32.             input = read()
  33.             if input == "Unlock" then
  34.                 while true do
  35.                 term.clear()
  36.                 term.setCursorPos(1,1)
  37.                 print("Nat Power Grid Systems v1.0")
  38.                 term.setCursorPos(11,1)
  39.                 print("Logged in as ADMIN")
  40.                 term.setCursorPos(8,5)
  41.                 print("Unlock Menu, Enter Entrance Number to Unlock")
  42.                     input = read()
  43.                     if input == "1" then
  44.                           redstone.setOutput("bottom", true)
  45.                           sleep(2)
  46.                           redstone.setOutput("bottom", false)
  47.                     end
  48.             else if input == "exit" then
  49.                 break
  50.             end
  51.             else if input == "logout" then
  52.                 term.clear()
  53.                 print("Please Wait,")
  54.                 term.setCursorPos(8,6)
  55.                 print("Logging out...")
  56.                 sleep(5)
  57.                 end
  58.                 end
  59.             end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement