Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- This setup is made by Frekvens1
- -- Do not claim this as your own,
- -- but you can feel free to use it.
- -- pastebin get vt61373P disk/startup
- -- pastebin get rHNtR9W3 disk/Protection
- -- Select The Password you want to use
- local selectedPass = ""
- function selectCurrentPassword()
- term.clear()
- term.setCursorPos(1,1)
- MyScreen()
- write("Please type the password you want to use: ")
- selectedPass = read()
- term.clear()
- term.setCursorPos(1,1)
- file = io.open("Password", "w")
- file:write(selectedPass)
- file:close()
- Install()
- end
- -- Installs the software
- function Install()
- MyScreen()
- fs.delete("startup")
- fs.copy("disk/Protection", "startup")
- print("Selected Password: ",selectedPass)
- shell.setAllowDiskBoot(false)
- print("Setup is starting...")
- print("")
- print("Installation is done!")
- print("Reboots in")
- print("3")
- sleep(1)
- print("2")
- sleep(1)
- print("1")
- sleep(1)
- print("Rebooting...")
- sleep(1)
- os.reboot()
- end
- -- Startup screen
- function MyScreen()
- print("------------------------------------------------")
- print("- Starting Frekvens1's Password Protected Door -")
- print("------------------------------------------------")
- print("- Version: 1.0.0 -")
- print("------------------------------------------------")
- end
- function startupSoftware()
- MyScreen()
- IsInstalled()
- end
- -- ChecksIfInstalled
- function IsInstalled()
- if fs.exists("Password") then
- print("Software Already Installed! Do you want to change the password? Y/N")
- local Answer = ""
- Answer = read()
- if Answer == "Y" then
- selectCurrentPassword()
- else
- shell.run("startup")
- end
- else
- selectCurrentPassword()
- end
- end
- term.clear()
- term.setCursorPos(1,1)
- startupSoftware()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement