Many modern novels are influenced by older novels. Lord of the Flies and Macbeth are similar in many ways. It may be coincidence or Golding may have used Shakespeare’s Macbeth as inspiration. In the two novels their similarities are made different in small ways.
In Lord of the Flies evil draws people towards it. All the children start out to be innocent. Then a few turn to barbarism and later one by one everyone turns to barbarism except Ralphe and Piggy. In Macbeth Evil repels people from it. Macbeth becomes evil and kills the kin