1. You might hear people use "weren't", but properly it should be: "If you hadn't been staring at that girl, you would have stopped that goal."
2. The normal imperative would be just "Don't do that!". It is possible to say "You don't do that" as a non-imperative statement of fact, implying prohibition, but the imperative would be more usual in your situation.