There are many software programs for scripts. The type of writing should be known, and then the software package chosen. I did write my PhD on Microsoft Word. Each chapter was a different Word file, and at the end, I numbered all the pages. Adding the references throughout the Word document was difficult, so I had references listed at the end of each chapter. LaTeX was available but required the use of a further code I was not willing to learn at that time, as I was doing a Postdoc at Nottingham University.
Recently, I have come across a new software package called Scrivener. This software is excellent as it also supplies the architecture to enable different scenes and chapters to be written and manipulate the order in which they appear. Additionally, Scrivener allows a folder for research and photographs for each character and location within the story.