Probably, engineers are required to adhere to a strict code of ethics that puts the public interested first. Rayguns tend to be developed by people with evil ambitions. If I were a professional engineer and my boss asked me to work on a raygun, I would be ethically required to refuse and potentially to report him to the relevant authorities.