Code for ghostship's light controller