Two teenagers revelled in the destruction by posting “jubilant” pictures on “the Polish equivalent of Facebook”.
The 12th Century castle was now being invaded “on an almost nightly basis” by vandals, Judge Stephen Ashurst told York Crown Court.
He warned that if people continued to attack ancient monuments which English Heritage was increasingly hard-pressed to defend, jail sentences would have to be handed out.
But in this case, Norbert Borowicz and Matt Kazimierz Lucas Fractowiek, both 18, who are of Polish origin but live in Scarborough, escaped with community services orders requiring them to carry out unpaid work.
Borowicz, of Aberdeen Place, and Fractowiek, of St Mary’s Walk, both Scarborough, admitted £5,000 criminal damage on May 12 last year.
Mrs Taryn Turner, defending Borowicz, said: “For those people who live in Scarborough and are proud of their castle it is bad enough to see it crumbling away as a consequence of nature.
“When people wantonly damage it in this way it is soul destroying because a lot of it is irreplaceable.
“On this occasion the damage was mercifully contained.
“This defendant feels thoroughly ashamed. His family who value the opportunity for them in the country are disgusted.”
Philip Evans, prosecuting, said Dr Keith Emerick, an Ancient Monuments Inspector for English Heritage which runs the Castle, “describes the castle as a nationally important monument and one of the principal historic attractions in the North of England”.