Is it ok to treat people the same way they’ve treated me?

I feel like it’s all good if they treat me anyway and I can’t really say much because they’re “joking”. But I guarantee if I say the same stuff or worse to them I’d be seen as a jerk. Like being a nice guy is getting hard nowadays because no one respects me no matter how hard I try. Like I don’t get what I’m doing wrong. I feel like now it makes sense to treat people the same way and show them how they’ve been treating me
Is it ok to treat people the same way they’ve treated me?
Post Opinion