The maximum size of a script is not limited by number of lines, but rather by number of characters. The limit is 64,000 characters. If you hit this limit, consider removing comments and blank lines. Also consider removing any parts of the script that are not needed. For example, most script commands have default parameters and if these are correct, you don't need to hard code parameters.