I believe that your question has already been posted and answered on blenderartists here
.blend file here
what’s the difference module vs script in the logic bricks??
script is for 1 object to use, module can be used by multiple objects, so instead of 1 ...