Instead of initiating the timed destroy call, it would make more sense to run a [1 second] timer, and destroy the object if the appropriate key hasn’t been pressed.
^^ This would deffinitely be the better idea and implementing a simple timer is extremely easy
private var timer : float = 0;
var triggerTime : float = 1;
function Update () {
...
timer += Time.delta;
if (timer >= triggerTime) {
timer = 0;
...
}
...
}
This is of course just basic but you can see how easily you can adjust it to fit your needs.
For example you could have a variable that woudl return true when the objects destruction countdown begins and then if the undestroy button is pressed during the countdown just cancel the countdown. Then you can add the result of the countdown being if timer reaches 1 second then destroy the object.