The first scene finds Elliot and Tyrell at the Coney Island base, not long after the hack. Elliot reaches into the popcorn machine for a snack. As first pointed out by Tech Insider, it's possible that he was pulling out a gun, as his sister Darlene once hid a gun in there back in season one.
Indeed, Elliot's father pulls a gun on Elliot later in the episode. Given that his dad is a figment of his imagination, it is entirely possible Elliot grabbed that gun.