徐々にスピードを上げることは成功(?)したんですが、
一度ダッシュボタンを押すのを止め、その後またダッシュボタンを押してもスピードが
最高速度のままなんですがどうすれば、どのような文を入れれば上手いこと初期化されますかね?
ご指南お願いします。

def act(input)
#移動
move(-4 - spup(input)) if input.left
move(+4 + spup(input)) if input.right
#アニメーション
@img_ct += 1
@img_ct = 0 if @img_ct >= 40
end

def spup (input)
if input.b && input.right || input.b && input.left
if @spup <= 4
@spup += 0.2
elsif @spup <= 8
@spup += 0.1
else
@spup += 0
end
else
@spup = 0
end
end