Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Variables.
- local version = ("1.0") --Version
- local os = ("DankOS") --Operating System
- local username = ("tomte55")
- local password = ("sty595")
- local input1 = ("")
- local input2 = ("")
- --Functions.
- function boot() --Boot function.
- term.clear()
- term.setCursorPos(1,1)
- term.setTextColor(colors.cyan)
- print("|------------|")
- print("|"..os.." "..version.." |")
- print("|------------|")
- print("")
- end
- function clear() --Clear function.
- term.clear()
- term.setCursorPos(1,1)
- end
- function loading() --Loading function.
- colorC()
- write("Loading")
- textutils.slowPrint("[::::::::::::]",10)
- sleep(1)
- clear()
- colorW()
- end
- --TEXT COLOR FUNCTIONS.
- function colorW() --White text function.
- term.setTextColor(colors.white)
- end
- function colorG() --Green text function.
- term.setTextColor(colors.green)
- end
- function colorR() --Red text function
- term.setTextColor(colors.red)
- end
- function colorC() --Cyan text function
- term.setTextColor(colors.cyan)
- end
- --Login setup.
- loading()
- boot()
- colorW()
- textutils.slowPrint("Welcome to "..(version))
- sleep(1)
- term.write("Username: ")
- input1 = read()
- term.write("Password: ")
- input2 = read("*")
- if input1 == username then
- if input2 == password then
- colorG()
- print("Correct")
- colorW()
- else
- colorR()
- print("Incorrect password!")
- colorW()
- colorC()
- print("Rebooting in 3...")
- sleep(1)
- print("Rebooting in 2...")
- sleep(1)
- print("Rebooting in 1...")
- sleep(1)
- os.reboot()
- end
- end
- sleep(2)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement