Elements || A || Platformer

Instructions: ||| WELCOME TO ELEMENTS || A PLATFORMER |||\n||| Mobile Friendly!! |||\n(all levels 100% possible)\n\nWelcome to my first platformer!! I would really appreciate a love and fav.\n25 loves and favs for part 2!!\n\nFULLSCREEN RECOMMENDED\n\n-------------------------Instructions---------------------------\n- Arrow keys, WASD to move\n- Dodge all spikes\n- Jump on trampolines\n- Beat all levels

@Stage\n\nwhen flag clicked\nswitch backdrop to (backdrop4 v)\n\nwhen flag clicked\nwait (7) seconds\nforever\n    set volume to (50) %\n    play sound [bensound-inspire v] until done\nend\n\nwhen flag clicked\nwait (6) seconds\nswitch backdrop to (backdrop1 v)\nforever\n    if <(level) > [6]> then\n        switch backdrop to (backdrop3 v)\n    end\n    if <(level) > [12]> then\n        switch backdrop to (backdrop2 v)\n    end\nend\n\n@player\n\nwhen [r v] key pressed\nbroadcast (RESTART v)\n\nwhen flag clicked\nforever\n    if <[-180] > (y position)> then\n        broadcast (RESTART v)\n    end\nend\n\nwhen flag clicked\nhide\nwait (6) seconds\ngo to x: (-3) y: (280)\nwait (2) seconds\nshow\nglide (0.3) secs to x: (-4) y: (30)\n\nwhen flag clicked\nwait (6) seconds\nset [level v] to [1]\nbroadcast (LEVEL + v)\nforever\n    if <<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<mouse down?> and <(x position) > (mouse x)>>> then\n        change [x v] by (-1)\n    end\n    if <<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<mouse down?> and <(mouse x) > (x position)>>> then\n        change [x v] by (1)\n    end\n    set [x v] to ((X) * (0.90))\n    change x by (X)\n    if <touching (level v)?> then\n        change y by (1)\n    end\n    if <touching (level v)?> then\n        change y by (1)\n    end\n    if <touching (level v)?> then\n        change y by (1)\n    end\n    if <touching (level v)?> then\n        change y by (1)\n    end\n    if <touching (level v)?> then\n        change y by (-4)\n        change x by ((X) * (-1))\n        if <<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<mouse down?> and <(mouse y) > (y position)>>> then\n            if <(X) > [0]> then\n                set [x v] to [-10]\n            else\n                set [x v] to [10]\n            end\n            set [y v] to [15]\n        else\n            set [x v] to [0]\n        end\n    end\n    change [y v] by (-1)\n    change y by (Y)\n    if <touching (level v)?> then\n        change y by ((Y) - ((Y) * (2)))\n        set [y v] to [0]\n    end\n    change y by (-1)\n    if <<touching (level v)?> and <<key (up arrow v) pressed?> or <<key (w v) pressed?> or <<mouse down?> and <(mouse y) > (y position)>>>>> then\n        set [y v] to [15]\n    end\n    change y by (1)\n    create clone of (_myself_ v)\n    if <(x position) > [450]> then\n        change [level v] by (1)\n        broadcast (LEVEL + v) and wait\n    end\n    if <touching (spikes v)?> then\n        broadcast (RESTART v)\n    end\n    if <touching (dynamic obstacles v)?> then\n        broadcast (RESTART v)\n    end\n    if <touching (trampoline v)?> then\n        set [y v] to [19]\n    end\nend\n\nwhen I receive [level + v]\nbroadcast (RESTART v)\n\nwhen I receive [restart v]\nset [x v] to [0]\nset [y v] to [0]\ngo to x: (0) y: (29)\n\nwhen flag clicked\nswitch costume to (costume1 v)\nforever\n    repeat (1)\n        create clone of (_myself_ v)\n    end\nend\n\nwhen I start as a clone\nswitch costume to (costume2 v)\nclear graphic effects\nrepeat (10)\n    change [ghost v] effect by (10)\n    change [color v] effect by (5)\nend\ndelete this clone\n\n@level\n\nwhen flag clicked\nhide\nwait (6) seconds\nshow\nforever\n    switch costume to (level)\nend\n\n@spikes\n\nwhen flag clicked\nforever\n    switch costume to (level)\nend\n\nwhen flag clicked\nshow\n\n@dynamic obstacles\n\nwhen flag clicked\nforever\n    if <(level) = [6]> then\n        show\n        switch costume to (costume1 v)\n        go to x: (36) y: (28)\n        repeat until <(level) = [7]>\n            glide (0.4) secs to x: (-92) y: (-14)\n            wait (0.6) seconds\n            glide (0.4) secs to x: (36) y: (28)\n        end\n    else\n        if <(level) = [8]> then\n            go to [back v] layer\n            show\n            switch costume to (costume2 v)\n            go to x: (-63) y: (-46)\n            repeat until <(level) = [9]>\n                glide (0.2) secs to x: (-63) y: (44)\n                wait (0.4) seconds\n                glide (0.4) secs to x: (-63) y: (-46)\n                wait (0.3) seconds\n            end\n        else\n            if <(level) = [12]> then\n                go to [back v] layer\n                show\n                switch costume to (costume3 v)\n                go to x: (-57) y: (-138)\n                repeat until <(level) = [13]>\n                    glide (0.5) secs to x: (-57) y: (36)\n                    wait (0.5) seconds\n                    glide (0.6) secs to x: (-57) y: (-138)\n                end\n            else\n                hide\n                go to x: (-321) y: (235)\n            end\n        end\n    end\nend\n\n@clouds\n\nwhen flag clicked\nwait (6) seconds\nset [ghost v] effect to (0)\nforever\n    hide\n    create clone of (_myself_ v)\n    wait (pick random (1) to (4)) seconds\nend\n\nwhen I receive [reset v]\ndelete this clone\n\nwhen I start as a clone\nshow\nswitch costume to (pick random (1) to (5))\nif <(pick random (2) to (2)) = [2]> then\n    set [position v] to [-250]\nelse\n    set [position v] to [250]\nend\ngo to x: (position) y: (pick random (-130) to (170))\nset [ghost v] effect to (pick random (30) to (67))\nrepeat until <(x position) > [267]>\n    change x by (pick random (1) to (3))\n    go to [back v] layer\n    go to [back v] layer\n    go [backward v] (999) layers\nend\ndelete this clone\n\n@trampoline\n\ndefine clone (x) (y)\ngo to x: (x) y: (y)\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\nforever\n    show\n    go to [front v] layer\n    if <(level) = [1]> then\n        delete this clone\n    end\n    if <(level) = [2]> then\n        delete this clone\n    end\n    if <(level) = [3]> then\n        delete this clone\n    end\n    if <(level) = [4]> then\n        delete this clone\n    end\n    if <(level) = [6]> then\n        delete this clone\n    end\n    if <(level) = [7]> then\n        delete this clone\n    end\n    if <(level) = [8]> then\n        delete this clone\n    end\n    if <(level) = [9]> then\n        delete this clone\n    end\n    if <(level) = [11]> then\n        delete this clone\n    end\n    if <(level) = [12]> then\n        delete this clone\n    end\n    if <(level) = [13]> then\n        delete this clone\n    end\n    if <(level) = [14]> then\n        delete this clone\n    end\n    if <(level) = [15]> then\n        delete this clone\n    end\n    if <(level) = [16]> then\n        delete this clone\n    end\n    if <(level) = [17]> then\n        delete this clone\n    end\n    if <(level) = [18]> then\n        delete this clone\n    end\n    if <(level) = [19]> then\n        delete this clone\n    end\nend\n\nwhen flag clicked\nhide\nforever\n    if <(level) = [5]> then\n        clone [-27] [-71]\n    end\n    if <(level) = [10]> then\n        clone [130] [-65]\n    end\nend\n\n@thumbnail\n\nwhen flag clicked\ngo to [back v] layer\nshow\nhide\n\n@text\n\nwhen flag clicked\nforever\n    switch costume to (level)\nend\n\nwhen flag clicked\nhide\nwait (6) seconds\nforever\n    show\nend\n\n@Love fave\n\nwhen flag clicked\nset [costume v] to [0]\nhide\nforever\n    if <not <<(Love) = [1]> and <(Favorite) = [1]>>> then\n        wait (pick random (30) to (40)) seconds\n        switch costume to (costume1 v)\n        go to x: (0) y: (50)\n        show\n        go to [front v] layer\n        start sound [pop v]\n        repeat (9)\n            change y by (-6)\n        end\n        repeat (5)\n            change y by (3)\n        end\n        repeat (5)\n            change y by (-1)\n        end\n        wait (2) seconds\n        repeat (15)\n            change y by (7)\n        end\n        hide\n    end\n    if <(Costume) > [0]> then\n        hide\n        stop [this script v]\n    end\nend\n\n@Sprite1\n\nwhen I receive [close v]\nwait (0.2) seconds\nshow\nset [ghost v] effect to (0)\nset [brightness v] effect to (0)\nswitch costume to (backdrop3 v)\ngo to [front v] layer\ngo to x: (480) y: (0)\nswitch costume to (backdrop2 v)\nstart sound [Slice v]\nrepeat (25)\n    switch costume to (backdrop4 v)\n    set size to (100) %\n    switch costume to (backdrop3 v)\n    change x by (((-350) - (x position)) / (12))\n    go to [front v] layer\n    switch costume to (backdrop2 v)\nend\nwait (0.5) seconds\nhide\ngo [backward v] (1000) layers\ngo to [back v] layer\n\nwhen flag clicked\nhide\ngo to [back v] layer\n\n@intro prt 1\n\nwhen flag clicked\nstart sound [va1ue - Join The Rhythm v]\nreset timer\nchange [color v] effect by ((30) * ((join [4] (round ((1) * ((48329) - (48328))))) / (4)))\ngo to x: (-9) y: (40)\nset [velocit v] to [0]\nswitch costume to (costume3 v)\nset size to (10) %\nhide\nrepeat (3)\n    create clone of (_myself_ v)\n    next costume\n    change [color v] effect by (45)\n    wait (0.1) seconds\nend\n\nwhen I start as a clone\nshow\nrepeat (70)\n    set [velocit v] to ((((60) - (size)) * (0.1)) + ((velocit) * (0.8)))\n    change size by (velocit)\nend\nwait (0.5) seconds\nrepeat (32)\n    change x by (((10) + (x position)) * (0.2))\nend\nbroadcast (close v)\ndelete this clone\n\n