Social Question

Was helpful towards the wrong people, what should I do?
During my academics life, I was really good at my work, I reached the top of my class and I was admired by all my teachers in the school. Then there were classmates in my batch, that really required my help in completing work that they find challenging.
So as a good friend, I went to my fullest in teaching my friends everything I know.
What happened next was totally unexpected. Some of the friends that I have given a helping hand, were actually opportunistic and never really cared about what I really want for them as a freind.
I don’t seem to recognize them at all, they are not the people that I have known before and I feel really exploited to think that they were trying to get their work done by taking me for granted.
Their motives are very opportunistic, and I need some advice on what I should d next, in order to avoid such people in the future.
This, however, had an impact on my academics as well, because as I had a personality that was very open-minded and friendly, now I feel very defensive and insecure about everyone I meet.

