Well , then you can put :
but*=0; after the if condition.*
Anyways the loop is continuously repeating.
What else you can try is that the sender sends a no. , (0 over here) at the starting of the void loop() ,
a condition checks if the value is zero , if the value is zero it doesn't execute the loop.
ie.
void loop(){
_ if(but*==0)_
_ return;_
_}*_