An alleged criminal boss arranged a drive-by shooting during which a house in an "ordinary" village was sprayed with bullets from an automatic self-loading assault rifle, a court heard today.

Matthew Carpenter organised the attack in Fulbourn, near Cambridge, to show people that "messing with him was not a game", the prosecution told Norwich crown court.

A masked gunman travelled on the back of a motorbike and left the area looking like a "scene from a gangster movie", jurors were told.

Maureen Baker QC, prosecuting, told jurors that the house owner and his family were out at the time of the shooting but crime scene investigators found more than 40 bullet marks.

Baker said Carpenter was a "major supplier" of cocaine in the Cambridge area and drugs were behind the shooting. She said Carpenter had organised the attack using a number of people and "layers" of mobile phone calls.

She alleged that Marlon Robinson had fired the gun – a Czech 7.62 x 39mm calibre self-loading assault rifle – after being driven to Fulbourn by Kevin Wells on his motorbike late on Saturday 19 April last year.

Baker said Duncan Berry had provided firearms advice, Jack Robinson and William Dixon had acted as messengers and Aymon Popo had helped source a gun.

Carpenter, 28, of Cambridge, denies conspiracy to possess a firearm with intent to endanger life, conspiracy to possess a firearm without a firearms certificate, and conspiracy to supply cocaine. The other defendants deny firearms and drugs charges. The trial continues.