Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- mkwin("Login")
- term.setCursorPos(5, 7)
- write("Username: ")
- local usr_ = read()
- term.setCursorPos(5, 8)
- write("Password: ")
- local pas_ = read("*")
- if fs.exists("px/usr/" .. usr_) and fs.exists("px/usr/" .. usr_ .. "/val/pass_" .. pas_) then
- fs.makeDir("px/usr/" .. usr_ .. "/val/islogin")
- term.setCursorPos(10, 15)
- term.setTextColor(colors.blue)
- print("Welcome back, " .. usr_ .. "!")
- sleep(3)
- loginplr = usr_
- loginpas = pas_
- if fs.exists("px/usr/" .. usr_ .. "/val/devmode") then
- devmode = true
- else
- devmode = false
- end
- shell.run("px/usr/" .. usr_ .. "/desktop")
- return loginplr, loginpas, devmode
- else
- term.setCursorPos(10, 15)
- term.setTextColor(colors.red)
- print("Invalid username or password.")
- sleep(3)
- shell.run("px/sys/startup")
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement