Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[
- Login for new Terminal in CraftOS 6.2,
- this will use the username you set the
- first time you booted this version!
- --]]
- term.setBackgroundColour(colours.lightBlue)
- term.clear()
- term.setCursorPos(1, 1)
- print ("User login")
- print ("---------------------------------------------------")
- print (" ")
- print (" To reset password run 'reset' in CraftOS folder")
- term.setCursorPos(13, 7)
- term.setBackgroundColour(400)
- print (" ")
- term.setCursorPos(13, 8)
- print (" ")
- term.setCursorPos(13, 9)
- print (" ")
- term.setCursorPos(13, 10)
- print (" ")
- term.setCursorPos(17, 8)
- write("Username: ")
- password = fs.open("CraftOS/Terminal/Username","r")
- if password then
- password1 = password.readLine()
- end
- computer = read ()
- if computer == password1 then
- end
- term.setCursorPos(17, 9)
- write("Password: ")
- username = fs.open("CraftOS/Terminal/Password","r")
- if username then
- username1 = username.readLine()
- end
- answer = read ('*')
- if answer == username1 then
- term.setBackgroundColour(colours.lightBlue)
- term.setCursorPos(13, 10)
- term.clearLine()
- term.setBackgroundColour(400)
- print (" [Loading preferences...] ")
- sleep(1.7)
- else
- term.setBackgroundColour(colours.lightBlue)
- term.setCursorPos(13, 10)
- term.clearLine()
- term.setBackgroundColour(400)
- print (" [Wrong username] ")
- sleep(1)
- shell.run("CraftOS/Terminal/Login")
- end
- term.setBackgroundColour(colours.black)
- term.clear()
- term.setCursorPos(1, 1)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement