how to end co-sleeping

im stressed to the max..i never wake up in a good mood anymore ..the baby doesnt sleep that good at night he constantly rolls in circles kicks throws his arms ecery 5 seconds he waks up for his pacifier...hes 8 months this shouldnt be happening ...how do i ease him into sleeping in his own bed when he does these things all night im currently 5 month pregnant so getting up every 5 seconds isnt in the agenda if he wants a decent mumma the next day im dreading the process but what are tips to make it easier? as of today everytime he has a crying fit fpr no reason i put him in his pack and play untill hes done trying to get him used to his room and help him know thats his safe quiet place..i just dont know what to do anymore ...however i did try putting him in his own bed a month ago per doctors request and sleep wasnt going to happen he kept screming for attention and climbing to get out..HELP!!