The 17-year-old, who can’t be named for legal reasons, appeared before Sheriff McKay at Kirkcaldy Sheriff Court.
The teenager admitted on December 18 last year at an address in Hendry’s Wynd, Kirkcaldy he shouted, swore and repeatedly banged on doors and windows.
He further admitted on the same date, in the same place, he threatened to kill police officers.
Fife Council slams couple who painted front door Ukrainian yellow
Cyclist taken to hospital after crash on A92 in Fife
Fire crews tackle blaze at disused Kirkcaldy school
in Pictures: These P1 school photos from 1994 will spark many memories
Glenrothes sisters are British Highland dancing champions