Scruples, in my opinion, have two sources:
( a ) They are an attempt to protect yourself with a set of rules like a child who builds a "fort" out of couch cushions where he thinks he is invincible. It's like saying "If I follow these rules, I won't go to hell." When it is happening, you don't necessarily know that you suffer from scruples, you think you're just trying to be holy and saintly.
( b ) Pride. It's a way to separate yourself from other Catholics by being MORE saintly and holy ( in your mind ) than they are.
But the two are really the same. Because to try to secure your salvation through rules is, in a way, to barter with God, to not let yourself be guided by Him, to show a lack of faith.
At any rate, there are two cures:
( a ) Love God more than yourself
( b ) Love your brother as yourself