We incorporate the effect of short-range repulsion among hadrons into the Cooper-Frye sampling procedure through a rejection sampling step that prohibits any pair of particles from overlapping in the coordinate space, effectively modeling the effect of hard-core repulsion. It is then applied to study the effect of excluded volume on proton number cumulants in central collisions of heavy ions in conjunction with exact global conservation of baryon number, electric charge, and strangeness. The results are compared with earlier calculations based on analytical approximations, quantifying the latter’s accuracy at different collision energies. An additional advantage of the new method over the analytic approaches is that it offers the flexibility provided by event generators, making it straightforwardly extendable to other observables. The new procedure is called the FIST sampler and is now incorporated in the open-source package Thermal-FIST since version 1.4.