Interactive mouse

I am trying to have this arm block interact with the mouse if you hit it with the mouse cursor it will swing the direction of contact and slow down gradually and if there is one next to it, it to would swing but only if hit by the other one swing.

how would i get this to work??