E2help needed

Okay I’m trying to make it so that each time I click shit it gives a one but does go away it toggles basicly but the catch is that is I click shift again then it adds another 1 I have been messing around with if statements but still can’t get it to work.

This is going to be an manual transmission and to shift up I will be using shift button and shift down is going to be the altt button. I might make it so that space has to be clicked if I want a clutch but that will be later any way I really need help on this. So far my button just toggles but doesn’t add with it’s self if it’s clicked more then once

@inputs Upshift Downshift
@outputs Gear

# Wire Upshift to whatever you want to shift up
# Wire Downshift to whatever you want to shift down
# Wire whatever needs to know the gear to Gear

if (Upshift) {
elseif (Downshift) {
  if (Gear > 1) { Gear-- }