This is actually already possible as you can call a script block already by using this block
The only downside though is that it is not possible to “return” anything from the rule as far as I know.
There is another alternative though: you can build your own blocks similar to building your own widgets which is described here. Although it is not an easy task for the common user, I am sure that some people in the community could easily provide that (feel free to jump in) and upload the block then.