Platformer pen 100% v1.6

Instructions: to move the desired arrow keys

@Stage\n\nwhen flag clicked\nforever\n    play sound [Vexento - Tevo \(Original Mix\) \(1\) v] until done\nend\n\n@pen\n\nwhen flag clicked\nbroadcast (start v)\n\ndefine start (scrollx) (scrolly) pen: (x) (y)\nif <(level) = [1]> then\n    pen X: [-192] Y: [-124] scrollX: (scrollx) scrollY: (scrolly)\n    pen X: [192] Y: [-124] scrollX: (scrollx) scrollY: (scrolly)\n    color pen red setup\n    pen X: [170] Y: [-80] scrollX: (scrollx) scrollY: (scrolly)\n    pen X: [148] Y: [-124] scrollX: (scrollx) scrollY: (scrolly)\n    pen down\n    color pen blue setup\n    pen X: [230] Y: [-124] scrollX: (scrollx) scrollY: (scrolly)\n    pen X: [280] Y: [-124] scrollX: (scrollx) scrollY: (scrolly)\n    pen X: [280] Y: [-200] scrollX: (scrollx) scrollY: (scrolly)\n    color pen red setup\n    pen down\n    pen X: [380] Y: [-200] scrollX: (scrollx) scrollY: (scrolly)\n    pen X: [460] Y: [-124] scrollX: (scrollx) scrollY: (scrolly)\n    pen X: [630] Y: [-124] scrollX: (scrollx) scrollY: (scrolly)\n    color pen blue setup\n    pen X: [780] Y: [-124] scrollX: (scrollx) scrollY: (scrolly)\n    color pen violet setup\n    pen size setup size: [10]\n    pen X: [780] Y: [-80] scrollX: (scrollx) scrollY: (scrolly)\n    pen X: [780] Y: [-124] scrollX: (scrollx) scrollY: (scrolly)\nend\nif <(level) = [2]> then\n    pen X: [-192] Y: [-124] scrollX: (scrollx) scrollY: (scrolly)\n    pen X: [192] Y: [-124] scrollX: (scrollx) scrollY: (scrolly)\n    pen X: [192] Y: [0] scrollX: (scrollx) scrollY: (scrolly)\n    pen X: [280] Y: [0] scrollX: (scrollx) scrollY: (scrolly)\n    pen X: [280] Y: [-124] scrollX: (scrollx) scrollY: (scrolly)\n    color pen red setup\n    pen X: [320] Y: [-80] scrollX: (scrollx) scrollY: (scrolly)\n    pen X: [360] Y: [-124] scrollX: (scrollx) scrollY: (scrolly)\n    pen X: [390] Y: [-80] scrollX: (scrollx) scrollY: (scrolly)\n    pen X: [420] Y: [-124] scrollX: (scrollx) scrollY: (scrolly)\n    pen X: [460] Y: [-80] scrollX: (scrollx) scrollY: (scrolly)\n    pen X: [490] Y: [-124] scrollX: (scrollx) scrollY: (scrolly)\n    color pen blue setup\n    pen X: [490] Y: [0] scrollX: (scrollx) scrollY: (scrolly)\n    pen X: [550] Y: [0] scrollX: (scrollx) scrollY: (scrolly)\n    pen X: [550] Y: [-124] scrollX: (scrollx) scrollY: (scrolly)\n    pen up\n    pen X: [680] Y: [0] scrollX: (scrollx) scrollY: (scrolly)\n    pen down\n    pen X: [800] Y: [0] scrollX: (scrollx) scrollY: (scrolly)\n    pen up\n    pen X: [930] Y: [0] scrollX: (scrollx) scrollY: (scrolly)\n    pen down\n    pen X: [1050] Y: [0] scrollX: (scrollx) scrollY: (scrolly)\n    pen up\n    color pen red setup\n    pen X: [1250] Y: [-124] scrollX: (scrollx) scrollY: (scrolly)\n    pen down\n    pen X: [550] Y: [-124] scrollX: (scrollx) scrollY: (scrolly)\n    pen up\n    color pen blue setup\n    pen X: [1150] Y: [0] scrollX: (scrollx) scrollY: (scrolly)\n    pen down\n    pen X: [1250] Y: [0] scrollX: (scrollx) scrollY: (scrolly)\n    pen up\n    color pen violet setup\n    pen size setup size: [10]\n    pen X: [1250] Y: [80] scrollX: (scrollx) scrollY: (scrolly)\n    pen down\n    pen X: [1250] Y: [-124] scrollX: (scrollx) scrollY: (scrolly)\nend\nif <(level) = [3]> then\n    pen X: [-170] Y: [-124] scrollX: (scrollx) scrollY: (scrolly)\n    pen X: [170] Y: [-124] scrollX: (scrollx) scrollY: (scrolly)\n    pen up\n    pen X: [300] Y: [-80] scrollX: (scrollx) scrollY: (scrolly)\n    pen down\n    pen X: [500] Y: [-80] scrollX: (scrollx) scrollY: (scrolly)\n    pen up\n    pen X: [680] Y: [-80] scrollX: (scrollx) scrollY: (scrolly)\n    pen down\n    pen X: [800] Y: [-80] scrollX: (scrollx) scrollY: (scrolly)\n    pen up\n    pen X: [920] Y: [-80] scrollX: (scrollx) scrollY: (scrolly)\n    pen down\n    pen X: [1040] Y: [-80] scrollX: (scrollx) scrollY: (scrolly)\n    pen up\n    pen X: [1150] Y: [-80] scrollX: (scrollx) scrollY: (scrolly)\n    pen down\n    pen X: [1230] Y: [-80] scrollX: (scrollx) scrollY: (scrolly)\n    pen up\n    pen X: [1320] Y: [-80] scrollX: (scrollx) scrollY: (scrolly)\n    pen down\n    pen X: [1420] Y: [-80] scrollX: (scrollx) scrollY: (scrolly)\n    pen up\n    pen X: [1530] Y: [-80] scrollX: (scrollx) scrollY: (scrolly)\n    pen down\n    pen X: [1600] Y: [-80] scrollX: (scrollx) scrollY: (scrolly)\n    pen up\n    pen X: [1700] Y: [-80] scrollX: (scrollx) scrollY: (scrolly)\n    pen down\n    pen X: [1900] Y: [-80] scrollX: (scrollx) scrollY: (scrolly)\n    pen up\n    color pen red setup\n    pen X: [2200] Y: [-124] scrollX: (scrollx) scrollY: (scrolly)\n    pen down\n    pen X: [170] Y: [-124] scrollX: (scrollx) scrollY: (scrolly)\n    pen up\n    color pen violet setup\n    pen size setup size: [10]\n    pen X: [1900] Y: [-80] scrollX: (scrollx) scrollY: (scrolly)\n    pen down\n    pen X: [1900] Y: [0] scrollX: (scrollx) scrollY: (scrolly)\n    pen X: [1900] Y: [-124] scrollX: (scrollx) scrollY: (scrolly)\n    pen up\nend\n\ndefine control\nset [scrollx v] to (scrollX)\nset [scrolly v] to (scrollY)\n\ndefine pen X: (x) Y: (y) scrollX: (scrollx) scrollY: (scrolly)\ngo to x: ((x) - (scrollx)) y: ((y) - (scrolly))\nset [scrolly v] to (scrolly)\n\ndefine init\nset [tick v] to [0]\nset [pfc v] to [?]\nset [level v] to [1]\nset [y v] to [0]\nset [penx v] to [0]\nset [peny v] to [0]\nset [scrollx v] to [0]\nset [scrolly v] to [0]\ndelete all of [x v]\ndelete all of [y v]\ndelete all of [time v]\n\ndefine list\nadd (scrollX) to [x v]\nadd ([y position v] of [player v]) to [y v]\nadd (time stop) to [time v]\n\nwhen I receive [start v]\ninit\nforever\n    clear all\n    pen size setup size: [5]\n    pen down\n    color pen blue setup\n    start (scrollX) (scrollY) pen: (penX) (penY)\n    control\n    list\n    set [ghost v] effect to (100)\nend\n\ndefine color pen red setup\nset pen color to (#ff0000)\n\ndefine pen down\npen down\n\ndefine color pen blue setup\nset pen color to (#0000ff)\n\ndefine pen size setup size: (size)\nset pen size to (size)\n\ndefine clear all\nerase all\n\ndefine color pen violet setup\nset pen color to (#ff00d0)\n\ndefine pen up\npen up\n\nwhen I receive [end v]\nstop [other scripts in sprite v]\nerase all\n\n@player\n\ndefine game\nif <key (up arrow v) pressed?> then\n    if <(i) < [3]> then\n        change [si v] by (6)\n    end\nelse\n    set [jump v] to [0]\nend\n\ndefine y\nchange [si v] by (-1)\nchange [y v] by (si)\nchange [i v] by (1)\nscrolling\nrepeat until <not <touching color (#0000ff)?>>\n    change [y v] by (1)\n    scrolling\n    set [i v] to [0]\n    set [si v] to [0]\nend\nif <<touching (_edge_ v)?> or <touching color (#ff0000)?>> then\n    start\nend\nchange [scrolly v] by (round (((y) - (scrollY)) / (10)))\nif <touching color (#ff00cf)?> then\n    start sound [Win v]\n    change [level v] by (1)\n    start\nend\n\ndefine start\nset [scrollx v] to [0]\nset [scrolly v] to [0]\nset [y v] to [0]\nset [x v] to [0]\nset [si v] to [0]\ngo to x: (0) y: (0)\n\nwhen I receive [start v]\nshow\nstart\nforever\n    game\n    y\n    control [6]\n    set [scrollx v] to (x)\n    if <(scrollX) < [0]> then\n        set [scrollx v] to [0]\n    end\nend\n\ndefine control (scrollx)\nif <key (right arrow v) pressed?> then\n    sand (scrollx)\nend\nif <key (left arrow v) pressed?> then\n    sand ((0) - (scrollx))\nend\n\nwhen I receive [end v]\nstop [other scripts in sprite v]\nhide\n\ndefine scrolling\ngo to x: ((x) - (scrollX)) y: ((y) - (scrollY))\n\ndefine sand (sx)\nchange [x v] by (sx)\nscrolling\nif <touching color (#0000ff)?> then\n    repeat (12)\n        change [y v] by (1)\n        scrolling\n    end\n    if <not <touching color (#0000ff)?>> then\n        stop [this script v]\n    end\n    change [y v] by (-8)\n    repeat until <not <touching color (#0000ff)?>>\n        change [x v] by ((0) - (sx))\n        scrolling\n    end\nend\n\n@black\n\nwhen I receive [start v]\nshow\nswitch costume to (1 v)\ngo to [front v] layer\ngo to x: (0) y: (0)\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\nhide\nswitch costume to (6 v)\nforever\n    if <(level) = [4]> then\n        show\n        broadcast (end v)\n        change [tick v] by (1)\n        set y to ((([sin v] of ((tick) * (5)) ) * (10)) + (50))\n    end\nend\n\n@foto\n\nwhen flag clicked\nforever\n    go to x: (0) y: (0)\n    go to [front v] layer\n    set [ghost v] effect to (100)\n    show\nend\n\n