If someone who is good perceives you as good they will act that way towards you.
If someone who is evil perceives you as good they will take advantage.
Karma pretty much works but not in the religious sense. If people expect I am a liar, they will act differently than if they thought I was good.
People give away little tells, like in poker, that gives away their true nature - people pick up on these and often act accordingly. This, bad things do happen to bad people.
Over a long enough time frame, bad things and good things happen to everyone - but there are avoidable bad things that happen as a result of something bad you did.
I'm not saying that if you kick a kitten and a piano falls out of a window and breaks your foot that is karma. I'm saying the foot you step on today may be attached to the ass you need to kiss tomorrow.