Halloween - A Platformer
@Stage\n\nwhen I receive [menu v]\nswitch backdrop to (menu v)\nset [screen v] to [0]\nstop [other scripts in stage v]\nstop all sounds\nforever\n    play sound [Spooky Scary Skeletons \[instrumental\] v] until done\nend\n\nwhen I receive [level 1 v]\nswitch backdrop to (level 1 v)\nset [screen v] to [0]\nbroadcast (new screen v)\nset [gamemode v] to [1]\nstop [other scripts in stage v]\nforever\n    play sound [Frantic Factory v] until done\nend\n\nwhen I receive [play menu music v]\nset [boss phase v] to [-1]\nswitch backdrop to (menu v)\nset [screen v] to [0]\nstop [other scripts in stage v]\nstop all sounds\nforever\n    play sound [Spooky Scary Skeletons \[instrumental\] v] until done\nend\n\nwhen I receive [level 2 v]\nswitch backdrop to (level 2 v)\nset [screen v] to [8]\nbroadcast (new screen v)\nset [gamemode v] to [1]\nstop [other scripts in stage v]\nforever\n    play sound [Haunted Woods v] until done\nend\n\nwhen I receive [generating v]\nif <(screen) = [15]> then\n    set [boss phase v] to [1]\n    stop [other scripts in sprite v]\n    stop all sounds\n    forever\n        play sound [Classical v] until done\n    end\nend\nif <(screen) = [16]> then\n    set [boss phase v] to [-1]\n    stop [other scripts in sprite v]\n    stop all sounds\n    forever\n        play sound [Haunted Woods v] until done\n    end\nend\nif <(screen) = [24]> then\n    stop [other scripts in sprite v]\n    stop all sounds\n    reset timer\n    set [boss phase v] to [0]\n    play sound [JawbreakerIntro v] until done\n    set [boss phase v] to [1]\n    play sound [Jawbreaker1 v] until done\n    set [boss phase v] to [2]\n    play sound [Jawbreaker2 v] until done\n    set [boss phase v] to [3]\n    play sound [Jawbreaker3 v] until done\n    set [boss phase v] to [0]\n    broadcast (boss ded v)\n    change [screen v] by (1)\n    play sound [Jawbreaker4 v] until done\n    stop [other scripts in sprite v]\n    set [boss phase v] to [-1]\n    forever\n        play sound [Zelda II Palace Theme \(Xtrullor Remix\) v] until done\n    end\nend\nif <(screen) = [35]> then\n    stop [other scripts in sprite v]\n    stop all sounds\n    set [boss phase v] to [0]\n    play sound [Ill sharp minor Intro v] until done\n    set [boss phase v] to [1]\n    play sound [Ill sharp minor1 v] until done\n    set [boss phase v] to [2]\n    play sound [Ill sharp minor2 v] until done\n    set [boss phase v] to [3]\n    play sound [Ill sharp minor3 v] until done\n    set [boss phase v] to [0]\n    broadcast (boss ded v)\n    play sound [Ill sharp minor4 v] until done\n    stop [other scripts in sprite v]\n    set [boss phase v] to [-1]\n    forever\n        play sound [Clownparty Remix v] until done\n    end\nend\nif <(screen) = [45]> then\n    stop [other scripts in sprite v]\n    stop all sounds\n    set [boss phase v] to [0]\n    play sound [NecromancyIntro v] until done\n    set [boss phase v] to [1]\n    set [beat count v] to [1]\n    play sound [Necromancy1 v] until done\n    set [boss phase v] to [2]\n    set [beat count v] to [1]\n    play sound [Necromancy2 v] until done\n    set [boss phase v] to [3]\n    set [beat count v] to [1]\n    play sound [Necromancy3 v] until done\n    set [boss phase v] to [4]\n    set [beat count v] to [1]\n    reset timer\n    play sound [Necromancy4 v] until done\n    set [boss phase v] to [5]\n    set [beat count v] to [1]\n    play sound [Necromancy5 v] until done\n    set [boss phase v] to [6]\n    set [beat count v] to [1]\n    play sound [Necromancy6 v] until done\n    set [boss phase v] to [1]\n    broadcast (boss ded v)\n    play sound [Necromancy7 v] until done\n    stop [other scripts in sprite v]\n    stop all sounds\n    set [boss phase v] to [-1]\n    forever\n        play sound [Anubis v] until done\n    end\nend\n\nwhen I receive [level 4 v]\nswitch backdrop to (level 4 v)\nset [screen v] to [26]\nbroadcast (new screen v)\nset [gamemode v] to [1]\nstop [other scripts in stage v]\nforever\n    play sound [Clownparty Remix v] until done\nend\n\nwhen I receive [level 3 v]\nswitch backdrop to (level 3 v)\nset [screen v] to [16]\nbroadcast (new screen v)\nset [gamemode v] to [1]\nstop [other scripts in stage v]\nforever\n    play sound [Zelda II Palace Theme \(Xtrullor Remix\) v] until done\nend\n\nwhen flag clicked\nset [boss phase v] to [0]\n\nwhen flag clicked\nset volume to (100) %\nshow list [save code v]\nset [boss phase v] to [-1]\n\nwhen I receive [level 5 v]\nswitch backdrop to (level 5 v)\nset [screen v] to [36]\nbroadcast (new screen v)\nset [gamemode v] to [1]\nstop [other scripts in stage v]\nforever\n    play sound [Anubis v] until done\nend\n\nwhen I receive [load v]\nset [mobile v] to [2]\nask [Enter Save Code] and wait\nset [load v] to (answer)\nif <<<(letter (1) of (load)) > [-1]> and <(letter (1) of (load)) < [9]>> and < and <(length of (load)) = [8]>>> then\n    delete (all) of [levels unlocked v]\n    delete (all) of [costumes unlocked v]\n    add [1] to [costumes unlocked v]\n    set [count v] to [0]\n    repeat (letter (1) of (load))\n        change [count v] by (1)\n        add (count) to [levels unlocked v]\n        broadcast (join [finish level ] ((count) - (1)))\n    end\n    set [count v] to [1]\n    set [coins v] to [0]\n    repeat (length of ((load) - (1)))\n        change [count v] by (1)\n        if <not <(letter (count) of (load)) = [0]>> then\n            change [coins v] by (1)\n            add (letter (count) of (load)) to [coins collected v]\n        end\n    end\n    change [coins v] by (-1)\n    broadcast (level select v)\nelse\n    ask [Invalid Code] and wait\nend\nset [mobile v] to [0]\n\nwhen I receive [save v]\nset [mobile v] to [2]\ndelete (all) of [save code v]\nif <[costumes unlocked v] contains [12]?> then\n    add [8] to [save code v]\nelse\n    add (length of [levels unlocked v]) to [save code v]\nend\nset [count v] to [0]\nrepeat (7)\n    change [count v] by (1)\n    if <(length of [coins collected v]) < (count)> then\n        add [0] to [save code v]\n    else\n        if <((item (count) of [coins collected v]) / (item (count) of [coins collected v])) = [1]> then\n            add (item (count) of [coins collected v]) to [save code v]\n        else\n            add [0] to [save code v]\n        end\n    end\nend\nset [count v] to (join (item (1) of [save code v]) (join (item (2) of [save code v]) (join (item (3) of [save code v]) (join (item (4) of [save code v]) (join (item (5) of [save code v]) (join (item (6) of [save code v]) (join (item (7) of [save code v]) (item (8) of [save code v]))))))))\ndelete (all) of [save code v]\nadd (count) to [save code v]\nhide list [save code v]\nwait (3) seconds\nshow list [save code v]\nif <(mobile) = [2]> then\n    set [mobile v] to [0]\nend\n\nwhen I receive [new screen v]\nif <(level) = [6]> then\n    wait (0.1) seconds\n    switch backdrop to (((screen) mod (5)) + (7))\nend\n\nwhen I receive [level 6 v]\nswitch backdrop to (level 6-3 v)\nset [screen v] to [46]\nbroadcast (new screen v)\nset [gamemode v] to [1]\nstop [other scripts in stage v]\nforever\n    play sound [Flawless Wings of Yatagarasu v] until done\nend\n\nwhen [e v] key pressed\nif <[costumes unlocked v] contains [12]?> then\n    forever\n        if <key (e v) pressed?> then\n            if <(volume) = [100]> then\n                set volume to (0) %\n            else\n                set volume to (100) %\n            end\n            create clone of (epic music v)\n            wait until <not <key (e v) pressed?>>\n        end\n    end\nend\n\n@Menu\n\nwhen I receive [new screen v]\nerase all\nhide\ndelete this clone\n\nwhen I receive [menu v]\nset [menu? v] to [1]\nset [c v] to [0]\ncreate clone of (_myself_ v)\nset [c v] to [1]\ncreate clone of (_myself_ v)\nset [c v] to [9]\ncreate clone of (_myself_ v)\n\nwhen I receive [level select v]\ndelete this clone\n\nwhen I start as a clone\nif <(c) = [0]> then\n    go to x: (0) y: (120)\n    switch costume to (title v)\n    show\n    forever\n        point in direction ((([sin v] of ((timer) * (80)) ) * (5)) + (90))\n        set size to ((([sin v] of ((timer) * (120)) ) * (3)) + (80)) %\n    end\nend\nif <(c) = [1]> then\n    go to x: (0) y: (0)\n    switch costume to (new game v)\n    show\n    forever\n        clear graphic effects\n        if <(mobile) = [0]> then\n            if <touching (mouse-pointer v)?> then\n                repeat until <<mouse down?> or <not <touching (mouse-pointer v)?>>>\n                    set [brightness v] effect to (30)\n                end\n                if <mouse down?> then\n                    broadcast (level select v)\n                    delete this clone\n                end\n            end\n        end\n    end\nend\nif <(c) = [9]> then\n    go to x: (0) y: (-90)\n    switch costume to (load save v)\n    show\n    forever\n        clear graphic effects\n        if <(mobile) = [0]> then\n            if <touching (mouse-pointer v)?> then\n                repeat until <<mouse down?> or <not <touching (mouse-pointer v)?>>>\n                    set [brightness v] effect to (30)\n                end\n                if <mouse down?> then\n                    broadcast (load v)\n                end\n            end\n        end\n    end\nend\n\nwhen I receive [level select v]\nrepeat (3)\n    set [mobile v] to [0]\nend\nif <[levels unlocked v] contains [7]?> then\n    set size to (60) %\n    set [c v] to [0]\n    create clone of (_myself_ v)\n    go to x: (-160) y: (0)\n    set [c v] to [1]\n    repeat (3)\n        change [c v] by (1)\n        create clone of (_myself_ v)\n        change x by (100)\n    end\n    set x to (-160)\n    change y by (-80)\n    repeat (3)\n        change [c v] by (1)\n        create clone of (_myself_ v)\n        change x by (100)\n    end\n    set [c v] to [8]\n    go to x: (0) y: (0)\n    create clone of (_myself_ v)\nelse\n    set size to (70) %\n    set [c v] to [0]\n    create clone of (_myself_ v)\n    go to x: (-130) y: (10)\n    set [c v] to [1]\n    repeat (3)\n        change [c v] by (1)\n        create clone of (_myself_ v)\n        change x by (130)\n    end\n    set x to (-130)\n    change y by (-90)\n    repeat (3)\n        change [c v] by (1)\n        create clone of (_myself_ v)\n        change x by (130)\n    end\nend\n\nwhen I start as a clone\nif <<(c) > [1]> and <(c) < [8]>> then\n    if <[levels unlocked v] contains ((c) - (1))?> then\n        switch costume to ((c) + (2))\n        show\n        wait until <not <mouse down?>>\n        forever\n            set [menu? v] to [1]\n            set [mobile v] to [0]\n            clear graphic effects\n            if <touching (mouse-pointer v)?> then\n                repeat until <<mouse down?> or <not <touching (mouse-pointer v)?>>>\n                    set [brightness v] effect to (30)\n                end\n                if <mouse down?> then\n                    set [level v] to ((costume [number v]) - (3))\n                    broadcast (join [level ] (level))\n                    delete this clone\n                end\n            end\n        end\n    else\n        switch costume to (locked v)\n        show\n    end\nend\nif <(c) = [8]> then\n    if <not <(username) = [block866]>> then\n        set size to (100) %\n        switch costume to (soon v)\n        show\n    else\n        set size to (100) %\n        switch costume to ((c) + (2))\n        show\n        wait until <not <mouse down?>>\n        forever\n            switch costume to ((c) + (2))\n            clear graphic effects\n            if <touching (mouse-pointer v)?> then\n                repeat until <<mouse down?> or <not <touching (mouse-pointer v)?>>>\n                    set [brightness v] effect to (30)\n                end\n                if <mouse down?> then\n                    set [level v] to [7]\n                    broadcast (join [level ] (level))\n                    delete this clone\n                end\n            end\n        end\n    end\nend\n\nwhen flag clicked\nif <<(username) = [block866]> and <not <key (space v) pressed?>>> then\n    unlock all\nend\n\ndelete this clone\n\ndefine unlock all\nset [no v] to [1]\nrepeat (11)\n    change [no v] by (1)\n    add (no) to [costumes unlocked v]\nend\nset [no v] to [1]\nrepeat (6)\n    change [no v] by (1)\n    add (no) to [levels unlocked v]\nend\n\nwhen flag clicked\nset [gamemode v] to [1]\nset size to (100) %\nerase all\ndelete (all) of [levels unlocked v]\nadd [1] to [levels unlocked v]\ngo to x: (0) y: (0)\nhide\n\nset [no v] to [1]\nrepeat (4)\n    change [no v] by (1)\n    add (no) to [levels unlocked v]\nend\n\n@screen\n\nwhen flag clicked\nhide\ngo to x: (0) y: (0)\nforever\n    go to [front v] layer\nend\n\nwhen I receive [generating v]\nshow\n\nwhen I receive [generated v]\nif <<(screen) = [21]> or <<(screen) = [31]> or <<(screen) = [32]> or >>> then\n    wait (1.5) seconds\nend\nrepeat (20)\n    go to [front v] layer\n    change [ghost v] effect by (5)\nend\nhide\nset [ghost v] effect to (0)\nswitch costume to (black v)\n\nwhen I receive [level select v]\nhide\n\nwhen I receive [level 3 v]\nclear graphic effects\nswitch costume to (costume3 v)\n\nchange [level v] by (1)\n\nswitch backdrop to (next backdrop v)\n\nbroadcast (boss ded v)\n\nchange [screen v] by (-1)\n\nbroadcast (level 4 v)\n\nwhen I receive [level 5 v]\nclear graphic effects\nswitch costume to (costume5 v)\n\nbroadcast (new screen v)\n\nwhen I receive [level 2 v]\nclear graphic effects\nswitch costume to (costume2 v)\n\nwhen I receive [level 4 v]\nclear graphic effects\nswitch costume to (costume4 v)\n\nwhen I receive [level 1 v]\nclear graphic effects\nswitch costume to (costume1 v)\n\nset [screen v] to [45]\n\nwhen I receive [level 6 v]\nclear graphic effects\nswitch costume to (costume6 v)\n\n@Ground\n\nwhen flag clicked\nset [clone? v] to [0]\nbroadcast (menu v)\nhide\n\nwhen I start as a clone\nset [clone? v] to [1]\nset size to (102) %\ngo to [front v] layer\ngo [backward v] (4) layers\nshow\n\nwhen I receive [new screen v]\ndelete this clone\n\nwhen I receive [level select v]\nset [screen v] to [0]\ndelete this clone\n\ndefine platforms\nif <(screen) = [4]> then\n    switch costume to (wood1 v)\n    go to x: (-240) y: (-180)\n    repeat (4)\n        change y by (24)\n    end\n    repeat (5)\n        change x by (24)\n    end\n    repeat (3)\n        create clone of (_myself_ v)\n        change x by (96)\n        change y by (24)\n    end\nend\nif <(screen) = [11]> then\n    switch costume to (wood2 v)\n    go to x: (-240) y: (-180)\n    repeat (3)\n        change y by (24)\n    end\n    change y by (1)\n    set x to (-240)\n    repeat (6)\n        change x by (24)\n    end\n    repeat (2)\n        create clone of (_myself_ v)\n        change y by (24)\n    end\n    switch costume to (wood1 v)\n    repeat (7)\n        create clone of (_myself_ v)\n        change x by (24)\n    end\n    create clone of (_myself_ v)\n    switch costume to (wood2 v)\n    repeat (2)\n        change y by (-24)\n        create clone of (_myself_ v)\n    end\nend\nif <(screen) = [13]> then\n    switch costume to (wood2 v)\n    go to x: (-240) y: (-180)\n    repeat (7)\n        change y by (24)\n    end\n    change y by (1)\n    set x to (-240)\n    repeat (11)\n        change x by (24)\n    end\n    switch costume to (wood1 v)\n    create clone of (_myself_ v)\nend\nif <(screen) = [14]> then\n    switch costume to (wood2 v)\n    go to x: (-240) y: (-180)\n    change x by (12)\n    repeat (5)\n        change y by (24)\n    end\n    repeat (10)\n        change x by (24)\n    end\n    repeat (2)\n        create clone of (_myself_ v)\n        change y by (24)\n    end\n    switch costume to (wood1 v)\n    create clone of (_myself_ v)\n    repeat (6)\n        change x by (-24)\n    end\n    repeat (2)\n        change y by (24)\n    end\n    create clone of (_myself_ v)\nend\nif <(screen) = [19]> then\n    switch costume to (pillar v)\n    go to x: (-240) y: (-180)\n    repeat (3)\n        change y by (24)\n    end\n    repeat (7)\n        change x by (24)\n    end\n    repeat (2)\n        create clone of (_myself_ v)\n        change y by (24)\n    end\n    repeat (4)\n        change x by (24)\n    end\n    repeat (2)\n        change y by (-24)\n    end\n    repeat (3)\n        create clone of (_myself_ v)\n        change y by (24)\n    end\nend\nif <(screen) = [43]> then\n    switch costume to (fade block v)\n    go to x: (-240) y: (-180)\n    repeat (9)\n        change y by (24)\n    end\n    repeat (8)\n        change x by (24)\n    end\n    repeat (4)\n        create clone of (_myself_ v)\n        change x by (24)\n    end\nend\n\ndefine other ground\nif <(screen) = [2]> then\n    switch costume to (ground2 v)\n    go to x: (-240) y: (-180)\n    repeat (3)\n        change y by (24)\n    end\n    change y by (1)\n    set x to (-240)\n    repeat (9)\n        change x by (24)\n    end\n    repeat (4)\n        create clone of (_myself_ v)\n        change x by (24)\n    end\n    change y by (24)\n    switch costume to (ground1 v)\n    set x to (-240)\n    repeat (9)\n        change x by (24)\n    end\n    repeat (4)\n        create clone of (_myself_ v)\n        change x by (24)\n    end\nend\nif <(screen) = [3]> then\n    switch costume to (ground2 v)\n    go to x: (-240) y: (-180)\n    repeat (3)\n        change y by (24)\n    end\n    change y by (1)\n    repeat (3)\n        set x to (-240)\n        repeat (19)\n            change x by (24)\n        end\n        create clone of (_myself_ v)\n        change y by (24)\n    end\n    switch costume to (ground1 v)\n    set x to (-240)\n    repeat (19)\n        change x by (24)\n    end\n    create clone of (_myself_ v)\nend\nif <(screen) = [4]> then\n    switch costume to (ground2 v)\n    go to x: (-240) y: (-180)\n    repeat (3)\n        change y by (24)\n    end\n    change y by (1)\n    repeat (4)\n        set x to (-240)\n        repeat (17)\n            change x by (24)\n        end\n        repeat (3)\n            create clone of (_myself_ v)\n            change x by (24)\n        end\n        change y by (24)\n    end\n    switch costume to (ground1 v)\n    set x to (-240)\n    repeat (17)\n        change x by (24)\n    end\n    repeat (3)\n        create clone of (_myself_ v)\n        change x by (24)\n    end\nend\nif <(screen) = [7]> then\n    switch costume to (ground2 v)\n    go to x: (-240) y: (-180)\n    repeat (5)\n        change y by (24)\n    end\n    change y by (1)\n    repeat (3)\n        set x to (-240)\n        repeat (3)\n            change x by (24)\n        end\n        repeat (3)\n            create clone of (_myself_ v)\n            change x by (24)\n        end\n        change y by (24)\n    end\n    switch costume to (ground1 v)\n    set x to (-240)\n    repeat (3)\n        change x by (24)\n    end\n    repeat (3)\n        create clone of (_myself_ v)\n        change x by (24)\n    end\nend\n\ndefine other ground2\nif <(screen) = [10]> then\n    switch costume to (ground4 v)\n    go to x: (-240) y: (-180)\n    repeat (3)\n        change y by (24)\n    end\n    set x to (-240)\n    repeat (4)\n        change x by (24)\n    end\n    repeat (2)\n        create clone of (_myself_ v)\n        change x by (24)\n    end\n    change y by (24)\n    switch costume to (ground3 v)\n    set x to (-240)\n    repeat (4)\n        change x by (24)\n    end\n    repeat (2)\n        create clone of (_myself_ v)\n        change x by (24)\n    end\nend\nif <(screen) = [12]> then\n    go to x: (-240) y: (-180)\n    switch costume to (ground4 v)\n    repeat (3)\n        change y by (24)\n    end\n    repeat (4)\n        change x by (24)\n    end\n    repeat (2)\n        create clone of (_myself_ v)\n        change x by (24)\n    end\n    change y by (24)\n    switch costume to (ground3 v)\n    change x by (-48)\n    repeat (2)\n        create clone of (_myself_ v)\n        change x by (24)\n    end\nend\nif <(screen) = [13]> then\n    switch costume to (ground4 v)\n    go to x: (-240) y: (-180)\n    repeat (3)\n        change y by (24)\n    end\n    repeat (19)\n        change x by (24)\n    end\n    repeat (5)\n        create clone of (_myself_ v)\n        change y by (24)\n    end\n    switch costume to (ground3 v)\n    create clone of (_myself_ v)\nend\nif <(screen) = [14]> then\n    switch costume to (ground4 v)\n    go to x: (-240) y: (-180)\n    repeat (3)\n        change y by (24)\n    end\n    repeat (19)\n        change x by (24)\n    end\n    repeat (5)\n        create clone of (_myself_ v)\n        change y by (24)\n    end\n    switch costume to (ground3 v)\n    create clone of (_myself_ v)\nend\n\ndefine other ground3\nif <(screen) = [18]> then\n    switch costume to (ground6 v)\n    go to x: (-240) y: (-180)\n    repeat (3)\n        change y by (24)\n    end\n    set x to (-240)\n    repeat (4)\n        change x by (24)\n    end\n    repeat (4)\n        create clone of (_myself_ v)\n        change x by (24)\n    end\n    change y by (24)\n    switch costume to (ground5 v)\n    set x to (-240)\n    repeat (4)\n        change x by (24)\n    end\n    repeat (4)\n        create clone of (_myself_ v)\n        change x by (24)\n    end\nend\nif <(screen) = [20]> then\n    go to x: (-240) y: (-180)\n    switch costume to (ground5bottom v)\n    repeat (6)\n        change y by (24)\n    end\n    repeat (6)\n        change x by (24)\n    end\n    repeat (5)\n        create clone of (_myself_ v)\n        change x by (24)\n    end\nend\nif <(screen) = [21]> then\n    go to x: (-240) y: (-180)\n    switch costume to (ground5bottom v)\n    repeat (5)\n        change y by (24)\n    end\n    repeat (7)\n        change x by (24)\n    end\n    repeat (9)\n        create clone of (_myself_ v)\n        change x by (24)\n    end\n    go to x: (-240) y: (-180)\n    switch costume to (pillar v)\n    repeat (3)\n        change y by (24)\n    end\n    repeat (7)\n        change x by (24)\n    end\n    create clone of (_myself_ v)\n    repeat (8)\n        change x by (24)\n    end\n    create clone of (_myself_ v)\n    change y by (24)\n    set x to (-240)\n    repeat (7)\n        change x by (24)\n    end\n    create clone of (_myself_ v)\n    repeat (8)\n        change x by (24)\n    end\n    create clone of (_myself_ v)\n    go to x: (-240) y: (-180)\n    switch costume to (ground5bottom v)\n    repeat (9)\n        change y by (24)\n    end\n    repeat (7)\n        change x by (24)\n    end\n    repeat (9)\n        create clone of (_myself_ v)\n        change x by (24)\n    end\nend\nif <(screen) = [34]> then\n    switch costume to (ground7bottom v)\n    go to x: (-240) y: (-180)\n    repeat (5)\n        change y by (24)\n    end\n    repeat (3)\n        change x by (24)\n    end\n    create clone of (_myself_ v)\nend\n\nwhen I receive [new screen v]\nif <(clone?) = [0]> then\n    set [restart count v] to [0]\n    change [screen v] by (1)\n    broadcast (generating v)\n    hide\n    other ground\n    other ground2\n    other ground3\n    other ground4\n    otherground5\n    otherground6\n    platforms\n    generate ground\n    broadcast (generated v)\nend\n\nchange [screen v] by (-1)\nbroadcast (new screen v)\n\nwhen I start as a clone\nif <(costume [number v]) = [21]> then\n    change x by (12)\n    change y by (15)\n    forever\n        go to [front v] layer\n        go [backward v] (1) layers\n        set [ghost v] effect to ((distance to [player v]) * (0.9))\n    end\nend\n\ndefine otherground6\nif <(screen) = [48]> then\n    switch costume to (ground12 v)\n    go to x: (-240) y: (-180)\n    repeat (3)\n        change y by (24)\n    end\n    repeat (19)\n        change x by (24)\n    end\n    repeat (4)\n        create clone of (_myself_ v)\n        change y by (24)\n    end\n    switch costume to (ground11 v)\n    create clone of (_myself_ v)\n    switch costume to (ground11flip v)\n    repeat (4)\n        change y by (24)\n    end\n    create clone of (_myself_ v)\n    switch costume to (ground12 v)\n    repeat (3)\n        change y by (24)\n        create clone of (_myself_ v)\n    end\nend\nif <(screen) = [49]> then\n    switch costume to (ground11bottom v)\n    go to x: (-240) y: (-180)\n    repeat (7)\n        change y by (24)\n    end\n    repeat (20)\n        create clone of (_myself_ v)\n        change x by (24)\n    end\nend\nif <(screen) = [50]> then\n    switch costume to (ground12 v)\n    go to x: (-240) y: (-180)\n    repeat (3)\n        change y by (24)\n    end\n    repeat (3)\n        change x by (24)\n    end\n    repeat (6)\n        create clone of (_myself_ v)\n        change y by (24)\n    end\n    switch costume to (ground11 v)\n    create clone of (_myself_ v)\n    switch costume to (ground11bottom v)\n    repeat (12)\n        change x by (24)\n        create clone of (_myself_ v)\n    end\n    repeat (4)\n        change x by (24)\n    end\n    switch costume to (ground12 v)\n    repeat (6)\n        create clone of (_myself_ v)\n        change y by (24)\n    end\n    repeat (6)\n        change y by (-24)\n    end\n    repeat (2)\n        change y by (-24)\n        create clone of (_myself_ v)\n    end\n    switch costume to (ground11flip v)\n    change y by (-24)\n    create clone of (_myself_ v)\nend\nif <(screen) = [52]> then\n    switch costume to (ground11flip v)\n    go to x: (-240) y: (-180)\n    repeat (14)\n        change y by (24)\n    end\n    repeat (14)\n        change x by (24)\n    end\n    repeat (6)\n        create clone of (_myself_ v)\n        change x by (24)\n    end\nend\nif <(screen) = [54]> then\n    switch costume to (ground11flip v)\n    go to x: (-240) y: (-180)\n    repeat (6)\n        change y by (24)\n    end\n    repeat (5)\n        change x by (24)\n    end\n    repeat (15)\n        create clone of (_myself_ v)\n        change x by (24)\n    end\n    switch costume to (ground11 v)\n    change y by (24)\n    change x by (-12)\n    repeat (15)\n        create clone of (_myself_ v)\n        change x by (-24)\n    end\n    switch costume to (ground11flip v)\n    go to x: (-240) y: (-180)\n    repeat (12)\n        change y by (24)\n    end\n    repeat (5)\n        change x by (24)\n    end\n    repeat (2)\n        repeat (15)\n            create clone of (_myself_ v)\n            change x by (24)\n        end\n        change y by (24)\n        switch costume to (ground12 v)\n        repeat (15)\n            change x by (-24)\n            create clone of (_myself_ v)\n        end\n        change y by (24)\n    end\nend\nif <(screen) = [55]> then\n    switch costume to (ground12 v)\n    go to x: (-240) y: (-180)\n    repeat (3)\n        change y by (24)\n    end\n    repeat (19)\n        change x by (24)\n    end\n    repeat (6)\n        create clone of (_myself_ v)\n        change y by (24)\n    end\n    switch costume to (ground11 v)\n    create clone of (_myself_ v)\n    switch costume to (ground11bottom v)\n    repeat (16)\n        change x by (-24)\n        create clone of (_myself_ v)\n    end\nend\nif <(screen) = [56]> then\n    switch costume to (ground11 v)\n    go to x: (-240) y: (-180)\n    repeat (3)\n        change y by (24)\n    end\n    repeat (2)\n        change x by (24)\n    end\n    repeat (3)\n        change x by (24)\n        switch costume to (ground11sideleft v)\n        create clone of (_myself_ v)\n        change x by (24)\n        switch costume to (ground11 v)\n        repeat (2)\n            create clone of (_myself_ v)\n            change x by (24)\n        end\n        switch costume to (ground11sideright v)\n        create clone of (_myself_ v)\n        change x by (24)\n    end\nend\nif <(screen) = [58]> then\n    switch costume to (ground11 v)\n    go to x: (-240) y: (-180)\n    repeat (3)\n        change y by (24)\n    end\n    repeat (10)\n        change x by (24)\n    end\n    repeat (2)\n        create clone of (_myself_ v)\n        change x by (24)\n        switch costume to (ground11sideright v)\n    end\n    switch costume to (ground12 v)\n    repeat (4)\n        create clone of (_myself_ v)\n        change x by (24)\n    end\n    change y by (24)\n    switch costume to (ground11sideright v)\n    repeat (3)\n        change x by (-24)\n        create clone of (_myself_ v)\n        switch costume to (ground11 v)\n    end\n    switch costume to (ground11sideleft v)\n    change x by (-24)\n    create clone of (_myself_ v)\n    switch costume to (ground12 v)\n    go to x: (-240) y: (-180)\n    repeat (6)\n        change y by (24)\n    end\n    create clone of (_myself_ v)\n    change y by (24)\n    create clone of (_myself_ v)\n    change x by (24)\n    create clone of (_myself_ v)\n    change x by (24)\n    create clone of (_myself_ v)\n    change y by (-24)\n    create clone of (_myself_ v)\n    change y by (24)\n    change x by (24)\n    create clone of (_myself_ v)\n    change x by (24)\n    create clone of (_myself_ v)\n    change y by (24)\n    change x by (24)\n    create clone of (_myself_ v)\n    change x by (24)\n    create clone of (_myself_ v)\n    change y by (-24)\n    create clone of (_myself_ v)\n    change y by (24)\n    change x by (24)\n    create clone of (_myself_ v)\n    change x by (24)\n    create clone of (_myself_ v)\n    change x by (24)\n    create clone of (_myself_ v)\n    change y by (24)\n    change x by (24)\n    create clone of (_myself_ v)\n    change x by (24)\n    create clone of (_myself_ v)\n    change x by (24)\n    create clone of (_myself_ v)\n    switch costume to (ground12 v)\n    go to x: (-240) y: (-180)\n    repeat (8)\n        change y by (24)\n    end\n    repeat (5)\n        create clone of (_myself_ v)\n        change x by (24)\n    end\n    go to x: (-240) y: (-180)\n    repeat (9)\n        change y by (24)\n    end\n    repeat (10)\n        create clone of (_myself_ v)\n        change x by (24)\n    end\n    go to x: (-240) y: (-180)\n    repeat (10)\n        change y by (24)\n    end\n    repeat (5)\n        set x to (-240)\n        repeat (13)\n            create clone of (_myself_ v)\n            change x by (24)\n        end\n        change y by (24)\n    end\nend\n\ndefine other ground4\nif <(screen) = [28]> then\n    switch costume to (ground8 v)\n    go to x: (-240) y: (-180)\n    repeat (3)\n        change y by (24)\n    end\n    repeat (19)\n        change x by (24)\n    end\n    repeat (9)\n        create clone of (_myself_ v)\n        change y by (24)\n    end\n    switch costume to (ground7 v)\n    create clone of (_myself_ v)\nend\nif <(screen) = [28]> then\n    switch costume to (ground7bottom v)\n    go to x: (-240) y: (-180)\n    repeat (3)\n        change y by (24)\n    end\n    repeat (2)\n        change x by (24)\n    end\n    repeat (3)\n        change y by (24)\n        repeat (4)\n            change x by (24)\n        end\n        create clone of (_myself_ v)\n    end\n    change x by (24)\n    create clone of (_myself_ v)\n    change x by (-24)\n    change y by (48)\n    repeat (3)\n        change x by (-24)\n    end\n    create clone of (_myself_ v)\n    change y by (24)\n    repeat (4)\n        change x by (-24)\n    end\n    create clone of (_myself_ v)\nend\nif <(screen) = [29]> then\n    switch costume to (ground8 v)\n    go to x: (-240) y: (-180)\n    repeat (3)\n        change y by (24)\n    end\n    repeat (19)\n        change x by (24)\n    end\n    repeat (5)\n        create clone of (_myself_ v)\n        change y by (24)\n    end\n    switch costume to (ground7 v)\n    create clone of (_myself_ v)\n    repeat (5)\n        change y by (24)\n    end\n    switch costume to (ground7flip v)\n    create clone of (_myself_ v)\n    change y by (24)\n    switch costume to (ground8 v)\n    create clone of (_myself_ v)\nend\nif <(screen) = [30]> then\n    switch costume to (ground8 v)\n    go to x: (-240) y: (-180)\n    repeat (3)\n        change y by (24)\n    end\n    repeat (19)\n        change x by (24)\n    end\n    repeat (5)\n        create clone of (_myself_ v)\n        change y by (24)\n    end\n    switch costume to (ground7 v)\n    create clone of (_myself_ v)\n    repeat (5)\n        change y by (24)\n    end\n    switch costume to (ground7flip v)\n    create clone of (_myself_ v)\n    change y by (24)\n    switch costume to (ground8 v)\n    create clone of (_myself_ v)\n    go to x: (-240) y: (180)\n    repeat (12)\n        change x by (24)\n    end\n    repeat (6)\n        change y by (-24)\n    end\n    switch costume to (ground7flip v)\n    create clone of (_myself_ v)\n    repeat (6)\n        change y by (24)\n        switch costume to (ground8 v)\n        create clone of (_myself_ v)\n    end\nend\nif <(screen) = [31]> then\n    switch costume to (ground8 v)\n    go to x: (-240) y: (-180)\n    repeat (3)\n        change y by (24)\n    end\n    repeat (19)\n        change x by (24)\n    end\n    repeat (8)\n        create clone of (_myself_ v)\n        change y by (24)\n    end\n    switch costume to (ground7 v)\n    create clone of (_myself_ v)\n    go to x: (-240) y: (180)\n    repeat (7)\n        change x by (24)\n    end\n    repeat (8)\n        change y by (-24)\n    end\n    change y by (12)\n    switch costume to (ground7flip v)\n    create clone of (_myself_ v)\n    repeat (8)\n        change y by (24)\n        switch costume to (ground8 v)\n        create clone of (_myself_ v)\n    end\n    go to x: (-240) y: (-180)\n    switch costume to (ground7bottom v)\n    repeat (7)\n        change y by (24)\n    end\n    repeat (8)\n        change x by (24)\n    end\n    repeat (7)\n        create clone of (_myself_ v)\n        change x by (24)\n    end\n    go to x: (-240) y: (-180)\n    repeat (11)\n        change y by (24)\n    end\n    repeat (12)\n        change x by (24)\n    end\n    repeat (7)\n        create clone of (_myself_ v)\n        change x by (24)\n    end\nend\nif <(screen) = [32]> then\n    switch costume to (ground8 v)\n    go to x: (-240) y: (-180)\n    repeat (3)\n        change y by (24)\n    end\n    repeat (19)\n        change x by (24)\n    end\n    repeat (9)\n        create clone of (_myself_ v)\n        change y by (24)\n    end\n    switch costume to (ground7 v)\n    create clone of (_myself_ v)\n    go to x: (-240) y: (-180)\n    switch costume to (ground7bottom v)\n    repeat (11)\n        change y by (24)\n    end\n    change y by (12)\n    repeat (8)\n        change x by (24)\n    end\n    repeat (11)\n        create clone of (_myself_ v)\n        change x by (24)\n    end\nend\nif <(screen) = [33]> then\n    switch costume to (ground8 v)\n    go to x: (-240) y: (-180)\n    repeat (12)\n        change y by (24)\n    end\n    change y by (12)\n    repeat (14)\n        change x by (24)\n    end\n    change x by (12)\n    repeat (5)\n        create clone of (_myself_ v)\n        change y by (-24)\n    end\n    switch costume to (ground7flip v)\n    create clone of (_myself_ v)\n    switch costume to (ground7bottom v)\n    go to x: (-240) y: (-180)\n    repeat (12)\n        change y by (24)\n    end\n    change y by (8)\n    repeat (5)\n        change x by (24)\n    end\n    repeat (14)\n        change y by (1)\n        change x by (24)\n        create clone of (_myself_ v)\n    end\nend\n\ndefine otherground5\nif <(screen) = [37]> then\n    go to x: (-240) y: (-180)\n    switch costume to (ground10 v)\n    repeat (3)\n        change y by (24)\n    end\n    repeat (4)\n        change x by (24)\n    end\n    repeat (2)\n        create clone of (_myself_ v)\n        change x by (24)\n    end\n    change y by (24)\n    switch costume to (ground9 v)\n    change x by (-48)\n    repeat (2)\n        create clone of (_myself_ v)\n        change x by (24)\n    end\n    repeat (3)\n        change y by (24)\n    end\n    repeat (3)\n        change x by (24)\n    end\n    switch costume to (fade block v)\n    create clone of (_myself_ v)\n    repeat (3)\n        change y by (-24)\n    end\n    repeat (8)\n        change x by (24)\n    end\n    change x by (12)\n    switch costume to (fade block v)\n    create clone of (_myself_ v)\nend\nif <(screen) = [38]> then\n    go to x: (-240) y: (-180)\n    switch costume to (ground10 v)\n    repeat (3)\n        change y by (24)\n    end\n    repeat (7)\n        change x by (24)\n    end\n    repeat (4)\n        repeat (2)\n            create clone of (_myself_ v)\n            change x by (24)\n        end\n        change y by (24)\n        change x by (-48)\n    end\n    switch costume to (ground9 v)\n    repeat (2)\n        create clone of (_myself_ v)\n        change x by (24)\n    end\n    go to x: (-240) y: (-180)\n    switch costume to (ground9bottom v)\n    repeat (9)\n        change y by (24)\n    end\n    repeat (13)\n        change x by (24)\n    end\n    repeat (6)\n        change x by (24)\n        create clone of (_myself_ v)\n    end\nend\nif <(screen) = [39]> then\n    switch costume to (ground10 v)\n    go to x: (-240) y: (-180)\n    repeat (3)\n        change y by (24)\n    end\n    repeat (18)\n        change x by (24)\n    end\n    repeat (5)\n        create clone of (_myself_ v)\n        change x by (24)\n        create clone of (_myself_ v)\n        change x by (-24)\n        change y by (24)\n    end\n    switch costume to (ground9 v)\n    create clone of (_myself_ v)\n    change x by (24)\n    create clone of (_myself_ v)\n    go to x: (-240) y: (-180)\n    repeat (4)\n        change y by (24)\n    end\n    repeat (6)\n        change x by (24)\n    end\n    switch costume to (fade block v)\n    repeat (4)\n        create clone of (_myself_ v)\n        change y by (24)\n        repeat (3)\n            change x by (20)\n        end\n    end\nend\nif <(screen) = [40]> then\n    switch costume to (ground10 v)\n    go to x: (-240) y: (-180)\n    repeat (3)\n        change y by (24)\n    end\n    repeat (19)\n        change x by (24)\n    end\n    repeat (5)\n        create clone of (_myself_ v)\n        change y by (24)\n    end\n    switch costume to (ground9 v)\n    create clone of (_myself_ v)\n    switch costume to (ground9bottom v)\n    repeat (16)\n        change x by (-24)\n        create clone of (_myself_ v)\n    end\nend\nif <(screen) = [41]> then\n    go to x: (-240) y: (-180)\n    repeat (3)\n        change y by (24)\n    end\n    repeat (5)\n        change x by (24)\n    end\n    repeat (2)\n        switch costume to (ground10 v)\n        repeat (4)\n            repeat (2)\n                create clone of (_myself_ v)\n                change x by (24)\n            end\n            change y by (24)\n            change x by (-48)\n        end\n        switch costume to (ground9 v)\n        repeat (2)\n            create clone of (_myself_ v)\n            change x by (24)\n        end\n        repeat (4)\n            change y by (-24)\n        end\n        repeat (6)\n            change x by (24)\n        end\n    end\n    go to x: (-240) y: (-180)\n    repeat (12)\n        change y by (24)\n    end\n    repeat (9)\n        change x by (24)\n    end\n    switch costume to (ground10 v)\n    repeat (3)\n        repeat (2)\n            create clone of (_myself_ v)\n            change x by (24)\n        end\n        change y by (-24)\n        change x by (-48)\n    end\n    switch costume to (ground9flip v)\n    repeat (2)\n        create clone of (_myself_ v)\n        change x by (24)\n    end\nend\nif <(screen) = [42]> then\n    switch costume to (ground10 v)\n    go to x: (-240) y: (-180)\n    repeat (3)\n        change y by (24)\n    end\n    repeat (19)\n        change x by (24)\n    end\n    repeat (7)\n        create clone of (_myself_ v)\n        change y by (24)\n    end\n    switch costume to (ground9 v)\n    create clone of (_myself_ v)\n    go to x: (-240) y: (-180)\n    switch costume to (ground9bottom v)\n    repeat (6)\n        change y by (24)\n    end\n    repeat (16)\n        create clone of (_myself_ v)\n        change x by (24)\n    end\n    repeat (2)\n        change x by (24)\n    end\n    repeat (4)\n        change y by (24)\n    end\n    repeat (16)\n        create clone of (_myself_ v)\n        change x by (-24)\n    end\nend\nif <(screen) = [43]> then\n    go to x: (-240) y: (-180)\n    repeat (3)\n        change y by (24)\n    end\n    repeat (5)\n        change x by (24)\n    end\n    repeat (2)\n        switch costume to (ground10 v)\n        repeat (2)\n            repeat (2)\n                create clone of (_myself_ v)\n                change x by (24)\n            end\n            change y by (24)\n            change x by (-48)\n        end\n        switch costume to (ground9 v)\n        repeat (2)\n            create clone of (_myself_ v)\n            change x by (24)\n        end\n        repeat (2)\n            change y by (-24)\n        end\n        repeat (6)\n            change x by (24)\n        end\n    end\nend\n\ndefine generate ground\nswitch costume to (join [Ground] ((level) * (2)))\ngo to x: (-240) y: (-180)\nrepeat (20)\n    create clone of (_myself_ v)\n    change x by (24)\nend\nset x to (-240)\nchange y by (24)\nif <not <(screen) = [45]>> then\n    repeat (20)\n        create clone of (_myself_ v)\n        change x by (24)\n    end\n    set x to (-240)\n    change y by (24)\nend\nswitch costume to (join [Ground] (((level) * (2)) - (1)))\nrepeat (20)\n    create clone of (_myself_ v)\n    change x by (24)\nend\nif <(level) = [5]> then\n    go to x: (-240) y: (156)\n    switch costume to (ground10 v)\n    repeat (20)\n        create clone of (_myself_ v)\n        change x by (24)\n    end\n    change y by (-24)\n    set x to (-240)\n    switch costume to (ground9flip v)\n    repeat (20)\n        create clone of (_myself_ v)\n        change x by (24)\n    end\nend\ngo [backward v] (3) layers\n\n@Danger\n\nwhen flag clicked\nset [deletes v] to [0]\nset size to (100) %\npoint in direction (90)\nhide\n\nwhen I receive [new screen v]\nset size to (100) %\ndelete this clone\n\nwhen I receive [level select v]\nset [screen v] to [0]\ndelete this clone\n\nwhen I receive [generating v]\nset [deletes v] to [0]\nif <(screen) = [1]> then\n    switch costume to (spike1 v)\n    go to x: (-240) y: (-180)\n    repeat (3)\n        change y by (24)\n    end\n    repeat (6)\n        change x by (24)\n    end\n    create clone of (_myself_ v)\n    repeat (5)\n        change x by (24)\n    end\n    switch costume to (spike2 v)\n    create clone of (_myself_ v)\n    change x by (24)\n    switch costume to (spike1 v)\n    create clone of (_myself_ v)\n    change x by (24)\nend\nif <(screen) = [3]> then\n    switch costume to (spike1 v)\n    go to x: (-240) y: (-180)\n    repeat (3)\n        change y by (24)\n    end\n    repeat (8)\n        change x by (24)\n    end\n    repeat (3)\n        switch costume to (spike1 v)\n        change x by (24)\n        create clone of (_myself_ v)\n    end\nend\nif <(screen) = [4]> then\n    switch costume to (spike2 v)\n    go to x: (-240) y: (-180)\n    repeat (3)\n        change y by (24)\n    end\n    repeat (3)\n        change x by (24)\n    end\n    repeat (13)\n        change x by (24)\n        switch costume to (spike2 v)\n        create clone of (_myself_ v)\n    end\n    set size to (120) %\n    switch costume to (saw v)\n    go to x: (-240) y: (-180)\n    change x by (36)\n    change y by (24)\n    repeat (4)\n        change y by (24)\n    end\n    repeat (5)\n        change x by (24)\n    end\n    repeat (3)\n        change x by (96)\n        change y by (24)\n    end\n    create clone of (_myself_ v)\n    set size to (100) %\nend\nif <(screen) = [5]> then\n    switch costume to (spike2 v)\n    go to x: (-240) y: (-180)\n    change x by (-2)\n    repeat (3)\n        change y by (24)\n    end\n    repeat (5)\n        change x by (24)\n    end\n    repeat (8)\n        change x by (24)\n        switch costume to (spike2 v)\n        create clone of (_myself_ v)\n    end\nend\nif <(screen) = [6]> then\n    switch costume to (spike2 v)\n    go to x: (-240) y: (-180)\n    change x by (-15)\n    repeat (3)\n        change y by (24)\n    end\n    repeat (4)\n        change x by (24)\n    end\n    repeat (7)\n        change x by (24)\n        switch costume to (spike2 v)\n        create clone of (_myself_ v)\n    end\n    switch costume to (spike2 v)\n    change x by (96)\n    create clone of (_myself_ v)\n    switch costume to (spike1 v)\n    change x by (24)\n    create clone of (_myself_ v)\nend\nif <(screen) = [7]> then\n    switch costume to (spike2 v)\n    go to x: (-240) y: (-180)\n    change x by (-15)\n    repeat (3)\n        change y by (24)\n    end\n    repeat (10)\n        change x by (24)\n    end\n    repeat (8)\n        change x by (24)\n        create clone of (_myself_ v)\n    end\nend\nif <(screen) = [8]> then\n    go to x: (-240) y: (-180)\n    repeat (3)\n        change y by (24)\n    end\n    repeat (8)\n        change x by (24)\n    end\n    switch costume to (spike1 v)\n    change x by (20)\n    create clone of (_myself_ v)\n    repeat (2)\n        switch costume to (spike3 v)\n        change x by (13)\n        create clone of (_myself_ v)\n        switch costume to (spike1 v)\n        change x by (13)\n        create clone of (_myself_ v)\n    end\nend\n\nwhen I receive [generating v]\nhide\nif <(screen) = [9]> then\n    switch costume to (spike1 v)\n    go to x: (-240) y: (-180)\n    repeat (3)\n        change y by (24)\n    end\n    repeat (5)\n        change x by (24)\n    end\n    switch costume to (spike2 v)\n    create clone of (_myself_ v)\n    change x by (24)\n    switch costume to (spike1 v)\n    create clone of (_myself_ v)\n    change x by (24)\n    repeat (7)\n        change x by (24)\n    end\n    switch costume to (spike1 v)\n    create clone of (_myself_ v)\n    change x by (24)\n    switch costume to (spike2 v)\n    create clone of (_myself_ v)\n    change x by (24)\nend\nif <(screen) = [10]> then\n    switch costume to (spike1 v)\n    go to x: (-240) y: (-180)\n    repeat (3)\n        change y by (24)\n    end\n    repeat (6)\n        change x by (24)\n    end\n    create clone of (_myself_ v)\n    switch costume to (spike2 v)\n    repeat (3)\n        change x by (24)\n        create clone of (_myself_ v)\n    end\n    repeat (9)\n        change x by (24)\n    end\n    create clone of (_myself_ v)\n    change x by (20)\n    switch costume to (spike1 v)\n    create clone of (_myself_ v)\n    change x by (24)\nend\nif <(screen) = [11]> then\n    switch costume to (spike1 v)\n    go to x: (-240) y: (-180)\n    repeat (6)\n        change y by (24)\n    end\n    repeat (11)\n        change x by (24)\n    end\n    change x by (-5)\n    repeat (2)\n        change x by (24)\n        create clone of (_myself_ v)\n    end\nend\nif <(screen) = [12]> then\n    switch costume to (spike1 v)\n    go to x: (-240) y: (-180)\n    repeat (3)\n        change y by (24)\n    end\n    repeat (6)\n        change x by (24)\n    end\n    create clone of (_myself_ v)\n    repeat (7)\n        change x by (24)\n    end\n    change x by (-2)\n    create clone of (_myself_ v)\nend\nif <(screen) = [13]> then\n    switch costume to (saw v)\n    set size to (250) %\n    go to x: (-240) y: (-180)\n    repeat (3)\n        change y by (24)\n    end\n    repeat (6)\n        change x by (24)\n    end\n    create clone of (_myself_ v)\n    repeat (10)\n        change x by (24)\n    end\n    switch costume to (spike1 v)\n    set size to (100) %\n    repeat (3)\n        create clone of (_myself_ v)\n        change x by (24)\n    end\nend\nif <(screen) = [14]> then\n    switch costume to (spike1 v)\n    go to x: (-240) y: (-180)\n    repeat (3)\n        change y by (24)\n    end\n    repeat (6)\n        change x by (24)\n    end\n    repeat (3)\n        create clone of (_myself_ v)\n        change x by (24)\n    end\n    repeat (6)\n        change x by (24)\n    end\n    repeat (5)\n        create clone of (_myself_ v)\n        change x by (24)\n    end\nend\nif <(screen) = [15]> then\n    switch costume to (spike3 v)\n    go to x: (-240) y: (-180)\n    repeat (3)\n        change y by (24)\n    end\n    change y by (1)\n    repeat (2)\n        change x by (24)\n    end\n    create clone of (_myself_ v)\nend\nif <(screen) = [16]> then\n    switch costume to (spike3 v)\n    go to x: (-240) y: (-180)\n    repeat (3)\n        change y by (24)\n    end\n    change y by (1)\n    repeat (5)\n        change x by (24)\n    end\n    create clone of (_myself_ v)\n    repeat (8)\n        change x by (24)\n    end\n    create clone of (_myself_ v)\nend\n\nwhen I receive [generating v]\nhide\nif <(screen) = [27]> then\n    switch costume to (spike1 v)\n    go to x: (-240) y: (-180)\n    repeat (3)\n        change y by (24)\n    end\n    repeat (4)\n        change x by (24)\n    end\n    create clone of (_myself_ v)\n    repeat (4)\n        change x by (24)\n    end\n    create clone of (_myself_ v)\n    change x by (24)\n    switch costume to (spike2 v)\n    create clone of (_myself_ v)\nend\nif <(screen) = [28]> then\n    switch costume to (spike5 v)\n    go to x: (-240) y: (-180)\n    repeat (3)\n        change y by (24)\n    end\n    repeat (5)\n        change x by (24)\n    end\n    create clone of (_myself_ v)\n    change x by (24)\n    switch costume to (spike4 v)\n    repeat (13)\n        create clone of (_myself_ v)\n        change x by (24)\n    end\nend\nif <(screen) = [30]> then\n    switch costume to (spike5 v)\n    go to x: (-240) y: (-180)\n    repeat (3)\n        change y by (24)\n    end\n    repeat (5)\n        change x by (24)\n    end\n    create clone of (_myself_ v)\n    change x by (24)\n    switch costume to (spike4 v)\n    create clone of (_myself_ v)\n    change x by (24)\n    switch costume to (spike6 v)\n    create clone of (_myself_ v)\n    repeat (3)\n        change x by (24)\n    end\n    switch costume to (spike1 v)\n    create clone of (_myself_ v)\n    change x by (24)\n    switch costume to (spike2 v)\n    repeat (4)\n        change x by (24)\n    end\n    switch costume to (spike5 v)\n    create clone of (_myself_ v)\n    switch costume to (spike4 v)\n    repeat (3)\n        change x by (24)\n        create clone of (_myself_ v)\n    end\n    create clone of (_myself_ v)\n    switch costume to (saw v)\n    go to x: (-240) y: (-180)\n    repeat (3)\n        change y by (24)\n    end\n    repeat (6)\n        change x by (24)\n    end\n    change x by (12)\n    set size to (150) %\n    create clone of (_myself_ v)\nend\nif <(screen) = [31]> then\n    switch costume to (spike5 v)\n    go to x: (-240) y: (-180)\n    repeat (3)\n        change y by (24)\n    end\n    repeat (6)\n        change x by (24)\n    end\n    switch costume to (spike5 v)\n    create clone of (_myself_ v)\n    switch costume to (spike4 v)\n    repeat (12)\n        change x by (24)\n        create clone of (_myself_ v)\n    end\n    create clone of (_myself_ v)\n    switch costume to (spike2 v)\n    go to x: (-240) y: (-180)\n    repeat (8)\n        change y by (24)\n    end\n    repeat (8)\n        change x by (24)\n    end\n    create clone of (_myself_ v)\n    repeat (4)\n        change x by (24)\n    end\n    create clone of (_myself_ v)\n    go to x: (-240) y: (-180)\n    repeat (12)\n        change y by (24)\n    end\n    repeat (14)\n        change x by (24)\n    end\n    create clone of (_myself_ v)\n    repeat (4)\n        change x by (24)\n    end\n    create clone of (_myself_ v)\nend\nif <(screen) = [32]> then\n    switch costume to (spike2 v)\n    go to x: (-240) y: (-180)\n    repeat (3)\n        change y by (24)\n    end\n    repeat (6)\n        change x by (24)\n    end\n    repeat (1)\n        change x by (24)\n        create clone of (_myself_ v)\n    end\n    repeat (3)\n        change x by (24)\n    end\n    repeat (2)\n        change x by (24)\n        create clone of (_myself_ v)\n    end\n    repeat (2)\n        change x by (24)\n    end\n    repeat (4)\n        change x by (24)\n        create clone of (_myself_ v)\n    end\n    switch costume to (saw3 v)\n    go to x: (-240) y: (-180)\n    repeat (7)\n        change y by (24)\n    end\n    change x by (12)\n    repeat (19)\n        create clone of (_myself_ v)\n        change x by (24)\n    end\n    go to x: (-240) y: (-180)\n    switch costume to (saw4 v)\n    repeat (12)\n        change y by (24)\n    end\n    change x by (12)\n    repeat (8)\n        create clone of (_myself_ v)\n        change x by (24)\n    end\n    switch costume to (spike1 v)\nend\n\nwhen I receive [generating v]\nif <(screen) = [33]> then\n    switch costume to (spike5 v)\n    go to x: (-240) y: (-180)\n    repeat (13)\n        change y by (24)\n    end\n    change y by (8)\n    repeat (5)\n        change x by (24)\n    end\n    change x by (24)\n    create clone of (_myself_ v)\n    switch costume to (spike4 v)\n    repeat (13)\n        change y by (1)\n        change x by (24)\n        create clone of (_myself_ v)\n    end\n    switch costume to (spike5 v)\n    go to x: (-240) y: (-180)\n    repeat (3)\n        change y by (24)\n    end\n    repeat (8)\n        change x by (24)\n    end\n    create clone of (_myself_ v)\n    change x by (24)\n    switch costume to (spike4 v)\n    repeat (5)\n        create clone of (_myself_ v)\n        change x by (24)\n    end\n    switch costume to (spike6 v)\n    create clone of (_myself_ v)\n    go to x: (-240) y: (-180)\n    switch costume to (saw5 v)\n    change y by (18)\n    repeat (3)\n        change y by (24)\n    end\n    repeat (15)\n        change x by (24)\n    end\n    repeat (4)\n        create clone of (_myself_ v)\n        change y by (24)\n    end\n    switch costume to (spike1 v)\nend\nif <(screen) = [34]> then\n    switch costume to (spike2 v)\n    go to x: (-240) y: (-180)\n    repeat (3)\n        change y by (24)\n    end\n    repeat (9)\n        change x by (24)\n    end\n    repeat (2)\n        change x by (24)\n        create clone of (_myself_ v)\n    end\n    switch costume to (saw6 v)\n    change x by (12)\n    repeat (8)\n        change x by (24)\n        create clone of (_myself_ v)\n    end\n    switch costume to (spike1 v)\nend\nif <(screen) = [42]> then\n    switch costume to (spike7 v)\n    go to x: (-240) y: (-180)\n    repeat (3)\n        change y by (24)\n    end\n    repeat (4)\n        change x by (24)\n    end\n    switch costume to (spike7 v)\n    repeat (3)\n        change x by (24)\n    end\n    change x by (-12)\n    repeat (3)\n        create clone of (_myself_ v)\n        change x by (24)\n    end\n    switch costume to (spike11 v)\n    change y by (48)\n    change x by (12)\n    repeat (3)\n        create clone of (_myself_ v)\n        change x by (24)\n    end\n    change y by (-48)\n    repeat (2)\n        change x by (24)\n    end\n    repeat (4)\n        change y by (24)\n    end\n    repeat (2)\n        switch costume to (spike7 v)\n        repeat (3)\n            change x by (-24)\n        end\n        create clone of (_myself_ v)\n        switch costume to (spike11 v)\n        repeat (3)\n            change x by (-24)\n        end\n        change y by (48)\n        create clone of (_myself_ v)\n        change y by (-48)\n    end\n    switch costume to (spike8 v)\n    go to x: (-240) y: (-180)\n    repeat (11)\n        change y by (24)\n    end\n    repeat (3)\n        change x by (24)\n    end\n    create clone of (_myself_ v)\nend\nif <(screen) = [43]> then\n    switch costume to (spike10 v)\n    go to x: (-240) y: (-180)\n    repeat (12)\n        change y by (24)\n    end\n    repeat (20)\n        create clone of (_myself_ v)\n        change x by (24)\n    end\n    switch costume to (spike8 v)\n    go to x: (-240) y: (-180)\n    repeat (3)\n        change y by (24)\n    end\n    repeat (6)\n        change x by (24)\n    end\n    repeat (7)\n        change x by (24)\n        create clone of (_myself_ v)\n    end\nend\nif <(screen) = [44]> then\n    switch costume to (spike8 v)\n    go to x: (-240) y: (-180)\n    repeat (3)\n        change y by (24)\n    end\n    repeat (5)\n        change x by (24)\n    end\n    create clone of (_myself_ v)\n    repeat (9)\n        change x by (24)\n    end\n    create clone of (_myself_ v)\nend\nif <(screen) = [46]> then\n    switch costume to (fade spike v)\n    go to x: (-240) y: (-180)\n    repeat (3)\n        change y by (24)\n    end\n    repeat (6)\n        change x by (24)\n    end\n    create clone of (_myself_ v)\n    repeat (5)\n        change x by (24)\n    end\n    create clone of (_myself_ v)\n    change x by (24)\n    create clone of (_myself_ v)\n    change x by (24)\nend\n\nwhen I receive [generating v]\nclear graphic effects\nhide\nif <(screen) = [17]> then\n    switch costume to (spike1 v)\n    go to x: (-240) y: (-180)\n    repeat (3)\n        change y by (24)\n    end\n    repeat (3)\n        change x by (24)\n    end\n    create clone of (_myself_ v)\n    repeat (5)\n        change x by (24)\n    end\n    switch costume to (spike2 v)\n    create clone of (_myself_ v)\n    change x by (24)\n    switch costume to (spike1 v)\n    create clone of (_myself_ v)\n    change x by (24)\n    repeat (4)\n        change x by (24)\n    end\n    switch costume to (spike1 v)\n    repeat (3)\n        create clone of (_myself_ v)\n        change x by (24)\n    end\nend\nif <(screen) = [18]> then\n    switch costume to (spike1 v)\n    go to x: (-240) y: (-180)\n    repeat (3)\n        change y by (24)\n    end\n    repeat (8)\n        change x by (24)\n    end\n    switch costume to (spike1 v)\n    create clone of (_myself_ v)\n    change x by (24)\n    switch costume to (spike2 v)\n    create clone of (_myself_ v)\n    repeat (6)\n        change x by (24)\n    end\n    switch costume to (spike1 v)\n    change x by (20)\n    create clone of (_myself_ v)\n    repeat (2)\n        switch costume to (spike3 v)\n        change x by (13)\n        create clone of (_myself_ v)\n        switch costume to (spike1 v)\n        change x by (13)\n        create clone of (_myself_ v)\n    end\nend\nif <(screen) = [19]> then\n    switch costume to (spike1 v)\n    go to x: (-240) y: (-180)\n    repeat (3)\n        change y by (24)\n    end\n    repeat (3)\n        change x by (24)\n    end\n    create clone of (_myself_ v)\n    switch costume to (spike2 v)\n    repeat (4)\n        change x by (24)\n    end\n    repeat (11)\n        change x by (24)\n        create clone of (_myself_ v)\n    end\nend\nif <(screen) = [20]> then\n    switch costume to (spike1 v)\n    go to x: (-240) y: (-180)\n    change x by (-2)\n    repeat (3)\n        change y by (24)\n    end\n    repeat (8)\n        change x by (24)\n    end\n    create clone of (_myself_ v)\n    repeat (7)\n        change x by (24)\n    end\n    repeat (2)\n        change x by (24)\n        create clone of (_myself_ v)\n    end\nend\nif <(screen) = [21]> then\n    switch costume to (spike1 v)\n    go to x: (-240) y: (-180)\n    repeat (6)\n        change y by (24)\n    end\n    repeat (15)\n        change x by (24)\n    end\n    create clone of (_myself_ v)\n    switch costume to (spike2 v)\n    repeat (4)\n        change y by (24)\n    end\n    create clone of (_myself_ v)\n    change x by (-24)\n    repeat (2)\n        change x by (-24)\n    end\n    repeat (3)\n        create clone of (_myself_ v)\n        change x by (-24)\n    end\nend\nif <(screen) = [22]> then\n    switch costume to (spike1 v)\n    go to x: (-240) y: (-180)\n    repeat (3)\n        change y by (24)\n    end\n    repeat (5)\n        change x by (24)\n    end\n    repeat (1)\n        change x by (24)\n        create clone of (_myself_ v)\n    end\n    repeat (9)\n        change x by (24)\n    end\n    create clone of (_myself_ v)\n    switch costume to (spike2 v)\n    repeat (4)\n        change x by (24)\n        create clone of (_myself_ v)\n    end\nend\nif <(screen) = [23]> then\n    switch costume to (spike1 v)\n    go to x: (-240) y: (-180)\n    repeat (3)\n        change y by (24)\n    end\n    repeat (4)\n        change x by (24)\n    end\n    create clone of (_myself_ v)\n    repeat (2)\n        change x by (24)\n    end\n    repeat (2)\n        change x by (24)\n        create clone of (_myself_ v)\n    end\n    repeat (3)\n        change x by (24)\n    end\n    repeat (3)\n        change x by (24)\n        create clone of (_myself_ v)\n    end\n    change x by (48)\n    switch costume to (spike3 v)\n    create clone of (_myself_ v)\nend\nif <(screen) = [24]> then\n    switch costume to (spike2 v)\n    go to x: (-240) y: (-180)\n    change x by (-12)\n    repeat (3)\n        change y by (24)\n    end\n    repeat (5)\n        change x by (24)\n    end\n    repeat (6)\n        change x by (24)\n        create clone of (_myself_ v)\n    end\nend\nif <(screen) = [26]> then\n    switch costume to (spike1 v)\n    go to x: (-240) y: (-180)\n    change x by (-12)\n    repeat (3)\n        change y by (24)\n    end\n    repeat (8)\n        change x by (24)\n    end\n    repeat (3)\n        change x by (24)\n        create clone of (_myself_ v)\n    end\nend\n\nwhen I receive [down v]\nif <(costume [number v]) = [13]> then\n    hide\n    wait (1) seconds\n    set [ghost v] effect to (100)\n    show\n    if <(lag prev) = [0]> then\n        repeat (25)\n            change [ghost v] effect by (-4)\n        end\n    else\n        clear graphic effects\n    end\nend\n\nwhen I receive [orb v]\nif <(costume [number v]) = [12]> then\n    hide\n    wait (2) seconds\n    set [ghost v] effect to (100)\n    show\n    if <(lag prev) = [0]> then\n        repeat (25)\n            change [ghost v] effect by (-4)\n        end\n    else\n        clear graphic effects\n    end\nend\n\nwhen I receive [right v]\nif <(costume [number v]) = [11]> then\n    hide\n    wait (1) seconds\n    set [ghost v] effect to (100)\n    show\n    if <(lag prev) = [0]> then\n        repeat (25)\n            change [ghost v] effect by (-4)\n        end\n    else\n        clear graphic effects\n    end\nend\n\nwhen I receive [generating v]\nif <(screen) = [37]> then\n    switch costume to (saw v)\n    go to x: (-240) y: (-180)\n    repeat (3)\n        change y by (24)\n    end\n    repeat (6)\n        change x by (24)\n    end\n    create clone of (_myself_ v)\n    switch costume to (spike8 v)\n    repeat (9)\n        change x by (24)\n    end\n    repeat (4)\n        change x by (24)\n        create clone of (_myself_ v)\n    end\nend\nif <(screen) = [38]> then\n    switch costume to (spike10 v)\n    go to x: (-240) y: (-180)\n    repeat (12)\n        change y by (24)\n    end\n    repeat (4)\n        change x by (24)\n    end\n    repeat (15)\n        change x by (24)\n        create clone of (_myself_ v)\n    end\n    switch costume to (saw v)\n    set size to (150) %\n    go to x: (-240) y: (-180)\n    repeat (7)\n        change y by (24)\n    end\n    repeat (10)\n        change x by (24)\n    end\n    create clone of (_myself_ v)\n    switch costume to (spike8 v)\n    set size to (100) %\n    go to x: (-240) y: (-180)\n    repeat (3)\n        change y by (24)\n    end\n    repeat (8)\n        change x by (24)\n    end\n    repeat (11)\n        change x by (24)\n        create clone of (_myself_ v)\n    end\nend\nif <(screen) = [39]> then\n    switch costume to (spike8 v)\n    go to x: (-240) y: (-180)\n    repeat (3)\n        change y by (24)\n    end\n    repeat (4)\n        change x by (24)\n    end\n    repeat (14)\n        change x by (24)\n        create clone of (_myself_ v)\n    end\n    switch costume to (fade spike v)\n    repeat (6)\n        change y by (24)\n    end\n    repeat (2)\n        create clone of (_myself_ v)\n        change x by (24)\n    end\n    switch costume to (spike10 v)\n    go to x: (-240) y: (-180)\n    repeat (12)\n        change y by (24)\n    end\n    repeat (17)\n        create clone of (_myself_ v)\n        change x by (24)\n    end\nend\nif <(screen) = [40]> then\n    set [clone? v] to [1]\n    switch costume to (saw v)\n    set size to (150) %\n    go to x: (-240) y: (-180)\n    repeat (8)\n        change y by (24)\n    end\n    change y by (12)\n    repeat (13)\n        change x by (24)\n    end\n    change x by (-12)\n    repeat (2)\n        create clone of (_myself_ v)\n        change x by (-36)\n    end\n    repeat (4)\n        change x by (-24)\n    end\n    create clone of (_myself_ v)\n    set size to (100) %\n    switch costume to (spike8 v)\n    go to x: (-240) y: (-180)\n    repeat (3)\n        change y by (24)\n    end\n    repeat (3)\n        change x by (24)\n    end\n    create clone of (_myself_ v)\n    repeat (13)\n        change x by (24)\n    end\n    create clone of (_myself_ v)\n    switch costume to (spike10 v)\n    go to x: (-240) y: (-180)\n    repeat (12)\n        change y by (24)\n    end\n    repeat (20)\n        create clone of (_myself_ v)\n        change x by (24)\n    end\n    wait until <(gamemode) = [3]>\n    switch costume to (spike8 v)\n    go to x: (-240) y: (-180)\n    repeat (3)\n        change y by (24)\n    end\n    repeat (3)\n        change x by (24)\n    end\n    repeat (14)\n        create clone of (_myself_ v)\n        change x by (24)\n    end\nend\nif <(screen) = [41]> then\n    switch costume to (spike8 v)\n    go to x: (-240) y: (-180)\n    repeat (8)\n        change y by (24)\n    end\n    repeat (4)\n        change x by (24)\n    end\n    repeat (2)\n        change x by (24)\n        create clone of (_myself_ v)\n    end\n    repeat (2)\n        change x by (24)\n    end\n    switch costume to (spike10 v)\n    repeat (2)\n        change x by (24)\n        create clone of (_myself_ v)\n    end\n    repeat (2)\n        change x by (24)\n    end\n    switch costume to (spike8 v)\n    repeat (2)\n        change x by (24)\n        create clone of (_myself_ v)\n    end\nend\nif <(screen) = [56]> then\n    switch costume to (spike12 v)\n    go to x: (-240) y: (-180)\n    repeat (4)\n        change y by (24)\n    end\n    repeat (6)\n        change x by (24)\n    end\n    repeat (2)\n        switch costume to (spike12 v)\n        create clone of (_myself_ v)\n        repeat (2)\n            change x by (24)\n        end\n        switch costume to (spike17 v)\n        create clone of (_myself_ v)\n        repeat (3)\n            change x by (24)\n        end\n    end\nend\nif <(screen) = [57]> then\n    switch costume to (spike12 v)\n    go to x: (-240) y: (-180)\n    repeat (3)\n        change y by (24)\n    end\n    repeat (4)\n        change x by (24)\n    end\n    create clone of (_myself_ v)\n    repeat (11)\n        change x by (24)\n    end\n    create clone of (_myself_ v)\nend\nif <(screen) = [58]> then\n    switch costume to (spike14 v)\n    go to x: (-240) y: (-180)\n    repeat (3)\n        change y by (24)\n    end\n    repeat (4)\n        change x by (24)\n    end\n    create clone of (_myself_ v)\n    switch costume to (spike12 v)\n    change x by (24)\n    create clone of (_myself_ v)\n    switch costume to (spike14 v)\n    change x by (24)\n    create clone of (_myself_ v)\n    change x by (24)\n    create clone of (_myself_ v)\n    switch costume to (spike12 v)\n    change x by (24)\n    create clone of (_myself_ v)\n    switch costume to (spike14 v)\n    change x by (24)\n    create clone of (_myself_ v)\n    switch costume to (spike12 v)\n    change x by (24)\n    change y by (24)\n    create clone of (_myself_ v)\n    switch costume to (spike14 v)\n    change x by (24)\n    create clone of (_myself_ v)\n    change x by (24)\n    change y by (24)\n    create clone of (_myself_ v)\n    change x by (24)\n    create clone of (_myself_ v)\n    switch costume to (spike12 v)\n    change x by (24)\n    create clone of (_myself_ v)\n    change x by (24)\n    create clone of (_myself_ v)\n    switch costume to (spike16 v)\n    go to x: (-240) y: (-180)\n    repeat (5)\n        change y by (24)\n    end\n    create clone of (_myself_ v)\n    switch costume to (spike18 v)\n    change x by (24)\n    change y by (24)\n    create clone of (_myself_ v)\n    change x by (24)\n    change y by (-24)\n    create clone of (_myself_ v)\n    change x by (24)\n    change y by (24)\n    switch costume to (spike16 v)\n    create clone of (_myself_ v)\n    switch costume to (spike18 v)\n    change x by (24)\n    create clone of (_myself_ v)\n    change x by (24)\n    change y by (24)\n    create clone of (_myself_ v)\n    switch costume to (spike16 v)\n    change x by (24)\n    change y by (-24)\n    create clone of (_myself_ v)\n    change x by (24)\n    change y by (24)\n    create clone of (_myself_ v)\n    switch costume to (spike18 v)\n    change x by (24)\n    create clone of (_myself_ v)\n    switch costume to (spike16 v)\n    change x by (24)\n    create clone of (_myself_ v)\n    switch costume to (spike18 v)\n    change x by (24)\n    change y by (24)\n    create clone of (_myself_ v)\n    switch costume to (spike16 v)\n    change x by (24)\n    create clone of (_myself_ v)\n    change x by (24)\n    create clone of (_myself_ v)\nend\n\nwhen I receive [left v]\nif <(costume [number v]) = [10]> then\n    hide\n    wait (1) seconds\n    set [ghost v] effect to (100)\n    show\n    if <(lag prev) = [0]> then\n        repeat (25)\n            change [ghost v] effect by (-4)\n        end\n    else\n        clear graphic effects\n    end\nend\n\nwhen I start as a clone\nif <(costume [number v]) = [18]> then\n    forever\n        go to [front v] layer\n        go [backward v] (1) layers\n        set [ghost v] effect to ((distance to [player v]) * (2.5))\n    end\nend\n\nwhen I receive [die v]\nif <(deletes) = [1]> then\n    repeat (2)\n        change [ghost v] effect by (50)\n    end\n    delete this clone\nend\n\nwhen I start as a clone\nshow\nif <<(level) = [3]> or > then\n    set [brightness v] effect to (-50)\nend\nif <(costume [number v]) = [5]> then\n    switch costume to (saw2 v)\n    create clone of (_myself_ v)\n    switch costume to (saw v)\n    forever\n        go to [front v] layer\n        go [backward v] (3) layers\n        if <(lag prev) = [0]> then\n            turn left (10) degrees\n        end\n    end\nend\nif <(costume [number v]) = [6]> then\n    forever\n        go to [front v] layer\n        go [backward v] (2) layers\n    end\nend\nif <(costume [number v]) = [4]> then\n    go to [front v] layer\n    go [backward v] (2) layers\nend\nif <(costume [number v]) = [10]> then\n    forever\n        go to [front v] layer\n        go [backward v] (3) layers\n        if <(lag prev) = [0]> then\n            turn left (-10) degrees\n        end\n    end\nend\nif <(costume [number v]) = [11]> then\n    forever\n        go to [front v] layer\n        go [backward v] (3) layers\n        if <(lag prev) = [0]> then\n            turn left (-10) degrees\n        end\n    end\nend\nif <(costume [number v]) = [12]> then\n    forever\n        go to [front v] layer\n        go [backward v] (3) layers\n        if <(lag prev) = [0]> then\n            turn left (-10) degrees\n        end\n    end\nend\nif <(costume [number v]) = [13]> then\n    forever\n        go to [front v] layer\n        go [backward v] (3) layers\n        if <(lag prev) = [0]> then\n            turn left (-10) degrees\n        end\n    end\nend\n\nwhen I receive [generating v]\nif <(screen) = [47]> then\n    switch costume to (spike12 v)\n    go to x: (-240) y: (-180)\n    repeat (3)\n        change y by (24)\n    end\n    repeat (6)\n        change x by (24)\n    end\n    create clone of (_myself_ v)\n    repeat (6)\n        change x by (24)\n    end\n    create clone of (_myself_ v)\n    repeat (2)\n        switch costume to (spike14 v)\n        change x by (14)\n        create clone of (_myself_ v)\n        switch costume to (spike12 v)\n        change x by (14)\n        create clone of (_myself_ v)\n    end\nend\nif <(screen) = [48]> then\n    switch costume to (spike12 v)\n    go to x: (-240) y: (-180)\n    repeat (3)\n        change y by (24)\n    end\n    repeat (6)\n        change x by (24)\n    end\n    create clone of (_myself_ v)\n    repeat (6)\n        change x by (24)\n    end\n    create clone of (_myself_ v)\n    change x by (24)\n    create clone of (_myself_ v)\nend\nif <(screen) = [49]> then\n    switch costume to (spike13 v)\n    go to x: (-240) y: (-180)\n    repeat (3)\n        change y by (24)\n    end\n    repeat (5)\n        change x by (24)\n    end\n    repeat (14)\n        change x by (24)\n        create clone of (_myself_ v)\n    end\nend\nif <(screen) = [50]> then\n    switch costume to (spike16 v)\n    go to x: (-240) y: (-180)\n    repeat (8)\n        change y by (24)\n    end\n    repeat (7)\n        change x by (24)\n    end\n    repeat (3)\n        create clone of (_myself_ v)\n        change x by (24)\n    end\n    repeat (2)\n        change x by (24)\n    end\n    switch costume to (spike15 v)\n    repeat (2)\n        create clone of (_myself_ v)\n        change x by (24)\n    end\n    switch costume to (spike12 v)\n    go to x: (-240) y: (-180)\n    repeat (3)\n        change y by (24)\n    end\n    repeat (10)\n        change x by (24)\n    end\n    repeat (3)\n        create clone of (_myself_ v)\n        change x by (24)\n    end\nend\nif <(screen) = [51]> then\n    switch costume to (spike12 v)\n    go to x: (-240) y: (-180)\n    repeat (3)\n        change y by (24)\n    end\n    repeat (3)\n        change x by (24)\n    end\n    repeat (2)\n        create clone of (_myself_ v)\n        repeat (6)\n            change x by (24)\n        end\n    end\n    change x by (24)\n    repeat (3)\n        change x by (24)\n        create clone of (_myself_ v)\n    end\nend\nif <(screen) = [52]> then\n    switch costume to (spike13 v)\n    go to x: (-240) y: (-180)\n    repeat (3)\n        change y by (24)\n    end\n    repeat (3)\n        change x by (24)\n    end\n    repeat (16)\n        change x by (24)\n        create clone of (_myself_ v)\n    end\n    switch costume to (spike16 v)\n    go to x: (-240) y: (-180)\n    repeat (13)\n        change y by (24)\n    end\n    repeat (15)\n        change x by (24)\n    end\n    repeat (3)\n        change x by (24)\n        create clone of (_myself_ v)\n    end\nend\nif <(screen) = [53]> then\n    switch costume to (spike12 v)\n    go to x: (-240) y: (-180)\n    repeat (3)\n        change y by (24)\n    end\n    repeat (4)\n        change x by (24)\n    end\n    create clone of (_myself_ v)\n    repeat (8)\n        change x by (24)\n    end\n    repeat (3)\n        change x by (24)\n        create clone of (_myself_ v)\n    end\nend\nif <(screen) = [54]> then\n    switch costume to (spike14 v)\n    go to x: (-240) y: (-180)\n    repeat (8)\n        change y by (24)\n    end\n    repeat (5)\n        change x by (24)\n    end\n    repeat (15)\n        create clone of (_myself_ v)\n        change x by (24)\n    end\n    switch costume to (spike15 v)\n    go to x: (-240) y: (-180)\n    repeat (5)\n        change y by (24)\n    end\n    repeat (5)\n        change x by (24)\n    end\n    repeat (15)\n        create clone of (_myself_ v)\n        change x by (24)\n    end\n    switch costume to (spike13 v)\n    go to x: (-240) y: (-180)\n    repeat (3)\n        change y by (24)\n    end\n    repeat (5)\n        change x by (24)\n    end\n    repeat (15)\n        create clone of (_myself_ v)\n        change x by (24)\n    end\nend\nif <(screen) = [55]> then\n    switch costume to (spike12 v)\n    go to x: (-240) y: (-180)\n    repeat (3)\n        change y by (24)\n    end\n    repeat (5)\n        change x by (24)\n    end\n    repeat (2)\n        create clone of (_myself_ v)\n        change x by (24)\n    end\n    repeat (5)\n        change x by (24)\n    end\n    repeat (3)\n        create clone of (_myself_ v)\n        change x by (24)\n    end\n    switch costume to (spike16 v)\n    go to x: (-240) y: (-180)\n    repeat (8)\n        change y by (24)\n    end\n    repeat (6)\n        change x by (24)\n    end\n    repeat (3)\n        create clone of (_myself_ v)\n        change x by (24)\n    end\n    repeat (5)\n        change x by (24)\n    end\n    repeat (2)\n        create clone of (_myself_ v)\n        change x by (24)\n    end\n    switch costume to (spike12 v)\n    go to x: (-240) y: (-180)\n    repeat (10)\n        change y by (24)\n    end\n    repeat (7)\n        change x by (24)\n    end\n    create clone of (_myself_ v)\n    repeat (6)\n        change x by (24)\n    end\n    change x by (7)\n    create clone of (_myself_ v)\n    repeat (2)\n        switch costume to (spike14 v)\n        change x by (14)\n        create clone of (_myself_ v)\n        switch costume to (spike12 v)\n        change x by (14)\n        create clone of (_myself_ v)\n    end\nend\nif <(screen) = [59]> then\n    switch costume to (spike12 v)\n    go to x: (-240) y: (-180)\n    repeat (3)\n        change y by (24)\n    end\n    repeat (4)\n        change x by (24)\n    end\n    create clone of (_myself_ v)\n    repeat (4)\n        change x by (24)\n    end\n    repeat (2)\n        change x by (24)\n        create clone of (_myself_ v)\n    end\nend\nif <(screen) = [60]> then\n    switch costume to (spike12 v)\n    go to x: (-240) y: (-180)\n    repeat (3)\n        change y by (24)\n    end\n    repeat (6)\n        change x by (24)\n    end\n    create clone of (_myself_ v)\n    repeat (5)\n        change x by (24)\n    end\n    switch costume to (spike13 v)\n    create clone of (_myself_ v)\n    change x by (24)\n    switch costume to (spike12 v)\n    create clone of (_myself_ v)\n    change x by (24)\nend\n\n@Special\n\nwhen I receive [generating v]\nif <(screen) = [3]> then\n    switch costume to (jump v)\n    go to x: (-240) y: (-180)\n    repeat (3)\n        change y by (24)\n    end\n    repeat (18)\n        change x by (24)\n    end\n    create clone of (_myself_ v)\nend\nif <(screen) = [5]> then\n    switch costume to (up v)\n    go to x: (-240) y: (-180)\n    repeat (4)\n        change y by (24)\n    end\n    repeat (8)\n        change x by (24)\n    end\n    create clone of (_myself_ v)\n    repeat (3)\n        change x by (24)\n    end\n    create clone of (_myself_ v)\nend\nif <(screen) = [6]> then\n    switch costume to (up v)\n    go to x: (-240) y: (-180)\n    repeat (4)\n        change y by (24)\n    end\n    repeat (6)\n        change x by (24)\n    end\n    create clone of (_myself_ v)\n    repeat (3)\n        change x by (24)\n    end\n    change y by (24)\n    create clone of (_myself_ v)\n    repeat (2)\n        change x by (24)\n    end\nend\nif <(screen) = [7]> then\n    switch costume to (up v)\n    go to x: (-240) y: (-180)\n    change x by (12)\n    repeat (5)\n        change y by (24)\n    end\n    change x by (24)\n    repeat (3)\n        create clone of (_myself_ v)\n        repeat (2)\n            change y by (24)\n        end\n    end\n    switch costume to (coin v)\n    go to x: (-240) y: (-180)\n    repeat (10)\n        change y by (24)\n    end\n    repeat (4)\n        change x by (24)\n    end\n    create clone of (_myself_ v)\n    switch costume to (jump v)\n    go to x: (-240) y: (-180)\n    repeat (3)\n        change y by (24)\n    end\n    repeat (10)\n        change x by (24)\n    end\n    create clone of (_myself_ v)\n    switch costume to (up v)\n    go to x: (-240) y: (-180)\n    change x by (12)\n    repeat (4)\n        change y by (24)\n    end\n    repeat (15)\n        change x by (24)\n    end\n    create clone of (_myself_ v)\nend\n\nwhen flag clicked\ndelete (all) of [coins collected v]\nset [coins v] to [0]\nhide\n\nwhen I receive [new screen v]\ndelete this clone\n\nwhen I receive [level select v]\nset [screen v] to [0]\ndelete this clone\n\nwhen I receive [generating v]\nif <(screen) = [10]> then\n    switch costume to (jump v)\n    go to x: (-240) y: (-180)\n    repeat (3)\n        change y by (24)\n    end\n    repeat (10)\n        change x by (24)\n    end\n    change x by (12)\n    create clone of (_myself_ v)\nend\nif <(screen) = [11]> then\n    switch costume to (jump v)\n    go to x: (-240) y: (-180)\n    repeat (3)\n        change y by (24)\n    end\n    repeat (5)\n        change x by (24)\n    end\n    change x by (10)\n    create clone of (_myself_ v)\nend\nif <(screen) = [12]> then\n    switch costume to (up v)\n    go to x: (-240) y: (-180)\n    repeat (6)\n        change y by (24)\n    end\n    change x by (12)\n    repeat (9)\n        change x by (24)\n    end\n    create clone of (_myself_ v)\n    repeat (1)\n        change y by (36)\n    end\n    repeat (3)\n        change x by (24)\n    end\n    create clone of (_myself_ v)\n    repeat (4)\n        change x by (24)\n    end\n    change x by (-12)\n    switch costume to (coin v)\n    create clone of (_myself_ v)\nend\nif <(screen) = [13]> then\n    switch costume to (jump v)\n    go to x: (-240) y: (-180)\n    repeat (3)\n        change y by (24)\n    end\n    repeat (15)\n        change x by (24)\n    end\n    change x by (10)\n    create clone of (_myself_ v)\n    switch costume to (up v)\n    go to x: (-240) y: (-180)\n    repeat (8)\n        change y by (24)\n    end\n    repeat (14)\n        change x by (24)\n    end\n    create clone of (_myself_ v)\n    repeat (3)\n        change x by (24)\n    end\n    change y by (24)\n    create clone of (_myself_ v)\nend\nif <(screen) = [14]> then\n    switch costume to (up v)\n    go to x: (-240) y: (-180)\n    repeat (5)\n        change y by (24)\n    end\n    repeat (7)\n        change x by (24)\n    end\n    create clone of (_myself_ v)\n    repeat (2)\n        change x by (24)\n    end\n    change y by (24)\n    switch costume to (down v)\n    create clone of (_myself_ v)\n    switch costume to (up v)\n    change y by (72)\n    repeat (4)\n        change x by (-24)\n    end\n    repeat (2)\n        change y by (24)\n        repeat (2)\n            change x by (24)\n        end\n        create clone of (_myself_ v)\n    end\n    change y by (24)\n    repeat (2)\n        change x by (24)\n    end\n    switch costume to (down v)\n    create clone of (_myself_ v)\n    switch costume to (jump v)\n    go to x: (-240) y: (-180)\n    repeat (3)\n        change y by (24)\n    end\n    repeat (14)\n        change x by (24)\n    end\n    create clone of (_myself_ v)\nend\nif <(screen) = [15]> then\n    switch costume to (jump v)\n    go to x: (-240) y: (-180)\n    repeat (3)\n        change y by (24)\n    end\n    repeat (3)\n        change x by (24)\n    end\n    create clone of (_myself_ v)\n    repeat (15)\n        change x by (24)\n    end\n    change x by (12)\n    create clone of (_myself_ v)\n    repeat (3)\n        change y by (24)\n    end\n    change y by (12)\n    change x by (-12)\n    switch costume to (kill boss v)\n    create clone of (_myself_ v)\n    change y by (36)\n    switch costume to (coin v)\n    create clone of (_myself_ v)\n    switch costume to (up v)\n    go to x: (-240) y: (-180)\n    repeat (7)\n        change y by (24)\n    end\n    repeat (7)\n        change x by (24)\n    end\n    create clone of (_myself_ v)\nend\nif <(screen) = [16]> then\n    switch costume to (jump v)\n    go to x: (-240) y: (-180)\n    repeat (3)\n        change y by (24)\n    end\n    repeat (4)\n        change x by (24)\n    end\n    create clone of (_myself_ v)\n    repeat (9)\n        change x by (24)\n    end\n    create clone of (_myself_ v)\nend\n\nwhen I start as a clone\nif <(costume [number v]) = [15]> then\n    forever\n        go [backward v] (1) layers\n        if <(lag prev) = [0]> then\n            set [thing v] to ((thing) * (0.9))\n            point in direction ((([sin v] of ((timer) * (1000)) ) * (thing)) + (90))\n            set [brightness v] effect to (thing)\n        else\n            point in direction (90)\n        end\n    end\nend\nif <<(costume [number v]) = [12]> or <(costume [number v]) = [13]>> then\n    forever\n        go [backward v] (1) layers\n        if <(lag prev) = [0]> then\n            set [thing v] to ((thing) * (0.9))\n            point in direction ((([sin v] of ((timer) * (1000)) ) * (thing)) + (90))\n        else\n            point in direction (90)\n        end\n    end\nend\nif <(costume [number v]) = [2]> then\n    forever\n        go [backward v] (1) layers\n        if <(lag prev) = [0]> then\n            set [thing v] to ((thing) * (0.9))\n            point in direction ((([sin v] of ((timer) * (1000)) ) * (thing)) + (90))\n        else\n            point in direction (90)\n        end\n    end\nend\nif <(costume [number v]) = [14]> then\n    forever\n        go to [front v] layer\n        go [backward v] (2) layers\n        if <(lag prev) = [0]> then\n            set [thing v] to ((thing) * (0.9))\n            point in direction ((([sin v] of ((timer) * (1000)) ) * (thing)) + (90))\n            set [brightness v] effect to (thing)\n        else\n            point in direction (90)\n        end\n    end\nend\nif <(costume [number v]) = [11]> then\n    forever\n        go to [front v] layer\n        go [backward v] (2) layers\n        if <(lag prev) = [0]> then\n            set [thing v] to ((thing) * (0.9))\n            point in direction ((([sin v] of ((timer) * (1000)) ) * (thing)) + (90))\n            set [brightness v] effect to (thing)\n        else\n            point in direction (90)\n        end\n    end\nend\nif <(costume [number v]) = [3]> then\n    forever\n        go to [front v] layer\n        go [backward v] (2) layers\n        if <(lag prev) = [0]> then\n            set [thing v] to ((thing) * (0.9))\n            point in direction ((([sin v] of ((timer) * (1000)) ) * (thing)) + (90))\n            set [brightness v] effect to (thing)\n        else\n            point in direction (90)\n        end\n    end\nend\nif <(costume [number v]) = [4]> then\n    forever\n        go to [front v] layer\n        go [backward v] (2) layers\n        if <(lag prev) = [0]> then\n            set [thing v] to ((thing) * (0.9))\n            point in direction ((([sin v] of ((timer) * (1000)) ) * (thing)) + (90))\n            set [brightness v] effect to (thing)\n        else\n            point in direction (90)\n        end\n    end\nend\nif <(costume [number v]) = [9]> then\n    forever\n        go to [front v] layer\n        go [backward v] (2) layers\n        if <(lag prev) = [0]> then\n            set [thing v] to ((thing) * (0.9))\n            point in direction ((([sin v] of ((timer) * (1000)) ) * (thing)) + (90))\n            set [brightness v] effect to (thing)\n        else\n            point in direction (90)\n        end\n    end\nend\nif <(costume [number v]) = [10]> then\n    forever\n        go to [front v] layer\n        go [backward v] (2) layers\n        if <(lag prev) = [0]> then\n            set [thing v] to ((thing) * (0.9))\n            point in direction ((([sin v] of ((timer) * (1000)) ) * (thing)) + (90))\n            set [brightness v] effect to (thing)\n        else\n            point in direction (90)\n        end\n    end\nend\nif <(costume [number v]) = [5]> then\n    check coin\n    forever\n        if <(lag prev) = [0]> then\n            point in direction ((([sin v] of ((timer) * (80)) ) * (20)) + (90))\n            set size to ((([sin v] of ((timer) * (80)) ) * (20)) + (100)) %\n        else\n            point in direction (90)\n        end\n    end\nend\nif <(costume [number v]) = [6]> then\n    repeat (75)\n        change y by (1)\n        change [ghost v] effect by (1.34)\n    end\n    delete this clone\nend\nif <(costume [number v]) = [7]> then\n    set [spawny v] to (y position)\n    go to [front v] layer\n    set [ghost v] effect to (50)\n    forever\n        go [backward v] (5) layers\n        if <(lag prev) = [0]> then\n            set [thing v] to ((thing) * (0.98))\n            set y to ((([sin v] of ((timer) * (800)) ) * (thing)) + (spawny))\n        else\n            point in direction (90)\n        end\n    end\nend\nif <(costume [number v]) = [8]> then\n    forever\n        go [backward v] (1) layers\n        set [thing v] to ((thing) * (0.9))\n        point in direction ((([sin v] of ((timer) * (1000)) ) * (thing)) + (90))\n    end\nend\nif <(costume [number v]) = [9]> then\n    forever\n        go [backward v] (1) layers\n        if <(lag prev) = [0]> then\n            set [thing v] to ((thing) * (0.9))\n            point in direction ((([sin v] of ((timer) * (1000)) ) * (thing)) + (90))\n        else\n            point in direction (90)\n        end\n    end\nend\n\nchange [screen v] by (-1)\nbroadcast (new screen v)\n\nwhen I receive [generating v]\nif <(screen) = [19]> then\n    switch costume to (up v)\n    go to x: (-240) y: (-180)\n    repeat (7)\n        change y by (24)\n    end\n    change x by (12)\n    repeat (14)\n        change x by (24)\n    end\n    create clone of (_myself_ v)\nend\nif <(screen) = [20]> then\n    switch costume to (web v)\n    go to x: (-240) y: (-180)\n    repeat (3)\n        change y by (24)\n    end\n    repeat (3)\n        set x to (-240)\n        repeat (5)\n            change x by (24)\n        end\n        repeat (5)\n            change x by (24)\n            create clone of (_myself_ v)\n        end\n        change y by (24)\n    end\nend\nif <(screen) = [21]> then\n    switch costume to (jump v)\n    go to x: (-240) y: (-180)\n    repeat (3)\n        change y by (24)\n    end\n    repeat (6)\n        change x by (24)\n    end\n    create clone of (_myself_ v)\n    switch costume to (web v)\n    go to x: (-240) y: (-180)\n    repeat (6)\n        change y by (24)\n    end\n    repeat (3)\n        set x to (-240)\n        repeat (7)\n            change x by (24)\n        end\n        repeat (7)\n            change x by (24)\n            create clone of (_myself_ v)\n        end\n        change y by (24)\n    end\n    switch costume to (coin v)\n    go to x: (-240) y: (-180)\n    repeat (11)\n        change y by (24)\n    end\n    repeat (18)\n        change x by (24)\n    end\n    create clone of (_myself_ v)\nend\nif <(screen) = [22]> then\n    switch costume to (jump2 v)\n    go to x: (-240) y: (-180)\n    repeat (3)\n        change y by (24)\n    end\n    repeat (9)\n        change x by (24)\n    end\n    change x by (-12)\n    create clone of (_myself_ v)\n    switch costume to (up v)\n    repeat (5)\n        change y by (24)\n    end\n    repeat (4)\n        change x by (24)\n    end\n    create clone of (_myself_ v)\n    repeat (4)\n        change x by (24)\n    end\n    create clone of (_myself_ v)\nend\nif <(screen) = [24]> then\n    switch costume to (jump2 v)\n    go to x: (-240) y: (-180)\n    repeat (3)\n        change y by (24)\n    end\n    repeat (5)\n        change x by (24)\n    end\n    create clone of (_myself_ v)\nend\n\nwhen I receive [generating v]\nif <(screen) = [27]> then\n    switch costume to (jump v)\n    go to x: (-240) y: (-180)\n    repeat (3)\n        change y by (24)\n    end\n    repeat (13)\n        change x by (24)\n    end\n    change x by (12)\n    create clone of (_myself_ v)\nend\nif <(screen) = [28]> then\n    switch costume to (down v)\n    go to x: (-240) y: (-180)\n    repeat (12)\n        change y by (24)\n    end\n    repeat (13)\n        change x by (24)\n    end\n    create clone of (_myself_ v)\n    switch costume to (jump v)\n    repeat (5)\n        change y by (-24)\n    end\n    repeat (2)\n        change x by (24)\n    end\n    change x by (12)\n    create clone of (_myself_ v)\nend\nif <(screen) = [30]> then\n    switch costume to (left v)\n    go to x: (-240) y: (-180)\n    repeat (4)\n        change y by (24)\n    end\n    repeat (14)\n        change x by (24)\n    end\n    repeat (2)\n        switch costume to (left v)\n        repeat (3)\n            change x by (24)\n        end\n        create clone of (_myself_ v)\n        repeat (2)\n            change y by (24)\n        end\n        switch costume to (right v)\n        repeat (3)\n            change x by (-24)\n        end\n        create clone of (_myself_ v)\n        repeat (2)\n            change y by (24)\n        end\n    end\nend\nif <(screen) = [31]> then\n    switch costume to (jump v)\n    go to x: (-240) y: (-180)\n    repeat (3)\n        change y by (24)\n    end\n    repeat (15)\n        change x by (24)\n    end\n    change x by (12)\n    change y by (10)\n    repeat (3)\n        change x by (24)\n        create clone of (_myself_ v)\n    end\nend\nif <(screen) = [32]> then\n    switch costume to (left v)\n    go to x: (-240) y: (-180)\n    repeat (4)\n        change y by (24)\n    end\n    repeat (17)\n        change x by (24)\n    end\n    create clone of (_myself_ v)\n    switch costume to (right v)\n    go to x: (-240) y: (-180)\n    repeat (9)\n        change y by (24)\n    end\n    change x by (24)\n    create clone of (_myself_ v)\nend\nif <(screen) = [33]> then\n    switch costume to (coin v)\n    go to x: (-240) y: (-180)\n    repeat (14)\n        change y by (24)\n    end\n    repeat (19)\n        change x by (24)\n    end\n    create clone of (_myself_ v)\n    switch costume to (up v)\n    go to x: (-240) y: (-180)\n    repeat (5)\n        change y by (24)\n    end\n    repeat (11)\n        change x by (24)\n    end\n    create clone of (_myself_ v)\nend\nif <(screen) = [34]> then\n    switch costume to (down v)\n    go to x: (-240) y: (-180)\n    repeat (5)\n        change y by (24)\n    end\n    repeat (12)\n        change x by (24)\n    end\n    change x by (12)\n    create clone of (_myself_ v)\nend\n\ndefine add coin\nif <(screen) = [7]> then\n    add [1] to [coins collected v]\nend\nif <(screen) = [12]> then\n    add [2] to [coins collected v]\nend\nif <(screen) = [15]> then\n    add [3] to [coins collected v]\nend\nif <(screen) = [21]> then\n    add [4] to [coins collected v]\nend\nif <(screen) = [33]> then\n    add [5] to [coins collected v]\nend\nif <(screen) = [38]> then\n    add [6] to [coins collected v]\nend\nif <(screen) = [54]> then\n    add [7] to [coins collected v]\nend\n\ndefine check coin\nif <<[coins collected v] contains [1]?> and <(screen) = [7]>> then\n    delete this clone\nend\nif <<[coins collected v] contains [2]?> and <(screen) = [12]>> then\n    delete this clone\nend\nif <<[coins collected v] contains [3]?> and <(screen) = [15]>> then\n    delete this clone\nend\nif <<[coins collected v] contains [4]?> and <(screen) = [21]>> then\n    delete this clone\nend\nif <<[coins collected v] contains [5]?> and <(screen) = [33]>> then\n    delete this clone\nend\nif <<[coins collected v] contains [6]?> and <(screen) = [38]>> then\n    delete this clone\nend\nif <<[coins collected v] contains [7]?> and <(screen) = [54]>> then\n    delete this clone\nend\n\nwhen I receive [generating v]\nif <(screen) = [37]> then\n    switch costume to (up v)\n    go to x: (-240) y: (-180)\n    repeat (7)\n        change y by (24)\n    end\n    repeat (9)\n        change x by (24)\n    end\n    create clone of (_myself_ v)\nend\nif <(screen) = [38]> then\n    switch costume to (coin v)\n    go to x: (-240) y: (-180)\n    repeat (10)\n        change y by (24)\n    end\n    repeat (17)\n        change x by (24)\n    end\n    change y by (12)\n    create clone of (_myself_ v)\nend\nif <(screen) = [42]> then\n    switch costume to (jump3 v)\n    go to x: (-240) y: (-180)\n    change x by (12)\n    repeat (7)\n        change y by (24)\n    end\n    repeat (13)\n        change x by (24)\n    end\n    repeat (2)\n        switch costume to (jump4 v)\n        change y by (72)\n        repeat (3)\n            change x by (-24)\n        end\n        create clone of (_myself_ v)\n        change y by (-72)\n        switch costume to (jump3 v)\n        repeat (3)\n            change x by (-24)\n        end\n        create clone of (_myself_ v)\n    end\nend\nif <(screen) = [43]> then\n    switch costume to (jump3 v)\n    go to x: (-240) y: (-180)\n    change x by (12)\n    repeat (3)\n        change y by (24)\n    end\n    repeat (4)\n        change x by (24)\n    end\n    create clone of (_myself_ v)\nend\n\nwhen I start as a clone\npoint in direction (90)\nshow\nif <(costume [number v]) = [2]> then\n    forever\n        wait until <touching (player v)?>\n        if <(mobile) = [1]> then\n            broadcast (spring v)\n            set [thing v] to [20]\n        end\n    end\nend\nif <<(costume [number v]) = [12]> or <(costume [number v]) = [13]>> then\n    forever\n        wait until <touching (player v)?>\n        if <(mobile) = [1]> then\n            broadcast (change gravity v)\n            set [thing v] to [20]\n            repeat (10)\n                wait until <not <touching (player v)?>>\n            end\n        end\n    end\nend\nif <(costume [number v]) = [11]> then\n    change x by (12)\n    change y by (15)\n    wait (1) seconds\n    forever\n        wait until <touching (player v)?>\n        if <(mobile) = [1]> then\n            broadcast (boss ded v)\n            repeat (15)\n                set [thing v] to [50]\n            end\n            wait (1) seconds\n            repeat (30)\n                change [ghost v] effect by (3.4)\n            end\n            delete this clone\n        end\n    end\nend\nif <(costume [number v]) = [14]> then\n    change x by (12)\n    change y by (15)\n    forever\n        wait until <touching (player v)?>\n        if <(mobile) = [1]> then\n            broadcast (superorb v)\n            repeat (15)\n                set [thing v] to [50]\n            end\n        end\n    end\nend\nif <(costume [number v]) = [15]> then\n    change x by (12)\n    change y by (15)\n    forever\n        wait until <touching (player v)?>\n        if <(mobile) = [1]> then\n            broadcast (change gravity v)\n            repeat (15)\n                set [thing v] to [50]\n            end\n        end\n    end\nend\nif <(costume [number v]) = [3]> then\n    change x by (12)\n    change y by (15)\n    forever\n        wait until <touching (player v)?>\n        if <(mobile) = [1]> then\n            broadcast (orb v)\n            repeat (15)\n                set [thing v] to [50]\n            end\n        end\n    end\nend\nif <(costume [number v]) = [4]> then\n    change x by (12)\n    change y by (15)\n    forever\n        wait until <touching (player v)?>\n        if <(mobile) = [1]> then\n            broadcast (down v)\n            repeat (15)\n                set [thing v] to [50]\n            end\n        end\n    end\nend\nif <(costume [number v]) = [5]> then\n    change x by (12)\n    change y by (12)\n    wait until <<<touching (player v)?> and <(mobile) = [1]>> or <<(screen) = [15]> and <(timer) > [30]>>>\n    if <touching (player v)?> then\n        add coin\n        change [coins v] by (1)\n        switch costume to (coin2 v)\n        create clone of (_myself_ v)\n        switch costume to (coin v)\n        repeat (30)\n            change [ghost v] effect by (3.4)\n        end\n        delete this clone\n    else\n        repeat (30)\n            change [ghost v] effect by (3.4)\n        end\n        delete this clone\n    end\nend\nif <(costume [number v]) = [7]> then\n    forever\n        if <(mobile) = [1]> then\n            if <touching (player v)?> then\n                set [thing v] to [3]\n                repeat until <not <touching (player v)?>>\n                    set [inweb? v] to [1]\n                end\n                if <not <touching (player v)?>> then\n                    set [inweb? v] to [0]\n                else\n                    set [inweb? v] to [1]\n                end\n            end\n        end\n    end\nend\nif <(costume [number v]) = [8]> then\n    forever\n        wait until <touching (player v)?>\n        if <(mobile) = [1]> then\n            if <(mobile) = [1]> then\n                broadcast (superspring v)\n                set [thing v] to [25]\n            end\n        end\n    end\nend\nif <(costume [number v]) = [9]> then\n    change x by (12)\n    change y by (15)\n    forever\n        wait until <touching (player v)?>\n        if <(mobile) = [1]> then\n            broadcast (left v)\n            repeat (15)\n                set [thing v] to [50]\n            end\n        end\n    end\nend\nif <(costume [number v]) = [10]> then\n    change x by (12)\n    change y by (15)\n    forever\n        wait until <touching (player v)?>\n        if <(mobile) = [1]> then\n            broadcast (right v)\n            repeat (15)\n                set [thing v] to [50]\n            end\n        end\n    end\nend\n\nwhen I receive [generating v]\nif <(screen) = [48]> then\n    switch costume to (jump3 v)\n    go to x: (-240) y: (-180)\n    repeat (3)\n        change y by (24)\n    end\n    repeat (18)\n        change x by (24)\n    end\n    create clone of (_myself_ v)\nend\nif <(screen) = [50]> then\n    switch costume to (up2 v)\n    go to x: (-240) y: (-180)\n    repeat (9)\n        change y by (24)\n    end\n    repeat (17)\n        change x by (24)\n    end\n    change y by (-4)\n    create clone of (_myself_ v)\n    switch costume to (jump4 v)\n    go to x: (-240) y: (-180)\n    repeat (9)\n        change y by (24)\n    end\n    repeat (5)\n        change x by (24)\n    end\n    create clone of (_myself_ v)\nend\nif <(screen) = [51]> then\n    switch costume to (jump3 v)\n    go to x: (-240) y: (-180)\n    repeat (3)\n        change y by (24)\n    end\n    repeat (2)\n        repeat (6)\n            change x by (24)\n        end\n        create clone of (_myself_ v)\n    end\nend\nif <(screen) = [52]> then\n    switch costume to (flip v)\n    go to x: (-240) y: (-180)\n    repeat (5)\n        change y by (24)\n    end\n    repeat (5)\n        change x by (24)\n    end\n    create clone of (_myself_ v)\n    repeat (4)\n        change x by (24)\n    end\n    create clone of (_myself_ v)\n    repeat (5)\n        change y by (24)\n    end\n    repeat (2)\n        change x by (-24)\n    end\n    create clone of (_myself_ v)\n    repeat (4)\n        change x by (24)\n    end\n    switch costume to (up v)\n    create clone of (_myself_ v)\nend\nif <(screen) = [54]> then\n    switch costume to (coin v)\n    go to x: (-240) y: (-180)\n    repeat (4)\n        change y by (24)\n    end\n    repeat (18)\n        change x by (24)\n    end\n    create clone of (_myself_ v)\nend\nif <(screen) = [55]> then\n    switch costume to (jump3 v)\n    go to x: (-240) y: (-180)\n    repeat (3)\n        change y by (24)\n    end\n    repeat (18)\n        change x by (24)\n    end\n    create clone of (_myself_ v)\n    switch costume to (flip v)\n    go to x: (-240) y: (-180)\n    repeat (12)\n        change y by (24)\n    end\n    repeat (2)\n        change x by (24)\n    end\n    create clone of (_myself_ v)\nend\n\n@End\n\nwhen I receive [generating v]\nif <(screen) = [8]> then\n    go to x: (-240) y: (-180)\n    repeat (3)\n        change y by (24)\n    end\n    repeat (16)\n        change x by (24)\n    end\n    switch costume to (end v)\n    create clone of (_myself_ v)\n    switch costume to (end2 v)\n    create clone of (_myself_ v)\nend\nif <(screen) = [16]> then\n    go to x: (-240) y: (-180)\n    repeat (3)\n        change y by (24)\n    end\n    repeat (16)\n        change x by (24)\n    end\n    switch costume to (end v)\n    create clone of (_myself_ v)\n    switch costume to (end2 v)\n    create clone of (_myself_ v)\nend\nif <(screen) = [26]> then\n    go to x: (-240) y: (-180)\n    repeat (3)\n        change y by (24)\n    end\n    repeat (16)\n        change x by (24)\n    end\n    switch costume to (end v)\n    create clone of (_myself_ v)\n    switch costume to (end2 v)\n    create clone of (_myself_ v)\nend\nif <(screen) = [36]> then\n    go to x: (-240) y: (-180)\n    repeat (3)\n        change y by (24)\n    end\n    repeat (16)\n        change x by (24)\n    end\n    switch costume to (end3 v)\n    create clone of (_myself_ v)\n    switch costume to (end4 v)\n    create clone of (_myself_ v)\nend\nif <(screen) = [46]> then\n    go to x: (-240) y: (-180)\n    repeat (3)\n        change y by (24)\n    end\n    repeat (16)\n        change x by (24)\n    end\n    switch costume to (end5 v)\n    create clone of (_myself_ v)\n    switch costume to (end6 v)\n    create clone of (_myself_ v)\nend\nif <(screen) = [60]> then\n    go to x: (-240) y: (-180)\n    repeat (3)\n        change y by (24)\n    end\n    repeat (16)\n        change x by (24)\n    end\n    switch costume to (end7 v)\n    create clone of (_myself_ v)\n    switch costume to (end8 v)\n    create clone of (_myself_ v)\nend\n\nwhen flag clicked\nhide\n\nwhen I start as a clone\npoint in direction (90)\nshow\nif <((costume [number v]) mod (2)) = [0]> then\n    forever\n        go [backward v] (5) layers\n    end\nend\nif <((costume [number v]) mod (2)) = [1]> then\n    forever\n        go to [front v] layer\n        go [backward v] (2) layers\n    end\nend\n\nwhen I receive [new screen v]\ndelete this clone\n\nwhen I receive [level select v]\nset [screen v] to [0]\ndelete this clone\n\n@NPCs\n\nwhen flag clicked\npen up\nhide\n\nwhen I receive [new screen v]\ndelete this clone\n\nwhen I receive [level select v]\nset [screen v] to [0]\ndelete this clone\n\nwhen I receive [generated v]\nrepeat (10)\nif <(c) = [0]> then\n    hide\n    go to x: (240) y: (180)\nend\n\nwhen I start as a clone\nhide\nif <not <(c) = [7]>> then\n    show\nend\nclear graphic effects\nif <(c) = [1]> then\n    clear graphic effects\n    set rotation style [all around v]\n    go [backward v] (10) layers\n    forever\n        switch costume to (CloneCos)\n        point in direction ((([sin v] of ((timer) * (100)) ) * (10)) + (90))\n    end\nend\nif <(c) = [2]> then\n    wait (0.7) seconds\n    set rotation style [left-right v]\n    go [backward v] (1) layers\n    forever\n        if <(size) < [150]> then\n            set rotation style [don't rotate v]\n            switch costume to (pumpkinhitbox v)\n            if <<touching (_edge_ v)?> or > then\n                turn left (180) degrees\n                move ((size) / (20)) steps\n            end\n            if on edge, bounce\n            move (3) steps\n            set rotation style [left-right v]\n            switch costume to (CloneCos)\n            show\n        else\n            set rotation style [don't rotate v]\n            switch costume to (pumpkinhitbox v)\n            if <<touching (_edge_ v)?> or > then\n                turn left (180) degrees\n                move ((size) / (20)) steps\n            end\n            if on edge, bounce\n            move (3) steps\n            set rotation style [left-right v]\n            switch costume to ((CloneCos) + (21))\n            show\n        end\n    end\nend\nif <(c) = [3]> then\n    clear graphic effects\n    forever\n        set y to (-180)\n        repeat until <(y position) > [165]>\n            switch costume to (CloneCos)\n            set [ghost v] effect to ([abs v] of ((y position) / (1.6)) )\n            change y by (5)\n            go [backward v] (100) layers\n        end\n    end\nend\nif <(c) = [4]> then\n    set [y \(stored\) v] to (y position)\n    set [x \(stored\) v] to (x position)\n    set [spawn y v] to (y position)\n    set [thing v] to [0]\n    draw web\n    wait (0.5) seconds\n    forever\n        clear graphic effects\n        switch costume to (CloneCos)\n        set rotation style [all around v]\n        if <(distance to [player v]) > [10]> then\n            point towards (player v)\n        end\n        if <([abs v] of ((x position) - ([x position v] of [player v])) ) < [50]> then\n            move (5) steps\n        else\n            if <(spawn y) > (y position)> then\n                change y by (2.5)\n            end\n            if <(spawn y) < (y position)> then\n                change y by (-1.5)\n            end\n            if <([abs v] of ((spawn y) - (y position)) ) < [3]> then\n                change [thing v] by (3)\n            end\n        end\n        set [thing v] to ((thing) * (0.9))\n        change y by (thing)\n        set x to (x \(stored\))\n    end\nend\nif <(c) = [5]> then\n    clear graphic effects\n    wait (0.5) seconds\n    set [x \(stored\) v] to (x position)\n    set [y \(stored\) v] to (y position)\n    set [spawn y v] to (y position)\n    forever\n        set rotation style [all around v]\n        set size to (80) %\n        switch costume to (CloneCos)\n        if <(distance to [player v]) > [10]> then\n            point towards (player v)\n        end\n        move ((distance to [player v]) / (40)) steps\n    end\nend\nif <(c) = [6]> then\n    clear graphic effects\n    go to x: (240) y: (boss y)\n    set rotation style [all around v]\n    repeat until <(x position) < [-235]>\n        switch costume to (CloneCos)\n        if <(distance to [player v]) > [10]> then\n            point towards (player v)\n        end\n        change x by (-5)\n        if <(x position) > [-180]> then\n            move (3) steps\n        else\n            change x by (-3)\n        end\n        if <not <<key (n v) pressed?> and <(username) = [block866]>>> then\n            if <touching (player v)?> then\n                broadcast (die v)\n            end\n        end\n    end\n    delete this clone\nend\nif <(c) = [7]> then\n    hide\n    set rotation style [left-right v]\n    clear graphic effects\n    repeat until <<not <(screen) = [35]>> or <(boss y) = [1]>>\n        hide\n    end\n    show\n    set [color v] effect to (pick random (0) to (199))\n    wait until <(mobile) = [1]>\n    forever\n        point towards (player v)\n        switch costume to (CloneCos)\n        change [clowncounter v] by (1)\n        go to [front v] layer\n        go [backward v] (1) layers\n        if <(distance to [player v]) < [250]> then\n            if <((clowncounter) mod (40)) = [1]> then\n                set [c v] to [-1]\n                create clone of (_myself_ v)\n                set [c v] to [7]\n            end\n        end\n    end\nend\nif <(c) = [-1]> then\n    switch costume to (clownball v)\n    set [clowncounter v] to ((pick random (1) to (3)) * (67))\n    change [color v] effect by (clowncounter)\n    if <[67] = (clowncounter)> then\n        change [color v] effect by (-30)\n    end\n    change y by (12)\n    repeat until <not <touching (_edge_ v)?>>\n        move (7) steps\n    end\n    repeat until <<touching (player v)?> or <<touching (_edge_ v)?> or <touching (ground v)?>>>\n        move (7) steps\n    end\n    if <not <<key (n v) pressed?> and <(username) = [block866]>>> then\n        if <touching (player v)?> then\n            broadcast (die v)\n        end\n    end\n    delete this clone\nend\nif <(c) = [-2]> then\n    set rotation style [all around v]\n    clear graphic effects\n    switch costume to (fireball v)\n    show\n    if <(pick random (0) to (1)) = [1]> then\n        go to x: (-230) y: (pick random (-100) to (150))\n    else\n        go to x: (230) y: (pick random (-100) to (150))\n    end\n    point towards (player v)\n    repeat (10)\n        move (9) steps\n    end\n    repeat until <<touching (player v)?> or <<touching (_edge_ v)?> or <touching (ground v)?>>>\n        move (9) steps\n        change size by (-1)\n    end\n    if <not <<key (n v) pressed?> and <(username) = [block866]>>> then\n        if <touching (player v)?> then\n            broadcast (die v)\n        end\n    end\n    delete this clone\nend\nif <(c) = [-3]> then\n    set size to (100) %\n    set rotation style [all around v]\n    clear graphic effects\n    switch costume to (cannonclown1 v)\n    show\n    hide\n    set [y \(stored\) v] to [20]\n    if <(pick random (0) to (1)) = [1]> then\n        go to x: (-230) y: (([y position v] of [player v]) + (pick random (-25) to (150)))\n        repeat until <(y position) > [-90]>\n            change y by (3)\n        end\n        point towards (player v)\n        turn left (y \(stored\)) degrees\n        set [c v] to [-4]\n        create clone of (_myself_ v)\n        set [c v] to [-3]\n        hide\n        repeat (20)\n            wait (0.05) seconds\n            point towards (player v)\n            turn left (y \(stored\)) degrees\n        end\n        show\n        repeat (5)\n            move (14) steps\n        end\n        repeat until <<touching (player v)?> or <<touching (_edge_ v)?> or <touching (ground v)?>>>\n            move (14) steps\n            change [y \(stored\) v] by (-3)\n            turn left ((y \(stored\)) / (15)) degrees\n        end\n        if <not <<key (n v) pressed?> and <(username) = [block866]>>> then\n            if <touching (player v)?> then\n                broadcast (die v)\n            end\n        end\n        delete this clone\n    else\n        switch costume to (cannonclown2 v)\n        go to x: (230) y: (([y position v] of [player v]) + (pick random (-25) to (150)))\n        repeat until <(y position) > [-90]>\n            change y by (3)\n        end\n        point towards (player v)\n        turn right (y \(stored\)) degrees\n        set [c v] to [-4]\n        create clone of (_myself_ v)\n        set [c v] to [-3]\n        hide\n        repeat (20)\n            wait (0.05) seconds\n            point towards (player v)\n            turn right (y \(stored\)) degrees\n        end\n        show\n        repeat (5)\n            move (14) steps\n        end\n        repeat until <<touching (player v)?> or <<touching (_edge_ v)?> or <touching (ground v)?>>>\n            move (14) steps\n            change [y \(stored\) v] by (-3)\n            turn right ((y \(stored\)) / (15)) degrees\n        end\n        if <not <<key (n v) pressed?> and <(username) = [block866]>>> then\n            if <touching (player v)?> then\n                broadcast (die v)\n            end\n        end\n        delete this clone\n    end\nend\n\nwhen I receive [generating v]\nset [clowncounter v] to [0]\nset size to (100) %\nif <(screen) = [2]> then\n    set [c v] to [1]\n    go to x: (-240) y: (-180)\n    repeat (3)\n        change y by (24)\n    end\n    change y by (1)\n    set x to (-240)\n    repeat (15)\n        change x by (24)\n    end\n    set size to (100) %\n    create clone of (_myself_ v)\n    set [c v] to [0]\nend\nif <(screen) = [5]> then\n    set [c v] to [1]\n    set size to (80) %\n    go to x: (-240) y: (-180)\n    repeat (3)\n        change y by (24)\n    end\n    change y by (1)\n    set x to (-240)\n    repeat (10)\n        change x by (24)\n    end\n    create clone of (_myself_ v)\n    set [c v] to [0]\nend\nif <(screen) = [6]> then\n    set [c v] to [1]\n    set size to (80) %\n    go to x: (-240) y: (-180)\n    repeat (3)\n        change y by (24)\n    end\n    change y by (1)\n    set x to (-240)\n    repeat (11)\n        change x by (24)\n    end\n    create clone of (_myself_ v)\n    set [c v] to [0]\nend\n\nwhen I receive [generating v]\nset [clowncounter v] to [0]\nset size to (100) %\nif <(screen) = [9]> then\n    point in direction (90)\n    set [c v] to [2]\n    go to x: (-240) y: (-180)\n    repeat (3)\n        change y by (24)\n    end\n    change y by (1)\n    set x to (-240)\n    repeat (9)\n        change x by (24)\n    end\n    create clone of (_myself_ v)\n    set [c v] to [0]\nend\nif <(screen) = [10]> then\n    set [c v] to [2]\n    go to x: (-240) y: (-180)\n    repeat (3)\n        change y by (24)\n    end\n    change y by (1)\n    set x to (-240)\n    repeat (15)\n        change x by (24)\n    end\n    point in direction (90)\n    repeat (4)\n        create clone of (_myself_ v)\n        wait (0.3) seconds\n    end\n    set [c v] to [0]\nend\nif <(screen) = [11]> then\n    set [c v] to [3]\n    go to x: (-240) y: (-180)\n    repeat (3)\n        change y by (24)\n    end\n    change y by (1)\n    set x to (-240)\n    repeat (5)\n        change x by (24)\n    end\n    point in direction (90)\n    repeat (4)\n        change x by (48)\n        create clone of (_myself_ v)\n        wait (0.7) seconds\n    end\n    set [c v] to [0]\nend\nif <(screen) = [12]> then\n    set [c v] to [2]\n    go to x: (-240) y: (-180)\n    repeat (3)\n        change y by (24)\n    end\n    change y by (1)\n    set x to (-240)\n    repeat (8)\n        change x by (24)\n    end\n    point in direction (90)\n    create clone of (_myself_ v)\n    set [c v] to [3]\n    go to x: (-240) y: (-180)\n    repeat (5)\n        change y by (24)\n    end\n    change y by (1)\n    set x to (-240)\n    repeat (5)\n        change x by (24)\n    end\n    point in direction (90)\n    create clone of (_myself_ v)\n    go to x: (120) y: (-180)\n    create clone of (_myself_ v)\n    set [c v] to [0]\nend\nif <(screen) = [13]> then\n    set [c v] to [3]\n    go to x: (-240) y: (-180)\n    repeat (3)\n        change y by (24)\n    end\n    change y by (1)\n    set x to (-240)\n    repeat (6)\n        change x by (24)\n    end\n    create clone of (_myself_ v)\n    set [c v] to [2]\n    go to x: (-240) y: (-180)\n    repeat (3)\n        change y by (24)\n    end\n    change y by (1)\n    set x to (-240)\n    repeat (10)\n        change x by (24)\n    end\n    create clone of (_myself_ v)\n    set [c v] to [0]\nend\nif <(screen) = [15]> then\n    reset timer\n    set [c v] to [2]\n    go to x: (-240) y: (-180)\n    repeat (3)\n        change y by (24)\n    end\n    change y by (1)\n    set x to (-240)\n    repeat (10)\n        change x by (24)\n    end\n    set size to (450) %\n    create clone of (_myself_ v)\n    set size to (100) %\n    set [c v] to [3]\n    go to x: (-240) y: (-180)\n    repeat (13)\n        change y by (24)\n    end\n    repeat (6)\n        change x by (24)\n    end\n    change x by (-12)\n    repeat (2)\n        change x by (48)\n        wait (0.5) seconds\n        create clone of (_myself_ v)\n        change x by (48)\n        wait (0.5) seconds\n    end\n    set [c v] to [0]\nend\nif <(screen) = [16]> then\n    set [c v] to [1]\n    go to x: (-240) y: (-180)\n    repeat (3)\n        change y by (24)\n    end\n    change y by (1)\n    set x to (-240)\n    repeat (5)\n        change x by (24)\n    end\n    create clone of (_myself_ v)\n    set [c v] to [2]\n    repeat (5)\n        change x by (24)\n    end\n    create clone of (_myself_ v)\n    set [c v] to [1]\n    repeat (4)\n        change x by (24)\n    end\n    create clone of (_myself_ v)\n    set [c v] to [0]\nend\n\nwhen I receive [generating v]\nset [clowncounter v] to [0]\nset size to (100) %\nif <(screen) = [17]> then\n    set [c v] to [5]\n    go to x: (-240) y: (-180)\n    repeat (15)\n        change y by (24)\n    end\n    repeat (15)\n        change x by (24)\n    end\n    create clone of (_myself_ v)\n    set [c v] to [0]\nend\nif <(screen) = [18]> then\n    set [c v] to [4]\n    go to x: (-240) y: (-180)\n    repeat (10)\n        change y by (24)\n    end\n    repeat (6)\n        change x by (24)\n    end\n    create clone of (_myself_ v)\n    set [c v] to [2]\n    go to x: (-240) y: (-180)\n    repeat (3)\n        change y by (24)\n    end\n    change y by (1)\n    set x to (-240)\n    repeat (12)\n        change x by (24)\n    end\n    point in direction (90)\n    create clone of (_myself_ v)\n    set [c v] to [0]\nend\nif <(screen) = [19]> then\n    set [c v] to [4]\n    go to x: (-240) y: (-180)\n    repeat (11)\n        change y by (24)\n    end\n    repeat (6)\n        change x by (24)\n    end\n    create clone of (_myself_ v)\n    repeat (8)\n        change x by (24)\n    end\n    change y by (48)\n    create clone of (_myself_ v)\n    set [c v] to [0]\nend\nif <(screen) = [20]> then\n    set [c v] to [5]\n    go to x: (-240) y: (-180)\n    repeat (13)\n        change y by (24)\n    end\n    repeat (19)\n        change x by (24)\n    end\n    create clone of (_myself_ v)\n    set [c v] to [0]\nend\nif <(screen) = [21]> then\n    set [c v] to [3]\n    go to x: (-240) y: (-180)\n    repeat (13)\n        change y by (24)\n    end\n    repeat (7)\n        change x by (24)\n    end\n    change x by (-12)\n    repeat (4)\n        change x by (48)\n        wait (0.5) seconds\n        create clone of (_myself_ v)\n    end\n    set [c v] to [0]\nend\nif <(screen) = [22]> then\n    go to x: (-240) y: (-180)\n    set [c v] to [5]\n    repeat (17)\n        change y by (24)\n    end\n    repeat (18)\n        change x by (24)\n    end\n    create clone of (_myself_ v)\n    set [c v] to [0]\nend\nif <(screen) = [23]> then\n    set [c v] to [5]\n    go to x: (-240) y: (-180)\n    repeat (15)\n        change y by (24)\n    end\n    change x by (24)\n    create clone of (_myself_ v)\n    set [c v] to [0]\nend\nif <(screen) = [24]> then\n    set [c v] to [6]\nend\n\nwhen I receive [generating v]\nset [clowncounter v] to [0]\nset size to (100) %\nif <(screen) = [27]> then\n    set [c v] to [7]\n    go to x: (-240) y: (-180)\n    repeat (3)\n        change y by (24)\n    end\n    repeat (15)\n        change x by (24)\n    end\n    create clone of (_myself_ v)\n    set [c v] to [0]\nend\nif <(screen) = [28]> then\n    set [c v] to [7]\n    go to x: (-240) y: (-180)\n    repeat (10)\n        change y by (24)\n    end\n    repeat (7)\n        change x by (24)\n    end\n    change x by (12)\n    create clone of (_myself_ v)\n    set [c v] to [0]\nend\nif <(screen) = [29]> then\n    set [c v] to [7]\n    go to x: (-240) y: (-180)\n    repeat (3)\n        change y by (24)\n    end\n    repeat (11)\n        change x by (24)\n    end\n    create clone of (_myself_ v)\n    repeat (3)\n        change [clowncounter v] by (1)\n        change x by (48)\n        create clone of (_myself_ v)\n    end\n    set [c v] to [0]\nend\nif <(screen) = [33]> then\n    set [c v] to [7]\n    go to x: (-240) y: (-180)\n    repeat (3)\n        change y by (24)\n    end\n    repeat (9)\n        change x by (24)\n    end\n    create clone of (_myself_ v)\nend\nif <(screen) = [34]> then\n    set [c v] to [7]\n    go to x: (-240) y: (-180)\n    repeat (6)\n        change y by (24)\n    end\n    change x by (12)\n    repeat (3)\n        change x by (24)\n    end\n    create clone of (_myself_ v)\n    set [c v] to [0]\nend\nif <(screen) = [35]> then\n    set [c v] to [0]\n    wait until <(mobile) = [1]>\n    wait (3) seconds\n    set [c v] to [-2]\n    wait until <(boss phase) = [2]>\n    set [beat count v] to [0]\n    repeat until <(boss phase) = [3]>\n        if <(beat count) = [3]> then\n            set [c v] to [-2]\n        else\n            if <(beat count) = [6]> then\n                set [c v] to [-3]\n            else\n                set [c v] to [-2]\n            end\n        end\n    end\n    set [beat count v] to [0]\n    set [c v] to [0]\n    repeat until <(boss phase) = [0]>\n        if <(beat count) = [3]> then\n            set [c v] to [-2]\n        else\n            if <(beat count) = [6]> then\n                set [c v] to [-3]\n            else\n                if <(beat count) = [7]> then\n                    set [c v] to [0]\n                else\n                    if <(beat count) = [1]> then\n                        set [c v] to [0]\n                    else\n                        if <(beat count) = [13]> then\n                            set [c v] to [0]\n                        else\n                            set [c v] to [-2]\n                        end\n                    end\n                end\n            end\n        end\n    end\n    set [c v] to [0]\nend\nif <(screen) = [36]> then\n    set [c v] to [7]\n    go to x: (-240) y: (-180)\n    repeat (3)\n        change y by (24)\n    end\n    repeat (11)\n        change x by (24)\n    end\n    create clone of (_myself_ v)\n    set [c v] to [0]\nend\n\nwhen I receive [boss ded v]\nif <(size) > [150]> then\n    repeat (20)\n        change [ghost v] effect by (5)\n        set size to (pick random (450) to (450)) %\n        point in direction ((size) - (10))\n    end\n    delete this clone\nelse\n    repeat (20)\n        change [ghost v] effect by (5)\n        set size to (pick random (100) to (100)) %\n        point in direction ((size) - (10))\n    end\n    delete this clone\nend\n\n\n\nwhen I start as a clone\nshow\nif <(c) = [8]> then\n    wait (0.7) seconds\n    wait until <(mobile) = [1]>\n    set rotation style [left-right v]\n    go [backward v] (1) layers\n    forever\n        if <not <<(screen) = [40]> and <(gamemode) = [3]>>> then\n            set rotation style [don't rotate v]\n            switch costume to (pumpkinhitbox v)\n            if <<touching (_edge_ v)?> or > then\n                turn left (180) degrees\n                move (10) steps\n            end\n            if on edge, bounce\n            move (8) steps\n            set rotation style [left-right v]\n            switch costume to (CloneCos)\n            show\n        end\n    end\nend\nif <(c) = [-3]> then\n    forever\n        if <(x position) < [-220]> then\n            hide\n        else\n            if <(x position) > [220]> then\n                hide\n            else\n                show\n            end\n        end\n    end\nend\nif <(c) = [-4]> then\n    if <(x position) < [0]> then\n        switch costume to (cannon v)\n    else\n        switch costume to (cannon2 v)\n    end\n    clear graphic effects\n    set rotation style [all around v]\n    go [backward v] (10) layers\n    set [ghost v] effect to (100)\n    repeat (10)\n        change [ghost v] effect by (-10)\n        go to [front v] layer\n        go [backward v] (1) layers\n        turn right (pick random (-1) to (1)) degrees\n    end\n    repeat (16)\n        wait (0.05) seconds\n        point towards (player v)\n        if <(x position) < [0]> then\n            turn left (y \(stored\)) degrees\n        else\n            turn right (y \(stored\)) degrees\n        end\n    end\n    if <(x position) < [0]> then\n        repeat (2)\n            turn left (25) degrees\n            turn right (pick random (-1) to (1)) degrees\n        end\n        repeat (10)\n            change [ghost v] effect by (10)\n            go to [front v] layer\n            go [backward v] (1) layers\n            turn right (3) degrees\n            turn right (pick random (-1) to (1)) degrees\n        end\n        delete this clone\n    else\n        repeat (2)\n            turn right (25) degrees\n            turn right (pick random (-1) to (1)) degrees\n        end\n        repeat (10)\n            change [ghost v] effect by (10)\n            go to [front v] layer\n            go [backward v] (1) layers\n            turn left (3) degrees\n            turn right (pick random (-1) to (1)) degrees\n        end\n        delete this clone\n    end\nend\n\nwhen I receive [die v]\nwait (0.5) seconds\nwait until <(mobile) = [1]>\nif <(c) = [5]> then\n    go to x: (x \(stored\)) y: (spawn y)\nend\nif <(c) = [9]> then\n    go to x: (x \(stored\)) y: (spawn y)\nend\n\nwhen I receive [generating v]\nset [clowncounter v] to [0]\nset size to (100) %\nif <(screen) = [37]> then\n    set [c v] to [8]\n    go to x: (-240) y: (-180)\n    repeat (3)\n        change y by (24)\n    end\n    repeat (9)\n        change x by (24)\n    end\n    create clone of (_myself_ v)\n    set [c v] to [0]\nend\nif <(screen) = [40]> then\n    set [c v] to [8]\n    go to x: (-240) y: (-180)\n    repeat (3)\n        change y by (24)\n    end\n    repeat (10)\n        change x by (24)\n    end\n    point in direction (90)\n    create clone of (_myself_ v)\n    point in direction (-90)\n    create clone of (_myself_ v)\n    set [c v] to [0]\nend\nif <(screen) = [42]> then\n    set [c v] to [8]\n    go to x: (-240) y: (-180)\n    repeat (11)\n        change y by (24)\n    end\n    repeat (12)\n        change x by (24)\n    end\n    create clone of (_myself_ v)\nend\nif <(screen) = [44]> then\n    set [c v] to [8]\n    go to x: (-240) y: (-180)\n    repeat (3)\n        change y by (24)\n    end\n    repeat (12)\n        change x by (24)\n    end\n    create clone of (_myself_ v)\nend\n\nwhen I start as a clone\nif <(c) = [8]> then\n    if <(screen) = [40]> then\n        wait (1) seconds\n        wait until <(gamemode) = [3]>\n        repeat (25)\n            change [ghost v] effect by (4)\n            go to [front v] layer\n            go [backward v] (1) layers\n        end\n        delete this clone\n    end\nend\n\nrepeat (4)\n    change x by (-24)\nend\npoint in direction (-90)\ncreate clone of (_myself_ v)\npoint in direction (90)\nset [c v] to [0]\n\nrepeat (7)\n    change y by (-24)\nend\n\nwhen flag clicked\nforever\n    if <not <(screen) = [24]>> then\n        erase all\n        broadcast (draw web v) and wait\n    end\nend\n\nwhen I start as a clone\nforever\n    if <(c) = [7]> then\n        set [clonecos v] to [14]\n        if <(lag prev) = [0]> then\n            wait (0.1) seconds\n            change [clonecos v] by (1)\n            wait (0.1) seconds\n            change [clonecos v] by (1)\n            wait (0.1) seconds\n            change [clonecos v] by (1)\n            wait (0.1) seconds\n        end\n    else\n        if <(c) = [2]> then\n            set [clonecos v] to (((c) * (2)) - (1))\n            if <(lag prev) = [0]> then\n                wait (0.3) seconds\n                change [clonecos v] by (1)\n                wait (0.3) seconds\n            end\n        else\n            if <(c) = [8]> then\n                set [clonecos v] to (((c) * (2)) + (10))\n                if <(lag prev) = [0]> then\n                    wait (0.1) seconds\n                    change [clonecos v] by (1)\n                    wait (0.1) seconds\n                end\n            else\n                if <(c) = [10]> then\n                    set [clonecos v] to (((c) * (2)) + (8))\n                    if <(lag prev) = [0]> then\n                        wait (0.3) seconds\n                        change [clonecos v] by (1)\n                        wait (0.3) seconds\n                    end\n                else\n                    if <(c) > [7]> then\n                        set [clonecos v] to (((c) * (2)) + (10))\n                        if <(lag prev) = [0]> then\n                            wait (0.3) seconds\n                            change [clonecos v] by (1)\n                            wait (0.3) seconds\n                        end\n                    else\n                        if <(c) > [2]> then\n                            set [clonecos v] to ((c) * (2))\n                            if <(lag prev) = [0]> then\n                                wait (0.3) seconds\n                                change [clonecos v] by (1)\n                                wait (0.3) seconds\n                            end\n                        else\n                            set [clonecos v] to (((c) * (2)) - (1))\n                            if <(lag prev) = [0]> then\n                                wait (0.3) seconds\n                                change [clonecos v] by (1)\n                                wait (0.3) seconds\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\nwhen I start as a clone\nshow\nif <(c) = [9]> then\n    set size to (60) %\n    set [x \(stored\) v] to (x position)\n    set [spawn y v] to (y position)\n    wait (0.7) seconds\n    wait until <(mobile) = [1]>\n    set rotation style [left-right v]\n    go [backward v] (1) layers\n    forever\n        if <<<([last x v] of [player v]) > [0]> and <(x position) > ([x position v] of [player v])>> or <<([last x v] of [player v]) < [0]> and <(x position) < ([x position v] of [player v])>>> then\n            switch costume to ((CloneCos) + (2))\n            point towards (player v)\n        else\n            point towards (player v)\n            switch costume to (CloneCos)\n            move (((distance to [player v]) / (75)) + (2)) steps\n        end\n        change y by (([sin v] of ((y \(stored\)) * (40)) ) * (0.8))\n        change [y \(stored\) v] by (0.1)\n    end\nend\nif <(c) = [10]> then\n    set size to (60) %\n    set rotation style [left-right v]\n    point in direction (90)\n    wait (0.7) seconds\n    set [spawn y v] to (y position)\n    wait until <(mobile) = [1]>\n    forever\n        go to x: (215) y: (spawn y)\n        repeat until <<([x position v] of [player v]) > [75]> or <(mobile) = [0]>>\n            set x to (215)\n            change y by (([sin v] of ((y \(stored\)) * (40)) ) * (0.8))\n            change [y \(stored\) v] by (0.1)\n            switch costume to ((CloneCos) + (2))\n            change [ghost v] effect by (-5)\n        end\n        point in direction (-90)\n        repeat until <<(x position) < [-180]> or <(mobile) = [0]>>\n            change y by (([sin v] of ((y \(stored\)) * (40)) ) * (0.8))\n            change [y \(stored\) v] by (0.1)\n            switch costume to (CloneCos)\n            change x by (-5)\n        end\n        if <(mobile) = [1]> then\n            repeat (25)\n                change y by (([sin v] of ((y \(stored\)) * (40)) ) * (0.8))\n                change [y \(stored\) v] by (0.1)\n                switch costume to ((CloneCos) + (2))\n                change [ghost v] effect by (4)\n            end\n            delete this clone\n        else\n            repeat until <(mobile) = [1]>\n                change y by (([sin v] of ((y \(stored\)) * (40)) ) * (0.8))\n                change [y \(stored\) v] by (0.1)\n                switch costume to ((CloneCos) + (2))\n                change [ghost v] effect by (5)\n            end\n        end\n    end\nend\n\ndefine draw web\nset [y \(stored\) v] to (y position)\nset y to (180)\nset pen color to (#ffffff)\npen down\nglide (0) secs to x: (x position) y: (y \(stored\))\npen up\n\nwhen I receive [generating v]\nset [clowncounter v] to [0]\nset size to (100) %\nif <(screen) = [48]> then\n    set [c v] to [9]\n    go to x: (-240) y: (-180)\n    repeat (11)\n        change y by (24)\n    end\n    repeat (9)\n        change x by (24)\n    end\n    create clone of (_myself_ v)\n    set [c v] to [0]\nend\nif <(screen) = [49]> then\n    set [c v] to [9]\n    go to x: (-240) y: (-180)\n    repeat (9)\n        change y by (24)\n    end\n    repeat (9)\n        change x by (24)\n    end\n    change x by (12)\n    create clone of (_myself_ v)\n    set [c v] to [0]\nend\nif <(screen) = [53]> then\n    set [c v] to [9]\n    go to x: (-240) y: (-180)\n    repeat (4)\n        change y by (24)\n    end\n    repeat (9)\n        change x by (24)\n    end\n    change x by (12)\n    create clone of (_myself_ v)\nend\nif <(screen) = [57]> then\n    set [c v] to [9]\n    go to x: (-240) y: (-180)\n    repeat (4)\n        change y by (24)\n    end\n    repeat (8)\n        change x by (24)\n    end\n    change x by (12)\n    change y by (24)\n    repeat (3)\n        create clone of (_myself_ v)\n        change x by (36)\n    end\n    set [c v] to [0]\nend\nif <(screen) = [59]> then\n    set size to (100) %\n    set [c v] to [10]\n    go to x: (-240) y: (-180)\n    repeat (1)\n        change y by (24)\n    end\n    repeat (19)\n        change x by (24)\n    end\n    repeat (13)\n        change y by (24)\n        create clone of (_myself_ v)\n    end\nend\n\nwhen I start as a clone\nif <(c) = [0]> then\n    delete this clone\nend\n\nwhen I receive [draw web v]\nif <(c) = [4]> then\n    draw web\nend\n\n@ModeChanger\n\nwhen flag clicked\nhide\n\nwhen I receive [generating v]\nif <(screen) = [29]> then\n    set [c v] to [1]\n    go to x: (-240) y: (-180)\n    repeat (3)\n        change y by (24)\n    end\n    repeat (4)\n        change x by (24)\n    end\n    create clone of (_myself_ v)\n    set [c v] to [0]\nend\nif <(screen) = [31]> then\n    set [c v] to [1]\n    go to x: (-240) y: (-180)\n    repeat (3)\n        change y by (24)\n    end\n    repeat (4)\n        change x by (24)\n    end\n    create clone of (_myself_ v)\n    set [c v] to [0]\nend\nif <(screen) = [32]> then\n    set [c v] to [1]\n    go to x: (-240) y: (-180)\n    repeat (3)\n        change y by (24)\n    end\n    repeat (4)\n        change x by (24)\n    end\n    create clone of (_myself_ v)\n    set [c v] to [0]\nend\nif <(screen) = [33]> then\n    set [c v] to [1]\n    go to x: (-240) y: (-180)\n    repeat (3)\n        change y by (24)\n    end\n    repeat (4)\n        change x by (24)\n    end\n    create clone of (_myself_ v)\n    set [c v] to [0]\nend\nif <(screen) = [35]> then\n    set [c v] to [1]\n    wait (0.1) seconds\n    go to x: (-240) y: (-180)\n    go to (player v)\n    change y by (-24)\n    create clone of (_myself_ v)\n    set [c v] to [0]\nend\n\nwhen I receive [level select v]\nset [screen v] to [0]\ndelete this clone\n\nwhen I receive [new screen v]\nhide\ndelete this clone\n\nwhen I receive [generating v]\nset [spawned v] to [0]\nif <(screen) = [38]> then\n    set [c v] to [2]\n    go to x: (-240) y: (-180)\n    repeat (3)\n        change y by (24)\n    end\n    repeat (4)\n        change x by (24)\n    end\n    create clone of (_myself_ v)\n    set [c v] to [3]\nend\nif <(screen) = [40]> then\n    set [c v] to [2]\n    go to x: (-240) y: (-180)\n    repeat (3)\n        change y by (24)\n    end\n    repeat (18)\n        change x by (24)\n    end\n    create clone of (_myself_ v)\n    set [c v] to [3]\nend\nif <(screen) = [41]> then\n    set [c v] to [2]\n    go to x: (-240) y: (-180)\n    repeat (3)\n        change y by (24)\n    end\n    repeat (4)\n        change x by (24)\n    end\n    create clone of (_myself_ v)\n    set [c v] to [3]\nend\nif <(screen) = [42]> then\n    set [c v] to [2]\n    go to x: (-240) y: (-180)\n    repeat (3)\n        change y by (24)\n    end\n    repeat (4)\n        change x by (24)\n    end\n    create clone of (_myself_ v)\n    set [c v] to [3]\nend\nif <(screen) = [43]> then\n    set [c v] to [2]\n    go to x: (-240) y: (-180)\n    repeat (3)\n        change y by (24)\n    end\n    repeat (2)\n        change x by (24)\n    end\n    create clone of (_myself_ v)\n    set [c v] to [3]\nend\nif <(screen) = [45]> then\n    set [c v] to [2]\n    go to x: (-240) y: (-180)\n    repeat (2)\n        change y by (24)\n    end\n    repeat (2)\n        change x by (24)\n    end\n    create clone of (_myself_ v)\n    set [c v] to [3]\nend\n\nwhen I start as a clone\nforever\n    if <(c) = [1]> then\n        set [clonecos v] to [2]\n        if <(lag prev) = [0]> then\n            wait (0.1) seconds\n            change [clonecos v] by (1)\n            wait (0.1) seconds\n            change [clonecos v] by (1)\n            wait (0.1) seconds\n            change [clonecos v] by (1)\n            wait (0.1) seconds\n        end\n    else\n        if <(c) = [2]> then\n            set [clonecos v] to [6]\n            if <(lag prev) = [0]> then\n                wait (0.1) seconds\n                change [clonecos v] by (1)\n                wait (0.1) seconds\n                change [clonecos v] by (1)\n                wait (0.1) seconds\n                change [clonecos v] by (1)\n                wait (0.1) seconds\n            end\n        else\n            if <(c) = [3]> then\n                set [clonecos v] to [6]\n                if <(lag prev) = [0]> then\n                    wait (0.1) seconds\n                    change [clonecos v] by (1)\n                    wait (0.1) seconds\n                    change [clonecos v] by (1)\n                    wait (0.1) seconds\n                    change [clonecos v] by (1)\n                    wait (0.1) seconds\n                end\n            else\n                if <(c) = [4]> then\n                    set [clonecos v] to [10]\n                    if <(lag prev) = [0]> then\n                        wait (0.3) seconds\n                        change [clonecos v] by (1)\n                        wait (0.3) seconds\n                    end\n                else\n                end\n            end\n        end\n    end\nend\n\nwhen I receive [spawn mode changer v]\nif <(screen) = [39]> then\n    if <(spawned) = [0]> then\n        set [spawned v] to [1]\n        wait (0.5) seconds\n        set [c v] to [2]\n        go to x: (-240) y: (-180)\n        repeat (3)\n            change y by (24)\n        end\n        repeat (3)\n            change x by (24)\n        end\n        create clone of (_myself_ v)\n        set [c v] to [3]\n    end\nend\n\nwhen I start as a clone\nshow\nchange y by (12)\nset [spawny v] to (y position)\nset [spawnx v] to (x position)\nif <(c) = [1]> then\n    forever\n        show\n        set rotation style [all around v]\n        repeat until <<touching (player v)?> and <(mobile) = [1]>>\n            set size to (100) %\n            point in direction (90)\n            set x to (spawnx)\n            set y to ((([sin v] of ((timer) * (80)) ) * (10)) + (spawny))\n            switch costume to (CloneCos)\n        end\n        set [gamemode v] to [2]\n        repeat until <<(mobile) = [0]> or <not <(gamemode) = [2]>>>\n            go to (player v)\n            point in direction (90)\n            point in direction ([direction v] of [player v])\n            switch costume to (CloneCos)\n            set size to ([size v] of [player v]) %\n            go to [front v] layer\n            go [backward v] (4) layers\n        end\n        repeat until <<(mobile) = [1]> or <not <(gamemode) = [2]>>>\n            go to (player v)\n            point in direction ([direction v] of [player v])\n            switch costume to (CloneCos)\n            if <(costume) = [10]> then\n                hide\n            else\n                set size to ([size v] of [player v]) %\n            end\n            go to [front v] layer\n            go [backward v] (4) layers\n        end\n    end\nend\nif <(c) = [2]> then\n    change y by (18)\n    set [ghost v] effect to (40)\n    forever\n        show\n        set rotation style [all around v]\n        repeat until <<touching (player v)?> and <(mobile) = [1]>>\n            set size to (100) %\n            point in direction ((([sin v] of ((timer) * (80)) ) * (10)) + (90))\n            set x to (spawnx)\n            set y to ((([sin v] of ((timer) * (80)) ) * (10)) + ((spawny) + (10)))\n            switch costume to (CloneCos)\n        end\n        set [gamemode v] to [3]\n        repeat until <<(mobile) = [0]> or <not <(gamemode) = [3]>>>\n            go to (player v)\n            point in direction (90)\n            switch costume to (CloneCos)\n            set size to ([size v] of [player v]) %\n            go [backward v] (99) layers\n        end\n        repeat until <<(mobile) = [1]> or <not <(gamemode) = [3]>>>\n            go to (player v)\n            point in direction (90)\n            switch costume to (CloneCos)\n            if <(costume) = [10]> then\n                hide\n            else\n                set size to ([size v] of [player v]) %\n            end\n            go [backward v] (99) layers\n        end\n    end\nend\nif <(c) = [3]> then\n    change [trail v] by (2)\n    go to (player v)\n    clear graphic effects\n    set [ghost v] effect to (50)\n    set size to (75) %\n    show\n    set rotation style [all around v]\n    point in direction (90)\n    repeat (25)\n        go [backward v] (99) layers\n        turn right (15) degrees\n        switch costume to (CloneCos)\n        change size by (-2)\n        change [ghost v] effect by (2)\n        if <(pick random (1) to (round ((trail) * (2)))) = [1]> then\n            if <(lag prev) = [0]> then\n                if <(can flip) = [0]> then\n                    create clone of (_myself_ v)\n                end\n            end\n        end\n    end\n    delete this clone\nend\n\nwhen I receive [generating v]\nif <(screen) = [49]> then\n    set [c v] to [4]\n    go to x: (-240) y: (-180)\n    repeat (3)\n        change y by (24)\n    end\n    repeat (4)\n        change x by (24)\n    end\n    create clone of (_myself_ v)\n    set [c v] to [0]\nend\nif <(screen) = [50]> then\n    set [c v] to [4]\n    go to x: (-240) y: (-180)\n    repeat (3)\n        change y by (24)\n    end\n    change x by (24)\n    create clone of (_myself_ v)\n    set [c v] to [5]\n    go to x: (-240) y: (-180)\n    repeat (9)\n        change y by (24)\n    end\n    repeat (17)\n        change x by (24)\n    end\n    create clone of (_myself_ v)\n    set [c v] to [0]\nend\nif <(screen) = [54]> then\n    set [c v] to [4]\n    go to x: (-240) y: (-180)\n    repeat (3)\n        change y by (24)\n    end\n    repeat (3)\n        change x by (24)\n    end\n    create clone of (_myself_ v)\n    set [c v] to [0]\nend\nif <(screen) = [58]> then\n    set [c v] to [4]\n    go to x: (-240) y: (-180)\n    repeat (3)\n        change y by (24)\n    end\n    change x by (24)\n    create clone of (_myself_ v)\n    set [c v] to [0]\nend\n\nwhen I start as a clone\nwait (0.1) seconds\nif <(c) = [4]> then\n    change y by (24)\n    forever\n        show\n        set rotation style [all around v]\n        repeat until <<touching (player v)?> and <(mobile) = [1]>>\n            set size to (100) %\n            point in direction (90)\n            set x to (spawnx)\n            if <(lag prev) = [0]> then\n                set y to ((([sin v] of ((timer) * (80)) ) * (10)) + (spawny))\n                switch costume to (CloneCos)\n            end\n        end\n        set [gamemode v] to [4]\n        if <(gamemode) = [4]> then\n            repeat until <<(mobile) = [0]> or <not <(gamemode) = [4]>>>\n                go to (player v)\n                point in direction (90)\n                if <(lag prev) = [0]> then\n                    point in direction ([direction v] of [player v])\n                    switch costume to (CloneCos)\n                    set size to ([size v] of [player v]) %\n                end\n                go to [front v] layer\n                go [backward v] (4) layers\n            end\n            repeat until <<(mobile) = [1]> or <not <(gamemode) = [4]>>>\n                go to (player v)\n                if <(lag prev) = [0]> then\n                    point in direction ([direction v] of [player v])\n                    switch costume to (CloneCos)\n                end\n                if <(costume) = [10]> then\n                    hide\n                else\n                    set size to ([size v] of [player v]) %\n                end\n                go to [front v] layer\n                go [backward v] (4) layers\n            end\n        end\n    end\nend\n\nwhen I start as a clone\nif <(c) = [5]> then\n    change x by (12)\n    forever\n        set [brightness v] effect to (thing)\n        if <touching (player v)?> then\n            repeat (10)\n                set [thing v] to [100]\n                set [gamemode v] to [1]\n                set [brightness v] effect to (thing)\n            end\n        end\n        set [thing v] to ((thing) * (0.9))\n        if <(thing) > [35]> then\n            set [gamemode v] to [1]\n        end\n    end\nend\n\nwhen I start as a clone\nif <(c) = [5]> then\n    forever\n        wait until <touching (player v)?>\n        repeat until <(mobile) = [0]>\n            repeat (10)\n                set [gamemode v] to [1]\n            end\n        end\n    end\nend\n\n@Bosses\n\nwhen flag clicked\npen up\nhide\n\nwhen I receive [level select v]\nset [screen v] to [0]\ndelete this clone\n\nwhen I receive [generating v]\nset [boss phase v] to [1]\nset size to (100) %\nif <(screen) = [24]> then\n    set [c v] to [1]\n    create clone of (_myself_ v)\n    set [c v] to [2]\nend\nif <(screen) = [35]> then\n    set [c v] to [0]\n    hide\n    clear graphic effects\n    switch costume to (ringmaster v)\n    go to x: (0) y: (-100)\n    set tempo to (77)\n    set [beat count v] to [0]\n    broadcast (start body v)\n    forever\n        go [backward v] (1) layers\n        broadcast (beat \(boss\) v)\n        if <<(boss phase) = [2]> or <(boss phase) = [3]>> then\n            if <(beat count) = [14]> then\n                set [beat count v] to [0]\n            end\n        else\n            if <(beat count) = [4]> then\n                set [beat count v] to [0]\n            end\n        end\n        change [beat count v] by (1)\n        rest for (0.5) beats\n    end\nend\nif <(screen) = [45]> then\n    set [c v] to [4]\n    create clone of (_myself_ v)\n    set [c v] to [6]\nend\n\nwhen I receive [new screen v]\ndelete this clone\n\nwhen I start as a clone\nclear graphic effects\nset size to (100) %\nif <(c) = [1]> then\n    show\n    go to x: (0) y: (0)\n    set tempo to (110)\n    set [beat count v] to [0]\n    forever\n        broadcast (beat \(boss\) v)\n        if <(beat count) = [4]> then\n            set [beat count v] to [0]\n        end\n        change [beat count v] by (1)\n        rest for (0.5) beats\n    end\nend\nif <(c) = [2]> then\n    clear graphic effects\n    show\n    switch costume to (projectile 1 v)\n    go to x: (240) y: ((boss y) + (pick random (-10) to (10)))\n    repeat until <<(x position) < [-235]> or <touching (player v)?>>\n        change size by (1)\n        change x by (-10)\n    end\n    if <not <<key (n v) pressed?> and <(username) = [block866]>>> then\n        if <touching (player v)?> then\n            broadcast (die v)\n        end\n    end\n    delete this clone\nend\nif <(c) = [6]> then\n    set size to (100) %\n    clear graphic effects\n    set [ghost v] effect to (60)\n    point in direction (90)\n    change [wall type v] by (1)\n    show\n    switch costume to ((7) + ((wall type) mod (2)))\n    go to x: (240) y: (0)\n    set size to (100) %\n    repeat until <<(x position) < [-235]> or <touching (player v)?>>\n        change size by (1)\n        change x by (-10)\n    end\n    if <not <<key (n v) pressed?> and <(username) = [block866]>>> then\n        if <touching (player v)?> then\n            broadcast (die v)\n        end\n    end\n    delete this clone\nend\nif <(c) = [7]> then\n    show\n    switch costume to (projectile 3 v)\n    set size to (150) %\n    repeat until <<touching (_edge_ v)?> or <touching (player v)?>>\n        change size by (-1)\n        if <(boss phase) = [5]> then\n            move (9) steps\n            set [ghost v] effect to (40)\n        else\n            move (8) steps\n        end\n    end\n    if <not <<key (n v) pressed?> and <(username) = [block866]>>> then\n        if <touching (player v)?> then\n            broadcast (die v)\n        end\n    end\n    delete this clone\nend\nif <(c) = [8]> then\n    set size to (100) %\n    clear graphic effects\n    point in direction (90)\n    change [wall type v] by (1)\n    show\n    switch costume to ((7) + ((wall type) mod (2)))\n    set [ghost v] effect to (60)\n    if <(pick random (1) to (2)) = [1]> then\n        point in direction (90)\n        go to x: (240) y: (0)\n        repeat until <<(x position) < [-235]> or <touching (player v)?>>\n            change size by (1)\n            change x by (-8)\n        end\n    else\n        point in direction (-90)\n        go to x: (-240) y: (0)\n        repeat until <<(x position) > [235]> or <touching (player v)?>>\n            change size by (1)\n            change x by (8)\n        end\n    end\n    if <not <<key (n v) pressed?> and <(username) = [block866]>>> then\n        if <touching (player v)?> then\n            broadcast (die v)\n        end\n    end\n    delete this clone\nend\n\nwhen I start as a clone\nif <(c) = [4]> then\n    forever\n        set [boss y v] to (y position)\n    end\nend\nif <(c) = [1]> then\n    forever\n        go to [front v] layer\n        go [backward v] (2) layers\n        set [boss y v] to (y position)\n        if <(boss phase) = [3]> then\n            switch costume to (spiderboss2 v)\n        else\n            switch costume to (spiderboss1 v)\n        end\n    end\nend\nif <(c) = [2]> then\n    forever\n        show\n        switch costume to (projectile 1 v)\n        if <(lag prev) = [0]> then\n            wait (0.1) seconds\n            next costume\n            wait (0.1) seconds\n        end\n    end\nend\nif <(c) = [7]> then\n    forever\n        show\n        switch costume to (projectile 3 v)\n        if <(lag prev) = [0]> then\n            wait (0.1) seconds\n            next costume\n            wait (0.1) seconds\n        end\n    end\nend\n\nwhen I receive [boss ded v]\nset [boss phase v] to [-1]\nrepeat (20)\n    change [ghost v] effect by (5)\n    set size to (pick random (100) to (100)) %\n    if <not <(screen) = [45]>> then\n        point in direction ((size) - (10))\n    end\nend\nhide\ndelete this clone\n\nwhen I start as a clone\nif <(c) = [1]> then\n    clear graphic effects\n    wait until <(boss phase) = [2]>\n    wait (6.5) seconds\n    repeat (50)\n        change [brightness v] effect by (-2)\n    end\n    wait until <(boss phase) = [3]>\n    repeat (20)\n        change [brightness v] effect by (5)\n    end\nend\n\nwhen I receive [beat \(boss\) v]\nif <(c) = [0]> then\n    if <(screen) = [35]> then\n        if <(boss phase) = [1]> then\n            if <(beat count) = [1]> then\n                set [x v] to (pick random (-20) to (20))\n                set [y v] to (pick random (-20) to (20))\n            else\n                if <(beat count) = [3]> then\n                    set [x v] to (pick random (-20) to (20))\n                    set [y v] to (pick random (-20) to (20))\n                end\n            end\n        end\n        if <(boss phase) = [2]> then\n            change [x v] by ((pick random (-25) to (25)) + ((([x position v] of [player v]) - (x position)) / (20)))\n            change [y v] by ((pick random (-25) to (25)) + ((([y position v] of [player v]) - (y position)) / (20)))\n        end\n        if <(boss phase) = [3]> then\n            change [x v] by ((pick random (-30) to (30)) + ((([x position v] of [player v]) - (x position)) / (15)))\n            change [y v] by ((pick random (-30) to (30)) + ((([y position v] of [player v]) - (y position)) / (15)))\n        end\n    end\nend\n\nwhen I receive [start body v]\nif <(c) = [0]> then\n    if <(screen) = [35]> then\n        set [x v] to [0]\n        set [y v] to [0]\n        set rotation style [all around v]\n        show\n        forever\n            set [x v] to ((x) * (0.8))\n            set [y v] to ((y) * (0.8))\n            change x by (x)\n            change y by (y)\n            if <(distance to [bossdeco v]) > [10]> then\n                point towards (bossdeco v)\n                move ((distance to [bossdeco v]) / (25)) steps\n            end\n            point in direction (((x) / (y)) + (90))\n        end\n    end\nend\n\nwhen I receive [beat \(boss\) v]\nif <(c) = [1]> then\n    if <(boss phase) = [1]> then\n        if <(beat count) = [4]> then\n            glide (0.1) secs to x: (0) y: ([y position v] of [player v])\n            set [c v] to [2]\n            create clone of (_myself_ v)\n            set [c v] to [1]\n        end\n    end\n    if <(boss phase) = [2]> then\n        if <(beat count) = [1]> then\n            glide (0.1) secs to x: (0) y: ([y position v] of [player v])\n            set [c v] to [2]\n            create clone of (_myself_ v)\n            set [c v] to [1]\n        else\n            if <(beat count) = [3]> then\n                glide (0.1) secs to x: (0) y: (pick random (-100) to (150))\n                create clone of (npcs v)\n            end\n        end\n    end\n    if <(boss phase) = [3]> then\n        if <(beat count) < [3]> then\n            glide (0.1) secs to x: (0) y: ([y position v] of [player v])\n            set [c v] to [2]\n            create clone of (_myself_ v)\n            set [c v] to [1]\n        else\n            if <(beat count) < [4]> then\n                glide (0.1) secs to x: (0) y: (pick random (-100) to (150))\n                create clone of (npcs v)\n            end\n        end\n    end\nend\n\nwhen I receive [beat \(boss\) v]\nif <(c) = [4]> then\n    if <(boss phase) = [1]> then\n        if <(beat count) = [3]> then\n            set [c v] to [6]\n            create clone of (_myself_ v)\n            set [c v] to [4]\n        end\n    end\n    if <(boss phase) = [2]> then\n        switch costume to (mummy2 v)\n        if <(beat count) = [1]> then\n            go to x: ((([x position v] of [player v]) + (direction)) * (-0.1)) y: (([y position v] of [player v]) / (5))\n            repeat (10)\n                point towards (player v)\n                change [ghost v] effect by (-2)\n            end\n        else\n            if <(beat count) = [2]> then\n                repeat (10)\n                    point towards (player v)\n                end\n            else\n                if <(beat count) = [3]> then\n                    fire (mummy)\n                else\n                    set [ghost v] effect to (100)\n                end\n            end\n        end\n    end\n    if <<(boss phase) = [3]> or <(boss phase) = [6]>> then\n        switch costume to (mummy3 v)\n        if <(beat count) = [6]> then\n            go to x: ((([x position v] of [player v]) + (direction)) * (-0.1)) y: (([y position v] of [player v]) / (5))\n            repeat (10)\n                point towards (player v)\n                change [ghost v] effect by (-4)\n                change size by (2)\n            end\n        else\n            if <(beat count) = [7]> then\n                repeat (10)\n                    turn right (pick random (-3) to (3)) degrees\n                end\n            else\n                if <(beat count) = [8]> then\n                    fire (mummy)\n                else\n                    set size to (100) %\n                    set [ghost v] effect to (100)\n                    if <(beat count) = [3]> then\n                        set [c v] to [8]\n                        create clone of (_myself_ v)\n                        set [c v] to [4]\n                    end\n                end\n            end\n        end\n    end\n    if <(boss phase) = [4]> then\n        switch costume to (mummy3 v)\n        set size to (100) %\n        set [ghost v] effect to (100)\n        if <(beat count) = [4]> then\n            set [c v] to [9]\n            create clone of (_myself_ v)\n            set [c v] to [4]\n        else\n            if <(beat count) = [8]> then\n                set [c v] to [9]\n                create clone of (_myself_ v)\n                set [c v] to [4]\n            end\n        end\n    end\n    if <(boss phase) = [5]> then\n        if <<(beat count) = [1]> or <<(beat count) = [3]> or <<(beat count) = [5]> or <<(beat count) = [6]> or <(beat count) = [7]>>>>> then\n            go to x: (pick random (-25) to (25)) y: (pick random (-25) to (25))\n            point towards (player v)\n            set [c v] to [7]\n            create clone of (_myself_ v)\n            set [c v] to [4]\n            repeat (10)\n                change [ghost v] effect by (-5)\n            end\n        end\n        switch costume to (mummy2 v)\n        set size to (100) %\n        set [ghost v] effect to (100)\n    end\nend\n\nwhen I start as a clone\nif <(c) = [5]> then\n    show\n    repeat (10)\n        go [backward v] (200) layers\n        change y by (-5)\n        change [ghost v] effect by (10)\n    end\n    hide\n    delete this clone\nend\n\nwhen I start as a clone\nif <(c) = [4]> then\n    switch costume to (mummy1 v)\n    go to x: (150) y: (-110)\n    point in direction (90)\n    wait until <(boss phase) > [0]>\n    wait until <(mobile) = [1]>\n    wait (5) seconds\n    repeat (12)\n        turn left (7.5) degrees\n    end\n    wait until <(boss phase) > [1]>\n    set [c v] to [5]\n    create clone of (_myself_ v)\n    set [c v] to [4]\n    set [ghost v] effect to (100)\nend\n\nwhen I start as a clone\nclear graphic effects\nif <(c) = [4]> then\n    set [wall type v] to [1]\n    show\n    switch costume to (mummy1 v)\n    point in direction (90)\n    wait until <(boss phase) > [0]>\n    set tempo to (50)\n    set [beat count v] to [0]\n    repeat until <(boss phase) > [1]>\n        broadcast (beat \(boss\) v)\n        if <(beat count) = [4]> then\n            set [beat count v] to [0]\n        end\n        change [beat count v] by (1)\n        rest for (0.5) beats\n    end\n    set tempo to (100)\n    set [beat count v] to [0]\n    repeat until <(boss phase) > [2]>\n        broadcast (beat \(boss\) v)\n        if <(beat count) = [4]> then\n            set [beat count v] to [0]\n        end\n        change [beat count v] by (1)\n        rest for (0.5) beats\n    end\n    forever\n        broadcast (beat \(boss\) v)\n        if <(beat count) = [8]> then\n            set [beat count v] to [0]\n        end\n        change [beat count v] by (1)\n        rest for (0.5) beats\n    end\nend\n\ndefine fire (mummy)\nif <<(boss phase) = [3]> or <(boss phase) = [6]>> then\n    turn right (-15) degrees\n    repeat (5)\n        set [c v] to [7]\n        create clone of (_myself_ v)\n        turn right (7.5) degrees\n    end\n    set [c v] to [4]\n    turn right (-22.5) degrees\nelse\n    turn right (-20) degrees\n    repeat (3)\n        set [c v] to [7]\n        create clone of (_myself_ v)\n        turn right (20) degrees\n    end\n    set [c v] to [4]\n    turn right (-20) degrees\nend\n\nwhen I start as a clone\nif <(c) = [9]> then\n    set size to (100) %\n    clear graphic effects\n    set [ghost v] effect to (60)\n    point in direction (90)\n    change [wall type v] by (1)\n    show\n    switch costume to ((7) + ((wall type) mod (2)))\n    if <((wall type) mod (4)) = [1]> then\n        point in direction (90)\n        go to x: (240) y: (0)\n        repeat (5)\n            change size by (1)\n            change x by (-10)\n        end\n        wait (0.5) seconds\n        repeat until <<(x position) < [-235]> or <touching (player v)?>>\n            change [ghost v] effect by (-3)\n            change size by (1)\n            change x by (-10)\n        end\n    else\n        if <((wall type) mod (4)) = [2]> then\n            point in direction (0)\n            go to x: (0) y: (180)\n            repeat (5)\n                change size by (1)\n                change y by (-8)\n            end\n            wait (0.5) seconds\n            repeat until <<(x position) > [235]> or <touching (player v)?>>\n                change size by (1)\n                change [ghost v] effect by (-3)\n                change y by (-8)\n            end\n        else\n            if <((wall type) mod (4)) = [3]> then\n                point in direction (-90)\n                go to x: (-240) y: (0)\n                repeat (5)\n                    change size by (1)\n                    change x by (10)\n                end\n                wait (0.5) seconds\n                repeat until <<(x position) > [235]> or <touching (player v)?>>\n                    change [ghost v] effect by (-3)\n                    change size by (1)\n                    change x by (10)\n                end\n            else\n                point in direction (180)\n                go to x: (0) y: (-180)\n                repeat (5)\n                    change size by (1)\n                    change y by (8)\n                end\n                wait (0.5) seconds\n                repeat until <<(x position) > [235]> or <touching (player v)?>>\n                    change [ghost v] effect by (-3)\n                    change size by (1)\n                    change y by (8)\n                end\n            end\n        end\n    end\n    if <not <<key (n v) pressed?> and <(username) = [block866]>>> then\n        if <touching (player v)?> then\n            broadcast (die v)\n        end\n    end\n    delete this clone\nend\n\nwhen I start as a clone\nif <(c) = [9]> then\n    if <(timer) > [8]> then\n        delete this clone\n    end\nend\n\nwhen I receive [boss ded v]\nif <(c) = [0]> then\n    wait (4) seconds\n    stop [other scripts in sprite v]\nend\n\n@BossDeco\n\nwhen flag clicked\npen up\nhide\n\nwhen I receive [generating v]\nset [boss phase v] to [1]\nset size to (100) %\nif <(screen) = [35]> then\n    set [c v] to [1]\n    create clone of (_myself_ v)\n    set [c v] to [2]\n    create clone of (_myself_ v)\n    set [c v] to [3]\n    create clone of (_myself_ v)\n    set [c v] to [0]\n    go to x: (0) y: (-100)\n    hide\nend\nif <(screen) = [45]> then\n    set [c v] to [4]\n    create clone of (_myself_ v)\n    set [c v] to [5]\n    create clone of (_myself_ v)\n    set [c v] to [0]\nend\n\nwhen I receive [new screen v]\ndelete this clone\n\nwhen I receive [boss ded v]\nrepeat (20)\n    change [ghost v] effect by (5)\n    if <(c) = [1]> then\n        switch costume to (ringmasterhead3 v)\n    end\nend\nhide\ndelete this clone\n\nwhen I receive [level select v]\nset [screen v] to [0]\ndelete this clone\n\nwhen I start as a clone\nif <(c) = [1]> then\n    clear graphic effects\n    switch costume to (ringmasterhead1 v)\n    point in direction (90)\n    go to x: (0) y: (0)\n    show\n    forever\n        go [backward v] (1) layers\n        point towards (bosses v)\n        go to x: (x position) y: ((145) + ([y position v] of [bosses v]))\n        move ((distance to [bosses v]) / (50)) steps\n    end\nend\nif <(c) = [2]> then\n    clear graphic effects\n    switch costume to (ringmasterarm1 v)\n    point in direction (90)\n    go to x: (0) y: (0)\n    show\n    forever\n        go [backward v] (1) layers\n        point towards (bosses v)\n        move ((distance to [bosses v]) / (25)) steps\n        turn right ([direction v] of [bosses v]) degrees\n        go to x: (([x position v] of [bosses v]) + (60)) y: (y position)\n    end\nend\nif <(c) = [3]> then\n    clear graphic effects\n    switch costume to (ringmasterarm2 v)\n    point in direction (90)\n    go to x: (0) y: (0)\n    show\n    forever\n        go [backward v] (1) layers\n        point towards (bosses v)\n        move ((distance to [bosses v]) / (25)) steps\n        turn right ([direction v] of [bosses v]) degrees\n        go to x: (([x position v] of [bosses v]) - (75)) y: (y position)\n    end\nend\nif <(c) = [4]> then\n    wait until <(boss phase) > [0]>\n    wait until <(mobile) = [1]>\n    clear graphic effects\n    switch costume to (sarcophagus1 v)\n    point in direction (90)\n    go to x: (0) y: (0)\n    show\n    wait (1) seconds\n    next costume\n    repeat (25)\n        go to x: (([sin v] of ((timer) * (10000)) ) * (5)) y: (0)\n    end\n    go to x: (0) y: (0)\n    wait until <(boss phase) > [1]>\n    repeat (10)\n        go [backward v] (199) layers\n        change y by (-5)\n        change [ghost v] effect by (10)\n    end\n    delete this clone\nend\nif <(c) = [5]> then\n    wait until <(boss phase) > [0]>\n    wait until <(mobile) = [1]>\n    clear graphic effects\n    switch costume to (sarcophaguslid v)\n    point in direction (90)\n    go to x: (0) y: (0)\n    show\n    wait (1) seconds\n    repeat (25)\n        go to x: (([sin v] of ((timer) * (10000)) ) * (5)) y: (0)\n    end\n    go to x: (0) y: (0)\n    glide (1.5) secs to x: (75) y: (0)\n    wait until <(boss phase) > [1]>\n    repeat (10)\n        go [backward v] (99) layers\n        change y by (-5)\n        change [ghost v] effect by (10)\n    end\n    delete this clone\nend\n\nwhen I receive [beat \(boss\) v]\nif <(c) = [1]> then\n    if <(boss phase) = [1]> then\n        if <(beat count) = [4]> then\n            switch costume to (ringmasterhead1 v)\n            if <(mobile) = [1]> then\n                create clone of (npcs v)\n            end\n        else\n            if <<(mobile) = [1]> and <(beat count) = [2]>> then\n                create clone of (npcs v)\n            end\n            if <(lag prev) = [0]> then\n                next costume\n            end\n        end\n    end\n    if <(boss phase) = [2]> then\n        if <<(beat count) = [2]> or <(beat count) = [6]>> then\n            switch costume to (ringmasterhead5 v)\n            repeat (10)\n                turn right (60) degrees\n                wait (0.1) seconds\n                create clone of (npcs v)\n            end\n        else\n            if <(costume [number v]) = [5]> then\n                switch costume to (ringmasterhead1 v)\n            else\n                if <((beat count) mod (4)) = [1]> then\n                    create clone of (npcs v)\n                end\n                if <(lag prev) = [0]> then\n                    next costume\n                end\n            end\n        end\n    end\n    if <(boss phase) = [3]> then\n        if <<(beat count) = [2]> or <(beat count) = [6]>> then\n            switch costume to (ringmasterhead5 v)\n            repeat (10)\n                turn right (60) degrees\n                wait (0.1) seconds\n                create clone of (npcs v)\n            end\n        else\n            if <(costume [number v]) = [5]> then\n                switch costume to (ringmasterhead1 v)\n            else\n                if <((beat count) mod (3)) = [1]> then\n                    create clone of (npcs v)\n                end\n                if <(lag prev) = [0]> then\n                    next costume\n                end\n            end\n        end\n    end\nend\n\nwhen I start as a clone\nif <(c) = [4]> then\n    repeat until <(boss phase) > [1]>\n        go to [front v] layer\n        go [backward v] (2) layers\n    end\nend\nif <(c) = [5]> then\n    repeat until <(boss phase) > [1]>\n        go to [front v] layer\n        go [backward v] (1) layers\n    end\nend\n\n@Player\n\nwhen I receive [generating v]\nset [mobile v] to [0]\nset [invert x v] to [1]\npoint in direction (90)\ngo to x: (-204) y: (-90)\nif <(screen) = [35]> then\n    go to x: (-12) y: (-90)\nelse\n    if <(screen) = [45]> then\n        go to x: (-205) y: (-110)\n    else\n        go to x: (-205) y: (-90)\n    end\nend\nif <(screen) = [50]> then\n    wait until <(mobile) = [1]>\n    set [invert y v] to [-1]\nend\n\nwhen I receive [generated v]\nset [mobile v] to [1]\nshow\n\nwhen I receive [level select v]\nset [mobile v] to [0]\nrepeat (20)\n    hide\nend\n\ndefine detect danger\nif <not <<(username) = [block866]> and <key (n v) pressed?>>> then\n    if <touching (ground v)?> then\n        set [mobile v] to [0]\n        broadcast (die v)\n    end\n    if <touching (danger v)?> then\n        broadcast (die v)\n    end\n    if <touching (npcs v)?> then\n        broadcast (die v)\n    end\n    if <(invert y) = [-1]> then\n        if <(y position) > [175]> then\n            broadcast (die v)\n        end\n        if <(boss phase) < [1]> then\n    end\nend\n\nwhen I receive [spring v]\nif <(mobile) = [1]> then\n    if <(gamemode) = [2]> then\n        set [y v] to [13]\n    else\n        if <<(y) < [-24.5]> or <<<(screen) = [21]> or <(screen) = [28]>> and <(y) < [-16.5]>>> then\n            set [y v] to [25]\n        else\n            if <<(screen) = [21]> or <(screen) = [28]>> then\n                set [y v] to [18]\n            else\n                set [y v] to [20]\n            end\n        end\n    end\nend\n\nwhen flag clicked\nset volume to (0) %\nset size to (100) %\npen up\nerase all\nset [gamemode v] to [1]\nset [costume v] to [1]\nset [mobile v] to [0]\nset [falling? v] to [0]\nset [canjump v] to [0]\nset [inweb? v] to [0]\nset [x v] to [0]\nset [y v] to [0]\nset [jump key v] to [0]\nset [invert x v] to [1]\nset [restart count v] to [0]\nhide\npoint in direction (90)\nforever\n    if <(mobile) = [0]> then\n        set [x v] to [0]\n        set [y v] to [0]\n    else\n        if <(mobile) = [1]> then\n            set [menu? v] to [0]\n            show list [save code v]\n            if <key (r v) pressed?> then\n                if <(restart count) > [100]> then\n                    change [screen v] by (-1)\n                    broadcast (new screen v)\n                end\n            end\n            repeat until <not <(screen) = [24]>>\n                change [restart count v] by (1)\n                if <key (r v) pressed?> then\n                    if <(restart count) > [100]> then\n                        change [screen v] by (-1)\n                        broadcast (new screen v)\n                    end\n                end\n                set x to (-205)\n                change y by (-8)\n                turn left (20) degrees\n                ground\n                if <<key (space v) pressed?> or <<mouse down?> or <<key (up arrow v) pressed?> or <key (w v) pressed?>>>> then\n                    change y by (16)\n                    turn right (40) degrees\n                end\n                if <(timer) > [3]> then\n                    detect danger\n                end\n                erase all\n                draw web\n                change x by (x)\n                change [x v] by (<<key (right arrow v) pressed?> or <key (d v) pressed?>> - <<key (left arrow v) pressed?> or <key (a v) pressed?>>)\n                set [x v] to ((x) * (0.9))\n            end\n            change [restart count v] by (1)\n            clear graphic effects\n            set rotation style [don't rotate v]\n        end\n        if <(invert y) > [0]> then\n            switch costume to (hitbox v)\n        else\n            switch costume to (hitbox2 v)\n        end\n        if <(gamemode) = [2]> then\n            change [y v] by (-0.7)\n        else\n            if <not <(gamemode) = [4]>> then\n                change [y v] by (-1.5)\n            else\n                if <(y) > [-8]> then\n                    change [y v] by (-0.8)\n                end\n            end\n        end\n        change [falling? v] by (1)\n        change y by ((invert y) * (y))\n        ground\n        if <(falling?) > [2]> then\n            set [canjump v] to [0]\n        end\n        if <<<key (space v) pressed?> or <<mouse down?> or <<key (up arrow v) pressed?> or <key (w v) pressed?>>>> and > then\n            if <<<(mouse y) < [120]> or <(mouse x) > [-180]>> or <not <mouse down?>>> then\n                if <(gamemode) = [4]> then\n                    if <(y) < [6]> then\n                        change [y v] by (1.5)\n                    end\n                else\n                    if <<(canjump) = [1]> or <(gamemode) = [2]>> then\n                        if <(inweb?) = [1]> then\n                            set [y v] to [12]\n                        else\n                            if <(gamemode) = [2]> then\n                                if <(jump key) = [0]> then\n                                    set [y v] to [6]\n                                end\n                            else\n                                if <(screen) = [42]> then\n                                    set [y v] to [12.2]\n                                else\n                                    set [y v] to [14.2]\n                                end\n                            end\n                        end\n                        set [jump key v] to [1]\n                        set [canjump v] to [0]\n                    else\n                        if <(gamemode) = [3]> then\n                            if <(can flip) = [1]> then\n                                if <(jump key) = [0]> then\n                                    set [y v] to [0]\n                                    set [trail v] to [0]\n                                    set [invert y v] to ((invert y) * (-1))\n                                    set [can flip v] to [0]\n                                    if <(lag prev) = [0]> then\n                                        create clone of (modechanger v)\n                                    end\n                                    set [jump key v] to [1]\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        else\n            set [jump key v] to [0]\n        end\n        change [x v] by ((<<key (right arrow v) pressed?> or <key (d v) pressed?>> - <<key (left arrow v) pressed?> or <key (a v) pressed?>>) * (invert x))\n        if <(gamemode) = [2]> then\n            set [x v] to ((x) * (0.6))\n        else\n            set [x v] to ((x) * (0.7))\n        end\n        if <(x) > [0]> then\n            set [last x v] to [1]\n        else\n            if <(x) < [0]> then\n                set [last x v] to [-1]\n            end\n        end\n        if <(inweb?) = [1]> then\n            change x by ((x) * (1.4))\n        else\n            change x by ((x) * (2.6))\n        end\n        detect danger\n        if <(canjump) = [0]> then\n            if <(gamemode) = [2]> then\n                if <(jump key) = [0]> then\n                    point in direction (((90) + (([sin v] of ((timer) * (1000)) ) * (10))) * (invert y))\n                end\n            else\n                if <(gamemode) = [4]> then\n                    point in direction (((90) + (((x) + (y)) * (2))) * (invert y))\n                else\n                    if <(x) < [0]> then\n                        turn left (20) degrees\n                    else\n                        turn right (20) degrees\n                    end\n                end\n            end\n        end\n        set rotation style [all around v]\n        switch costume to (costume)\n        if <(x position) > [230]> then\n            if <not <<<(screen) = [35]> and <(boss phase) > [-1]>> or <<<(screen) = [15]> and <(boss phase) > [-1]>> or >>> then\n                if <touching (end v)?> then\n                    broadcast (unlock v)\n                    broadcast (level select v)\n                else\n                    broadcast (new screen v)\n                end\n            end\n        end\n    end\nend\n\nwhen I start as a clone\nforever\n    switch costume to (costume)\nend\n\nset [costume v] to []\n\ndefine draw web\nset [y \(stored\) v] to (y position)\nset y to (180)\nset x to (-205)\nset pen color to (#ffffff)\npen down\nglide (0) secs to x: ((-205) + ((x) * (5))) y: (y \(stored\))\npen up\n\nwhen [c v] key pressed\nif <(username) = [block866]> then\n    if <(costume) < [12]> then\n        change [costume v] by (1)\n    else\n        set [costume v] to [1]\n    end\nend\n\nwhen I start as a clone\nclear graphic effects\ngo to x: (0) y: (0)\npoint in direction (90)\nset size to (500) %\nshow\ngo to [front v] layer\nwait until <(choose character) = [1]>\nforever\n    go to [front v] layer\n    if <(choose character) = [0]> then\n        delete this clone\n    end\nend\n\nwhen I receive [superspring v]\nif <(mobile) = [1]> then\n    set [y v] to [24]\nend\n\nset [costume v] to [4]\n\nwhen I receive [unlock v]\nif <(level) = [1]> then\n    if <not <[levels unlocked v] contains [2]?>> then\n        add [2] to [levels unlocked v]\n        broadcast (finish level 1 v)\n    end\nend\nif <(level) = [2]> then\n    if <not <[levels unlocked v] contains [3]?>> then\n        add [3] to [levels unlocked v]\n        broadcast (finish level 2 v)\n    end\nend\nif <(level) = [3]> then\n    if <not <[levels unlocked v] contains [4]?>> then\n        add [4] to [levels unlocked v]\n        broadcast (finish level 3 v)\n    end\nend\nif <(level) = [4]> then\n    if <not <[levels unlocked v] contains [5]?>> then\n        add [5] to [levels unlocked v]\n        broadcast (finish level 4 v)\n    end\nend\nif <(level) = [5]> then\n    if <not <[levels unlocked v] contains [6]?>> then\n        add [6] to [levels unlocked v]\n        broadcast (finish level 5 v)\n    end\nend\nif <(level) = [6]> then\n    if <not <[levels unlocked v] contains [7]?>> then\n        add [7] to [levels unlocked v]\n        broadcast (finish level 6 v)\n    end\nend\nif <(level) = [7]> then\n    broadcast (finish game v)\nend\nbroadcast (play menu music v)\n\npoint in direction (90)\n\nwhen I receive [right v]\nset [x v] to [6]\nset [y v] to [12]\nrepeat until <(x) < [0.5]>\n    set [invert x v] to [1]\nend\n\nwhen [l v] key pressed\nforever\n    if <(mobile) = [1]> then\n        if <key (l v) pressed?> then\n            if <(lag prev) = [1]> then\n                set [lag prev v] to [0]\n            else\n                set [lag prev v] to [1]\n            end\n            create clone of (lag prev v)\n            wait until <not <key (l v) pressed?>>\n        end\n    end\nend\n\nwhen I receive [level select v]\nrepeat (10)\n    hide\nend\n\nwhen I receive [down v]\nset [y v] to [-14]\n\nset [screen v] to [15]\n\nwhen I receive [orb v]\nif <(screen) = [22]> then\n    set [y v] to [11]\nelse\n    if <(screen) = [15]> then\n        set [y v] to [9]\n    else\n        set [y v] to [10]\n    end\nend\n\ndefine ground\nif <<<(y) < [-0.5]> and <(invert y) < [0]>> or <<(y) < [0.5]> and <(invert y) > [0]>>> then\n    repeat until <<not <touching (ground v)?>> or <<(y position) < [-130]> and <not <(screen) = [45]>>>>\n        set [y v] to [0]\n        set [falling? v] to [0]\n        set [canjump v] to [1]\n        set [can flip v] to [1]\n        set [trail v] to [100]\n        change y by ((invert y) * (0.5))\n        ground rotation\n    end\nend\n\nwhen I receive [generating v]\nset [x v] to [0]\nset [y v] to [0]\nset [gamemode v] to [1]\nset [invert y v] to [1]\nset [invert x v] to [1]\nset [canjump v] to [0]\nset size to (100) %\n\ndefine ground rotation\nif <(gamemode) = [2]> then\n    point in direction (90)\nelse\n    if <<([abs v] of ((direction) - (90)) ) < ([abs v] of ((direction) - (180)) )> and <<([abs v] of ((direction) - (90)) ) < ([abs v] of ((direction) - (0)) )> and <([abs v] of ((direction) - (90)) ) < ([abs v] of ((direction) - (-90)) )>>> then\n        point in direction (90)\n    end\n    if <<([abs v] of ((direction) - (180)) ) < ([abs v] of ((direction) - (90)) )> and <<([abs v] of ((direction) - (180)) ) < ([abs v] of ((direction) - (0)) )> and <([abs v] of ((direction) - (180)) ) < ([abs v] of ((direction) - (-90)) )>>> then\n        if <(costume) = [10]> then\n            point in direction (165)\n        else\n            point in direction (180)\n        end\n    end\n    if <<([abs v] of ((direction) - (-90)) ) < ([abs v] of ((direction) - (90)) )> and <<([abs v] of ((direction) - (-90)) ) < ([abs v] of ((direction) - (0)) )> and <([abs v] of ((direction) - (-90)) ) < ([abs v] of ((direction) - (180)) )>>> then\n        point in direction (-90)\n    end\n    if <<([abs v] of ((direction) - (0)) ) < ([abs v] of ((direction) - (180)) )> and <<([abs v] of ((direction) - (0)) ) < ([abs v] of ((direction) - (90)) )> and <([abs v] of ((direction) - (0)) ) < ([abs v] of ((direction) - (-90)) )>>> then\n        if <(costume) = [10]> then\n            point in direction (15)\n        else\n            point in direction (0)\n        end\n    end\nend\n\nwhen I receive [change gravity v]\nset [invert y v] to ((invert y) * (-1))\nset [y v] to ((y) * (0.4))\n\nwhen I receive [superorb v]\nset [y v] to [16]\n\nwhen I receive [left v]\nset [x v] to [-6]\nset [y v] to [12]\nif <(screen) = [32]> then\n    change [y v] by (2)\nend\nrepeat until <(x) > [-0.5]>\n    set [invert x v] to [-1]\nend\nset [invert x v] to [1]\n\nwhen [v v] key pressed\nforever\n    if <(mobile) = [1]> then\n        if <key (v v) pressed?> then\n            if <(volume) = [100]> then\n                set volume to (0) %\n            else\n                set volume to (100) %\n            end\n            create clone of (death sounds v)\n            wait until <not <key (v v) pressed?>>\n        end\n    end\nend\n\nwhen I receive [die v]\nset [mobile v] to [0]\nstart sound (costume)\nif <<(screen) = [24]> or <<<(screen) = [35]> and <(boss phase) > [0]>> or <<<(screen) = [40]> and <(gamemode) = [3]>> or >>> then\n    change [screen v] by (-1)\n    broadcast (new screen v)\nend\nif <(costume) = [12]> then\n    switch costume to (mashed v)\nend\nif  then\n    if  then\n        broadcast (spawn mode changer v)\n    end\nend\nif <(costume) = [10]> then\n    repeat (15)\n        switch costume to (boom v)\n        change size by (600)\n        change [ghost v] effect by (7)\n    end\nelse\n    repeat (20)\n        if <(costume) = [6]> then\n            switch costume to (vampdyer v)\n        end\n        change size by (-3)\n        change [ghost v] effect by (5)\n        if <<(costume) = [4]> or <(costume) = [5]>> then\n            point in direction ((([sin v] of ((timer) * (1000)) ) * (10)) + (90))\n            change y by (3)\n        else\n            turn right (15) degrees\n        end\n    end\nend\nhide\nclear graphic effects\nset [x v] to [0]\nset [y v] to [0]\nset [gamemode v] to [1]\nset [invert y v] to [1]\nset [invert x v] to [1]\nset [canjump v] to [0]\nset size to (100) %\nif <(screen) = [35]> then\n    go to x: (-12) y: (-90)\nelse\n    go to x: (-205) y: (-90)\nend\nif <(screen) = [50]> then\n    set [invert y v] to [-1]\nend\npoint in direction (90)\nshow\nset [mobile v] to [1]\n\nif <(screen) = [50]> then\n    repeat until <(gamemode) = [1]>\n        repeat (10)\n            set [gamemode v] to [1]\n            wait (0) seconds\n        end\n    end\nend\n\n@Achievement\n\nwhen flag clicked\ngo to x: (0) y: (0)\nhide\nforever\n    go to [front v] layer\n    go [backward v] (2) layers\nend\n\nwhen flag clicked\nwait (1) seconds\nwait until <(coins) > [0]>\nswitch costume to (1 coin v)\nadd [3] to [costumes unlocked v]\nbroadcast (achievement v)\nwait until <(coins) > [2]>\nswitch costume to (3 coin v)\nadd [5] to [costumes unlocked v]\nbroadcast (achievement v)\nwait until <(coins) > [4]>\nswitch costume to (5 coin v)\nadd [6] to [costumes unlocked v]\nbroadcast (achievement v)\nwait until <(coins) > [6]>\nswitch costume to (all coins v)\nadd [11] to [costumes unlocked v]\nbroadcast (achievement v)\n\nwhen I receive [achievement v]\nclear graphic effects\nbroadcast (show choose char v)\nshow\nrepeat (100)\n    go to [front v] layer\n    go [backward v] (2) layers\nend\nrepeat (50)\n    change [ghost v] effect by (2)\n    go to [front v] layer\n    go [backward v] (2) layers\nend\nhide\nclear graphic effects\n\nwhen I receive [finish level 2 v]\nswitch costume to (lvl 2 v)\nadd [4] to [costumes unlocked v]\nbroadcast (achievement v)\n\nwhen I receive [finish level 3 v]\nswitch costume to (lvl 3 v)\nadd [7] to [costumes unlocked v]\nbroadcast (achievement v)\n\nwhen I receive [finish level 4 v]\nswitch costume to (lvl 4 v)\nadd [8] to [costumes unlocked v]\nbroadcast (achievement v)\n\nwhen I receive [finish level 6 v]\nswitch costume to (lvl 6 v)\nadd [10] to [costumes unlocked v]\nbroadcast (achievement v)\n\nwhen I receive [finish level 7 v]\nswitch costume to (full game v)\nadd [12] to [costumes unlocked v]\nbroadcast (achievement v)\n\nwhen I receive [finish level 1 v]\nswitch costume to (lvl 1 v)\nadd [2] to [costumes unlocked v]\nbroadcast (achievement v)\n\nwhen I receive [finish level 5 v]\nswitch costume to (lvl 5 v)\nadd [9] to [costumes unlocked v]\nbroadcast (achievement v)\n\nswitch costume to (full game v)\nbroadcast (achievement v)\n\nwhen I receive [generating v]\nhide\n\nwhen I receive [level select v]\nhide\n\n@Choose character\n\nwhen flag clicked\nset [choose character v] to [0]\nset [shift menu v] to [0]\nswitch costume to (costume1 v)\nhide\ngo to x: (0) y: (0)\ndelete (all) of [costumes unlocked v]\nadd [1] to [costumes unlocked v]\n\nwhen I receive [show choose char v]\nstop [other scripts in sprite v]\nif <(length of [costumes unlocked v]) > [1]> then\n    set [shift menu v] to [1]\n    show\n    forever\n        if <<(menu?) = [1]> or <<(screen) = [24]> or <<(screen) = [35]> or <<(screen) = [45]> or >>>> then\n            hide\n        else\n            go to [front v] layer\n            go [backward v] (2) layers\n            show\n            clear graphic effects\n            if <touching (mouse-pointer v)?> then\n                repeat until <<mouse down?> or <not <touching (mouse-pointer v)?>>>\n                    set [brightness v] effect to (30)\n                    go to [front v] layer\n                    go [backward v] (2) layers\n                end\n                if <mouse down?> then\n                    if <(choose character) = [0]> then\n                        if <(mobile) = [1]> then\n                            set [mobile v] to [0]\n                            set [choose character v] to [1]\n                            switch costume to (costume2 v)\n                            create clone of (_myself_ v)\n                            create clone of (player v)\n                        end\n                    else\n                        set [choose character v] to [0]\n                        switch costume to (costume1 v)\n                        wait (0.1) seconds\n                        set [mobile v] to [1]\n                    end\n                end\n                repeat until <not <mouse down?>>\n                    go to [front v] layer\n                    go [backward v] (2) layers\n                end\n            end\n        end\n    end\nend\n\nwhen I receive [unlock v]\nstop [other scripts in sprite v]\nhide\n\nchange y by (24)\n\nwhen I receive [level select v]\nstop [other scripts in sprite v]\nhide\n\nwhen I receive [menu v]\nstop [other scripts in sprite v]\nhide\n\nwhen I start as a clone\nforever\n    go to [front v] layer\n    go [backward v] (2) layers\n    if <(choose character) = [0]> then\n        delete this clone\n    end\nend\n\nwhen I receive [new screen v]\nbroadcast (show choose char v)\n\nwhen I start as a clone\ngo to x: (0) y: (0)\npoint in direction (90)\nset size to (500) %\nswitch costume to (arrows v)\nclear graphic effects\nforever\n    if <touching (mouse-pointer v)?> then\n        repeat until <<mouse down?> or <not <touching (mouse-pointer v)?>>>\n            if <(mouse x) > [0]> then\n                switch costume to (arrows2 v)\n            else\n                switch costume to (arrows3 v)\n            end\n        end\n        if <mouse down?> then\n            switch costume to (arrows v)\n            set [count v] to (costume)\n            if <(mouse x) > [0]> then\n                change [count v] by (1)\n                repeat until <[costumes unlocked v] contains (count)?>\n                    change [count v] by (1)\n                    if <(count) > [12]> then\n                        set [count v] to [1]\n                    end\n                end\n            else\n                change [count v] by (-1)\n                repeat until <[costumes unlocked v] contains (count)?>\n                    change [count v] by (-1)\n                    if <(count) < [1]> then\n                        set [count v] to [12]\n                    end\n                end\n            end\n            set [costume v] to (count)\n            wait until <not <mouse down?>>\n        end\n    else\n        switch costume to (arrows v)\n    end\nend\n\n@Death Sounds\n\nwhen flag clicked\ngo to x: (0) y: (0)\nswitch costume to (costume1 v)\nhide\n\nwhen I start as a clone\ngo to [front v] layer\ngo [backward v] (1) layers\nswitch costume to ((([volume v] of [player v]) / (100)) + (1))\nshow\nwait (0.5) seconds\nrepeat (10)\n    go to [front v] layer\n    go [backward v] (1) layers\n    change [ghost v] effect by (10)\nend\ndelete this clone\n\n@Lag Prev\n\nwhen flag clicked\nset [lag prev v] to [0]\ngo to x: (0) y: (0)\nswitch costume to (costume1 v)\nhide\n\nwhen I start as a clone\ngo to [front v] layer\ngo [backward v] (1) layers\nswitch costume to ((lag prev) + (1))\nshow\nwait (0.5) seconds\nrepeat (10)\n    go to [front v] layer\n    go [backward v] (1) layers\n    change [ghost v] effect by (10)\nend\ndelete this clone\n\n@MenuButton\n\nwhen flag clicked\nswitch costume to (costume1 v)\nhide\ngo to x: (-55) y: (0)\n\nwhen I receive [new screen v]\nstop [other scripts in sprite v]\nshow\nwait until <(mobile) = [1]>\nforever\n    if <not <<(screen) = [24]> or <<(screen) = [35]> or <<(screen) = [45]> or >>>> then\n        if <(shift menu) = [1]> then\n            go to x: (0) y: (0)\n        else\n            go to x: (-55) y: (0)\n        end\n        go to [front v] layer\n        go [backward v] (2) layers\n        show\n        clear graphic effects\n        if <(mobile) = [1]> then\n            if <touching (mouse-pointer v)?> then\n                repeat until <<mouse down?> or <not <touching (mouse-pointer v)?>>>\n                    set [brightness v] effect to (30)\n                    go to [front v] layer\n                    go [backward v] (2) layers\n                end\n                if <mouse down?> then\n                    broadcast (play menu music v)\n                    broadcast (level select v)\n                end\n                repeat until <not <mouse down?>>\n                    go to [front v] layer\n                    go [backward v] (2) layers\n                end\n            end\n        end\n    else\n        hide\n    end\nend\n\nwhen I receive [menu v]\nrepeat (10)\n    stop [other scripts in sprite v]\n    hide\nend\n\nwhen I receive [level select v]\nrepeat (10)\n    stop [other scripts in sprite v]\n    hide\nend\ngo to x: (-55) y: (0)\n\nwhen I receive [show choose char v]\ngo to x: (0) y: (0)\n\n@Save\n\nwhen flag clicked\nswitch costume to (costume1 v)\nhide\ngo to x: (0) y: (0)\n\nwhen I receive [level select v]\nstop [other scripts in sprite v]\nshow\nforever\n    if <(mobile) = [0]> then\n        repeat until <not <mouse down?>>\n            go to [front v] layer\n            go [backward v] (1) layers\n        end\n        go to [front v] layer\n        go [backward v] (1) layers\n        show\n        clear graphic effects\n        if <(mobile) = [0]> then\n            if <touching (mouse-pointer v)?> then\n                repeat until <<mouse down?> or <not <touching (mouse-pointer v)?>>>\n                    set [brightness v] effect to (30)\n                    go to [front v] layer\n                    go [backward v] (1) layers\n                end\n                if <mouse down?> then\n                    broadcast (save v)\n                end\n            end\n        end\n    else\n        show list [save code v]\n        hide\n    end\nend\n\nwhen I receive [menu v]\nrepeat (10)\n    stop [other scripts in sprite v]\n    hide\nend\n\nwhen I receive [new screen v]\nrepeat (10)\n    stop [other scripts in sprite v]\n    hide\nend\n\n@Thumbnail\n\nwhen flag clicked\nset [ghost v] effect to (100)\nforever\n    go to [front v] layer\n    go [backward v] (1) layers\nend\n\n@Epic Music\n\nwhen flag clicked\nset [lag prev v] to [0]\ngo to x: (0) y: (0)\nswitch costume to (costume1 v)\nhide\nforever\n    set volume to ([abs v] of (([volume v] of [_stage_ v]) - (100)) ) %\nend\n\nwhen I start as a clone\ngo to [front v] layer\ngo [backward v] (1) layers\nswitch costume to (((volume) / (100)) + (1))\nshow\nwait (0.5) seconds\nrepeat (10)\n    go to [front v] layer\n    go [backward v] (1) layers\n    change [ghost v] effect by (10)\nend\ndelete this clone\n\nwhen flag clicked\nset volume to (0) %\nwait until <(volume) = [100]>\nforever\n    play sound [01 - Monster Mash v] until done\nend\n\n
A and D or ← and → to move.\nW, ↑ or Click to jump.\n\nPress R to reload the screen if there's anything wrong.\nPress L to toggle lag prevention.\nPress V to toggle death sounds.\n\nPlease report any bugs, the whole game is possible, I've completed it.\n\nAlthough if you beat it, I'm your slave XD