Doesn't seem to0 surprising that it would take longer on the client where networking will result in slower data transfer rates than from Hard Drive directly to the CPU, but without knowing what your script is doing, we can't suggest any ways, if any exist, that might improve on this situation.
But slower by a factor of 6 to 7??
FileMaker is not a server client system so a lot of data will get pulled over the network to the client machine, processed and then submitted back to the server.
Without knowing more detail about what your script is doing I can't say whether that is an unreasonable factor or not. .