Great news, Mac camera lights are hardwired to the camera, and have been for ten years, no code necessary!
The hardwired status light is far better, you know as soon as you’ve been hacked, and well before they are likely to see anything compromising.