For deletion, %brick.delete(); will delete the brick instantly, possibly creating floating bricks, and %brick.killBrick(); (or was it just .kill() ?) will play the death animation, and cause supported bricks to be killed. If this is a tool that anybody can use, make sure to do trust checks first!
As for detection, use raycast methods. As far as I know, that is how relays work.