A man allegedly targeted a female staff member at a high school with messages threatening that he would go to the facility with guns.
Security guard Kevin McLean, 37, denies also stating to the Bell Baxter High employee, based in Cupar, that he had 10 guns, was watching her as a sniper and had bullet-proof vests.
McLean, of Auchterderran Road, Lochgelly, allegedly sent the messages over a 48-hour period on Monday and Tuesday.
He will now face trial in May accused of placing the woman in a state of fear and alarm and apprehension for her safety and for the safety of pupils and staff at the school.
McLean, who was still wearing his work’s Chubb Security polo shirt when he appeared from custody before Sheriff Alastair Brown at Dundee Sheriff Court, had his firearms confiscated by police as soon as the allegations were made.
Defence solicitor Mike Short told the court McLean was pleading not guilty to the charge.
McLean allegedly sent the messages via the website match.com.
He denied that on February 26 and 27 at the premises of WH Smith, High Street, Dunfermline, Overgate Shopping Centre and at Auchterderran Road in Lochgelly, he sent by means of a public electronic communications network, messages to Karin Trail that were of a grossly offensive or indecent, obscene or menacing character.
The messages allegedly stated he knew she worked at Bell Baxter, that he was in possession of 10 guns and bullet-proof vests; that with his gun he could watch her from miles away and that he loved shooting targets.
He allegedly messaged that he was watching her and he was a competent sniper and threatened to attend at the school department while armed and placed her in a state of fear and alarm and apprehension for her safety and the safety of others, including pupils and staff at the school.
Fiscal depute Lynne Mannion asked for bail conditions to be set for McLean, barring him from entering Cupar or contacting the alleged victim.
He was released on bail on special conditions not to contact her.
McLean was also told he was only allowed to travel through Cupar as a passenger on a bus or train to get to work but he would not be allowed to alight.
Trial was set at Dundee Sheriff Court for May 23 and an intermediate diet will be held on May 3.