You could try a crime ranking system used in some RPGs or GTA series. It would work like this:
1. Player does something bad.
2. Does she get caught? (Roll random number, skill check, or if player can be seen by law enforcement etc.)
- If not, nothing happens. She gets away with the loot.
- If yes, go on to next step.
3. Escalate the crime level.
4. Execute the appropriate action according to that level. i.e. all townspeople are now hostile at level 1, guards show up at level 2, you get thrown in prison at level 3, etc.
5. Usually allow player some way to escape. Example in GTA, you can drive away in your car, and if you avoid the cops long enough or go into a spray shop, you get to decrease your crime level. Or like in stealth games if the guards can't find you after a bit things go back to normal.
Now in step 2, you can also implement a hidden long term Morality stat from Evil to Good, which changes regardless of whether you get caught. You can then use that value to influence certain future events.