Complex sentence: The sheltered Miles, having lived his entire life in hospitals and institutions, believed Truman to be his only friend, and took his posthumous messages from beyond the grave as gospel, deciding to take revenge on all of Spencer's enemies himself.
Split into simpler sentences: The sheltered Miles, having lived his entire life in hospitals and institutions, had believed Truman to be his only friend. He takes Spencer's posthumous messages as truth, and follows Spencer's instructions to take revenge on all of Spencer's enemies himself.