Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- os.loadAPI("Sysyem/apis/tntapi")
- local password = tntapi.readFile("System/etc/passwd")
- local username = tntapi.readFile("System/etc/users")
- tntapi.setScreen(10,10,colors.white,colors.blue)
- tntapi.easyText("Enter username",1,17,10)
- term.setCursorPos(17,11)
- userinput = read()
- if userinput ~= username then
- tntapi.setScreen(1,1,colors.white,colors.red)
- tntapi.easyText("Invalid Username!",1,1,1)
- os.sleep(2)
- os.reboot()
- end
- tntapi.setScreen(10,10,colors.white,colors.blue)
- tntapi.easyText("Enter password",1,17,10)
- term.setCursorPos(17,11)
- passwordInput = read("*")
- if passwordInput ~= password then
- tntapi.setScreen(10,10,colors.white,colors.red)
- tntapi.easyText("Invalid Password!",1,1,1)
- os.sleep(2)
- os.reboot()
- end
- term.setCursorPos(1,1)
- tntapi.easyTextwColor(colors.lime,"Logging in...",1)
- os.sleep(2)
- shell.run("System/user/startdesktop")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement