For python to understand that a directory is a module. You need to place a file called init.py in that directory. You use that file to perform any initialization commands for that module, such as, for example, importing it’s submodules.
So in your case, simply add a init.py file to the scripts folder and on this file you add this line:
import init
This will import init.py to the scripts module when init.py is run. Which would make the function you’re trying to access available to the BGE.
Don’t worry, probably everyone who have tried using modules on GE got stuck on that for some time. This isn’t the first and won’t be the last thread with the same question
If you wanted scripts to be a sub folder, not a module that you can that directory the list that python checks when importing modules. If you do that than run this as the very very very very first thing you run.
import site
site.addsitedir(GameLogic.expandPath("\scripts"))