adds invert option for text scripts
fix bracket