Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- speaker = peripheral.wrap("right")
- os.loadAPI("sha.lua")
- password = "sha256 pasword"
- rs.setOutput("left", false)
- term.clear()
- term.setCursorPos(1,1)
- term.setBackgroundColor(colors.black)
- term.setTextColor(colors.yellow)
- term.write("EndtechOS v1.8")
- term.setCursorPos(1,2)
- term.write("ENDTECH SECURITY SYSTEM v1.0")
- term.setCursorPos(1,4)
- term.setTextColor(colors.white)
- term.write("Please enter your password: ")
- term.setCursorPos(1,5)
- term.write("> ")
- term.setTextColor(colors.gray)
- local pass = read("*")
- term.setCursorPos(1,6)
- term.setTextColor(colors.white)
- term.write("checking...")
- if sha.sha256(pass) == password then
- term.setCursorPos(1,7)
- term.setTextColor(colors.green)
- print("Access granted")
- rs.setOutput("left", true)
- speaker.playSound("mekanism:etc.success",0.3)
- sleep(5)
- for i=1,3 do
- sleep(1)
- speaker.playNote("hat", 1, 1)
- end
- rs.setOutput("left", false)
- os.reboot()
- else
- term.setCursorPos(1,7)
- term.setTextColor(colors.red)
- term.write("Invalid password")
- term.setCursorPos(1,8)
- term.setTextColor(colors.white)
- term.setBackgroundColor(colors.red)
- print("Access denied")
- speaker.playSound("mekanism:etc.error",3)
- sleep(2)
- os.reboot()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement