We calculate the Drude weight in the superfluid (SF) and supersolid (SS) phases of the hard-core boson (HCB) model on a square lattice using stochastic series expansion (SSE). We demonstrate from our numerical calculations that the normal phase of HCBs in two dimensions can be an ideal conductor with dissipationless transport. In two dimensions, when the ground state is a SF, the superfluid stiffness drops to zero with a Kosterlitz-Thouless type transition at
TKT. The Drude weight, though is equal to the stiffness below
TKT, surprisingly, stays finite even for a range of temperatures above
TKT indicating the nondissipative transport in the normal state of this system. In contrast to this, in a three-dimensional SF phase, where the superfluid stiffness goes to zero continuously via a second-order phase transition at
Tc, the Drude weight goes to zero at
Tc, as expected. We also calculated the Drude weight in a two-dimensional SS phase, where the charge density wave (CDW) order coexists with superfluidity. For the SS phase we studied, superfluidity is lost via a Kosterlitz-Thouless transition at
TKT and the transition temperature for the CDW order is larger than
TKT. In striped SS phase where the CDW order breaks the rotational symmetry of the lattice, the system behaves like an ideal conductor for a range of temperatures above
TKT along the lattice direction parallel to the stripes, while along the direction perpendicular to the stripes it behaves like an insulator for all
T>TKT. In contrast to this, in the star-SS phase, the Drude weight along both lattice directions goes to zero along with the superfluid stiffness and for
T>TKT we have the finite temperature phase of a CDW insulator.