righteously
In a way that is morally right and fair.
Righteously means acting in a way that's morally right and just, or with a strong sense that you're doing the right thing. When someone stands up for a friend being bullied, they're acting righteously, defending what's fair even when it's difficult. When a student refuses to join others in mocking a classmate, that's acting righteously.
The word comes from righteous, which describes people who follow strong moral principles. A righteous person tries to do what's right even when no one is watching and even when the right choice is harder than the wrong one.
Sometimes people use righteously to describe justified anger or indignation. If your teacher punishes the whole class for something one person did, you might feel righteously angry because the punishment is unfair. This kind of anger feels different from just being mad because you didn't get your way: it's rooted in a real sense of injustice.
However, feeling righteously angry doesn't automatically mean you're right. Sometimes people convince themselves their anger is righteous when they're really just upset about not getting what they want.