It's funny how I started a project very much like this around six days ago. It currently has 100% working and finished GUI's, transmitting code from and to client and server and a trigger ("event input") management system. The syntax it's going to use is highly inspired by Python.
Example:
from random import randint, choice
from server_constants import colorset
@event('player.touch.stop')
def whatever(brick, player):
if randint(0, 5) == 5:
player.kill()
else:
brick.setColor(choice(colorset))