This is a bit complicated.
It is a reference to a game where people are divided into "lawful," "neutral," and "chaotic."
"Lawful" people always follow the rules; "neutral" people sometimes follow the rules; "chaotic" people might follow rules, they also might not. You never know what a "chaotic" person will do.
This usually gets paired with a second adjective ("good," "evil," or "neutral.") to show your motives. For example, a "lawful good" person follows rules for good reasons - like Superman. A "chaotic good" person doesn't follow rules, but still does good things - like Robin Hood (who stole money, but gave it to poor people).
"Lawful cool" is a joke - it is someone who follows rules to do "cool" things. "Lawful mad" is someone who follows rules and is really, really, really angry.