You can just put let at the beginning of your script and end at the end, and voila: everything is a local variable. (But using and import and include statements must go outside the let block.)
But in general the way to deal with passing lots of parameters is to define one or more struct types encapsulating them. (Or use a named tuple, which is essentially a struct without a name.) Coming up with good data structures and abstractions is hard, but the payoffs in long run (for maintainability, flexibility, composability, and performance) are huge.