You won't be globally banned for executing scripts. You can, however, be banned from individual servers if the script you use is detected by admins, the antihack, or battleye. However, if the injector you use is detected by battleye, you will be globally banned. If you use a script without any regard for the battleye filters on the particular server you're on, you are likely to be banned from that server.
I don't think there are any free injectors available that aren't detected and if you use the method of injecting at the main menu it doesen't matter if the injector is detected because battleye isn't running, but most antihacks will catch you as they monitor essentially all display strings now.