Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- What PqtatoOS calls you - Default: Pqtato
- local name = "Pqtato"
- -- What you want PqtatoOS to be called - Default: PqtatoOS
- local osName = "PqtatoOS" -- No longer used
- -- DO NOT CHANGE THIS!
- local version = "1.0.0"
- -- Your password. Example: bacon Default: cheese
- local password = "cheese"
- -- Centered Text
- local function centerText(text)
- local w, h = term.getSize()
- term.setCursorPos(math.floor(w / 2 - text:len() / 2 + .5), math.floor(h / 2 + .5))
- io.write(text)
- end
- local function centerText2(text)
- local w, h = term.getSize()
- term.setCursorPos(math.floor(w / 2 - text:len() / 2 + .5), math.floor(h / 2 + 1.5))
- io.write(text)
- end
- -- Startup
- term.setBackgroundColor(colors.cyan)
- term.setTextColor(colors.white)
- shell.run("pqtatoos/.openModem")
- term.clear()
- term.setCursorPos(1,1)
- centerText(osName)
- sleep(1.5)
- term.clear()
- term.setCursorPos(1,1)
- print("Username: ", name)
- term.setCursorPos(1,2)
- print("Password: ")
- term.setCursorPos(11,2)
- inputP = read('*')
- if(inputP == password) then
- local w, h = term.getSize()
- term.setBackgroundColor(colors.black)
- term.setTextColor(colors.white)
- term.clear()
- term.setBackgroundColor(colors.red)
- term.setCursorPos(1,1)
- term.clearLine()
- write(" ")
- term.setCursorPos(math.floor(w / 2 - 8 / 2 + .5),1)
- write("PqtatoOS")
- term.setBackgroundColor(colors.black)
- term.setCursorPos(1,2)
- else
- print("Incorrect password!")
- sleep(3)
- os.reboot()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement