This script makes it possible to bribe the cops or surrender to them voluntarily.
If you press F5 while next to a cop, then Carl will pay him and the police will not chase you. Depending on how many wanted stars you have, you will have to pay different amounts of dollars: 1 star = 500$
2 stars = 2000$
3 stars = 5000$
4 stars = 10000$
5 stars = 20000$
6 stars = $50000
SWAT, FBI and soldiers don't take bribes. If there is not enough money, it remains either to run or give up.
If you press F6 while next to a cop, then Carl will raise his hands and he will be arrested and all weapons will be taken away. And if the police station is far away, then Karl will be put in a car and driven there. While in the police car, you can press Shift to skip the ride. You can also jump out of the car, but then the FBI will be looking for you, and they do not take prisoners, as well as SWAT and soldiers. But if the car accidentally falls into the water or catches fire, then you can safely run, the cops will not be up to you. However, if Karl is still taken to the site, he will end up in prison, where he will have to serve his term. After serving, he will be released with a clear conscience, but unarmed.