I honestly wish they had some of that level of scripting for the desktop version too, I love the idea of doing Python with Minecraft. Plus fun ideas like that could scale a little better on a much more powered system.
https://minecraft.makecode.com/
It's a scratch like programming environment that lets you do all kinds of cool things in Minecraft.