Leviathan uses alternating shooting orb attacks than can be countered with the correct overhead prayer. After each of these attack phases simply step one tile away to dodge a rock falling above you.
The green orb indicates protect from range.
The blue orb indicates protect from magic.
The red orb indicates protect from melee.
The Leviathan will also enter enraged phases that can be countered by using shadow barrage to allow for easy kills and longer trips.
Using the shadow barrage will freeze the leviathan allowing you to run to the opposite corner of the arena and shoot its weak spot - thus triggering a special attack.
At the beginning of the fight go through 3 Leviathan attack phases and then use shadow barrage - this will allow you to skip the enraged phase where the attacks are much quicker and harder to correctly pray against.
Lightning Special Attack:
The Leviathan will shoot lightning across the floor but this can be dodged by using the yellow tiles in the fight overview video and timing your run to other yellow tile just before the lightning reaches you.
***Note if you are using the Bowfa instead of the Tbow you will need to move your yellow markers one tile closer on each side since the Bowfa attacks quicker***
Debris/Rock Special Attack:
The Leviathan will throw debris/rocks at you which can be dodged by simply clicking one tile ahead of your character repeatedly until no more rocks are thrown. At the conclusion of the rocks being thrown make sure to hide behind one of the rocks to avoid a blast of smoke that will deal high damage.
After one of these special attacks conclude the normal leviathan attacks resume. For 2 attack phases (instead of 3 phases like when you begin the fight) use your overhead prayers and then again stun the leviathan with shadow barrage, unless you reach under 190 hp left on the boss.
The final enraged phase:
The leviathan will spawn an abyssal pathfinder that you will want to stand under as you complete the kill. The pathfinder will move in a giant square around the boss and you must correctly pray range/mage as you stand in the pathfinder and attack the boss. In the fight overview video the blue tiles indicate the path you will want to follow during this phase.
A toxic blowpipe can be used here to make it a bit easier, along with using a webweaver bow if you wish to use the special attack and bring the fight to an end quicker.