Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Global Variables--
- --userID
- --userName
- --Variables--
- userID = os.getComputerID()
- userName = ""
- term.clear()
- term.setCursorPos(1,1)
- local input
- term.write("Running Setup Will Clear")
- term.setCursorPos(1,2)
- term.write("All Existing Setup Data.")
- term.setCursorPos(1,3)
- term.write("Continue? (y/n)")
- term.setCursorPos(1,4)
- input = read()
- if input == "n" then
- return
- end
- if input == "y" then
- term.clear()
- term.setCursorPos(1,1)
- term.write("Setting User ID...")
- term.setCursorPos(1,2)
- userData = fs.open(".user", "w")
- userData.writeLine(userID)
- term.write("User ID Set (" .. userID .. ")")
- term.setCursorPos(1,3)
- term.write("Enter Name Of User:")
- input = read()
- userName = input
- userData.writeLine(input)
- userData.close()
- os.setComputerLabel(userName .. "'s Phone")
- else
- shell.run(".setup")
- end
Add Comment
Please, Sign In to add comment