No script to solve that problem, it takes business level support for that problem, most just pay for a hosting service that provides ddos protection.
Otherwise, ddos protection would come in a suite of tools used by a networking expert. If you can't afford any of these things, then you will need to find a forum like this one that specializes in networking, or more specifically network protection