Pen Platformer
@Stage\n\nwhen I receive [next level v]\nnext backdrop\n\nwhen flag clicked\nswitch backdrop to (backdrop1 v)\nerase all\nhide variable [boss hp v]\n\nwhen flag clicked\nforever\n    play sound [Jacques Melissa - Tarnished imagination v] until done\nend\n\nplay sound [Halloween Music v] until done\n\n@Blank\n\n@Sprite2\n\nwhen flag clicked\nswitch costume to (costume1 v)\nhide\n\nwhen I receive [erase v]\ngo to x: (-206) y: (-110)\n\nwhen I receive [hide for a moment v]\nhide\nwait (1) seconds\ngo to x: (-206) y: (-110)\nshow\n\nwhen flag clicked\nforever\n    if <touching color (#00d3ff)?> then\n        broadcast (Attack on Boss v)\n        stop [this script v]\n    end\nend\n\nwhen [up arrow v] key pressed\nforever\n    if <touching color (#00d3ff)?> then\n        broadcast (Attack on Boss v)\n        stop [this script v]\n    end\nend\n\nwhen I receive [activate mobile v]\nswitch costume to (costume1 v)\ngo to x: (-206) y: (-110)\nforever\n    hide\nend\n\nwhen I receive [activate computer v]\nswitch costume to (costume1 v)\ngo to x: (-206) y: (-110)\nshow\n\nwhen I receive [costumes v]\nnext costume\nnext costume\n\nwhen I receive [activate computer v]\nset [xvel v] to [0]\nset [yvel v] to [0]\nset size to (35) %\nclear graphic effects\ngo to x: (-206) y: (-110)\nset [dead? v] to [0]\nforever\n    go to [front v] layer\n    set [x pos v] to (x position)\n    set [ypos v] to (y position)\n    change [yvel v] by (-0.7)\n    if <<(y position) < [-160]> or <<touching color (#ff0000)?> or <touching (lava v)?>>> then\n        next costume\n        set [dead? v] to [1]\n        set [xvel v] to [0]\n        set [yvel v] to [0]\n        broadcast (burst v)\n        wait (0.5) seconds\n        clear graphic effects\n        point in direction (90)\n        go to x: (-206) y: (-110)\n        set [x pos v] to (x position)\n        set [ypos v] to (y position)\n        set [dead? v] to [0]\n        switch costume to ((costume [number v]) - (1))\n        broadcast (Alive again v)\n    end\n    if <key (right arrow v) pressed?> then\n        change [xvel v] by (0.8)\n    end\n    if <key (left arrow v) pressed?> then\n        change [xvel v] by (-0.8)\n    end\n    change x by (Xvel)\n    if <<touching color (#000000)?> or <touching color (#9f05cb)?>> then\n        change y by (2)\n        if <<touching color (#000000)?> or <touching color (#9f05cb)?>> then\n            change y by (2)\n            if <<touching color (#000000)?> or <touching color (#9f05cb)?>> then\n                change y by (2)\n                if <<touching color (#000000)?> or <touching color (#9f05cb)?>> then\n                    change y by (1)\n                end\n                if <<touching color (#000000)?> or <touching color (#9f05cb)?>> then\n                    change y by (1)\n                    if <<touching color (#000000)?> or <touching color (#9f05cb)?>> then\n                        change x by ((Xvel) * (-1))\n                        change y by (-5)\n                        if <key (up arrow v) pressed?> then\n                            if <(Xvel) > [0]> then\n                                set [xvel v] to [-8]\n                            else\n                                set [xvel v] to [8]\n                            end\n                            set [yvel v] to [10]\n                        else\n                            set [xvel v] to [0]\n                        end\n                    end\n                end\n            end\n        end\n    end\n    change y by (Yvel)\n    if <<touching color (#000000)?> or <touching color (#9f05cb)?>> then\n        change y by ((Yvel) * (-1))\n        set [yvel v] to [0]\n    end\n    change y by (-1)\n    if <<touching color (#000000)?> or <touching color (#9f05cb)?>> then\n        if <key (up arrow v) pressed?> then\n            set [yvel v] to [10]\n        end\n    end\n    change y by (1)\n    set [xvel v] to ((Xvel) * (0.9))\n    if <(x position) > [234]> then\n        broadcast (next level v)\n        change [level v] by (1)\n        go to x: (-206) y: (-110)\n    end\nend\n\nwhen I receive [credits v]\nhide\nwait (30) seconds\nshow\n\n@Pen2\n\nwhen flag clicked\nset [ink limit v] to [200]\ngo to [back v] layer\npen up\nset pen size to (10)\nset pen color to (#000000)\nshow\n\nwhen I receive [next level v]\nhide variable [ink limit v]\nset [ink limit v] to [200]\nerase all\nwait (1) seconds\nshow variable [ink limit v]\nrepeat (3)\n    set [ink limit v] to [200]\nend\n\nwhen I receive [activate mobile v]\nrepeat (5)\n    erase all\nend\nhide\nstop [other scripts in sprite v]\n\nwhen I receive [activate computer v]\nshow\nrepeat (5)\n    erase all\nend\n\nwhen I receive [change looks v]\nnext costume\n\nwhen I receive [go start v]\ngo to (mouse-pointer v)\n\nwhen I receive [activate computer v]\nshow variable [ink limit v]\nrepeat (3)\n    set [ink limit v] to [200]\nend\n\nwhen I receive [activate mobile v]\nshow variable [ink limit v]\nrepeat (3)\n    set [ink limit v] to [200]\nend\n\nwhen flag clicked\nhide variable [ink limit v]\n\nwhen I receive [erase v]\nforever\n    if <(Ink Limit) < [0]> then\n        pen up\n        broadcast (STOP PLZ v)\n        stop [other scripts in sprite v]\n        stop [this script v]\n    end\nend\n\nwhen I receive [next level v]\nforever\n    if <(Ink Limit) < [0]> then\n        pen up\n        broadcast (STOP PLZ v)\n        stop [other scripts in sprite v]\n        stop [this script v]\n    end\nend\n\nwhen I receive [erase v]\npen up\n\nwhen I receive [next level v]\npen up\n\nwhen I receive [erase v]\nrepeat (3)\n    set [ink limit v] to [200]\nend\nerase all\n\nwhen I receive [activate cpen v]\nforever\n    if <mouse down?> then\n        pen down\n    else\n        pen up\n    end\nend\n\nwhen I receive [activate cpen v]\nforever\n    if <mouse down?> then\n        change [ink limit v] by (-1)\n    end\nend\n\nwhen I receive [activate cpen v]\nforever\n    if <(Ink Limit) < [0]> then\n        pen up\n        broadcast (STOP PLZ v)\n        stop [other scripts in sprite v]\n        stop [this script v]\n    end\nend\n\nwhen I receive [pen limit mobile v]\nforever\n    if <(Ink Limit) < [0]> then\n        pen up\n        broadcast (STOP PLZ v)\n        stop [other scripts in sprite v]\n        stop [this script v]\n    end\nend\n\nwhen I receive [activate mobile v]\nforever\n    hide\n    pen up\n    stop [other scripts in sprite v]\nend\n\n@Button1\n\nwhen flag clicked\ngo to [front v] layer\nhide\nforever\n    if <touching (mouse-pointer v)?> then\n        set [brightness v] effect to (25)\n    else\n        set [brightness v] effect to (0)\n    end\nend\n\nwhen this sprite clicked\nset [ink limit v] to [150]\nbroadcast (Erase v)\nerase all\n\nwhen I receive [activate computer v]\nshow\n\nwhen I receive [activate mobile v]\nshow\n\n@Sprite3\n\nwhen flag clicked\ngo to x: (-45) y: (100)\ngo to [back v] layer\nhide\nforever\n    repeat (33)\n        change y by (-5)\n    end\n    repeat (33)\n        change y by (5)\n    end\nend\n\nwhen backdrop switches to [backdrop11 v]\nshow\n\nwhen backdrop switches to [backdrop12 v]\nhide\n\n@Sprite4\n\nwhen flag clicked\ngo to x: (118) y: (100)\ngo to [back v] layer\nhide\nwait (2) seconds\nforever\n    repeat (33)\n        change y by (-5)\n    end\n    repeat (33)\n        change y by (5)\n    end\nend\n\nwhen backdrop switches to [backdrop11 v]\nshow\n\nwhen backdrop switches to [backdrop12 v]\nhide\n\n@Sprite5\n\nwhen backdrop switches to [backdrop14 v]\nhide\n\nwhen backdrop switches to [backdrop13 v]\nshow\n\nwhen flag clicked\ngo to [back v] layer\nhide\nforever\n    turn right (2) degrees\nend\n\n@Sprite6\n\nwhen flag clicked\nhide\nforever\n    if <<touching (sprite24 v)?> or <touching (sprite2 v)?>> then\n        switch costume to (costume2 v)\n        wait (0.2) seconds\n        switch costume to (costume3 v)\n        wait (0.2) seconds\n        switch costume to (costume2 v)\n        wait (0.2) seconds\n        switch costume to (costume1 v)\n        broadcast (Move up v)\n    end\nend\n\nwhen backdrop switches to [backdrop14 v]\nshow\n\nwhen backdrop switches to [backdrop15 v]\nhide\n\n@Sprite7\n\nwhen flag clicked\nhide\nforever\n    if <<touching (sprite24 v)?> or <touching (sprite2 v)?>> then\n        switch costume to (costume2 v)\n        wait (0.2) seconds\n        switch costume to (costume3 v)\n        wait (0.2) seconds\n        switch costume to (costume2 v)\n        wait (0.2) seconds\n        switch costume to (costume1 v)\n        broadcast (Worse v)\n    end\nend\n\nwhen backdrop switches to [backdrop14 v]\nwait (0.2) seconds\nshow\n\nwhen backdrop switches to [backdrop15 v]\nhide\n\nwhen flag clicked\nhide\nforever\n    if <touching (sprite8 v)?> then\n        hide\n        wait (2) seconds\n        show\n    end\nend\n\n@Sprite8\n\nwhen flag clicked\nset [ghost v] effect to (0)\nswitch costume to (costume1 v)\ngo to [front v] layer\nhide\n\nwhen backdrop switches to [backdrop14 v]\nshow\n\nwhen backdrop switches to [backdrop15 v]\nhide\n\nwhen I receive [worse v]\nrepeat (4)\n    next costume\n    wait (0.1) seconds\nend\nrepeat (65)\n    move (-5) steps\nend\nhide\ngo to x: (28) y: (33)\nswitch costume to (costume1 v)\nwait (0.3) seconds\nshow\n\nwhen I receive [move up v]\nrepeat (100)\n    change y by (5)\nend\nhide\ngo to x: (28) y: (33)\nchange [ghost v] effect by (100)\n\nswitch backdrop to (backdrop13 v)\n\n@Boss\n\nwhen flag clicked\nset [xvel v] to [0]\nset [yvel v] to [0]\nset size to (75) %\nclear graphic effects\ngo to x: (7) y: (60)\nset [dead? v] to [0]\nforever\n    go to [front v] layer\n    set [x pos v] to (x position)\n    set [ypos v] to (y position)\n    change [yvel v] by (-0.7)\n    change x by (Xvel)\n    if <touching color (#000000)?> then\n        change y by (2)\n        if <touching color (#000000)?> then\n            change y by (2)\n            if <touching color (#000000)?> then\n                change y by (2)\n                if <touching color (#000000)?> then\n                    change y by (1)\n                end\n                if <touching color (#000000)?> then\n                    change y by (1)\n                    if <touching color (#000000)?> then\n                        change x by ((Xvel) * (-1))\n                        change y by (-5)\n                    end\n                end\n            end\n        end\n    end\n    change y by (Yvel)\n    if <touching color (#000000)?> then\n        change y by ((Yvel) * (-1))\n        set [yvel v] to [0]\n    end\nend\n\nchange y by (-1)\n\nif <touching color (#000000)?> then\n    if <key (up arrow v) pressed?> then\n        set [yvel v] to [10]\n    end\nend\nchange y by (1)\nset [xvel v] to ((Xvel) * (0.9))\nif <(x position) > [234]> then\n    broadcast (next level v)\n    change [level v] by (1)\n    go to x: (7) y: (33)\nend\n\nif <key (up arrow v) pressed?> then\n    if <(Xvel) > [0]> then\n        set [xvel v] to [-8]\n    else\n        set [xvel v] to [8]\n    end\n    set [yvel v] to [10]\nelse\n    set [xvel v] to [0]\nend\n\nwhen flag clicked\npoint in direction (90)\nswitch costume to (attack v)\nhide\n\nwhen backdrop switches to [backdrop15 v]\nwait (1) seconds\nshow\n\nwhen backdrop switches to [backdrop16 v]\nhide\n\nwhen backdrop switches to [backdrop15 v]\nswitch costume to (attack v)\n\nwhen flag clicked\nhide variable [boss hp v]\nset [boss hp v] to [3]\n\nwhen backdrop switches to [backdrop16 v]\nhide variable [boss hp v]\nset [boss hp v] to [3]\n\nwhen backdrop switches to [backdrop15 v]\nwait (1) seconds\nshow variable [boss hp v]\nset [boss hp v] to [3]\n\nwhen I receive [attack on boss v]\nrepeat (20)\n    switch costume to (hit v)\nend\n\nwhen I receive [attack on boss v]\nstart sound [punch v]\nchange [boss hp v] by (-1)\n\nwhen flag clicked\nforever\n    if <(Boss HP) = [0]> then\n        switch costume to (dead v)\n        forever\n            turn right (10) degrees\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Boss HP) = [0]> then\n        repeat (30)\n            change y by (-10)\n        end\n        hide\n    end\nend\n\nchange [boss hp v] by (-1)\n\nwhen backdrop switches to [backdrop15 v]\nwait (1) seconds\nforever\n    repeat (40)\n        change x by (4)\n    end\n    repeat (10)\n        change y by (5)\n    end\n    wait (1) seconds\n    glide (1) secs to x: (7) y: (60)\n    repeat (40)\n        change x by (-4)\n    end\n    repeat (10)\n        change y by (5)\n    end\n    wait (1) seconds\n    glide (1) secs to x: (7) y: (60)\n    wait (1) seconds\n    switch costume to (ready v)\n    wait (5) seconds\n    switch costume to (warning v)\n    wait (1) seconds\n    switch costume to (attack v)\nend\n\nwhen flag clicked\nforever\n    if <(Boss HP) = [0]> then\n        wait (4) seconds\n        stop [other scripts in sprite v]\n    end\nend\n\n@Sprite11\n\nwhen backdrop switches to [backdrop7 v]\nshow\n\nwhen backdrop switches to [backdrop8 v]\nhide\n\nwhen flag clicked\nforever\n    point towards (sprite2 v)\nend\n\nwhen flag clicked\nhide\n\n@Sprite12\n\nwhen backdrop switches to [backdrop7 v]\nshow\n\nwhen backdrop switches to [backdrop8 v]\nhide\n\nwhen flag clicked\nforever\n    point towards (sprite2 v)\nend\n\nwhen flag clicked\nhide\n\n@Sprite13\n\nwhen backdrop switches to [backdrop7 v]\nshow\n\nwhen backdrop switches to [backdrop8 v]\nhide\n\nwhen flag clicked\nforever\n    point towards (sprite2 v)\nend\n\nwhen flag clicked\nhide\n\n@Sprite14\n\nwhen backdrop switches to [backdrop7 v]\nshow\n\nwhen backdrop switches to [backdrop8 v]\nhide\n\nwhen flag clicked\nforever\n    point towards (sprite2 v)\nend\n\nwhen flag clicked\nhide\n\n@Sprite15\n\nwhen backdrop switches to [backdrop7 v]\nshow\n\nwhen backdrop switches to [backdrop8 v]\nhide\n\nwhen flag clicked\nforever\n    point towards (sprite2 v)\nend\n\nwhen flag clicked\nhide\n\n@Sprite16\n\nwhen backdrop switches to [backdrop7 v]\nshow\n\nwhen backdrop switches to [backdrop8 v]\nhide\n\nwhen flag clicked\nforever\n    point towards (sprite2 v)\nend\n\nwhen flag clicked\nhide\n\n@Sprite9\n\nwhen flag clicked\nhide\nwait (0.5) seconds\ngo to [front v] layer\n\nwhen I receive [next level v]\nbroadcast (Hide For a Moment v)\ngo to [front v] layer\nswitch costume to (pick random (1) to (5))\nshow\nwait (1) seconds\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nset [ghost v] effect to (0)\nhide\n\n@WALLS\n\nwhen flag clicked\nhide\n\nwhen backdrop switches to [backdrop15 v]\ngo to x: (6) y: (-342)\nhide\nwait (1.5) seconds\nshow\nrepeat (35)\n    change y by (10)\nend\n\nwhen backdrop switches to [backdrop15 v]\nforever\n    if <(Boss HP) = [0]> then\n        wait (1.5) seconds\n        repeat (35)\n            change y by (-10)\n        end\n        hide\n    end\nend\n\nwhen backdrop switches to [backdrop16 v]\nrepeat (10)\n    hide\nend\n\nwhen backdrop switches to [backdrop21 v]\nforever\n    if <(Boss HP) = [0]> then\n        wait (1.5) seconds\n        repeat (35)\n            change y by (-10)\n        end\n        hide\n    end\nend\n\nwhen backdrop switches to [backdrop21 v]\ngo to x: (6) y: (-342)\nhide\nwait (1.5) seconds\nshow\nrepeat (35)\n    change y by (10)\nend\n\nwhen backdrop switches to [backdrop22 v]\nrepeat (10)\n    hide\nend\n\n@MOBILE \n\nwhen flag clicked\nshow\nwait (0) seconds\ngo to [front v] layer\nforever\n    if <touching (mouse-pointer v)?> then\n        set [brightness v] effect to (25)\n    else\n        set [brightness v] effect to (0)\n    end\nend\n\nwhen this sprite clicked\nbroadcast (Activate Mobile v)\nhide\nrepeat (3)\n    erase all\nend\n\nwhen I receive [activate computer v]\nhide\n\nwhen this sprite clicked\nforever\n    broadcast (Pen Limit mobile v)\nend\n\n@MOBILE OR COMPUTOR2\n\nwhen flag clicked\ngo to [front v] layer\nset [ghost v] effect to (0)\nshow\n\nwhen I receive [activate computer v]\nrepeat (8)\n    change [ghost v] effect by (15)\nend\n\nwhen I receive [activate mobile v]\nrepeat (8)\n    change [ghost v] effect by (15)\nend\n\n@cOMPUTOR\n\nwhen this sprite clicked\nbroadcast (Activate Computer v)\nhide\nrepeat (3)\n    erase all\nend\n\nwhen flag clicked\nshow\nwait (0) seconds\ngo to [front v] layer\nforever\n    if <touching (mouse-pointer v)?> then\n        set [brightness v] effect to (25)\n    else\n        set [brightness v] effect to (0)\n    end\nend\n\nwhen I receive [activate mobile v]\nhide\n\nwhen this sprite clicked\nforever\n    broadcast (Activate CPEN v)\nend\n\nwhen I receive [stop plz v]\nstop [other scripts in sprite v]\n\nwhen I receive [alive again v]\nforever\n    broadcast (Activate CPEN v)\nend\n\nwhen I receive [next level v]\nbroadcast (Activate CPEN v)\n\nwhen I receive [erase v]\nbroadcast (Activate CPEN v)\n\n@Sprite21\n\nwhen flag clicked\nhide\nforever\n    if <touching (mouse-pointer v)?> then\n        set [brightness v] effect to (25)\n    else\n        set [brightness v] effect to (0)\n    end\nend\n\nwhen I receive [activate computer v]\nshow\n\nwhen I receive [activate mobile v]\nshow\n\nwhen this sprite clicked\nbroadcast (next level v)\n\n@Upper half\n\nwhen flag clicked\nhide\n\nwhen backdrop switches to [backdrop16 v]\nshow\nforever\n    glide (0.1) secs to x: (112) y: (26)\n    glide (1) secs to x: (114) y: (137)\n    wait (1) seconds\nend\n\nwhen backdrop switches to [backdrop17 v]\nhide\n\n@Upper half2\n\nwhen flag clicked\nhide\n\nwhen backdrop switches to [backdrop16 v]\nshow\n\nwhen backdrop switches to [backdrop17 v]\nhide\n\n@Lava\n\nwhen flag clicked\nswitch costume to (costume1 v)\nshow\nforever\n    switch costume to ((costume [number v]) + (1))\n    wait (0.2) seconds\n    switch costume to ((costume [number v]) - (1))\n    wait (0.2) seconds\nend\n\n@Sprite1\n\nwhen this sprite clicked\nbroadcast (Change Looks v)\nnext costume\n\nwhen flag clicked\nshow\nforever\n    if <touching (mouse-pointer v)?> then\n        set [brightness v] effect to (25)\n    else\n        set [brightness v] effect to (0)\n    end\nend\n\n@Starter\n\nwhen flag clicked\nforever\n    broadcast (Go Start v)\nend\n\nwhen I receive [activate mobile v]\nbroadcast (Mobile Activ v)\n\nwhen I receive [use pen v]\nwait (0.001) seconds\nbroadcast (Mobile Activ v)\n\n@Trail\n\nwhen flag clicked\nset size to (35) %\nswitch costume to (costume1 v)\nhide\n\nwhen I start as a clone\nset size to (35) %\nrepeat (25)\n    change size by (-3)\nend\ndelete this clone\n\nwhen I start as a clone\nset [ghost v] effect to (0)\nrepeat (25)\n    change [ghost v] effect by (6)\nend\ndelete this clone\n\nwhen flag clicked\nforever\n    create clone of (_myself_ v)\nend\n\nwhen I receive [costumes v]\nnext costume\n\nwhen I receive [activate computer v]\nshow\nforever\n    go to (sprite2 v)\nend\n\nwhen I receive [activate mobile v]\nshow\nforever\n    go to (sprite24 v)\nend\n\n@Sprite17\n\nwhen flag clicked\nhide\nforever\n    if <<touching (sprite24 v)?> or <touching (sprite2 v)?>> then\n        switch costume to (costume2 v)\n        wait (0.2) seconds\n        switch costume to (costume3 v)\n        wait (0.2) seconds\n        switch costume to (costume2 v)\n        wait (0.2) seconds\n        switch costume to (costume1 v)\n        broadcast (Drop v)\n        hide\n    end\nend\n\nwhen backdrop switches to [backdrop19 v]\nwait (0.2) seconds\nshow\n\nwhen backdrop switches to [backdrop20 v]\nhide\n\nwhen I receive [burst v]\nforever\n    if <(backdrop [number v]) = [19]> then\n        wait (1) seconds\n        show\n        stop [this script v]\n    end\nend\n\n@Sprite22\n\nwhen backdrop switches to [backdrop19 v]\nhide\n\nwhen backdrop switches to [backdrop22 v]\nhide\n\nwhen flag clicked\nhide\n\nwhen I receive [drop v]\ngo to x: (-32) y: (351)\nshow\nset [xvel v] to [0]\nset [yvel v] to [0]\nclear graphic effects\nset [dead? v] to [0]\nforever\n    go to [front v] layer\n    set [x pos v] to (x position)\n    set [ypos v] to (y position)\n    change [yvel v] by (-0.7)\n    change x by (Xvel)\n    change y by (Yvel)\n    change y by (-1)\n    change y by (1)\n    set [xvel v] to ((Xvel) * (0.9))\nend\n\nwhen I receive [burst v]\nhide\nstop [other scripts in sprite v]\ngo to x: (-32) y: (351)\n\n@Box\n\nwhen flag clicked\nforever\n    if <<<touching (sprite24 v)?> or <touching (sprite2 v)?>> and <key (right arrow v) pressed?>> then\n        move (5) steps\n    end\nend\n\nwhen flag clicked\nforever\n    if <<<touching (sprite24 v)?> or <touching (sprite2 v)?>> and <key (left arrow v) pressed?>> then\n        move (-5) steps\n    end\nend\n\nwhen flag clicked\nhide\n\nwhen backdrop switches to [backdrop21 v]\nhide\n\nwhen backdrop switches to [backdrop20 v]\nshow\n\nwhen flag clicked\nset [xvel v] to [0]\nset [yvel v] to [0]\nset size to (50) %\nclear graphic effects\nset [dead? v] to [0]\nforever\n    set [x pos v] to (x position)\n    set [ypos v] to (y position)\n    change [yvel v] by (-0.7)\n    change x by (Xvel)\n    change y by (Yvel)\n    if <<touching color (#000000)?> or <<touching (box2 v)?> or <<touching (box3 v)?> or <touching (box4 v)?>>>> then\n        change y by ((Yvel) * (-1))\n        set [yvel v] to [0]\n    end\n    change y by (-1)\n    change y by (1)\n    set [xvel v] to ((Xvel) * (0.9))\nend\n\nwhen backdrop switches to [backdrop20 v]\ngo to x: (1) y: (101)\n\nwhen I receive [erase v]\ngo to x: (1) y: (101)\n\n@Box2\n\nwhen flag clicked\nforever\n    if <<<touching (sprite24 v)?> or <touching (sprite2 v)?>> and <key (right arrow v) pressed?>> then\n        move (5) steps\n    end\nend\n\nwhen flag clicked\nforever\n    if <<<touching (sprite24 v)?> or <touching (sprite2 v)?>> and <key (left arrow v) pressed?>> then\n        move (-5) steps\n    end\nend\n\nwhen flag clicked\nhide\n\nwhen backdrop switches to [backdrop21 v]\nhide\n\nwhen backdrop switches to [backdrop20 v]\nshow\n\nwhen flag clicked\nset [xvel v] to [0]\nset [yvel v] to [0]\nset size to (50) %\nclear graphic effects\nset [dead? v] to [0]\nforever\n    set [x pos v] to (x position)\n    set [ypos v] to (y position)\n    change [yvel v] by (-0.7)\n    change x by (Xvel)\n    change y by (Yvel)\n    if <<touching color (#000000)?> or <<touching (box v)?> or <<touching (box3 v)?> or <touching (box4 v)?>>>> then\n        change y by ((Yvel) * (-1))\n        set [yvel v] to [0]\n    end\n    change y by (-1)\n    change y by (1)\n    set [xvel v] to ((Xvel) * (0.9))\nend\n\nwhen I receive [erase v]\ngo to x: (1) y: (-13)\n\nwhen backdrop switches to [backdrop20 v]\ngo to x: (1) y: (-13)\n\n@Box3\n\nwhen flag clicked\nforever\n    if <<<touching (sprite24 v)?> or <touching (sprite2 v)?>> and <key (right arrow v) pressed?>> then\n        move (5) steps\n    end\nend\n\nwhen flag clicked\nforever\n    if <<<touching (sprite24 v)?> or <touching (sprite2 v)?>> and <key (left arrow v) pressed?>> then\n        move (-5) steps\n    end\nend\n\nwhen flag clicked\nhide\n\nwhen backdrop switches to [backdrop21 v]\nhide\n\nwhen backdrop switches to [backdrop20 v]\nshow\n\nwhen flag clicked\nset [xvel v] to [0]\nset [yvel v] to [0]\nset size to (50) %\nclear graphic effects\nset [dead? v] to [0]\nforever\n    set [x pos v] to (x position)\n    set [ypos v] to (y position)\n    change [yvel v] by (-0.7)\n    change x by (Xvel)\n    change y by (Yvel)\n    if <<touching color (#000000)?> or <<touching (box2 v)?> or <<touching (box v)?> or <touching (box4 v)?>>>> then\n        change y by ((Yvel) * (-1))\n        set [yvel v] to [0]\n    end\n    change y by (-1)\n    change y by (1)\n    set [xvel v] to ((Xvel) * (0.9))\nend\n\nwhen I receive [erase v]\ngo to x: (1) y: (25)\n\nwhen backdrop switches to [backdrop20 v]\ngo to x: (1) y: (25)\n\n@Box4\n\nwhen flag clicked\nforever\n    if <<<touching (sprite24 v)?> or <touching (sprite2 v)?>> and <key (right arrow v) pressed?>> then\n        move (5) steps\n    end\nend\n\nwhen flag clicked\nforever\n    if <<<touching (sprite24 v)?> or <touching (sprite2 v)?>> and <key (left arrow v) pressed?>> then\n        move (-5) steps\n    end\nend\n\nwhen flag clicked\nhide\n\nwhen backdrop switches to [backdrop21 v]\nhide\n\nwhen backdrop switches to [backdrop20 v]\nshow\n\nwhen flag clicked\nset [xvel v] to [0]\nset [yvel v] to [0]\nset size to (50) %\nclear graphic effects\nset [dead? v] to [0]\nforever\n    set [x pos v] to (x position)\n    set [ypos v] to (y position)\n    change [yvel v] by (-0.7)\n    change x by (Xvel)\n    change y by (Yvel)\n    if <<touching color (#000000)?> or <<touching (box v)?> or <<touching (box2 v)?> or <touching (box3 v)?>>>> then\n        change y by ((Yvel) * (-1))\n        set [yvel v] to [0]\n    end\n    change y by (-1)\n    change y by (1)\n    set [xvel v] to ((Xvel) * (0.9))\nend\n\nwhen I receive [erase v]\ngo to x: (1) y: (62)\n\nwhen backdrop switches to [backdrop20 v]\ngo to x: (1) y: (62)\n\n@Final Boss\n\nwhen I receive [attack on boss v]\nswitch costume to (death v)\nstart sound [pop v]\n\nwhen flag clicked\nforever\n    if <<(Boss HP) = [0]> and <(backdrop [number v]) = [21]>> then\n        wait (4) seconds\n        stop [other scripts in sprite v]\n    end\nend\n\nwhen backdrop switches to [backdrop21 v]\nwait (1) seconds\nshow variable [boss hp v]\nset [boss hp v] to [3]\n\nwhen backdrop switches to [backdrop22 v]\nhide variable [boss hp v]\nset [boss hp v] to [3]\nhide\n\nwhen backdrop switches to [backdrop21 v]\nwait (1) seconds\nshow\n\nwhen flag clicked\ngo to x: (0) y: (47)\nset size to (100) %\nswitch costume to (intro1 v)\npoint in direction (90)\nhide\n\nwhen backdrop switches to [backdrop21 v]\ngo to x: (0) y: (47)\nwait (1) seconds\nswitch costume to (intro1 v)\nwait (0.3) seconds\nswitch costume to (intro2 v)\nwait (0.3) seconds\nswitch costume to (wait or intro3 v)\nwait (0.4) seconds\nswitch costume to (intro4 v)\nwait (0.4) seconds\nswitch costume to (intro5 v)\nwait (0.3) seconds\nswitch costume to (intro4 v)\nwait (0.4) seconds\nforever\n    switch costume to (wait or intro3 v)\n    wait (1) seconds\n    switch costume to (attack v)\n    repeat (90)\n        turn right (4) degrees\n    end\n    wait (0.5) seconds\n    switch costume to (protect v)\n    point in direction [45] or [-45]\n    broadcast (Spin v)\n    repeat (100)\n        move (15) steps\n        if on edge, bounce\n    end\n    glide (1) secs to x: (0) y: (47)\n    point in direction (90)\n    switch costume to (ready v)\n    wait (4) seconds\nend\n\nwhen flag clicked\nforever\n    if <<(Boss HP) = [0]> and <(backdrop [number v]) = [21]>> then\n        switch costume to (death v)\n        repeat (20)\n            change size by (-5)\n        end\n        hide\n    end\nend\n\nwhen I receive [spin v]\nrepeat (100)\n    turn right (4) degrees\nend\n\nwhen backdrop switches to [backdrop22 v]\nwait (1) seconds\nhide variable [boss hp v]\nset [boss hp v] to [3]\nhide\n\n@Thumbnail\n\nwhen flag clicked\nset [timer v] to [0.1]\nforever\n    set [timer v] to ((timer) + (.1))\nend\n\nwhen [timer v] > (timer)\nhide variable [my variable v]\nhide variable [boss hp v]\nhide variable [ink limit v]\ngo to [front v] layer\nshow\n\nwhen flag clicked\nhide variable [timer v]\n\nwhen flag clicked\ngo to [front v] layer\nhide\n\n@Sprite10\n\nwhen this sprite clicked\nbroadcast (Costumes v)\nnext costume\n\nwhen flag clicked\nswitch costume to (button2-a v)\nshow\nforever\n    if <touching (mouse-pointer v)?> then\n        set [brightness v] effect to (25)\n    else\n        set [brightness v] effect to (0)\n    end\nend\n\n@Sprite23\n\nwhen this sprite clicked\nnext costume\n\nwhen flag clicked\nswitch costume to (costume2 v)\nbroadcast (Don't use pen v)\nforever\n    if <touching (mouse-pointer v)?> then\n        set [brightness v] effect to (25)\n    else\n        set [brightness v] effect to (0)\n    end\nend\n\nwhen I receive [activate computer v]\nhide\n\nwhen I receive [activate mobile v]\nshow\n\nwhen flag clicked\nforever\n    if <(costume [number v]) = [2]> then\n        broadcast (Don't use pen v)\n    end\n    if <(costume [number v]) = [1]> then\n        broadcast (Use Pen v)\n    end\nend\n\nwhen I receive [next level v]\nbroadcast (Don't use pen v)\n\nwhen I receive [erase v]\nbroadcast (Don't use pen v)\n\nwhen I receive [burst v]\nbroadcast (Don't use pen v)\n\n@Mobile Pen\n\nwhen flag clicked\nset [ink limit v] to [200]\ngo to [back v] layer\npen up\nset pen size to (10)\nset pen color to (#000000)\nshow\n\nwhen I receive [next level v]\nhide variable [ink limit v]\nset [ink limit v] to [200]\nerase all\nwait (1) seconds\nshow variable [ink limit v]\nrepeat (3)\n    set [ink limit v] to [200]\nend\nerase all\n\nwhen I receive [activate mobile v]\nrepeat (5)\n    erase all\nend\nshow\n\nwhen I receive [activate computer v]\nrepeat (5)\n    erase all\nend\nhide\nstop [other scripts in sprite v]\n\nwhen I receive [change looks v]\nnext costume\n\nwhen I receive [go start v]\ngo to (mouse-pointer v)\n\nwhen I receive [activate computer v]\nshow variable [ink limit v]\nrepeat (3)\n    set [ink limit v] to [200]\nend\n\nwhen I receive [activate mobile v]\nshow variable [ink limit v]\nrepeat (3)\n    set [ink limit v] to [200]\nend\n\nwhen flag clicked\nhide variable [ink limit v]\n\nwhen I receive [erase v]\npen up\n\nwhen I receive [next level v]\npen up\n\nwhen I receive [erase v]\nrepeat (3)\n    set [ink limit v] to [200]\nend\nerase all\n\nwhen I receive [use pen v]\nif <mouse down?> then\n    pen down\nend\n\nwhen I receive [use pen v]\nif <mouse down?> then\n    repeat until <not <mouse down?>>\n        change [ink limit v] by (-1)\n    end\nend\nif <not <mouse down?>> then\n    pen up\nend\n\nwhen I receive [don't use pen v]\nif <mouse down?> then\n    pen up\nelse\n    pen up\nend\n\nwhen I receive [activate computer v]\nforever\n    hide\n    pen up\nend\n\nwhen I receive [erase v]\nforever\n    if <(Ink Limit) < [0]> then\n        pen up\n        stop [other scripts in sprite v]\n        stop [this script v]\n    end\nend\n\nwhen I receive [next level v]\nforever\n    if <(Ink Limit) < [0]> then\n        pen up\n        stop [other scripts in sprite v]\n        stop [this script v]\n    end\nend\n\nwhen I receive [use pen v]\nforever\n    if <(Ink Limit) < [0]> then\n        pen up\n        stop [other scripts in sprite v]\n        stop [this script v]\n    end\nend\n\nwait (0.1) seconds\n\n@Sprite24\n\nwhen flag clicked\nswitch costume to (costume1 v)\nhide\n\nwhen I receive [erase v]\ngo to x: (-206) y: (-110)\n\nwhen I receive [hide for a moment v]\nhide\nwait (1) seconds\ngo to x: (-206) y: (-110)\nshow\n\nwhen flag clicked\nforever\n    if <touching color (#00d3ff)?> then\n        broadcast (Attack on Boss v)\n        stop [this script v]\n    end\nend\n\nwhen [up arrow v] key pressed\nforever\n    if <touching color (#00d3ff)?> then\n        broadcast (Attack on Boss v)\n        stop [this script v]\n    end\nend\n\nwhen I receive [activate mobile v]\nswitch costume to (costume1 v)\ngo to x: (-206) y: (-110)\nshow\n\nwhen I receive [activate computer v]\nswitch costume to (costume1 v)\ngo to x: (-206) y: (-110)\nforever\n    hide\nend\n\nwhen I receive [costumes v]\nnext costume\nnext costume\n\nwhen I receive [use pen v]\nstop [other scripts in sprite v]\n\nwhen I receive [don't use pen v]\nbroadcast (MOBILE STTART v)\n\nwhen I receive [mobile activ v]\nset [xvel v] to [0]\nset [yvel v] to [0]\nset size to (35) %\nclear graphic effects\ngo to x: (-206) y: (-110)\nset [dead? v] to [0]\nforever\n    go to [front v] layer\n    set [x pos v] to (x position)\n    set [ypos v] to (y position)\n    change [yvel v] by (-0.7)\n    if <<(y position) < [-160]> or <<touching color (#ff0000)?> or <touching (lava v)?>>> then\n        next costume\n        set [dead? v] to [1]\n        set [xvel v] to [0]\n        set [yvel v] to [0]\n        broadcast (burst v)\n        wait (0.5) seconds\n        clear graphic effects\n        point in direction (90)\n        go to x: (-206) y: (-110)\n        set [x pos v] to (x position)\n        set [ypos v] to (y position)\n        set [dead? v] to [0]\n        switch costume to ((costume [number v]) - (1))\n    end\n    if <<mouse down?> and <(mouse x) > (x position)>> then\n        change [xvel v] by (0.8)\n    end\n    if <<mouse down?> and <(mouse x) < (x position)>> then\n        change [xvel v] by (-0.8)\n    end\n    change x by (Xvel)\n    if <<touching color (#000000)?> or <touching color (#9f05cb)?>> then\n        change y by (2)\n        if <<touching color (#000000)?> or <touching color (#9f05cb)?>> then\n            change y by (2)\n            if <<touching color (#000000)?> or <touching color (#9f05cb)?>> then\n                change y by (2)\n                if <<touching color (#000000)?> or <touching color (#9f05cb)?>> then\n                    change y by (1)\n                end\n                if <<touching color (#000000)?> or <touching color (#9f05cb)?>> then\n                    change y by (1)\n                    if <<touching color (#000000)?> or <touching color (#9f05cb)?>> then\n                        change x by ((Xvel) * (-1))\n                        change y by (-5)\n                        if <<mouse down?> and <(mouse y) > (y position)>> then\n                            if <(Xvel) > [0]> then\n                                set [xvel v] to [-8]\n                            else\n                                set [xvel v] to [8]\n                            end\n                            set [yvel v] to [10]\n                        else\n                            set [xvel v] to [0]\n                        end\n                    end\n                end\n            end\n        end\n    end\n    change y by (Yvel)\n    if <<touching color (#000000)?> or <touching color (#9f05cb)?>> then\n        change y by ((Yvel) * (-1))\n        set [yvel v] to [0]\n    end\n    change y by (-1)\n    if <<touching color (#000000)?> or <touching color (#9f05cb)?>> then\n        if <<mouse down?> and <(mouse y) > (y position)>> then\n            set [yvel v] to [10]\n        end\n    end\n    change y by (1)\n    set [xvel v] to ((Xvel) * (0.9))\n    if <(x position) > [234]> then\n        broadcast (next level v)\n        change [level v] by (1)\n        go to x: (-206) y: (-110)\n    end\nend\n\nwhen I receive [credits v]\nhide\nwait (30) seconds\nshow\n\n@Top Secret\n\nwhen flag clicked\ngo to x: (0) y: (-240)\nhide\n\nwhen backdrop switches to [backdrop29 v]\nhide\nforever\n    if <<key (o v) pressed?> and <key (c v) pressed?>> then\n        broadcast (CREDITS v)\n        stop [this script v]\n    end\nend\n\nwhen I receive [credits v]\ngo to x: (0) y: (-240)\nshow\nglide (30) secs to x: (0) y: (381)\nhide\n\n
How to Play:\n-Use arrow keys to move\n-Hold down your finger or mouse to activate and deactivate the pen. Use the pen to your advantage! \n-Click the ERASE ALL button to erase your mistakes!\n-If the level is too hard, skip it!\n-You can move boxes around by touching them. (Won't work on Mobile)\n-Mobile is harder... Good Luck!\n-Be careful, you don't want to run out of ink!\n-Full Screen Recommended\nALL LEVELS ARE POSSIBLE, SOME MIGHT BE HARDER ON MOBILE!!!