The answer is true. Though he was captured by the pirates, Hamlet is grateful and even thanks them when they help him return to Denmark. When he returns, Claudius and Laertes hatch a plan to kill him. This only leads to the death of the major characters in the play.