Add then in if statement in gscripts