Don’t do that, it’s not going to end well. Beating him up will only get you in trouble and hurt him, school should be a safe place. He may be harassing your friend, but beating him up will only make it worse. You should find another way to help your friend, like telling the administration, or playing cruel mind tricks on him, just don’t beat him up