I'm not sure how you would code this, as its an emotional kind of response.
But most Ref's wont Blow the final game or half game whistle if the opponent has the ball in the opposite teams Box, getting ready to score.
Happens to me all the time since playing