Update the modescript code