If that effect worked, then you wouldnt need all that extra stuff, just line 4. However, I cant remember if that effect is a real one, so heres an alternate solution that might work:
set {_split::*} to lore of player's tool split at "||"
loop {_split::*}:
add 1 to {_num}
set {_line%loop-number%} to {_split::%loop-number%}
send "The last line of the lore of player's tool is %{_line%{_num}%}%"
Yes, I know this can be simplified but I'm on mobile. The skript should work anyways.