Complex sentence: The kite wasn't struck by visible lightning (had it done so, Franklin would almost certainly have been killed) but Franklin did notice that the strings of the kite were repelling each other and deduced that the Leyden jar was being charged.
Split into simpler sentences: The kite was not struck by visible lightning; had it done so, Franklin would almost certainly have been killed. However, Franklin did notice that the strings of the kite were repelling each other and deduced that the Leyden jar was being charged.