This script allows to bribe the cops or to surrender them voluntarily.
If you press F5 while you're next to a COP, then Carl will pay him and the police will not pursue you. Depending on how much you wanted stars, you have to give different number of dollars:
1 star = $ 500
2 stars = $ 2000
3 stars = $ 5000
4 stars = 10000 $
5 stars = $ 20000
6 stars = 50000 $
SWAT, FBI, and soldiers not to take bribes. If money is tight, is either run, or give up.
If you press F6 while next to a COP, then Carl will raise hands and it would be arrested and taken away all the weapons. And if the police station is far away, then Charles would be sent to the machine and pull back. While in the police car you can press the Shift key to skip the trip. You can also jump out of the car, but then you would search for the FBI, and they take no prisoners, as well as SWAT and soldiers. But if the machine accidentally gets into the water or lights up, then you can safely escape, cops is not up to you.
However, if Charles still go to the site, he will be in prison, where he will have to serve his term. After serving, he in good conscience would be released, but unarmed.