refactor BlockScript, BrickScript