Adafruit is behind plenty of awesome DIY electronics projects. Their latest guide shows you what it takes to construct your own lightsaber using 3D printed parts. It uses the Adafruit Prop-Maker FeatherWing, which is useful for creating props using motion, lights, and sound. The hilt will have two buttons to control the blade.
The lightsaber uses an accelerometer to detect swings and hits to trigger NeoPixels with sound effects. You can find the complete parts for this project here.