Linwood Gray, the burly alleged mastermind of a $30 million international heroin-smuggling ring, insisted yesterday that he was only a thrifty ex-bank robber who once stashed his loot in a frozen chicken.

Gray said he abhors drugs, and that the money the government contends he earned in drug-ring proceeds - at least $315,000 of it - actually was loot from the bank robberies.

Gray said he salted that money away for seven years in the walls and ceilings of a friend's South-east Washington barber shop. More money from the bank robberies was buried in a box in a Southeast yard, he said, but all except $4,000 or $5,000 of that particular cache rotted in the ground before he could get to it and dry it out in an oven.

"I don't know no foreigners, really," Gray testified to a federal court jury that is hearing charges that Gray led an international conspiracy. He instead said he was framed by overzealous government investigators and that the real villain in the conspiracy was Bob (Nighthawk) Terry, a radio disc jockey who has been missing for almost two years.

Terry has been missing since shortly after he, Gray and others sponsored a rock concert in Maryland in the summer of 1977 and a quarrel developed over the concert's crowd size and ticket proceeds. Terry and his friends said the crowd was small and the concert lost money; Gray and others believed at the time, they said, that the crowd was large and the take totaled $1 1/2 million to $2 million.

During those "discussions" over the concert, as Gray called it, several persons he described as organized crime figures from New York participated. At one meeting at a private terminal at National Airport - "where those Lear jets land," Gray said - one of the organized crime figures told Nighthawk he had been "scheduled."

Gray said he understood that to mean a murder contract was out on Nighthawk. However, Gray said yesterday he now thinks Terry is alive, wearing a beard and running a business in the Netherlands.

Gray testified that the only time he ever got involved in a drug transaction was in December 1978, when a drug runner offered to help him find Nighthawk in the Netherlands if Gray would sponsor a purchase of a kilo of heroin, Gray admitted he brought about $32,000 to that Capitol Hill meeting, but he said he was trapped into the purchase by the drug runner, who in fact was a government informant taping the transaction. Gray never went to the Netherlands.

Defense attorneys have said that a co-defendant in the case, Robert L. Stuckey, wants to testify that Gray was an iron-fisted leader of the drug-running ring who ordered murders and shootings of anyone who crossed him.

The jury has not yet heard any evidence about the violence believed to be connected with the case - including the ambush shooting of one prosecutor, the suspected murder of Terry, the shooting of one of Gray's alleged couriers and the murders of two other alleged couriers.

Gray and 11 others are accused of operating or participating in a sophisticated and highly structured drug ring in which $30 million worth of extremely high grade heroin was brought into Washington for sale on the street via Amsterdam, Montreal and Chicago.

At one point earlier in the trial, defense attorney Kenneth Michael Robinson had said he was going to prove that Gray was not involved, but that if he was involved, he was insane. Yesterday, however, Robinson dropped the insanity defense and put Gray on the stand.

Gray's testimony was filled with anecdotes about bank-robbing schemes he said he carried out in Washington in the mid-1960s. But he said at one point, "I'm not proud of what I did . . . I don't do that any more."

He said he robbed as many as 18 to 20 banks, and ran a loan-sharking business on the side to accumulate wealth before he was caught. At the time of his arrest in 1967, he said, police seized $11,000 in currency but missed $1,900 he had placed in a frozen chicken.

When asked about robberies at one bank at Southern Avenue and Wheeler Road SE, Gray replied quickly, "I closed it. To the best of my recollection I went into there four times."

Once, a number of years ago, he said, he saw one of his friends - and current codefendant Carl Cathey - shopping for Christmans toys at a store Gray was planning to rob. That night, after robbing the store, he said, he went to Cathey and asked him how much money he had spent in the store that day, and gave him that amount in robbery loot.

Cathey returned the favor, Gray said, by keeping Gray's robbery proceeds stashed in the walls of a barbershop for the seven years Gray was in St. Elizabeths hospital after being found not guilty by reason of insanity on a robbery charge.

"I was surprised" when Cathey dug out the money and told him it totaled $315,000, Gray said.

"Have you at any time ever been involved in drug traffic?" asked defense attorney Robinson.

"No sir, or its usage," Gray replied.

Gray, who belied a past reputation of courtroom outbursts by answering his questions calmly and quietly, said he became involved with Nighthawk Terry when Terry asked him to open some "straw man" accounts in connection with Terry's concert promotion business Gray described himself as a "flunky" for Terry, and said be never invested in any of Terry's operations, as the government contends.

He accused the government of planting "horrible" accusatory newspaper articles about him and then seeking to prove their allegations by framing him. At one point, he said, he set aside $26,000 to sue The Washington Post for libel for printing articles about the government's investigation of him, but he was arrested before he could carry out his planned suit. CAPTION: Illustration 1, Linwood Gray, left, testifies - By Joan Andrew for The Washington Post; Illustration 2, Carl Cathey, dark shirt, and other codefendants, listen to testimony from Linwood Gray during trial yesterday. Gray said Cathey hid holdup proceeds. By Joan Andrew for The Washington Post