implemented gui and its values in to script