Stationeers lets you write scripts in-game, using something called MIPS. Also Space Engineers has something similar but in C#
Neither game really teaches you anything though, it's just something you can do if you can be bothered reading about it outside of the game.
I don't know anything...