how i execute function after i release button ?

hello , help me plz how i can execute function after i release GUI Button this is my code :

if ( GUI.Button=(Rect (100,200,50,100), "Shoot") ) { 
 
shoot();
 
}

i want to execute (shoot ) function after i release the GUI button , in javaScript please

You really should read through the Unity reference on GUI Scripting before you attempt to code a GUI.

Let me google that for you.