How to destroy while(true) ?

Hello, I have This script:

function loop()
 
 {
 
  while(true) {
 
 	  pauza.enabled = true;
	  
	   yield WaitForSeconds(0.5);
	  
	   pauza.enabled = false;
	   
	    yield WaitForSeconds(0.5);
		
		 pauza.enabled = true;
		
		yield WaitForSeconds(0.5);
		
		pauza.enabled = false;
		
		yield WaitForSeconds(0.5);
	  
	 
	   
	   yield;
	   
	  
	
	   
	   }
	   }

And how to destroy this loop after for example 10 seconds? or off GUITexture?

Something like this:

function loop() 
 { 
  var t = Time.time;
  while(true && (Time.time - t) < 10) {
       pauza.enabled = true;
       yield WaitForSeconds(0.5);
       pauza.enabled = false;
       yield WaitForSeconds(0.5);
       pauza.enabled = true;
       yield WaitForSeconds(0.5);
       pauza.enabled = false;
       yield WaitForSeconds(0.5);
        }
       }

I edited your code slightly. Notice the last two lines. The first one just waits for 10 seconds (as you mentioned), and then it calls break, which exits the loop.

function loop() 
 { 
  while(true) {
       pauza.enabled = true;
       yield WaitForSeconds(0.5);
       pauza.enabled = false;
       yield WaitForSeconds(0.5);
       pauza.enabled = true;
       yield WaitForSeconds(0.5);
       pauza.enabled = false;
       yield WaitForSeconds(10);
       break;
        }
       }