The electrons are transferred from potassium to sulphur, in this reaction, potassium is being oxidised and sulphur is being reduced. Two potassium atoms each lose one electron forming K+ ions. Sulphur gains two electrons forming S2-/2- ions. The resultant formula will be: K2S, bonding in this compound is ionic.