resource replace and scripts modify