Regular USB thumb drive rubber-ducky? I just thought of this amazing April fools prank: I was going to make my friend think that his Mac was hacked using a rubber ducky. I realized that it'd take a long, long time to develop, so I decided to get started today. Anyway, I don't have a rubber ducky. I have a thumb drive, though, and I was wondering if I could put some sort of file in the root directory of the thumb drive that would turn it into one. Is there a way to do it so that when the computer reads the drive, it would think it's a keyboard? Or do you need a CPU in the ducky? Thanks in advance!
P.S. I know this might not be on-topic for this site, but I couldn't find another one that this question would fit into more.
I was wondering if I could put some sort of file in the root directory of the thumb drive that would turn it into one.

No this wouldn't work
Auto-running applications is not supported in macOS (see stackexchange question How do I automatically run an application on USB attach or CD insert on Mac OS X?).  You would need to persuade your target user to run a program/script in which case it is just a program/script and nothing like a rubber ducky.
A rubber ducky only looks like a USB - it simulates keyboard input through hardware. Hak5 describe history of USB RUBBER DUCKY here:

Did you know the first USB Rubber Ducky was invented by Hak5 founder Darren Kitchen while working as a sysadmin?
Tired of typing the same commands to fix printers and network shares again and again, the device evolved out of laziness.
He programmed a development board to emulate the typing for him - and thus the keystroke injection attack was born.
Needing a case - a miniature bath time friend, the rubber ducky, was requisitioned.

and current version is

Featuring a fast 60 MHz 32-bit CPU, convenient type-A USB connector, Micro SD expandable memory, programmable payload replay button, JTAG interface with GPIO and DFU bootloader