Only use the WHID for educational purposes and not to harm other people. The payloads scripts are only meant for educational purposes.
The WHID uses it's own scripting language, altough a ducky script to ESPloit converter is available here: https://exploitagency.github.io/Duckuino/index.html