Is there a real life equivalent of a "license to kill?"

I’d imagine there isn’t an official license to kill, but is there some sort of equivalent?

I would say that true martial law would be the most similar. Even then however, soldiers cannot kill civilians without reason.

Or possibly diplomatic immunity when used to enable espionage.

Do you expect a little fancy ID card with a “Class: Car, Motorcycle, Murder” on it? Well that probably does’t exist, and if it does it means nothing.

There’s most likely individuals that work for the government that would be free of prosecution from their own government for killing anybody for any reason unless it got excessive. Such individuals might also get strings pulled if they get caught in another jurisdiction, but depending on when and where this might not do that much good.