This is actually very very simple. It waits until the mouse is down, then sets the old x position, then it checks if you move your finger during a small period of time(which can be extended by changing the length of the repeat loop) and if you did, it works out which way you moved it, moves the player, and sets the swipe direction. I hope this is helpful in the making of mobile games, I plan to use it in a game similar to minion rush sometime. For further details, click 'See inside'(I have added comments to help) Note: If you are on a computer, this script is useless. Log: ------------------------------------------------------------------------- V1.3 - Added Down(now you duck _:)_) V1.2.1 - Fixed jumping mechanics(silly me) V1.2 - Added upwards swipe detection with a jumping algorithm V1.1 - raised sensitivity V1.0 - original algorithm and release