It is not clear, but if you want the pid of a running script, inside this very script, you already have it: It is in $$ variable.
Several daemons and scripts running at linux, wrote its pid to a external file, in a standard location: /var/run. Take a look, there is several .pid files there. You can use something like that to make public the pid of your script. Just do in your script:
echo $$ > /var/run/myscript1.pid
Other process had just to read that file. Very simple.
PS: Just remember to remove the pid file at exit of your script.