Incremental game need help

Hello guys,

I want to try to make a incremental game, like make it rain, or cookie clicker.
I am learning unity few weeks as I go, catching whatever information I can get.
But I need help with the scripts, because I can not find proper answers anywhere on the internet, I am often losing a lot of time by solving these.
Please help me with few things :

Using javascript tho.

I got the background, graphic of the click thing set up, even the click counter

So when I click the gem, Gems value increase by 1-that is done

  1. Next I would love to have a Gems
    Per second value under the Gems:xx
    But not sure how to break it down I
    guess counter with miliseconds and
    somehow display xx/s.

  2. I’ve got graphics for the “miner”
    that gives you certain amount of
    Gems per second, but I need help
    with scripting the process. So what
    I need : something like if gems ==
    50 gems -50 start routine gems+=1/s
    with increasing value of the gems
    for example first time its 50 then
    its 75(you get it) each time you buy

  3. “upgrade script” for changing the
    variable of gems per click from 1to
    lets say 3,6,9,20,100 etc(you know
    how these things works) Again this
    is in javascript, what I’ve got
    attached to the Blue Gem in the
    center :

    #pragma strict
    var clicks : Transform;
    var score: UI.Text;
    var clicked : boolean = false;
    var click : int = 0;
    function Start () {


    function Update () {
    score.text = "Gems: " + click;

    function OnMouseDown ()
    click += 1;

Thank you for your time guys !

Please check the tutorials: