There is perhaps one chance in ten that this is legitimate. The one chance would be something like: the family disagree about what Uncle Bill's will actually says, and do not trust each other enough to allow any one of them to collect it from the lawyer. If an outsider collects the document from the lawyer and hands it over to a full family gathering, then everyone can see it at the same time.
The nine chances of dishonesty include a high chance that this package is not legal in either sense, a considerable chance that the document has already been tampered with and your 'friend' wants somebody else to blame if the tampering is discovered, and some chance that there has been a misunderstanding about court requirements (no document can ever become invalid if inspected, purely as a matter of logic), in which case getting caught in the middle of a lawsuit will very probably cost you more than you were paid.
Since you are apparently in dire need of the money (another thing this 'friend' will have considered before suggesting such a shady proposition), you may be tempted to accept the job, even at those odds. If so, there are a few things you can do to reduce your liability:
Make sure you collect the document from the lawyer directly. Not his secretary or front desk, and certainly not from some unidentified intermediary.
Do whatever you can to protect yourself from accusations. You and the lawyer both signing across the flap of the envelope would be one good way, but a lot depends on the situation. Basically, ask yourself "Can I prove that I never opened the envelope if an unfriendly detective asks me?" If not, don't take the job.
Make sure you know exactly who you are to deliver the envelope to, and don't budge on details. If Aunt Ethel is supposed to be there but has had to go to the doctor's unexpectedly, you just have to wait till she gets back. This is partly so that Aunt Ethel does not claim she was deliberately excluded, and partly so that nobody can say "You didn't actually fulfil the bargain, so you dobn't get paid". I know your friend would nver do that to you; but Wills, combining bereavement, family relationships and laws/money, do a lot of strange things to people's character.