Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- x1,y1 = term.getSize()
- local user = ""
- local password = ""
- --Gui
- function clear()
- term.setCursorPos(1,1)
- term.clear()
- end
- function Border()
- for i= 1,6 do
- term.setCursorPos(1,0+i)
- write("|")
- end
- term.setCursorPos(1,2)
- for i= 1,x1-1 do
- write("-")
- end
- term.setCursorPos(1,5)
- for i= 1,x1-1 do
- write("-")
- end
- term.setCursorPos(1,7)
- for i= 1,x1-1 do
- write("-")
- end
- term.setCursorPos(x1-1,1)
- write("|")
- term.setCursorPos(x1-1,6)
- write("|")
- end
- function Text()
- term.setCursorPos(3,1)
- print("ZeusOs")
- term.setCursorPos(3,3)
- write("User | ")
- term.setCursorPos(3,4)
- write("Password | ")
- end
- function Gui()
- clear()
- Border()
- Text()
- end
- while true do
- Gui()
- term.setCursorPos(15,3)
- user = read()
- term.setCursorPos(15,4)
- password = read("*")
- if fs.exists("data/users/"..user) then
- file = fs.open("data/users/"..user,"r")
- confirm = file.readAll()
- file.close()
- if password == confirm then
- term.setCursorPos(3,6)
- print("Welcome Back!")
- sleep(1)
- shell.run("Startup")
- else
- term.setCursorPos(3,6)
- print("Wrong user or password!")
- sleep(1)
- end
- else
- term.setCursorPos(3,6)
- print("User Doesnt Exist")
- sleep(1)
- end
- end
- -- Kz0es6CA
Add Comment
Please, Sign In to add comment