First  -| Platformer - Game |- V1.2.5

Instructions: Hi, welcome in First -the Platformer/Game- \nFirst: the 1st part of the series "Podium"\n2nd part: https://scratch.mit.edu/projects/293691984/\nPodium studio: https://scratch.mit.edu/studios/15807299/\nA game by @Thom1sl\nPlatformer:\nInstructions in the game!\nThere are 15 originals easy levels.\nGame:\nInstructions:\n-Use the mouse to move the player \n-Avoid the Spikes\n-Get the coins\n-Enjoy!! ;D\n\n

@Stage\n\nwhen flag clicked\nforever\n    play sound [659165water2 v] until done\nend\n\nwhen flag clicked\nswitch backdrop to (arrière plan1 v)\n\nwhen I receive [platformer play go v]\nwait (1) seconds\nforever\n    if <(backdrop [name v]) = [7]> then\n        repeat (7)\n            wait (1) seconds\n            if <(menu) = [1]> then\n                switch backdrop to (arrière plan1 v)\n                stop [this script v]\n            end\n        end\n        set [menu v] to [1]\n        switch backdrop to (arrière plan1 v)\n        stop [this script v]\n    end\n    if <(menu) = [1]> then\n        switch backdrop to (arrière plan1 v)\n        stop [this script v]\n    end\nend\n\n@Sprite1\n\nwhen flag clicked\nforever\n    set [ghost v] effect to (100)\n    go to x: (0) y: (0)\n    show\n    go to [front v] layer\nend\n\n@Sprite2\n\nwhen flag clicked\nhide\n\nwhen I receive [platformer play go v]\nset [x v] to [0]\nset [y v] to [0]\nset rotation style [left-right v]\nswitch costume to (costume1 v)\nset size to (100) %\nshow\ngo to x: (-200) y: (0)\nswitch backdrop to (1 v)\nforever\n    if <key (left arrow v) pressed?> then\n        point in direction (-90)\n        change [x v] by (-1)\n    end\n    if <key (right arrow v) pressed?> then\n        point in direction (90)\n        change [x v] by (1)\n    end\n    set [x v] to ((x) * (0.9))\n    change x by (x)\n    if <touching color (#747474)?> then\n        change y by (1)\n        if <touching color (#747474)?> then\n            change y by (1)\n            if <touching color (#747474)?> then\n                change y by (1)\n                if <touching color (#747474)?> then\n                    change y by (1)\n                    if <touching color (#747474)?> then\n                        change y by (1)\n                    end\n                end\n            end\n        end\n    end\n    if <touching color (#747474)?> then\n        change x by ((x) * (-1))\n        change y by (-5)\n        if <key (up arrow v) pressed?> then\n            if <(x) > [0]> then\n                set [x v] to [-5]\n            else\n                set [x v] to [5]\n            end\n            set [y v] to [10]\n        else\n            set [y v] to [0]\n        end\n    end\n    change [y v] by (-1)\n    change y by (y)\n    if <touching color (#747474)?> then\n        change y by ((y) * (-1))\n        set [y v] to [0]\n    end\n    change y by (-1)\n    if <touching color (#747474)?> then\n        if <key (up arrow v) pressed?> then\n            set [y v] to [15]\n        end\n    end\n    change y by (1)\n    if <(x position) > [236]> then\n        next backdrop\n        go to x: (-200) y: (0)\n        set [x v] to [0]\n        set [y v] to [0]\n    end\n    if <touching color (#000000)?> then\n        start sound [Crunch v]\n        go to x: (-200) y: (0)\n        set [x v] to [0]\n        set [y v] to [0]\n    end\nend\n\nwhen I receive [platformer play go v]\nforever\n    create clone of (_myself_ v)\n    if <(menu) = [1]> then\n        hide\n        stop [other scripts in sprite v]\n        stop [this script v]\n    end\nend\n\nwhen I start as a clone\nswitch costume to (costume2 v)\nshow\nset size to (100) %\nrepeat (10)\n    change size by (-7.5)\nend\ndelete this clone\n\n@Sprite6\n\nwhen I start as a clone\nshow\nforever\n    if <touching (mouse-pointer v)?> then\n        if <mouse down?> then\n            set [menu v] to [2]\n            broadcast (Game play go v)\n            hide\n            delete this clone\n        end\n        change size by (((230) - (size)) / (5))\n        set [brightness v] effect to (15)\n    else\n        change size by (((300) - (size)) / (5))\n        set [brightness v] effect to (0)\n    end\n    if <(menu) = [2]> then\n        delete this clone\n    end\nend\n\ndelete this clone\n\ndefine 1\nset [menu v] to [1]\nset size to (300) %\ngo to x: (-120) y: (100)\nswitch costume to (costume1 v)\ncreate clone of (_myself_ v)\nswitch costume to (costume2 v)\ngo to x: (120) y: (-100)\nshow\nforever\n    if <touching (mouse-pointer v)?> then\n        if <mouse down?> then\n            set [menu v] to [2]\n            broadcast (Platformer play go v)\n            hide\n            stop [this script v]\n        end\n        change size by (((230) - (size)) / (5))\n        set [brightness v] effect to (15)\n    else\n        change size by (((300) - (size)) / (5))\n        set [brightness v] effect to (0)\n    end\n    if <(menu) = [2]> then\n        hide\n        stop [this script v]\n    end\nend\n\nwhen flag clicked\nhide\nbroadcast (Ap.In v)\n\nwhen I receive [ap.in v]\nforever\n    wait until <not <(menu) = [2]>>\n    wait (1) seconds\n    1\nend\n\n@Sprite5\n\nwhen flag clicked\n\ndefine Smooth Glide x: (x) y: (y) speed: (speed)\nrepeat until <<(round (x position)) = (round (x))> and <(round (y position)) = (round (y))>>\n    change x by (((round (x)) - (round (x position))) / (speed))\n    change y by (((round (y)) - (round (y position))) / (speed))\nend\ngo to x: (x) y: (y)\n\nwhen I receive [game play go v]\nhide\npoint in direction (-90)\nforever\n    wait (pick random (0.2) to (5)) seconds\n    create clone of (_myself_ v)\nend\n\nwhen I receive [game play go v]\nhide\nforever\n    if <(menu) = [1]> then\n        stop [other scripts in sprite v]\n        stop [this script v]\n    end\nend\n\nwhen I start as a clone\nshow\ngo to x: (245) y: (pick random (-180) to (180))\nSmooth Glide x: (-240) y: (y position) speed: (6)\ndelete this clone\n\nwhen I start as a clone\nforever\n    if <(menu) = [1]> then\n        delete this clone\n    end\nend\n\n@Sprite4\n\nwhen I receive [game play go v]\nhide\nforever\n    if <(menu) = [1]> then\n        stop [other scripts in sprite v]\n        stop [this script v]\n    end\nend\n\nwhen I start as a clone\nshow\ngo to x: (pick random (-230) to (230)) y: (180)\nSmooth Glide x: (x position) y: (-180) speed: (6)\ndelete this clone\n\ndefine Smooth Glide x: (x) y: (y) speed: (speed)\nrepeat until <<(round (x position)) = (round (x))> and <(round (y position)) = (round (y))>>\n    change x by (((round (x)) - (round (x position))) / (speed))\n    change y by (((round (y)) - (round (y position))) / (speed))\nend\ngo to x: (x) y: (y)\n\nwhen I receive [game play go v]\npoint in direction (180)\nhide\nforever\n    wait (pick random (0.2) to (5)) seconds\n    create clone of (_myself_ v)\nend\n\nwhen I start as a clone\nforever\n    if <(menu) = [1]> then\n        delete this clone\n    end\nend\n\n@Sprite3\n\nwhen I receive [game play go v]\nhide\nforever\n    if <(menu) = [1]> then\n        stop [other scripts in sprite v]\n        stop [this script v]\n    end\nend\n\nwhen I receive [game play go v]\npoint in direction (0)\nhide\nforever\n    wait (pick random (0.2) to (5)) seconds\n    create clone of (_myself_ v)\nend\n\nwhen I start as a clone\nforever\n    if <(menu) = [1]> then\n        delete this clone\n    end\nend\n\ndefine Smooth Glide x: (x) y: (y) speed: (speed)\nrepeat until <<(round (x position)) = (round (x))> and <(round (y position)) = (round (y))>>\n    change x by (((round (x)) - (round (x position))) / (speed))\n    change y by (((round (y)) - (round (y position))) / (speed))\nend\ngo to x: (x) y: (y)\n\nwhen I start as a clone\nshow\ngo to x: (pick random (-230) to (230)) y: (-180)\nSmooth Glide x: (x position) y: (180) speed: (6)\ndelete this clone\n\n@Sprite7\n\nwhen I start as a clone\nshow\ngo to x: (-245) y: (pick random (-180) to (180))\nSmooth Glide x: (240) y: (y position) speed: (6)\ndelete this clone\n\nwhen flag clicked\n\ndefine Smooth Glide x: (x) y: (y) speed: (speed)\nrepeat until <<(round (x position)) = (round (x))> and <(round (y position)) = (round (y))>>\n    change x by (((round (x)) - (round (x position))) / (speed))\n    change y by (((round (y)) - (round (y position))) / (speed))\nend\ngo to x: (x) y: (y)\n\nwhen I receive [game play go v]\nhide\nforever\n    wait (pick random (0.2) to (5)) seconds\n    create clone of (_myself_ v)\nend\n\nwhen I receive [game play go v]\nhide\nforever\n    if <(menu) = [1]> then\n        stop [other scripts in sprite v]\n        stop [this script v]\n    end\nend\n\nwhen I start as a clone\nforever\n    if <(menu) = [1]> then\n        delete this clone\n    end\nend\n\n@Sprite8\n\nwhen flag clicked\nset [menu v] to [1]\nset [death v] to [0]\nhide\n\nbroadcast (Ap.In v)\n\nwhen I start as a clone\nswitch costume to (costume3 v)\nshow\nset size to (100) %\nrepeat (10)\n    change size by (-7.5)\nend\ndelete this clone\n\nwhen I receive [game play go v]\ngo to x: (0) y: (0)\nswitch costume to (costume2 v)\nset size to (100) %\nshow\nset [death v] to [0]\nset [speed v] to [15]\nforever\n    if <(Death) = [0]> then\n        change y by (((mouse y) - (y position)) / (Speed))\n        change x by (((mouse x) - (x position)) / (Speed))\n        point in direction ((90) + ((mouse x) / (Speed)))\n    else\n        if <(Death) = [1]> then\n            hide\n            stop [other scripts in sprite v]\n            wait (1) seconds\n            set [menu v] to [1]\n            stop [this script v]\n        end\n    end\n    if <(menu) = [1]> then\n        hide\n        stop [other scripts in sprite v]\n        stop [this script v]\n    end\nend\n\nwhen I receive [game play go v]\nforever\n    create clone of (_myself_ v)\nend\n\nwhen I receive [game play go v]\nforever\n    if <<<touching (sprite3 v)?> or <touching (sprite5 v)?>> or <<touching (sprite4 v)?> or <touching (sprite7 v)?>>> then\n        set [death v] to [1]\n    end\nend\n\nwait (1) seconds\n\nif  then\nelse\nend\n\n@Sprite9\n\nwhen flag clicked\nhide variable [score v]\nhide\n\nwhen I receive [game play go v]\nset [score v] to [0]\nshow variable [score v]\nforever\n    set [toucher v] to [0]\n    create clone of (_myself_ v)\n    wait until <(Toucher) = [1]>\nend\n\nwhen I start as a clone\ngo to (random position v)\nset [ghost v] effect to (100)\nshow\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\nforever\n    if <touching (sprite8 v)?> then\n        change [toucher v] by (1)\n        change [score v] by (1)\n        delete this clone\n    end\n    if <(menu) = [1]> then\n        delete this clone\n    end\nend\n\nwhen I receive [game play go v]\nforever\n    if <(menu) = [1]> then\n        hide variable [score v]\n        stop [other scripts in sprite v]\n        stop [this script v]\n    end\nend\n\n@Sprite10\n\nwhen I receive [game play go v]\nset [mode? v] to [game]\nif <(mode?) = [game]> then\n    go to x: (0) y: (-140)\nelse\n    go to x: (190) y: (140)\nend\n\nwhen I receive [platformer play go v]\nset [mode? v] to [platformer]\nif <(mode?) = [game]> then\n    go to x: (0) y: (-140)\nelse\n    go to x: (190) y: (140)\nend\n\nwhen flag clicked\nhide\nbroadcast (Ap.In v)\n\nwhen I receive [ap.in v]\nset [mode? v] to [0]\nforever\n    wait until <not <(menu) = [1]>>\n    1\nend\n\ndefine 1\nset size to (25) %\nswitch costume to (costume1 v)\nif <(mode?) = [game]> then\n    go to x: (0) y: (-140)\nelse\n    go to x: (190) y: (140)\nend\nshow\nforever\n    if <touching (mouse-pointer v)?> then\n        if <mouse down?> then\n            stop [other scripts in sprite v]\n            set [menu v] to [1]\n            set [mode? v] to [0]\n            hide\n            stop [this script v]\n        end\n        change size by (((115) - (size)) / (5))\n        set [brightness v] effect to (15)\n    else\n        change size by (((150) - (size)) / (5))\n        set [brightness v] effect to (0)\n    end\n    if <(menu) = [1]> then\n        hide\n        stop [this script v]\n    end\nend\n\ndelete this clone\n\n@Sprite11\n\ndefine Glide to(x (x) ,y (y) ) Speed (speed)\nrepeat until <<(round (x position)) = (x)> and <(round (y position)) = (y)>>\n    change x by (((x) - (x position)) / (speed))\n    change y by (((y) - (y position)) / (speed))\nend\n\nwhen I receive [glide v]\n\nwhen flag clicked\nset [menu v] to [1]\nhide\nforever\n    if <(menu) = [2]> then\n        go to x: (0) y: (-344)\n        hide\n        clear graphic effects\n        wait until <(menu) = [1]>\n        go to [front v] layer\n        show\n        Glide to(x [0] ,y [0] ) Speed [5]\n        wait (0.5) seconds\n        repeat (5)\n            change [ghost v] effect by (20)\n        end\n    end\nend\n\n