I combined two adafruit tutorials to create this:
https://learn.adafruit.com/gravity-falls-memory-gun?view=all
https://learn.adafruit.com/lightsaber-rp2040?view=all
Here are the parts I bought from adafruit:
I already had buttons and wires and solder and I've attached my code with the changes I made. I left some of the light saber code included but commented out in case you want to add some more effects.
The author remixed this model.
There are hollowed out bits so that electronics can fit inside and a laser can emit light from the front!