Eevee platformer

Instructions: Use the arrow keys/w a s and d to move Eevee\nDodge all spikes and Lava. \nI might add some more levels

@Stage\n\n@player\n\ndefine Slow Down\nchange [xv v] by ((Xv) * (-0.08))\n\nwhen I receive [start v]\nforever\n    if <<[240] < (x position)> and <(Dead) = [0]>> then\n        broadcast (NAXT LEVEL v)\n        change [level v] by (1)\n        reset\n    end\nend\n\ndefine reset\nclear graphic effects\npoint in direction (90)\ngo to x: (-220) y: (30)\nswitch costume to (2 v)\nset [dead v] to [0]\nset [xv v] to [0]\nset [yv v] to [0]\nset size to (20) %\nshow\n\ndefine Tick\nset [dead v] to [0]\nset [level v] to [1]\nset size to (20) %\nreset\nforever\n    create clone of (_myself_ v)\n    if <<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<mouse down?> and <(mouse x) > (x position)>>> then\n        switch costume to (2 v)\n        change [xv v] by (1)\n    end\n    if <<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<mouse down?> and <(mouse x) < (x position)>>> then\n        switch costume to (2 v)\n        change [xv v] by (-1)\n    end\n    Slow Down\n    set [xv v] to ((Xv) * (1))\n    change x by (Xv)\n    if <touching (ground v)?> then\n        change y by (2)\n        if <touching (ground v)?> then\n            change y by (2)\n            if <touching (ground v)?> then\n                change y by (2)\n                if <touching (ground v)?> then\n                    change y by (2)\n                    if <touching (ground v)?> then\n                        change y by (2)\n                        if <touching (ground v)?> then\n                            change x by ((Xv) * (-2))\n                            change y by (-5)\n                            if <<key (up arrow v) pressed?> or <<key (w v) pressed?> or <<mouse down?> and <(mouse y) > ((y position) + (10))>>>> then\n                                if <(Xv) > [0]> then\n                                    set [xv v] to [-5]\n                                else\n                                    set [xv v] to [5]\n                                end\n                                set [yv v] to [13]\n                            else\n                                set [xv v] to [0]\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\n    change [yv v] by (-0.8)\n    change y by (Yv)\n    if <touching (ground v)?> then\n        change y by ((Yv) * (-1))\n        set [yv v] to [0]\n    end\n    change y by (-1)\n    if <touching (ground v)?> then\n        if <<key (up arrow v) pressed?> or <<key (w v) pressed?> or <<mouse down?> and <(mouse y) > (y position)>>>> then\n            set [yv v] to [12]\n        end\n    end\n    change y by (1)\n    if <<touching (spike v)?> or <touching (lava v)?>> then\n        Dead\n    end\n    if <(y position) < [-170]> then\n        Dead\n    end\nend\n\ndefine Dead\nset [dead v] to [1]\nrepeat (25)\n    change [ghost v] effect by (4)\nend\nreset\n\nwhen flag clicked\nbroadcast (game v)\nbroadcast (Start v)\nswitch costume to (1 v)\nTick\n\nwhen I start as a clone\nswitch costume to (left v)\nrepeat (10)\n    change [ghost v] effect by (10)\n    change [color v] effect by (20)\n    change size by (-1.5)\nend\ndelete this clone\n\n@ground\n\nwhen flag clicked\nshow\ngo to x: (0) y: (0)\nforever\n    switch costume to (Level)\nend\n\n@snow\n\nwhen flag clicked\nset size to (30) %\nhide\n\nwhen I receive [game v]\nforever\n    wait (.3) seconds\n    create clone of (_myself_ v)\nend\n\nwhen I start as a clone\ngo to [front v] layer\nshow\ngo to x: (230) y: (pick random (-200) to (200))\npoint in direction (pick random (-105) to (-75))\nset [ghost v] effect to (150)\nrepeat (5)\n    change [ghost v] effect by (-15)\nend\nrepeat until <(x position) < [-230]>\n    move (5) steps\nend\nrepeat (5)\n    change [ghost v] effect by (10)\nend\ndelete this clone\n\n@spike\n\nwhen flag clicked\nshow\ngo to x: (0) y: (0)\ngo to [back v] layer\nforever\n    switch costume to (Level)\nend\n\n@Lava\n\nwhen flag clicked\nshow\ngo to x: (0) y: (0)\ngo to [front v] layer\nforever\n    switch costume to (Level)\nend\n\n@Love fave\n\nwhen flag clicked\nset [costume v] to [0]\nhide\nforever\n    if <not <<(LOVED__) = [1]> and <(FAVED___) = [1]>>> then\n        wait (pick random (10) to (20)) 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@Intro2\n\ndefine Clone  ID: (id) Quantity: (quantity)\nset [intro: clone id v] to (id)\nrepeat (quantity)\n    create clone of (_myself_ v)\nend\n\nwhen flag clicked\nstart sound [Night Core v]\nset [colour \(intro\) v] to [0]\nhide\nClone  ID: [Wheel] Quantity: [1]\nrepeat (20)\n    Clone  ID: [Letters] Quantity: [5]\n    wait (0.1) seconds\nend\nwait (0.2) seconds\nrepeat (50)\n    Clone  ID: [Stars] Quantity: [1]\n    wait (0.1) seconds\n    if <(pick random (1) to (20)) = [1]> then\n        Clone  ID: [Circle1] Quantity: [1]\n        Clone  ID: [Circle2] Quantity: [1]\n        Clone  ID: [Circle3] Quantity: [1]\n        Clone  ID: [Circle4] Quantity: [1]\n    end\nend\n\nwhen I start as a clone\nif <(Intro: Clone ID) = [Wheel]> then\n    go to x: (0) y: (0)\n    set size to (20) %\n    switch costume to (backdrop \(5\) v)\n    set [brightness v] effect to (100)\n    show\n    repeat (19)\n        change size by (1)\n        set [brightness v] effect to (100)\n        wait (0.1) seconds\n    end\n    repeat (10)\n        change size by (1)\n        change [brightness v] effect by (-10)\n    end\n    repeat (7)\n        switch costume to (blank v)\n        change size by ((680) / (7))\n        switch costume to (backdrop \(5\) v)\n    end\n    Clone  ID: [Flash Screen] Quantity: [1]\n    Clone  ID: [Name] Quantity: [1]\n    Clone  ID: [Diamond] Quantity: [1]\n    Clone  ID: [Wave] Quantity: [1]\n    Clone  ID: [Grid] Quantity: [1]\n    repeat (230)\n        turn right (3) degrees\n        if <(Colour \(intro\)) > [0]> then\n            set [color v] effect to ((Colour \(intro\)) + (20))\n        else\n            set [color v] effect to (0)\n        end\n    end\n    Clone  ID: [End] Quantity: [1]\n    repeat (20)\n        turn right (3) degrees\n        if <(Colour \(intro\)) > [0]> then\n            set [color v] effect to ((Colour \(intro\)) + (20))\n        else\n            set [color v] effect to (0)\n        end\n    end\n    delete this clone\nend\n\nwhen I start as a clone\nif <(Intro: Clone ID) = [Letters]> then\n    go to x: (0) y: (0)\n    set size to (100) %\n    switch costume to (join [Letters ] (pick random (1) to (6)))\n    point in direction (pick random (-180) to (180))\n    move (300) steps\n    go to [back v] layer\n    show\n    repeat (10)\n        change size by (-7)\n        change x by (((0) - (x position)) / (4))\n        change y by (((0) - (y position)) / (4))\n    end\n    delete this clone\nend\n\nwhen I start as a clone\nif <(Intro: Clone ID) = [Flash Screen]> then\n    go to x: (0) y: (0)\n    set size to (100) %\n    switch costume to (flash screen v)\n    point in direction (90)\n    go to [front v] layer\n    show\n    set [brightness v] effect to (100)\n    repeat (10)\n        change [ghost v] effect by (10)\n    end\n    delete this clone\nend\n\nwhen I start as a clone\nif <(Intro: Clone ID) = [Grid]> then\n    go to x: (0) y: (0)\n    set size to (100) %\n    switch costume to (grid v)\n    point in direction (90)\n    go to [back v] layer\n    go [forward v] (1) layers\n    show\n    wait (0.2) seconds\n    repeat (5)\n        set [color v] effect to (Colour \(intro\))\n        set [hv1 v] to [0]\n        repeat (45)\n            change [hv1 v] by (0.05)\n            set [color v] effect to (Colour \(intro\))\n            point in direction ((([tan v] of ((HV1) * (100)) ) * (-5)) + (90))\n        end\n    end\n    delete this clone\nend\n\nwhen I start as a clone\nif <(Intro: Clone ID) = [Name]> then\n    go to x: (0) y: (0)\n    set size to (100) %\n    switch costume to (invisity v)\n    point in direction (90)\n    go to [front v] layer\n    go [forward v] (1) layers\n    show\n    wait (0.3) seconds\n    set [colour \(intro\) v] to [0]\n    Shake\n    wait (0.3) seconds\n    set [colour \(intro\) v] to [70]\n    Shake\n    wait (0.3) seconds\n    set [colour \(intro\) v] to [100]\n    Shake\n    wait (0.3) seconds\n    set [colour \(intro\) v] to [70]\n    Shake\n    wait (0.3) seconds\n    set [colour \(intro\) v] to [0]\n    Shake\n    wait (0.3) seconds\n    set [colour \(intro\) v] to [100]\n    Shake\n    delete this clone\nend\n\nwhen I start as a clone\nif <(Intro: Clone ID) = [Wave]> then\n    go to x: (0) y: (0)\n    set size to (30) %\n    switch costume to (wave v)\n    point in direction (90)\n    go to [front v] layer\n    go [backward v] (1) layers\n    show\n    set [color v] effect to (Colour \(intro\))\n    repeat (10)\n        change size by (10)\n    end\n    repeat (10)\n        change size by (10)\n        change [ghost v] effect by (10)\n    end\n    delete this clone\nend\n\nwhen I start as a clone\nif <(Intro: Clone ID) = [Diamond]> then\n    go to x: (0) y: (0)\n    set size to (30) %\n    switch costume to (diamond v)\n    point in direction (90)\n    go to [front v] layer\n    go [backward v] (2) layers\n    set [color v] effect to (Colour \(intro\))\n    show\n    repeat (30)\n        switch costume to (blank v)\n        change size by (((700) - (size)) / (10))\n        switch costume to (diamond v)\n    end\n    delete this clone\nend\n\nwhen I start as a clone\nif <(Intro: Clone ID) = [End]> then\n    clear graphic effects\n    go to x: (500) y: (500)\n    switch costume to (blank v)\n    point in direction (135)\n    go to [front v] layer\n    set size to (150) %\n    switch costume to (end v)\n    go [forward v] (2) layers\n    show\n    repeat (50)\n        change x by (((20) - (x position)) / (10))\n        change y by (((20) - (y position)) / (10))\n        go to [front v] layer\n        go [forward v] (2) layers\n    end\n    repeat (20)\n        change x by (((20) - (x position)) / (10))\n        change y by (((20) - (y position)) / (10))\n        go to [front v] layer\n        go [forward v] (2) layers\n        change [ghost v] effect by (5)\n    end\n    delete this clone\nend\n\ndefine Shake\nset size to (150) %\nEffect [1]\nClone  ID: [Diamond] Quantity: [1]\nClone  ID: [Wave] Quantity: [1]\nClone  ID: [Flash Screen] Quantity: [1]\nset [color v] effect to (Colour \(intro\))\ngo to x: (0) y: (0)\nrepeat (30)\n    go to [front v] layer\n    go [forward v] (2) layers\n    change size by (((100) - (size)) / (10))\n    go to x: (([sin v] of ((timer) * (1000)) ) * (((size) - (100)) * (0.1))) y: (([sin v] of ((timer) * (1000)) ) * (((size) - (100)) * (0.1)))\nend\n\nwhen I start as a clone\nif <(Intro: Clone ID) = [Stars]> then\n    set size to (100) %\n    switch costume to (star v)\n    set [brightness v] effect to (100)\n    go to (random position v)\n    point in direction (90)\n    show\n    repeat (10)\n        go to [front v] layer\n        go [forward v] (3) layers\n        change [ghost v] effect by (10)\n    end\n    delete this clone\nend\n\nwhen I start as a clone\nif < (Intro: Clone ID) contains [Circle]?> then\n    if < (Intro: Clone ID) contains [1]?> then\n        go to x: (200) y: (140)\n    else\n        if < (Intro: Clone ID) contains [2]?> then\n            go to x: (-200) y: (140)\n        else\n            if < (Intro: Clone ID) contains [3]?> then\n                go to x: (-200) y: (-140)\n            else\n                if < (Intro: Clone ID) contains [4]?> then\n                    go to x: (200) y: (-140)\n                else\n                    delete this clone\n                end\n            end\n        end\n    end\n    set size to (300) %\n    switch costume to (bubble v)\n    set [brightness v] effect to (100)\n    point in direction (90)\n    show\n    repeat (10)\n        go to [front v] layer\n        go [forward v] (3) layers\n        change [ghost v] effect by (10)\n    end\n    delete this clone\nend\n\ndefine Effect (mode)\nif <(mode) = [1]> then\n    repeat (7)\n        turn right ((360) / (7)) degrees\n        Clone  ID: [Line] Quantity: [1]\n    end\nend\n\nwhen I start as a clone\nif <(Intro: Clone ID) = [Line]> then\n    show\n    go to x: (0) y: (0)\n    move (50) steps\n    clear graphic effects\n    go to [front v] layer\n    switch costume to (line effect 1 v)\n    set size to (300) %\n    set [color v] effect to (Colour \(intro\))\n    repeat (8)\n        move (30) steps\n        next costume\n    end\n    delete this clone\nend\n\nwhen flag clicked\nwait (13.5) seconds\nbroadcast (INTRO ENDED v)\n\n