I used the if on edge, bounce block :) it's not good cuz I used that block.
thanks to @flippguy24 for the code.