Quote:
If someone could write the code, just the main function part, it would be helpful
That isn't going to happen. We are not a "code to order" service.
If you want someone to write your code, you have to pay - I suggest you go to Freelancer.com and ask there.
But be aware: you get what you pay for. Pay peanuts, get monkeys.