Edinburgh
If there are problems with the direct services to Edinburgh it can be as fast to catch a connecting service and change buses on route.
If you are travelling to Edinburgh as well as the various Stagecoach tickets it's worth knowing about One Ticket as this gives you onward bus travel in Edinburgh - there are even versions which give you bus travel to a train station in Fife then train travel to Edinburgh and then onward bus travel to your destination. (One Tickets involving train travel can only be bought by the week or longer - bus only tickets can be bought by the day - you typically want a Travelarea 4 ticket.)
There are often two buses an hour between Leven and Edinburgh - the X58 and X60 - whose timetables are shown below.
Between the times of these buses you may be able to catch a bus to Glenrothes where you catch a faster X54 or X59 service to Edinburgh via Halbeath Park and Ride.
It's worth using the Stagecoach Journey Planner to check for such journeys.
But the journey planner does not tell you about connections at Halbeath Park & Ride where there are 5 minutes or less to change buses. For example, the X27 and X59 are often timetabled to overlap their stops at Halbeath to allow an exchange of passengers. And if you are changing at Halbeath and have bought a One Ticket then you also have the option of catching a Megabus/Citylink M90/M92 into Edinburgh (although people with reserved seats on these buses have priority) - there are two Megabuses an hour from Halbeath to Edinburgh - both travelling about the same time as the X59 - so if any of them are running late you should have the opportunity to catch one of the others...
#FiSch - runs on Fife school holidays only