I don't have motivation to study because my hard work doesn't matter

I know it's a norm for students to hate school and hate doing their school work and I don't differ however at the end of the day for those of us who have goals don't really have a choice but to do it unmotivated. I study unmotivated and somehow I still get a score I'm not satisfied with. This doesn't happen all the time but often it does. Recently I found out a student from another section who is high honors (this means you have an average of 95 - 97) and my school is considered a special science high school so trust me when I say it is challenging to say the least has been cheating on every test. The teachers know however choose not to do anything about it. Should I continue to study hard or not really care anymore about school since it is the last month anyways?