Help with brick-breaking game!!

Hi im new to unity and I need to make a brick game for school. What I need is that when ever I break a brick the game to pause to show a pop-up window with some information and a button to close the window and when I close the window the game needs to resume. For now I already have the game(the bricks, the ball, the paddle, the bricks break).
A friend told me about this but i dont know how or where to put it in my code
function OnGui {
if (shouldShowText == true){
GUI.Box(new Rect(X, Y, w, h), “text”);
}
}
Can someone help me??

Thank you

I cannot old GUI. Did you thought about Unity UI for your interface ?