Is there a way to make a endgame with a motor that works like one with a piston

Hello, this is team 24658J.

Im just wondering if anyone here would know how to make an endgame that works like a shooter endgame with only a motor. I remember seeing some like it at state but cant remember how they did it.

Any suggestions?

This is how we had ours.