Well, Java and Scala developers just don’t normally work that way or think that way (installing things globally). It just isn’t the culture on the JVM.
Does your script use scala-cli or Ammonite? If so, you can declare your dependencies right in the script itself and they’ll be fetched on demand as needed.
And if you’re writing scripts in Scala, you’re really limiting yourself if you don’t use scala-cli or Ammonite. They were created exactly because the default Scala script runner has so few features.