Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- os.pullEvent = os.pullEventRaw
- term.clear()
- term.setCursorPos(1,1)
- print("welcome to DankOS")
- nU = fs.exists("DankOs/logInfo")
- if nU == true then
- print("Please log in")
- print("==================================================")
- print("username")
- u = read()
- print("password")
- p = read()
- fl1 = fs.open("DankOs/logInfo/.UserName","r")
- fl2 = fs.open("DankOs/logInfo/.PassWord","r")
- User = fl1.readLine()
- Pass = fl2.readLine()
- if u == User and p == Pass then
- print("login succsesful")
- sleep(1)
- shell.run(".menu")
- else
- print("login incorrect")
- sleep(1)
- shell.run("shutdown")
- end
- else
- print("it looks like you new")
- print("what would you like to be called?")
- NewU = read()
- print("what would you like your password to be?")
- NewPass = read()
- fs.makeDir("DankOs/logInfo")
- file1 = fs.open("DankOs/logInfo/.UserName","a")
- file1.writeLine(NewU)
- file1.close("DankOs/logInfo/.UserName")
- file2 = fs.open("DankOs/logInfo/.PassWord","a")
- file2.writeLine(NewPass)
- file2.close("DankOs/logInfo/.PassWord")
- shell.run("reboot")
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement