and also the delay button code might be this (when green flag clicked
set [Delay v] to [0]
switch costume to [Delay Off v]
when this sprite clicked
if <(Delay) = [0]> then
set [Delay v] to [0.5]
switch costume to [Delay On v]
else
set [Delay v] to [0]
switch costume to [Delay Off v]
end)