Airsoft solenoid controller

Sorry, is this closer to what you mean

const int buttonPin = 3;     
const int ledPin =  2;     

boolean buttonPressed = false; 

int buttonState = 0;

void setup() {

pinMode(ledPin, OUTPUT);
pinMode(buttonPin, INPUT);

}

void loop() {
  
if ( (buttonState == HIGH) && (buttonPressed == false) )
digitalWrite(ledPin, HIGH);
delay(100);
digitalWrite(ledPin, LOW); 


if ( (buttonState == LOW) && (buttonPressed == false) )


{}

}

thanks for being patient with me.