If you created it you automatically have the copyright rights to the script. All you need to do is add those copyrights to your code.
You could use a copyrighting service if you feel it's worth the extra money. I use GoDaddy's c-Site personally. It costs about $70 for express processing.
by creating something it is automatically copyrighted and there is no legal need for you to do anything more - create has to be in a tangible form rather than just being in your head. The "issue" with it is proving that you were the first one to create it and that you havent simply copied someone else and claimed to have made it. With traditional media like traditional photographs it is easy enough because the original photographer will have the negative where as the person who has made an illegal copy wont have but for things like scripts it is much more difficult. There are a number of options available either from specialist companies or solicitors which will timestamp when they received it and then store it on your behalf so if in 5 years time someone claims you copied it you can definitively prove the date you created it.
Hi There maybe i Can help you can register by Legalzoom.com Try that it could be wokring for you Regards Dee
Where are you based? In the US copyright for programs/scripts is limited. From the US Copyright Office: