For those of you who have worked with this logic and have experimented a nightmare while extending it (E.g. ZZ9 XD): I solved this problem! Now, the only thing you'll have to change is the 'Top' and 'Bottom' Variables!
@Jon5432 for original project "Demo of J5432 Logic for Low rise".