Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local password="" -- Change this to your password
- local cName="Name of Computer" -- Change this to the name of your
- -- computer
- -- PASSWORD PROTECTED COMPUTER
- -- Version: 1.5
- -- Code by: Nyaar
- -- Notes: Make sure you create a
- -- password but don't edit
- -- anything below this line.
- local w,h = term.getSize()
- function printC(str, y)
- term.setCursorPos(1,y)
- term.clearLine()
- term.setCursorPos(w/2 - #str/2, y)
- term.write(str)
- end
- function printLR(str, y)
- term.setCursorPos(1,y)
- term.clearLine()
- term.setCursorPos(w/2 - #str/2, y)
- term.write(str)
- term.setCursorPos(1,y)
- write("|")
- term.setCursorPos(w-1,y)
- write("|")
- end
- function printLB(str, y)
- term.setCursorPos(1, y)
- print(string.rep(str, w-1))
- end
- term.clear()
- term.setCursorPos(1,1)
- printLB("=",1)
- printLR(" ",2)
- printLR(cName,3)
- printLR("Status: Locked",4)
- printLR(" ",5)
- printLB("=",6)
- print("")
- write(" Password: ")
- local status, input = pcall(read,"*")
- if (input ~= password) then
- os.reboot()
- end
Advertisement
Add Comment
Please, Sign In to add comment