Road to Nowhere - Platformer
@Stage\n\nwhen flag clicked\nset [lvl v] to [1]\nforever\n    play sound [Sad Piano Music - Isolation \(Original Composition\).mp3 v] until done\nend\n\n@Player\n\nwhen flag clicked\nshow\nwait (0.01) seconds\nset [lvl v] to [1]\ngo to [front v] layer\nswitch costume to (costume1 v)\nforever\n    go to (hitbox v)\n    if <key (right arrow v) pressed?> then\n        switch costume to (costume1 v)\n        go to (hitbox v)\n    end\n    if <key (left arrow v) pressed?> then\n        switch costume to (costume2 v)\n        go to (hitbox v)\n    end\n    if <(lvl) = [17]> then\n        switch costume to (costume3 v)\n        go to (hitbox v)\n        wait (3) seconds\n        repeat (20)\n            move (-1) steps\n        end\n        repeat (140)\n            move (-2) steps\n        end\n        repeat (30)\n            move (-1) steps\n        end\n        wait (1) seconds\n        broadcast (cutscene v)\n        switch costume to (costume2 v)\n        wait (9) seconds\n        repeat (100)\n            move (-0.5) steps\n        end\n        stop [this script v]\n    end\nend\n\nwhen flag clicked\n\nforever\nend\n\nwhen I receive [start credits v]\nrepeat (10)\n    wait (0.1) seconds\n    change [ghost v] effect by (10)\nend\nhide\n\n@Hitbox\n\nwhen flag clicked\nrepeat (2)\n    set [lvl v] to [1]\nend\ngo to x: (-200) y: (-96)\nset [ghost v] effect to (99)\nset [x v] to [0]\nset [y v] to [0]\nforever\n    if <key (right arrow v) pressed?> then\n        change [x v] by (0.7)\n    end\n    if <key (left arrow v) pressed?> then\n        change [x v] by (-0.7)\n    end\n    change x by (x)\n    if <touching (platform v)?> then\n        change x by ((x) * (-1))\n        set [x v] to [0]\n    else\n        set [x v] to ((x) * (0.8))\n    end\n    change y by (y)\n    if <touching (platform v)?> then\n        change y by ((y) * (-1))\n        set [y v] to [0]\n        if <(lock) = [0]> then\n            if <key (up arrow v) pressed?> then\n                set [y v] to [8]\n                set [lock v] to [1]\n            end\n        end\n    else\n        change [y v] by (-1)\n        set [lock v] to [0]\n    end\n    if <<touching (nxt lvl v)?> and <not <(lvl) = [17]>>> then\n        change [lvl v] by (1)\n        go to x: (-200) y: (-96)\n    end\n    if <touching color (#ff0000)?> then\n        go to x: (-200) y: (-96)\n    end\n    if <(lvl) = [17]> then\n        go to x: (200) y: (-105)\n        wait (0.5) seconds\n        stop [this script v]\n    end\nend\n\nset [lvl v] to [17]\n\n@Platform\n\nwhen flag clicked\nforever\n    switch costume to (lvl)\nend\n\nforever\nend\n\nwhen flag clicked\nrepeat (10)\n    set [lvl v] to [1]\nend\n\n@FG\n\nwhen flag clicked\nclear graphic effects\ngo to x: (0) y: (0)\nrepeat (50)\n    go to [front v] layer\nend\n\nwhen I receive [lets end it v]\nset [ghost v] effect to (0)\nrepeat (10)\n    wait (0.1) seconds\n    change [ghost v] effect by (10)\nend\n\nwhen flag clicked\nforever\n    switch costume to (lvl)\nend\n\n@BG\n\nwhen flag clicked\ngo [backward v] (1) layers\n\nwhen flag clicked\nforever\n    switch costume to (lvl)\nend\n\n@Glow\n\nwhen flag clicked\nhide\nrepeat (10)\n    create clone of (_myself_ v)\nend\n\nwhen I start as a clone\nshow\nset [xvel v] to [0]\nset [yvel v] to [0]\ngo to x: (pick random (-200) to (200)) y: (pick random (-100) to (100))\nset size to (pick random (70) to (300)) %\nset [ghost v] effect to (100)\nrepeat (10)\n    go to [front v] layer\n    wait (0.1) seconds\n    change [ghost v] effect by (-1)\nend\nforever\n    go to [front v] layer\n    change [xvel v] by (pick random (-0.1) to (0.1))\n    change x by (xvel)\n    if <(xvel) < [-1]> then\n        change [xvel v] by (1)\n    end\n    if <[1] < (xvel)> then\n        change [xvel v] by (-1)\n    end\n    change [yvel v] by (pick random (-0.05) to (0.05))\n    change y by (yvel)\n    if <(yvel) < [-1]> then\n        change [xvel v] by (1)\n    end\n    if <[1] < (yvel)> then\n        change [xvel v] by (-1)\n    end\n    if <touching (_edge_ v)?> then\n        create clone of (_myself_ v)\n        repeat (10)\n            wait (0.1) seconds\n            change [ghost v] effect by (1)\n        end\n        delete this clone\n    end\nend\n\n@Speech\n\nwhen I receive [cutscene v]\nshow\nswitch costume to (costume1 v)\nwait (3) seconds\nswitch costume to (costume2 v)\nwait (3) seconds\nswitch costume to (costume3 v)\nwait (3) seconds\nhide\n\nwhen flag clicked\nhide\n\n@Nxt Lvl\n\nwhen flag clicked\nwait (0.01) seconds\nshow\nset [ghost v] effect to (99)\nforever\n    if <(lvl) = [17]> then\n        hide\n    end\nend\n\n@Heart\n\nwhen I receive [cutscene v]\nhide\nwait (13) seconds\nshow\nset [ghost v] effect to (100)\nrepeat (20)\n    change [ghost v] effect by (-5)\n    go to [front v] layer\nend\nwait (3) seconds\nbroadcast (lets end it v)\n\nwhen flag clicked\nhide\n\nwhen I receive [start credits v]\nrepeat (10)\n    wait (0.1) seconds\n    change [ghost v] effect by (10)\nend\n\n@Newland BG\n\nwhen I receive [lets end it v]\nshow\nset [ghost v] effect to (100)\nrepeat (10)\n    wait (0.1) seconds\n    change [ghost v] effect by (-10)\nend\nwait (5) seconds\nbroadcast (start credits v)\nrepeat (10)\n    wait (0.1) seconds\n    change [ghost v] effect by (10)\nend\nhide\n\nwhen flag clicked\nhide\nset [lvl v] to [17]\n\n@Girl\n\nwhen flag clicked\nwait (0.01) seconds\ngo to [front v] layer\nhide\nforever\n    if <(lvl) = [17]> then\n        show\n        repeat (100)\n            go to [front v] layer\n        end\n    end\nend\n\nwhen I receive [start credits v]\nrepeat (10)\n    wait (0.1) seconds\n    change [ghost v] effect by (10)\nend\nhide\n\n@Thumb\n\nwhen flag clicked\nforever\n    go to [front v] layer\n    hide\nend\n\nshow\n\n@Sprite1\n\nwhen I receive [start credits v]\nset [time v] to [0]\ngo to x: (0) y: (-30)\nshow\nset [ghost v] effect to (100)\nrepeat (10)\n    wait (0.1) seconds\n    change [ghost v] effect by (-10)\nend\n\nwhen flag clicked\nhide\n\nwhen I receive [start credits v]\ngo to x: (0) y: (-30)\nforever\n    wait (0.02) seconds\n    change y by (1.5)\nend\n\nwhen I receive [start credits v]\nwait (25) seconds\nrepeat (10)\n    wait (0.1) seconds\n    change [ghost v] effect by (10)\nend\nstop [other scripts in sprite v]\n\n@Sprite2\n\nwhen flag clicked\nhide\n\nwhen I receive [start credits v]\ngo to x: (0) y: (0)\nshow\nset [ghost v] effect to (100)\nrepeat (10)\n    wait (0.1) seconds\n    change [ghost v] effect by (-10)\nend\n\n