Here is a smaller project that shows the lightbulb effect. It's not perfect yet, but I will improve it over time. This project was meant to be on Dog-O-Scratch, but since I have started to make this on Cat-O-Scratch and Scratch struggles to save a project that you upload from your computer, I just shared it here.
©2023 Cat-O-Scratch. All made by me =) Yes, I know that I am not the first one to make such a lightbulb logic. But this project has uses another code to control the lightbulb. If you're curious, you can take a look inside.