The spontaneity of reaction is based upon the negative value of ΔG,ΔG is based upon T,ΔS and ΔH according to following equation (Gibbs-Helmholtz equation) ΔG=ΔH−TΔS
If the magnitude of ΔH−TΔS is negative, then the reaction is spontaneous.
when TΔS>ΔH and ΔH and ΔS are +ve, then ΔG is negative.