Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local pass = fs.open(".accounts/password", "r")
- local password = pass.readAll()
- pass.close()
- local use = fs.open(".accounts/username", "r")
- local username = user.readAll()
- use.close()
- version = "1.0"
- term.setBackgroundColour(colors.lightBlue)
- term.setTextColour(colors.orange)
- local function clear (version)
- term.clear()
- term.setCursorPos(1,1)
- term.write("MathOS " .. version)
- term.setCursorPos(1,2)
- term.write("Computer's ID is " .. os.getComputerID() .. " and the label is " .. os.getComputerLabel())
- term.setCursorPos(1,4)
- end
- while true do
- clear(version)
- term.write("what is the username?")
- term.setCursorPos(1,5)
- local userinput = read()
- if userinput == username then
- break
- else
- print("incorrect")
- end
- end
- while true do
- clear(version)
- term.write("what is the password?")
- term.setCursorPos(1,5)
- local passinput = read("*")
- if passinput == password then
- break
- end
- print("incorrect")
- end
- shell.run(".MathOS")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement