Workers at a supported living complex had to lock residents in their rooms and themselves into an office as a vulnerable tenant armed himself with a knife.
The support staff had found resident John Philip White, 19, slumped in the kitchen doorway of the Fulwood-based accommodation on February 2.
But he turned aggressive, Preston Magistrates' Court heard, after the staff advised him to go back to his room.
Prosecuting, Laura Keegan said: " The incident has taken place in a supported living accommodation and the complainants involved are support workers.
"The defendant is a resident and has been at the address for four months.
"The staff member and other colleagues asked him to get up go to his room. He wasn't happy about that and has thrown a plastic cup across the kitchen then made way to his room. He was asked what the problem was.
"He shouted: 'You are all getting it today, I'm going to go upstairs and get my knife and stab you all.'
The court heard other residents were locked in their rooms for their own safety before staff saw White coming downstairs with a knife in his hand, slicing at the wooden bannister.
He continued to shout: 'I'm going to kill you, I'm going to kill you all.'
The workers locked themselves in a staff office where they could still hear him moving around and being aggressive. When he went back upstairs they contacted the police and he was arrested.
Defending, Rob Kellock said: " He has transitioned into supported accommodation and has fairly complex needs."
White, who has no convictions, admits two assaults and criminal damage.
The bench adjourned the case for a pre sentence report to be prepared.
He will next appear on March 14.
In 2008, social worker Phillip Ellison, a dad-of-three from Penwortham, was stabbed to death while working at a supported housing scheme less than a mile away on Glebe Close, Fulwood.
Resident Robert Searle pleaded guilty to manslaughter on the grounds of diminished responsibility after a report concluded he had a severe depressive disorder which amounted to an abnormality of mind.
He was later sent to a secure unit indefinitely and will only be released when the Secretary of State or a Mental Health Tribunal deem it is safe to do.