I fee like hurting a dog who jumped in my backyard
What makes you want to hurt a dog just for jumping into your backyard?
Because sometimes this dog pisses on my car and it ruins my day.
I understand how annoying it can be that someone allows their pets to roam free and do whatever they want. However, harming an animal is very wrong and you should instead just let the dog go. If you really want, you can speak with their owner and hope that you can convince them to better watch their pet.
I'm not hurting it, I'm just going to scare the shit out of it.
Be careful though. A scared animal can end up biting you.