A makeshift crack pipe vending machine has been discovered outside of a shopping center in a town on Long Island, authorities say.

Residents in Coram, Brookhaven, complained after a vending machine dispensing crack pipes -- made from modified pens -- popped up in front of the Coram Commons shopping center on Middle Country Road.

The Town of Brookhaven released an image of the pipes that the box dispensed. That appeared to be made out of a broken down pen, with a small piece of gauze.

The big, blue vending machine labeled 'PENS' was fitted into the grass outside the shopping center with concrete, and fastened with padlocks. It was selling each pen for $2 in quarters.

But Suffolk police said selling the items might not be a crime. The 'pipes' sold were in fact real pens that write, police said, but the tubular section of the pen can be used as a crack pipe.

Regardless, the Town of Brookhaven said the vending machines had no permits, thus violating town codes. And assemblyman Dean Murray says "it is in fact illegal to sell drug paraphernalia without supervision."

The Town of Brookhaven received complaints about the dispensary on Sunday. Town Law Department investigators were taking immediate action to remove the vending machine and were referring all finding to the Suffolk County Police Department.

It's still a mystery who set up the machines. Authorities are investigating.