Need help developing a script

The file is too large to upload. I am trying to get it smaller