You have a semicolon after your DestroyObjectDelayed()
It shouldn’t be there.
Also make sure you have your brackets { } for your class. You might just have not posted them here, but just in case.
And use code tags when asking for script help Using code tags properly