A man accused of committing a violent rampage through western Sydney says he would have killed people if he had been carrying a gun, police allege.

Charlie McGee, 24, has been charged with 27 offences including four counts of attempted murder, for an alleged crime spree that began at 2pm at Lalor Park.

It ended about an hour and a half later in Doonside following a police pursuit during which a car driven by McGee allegedly hit two schoolgirls.

During that time, McGee is accused also injuring three men while attempting to steal their cars including attacking one man with a hammer.

He allegedly asked another of his male victims to look under the front of car for damage before driving directly at him.

McGee did not appear before Blacktown Local Court today but the magistrate was told McGee was displaying psychotic symptoms.

In police documents tendered before the court, it is alleged when interviewed by officers McGee showed no remorse for his actions.

He is also alleged to have made repeated comments that “if he was in possession of a firearm he would have killed multiple persons during his rampage”.

McGee is accused of stealing two cars – a white Toyota ute and a Toyota Paseo – during the crime spree, while attempting to carjack three others.

He is alleged to have beaten the owner of the ute, Jamal Yassin, with a hammer he had also stolen.

He is accused of then attempting to steal four other cars without success before threatening to kill a woman if she did not give him the keys to her Paseo outside a McDonalds.

McGee was allegedly driving the Paseo when he was spotted by police and told officers he drove the car at the two schoolgirls hoping it would prompt the officers to stop.

He crashed into a nearby ditch filled with workmen a short time later and allegedly put up a struggle when officers tried to arrest him.

The Blacktown Local Area Commander, Superintendent Mark Wright, told the media that there was no motive for the alleged crime spree at this stage.

“It was a fairly random attack,” he said.

McGee did not apply for bail and is due to appear at Penrith Local Court on August 13.