SALEM – A former Lynn carpenter who robbed three people and attempted to rob two others with a shotgun during a two-day crime spree in 2009 is headed to state prison for five years.Eric Ayala, 24, of 235 Humbert Ave., Roxbury, made his plea Thursday afternoon in Salem Superior Court to 10 indictments that included three counts of armed robbery, two counts of armed assault with intent to rob, three counts of assault and battery with a dangerous weapon as well as assault with a dangerous weapon and violation of a restraining order.He was sentenced to serve five years in state prison to be followed by three years of probation at which time Ayala will be evaluated for mental health and alcohol and substance abuse treatment and counseling as deemed necessary by probation, random drug screenings as needed and was ordered to stay away from all victims involved in the case.Judge Timothy Q. Feeley adopted the joint recommended punishment proposed by Assistant District Attorney Melissa Woodard and defense lawyer John P. Benzan.The charges began on Dec. 29, 2009 around 8 p.m., when Ayala, armed with a shotgun, robbed one man of his wallet at the Cook Street playground .He also tried to rob the two other males at the same time but instead struck one of them in the face with the shotgun, chipping his tooth and hit the other with his foot.That same evening around 11:30 p.m., he assaulted a 17-year-old with the shotgun, but the youth quickly ran away.The next day, Ayala robbed a cell phone, pocketbook, cash and wallet at gunpoint from two women walking on Hesper Street as he pulled up in a gray SUV.On New Year?s Eve he went to his estranged girlfriend?s house on Mount Pleasant Street, where he punched her and then drove away in her gray Infinity SUV. At the time, she had a restraining order that prohibited him from seeing her and also from her residence.Since then the couple, who have a child together, have reconciled their differences, according to Woodard.Police arrested Ayala in the Roxbury area the next day. Authorities confiscated a shotgun from the premises and a pocketbook was retrieved inside the SUV that belonged to one of the female victims.Ayala had moved to Roxbury following the New Year?s Eve incident.Woodard told Feeley that the recommended sentence was based on Ayala?s record while adding that all the victims in the case were informed of the plea and the conditions.Benzan said his client has “expressed remorse” for his actions and at the time of the incidents had personal and emotional issues.