Steven Ormerod, 41, who the court heard had a previous conviction for a similar offence, repeatedly punched and kicked Richard Wallbank at his home in Duke Street on May 12.
He paused in his attack when asked by Mr Wallbank why he was doing it, but started up again, and finished by taking a photograph of him and being told it would be nice to show people, the court heard on Friday.
Suzanne Paige, prosecuting, said the attack had started at around 7pm after Ormerod had been let into Mr Wallbank's home.
They had been sitting on the sofa when, for no reason at all, Ormerod had started hitting Mr Wallbank.
"He punched him a number of times and then grabbed his hair and banged his head about five times against a cupboard door," she said.
"He said: 'You are hurting me. If you don't stop, you will kill me'."
When asked why he was doing it, Ormerod told him it was 'what he had coming to him', she said.
After taking the photograph, Ormerod told Mr Wallbank he would be back to do the same again.
Mr Wallbank sustained numerous injuries, including a fractured cheekbone and finger and multiple bruises.
Ormerod, who admitted unlawfully and maliciously inflicting grievous bodily harm, was told he would be sent for sentencing to Bradford Crown Court because of the injuries suffered by Mr Wallbank, because of his record and because of aggravating features.
John Mewies, for Ormerod, said his client was aware of what he had done and did not wish him to make any representations. He pointed out that Ormerod had been on conditional police bail since being arrested and had not carried out his threat to return to Mr Wallbank.
Ormerord, of Riversdale, Giggleswick, was allowed bail on condition he not contact Mr Wallbank or go within ten metres of his home. He is due to be sentenced at Bradford on August 8.