Antideuteron and antihelium nuclei have been proposed as promising channels for dark matter particle detection. In fact, a possible DM production of antinuclei, assuming DM is made of WIMPs annihilating or decaying in the Galaxy, is at least one order of magnitude larger, at energies between 0.1-1 GeV/nucleons, than the astrophysical background coming from interactions of primary cosmic rays with interstellar matter. The estimate of the flux of dark matter and secondary cosmic ray antinuclei is crucial to interpret results of indirect dark matter searches carried out with space-based experiments like AMS and GAPS. In the laboratory, light antinuclei can be produced in high-energy interactions at colliders. To model their production in hadronic interactions, a coalescence model can be employed on an event-by-event basis within Monte Carlo frameworks. According to the coalescence approach, a nuclear cluster is formed when two or more nucleons are close in phase space. The process depends on the momentum distribution of the nucleons, the nucleus wave funnction, the characteristics of the nucleon emitting source. Here, we propose a coalescence afterburner for antinuclei production in high energy hadronic collisions from Super Proton Synchrotron (SPS) to Large Hadron Collider (LHC) energies using PYTHIA8 event generator as input. In this work, PYTHIA8 has been tuned to describe proton and antiproton yields and energy distributions as measured in pp collisions at SPS and LHC energies for the first time. Our approach employs a state-of-the-art Wigner function-based coalescence model and explores different wave functions for antinuclei. The results from the afterburner are compared with experimental results from NA49 and ALICE, and prospects for applications of the present model in heavy-ion collisions are discussed.