bool buttonPressed = Gamepad.current.aButton.wasPressedThisFrame; https://docs.unity3d.com/Packages/com.unity.inputsystem@1.7/api/UnityEngine.InputSystem.Controls.ButtonControl.html#UnityEngine_InputSystem_Controls_ButtonControl_wasPressedThisFrame
Fix compiler errors first!