A 16-year-old has admitted killing a man he believed was a paedophile after allegedly luring him to a beach in a premeditated attack.