You only have to change the three IF clauses:
Substitute
if(Sensor.S3.readValue()==700)
With
if((Sensor.S3.readValue()>=690) && (Sensor.S3.readValue()<=710))
Substitute
else if(Sensor.S3.readValue() > 700)
With
else if(Sensor.S3.readValue() > 710)
Substitute
else if(Sensor.S3.readValue() < 700)
With
else if(Sensor.S3.readValue() > 690)
Thats all!