Sparky is a GUI tool that converts your BadUSB or Ducky script to an Arduino Sketch (.ino) so you can upload it to your Digispark.
Simply run the Sparky.py code, write or paste your Ducky script and press "Convert" button. Your Arduino code will be ready to copy or you can simply save it as an .ino file. You can change the name of you .ino sketch name. Then upload your sketch using Arduino IDE.