Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- os.pullEvent = os.pullEventRaw
- w,h = term.getSize()
- function Log()
- term.setBackgroundColor(colors.black)
- shell.run("clear")
- term.setTextColor(colors.yellow)
- print("Cre3peYsTim3ouT1.7 OS")
- term.setTextColor(colors.white)
- end
- function loadImage()
- if fs.exists("Image/image") == false then
- shell.run("pastebin","get","xiz4Yg8E","Image/image")
- image = paintutils.loadImage("Image/image")
- else
- image = paintutils.loadImage("Image/image")
- end
- end
- loadImage()
- function TaskBar()
- term.setCursorPos(1,1)
- term.setBackgroundColor(colors.lightBlue)
- term.clearLine()
- term.setTextColor(colors.white)
- term.setCursorPos(w-string.len("ID: "..os.getComputerID())+1,1)
- term.write("ID: "..os.getComputerID())
- end
- function Screen()
- term.setBackgroundColor(colors.white)
- term.clear()
- TaskBar()
- loadImage()
- end
- function Pass()
- term.setBackgroundColor(colors.white)
- term.setTextColor(colors.black)
- term.setCursorPos(2,3)
- print("User :")
- term.setCursorPos(2,4)
- print("Password:")
- term.setCursorPos(2,5)
- print("Code :")
- for l = 1, 3 do
- term.setCursorPos(2,h-1)
- term.clearLine()
- print("Loading Users.")
- sleep(0,5)
- term.setCursorPos(2,h-1)
- term.clearLine()
- print("Loading Users..")
- sleep(0,5)
- term.setCursorPos(2,h-1)
- term.clearLine()
- print("Loading Users...")
- sleep(0,5)
- end
- term.setCursorPos(2,h-1)
- term.clearLine()
- end
- Screen()
- paintutils.drawImage(image,16,6)
- if fs.exists("Pass/Pass") == false then
- term.setBackgroundColor(colors.white)
- term.setTextColor(colors.black)
- term.setCursorPos(2,3)
- print("Not Users Avalible")
- term.setCursorPos(2,4)
- print("Skip Login Screen")
- Log()
- return
- elseif fs.exists("Pass/Pass") == true then
- term.setBackgroundColor(colors.white)
- term.setTextColor(colors.black)
- Pass()
- term.setCursorPos(12,3)
- user = read()
- term.setCursorPos(12,4)
- passkey = read("*")
- term.setCursorPos(12,5)
- code = read("*")
- z = 1
- p = 0
- fs.makeDir("Pass")
- local file = fs.open("Pass/Pass","r")
- local fileData = {}
- local line = file.readLine()
- repeat
- table.insert(fileData,line)
- line = file.readLine()
- until line == nil
- file.close()
- layer = #fileData
- while z <= layer do
- if user == fileData[z] and passkey == fileData[z+1] then
- if code == string.sub(fileData[z+2], 1,string.len(fileData[z+2])-2) then
- p = 1
- end
- elseif user == fileData[z] and passkey ~= fileData[z+1] then
- p = 2
- end
- z = z + 3
- end
- if p == 0 then
- term.setBackgroundColor(colors.white)
- term.setTextColor(colors.black)
- term.setCursorPos(2,7)
- print("Try Again")
- sleep(3)
- shell.run("startup")
- elseif p == 1 then
- Screen()
- paintutils.drawImage(image,16,6)
- term.setBackgroundColor(colors.white)
- term.setTextColor(colors.black)
- term.setCursorPos(2,3)
- print("Hello "..user)
- sleep(3)
- Log()
- elseif p == 2 then
- term.setBackgroundColor(colors.white)
- term.setTextColor(colors.black)
- term.setCursorPos(2,7)
- print("Try Again")
- sleep(3)
- shell.run("startup")
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement