This is a script I wrote to try out the functionality of minecraft's scripting API. https://www.minecraft.net/en-us/article/scripting-api-now-public-beta
The scripting API was deprecated and will be removed in June 2022, this repository is being kept for posterity.