are these right sentences?

1)Shahrayar was all doing this to keep his heart safe.
2) In world literature, we came to know how every story ended by the power of the sword, but this story breaks the tradition and shows human‘s intelligence can also solve the problems.

1. Shahrayar was doing all this . . .

2. It's correct, although I'd remove the 's from human. In this case human is used as an adjective modifying intelligence.

Yes, both of these sentences are grammatically correct. However, there are a few suggestions to improve the clarity and flow of the sentences:

1) "Shahrayar was doing all of this to keep his heart safe." (revised)
Explanation:
- Move the adverb "all" before the verb "doing" to improve the flow of the sentence.

2) "In world literature, we learn how every story traditionally ends with the power of the sword, but this story breaks that tradition by showcasing how human intelligence can also solve problems." (revised)
Explanation:
- Replace "came to know" with "learn" to simplify the meaning.
- Specify that it is the "power of the sword" that traditionally ends stories.
- Clarify that the story breaks the tradition mentioned.
- Change "human's" to "human" as it refers to human beings in general, rather than one specific person.

Overall, these revisions make the sentences more clear and concise while maintaining their intended meaning.