Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- passwordNotSet = true
- passwordFile = "System/etc/passwd"
- userFile = "System/etc/users"
- os.loadAPI("System/apis/tntapi")
- tntapi.setScreen(1,1,colors.white,colors.blue)
- tntapi.easyText("Hello, I am going to help you setup your computer!",2,1,1)
- tntapi.easyText("Press any key to get started!",2,1,2)
- tntapi.waitKey(1,3,0)
- tntapi.setScreen(1,1,colors.white,colors.blue)
- tntapi.easyText("Enter a username!",2,1,1)
- username = read()
- while passwordNotSet do
- tntapi.easyText("Enter a password!",2,1,3)
- password = read("*")
- tntapi.easyText("Repeat your password!",2,1,5)
- passwordr = read("*")
- if passwordr == password then
- passwordNotSet = false
- else
- tntapi.setScreen(1,1,colors.white,colors.blue)
- end
- end
- tntapi.editFile(passwordFile,password)
- tntapi.editFile(userFile,username)
- file = tntapi.readFile(passwordFile)
- tntapi.setScreen(1,1,colors.white,colors.blue)
- tntapi.easyText("Setup complete!",2,1,1)
- fs.delete("System/systemsetup.config")
- tntapi.editFile("System/systemsetup.config","true")
- tntapi.waitKey(1,1)
- os.reboot()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement