The primary purpose of the scrivener in Shakespeare's Richard III is to draw the audience's attention to how corrupt things have become in light of Richard's machinations.
Without knowing that Richard has ambitions to be king, Hastings has admitted to Richard's ally Catesby that he could never support Richard over Edward, the Prince of Wales. When Catesby reports this to Richard, Richard falsifies charges against Hastings to get rid of this man who might prevent him from sitting on the throne of England. Accusations of treason surround Hastings and he is ultimately assassinated.
The scrivener, also called a herald (or a "professional copier") has written up the charges that accuse Hastings of being a traitor, but they are presented after Hastings has already been killed.
[The] scrivener...reads an indictment of Hastings to the citizens of London that speaks of the (already executed) nobleman as a traitor...
The scrivener notes that his is a legal document that he has clearly written, so that it can be shared publicly in front of St. Paul's Cathedral. He reports that Catesby brought the charges to the scrivener and it took him eleven hours to copy it. The original took the same time: he directs our attention to the twenty-two hours total it took to write the original charges and the copy, but that five hours previous to that moment, Hastings was alive and well, under no suspicion. So the charges have been lodged after his death. The scrivener says it is a backward world when things take place out of order. He demands how anyone could be tricked by this situation: wouldn't everyone with half a brain be able to figure out what has really happened?
Who is so gross / That he cannot see this palpable device? (III.vi.10-11)
He summarizes the situation by lamenting how terrible it is to know something but be unable (for the danger of it) to speak aloud of what one knows.
Bad is the world, and all will come to naught
When such ill dealing must be seen in thought. (III.vi.13-14)
The scrivener, if the audience is not clear, explains the length to which Richard has gone to guarantee that he becomes the next King of England.