Gilligan's Island (1964)
S1E16 Plant You Now, Dig You Later
During his time assisting Mr. Howell, Gilligan discovers an old chest buried in the sand. The castaways are convinced it holds a pirate's treasure. However, when a disagreement arises over who rightfully owns the chest, the matter is taken to court, with the Professor stepping in to serve as the judge.