Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- loggedin = false;
- local user = "null";
- users = {["werty"] = "Werty", ["human"] = "hi"};
- term.setTextColor(colors.green);
- textutils.slowPrint("Welcome to Human-OS");
- textutils.slowPrint("");
- textutils.slowPrint(" _ _ ____ _____ ");
- textutils.slowPrint(" / / / / / __ \\ / ____|");
- textutils.slowPrint(" / /__/ / | | | | (___ ");
- textutils.slowPrint(" / __ / | | | |\___ \\ ");
- textutils.slowPrint(" / / / / | |__| |____) |");
- textutils.slowPrint(" /_/ /_/ \\____/|_____/ ");
- textutils.slowPrint("");
- term.setTextColor(colors.orange);
- term.setTextColor(colors.green);
- textutils.slowPrint("Login:");
- term.setTextColor(colors.blue);
- textutils.slowPrint(" Username:");
- term.setTextColor(colors.red);
- local username = read();
- term.setTextColor(colors.blue);
- textutils.slowPrint(" Password:");
- term.setTextColor(colors.red);
- local password = read("*");
- function check(u, p)
- if users[u] == p then
- loggedin = true;
- user = u;
- return true;
- end
- end
- if check(username, password) then
- term.setTextColor(colors.green);
- term.clear();
- textutils.slowPrint("Welcome back " .. user);
- os.sleep(3);
- term.clear();
- term.setCursorPos(1, 1);
- else
- term.clear();
- term.setCursorPos(1, 1);
- term.setTextColor(colors.red);
- textutils.slowPrint("Login information was incorrect!");
- shell.run("startup");
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement