Telekinesis Script

Hm. but I want to make it like it moves with my mouse but not in the back. Only left / right and up or down. Any way to make it like this?