collision with wall so player dies

i am making a game were the ball goes round a area and when it bumps into the walls it gets destroyed or reloads the level how do i do that

Duplicate question: