Is it possible to

Hi there!
I have created an NFT project in the Cardano blockchain and I would like to add passive income to my supporters. I’m a game developer but I’m totally new in the crypto and smart contracts world and I would like to know if it’s possible to do the following features:

  • Create a Lottery system/contract where people can buy the entrance by sending an amount of ada (like pancakeswap lottery)
  • When Lottery timer ends:
    • Send 1st, 2nd and 3rd prices based on numbers selected by users
    • Send % of pot to my NFT supporters (could be based on nft policy)

Thanks