Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[
- Used the first time you boot your Computer
- into terminal mode on CraftOS 6.2 or above
- to set your username
- --]]
- term.setBackgroundColour(colours.lightBlue)
- term.clear()
- term.setCursorPos(2, 2)
- shell.run("rename CraftOS/Terminal/Boot1 CraftOS/Terminal/setup")
- print ("Set your password")
- print ("---------------------------------------------------")
- print (" ")
- write (" Password: ")
- name = read ()
- term.clear()
- term.setCursorPos(1, 8)
- print ("Do you want your password to be "..name.."?")
- write ("Y/N ")
- answer = read ()
- if answer == "y" then
- print ("Setting password please wait...")
- SetName = fs.open("CraftOS/Terminal/Password","w")
- if SetName then
- SetName1 = SetName.write()
- SetName.write(name)
- SetName.close()
- end
- sleep(2)
- end
- term.clear()
- term.setCursorPos(1, 1)
- print ("Set your username")
- print ("---------------------------------------------------")
- print (" ")
- write(" Username: ")
- pass = read ()
- term.clear()
- term.setCursorPos(1, 8)
- print ("Do you want your username to be "..pass.."?")
- write("Y/N ")
- computer = read ()
- if computer == "y" then
- print ("Setting username please wait...")
- SetUser = fs.open("CraftOS/Terminal/Username","w")
- if SetUser then
- SetUser1 = SetUser.write()
- SetUser.write(pass)
- SetUser.close()
- end
- sleep(2)
- end
- shell.run("rename CraftOS/Terminal/Boot1 CraftOS/Terminal/setup")
- term.setBackgroundColour(colours.black)
- term.clear()
- term.setCursorPos(1, 1)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement