how do i create coin spawning system like subway surfers

currently this is my spawning coins logic how do i modify it to make it like subway