Methods for making biomaterials for use as a tissue sealant, kits containing precursors for forming the biomaterials, and the resulting biomaterials are described herein. The biomaterials are formed from a composition comprising at least a first and a second precursor molecule, wherein:i) the first precursor molecule is a poly(ethylene glycol) based polymer having x nucleophilic groups selected from the group consisting of thiol or amino groups, wherein x is greater than or equal to 2ii) the second precursor molecule is of the general formula:A-[(C3H6O)n—(C2H4O)m—B]i wherein m and n are integers from 1 to 200i is greater than 2A is a branch pointB is a conjugated unsaturated groupThe precursors are selected based on the desired properties of the biomaterial. Optionally, the biomaterials contain additives, such as thixotropic agents, radiopaque agents, or bioactive agents. In the preferred embodiment, the biomaterials are used to reduce, inhibit, or contain loss of a biological fluid or gas in a patient.