Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Variables
- local username = ("tomte55") --Static during alpha
- local password = ("sty595") --Same here
- local inputU = ("")
- local inputP = ("")
- local os = ("DankOS")
- local osV = ("1.0")
- --Functions
- function rawread() --Key Input
- while true do
- local sEvent, param = os.pullEvent("key")
- if sEvent == "key" then
- if param == 44 then
- colorC()
- print("Admin override")
- colorW()
- break
- end
- end
- end
- end
- function clear() --Clear fucntion
- term.clear()
- term.setCursorPos(1,1)
- end
- function loadingS() --Loading screen
- colorC()
- textutils.slowPrint("<==========>", 10)
- colorW()
- sleep(1)
- end
- function bootS() --Boot screen
- clear()
- colorC()
- print("|----------|")
- write("|"..os)
- print(" "..osV.."|")
- print("|----------|")
- colorW()
- end
- function loginS() --Login screen
- colorC()
- write("Welcome:")
- colorY()
- print(" "..username)
- colorC()
- write("Password: ")
- colorY()
- inputP = read("*")
- if inputP == password then
- colorG()
- print("Correct") --Correct password
- colorW()
- sleep(1)
- clear()
- bootS()
- end
- if inputP ~= password then --Incorrect password
- colorR()
- print("Incorrect!")
- colorW()
- end
- end
- function mainS() --Main screen
- boot()
- end
- function regS() --Register screen
- colorC()
- write("Welcome to "..os)
- print(" "..osV)
- colorW()
- end
- function colorW() -- White color
- term.setTextColor(colors.white)
- end
- function colorG() --Green color
- term.setTextColor(colors.green)
- end
- function colorR() --Red color
- term.setTextColor(colors.red)
- end
- function colorC() --Cyan color
- term.setTextColor(colors.cyan)
- end
- function colorY() --Yellow color
- term.setTextColor(colors.yellow)
- end
- --Main stuff
- bootS()
- loginS()
- colorW()
- sleep(2)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement