Counterparty was probably the closest thing to having smart contracts implemented with bitcoin, if i remember correctly their EVM was compatible with ethereum so one could deploy the same solidity contracts with a bit of tweaking on Counterparty. I'm not sure how far along they got on with it tbh.