The rainbow lines you are speaking of is when the digitizer ribbon that goes from the screen comes loose or its faulty. It's probably knocked loose. Here's how to replant the ribbons for this troubleshooting:
1. take out the two pentalope screws located on the outer sides of the charging port.
2. slightly lift the screen from the casing from the home button end first and lift that end until its slightly under 85 degrees so you don't rip any of the chords.
3. there will be a sliver plate in the upper right hand side corner that's in the shape of square, a quarter can fit on it. take the four screws from the corners of this plate to reveal the ribbons. The one you're looking at is the left most ribbon underneath all of them. Makes sure that ribbon and all other ribbons are pressed down firmly.
4. assembly is the opposite as disassembly.
if you need more help don't hesitate to ask. I replace screens as a hobby on the weekends.