Call a script function from a script?

That’s not good Scripts work. A Script in the UI is just a special kind of rule that consists of only a single Script Action. It’s not a library you can import and use in other rules.

For that see OH 3 Examples: Writing and using JavaScript Libraries in MainUI created Rules which will work for both Nashorn and JSScripting, though they’re are better ways to do it in JSScripting but I’ve but had a chance to write a tutorial yet