What goes around comes around it is said. This is the idea of karma, what you dish out you get hit with in return. Good or bad it is up to you but it is a reap what you sow mentality. And according to Christ it is true that with what measure ye meet it shall be measured against you.
"Blessed are the merciful: for they shall obtain mercy." Matthew 5:7
"Judge not, that ye be not judged. For with what judgment ye judge, ye shall be judged: and with what measure ye mete, it shall be measured to you again." Matthew 7:1-2
So whatever you put out into the world you will get back and whether or not its good is up to you, you will be judged by the same standard you judge others by. You will obtain mercy if you give mercy, you will be forgiven if you forgive.
This means, I think, that if you wish to be loved you must give love. But this by no means guarantees that your life will be painless and effortless, it just means over all what goes around comes around.
Faith without sacrifice loses its meaning and that's part of why I think people like Job, Jesus and others in scripture were truly good and righteous and still met with horrible ends. I think part of their calling was to sacrifice.
I remember a sci-fi tv show in the late 80s and early 90s that had an episode that took place in a karmic prison where whatever pain you inflict on someone else is instead inflicted on you. And their enemy was defeated by letting them try and kill them, the villain instead kills themself by this karmic feature in the prison.
If only it were seen as clearly as in the old tv show I mentioned because as it stands, just like acts of God, the proof of karma is too elusive it can be practiced, but not photographed.
"Even so every good tree bringeth forth good fruit; but a corrupt tree bringeth forth evil fruit.
18 A good tree cannot bring forth evil fruit, neither can a corrupt tree bring forth good fruit.
19 Every tree that bringeth not forth good fruit is hewn down, and cast into the fire.
20 Wherefore by their fruits ye shall know them." Matthew7:17-20
Your fruits refers to you works and your words since both are indicative of the contents of your heart. Jesus said it's not what goes into your mouth that defiles you but what comes out. And in the age of information people hide behind their screens to say the most horrible things to others. Yet Jesus himself treated all with love and we are commanded to love others as He loved us, it's the only additional commandment Jesus gave us.
Karma accounts for much but we are subject the the repercussions of the free will of others so it's not always about karma.
And just because your past may be ugly doesn't mean your future can't be beautiful. We can all take a step in a different direction starting now and moving forward. Saul persecuted the early Christians and he took part in the murder of Stephen the first Christian martyr yet Jesus personally intervened on the road to Damascus and Saul became Paul and wrote 2/3 or the new testament and became the most prolific missionary perhaps ever.
We can change our karma. We can't change who we have been, but we can control who we become. We can love so we are loved, we can forgive if we desire forgiveness, we can be merciful so that we may obtain mercy.
If God can forgive Paul for murder, if Jesus can forgive the adulteress for being caught in the act, if He can forgive King David, if He can forgive Cain then how much more can He forgive your sins?
No matter how ugly your past may be, you don't live there anymore, you live in the present which is a gift with which you can work miracles if you choose.