Apps - Platformer


@Stage\n\nset [light v] to [0]\n\nwhen flag clicked\nforever\n    if <(Room#) = [1]> then\n        if <(Using Door!) = [0]> then\n            repeat until <not <(Using Door!) = [0]>>\n                play sound [Room 1 v] until done\n            end\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Room#) = [2]> then\n        if <(Using Door!) = [0]> then\n            repeat until <not <(Using Door!) = [0]>>\n                play sound [Room 2 v] until done\n            end\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Room#) = [3]> then\n        if <(Using Door!) = [0]> then\n            repeat until <not <(Using Door!) = [0]>>\n                play sound [Room 3 v] until done\n            end\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Room#) = [4]> then\n        if <(Using Door!) = [0]> then\n            repeat until <not <(Using Door!) = [0]>>\n                play sound [Room 4 v] until done\n            end\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    switch backdrop to (Room#)\nend\n\nset [room# v] to [4]\n\nwhen flag clicked\nforever\n    if <(Room#) = [2]> then\n        if <(light) = [1]> then\n            set [brightness v] effect to (0)\n        else\n            set [brightness v] effect to (-100)\n        end\n    end\nend\n\nwhen flag clicked\n\nset [brightness v] effect to (0)\n\nwhen flag clicked\nforever\n    if <(Room#) = [5]> then\n        repeat until <(BP Fade in) = [1]>\n            set [brightness v] effect to (-100)\n        end\n        wait until <(BP Fade in) = [2]>\n        set [brightness v] effect to (-100)\n        repeat (50)\n            change [brightness v] effect by (2)\n        end\n        set [brightness v] effect to (0)\n        wait (1) seconds\n        set [bp fade in v] to [0]\n        stop [this script v]\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Using Door!) = [-1]> then\n        set [brightness v] effect to (0)\n        repeat (10)\n            change [brightness v] effect by (-10)\n        end\n        set [brightness v] effect to (-100)\n        wait until <(Using Door!) = [-4]>\n    end\n    if <(Using Door!) = [-5]> then\n        wait (0.1) seconds\n        repeat (100)\n            change [brightness v] effect by (1)\n        end\n        set [brightness v] effect to (0)\n        wait until <(Using Door!) = [0]>\n    end\nend\n\nwhen flag clicked\nforever\n    if <<(Room#) = [6]> and <(Surprise Music) = [1]>> then\n        if <(Using Door!) = [0]> then\n            repeat until <not <(Using Door!) = [0]>>\n                play sound [Room 6 v] until done\n            end\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Boss Battle) = [1]> then\n        repeat until <(Boss Battle) = [0]>\n            play sound [Room 5 Battle v] until done\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <<(Room#) = [5]> and <(Cutscene) = [1]>> then\n        repeat until <not <<(Room#) = [5]> and <(Cutscene) = [1]>>>\n            play sound [Room 5 Dialogue v] until done\n        end\n    end\nend\n\nset [boss battle v] to [1]\n\nwhen flag clicked\nforever\n    if <(Room#) = [6]> then\n        repeat until <(P Fade In) = [1]>\n            set [brightness v] effect to (-100)\n        end\n        set [brightness v] effect to (-100)\n        repeat (50)\n            change [brightness v] effect by (2)\n        end\n        set [brightness v] effect to (0)\n        stop [this script v]\n    end\nend\n\nwait until <(BP Fade in) = [2]>\n\nwhen flag clicked\nforever\n    if <(Using Door!) = [1]> then\n        set [brightness v] effect to (0)\n        repeat (10)\n            change [brightness v] effect by (-10)\n        end\n        set [brightness v] effect to (-100)\n        wait until <(Using Door!) = [4]>\n    end\n    if <(Using Door!) = [5]> then\n        wait (0.1) seconds\n        repeat (100)\n            change [brightness v] effect by (1)\n        end\n        set [brightness v] effect to (0)\n        wait until <(Using Door!) = [0]>\n    end\nend\n\n@Dessie\n\nwhen flag clicked\nforever\n    if <(distance to [forwarddoor v]) < [6]> then\n        repeat until <<(distance to [forwarddoor v]) > [5]> or <key (down arrow v) pressed?>>\n        if <key (down arrow v) pressed?> then\n            if <(WalkAllowed) = [1]> then\n                set [using door! v] to [1]\n                set [frame v] to [0]\n                wait until <(Using Door!) = [2]>\n                go [backward v] (100) layers\n                wait until <(Using Door!) = [3]>\n                set [brightness v] effect to (-100)\n                wait until <(Using Door!) = [5]>\n                go to [front v] layer\n                wait (0.1) seconds\n                repeat (100)\n                    change [brightness v] effect by (1)\n                end\n                set [brightness v] effect to (0)\n            end\n        end\n    end\nend\n\nwhen flag clicked\ngo to [front v] layer\n\nwhen flag clicked\nforever\n    set [dessie x v] to (x position)\n    set [dessie y v] to (y position)\nend\n\nwhen flag clicked\nforever\n    if <((y-velocity) * (-1)) > (Momentum)> then\n        set [momentum v] to ((y-velocity) * (-1))\n    end\n    if <(falling?) = [6]> then\n        set [momentum v] to [0]\n    end\nend\n\nset x to (31)\n\nwhen flag clicked\nforever\n    if <(Pipe Where) = [1]> then\n        go to x: (19) y: (-115)\n        set [y-velocity v] to [-18]\n        wait (0.05) seconds\n        set [pipe where v] to [0]\n        set [piping v] to [0]\n    end\nend\n\nwhen flag clicked\nforever\n    if <<(Pipe Where) = [2]> or <(Pipe Where) = [4]>> then\n        go to x: (170) y: (-153)\n        wait until <(Pipe Where) = [0]>\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Pipe Where) = [5]> then\n        go to x: (28) y: (-70)\n        wait until <(Pipe Where) = [0]>\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Pipe Where) = [6]> then\n        set [size v] to [1]\n        wait until <(size) = [100]>\n        go to x: (63) y: (-5)\n        wait until <(Pipe Where) = [0]>\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Pipe Where) = [7]> then\n        set [size v] to [1]\n        wait until <(size) = [100]>\n        go to x: (-209) y: (-153)\n        wait until <(Pipe Where) = [0]>\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Pipe Where) = [8]> then\n        go to x: (-66) y: (77)\n        set [size v] to [1]\n        wait until <(Pipe Where) = [0]>\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Pipe Where) = [9]> then\n        go to x: (40) y: (53)\n        set [size v] to [2]\n        wait until <(Pipe Where) = [0]>\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Pipe Where) = [10]> then\n        go to x: (-53) y: (128)\n        wait until <(Pipe Where) = [0]>\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Pipe Where) = [11]> then\n        go to x: (168) y: (-91)\n        wait (0.1) seconds\n        set [piping v] to [0]\n        set [pipe where v] to [0]\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Pipe Where) = [12]> then\n        go to x: (-9) y: (-86)\n        if <(Momentum) > [7]> then\n            set [y-velocity v] to ((Momentum) + (1))\n        else\n            set [y-velocity v] to [8]\n        end\n        wait (0.007) seconds\n        set [piping v] to [0]\n        set [pipe where v] to [0]\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Pipe Where) = [13]> then\n        go to x: (-115) y: (-170)\n        if <(Momentum) > [7]> then\n            set [y-velocity v] to ((Momentum) + (1))\n        else\n            set [y-velocity v] to [8]\n        end\n        wait (0.007) seconds\n        set [piping v] to [0]\n        set [pipe where v] to [0]\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Pipe Where) = [14]> then\n        go to x: (-91) y: (137)\n        wait until <(Pipe Where) = [0]>\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Pipe Where) = [15]> then\n        go to x: (236) y: (45)\n        set [size v] to [2]\n        wait until <(Pipe Where) = [0]>\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Pipe Where) = [16]> then\n        go to x: (168) y: (-91)\n        wait (0.1) seconds\n        set [piping v] to [0]\n        set [pipe where v] to [0]\n    end\nend\n\ngo to x: (168) y: (-91)\n\nwhen flag clicked\nforever\n    if <(Pipe Where) = [17]> then\n        go to x: (79) y: (-149)\n        wait until <(Pipe Where) = [0]>\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Pipe Where) = [20]> then\n        set [size v] to [0.5]\n        wait until <(size) = [50]>\n        go to x: (-179) y: (45)\n        wait until <(Pipe Where) = [0]>\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Pipe Where) = [21]> then\n        go to x: (-220) y: (-86)\n        if <(Momentum) > [7]> then\n            set [y-velocity v] to ((Momentum) + (1))\n        else\n            set [y-velocity v] to [8]\n        end\n        wait (0.007) seconds\n        set [piping v] to [0]\n        set [pipe where v] to [0]\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Pipe Where) = [22]> then\n        go to x: (231) y: (126)\n        wait until <(Pipe Where) = [0]>\n    end\nend\n\nset [size v] to [1]\n\ndefine Walk (direction) (speed)\npoint in direction (direction)\nchange x by (speed)\nset [slope v] to [0]\nrepeat until <<(slope) = [8]> or <<<not <touching (ground v)?>> and <not <touching (gates v)?>>> and <not <touching (fan v)?>>>>\n    change y by (1)\n    change [slope v] by (1)\nend\nif <(slope) = [8]> then\n    change x by ((0) - (speed))\n    change y by ((0) - (slope))\nend\nif <(frame) < [1]> then\n    set [frame v] to [1]\nend\nif <(frame) < [8]> then\n    change [frame v] by (0.5)\nelse\n    set [frame v] to [1]\nend\n\nwhen flag clicked\nforever\n    if <<(Dog Angry) = [1]> and <(Dog Moving) = [0]>> then\n        if <(Dog Level) = [0]> then\n            repeat until <<<(x position) > [180]> and <(falling?) = [0]>> or <(Dog Angry) = [0]>>\n                set [walkallowed v] to [0]\n                point in direction (-90)\n                change x by (4)\n                if <<(falling?) = [0]> and <not <(x position) > [180]>>> then\n                    set [y-velocity v] to [5]\n                end\n            end\n            set [dog angry v] to [0]\n            set [walkallowed v] to [1]\n        end\n        if <(Dog Level) = [1]> then\n            repeat until <<<(x position) < [-120]> and <(falling?) = [0]>> or <(Dog Angry) = [0]>>\n                set [walkallowed v] to [0]\n                point in direction (90)\n                if <(x position) > [-155]> then\n                    change x by (-4)\n                end\n                if <<(falling?) = [0]> and <not <(x position) < [-120]>>> then\n                    set [y-velocity v] to [5]\n                end\n            end\n            set [dog angry v] to [0]\n            set [walkallowed v] to [1]\n        end\n        if <(Dog Level) = [2]> then\n            repeat until <<<(x position) > [115]> and <(falling?) = [0]>> or <(Dog Angry) = [0]>>\n                set [walkallowed v] to [0]\n                point in direction (-90)\n                if <(x position) < [138]> then\n                    change x by (4)\n                end\n                if <<(falling?) = [0]> and <not <(x position) > [115]>>> then\n                    set [y-velocity v] to [5]\n                end\n            end\n            set [dog angry v] to [0]\n            set [walkallowed v] to [1]\n        end\n    end\nend\n\nset [dog angry v] to [0]\n\nwhen flag clicked\nforever\n    if <<<(WalkAllowed) = [1]> and <(Dog Level) = [1]>> and <(x position) > [-151]>> then\n        if <touching (ball 1 v)?> then\n            set [walkallowed v] to [0]\n            point in direction (90)\n            set [y-velocity v] to [5]\n            repeat until <<(falling?) = [0]> or <(x position) < [-179]>>\n                if <(x position) > [-180]> then\n                    change x by (-4)\n                end\n            end\n            set [walkallowed v] to [1]\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <<<(WalkAllowed) = [1]> and <(Dog Level) = [2]>> and <(x position) < [150]>> then\n        if <touching (ball 2 v)?> then\n            set [walkallowed v] to [0]\n            point in direction (-90)\n            set [y-velocity v] to [5]\n            repeat until <<(falling?) = [0]> or <(x position) > [179]>>\n                if <(x position) < [180]> then\n                    change x by (4)\n                end\n            end\n            set [walkallowed v] to [1]\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    set size to ((100) * (size)) %\nend\n\nwhen flag clicked\nforever\n    if <([abs v] of (Using Door!) ) > [0]> then\n        set [walkallowed v] to [0]\n        wait until <([abs v] of (Using Door!) ) = [0]>\n        set [walkallowed v] to [1]\n    end\nend\n\n\n\nwhen flag clicked\nforever\n    if <not <(Room#) = [3]>> then\n        set [size v] to [1]\n    end\nend\n\ndelete (all) of [balloons gotten v]\n\nwhen flag clicked\nset [frame2 v] to [1]\nset [y-velocity v] to [0]\nset [falling? v] to [10]\nset [boss battle v] to [0]\nforever\n    if <(Using Door!) = [0]> then\n        switch costume to (hitbox v)\n        change [y-velocity v] by (-1)\n        change y by (y-velocity)\n        Touch Ground <(y-velocity) > [0]>\n        if <key (right arrow v) pressed?> then\n            if <(WalkAllowed) = [1]> then\n                if <(Dog Seen) = [1]> then\n                    Walk (90) (2)\n                else\n                    Walk (90) (3)\n                end\n            end\n        else\n            if <key (left arrow v) pressed?> then\n                if <(WalkAllowed) = [1]> then\n                    if <(Dog Seen) = [1]> then\n                        Walk (-90) (-2)\n                    else\n                        Walk (-90) (-3)\n                    end\n                end\n            else\n                set [frame v] to [0]\n            end\n        end\n        if <<key (up arrow v) pressed?> and <(falling?) < [3]>> then\n            if <(WalkAllowed) = [1]> then\n                if <(Floating) = [0]> then\n                    set [y-velocity v] to [10]\n                    set [falling? v] to [6]\n                    set [jump key v] to [1]\n                end\n            end\n        else\n            set [jump key v] to [0]\n        end\n    end\n    Set Costume\nend\n\nwhen flag clicked\nforever\n    if <(distance to [backdoor v]) < [6]> then\n        repeat until <<(distance to [backdoor v]) > [5]> or <key (down arrow v) pressed?>>\n        if <key (down arrow v) pressed?> then\n            if <(WalkAllowed) = [1]> then\n                set [using door! v] to [-1]\n                set [frame v] to [0]\n                wait until <(Using Door!) = [-2]>\n                go [backward v] (100) layers\n                wait until <(Using Door!) = [-3]>\n                set [brightness v] effect to (-100)\n                wait until <(Using Door!) = [-5]>\n                go to [front v] layer\n                wait (0.1) seconds\n                repeat (100)\n                    change [brightness v] effect by (1)\n                end\n                set [brightness v] effect to (0)\n            end\n        end\n    end\nend\n\nswitch costume to (fall v)\nswitch costume to (fly v)\n\nadd [DPink] to [balloons gotten v]\nadd [LBlue] to [balloons gotten v]\nadd [Purple] to [balloons gotten v]\nadd [LYellow] to [balloons gotten v]\nset [room# v] to [4]\ngo to x: (120) y: (140)\n\nwhen flag clicked\nforever\n    if <<touching (ball 1 v)?> or <touching (ball 2 v)?>> then\n        start sound [ball v]\n        wait until <not <<touching (ball 1 v)?> or <touching (ball 2 v)?>>>\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (squeaky bone v)?> then\n        start sound [bone v]\n        wait until <not <touching (squeaky bone v)?>>\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Pipe Where) = [23]> then\n        go to x: (-225) y: (134)\n        wait until <(Pipe Where) = [0]>\n    end\nend\n\nwhen flag clicked\nset [box switcher v] to [1]\nforever\n    if <(Pipe Where) = [24]> then\n        if <(Box Switcher) = [1]> then\n            go to x: (164) y: (15)\n            wait until <(Pipe Where) = [0]>\n            set [box switcher v] to [-1]\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Pipe Where) = [24]> then\n        if <(Box Switcher) = [-1]> then\n            go to x: (94) y: (-94)\n            wait until <(Pipe Where) = [0]>\n            set [box switcher v] to [1]\n        end\n    end\nend\n\nset y to (-25)\n\nwhen flag clicked\nforever\n    if <(Pipe Where) = [18]> then\n        go to x: (120) y: (-168)\n        if <(Momentum) > [7]> then\n            set [y-velocity v] to (Momentum)\n        else\n            set [y-velocity v] to [8]\n        end\n        wait (0.02) seconds\n        set [piping v] to [0]\n        set [pipe where v] to [0]\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Pipe Where) = [25]> then\n        go to x: (-225) y: (134)\n        wait until <(Pipe Where) = [0]>\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Pipe Where) = [26]> then\n        go to x: (156) y: (56)\n        if <(Momentum) > [7]> then\n            set [y-velocity v] to (Momentum)\n        else\n            set [y-velocity v] to [8]\n        end\n        wait (0.5) seconds\n        set [piping v] to [0]\n        set [pipe where v] to [0]\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Pipe Where) = [27]> then\n        go to x: (82) y: (-21)\n        if <(Momentum) > [7]> then\n            set [y-velocity v] to (Momentum)\n        else\n            set [y-velocity v] to [8]\n        end\n        wait (0.5) seconds\n        set [piping v] to [0]\n        set [pipe where v] to [0]\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Pipe Where) = [28]> then\n        go to x: (22) y: (-19)\n        if <(Momentum) > [7]> then\n            set [y-velocity v] to (Momentum)\n        else\n            set [y-velocity v] to [8]\n        end\n        wait (0.5) seconds\n        set [piping v] to [0]\n        set [pipe where v] to [0]\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Pipe Where) = [29]> then\n        go to x: (-131) y: (-28)\n        if <(Momentum) > [7]> then\n            set [y-velocity v] to (Momentum)\n        else\n            set [y-velocity v] to [8]\n        end\n        wait (0.5) seconds\n        set [piping v] to [0]\n        set [pipe where v] to [0]\n    end\nend\n\nwhen flag clicked\nforever\n    if <<<(WalkAllowed) = [1]> and <(Dog Level) = [2]>> and <(x position) < [150]>> then\n        if <touching (squeaky bone v)?> then\n            start sound [bone v]\n            set [walkallowed v] to [0]\n            point in direction (-90)\n            change y by (1)\n            set [y-velocity v] to [8]\n            set [falling? v] to [1]\n            repeat until <<<(y-velocity) = [0]> and <(falling?) = [0]>> or <(x position) > [179]>>\n                if <(x position) < [180]> then\n                    change x by (3)\n                end\n            end\n            set [walkallowed v] to [1]\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Bomb Explode) = [1]> then\n        set [walkallowed v] to [0]\n        set [piping v] to [0]\n        set [pipe where v] to [0]\n        change y by (1)\n        set [y-velocity v] to [8]\n        set [falling? v] to [1]\n        repeat until <<(y-velocity) = [0]> and <(falling?) = [0]>>\n            if <<(Room#) = [5]> and <(Dessie X) > [169]>> then\n                set x to (170)\n            end\n            if <<(Room#) = [5]> and <(Dessie X) < [170]>> then\n                move (-3) steps\n            end\n        end\n        set [bomb explode v] to [0]\n        set [piping v] to [0]\n        set [pipe where v] to [0]\n        set [walkallowed v] to [1]\n    end\nend\n\npoint in direction (-90)\n\nwhen flag clicked\nforever\n    if <(BP Health) = [0]> then\n        set [box switcher v] to [-1]\n    end\nend\n\nwhen I start as a clone\ndelete this clone\n\nwhen flag clicked\nforever\n    if <(frame2) = [4]> then\n        wait (0.1) seconds\n        set [frame2 v] to [1]\n    end\n    if <(frame2) < [4]> then\n        wait (0.1) seconds\n        change [frame2 v] by (1)\n    end\nend\n\nwhen flag clicked\nwait until <(Room#) = [6]>\npoint in direction (90)\ngo to x: (-200) y: (-153)\nwait until <(WalkAllowed) = [1]>\nset [cutscene v] to [1]\nwait until <(round ((Dessie X) / (3))) = [0]>\npoint in direction (90)\ngo to x: (0) y: (-153)\nset [walkallowed v] to [0]\n\n\n\nwhen flag clicked\nforever\n    if <<<(Room#) = [5]> and <(Dessie X) > [169]>> and <(Boss Battle) = [1]>> then\n        if <key (right arrow v) pressed?> then\n            set x to (170)\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(WalkAllowed) = [0]> then\n        set [frame v] to [0]\n    end\nend\n\ndefine Touch Ground <up?>\nchange [falling? v] by (1)\nrepeat until <not <touching (ground v)?>>\n    if <up?> then\n        change y by (-1)\n    else\n        change y by (1)\n        if <(falling?) > [1]> then\n            start sound [108617__juskiddink__thud-dry v]\n        end\n        set [falling? v] to [0]\n    end\n    set [y-velocity v] to [0]\n    if <(falling?) > [1]> then\n        start sound [108617__juskiddink__thud-dry v]\n    end\nend\n\nset [pipe where v] to [0]\nset [piping v] to [0]\n\nwhen flag clicked\nforever\n    if <(Turn Dessie) = [4]> then\n        wait (0.1) seconds\n        point in direction (90)\n        wait (0.5) seconds\n        set [turn dessie v] to [0]\n    end\nend\n\nwhen flag clicked\nforever\n    if <<(Turn Dessie) = [1]> or <(Turn Dessie) = [3]>> then\n        point in direction (-90)\n        change y by (1)\n        set [y-velocity v] to [4]\n        set [falling? v] to [1]\n        set [turn dessie v] to [0]\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Turn Dessie) = [2]> then\n        point in direction (90)\n        change y by (1)\n        set [y-velocity v] to [4]\n        set [falling? v] to [1]\n        set [turn dessie v] to [0]\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Pipe Where) = [19]> then\n        go to x: (-65) y: (36)\n        set [y-velocity v] to [0]\n        wait (0.05) seconds\n        set [pipe where v] to [0]\n        set [piping v] to [0]\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (tramp v)?> then\n        start sound [Tramp v]\n        set [y-velocity v] to [17]\n        set [falling? v] to [6]\n        set [jump key v] to [1]\n    end\nend\n\nwhen flag clicked\ngo to x: (0) y: (-153)\npoint in direction (90)\nset [room# v] to [0]\nset [walkallowed v] to [0]\nset [cutscene v] to [1]\ndelete (all) of [balloons gotten v]\nadd [DPink] to [balloons gotten v]\nadd [LBlue] to [balloons gotten v]\nadd [Purple] to [balloons gotten v]\nadd [LYellow] to [balloons gotten v]\nadd [LPink] to [balloons gotten v]\nadd [DYellow] to [balloons gotten v]\nadd [DBlue] to [balloons gotten v]\n\nwhen flag clicked\nforever\n    if <(Pipe Where) = [3]> then\n        go to x: (232) y: (-78)\n        wait until <(Pipe Where) = [0]>\n    end\nend\n\ndefine Set Costume\nif <(Floating) = [0]> then\n    if <(falling?) < [3]> then\n        if <(frame) = [0]> then\n            if <<(frame2) = [2]> or <(frame2) = [4]>> then\n                if <(Secret) = [0]> then\n                    switch costume to (stand v)\n                else\n                    switch costume to (2stand v)\n                end\n            end\n            if <(frame2) = [1]> then\n                if <(Secret) = [0]> then\n                    switch costume to (stand2 v)\n                else\n                    switch costume to (2stand2 v)\n                end\n            end\n            if <(frame2) = [3]> then\n                if <(Secret) = [0]> then\n                    switch costume to (stand3 v)\n                else\n                    switch costume to (2stand3 v)\n                end\n            end\n        else\n            if <(Secret) = [0]> then\n                switch costume to (frame)\n            else\n                switch costume to ((frame) + (16))\n            end\n        end\n    else\n        if <(y-velocity) > [0]> then\n            if <(Secret) = [0]> then\n                switch costume to (jump v)\n            else\n                switch costume to (2jump v)\n            end\n        end\n        if <(y-velocity) = [0]> then\n            if <(Secret) = [0]> then\n                switch costume to (jump3 v)\n            else\n                switch costume to (2jump2 v)\n            end\n        end\n        if <(y-velocity) < [0]> then\n            if <(Secret) = [0]> then\n                switch costume to (fall v)\n            else\n                switch costume to (2fall v)\n            end\n        end\n    end\nelse\n    if <<(frame2) = [2]> or <(frame2) = [4]>> then\n        if <(Floating) = [1]> then\n            if <(Secret) = [0]> then\n                switch costume to (fall v)\n            else\n                switch costume to (2fall v)\n            end\n        end\n    end\n    if <<(frame2) = [1]> or <(frame2) = [3]>> then\n        if <(Floating) = [1]> then\n            if <(Secret) = [0]> then\n                switch costume to (fly v)\n            else\n                switch costume to (2fly v)\n            end\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(direction) = [-90]> then\n        if <<(costume [number v]) = [1]> or <(costume [number v]) = [17]>> then\n            set [hand x v] to ((x position) + ((2) * (size)))\n            set [hand y v] to ((y position) + ((10) * (size)))\n        end\n        if <<(costume [number v]) = [2]> or <(costume [number v]) = [18]>> then\n            set [hand x v] to ((x position) + ((3) * (size)))\n            set [hand y v] to ((y position) + ((9) * (size)))\n        end\n        if <<<<(costume [number v]) = [3]> or <(costume [number v]) = [7]>> or <(costume [number v]) = [9]>> or <<<(costume [number v]) = [19]> or <(costume [number v]) = [23]>> or <(costume [number v]) = [25]>>> then\n            set [hand x v] to ((x position) + ((4) * (size)))\n            set [hand y v] to ((y position) + ((10) * (size)))\n        end\n        if <<(costume [number v]) = [4]> or <(costume [number v]) = [20]>> then\n            set [hand x v] to ((x position) + ((5) * (size)))\n            set [hand y v] to ((y position) + ((11) * (size)))\n        end\n        if <<(costume [number v]) = [5]> or <(costume [number v]) = [21]>> then\n            set [hand x v] to ((x position) + ((6) * (size)))\n            set [hand y v] to ((y position) + ((10) * (size)))\n        end\n        if <<(costume [number v]) = [6]> or <(costume [number v]) = [22]>> then\n            set [hand x v] to ((x position) + ((5) * (size)))\n            set [hand y v] to ((y position) + ((9) * (size)))\n        end\n        if <<(costume [number v]) = [8]> or <(costume [number v]) = [24]>> then\n            set [hand x v] to ((x position) + ((2) * (size)))\n            set [hand y v] to ((y position) + ((11) * (size)))\n        end\n        if <<(costume [number v]) = [10]> or <(costume [number v]) = [26]>> then\n            set [hand x v] to ((x position) + ((4) * (size)))\n            set [hand y v] to ((y position) + ((11) * (size)))\n        end\n        if <<(costume [number v]) = [11]> or <(costume [number v]) = [27]>> then\n            set [hand x v] to ((x position) + ((4) * (size)))\n            set [hand y v] to ((y position) + ((9) * (size)))\n        end\n        if <<(costume [number v]) = [13]> or <(costume [number v]) = [29]>> then\n            set [hand x v] to ((x position) + ((4) * (size)))\n            set [hand y v] to ((y position) + ((9) * (size)))\n        end\n        if <<(costume [number v]) = [14]> or <(costume [number v]) = [30]>> then\n            set [hand x v] to ((x position) + ((7) * (size)))\n            set [hand y v] to ((y position) + ((11) * (size)))\n        end\n        if <<<(costume [number v]) = [15]> or <(costume [number v]) = [16]>> or <<(costume [number v]) = [31]> or <(costume [number v]) = [32]>>> then\n            set [hand x v] to ((x position) + ((10) * (size)))\n            set [hand y v] to ((y position) + ((13) * (size)))\n        end\n    end\n    if <(direction) = [90]> then\n        if <<(costume [number v]) = [1]> or <(costume [number v]) = [17]>> then\n            set [hand x v] to ((x position) + ((-2) * (size)))\n            set [hand y v] to ((y position) + ((10) * (size)))\n        end\n        if <<(costume [number v]) = [2]> or <(costume [number v]) = [18]>> then\n            set [hand x v] to ((x position) + ((-3) * (size)))\n            set [hand y v] to ((y position) + ((9) * (size)))\n        end\n        if <<<<(costume [number v]) = [3]> or <(costume [number v]) = [7]>> or <(costume [number v]) = [9]>> or <<<(costume [number v]) = [19]> or <(costume [number v]) = [23]>> or <(costume [number v]) = [25]>>> then\n            set [hand x v] to ((x position) + ((-4) * (size)))\n            set [hand y v] to ((y position) + ((10) * (size)))\n        end\n        if <<(costume [number v]) = [4]> or <(costume [number v]) = [20]>> then\n            set [hand x v] to ((x position) + ((-5) * (size)))\n            set [hand y v] to ((y position) + ((11) * (size)))\n        end\n        if <<(costume [number v]) = [5]> or <(costume [number v]) = [21]>> then\n            set [hand x v] to ((x position) + ((-6) * (size)))\n            set [hand y v] to ((y position) + ((10) * (size)))\n        end\n        if <<(costume [number v]) = [6]> or <(costume [number v]) = [22]>> then\n            set [hand x v] to ((x position) + ((-5) * (size)))\n            set [hand y v] to ((y position) + ((9) * (size)))\n        end\n        if <<(costume [number v]) = [8]> or <(costume [number v]) = [24]>> then\n            set [hand x v] to ((x position) + ((-2) * (size)))\n            set [hand y v] to ((y position) + ((11) * (size)))\n        end\n        if <<(costume [number v]) = [10]> or <(costume [number v]) = [26]>> then\n            set [hand x v] to ((x position) + ((-4) * (size)))\n            set [hand y v] to ((y position) + ((11) * (size)))\n        end\n        if <<(costume [number v]) = [11]> or <(costume [number v]) = [27]>> then\n            set [hand x v] to ((x position) + ((-4) * (size)))\n            set [hand y v] to ((y position) + ((9) * (size)))\n        end\n        if <<(costume [number v]) = [13]> or <(costume [number v]) = [29]>> then\n            set [hand x v] to ((x position) + ((-4) * (size)))\n            set [hand y v] to ((y position) + ((9) * (size)))\n        end\n        if <<(costume [number v]) = [14]> or <(costume [number v]) = [30]>> then\n            set [hand x v] to ((x position) + ((-7) * (size)))\n            set [hand y v] to ((y position) + ((11) * (size)))\n        end\n        if <<<(costume [number v]) = [15]> or <(costume [number v]) = [16]>> or <<(costume [number v]) = [31]> or <(costume [number v]) = [32]>>> then\n            set [hand x v] to ((x position) + ((-10) * (size)))\n            set [hand y v] to ((y position) + ((13) * (size)))\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <<(costume [number v]) = [15]> or <(costume [number v]) = [31]>> then\n        start sound [poof v]\n        wait until <not <<(costume [number v]) = [15]> or <(costume [number v]) = [31]>>>\n    end\nend\n\nset [room# v] to [4]\n\nwhen flag clicked\nforever\n    if <<<(costume [number v]) = [2]> or <(costume [number v]) = [6]>> or <<(costume [number v]) = [18]> or <(costume [number v]) = [22]>>> then\n        start sound [219068__annabloom__click2 v]\n        wait until <not <<<(costume [number v]) = [2]> or <(costume [number v]) = [6]>> or <<(costume [number v]) = [18]> or <(costume [number v]) = [22]>>>>\n    end\nend\n\nwhen flag clicked\nforever\n    if <<(costume [number v]) = [13]> or <(costume [number v]) = [29]>> then\n        start sound [woosh v]\n        wait until <not <<(costume [number v]) = [13]> or <(costume [number v]) = [29]>>>\n    end\nend\n\nwhen flag clicked\nwait until <(Room#) = [5]>\npoint in direction (90)\ngo to x: (-200) y: (-153)\nwait until <(WalkAllowed) = [1]>\nset [cutscene v] to [1]\nrepeat until <(Cutscene) = [0]>\n    set [walkallowed v] to [0]\nend\n\nwait (0.1) seconds\n\n@Ground\n\nset [ghost v] effect to (50)\n\nset [ghost v] effect to (0)\n\nwhen flag clicked\nforever\n    if <<not <(Room#) = [0]>> and <not <(Bomb Explode) = [1]>>> then\n        switch costume to (Room#)\n    else\n        switch costume to (title v)\n    end\nend\n\nwhen flag clicked\nset [ghost v] effect to (100)\ngo to x: (0) y: (0)\n\nif <not <(Bomb Explode) = [1]>> then\n    switch costume to (title v)\nend\n\nif <not <(Bomb Explode) = [1]>> then\n\ndelete (last) of [balloons gotten v]\n\n@Tramp\n\nwhen flag clicked\nforever\n    switch costume to (Room#)\nend\n\nadd [-153] to [back y v]\n\nswitch backdrop to (2: light off v)\n\nwhen flag clicked\ngo to x: (0) y: (0)\nset [ghost v] effect to (100)\n\nset [ghost v] effect to (0)\n\nwhen flag clicked\nforever\n    if <touching (dessie v)?> then\n        set [dog angry v] to [0]\n    end\nend\n\nset [walkallowed v] to [1]\n\n@BackDoor\n\nwhen flag clicked\nshow\nforever\n    if <(Using Door!) = [-1]> then\n        stop all sounds\n        wait (0.5) seconds\n        start sound [opendoor v]\n        switch costume to (costume1 v)\n        wait (0.5) seconds\n        switch costume to (costume2 v)\n        wait (0.5) seconds\n        switch costume to (costume3 v)\n        wait (0.5) seconds\n        switch costume to (costume4 v)\n        wait (0.5) seconds\n        switch costume to (costume5 v)\n        set [using door! v] to [-2]\n        wait (2) seconds\n        start sound [closedoor v]\n        switch costume to (costume4 v)\n        wait (0.5) seconds\n        switch costume to (costume3 v)\n        wait (0.5) seconds\n        switch costume to (costume2 v)\n        wait (0.5) seconds\n        switch costume to (costume1 v)\n        wait (0.5) seconds\n        set [using door! v] to [-3]\n        wait until <(Using Door!) = [0]>\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Using Door!) = [1]> then\n        repeat (10)\n            change [brightness v] effect by (-10)\n        end\n        set [brightness v] effect to (-100)\n        wait until <(Using Door!) = [4]>\n    end\n    if <(Using Door!) = [5]> then\n        wait (0.1) seconds\n        repeat (100)\n            change [brightness v] effect by (1)\n        end\n        set [brightness v] effect to (0)\n        wait until <(Using Door!) = [0]>\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Using Door!) = [-3]> then\n        repeat (50)\n            change [brightness v] effect by (-2)\n        end\n        set [brightness v] effect to (-100)\n        wait (0.5) seconds\n        set [using door! v] to [-4]\n    end\n    if <(Using Door!) = [-5]> then\n        wait (0.1) seconds\n        repeat (100)\n            change [brightness v] effect by (1)\n        end\n        set [brightness v] effect to (0)\n        set [using door! v] to [0]\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Using Door!) = [-4]> then\n        if <(Room#) > [1]> then\n            set [room# v] to ((Room#) - (1))\n        end\n        wait (1) seconds\n        set [using door! v] to [-5]\n    end\nend\n\nwhen flag clicked\nforever\n    go to x: (item (Room#) of [back x v]) y: (item (Room#) of [back y v])\n    if <<<<(Room#) = [0]> or <(Room#) = [1]>> or <(Room#) = [5]>> or <(Room#) = [6]>> then\n        hide\n    else\n        show\n    end\nend\n\n@ForwardDoor\n\nwhen flag clicked\nshow\nforever\n    if <(Using Door!) = [1]> then\n        stop all sounds\n        wait (0.5) seconds\n        start sound [opendoor v]\n        switch costume to (costume1 v)\n        wait (0.5) seconds\n        switch costume to (costume2 v)\n        wait (0.5) seconds\n        switch costume to (costume3 v)\n        wait (0.5) seconds\n        switch costume to (costume4 v)\n        wait (0.5) seconds\n        switch costume to (costume5 v)\n        set [using door! v] to [2]\n        wait (2) seconds\n        start sound [closedoor v]\n        switch costume to (costume4 v)\n        wait (0.5) seconds\n        switch costume to (costume3 v)\n        wait (0.5) seconds\n        switch costume to (costume2 v)\n        wait (0.5) seconds\n        switch costume to (costume1 v)\n        wait (0.5) seconds\n        set [using door! v] to [3]\n        wait until <(Using Door!) = [0]>\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Using Door!) = [3]> then\n        repeat (50)\n            change [brightness v] effect by (-2)\n        end\n        set [brightness v] effect to (-100)\n        wait (0.5) seconds\n        set [using door! v] to [4]\n    end\n    if <(Using Door!) = [5]> then\n        wait (0.1) seconds\n        repeat (100)\n            change [brightness v] effect by (1)\n        end\n        set [brightness v] effect to (0)\n        set [using door! v] to [0]\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Using Door!) = [-1]> then\n        repeat (10)\n            change [brightness v] effect by (-10)\n        end\n        set [brightness v] effect to (-100)\n        wait until <(Using Door!) = [-4]>\n    end\n    if <(Using Door!) = [-5]> then\n        wait (0.1) seconds\n        repeat (100)\n            change [brightness v] effect by (1)\n        end\n        set [brightness v] effect to (0)\n        wait until <(Using Door!) = [0]>\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Using Door!) = [4]> then\n        set [room# v] to ((Room#) + (1))\n        wait (1) seconds\n        set [using door! v] to [5]\n    end\nend\n\nwhen flag clicked\nforever\n    if <not <<(Room#) = [0]> or <(Room#) = [6]>>> then\n        go to x: (item (Room#) of [forward x v]) y: (item (Room#) of [forward y v])\n    else\n        if <(Room#) = [0]> then\n            go to x: (-215) y: (-153)\n        end\n        if <(Room#) = [6]> then\n            go to x: (0) y: (100)\n        end\n    end\n    if <(Room#) = [6]> then\n        hide\n    end\nend\n\nwhen flag clicked\nwait until <(Room#) = [5]>\nhide\nwait until <(BP Health) = [0]>\nset [brightness v] effect to (-100)\nshow\nrepeat (50)\n    change [brightness v] effect by (2)\nend\n\n@DPink\n\nwhen flag clicked\nforever\n    if <[balloons gotten v] contains [DPink]?> then\n        if <(Using Door!) = [2]> then\n            go [backward v] (100) layers\n            wait until <(Using Door!) = [3]>\n        end\n        if <(Using Door!) = [3]> then\n            set [brightness v] effect to (-100)\n        end\n        if <(Using Door!) = [4]> then\n            go to [front v] layer\n        end\n        if <(Using Door!) = [5]> then\n            wait (0.1) seconds\n            repeat (100)\n                change [brightness v] effect by (1)\n            end\n            set [brightness v] effect to (0)\n            wait until <(Using Door!) = [0]>\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <not <[balloons gotten v] contains [DPink]?>> then\n        if <(Using Door!) = [1]> then\n            repeat (10)\n                change [brightness v] effect by (-10)\n            end\n            set [brightness v] effect to (-100)\n            wait until <(Using Door!) = [4]>\n        end\n        if <(Using Door!) = [5]> then\n            wait (0.1) seconds\n            repeat (100)\n                change [brightness v] effect by (1)\n            end\n            set [brightness v] effect to (0)\n            wait until <(Using Door!) = [0]>\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <not <[balloons gotten v] contains [DPink]?>> then\n        set size to (100) %\n        switch costume to (costume2 v)\n        wait (0.1) seconds\n        point in direction (180)\n        go to x: (193) y: ((pick random (-1) to (0)) + (150))\n        if <(Room#) = [1]> then\n            show\n            if <touching (dessie v)?> then\n                add [DPink] to [balloons gotten v]\n            end\n        else\n            hide\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <[balloons gotten v] contains [DPink]?> then\n        set size to ((100) * (size)) %\n        if <<(distance to [dessie's hand v]) < [150]> or <(y-velocity) > [18]>> then\n            show\n            switch costume to (costume1 v)\n            point towards (dessie's hand v)\n            if <([abs v] of (Using Door!) ) = [2]> then\n                move ((distance to [dessie's hand v]) * (0.1)) steps\n                change y by (0.9375)\n                change x by (-0.0375)\n            else\n                move ((distance to [dessie's hand v]) * ((0.1) * ((distance to [dessie's hand v]) / (45)))) steps\n                change y by ((3.75) * ((size) * (size)))\n                change x by ((-0.15) * ((size) * (size)))\n            end\n        else\n            hide\n            switch costume to (costume1 v)\n            point towards (dessie's hand v)\n            go to x: ((hand x) + (-0.0375)) y: ((hand y) + (0.9375))\n        end\n    end\nend\n\nset size to (100) %\n\nwhen flag clicked\nforever\n    if <not <[balloons gotten v] contains [DPink]?>> then\n        if <(Using Door!) = [-1]> then\n            repeat (10)\n                change [brightness v] effect by (-10)\n            end\n            set [brightness v] effect to (-100)\n            wait until <(Using Door!) = [-4]>\n        end\n        if <(Using Door!) = [-5]> then\n            wait (0.1) seconds\n            repeat (100)\n                change [brightness v] effect by (1)\n            end\n            set [brightness v] effect to (0)\n            wait until <(Using Door!) = [0]>\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <[balloons gotten v] contains [DPink]?> then\n        if <(Using Door!) = [-2]> then\n            go [backward v] (100) layers\n            wait until <(Using Door!) = [-3]>\n        end\n        if <(Using Door!) = [-3]> then\n            set [brightness v] effect to (-100)\n        end\n        if <(Using Door!) = [-4]> then\n            go to [front v] layer\n        end\n        if <(Using Door!) = [-5]> then\n            wait (0.1) seconds\n            repeat (100)\n                change [brightness v] effect by (1)\n            end\n            set [brightness v] effect to (0)\n            wait until <(Using Door!) = [0]>\n        end\n    end\nend\n\n@LBlue\n\nwhen flag clicked\nforever\n    if <[balloons gotten v] contains [LBlue]?> then\n        if <(Using Door!) = [-2]> then\n            go [backward v] (100) layers\n            wait until <(Using Door!) = [-3]>\n        end\n        if <(Using Door!) = [-3]> then\n            set [brightness v] effect to (-100)\n        end\n        if <(Using Door!) = [-4]> then\n            go to [front v] layer\n        end\n        if <(Using Door!) = [-5]> then\n            wait (0.1) seconds\n            repeat (100)\n                change [brightness v] effect by (1)\n            end\n            set [brightness v] effect to (0)\n            wait until <(Using Door!) = [0]>\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <[balloons gotten v] contains [LBlue]?> then\n        if <(Using Door!) = [2]> then\n            go [backward v] (100) layers\n            wait until <(Using Door!) = [3]>\n        end\n        if <(Using Door!) = [3]> then\n            set [brightness v] effect to (-100)\n        end\n        if <(Using Door!) = [4]> then\n            go to [front v] layer\n        end\n        if <(Using Door!) = [5]> then\n            wait (0.1) seconds\n            repeat (100)\n                change [brightness v] effect by (1)\n            end\n            set [brightness v] effect to (0)\n            wait until <(Using Door!) = [0]>\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <not <[balloons gotten v] contains [LBlue]?>> then\n        if <(Using Door!) = [-1]> then\n            repeat (10)\n                change [brightness v] effect by (-10)\n            end\n            set [brightness v] effect to (-100)\n            wait until <(Using Door!) = [-4]>\n        end\n        if <(Using Door!) = [-5]> then\n            wait (0.1) seconds\n            repeat (100)\n                change [brightness v] effect by (1)\n            end\n            set [brightness v] effect to (0)\n            wait until <(Using Door!) = [0]>\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <not <[balloons gotten v] contains [LBlue]?>> then\n        if <(Using Door!) = [1]> then\n            repeat (10)\n                change [brightness v] effect by (-10)\n            end\n            set [brightness v] effect to (-100)\n            wait until <(Using Door!) = [4]>\n        end\n        if <(Using Door!) = [5]> then\n            wait (0.1) seconds\n            repeat (100)\n                change [brightness v] effect by (1)\n            end\n            set [brightness v] effect to (0)\n            wait until <(Using Door!) = [0]>\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <not <[balloons gotten v] contains [LBlue]?>> then\n        set size to (100) %\n        switch costume to (costume2 v)\n        wait (0.1) seconds\n        point in direction (180)\n        go to x: (95) y: ((pick random (0) to (1)) + (97))\n        if <(Room#) = [2]> then\n            show\n        else\n            hide\n        end\n        if <touching (dessie v)?> then\n            add [LBlue] to [balloons gotten v]\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <[balloons gotten v] contains [LBlue]?> then\n        set size to ((100) * (size)) %\n        if <<(distance to [dessie's hand v]) < [150]> or <(y-velocity) > [18]>> then\n            show\n            set [ghost v] effect to (0)\n            switch costume to (costume1 v)\n            point towards (dessie's hand v)\n            if <([abs v] of (Using Door!) ) = [2]> then\n                move ((distance to [dessie's hand v]) * (0.12)) steps\n                change y by (1.125)\n                change x by (0.125)\n            else\n                move ((distance to [dessie's hand v]) * ((0.12) * ((distance to [dessie's hand v]) / (45)))) steps\n                change y by ((4.5) * ((size) * (size)))\n                change x by ((0.5) * ((size) * (size)))\n            end\n        else\n            hide\n            switch costume to (costume1 v)\n            point towards (dessie's hand v)\n            go to x: ((hand x) + (0.125)) y: ((hand y) + (1.125))\n        end\n    end\nend\n\nif <(light) = [1]> then\nelse\n    show\n    set [ghost v] effect to (100)\nend\n\n@Purple\n\nwhen flag clicked\nforever\n    if <not <[balloons gotten v] contains [Purple]?>> then\n        set size to (100) %\n        switch costume to (costume2 v)\n        wait (0.1) seconds\n        point in direction (180)\n        go to x: (-138) y: ((pick random (0) to (1)) + (155))\n        if <(Room#) = [3]> then\n            show\n            if <touching (dessie v)?> then\n                add [Purple] to [balloons gotten v]\n            end\n        else\n            hide\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <[balloons gotten v] contains [Purple]?> then\n        set size to ((100) * (size)) %\n        if <<(distance to [dessie's hand v]) < [150]> or <(y-velocity) > [18]>> then\n            show\n            switch costume to (costume1 v)\n            point towards (dessie's hand v)\n            if <([abs v] of (Using Door!) ) = [2]> then\n                move ((distance to [dessie's hand v]) * (0.09)) steps\n                change y by (0.75)\n                change x by (-0.125)\n            else\n                move ((distance to [dessie's hand v]) * ((0.09) * ((distance to [dessie's hand v]) / (45)))) steps\n                change y by ((3) * ((size) * (size)))\n                change x by ((-0.5) * ((size) * (size)))\n            end\n        else\n            hide\n            switch costume to (costume1 v)\n            point towards (dessie's hand v)\n            go to x: ((hand x) + (-0.125)) y: ((hand y) + (0.75))\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <[balloons gotten v] contains [Purple]?> then\n        if <(Using Door!) = [2]> then\n            go [backward v] (100) layers\n            wait until <(Using Door!) = [3]>\n        end\n        if <(Using Door!) = [3]> then\n            set [brightness v] effect to (-100)\n        end\n        if <(Using Door!) = [4]> then\n            go to [front v] layer\n        end\n        if <(Using Door!) = [5]> then\n            wait (0.1) seconds\n            repeat (100)\n                change [brightness v] effect by (1)\n            end\n            set [brightness v] effect to (0)\n            wait until <(Using Door!) = [0]>\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <[balloons gotten v] contains [Purple]?> then\n        if <(Using Door!) = [-2]> then\n            go [backward v] (100) layers\n            wait until <(Using Door!) = [-3]>\n        end\n        if <(Using Door!) = [-3]> then\n            set [brightness v] effect to (-100)\n        end\n        if <(Using Door!) = [-4]> then\n            go to [front v] layer\n        end\n        if <(Using Door!) = [-5]> then\n            wait (0.1) seconds\n            repeat (100)\n                change [brightness v] effect by (1)\n            end\n            set [brightness v] effect to (0)\n            wait until <(Using Door!) = [0]>\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <not <[balloons gotten v] contains [Purple]?>> then\n        if <(Using Door!) = [1]> then\n            repeat (10)\n                change [brightness v] effect by (-10)\n            end\n            set [brightness v] effect to (-100)\n            wait until <(Using Door!) = [4]>\n        end\n        if <(Using Door!) = [5]> then\n            wait (0.1) seconds\n            repeat (100)\n                change [brightness v] effect by (1)\n            end\n            set [brightness v] effect to (0)\n            wait until <(Using Door!) = [0]>\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <not <[balloons gotten v] contains [Purple]?>> then\n        if <(Using Door!) = [-1]> then\n            repeat (10)\n                change [brightness v] effect by (-10)\n            end\n            set [brightness v] effect to (-100)\n            wait until <(Using Door!) = [-4]>\n        end\n        if <(Using Door!) = [-5]> then\n            wait (0.1) seconds\n            repeat (100)\n                change [brightness v] effect by (1)\n            end\n            set [brightness v] effect to (0)\n            wait until <(Using Door!) = [0]>\n        end\n    end\nend\n\n@Balloon String\n\nwhen flag clicked\nforever\n    set pen color to (#f6fff9)\n    set pen size to (1)\n    erase all\n    if <not <<([abs v] of (Using Door!) ) = [3]> or <<([abs v] of (Using Door!) ) = [4]> or <([abs v] of (Using Door!) ) = [5]>>>> then\n        if <[balloons gotten v] contains [DPink]?> then\n            go to x: (hand x) y: (hand y)\n            if <<(distance to [dpink v]) < [150]> or <(y-velocity) > [18]>> then\n                pen down\n                go to (dpink v)\n                pen up\n            end\n        end\n        if <[balloons gotten v] contains [LBlue]?> then\n            go to x: (hand x) y: (hand y)\n            if <<(distance to [lblue v]) < [150]> or <(y-velocity) > [18]>> then\n                pen down\n                go to (lblue v)\n                pen up\n            end\n        end\n        if <[balloons gotten v] contains [Purple]?> then\n            go to x: (hand x) y: (hand y)\n            if <<(distance to [purple v]) < [150]> or <(y-velocity) > [18]>> then\n                pen down\n                go to (purple v)\n                pen up\n            end\n        end\n        if <[balloons gotten v] contains [LYellow]?> then\n            go to x: (hand x) y: (hand y)\n            if <<(distance to [lyellow v]) < [150]> or <(y-velocity) > [18]>> then\n                pen down\n                go to (lyellow v)\n                pen up\n            end\n        end\n        if <[balloons gotten v] contains [LPink]?> then\n            go to x: (hand x) y: (hand y)\n            if <<(distance to [lpink v]) < [150]> or <(y-velocity) > [18]>> then\n                pen down\n                go to (lpink v)\n                pen up\n            end\n        end\n        if <[balloons gotten v] contains [DYellow]?> then\n            go to x: (hand x) y: (hand y)\n            if <<(distance to [dyellow v]) < [150]> or <(y-velocity) > [18]>> then\n                pen down\n                go to (dyellow v)\n                pen up\n            end\n        end\n        if <[balloons gotten v] contains [DBlue]?> then\n            go to x: (hand x) y: (hand y)\n            if <<(distance to [dblue v]) < [150]> or <(y-velocity) > [18]>> then\n                pen down\n                go to (dblue v)\n                pen up\n            end\n        end\n        if <(Room#) = [5]> then\n            set pen color to (#5ecfea)\n            set pen size to (3)\n            go to x: ([x position v] of [balloon pirate v]) y: ([y position v] of [balloon pirate v])\n            pen down\n            go to x: ([x position v] of [balloon pirate v]) y: ((240) + (Rope Fall))\n            pen up\n        end\n    end\nend\n\nerase all\n\n@Dessie's Hand\n\nwhen flag clicked\nforever\n    go to x: (hand x) y: (hand y)\nend\n\n@LYellow\n\nhide\n\nwhen flag clicked\nforever\n    if <not <[balloons gotten v] contains [LYellow]?>> then\n        if <(Using Door!) = [-1]> then\n            repeat (10)\n                change [brightness v] effect by (-10)\n            end\n            set [brightness v] effect to (-100)\n            wait until <(Using Door!) = [-4]>\n        end\n        if <(Using Door!) = [-5]> then\n            wait (0.1) seconds\n            repeat (100)\n                change [brightness v] effect by (1)\n            end\n            set [brightness v] effect to (0)\n            wait until <(Using Door!) = [0]>\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <not <[balloons gotten v] contains [LYellow]?>> then\n        if <(Using Door!) = [1]> then\n            repeat (10)\n                change [brightness v] effect by (-10)\n            end\n            set [brightness v] effect to (-100)\n            wait until <(Using Door!) = [4]>\n        end\n        if <(Using Door!) = [5]> then\n            wait (0.1) seconds\n            repeat (100)\n                change [brightness v] effect by (1)\n            end\n            set [brightness v] effect to (0)\n            wait until <(Using Door!) = [0]>\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <[balloons gotten v] contains [LYellow]?> then\n        if <(Using Door!) = [-2]> then\n            go [backward v] (100) layers\n            wait until <(Using Door!) = [-3]>\n        end\n        if <(Using Door!) = [-3]> then\n            set [brightness v] effect to (-100)\n        end\n        if <(Using Door!) = [-4]> then\n            go to [front v] layer\n        end\n        if <(Using Door!) = [-5]> then\n            wait (0.1) seconds\n            repeat (100)\n                change [brightness v] effect by (1)\n            end\n            set [brightness v] effect to (0)\n            wait until <(Using Door!) = [0]>\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <[balloons gotten v] contains [LYellow]?> then\n        if <(Using Door!) = [2]> then\n            go [backward v] (100) layers\n            wait until <(Using Door!) = [3]>\n        end\n        if <(Using Door!) = [3]> then\n            set [brightness v] effect to (-100)\n        end\n        if <(Using Door!) = [4]> then\n            go to [front v] layer\n        end\n        if <(Using Door!) = [5]> then\n            wait (0.1) seconds\n            repeat (100)\n                change [brightness v] effect by (1)\n            end\n            set [brightness v] effect to (0)\n            wait until <(Using Door!) = [0]>\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <[balloons gotten v] contains [LYellow]?> then\n        set size to ((100) * (size)) %\n        if <<(distance to [dessie's hand v]) < [150]> or <(y-velocity) > [18]>> then\n            show\n            switch costume to (costume1 v)\n            point towards (dessie's hand v)\n            if <([abs v] of (Using Door!) ) = [2]> then\n                move ((distance to [dessie's hand v]) * (0.09)) steps\n                change y by (0.75)\n                change x by (0.1875)\n            else\n                move ((distance to [dessie's hand v]) * ((0.09) * ((distance to [dessie's hand v]) / (45)))) steps\n                change y by ((3) * ((size) * (size)))\n                change x by ((0.75) * ((size) * (size)))\n            end\n        else\n            hide\n            switch costume to (costume1 v)\n            point towards (dessie's hand v)\n            go to x: ((hand x) + (0.1875)) y: ((hand y) + (0.75))\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <not <[balloons gotten v] contains [LYellow]?>> then\n        set size to (100) %\n        switch costume to (costume2 v)\n        wait (0.1) seconds\n        point in direction (180)\n        go to x: (-126) y: ((pick random (0) to (1)) + (155))\n        if <(Room#) = [4]> then\n            show\n            if <touching (dessie v)?> then\n                add [LYellow] to [balloons gotten v]\n            end\n        else\n            hide\n        end\n    end\nend\n\n@LPink\n\nwhen flag clicked\nforever\n    if <[balloons gotten v] contains [LPink]?> then\n        if <(Using Door!) = [-2]> then\n            go [backward v] (100) layers\n            wait until <(Using Door!) = [-3]>\n        end\n        if <(Using Door!) = [-3]> then\n            set [brightness v] effect to (-100)\n        end\n        if <(Using Door!) = [-4]> then\n            go to [front v] layer\n        end\n        if <(Using Door!) = [-5]> then\n            wait (0.1) seconds\n            repeat (100)\n                change [brightness v] effect by (1)\n            end\n            set [brightness v] effect to (0)\n            wait until <(Using Door!) = [0]>\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <[balloons gotten v] contains [LPink]?> then\n        if <(Using Door!) = [2]> then\n            go [backward v] (100) layers\n            wait until <(Using Door!) = [3]>\n        end\n        if <(Using Door!) = [3]> then\n            set [brightness v] effect to (-100)\n        end\n        if <(Using Door!) = [4]> then\n            go to [front v] layer\n        end\n        if <(Using Door!) = [5]> then\n            wait (0.1) seconds\n            repeat (100)\n                change [brightness v] effect by (1)\n            end\n            set [brightness v] effect to (0)\n            wait until <(Using Door!) = [0]>\n        end\n    end\nend\n\nwhen flag clicked\nset [brightness v] effect to (0)\nforever\n    if <[balloons gotten v] contains [LPink]?> then\n        set size to ((100) * (size)) %\n        if <<(distance to [dessie's hand v]) < [150]> or <(y-velocity) > [18]>> then\n            show\n            switch costume to (costume1 v)\n            point towards (dessie's hand v)\n            if <([abs v] of (Using Door!) ) = [2]> then\n                move ((distance to [dessie's hand v]) * (0.1)) steps\n                change y by (0.6875)\n            else\n                move ((distance to [dessie's hand v]) * ((0.1) * ((distance to [dessie's hand v]) / (45)))) steps\n                change y by ((2.5) * ((size) * (size)))\n                change x by ((-0.01) * ((size) * (size)))\n            end\n        else\n            hide\n            switch costume to (costume1 v)\n            point towards (dessie's hand v)\n            go to x: (hand x) y: ((hand y) + (0.6875))\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <not <[balloons gotten v] contains [LPink]?>> then\n        set size to (100) %\n        switch costume to (costume2 v)\n        wait (0.1) seconds\n        point in direction (180)\n        go to x: (-180) y: ((pick random (0) to (1)) + (100))\n        if <(Room#) = [5]> then\n            show\n            if <touching (dessie v)?> then\n                add [LPink] to [balloons gotten v]\n            end\n        else\n            hide\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Room#) = [5]> then\n        repeat until <(BP Fade in) = [1]>\n            set [brightness v] effect to (-100)\n        end\n        wait until <(BP Fade in) = [2]>\n        set [brightness v] effect to (-100)\n        repeat (50)\n            change [brightness v] effect by (2)\n        end\n        set [brightness v] effect to (0)\n        wait (1) seconds\n        set [bp fade in v] to [0]\n        stop [this script v]\n    end\nend\n\n@DYellow\n\nhide\n\nwhen flag clicked\nforever\n    if <[balloons gotten v] contains [DYellow]?> then\n        if <(Using Door!) = [-2]> then\n            go [backward v] (100) layers\n            wait until <(Using Door!) = [-3]>\n        end\n        if <(Using Door!) = [-3]> then\n            set [brightness v] effect to (-100)\n        end\n        if <(Using Door!) = [-4]> then\n            go to [front v] layer\n        end\n        if <(Using Door!) = [-5]> then\n            wait (0.1) seconds\n            repeat (100)\n                change [brightness v] effect by (1)\n            end\n            set [brightness v] effect to (0)\n            wait until <(Using Door!) = [0]>\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <[balloons gotten v] contains [DYellow]?> then\n        if <(Using Door!) = [2]> then\n            go [backward v] (100) layers\n            wait until <(Using Door!) = [3]>\n        end\n        if <(Using Door!) = [3]> then\n            set [brightness v] effect to (-100)\n        end\n        if <(Using Door!) = [4]> then\n            go to [front v] layer\n        end\n        if <(Using Door!) = [5]> then\n            wait (0.1) seconds\n            repeat (100)\n                change [brightness v] effect by (1)\n            end\n            set [brightness v] effect to (0)\n            wait until <(Using Door!) = [0]>\n        end\n    end\nend\n\nwhen flag clicked\nset [brightness v] effect to (0)\nforever\n    if <[balloons gotten v] contains [DYellow]?> then\n        set size to ((100) * (size)) %\n        if <<(distance to [dessie's hand v]) < [150]> or <(y-velocity) > [18]>> then\n            show\n            switch costume to (costume1 v)\n            point towards (dessie's hand v)\n            if <([abs v] of (Using Door!) ) = [2]> then\n                move ((distance to [dessie's hand v]) * (0.12)) steps\n                change y by (0.6875)\n                change x by (-0.125)\n            else\n                move ((distance to [dessie's hand v]) * ((0.12) * ((distance to [dessie's hand v]) / (45)))) steps\n                change y by ((2.2) * ((size) * (size)))\n                change x by ((-0.5) * ((size) * (size)))\n            end\n        else\n            hide\n            switch costume to (costume1 v)\n            point towards (dessie's hand v)\n            go to x: ((hand x) + (-0.125)) y: ((hand y) + (0.6875))\n        end\n    end\nend\n\nif <([abs v] of (Using Door!) ) = [2]> then\n    move ((distance to [bp ship's pole v]) * (0.1)) steps\n    change y by (0.6875)\nelse\nend\n\nwhen flag clicked\nwait until <<(BP Ship Health) = [4]> and <(Ship Lose Health) = [1]>>\nforever\n    if <not <[balloons gotten v] contains [DYellow]?>> then\n        point in direction (180)\n        set [dyellow dest x v] to (pick random ((x position) - (150)) to ((x position) + (150)))\n        set [dyellow dest y v] to (pick random ((y position) - (20)) to ((y position) + (20)))\n        if <(DYellow Dest X) < [-220]> then\n            set [dyellow dest x v] to [-200]\n        end\n        if <(DYellow Dest X) > [220]> then\n            set [dyellow dest x v] to [220]\n        end\n        if <(DYellow Dest Y) < [-120]> then\n            set [dyellow dest y v] to [-100]\n        end\n        if <(DYellow Dest Y) > [120]> then\n            set [dyellow dest y v] to [120]\n        end\n        if <not <[balloons gotten v] contains [DYellow]?>> then\n            glide (1) secs to x: (DYellow Dest X) y: (DYellow Dest Y)\n            switch costume to (costume2 v)\n        end\n    end\nend\n\nwhen flag clicked\nwait until <<(BP Ship Health) = [4]> and <(Ship Lose Health) = [1]>>\nforever\n    if <not <[balloons gotten v] contains [DYellow]?>> then\n        if <(costume [number v]) = [2]> then\n            if <touching (dessie v)?> then\n                add [DYellow] to [balloons gotten v]\n            end\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <not <[balloons gotten v] contains [DYellow]?>> then\n        set size to (100) %\n        switch costume to (costume2 v)\n        wait (0.1) seconds\n        point in direction (180)\n        go to x: (-30) y: ((pick random (0) to (1)) + (100))\n        if <(Room#) = [5]> then\n            show\n            if <touching (dessie v)?> then\n                add [DYellow] to [balloons gotten v]\n            end\n        else\n            hide\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Room#) = [5]> then\n        repeat until <(BP Fade in) = [1]>\n            set [brightness v] effect to (-100)\n        end\n        wait until <(BP Fade in) = [2]>\n        set [brightness v] effect to (-100)\n        repeat (50)\n            change [brightness v] effect by (2)\n        end\n        set [brightness v] effect to (0)\n        wait (1) seconds\n        set [bp fade in v] to [0]\n        stop [this script v]\n    end\nend\n\n@DBlue\n\nhide\n\nwhen flag clicked\nforever\n    if <[balloons gotten v] contains [DBlue]?> then\n        if <(Using Door!) = [-2]> then\n            go [backward v] (100) layers\n            wait until <(Using Door!) = [-3]>\n        end\n        if <(Using Door!) = [-3]> then\n            set [brightness v] effect to (-100)\n        end\n        if <(Using Door!) = [-4]> then\n            go to [front v] layer\n        end\n        if <(Using Door!) = [-5]> then\n            wait (0.1) seconds\n            repeat (100)\n                change [brightness v] effect by (1)\n            end\n            set [brightness v] effect to (0)\n            wait until <(Using Door!) = [0]>\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <[balloons gotten v] contains [DBlue]?> then\n        if <(Using Door!) = [2]> then\n            go [backward v] (100) layers\n            wait until <(Using Door!) = [3]>\n        end\n        if <(Using Door!) = [3]> then\n            set [brightness v] effect to (-100)\n        end\n        if <(Using Door!) = [4]> then\n            go to [front v] layer\n        end\n        if <(Using Door!) = [5]> then\n            wait (0.1) seconds\n            repeat (100)\n                change [brightness v] effect by (1)\n            end\n            set [brightness v] effect to (0)\n            wait until <(Using Door!) = [0]>\n        end\n    end\nend\n\nwhen flag clicked\nset [brightness v] effect to (0)\nforever\n    if <[balloons gotten v] contains [DBlue]?> then\n        set size to ((100) * (size)) %\n        if <<(distance to [dessie's hand v]) < [150]> or <(y-velocity) > [18]>> then\n            show\n            switch costume to (costume1 v)\n            point towards (dessie's hand v)\n            if <([abs v] of (Using Door!) ) = [2]> then\n                move ((distance to [dessie's hand v]) * (0.11)) steps\n                change y by (0.61)\n                change x by (0.125)\n            else\n                move ((distance to [dessie's hand v]) * ((0.11) * ((distance to [dessie's hand v]) / (45)))) steps\n                change y by ((2.05) * ((size) * (size)))\n                change x by ((0.4) * ((size) * (size)))\n            end\n        else\n            hide\n            switch costume to (costume1 v)\n            point towards (dessie's hand v)\n            go to x: ((hand x) + (0.125)) y: ((hand y) + (0.61))\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <not <[balloons gotten v] contains [DBlue]?>> then\n        set size to (100) %\n        switch costume to (costume2 v)\n        wait (0.1) seconds\n        point in direction (180)\n        go to x: (-30) y: ((pick random (0) to (1)) + (156))\n        if <(Room#) = [5]> then\n            show\n            if <touching (dessie v)?> then\n                add [DBlue] to [balloons gotten v]\n            end\n        else\n            hide\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Room#) = [5]> then\n        repeat until <(BP Fade in) = [1]>\n            set [brightness v] effect to (-100)\n        end\n        wait until <(BP Fade in) = [2]>\n        set [brightness v] effect to (-100)\n        repeat (50)\n            change [brightness v] effect by (2)\n        end\n        set [brightness v] effect to (0)\n        wait (1) seconds\n        set [bp fade in v] to [0]\n        stop [this script v]\n    end\nend\n\n@Balloon Pirate\n\nset [rope fall v] to [0]\ngo to x: (215) y: (160)\n\nwait until <(length of [balloons gotten v]) = [5]>\nset [bp health v] to [2.5]\nrepeat (10)\n    change [bp fall v] by (-1)\n    change y by (BP Fall)\nend\nset [bp fall v] to [-1]\n\nset [rope fall v] to []\n\nset [bp health v] to [3]\n\nrepeat (10)\nend\n\ndelete (last) of [balloons gotten v]\n\nif <(BP Fall) < [5]> then\n    change [bp fall v] by (-1)\nend\n\nif <(BP Fall) > [-5]> then\nend\n\nif <(BP Fall) > [-5]> then\nend\n\nset [eyepatch v] to [0]\n\nwhen flag clicked\ngo to x: (215) y: (160)\nset [bp health v] to [3]\nset [bp fall v] to [-1]\nset [rope fall v] to [0]\nforever\n    wait until <(length of [balloons gotten v]) = [5]>\n    set [walkallowed v] to [0]\n    set [bp health v] to [2.5]\n    start sound [Chain v]\n    repeat until <(y position) < [80]>\n        change [bp fall v] by (-0.5)\n        change y by (BP Fall)\n        set x to (pick random (213) to (217))\n    end\n    set [bp fall v] to [-1]\n    set x to (215)\n    play sound [Crash v] until done\n    set [bp health v] to [2]\n    set [walkallowed v] to [1]\n    wait until <(length of [balloons gotten v]) = [6]>\n    set [walkallowed v] to [0]\n    set [bp health v] to [1.5]\n    start sound [Chain v]\n    repeat until <(y position) < [-45]>\n        change [bp fall v] by (-0.5)\n        change y by (BP Fall)\n        set x to (pick random (213) to (217))\n    end\n    set [bp fall v] to [-1]\n    set x to (215)\n    play sound [Crash v] until done\n    set [bp health v] to [1]\n    set [walkallowed v] to [1]\n    wait until <(length of [balloons gotten v]) = [7]>\n    set [boss battle v] to [0]\n    stop all sounds\n    set [walkallowed v] to [0]\n    set [bp health v] to [0.5]\n    start sound [Chain v]\n    start sound [Fall v]\n    repeat until <(y position) < [-160]>\n        change [bp fall v] by (-0.5)\n        change y by (BP Fall)\n        change [rope fall v] by (BP Fall)\n        set x to (pick random (213) to (217))\n    end\n    start sound [Chain v]\n    repeat until <(Rope Fall) < [-420]>\n        change [bp fall v] by (-0.5)\n        change [rope fall v] by (BP Fall)\n        set x to (pick random (213) to (217))\n    end\n    start sound [Chain Gone v]\n    set [bp fall v] to [-1]\n    hide\n    set x to (215)\n    set [bp health v] to [0]\n    set [walkallowed v] to [1]\nend\n\nwhen flag clicked\nhide\nset [brightness v] effect to (-100)\nset [rope fall v] to [0]\nforever\n    if <(BP Fade in) = [1]> then\n        set [brightness v] effect to (-100)\n        start sound [167578__dlovere__evil-laugh-dry v]\n        repeat (50)\n            change [brightness v] effect by (2)\n        end\n        set [brightness v] effect to (0)\n        set [bp fade in v] to [0]\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Room#) = [5]> then\n        switch costume to (costume1 v)\n        wait (0.125) seconds\n        switch costume to (costume3 v)\n        wait (0.125) seconds\n        switch costume to (costume1 v)\n        wait (0.125) seconds\n        switch costume to (costume2 v)\n        wait (0.125) seconds\n    end\nend\n\nwhen flag clicked\n\nwhen flag clicked\nforever\n    if <(Room#) = [5]> then\n        show\n    end\nend\n\ndelete (last) of [balloons gotten v]\ndelete (last) of [balloons gotten v]\ndelete (last) of [balloons gotten v]\n\nshow\n\nwhen flag clicked\nforever\n    if <<(Room#) = [6]> and <(Eyepatch) = [0]>> then\n        switch costume to (costume7 v)\n        wait (0.125) seconds\n        switch costume to (costume8 v)\n        wait (0.125) seconds\n        switch costume to (costume7 v)\n        wait (0.125) seconds\n        switch costume to (costume9 v)\n        wait (0.125) seconds\n    end\nend\n\nwhen flag clicked\nforever\n    if <<(Room#) = [6]> and <(Eyepatch) = [1]>> then\n        switch costume to (costume4 v)\n        wait (0.125) seconds\n        switch costume to (costume5 v)\n        wait (0.125) seconds\n        switch costume to (costume4 v)\n        wait (0.125) seconds\n        switch costume to (costume6 v)\n        wait (0.125) seconds\n    end\nend\n\nwhen flag clicked\nset [brightness v] effect to (-100)\nforever\n    if <(BP Fade In 2) = [1]> then\n        go to x: (-133) y: (-77)\n        set [brightness v] effect to (-100)\n        show\n        start sound [167578__dlovere__evil-laugh-dry v]\n        repeat (50)\n            change [brightness v] effect by (2)\n        end\n        set [brightness v] effect to (0)\n        set [bp fade in 2 v] to [0]\n    end\nend\n\nstart sound [Chain v]\n\nwhen flag clicked\nset [brightness v] effect to (-100)\nforever\n    if <(BP Fade In 2) = [-2]> then\n        set [brightness v] effect to (0)\n        show\n        start sound [167578__dlovere__evil-laugh-dry v]\n        repeat (25)\n            change [brightness v] effect by (-4)\n        end\n        set [brightness v] effect to (-100)\n        set [bp fade in 2 v] to [0]\n        hide\n    end\nend\n\nstart sound [Thud v]\n\nstart sound [Clink v]\n\nset [bp fade in 2 v] to [-1]\n\nchange y by (BP Fall)\nchange [rope fall v] by (BP Fall)\nset x to (pick random (213) to (217))\n\nwhen flag clicked\nset [secret v] to [0]\nwait until <key (b v) pressed?>\nwait until <key (a v) pressed?>\nwait until <key (l v) pressed?>\nwait until <key (l v) pressed?>\nwait until <key (o v) pressed?>\nwait until <key (o v) pressed?>\nwait until <key (n v) pressed?>\nwait until <key (p v) pressed?>\nwait until <key (i v) pressed?>\nwait until <key (r v) pressed?>\nwait until <key (a v) pressed?>\nwait until <key (t v) pressed?>\nwait until <key (e v) pressed?>\nstart sound [167578__dlovere__evil-laugh-dry v]\nstart sound [Clink v]\nstart sound [Thud v]\nset [secret v] to [1]\n\n@Television\n\ngo to x: (0) y: (0)\n\nwhen flag clicked\nforever\n    if <(Using Door!) = [1]> then\n        repeat (10)\n            change [brightness v] effect by (-10)\n        end\n        set [brightness v] effect to (-100)\n        wait until <(Using Door!) = [4]>\n    end\n    if <(Using Door!) = [5]> then\n        wait (0.1) seconds\n        repeat (100)\n            change [brightness v] effect by (1)\n        end\n        set [brightness v] effect to (0)\n        wait until <(Using Door!) = [0]>\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Using Door!) = [-1]> then\n        repeat (10)\n            change [brightness v] effect by (-10)\n        end\n        set [brightness v] effect to (-100)\n        wait until <(Using Door!) = [-4]>\n    end\n    if <(Using Door!) = [-5]> then\n        wait (0.1) seconds\n        repeat (100)\n            change [brightness v] effect by (1)\n        end\n        set [brightness v] effect to (0)\n        wait until <(Using Door!) = [0]>\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Room#) = [2]> then\n        show\n    else\n        hide\n    end\nend\n\nwhen flag clicked\nforever\n    if <not <(Using Door!) = [0]>> then\n        switch costume to (costume1 v)\n        set [light v] to [0]\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Room#) = [2]> then\n        if <(Using Door!) = [0]> then\n            repeat (pick random (0) to (pick random (25) to (75)))\n                switch costume to (costume1 v)\n                wait (0.05) seconds\n                set [light v] to [0]\n            end\n            repeat (pick random (0) to (pick random (5) to (pick random (6) to (8))))\n                switch costume to (costume2 v)\n                wait (0.05) seconds\n                set [light v] to [1]\n                start sound [Static v]\n            end\n        end\n    end\nend\n\n@Dialogue\n\nwhen flag clicked\nforever\n    if <(Room#) = [0]> then\n        set [dialogue v] to [0]\n    end\n    if <(Room#) = [1]> then\n        if <not <[balloons gotten v] contains [DPink]?>> then\n            if <<(hand y) < [-82]> and <<(hand x) > [-177]> and <(hand x) < [120]>>> then\n                set [dialogue v] to [1]\n            else\n                set [dialogue v] to [0]\n            end\n        else\n            set [dialogue v] to [0]\n        end\n    end\n    if <(Room#) = [2]> then\n        if <not <[balloons gotten v] contains [LBlue]?>> then\n            if <<(hand y) < [-82]> and <<(hand x) > [-120]> and <(hand x) < [140]>>> then\n                set [dialogue v] to [1]\n            else\n                set [dialogue v] to [0]\n            end\n        else\n            set [dialogue v] to [0]\n        end\n    end\n    if <(Room#) = [3]> then\n        if <not <[balloons gotten v] contains [Purple]?>> then\n            if <<(hand y) > [130]> and <<(hand x) > [-8]> and <(hand x) < [140]>>> then\n                set [dialogue v] to [1]\n            else\n                set [dialogue v] to [0]\n            end\n        else\n            set [dialogue v] to [0]\n        end\n    end\n    if <(Room#) = [4]> then\n        if <not <[balloons gotten v] contains [LYellow]?>> then\n            if <<(hand y) < [-64]> and <<(hand x) > [111]> and <(hand x) < [195]>>> then\n                set [dialogue v] to [1]\n            else\n                set [dialogue v] to [0]\n            end\n        else\n            set [dialogue v] to [0]\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(dialogue) = [0]> then\n        repeat until <<(effect) = [100]> or <(effect) > [100]>>\n            if <(dialogue) = [0]> then\n                change [effect v] by (4)\n            end\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    wait (0.01) seconds\n    set [ghost v] effect to (effect)\nend\n\nwhen flag clicked\nforever\n    if <(dialogue) = [1]> then\n        repeat until <<(effect) = [0]> or <(effect) < [0]>>\n            if <(dialogue) = [1]> then\n                change [effect v] by (-4)\n            end\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <not <(Room#) = [0]>> then\n        switch costume to (Room#)\n    else\n    end\nend\n\n@Pipes\n\nwhen flag clicked\nset [pipe where v] to [0]\nset [piping v] to [0]\nset [brightness v] effect to (0)\nforever\n    go to x: (0) y: (0)\nend\n\nwhen flag clicked\nforever\n    if <(Using Door!) = [-1]> then\n        repeat (10)\n            change [brightness v] effect by (-10)\n        end\n        set [brightness v] effect to (-100)\n        set [pipe where v] to [0]\n        set [piping v] to [0]\n        wait until <(Using Door!) = [-4]>\n    end\n    if <(Using Door!) = [-5]> then\n        wait (0.1) seconds\n        repeat (100)\n            change [brightness v] effect by (1)\n        end\n        set [brightness v] effect to (0)\n        set [pipe where v] to [0]\n        set [piping v] to [0]\n        wait until <(Using Door!) = [0]>\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Using Door!) = [1]> then\n        repeat (10)\n            change [brightness v] effect by (-10)\n        end\n        set [brightness v] effect to (-100)\n        set [pipe where v] to [0]\n        set [piping v] to [0]\n        wait until <(Using Door!) = [4]>\n    end\n    if <(Using Door!) = [5]> then\n        wait (0.1) seconds\n        repeat (100)\n            change [brightness v] effect by (1)\n        end\n        set [brightness v] effect to (0)\n        set [pipe where v] to [0]\n        set [piping v] to [0]\n        wait until <(Using Door!) = [0]>\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Room#) = [3]> then\n        if <<<(Dessie X) > [-60]> and <(Dessie X) < [-41]>> and <<(Dessie Y) > [125]> and <(Dessie Y) < [163]>>> then\n            if <(Piping) = [0]> then\n                set [pipe where v] to [3]\n                set [piping v] to [1]\n                wait until <(Piping) = [0]>\n            end\n            if <(Piping) = [1]> then\n                wait until <not <<<(Dessie X) > [-60]> and <(Dessie X) < [-41]>> and <<(Dessie Y) > [125]> and <(Dessie Y) < [163]>>>>\n                set [piping v] to [0]\n                set [pipe where v] to [0]\n            end\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Room#) = [3]> then\n        if <<(Dessie X) > [220]> and <<(Dessie Y) > [125]> and <(Dessie Y) < [159]>>> then\n            if <(Piping) = [0]> then\n                set [pipe where v] to [4]\n                set [piping v] to [1]\n                wait until <(Piping) = [0]>\n            end\n            if <(Piping) = [1]> then\n                wait until <not <<(Dessie X) > [220]> and <<(Dessie Y) > [125]> and <(Dessie Y) < [159]>>>>\n                set [piping v] to [0]\n                set [pipe where v] to [0]\n            end\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Room#) = [3]> then\n        if <<<(Dessie X) > [-76]> and <(Dessie X) < [-60]>> and <<(Dessie Y) > [75]> and <(Dessie Y) < [120]>>> then\n            if <(Piping) = [0]> then\n                set [pipe where v] to [5]\n                set [piping v] to [1]\n                wait until <(Piping) = [0]>\n            end\n            if <(Piping) = [1]> then\n                wait until <not <<<(Dessie X) > [-76]> and <(Dessie X) < [-60]>> and <<(Dessie Y) > [75]> and <(Dessie Y) < [120]>>>>\n                set [piping v] to [0]\n                set [pipe where v] to [0]\n            end\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Room#) = [3]> then\n        if <<<(Dessie X) > [34]> and <(Dessie X) < [72]>> and <<(Dessie Y) > [49]> and <(Dessie Y) < [116]>>> then\n            if <(Piping) = [0]> then\n                set [pipe where v] to [6]\n                set [piping v] to [1]\n                wait until <(Piping) = [0]>\n            end\n            if <(Piping) = [1]> then\n                wait until <not <<<(Dessie X) > [34]> and <(Dessie X) < [72]>> and <<(Dessie Y) > [49]> and <(Dessie Y) < [60]>>>>\n                set [piping v] to [0]\n                set [pipe where v] to [0]\n            end\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Room#) = [3]> then\n        if <<(Dessie X) > [227]> and <<(Dessie Y) > [44]> and <(Dessie Y) < [60]>>> then\n            if <(Piping) = [0]> then\n                set [pipe where v] to [7]\n                set [piping v] to [1]\n                wait until <(Piping) = [0]>\n            end\n            if <(Piping) = [1]> then\n                wait until <not <<(Dessie X) > [227]> and <<(Dessie Y) > [44]> and <(Dessie Y) < [60]>>>>\n                set [piping v] to [0]\n                set [pipe where v] to [0]\n            end\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Room#) = [3]> then\n        if <<<(Dessie X) > [-188]> and <(Dessie X) < [-175]>> and <<(Dessie Y) > [42]> and <(Dessie Y) < [60]>>> then\n            if <(Piping) = [0]> then\n                set [pipe where v] to [8]\n                set [piping v] to [1]\n                wait until <(Piping) = [0]>\n            end\n            if <(Piping) = [1]> then\n                wait until <not <<<(Dessie X) > [-188]> and <(Dessie X) < [-175]>> and <<(Dessie Y) > [42]> and <(Dessie Y) < [60]>>>>\n                set [piping v] to [0]\n                set [pipe where v] to [0]\n            end\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Room#) = [3]> then\n        if <<<(Dessie X) > [-110]> and <(Dessie X) < [-93]>> and <<(Dessie Y) > [43]> and <(Dessie Y) < [60]>>> then\n            if <(Piping) = [0]> then\n                set [pipe where v] to [9]\n                set [piping v] to [1]\n                wait until <(Piping) = [0]>\n            end\n            if <(Piping) = [1]> then\n                wait until <not <<<(Dessie X) > [-110]> and <(Dessie X) < [-93]>> and <<(Dessie Y) > [43]> and <(Dessie Y) < [60]>>>>\n                set [piping v] to [0]\n                set [pipe where v] to [0]\n            end\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Room#) = [3]> then\n        if <<<(Dessie X) > [-160]> and <(Dessie X) < [-154]>> and <<(Dessie Y) > [-29]> and <(Dessie Y) < [5]>>> then\n            if <(Piping) = [0]> then\n                set [pipe where v] to [10]\n                set [piping v] to [1]\n                wait until <(Piping) = [0]>\n            end\n            if <(Piping) = [1]> then\n                wait until <not <<<(Dessie X) > [-181]> and <(Dessie X) < [-162]>> and <<(Dessie Y) > [-8]> and <(Dessie Y) < [1]>>>>\n                set [piping v] to [0]\n                set [pipe where v] to [0]\n            end\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Room#) = [3]> then\n        if <<<(Dessie X) > [58]> and <(Dessie X) < [80]>> and <<(Dessie Y) > [-8]> and <(Dessie Y) < [1]>>> then\n            if <(Piping) = [0]> then\n                set [pipe where v] to [11]\n                set [piping v] to [1]\n                wait until <(Piping) = [0]>\n            end\n            if <(Piping) = [1]> then\n                wait until <not <<<(Dessie X) > [58]> and <(Dessie X) < [80]>> and <<(Dessie Y) > [-8]> and <(Dessie Y) < [1]>>>>\n                set [piping v] to [0]\n                set [pipe where v] to [0]\n            end\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Room#) = [3]> then\n        if <<<(Dessie X) > [-225]> and <(Dessie X) < [-213]>> and <<(Dessie Y) > [-89]> and <(Dessie Y) < [-82]>>> then\n            if <(Piping) = [0]> then\n                set [pipe where v] to [12]\n                set [piping v] to [1]\n                wait until <(Piping) = [0]>\n            end\n            if <(Piping) = [1]> then\n                wait until <not <<<(Dessie X) > [-225]> and <(Dessie X) < [-213]>> and <<(Dessie Y) > [-89]> and <(Dessie Y) < [-82]>>>>\n                set [piping v] to [0]\n                set [pipe where v] to [0]\n            end\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Room#) = [3]> then\n        if <<<(Dessie X) > [-18]> and <(Dessie X) < [-4]>> and <<(Dessie Y) > [-89]> and <(Dessie Y) < [-82]>>> then\n            if <(Piping) = [0]> then\n                set [pipe where v] to [13]\n                set [piping v] to [1]\n                wait until <(Piping) = [0]>\n            end\n            if <(Piping) = [1]> then\n                wait until <not <<<(Dessie X) > [-18]> and <(Dessie X) < [-4]>> and <<(Dessie Y) > [-89]> and <(Dessie Y) < [-82]>>>>\n                set [piping v] to [0]\n                set [pipe where v] to [0]\n            end\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Room#) = [3]> then\n        if <<<(Dessie X) > [24]> and <(Dessie X) < [33]>> and <<(Dessie Y) > [-73]> and <(Dessie Y) < [-60]>>> then\n            if <(Piping) = [0]> then\n                set [pipe where v] to [14]\n                set [piping v] to [1]\n                wait until <(Piping) = [0]>\n            end\n            if <(Piping) = [1]> then\n                wait until <not <<<(Dessie X) > [24]> and <(Dessie X) < [33]>> and <<(Dessie Y) > [-73]> and <(Dessie Y) < [-60]>>>>\n                set [piping v] to [0]\n                set [pipe where v] to [0]\n            end\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Room#) = [3]> then\n        if <<<(Dessie X) > [165]> and <(Dessie X) < [170]>> and <<(Dessie Y) > [-92]> and <(Dessie Y) < [-59]>>> then\n            if <(Piping) = [0]> then\n                set [pipe where v] to [15]\n                set [piping v] to [1]\n                wait until <(Piping) = [0]>\n            end\n            if <(Piping) = [1]> then\n                wait until <not <<<(Dessie X) > [165]> and <(Dessie X) < [170]>> and <<(Dessie Y) > [-92]> and <(Dessie Y) < [-59]>>>>\n                set [piping v] to [0]\n                set [pipe where v] to [0]\n            end\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Room#) = [3]> then\n        if <<(Dessie X) > [222]> and <<(Dessie Y) > [-82]> and <(Dessie Y) < [-48]>>> then\n            if <(Piping) = [0]> then\n                set [pipe where v] to [16]\n                set [piping v] to [1]\n                wait until <(Piping) = [0]>\n            end\n            if <(Piping) = [1]> then\n                wait until <not <<(Dessie X) > [222]> and <<(Dessie Y) > [-82]> and <(Dessie Y) < [-48]>>>>\n                set [piping v] to [0]\n                set [pipe where v] to [0]\n            end\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Room#) = [3]> then\n        if <<<(Dessie X) > [-213]> and <(Dessie X) < [-203]>> and <<(Dessie Y) > [-154]> and <(Dessie Y) < [-110]>>> then\n            if <(Piping) = [0]> then\n                set [pipe where v] to [17]\n                set [piping v] to [1]\n                wait until <(Piping) = [0]>\n            end\n            if <(Piping) = [1]> then\n                wait until <not <<<(Dessie X) > [-213]> and <(Dessie X) < [-203]>> and <<(Dessie Y) > [-154]> and <(Dessie Y) < [-110]>>>>\n                set [piping v] to [0]\n                set [pipe where v] to [0]\n            end\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Room#) = [3]> then\n        if <<<(Dessie X) > [-123]> and <(Dessie X) < [-109]>> and <<(Dessie Y) > [-172]> and <(Dessie Y) < [-168]>>> then\n            if <(Piping) = [0]> then\n                set [pipe where v] to [18]\n                set [piping v] to [1]\n                wait until <(Piping) = [0]>\n            end\n            if <(Piping) = [1]> then\n                wait until <not <<<(Dessie X) > [-123]> and <(Dessie X) < [-109]>> and <<(Dessie Y) > [-172]> and <(Dessie Y) < [-168]>>>>\n                set [piping v] to [0]\n                set [pipe where v] to [0]\n            end\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Room#) = [3]> then\n        if <<<(Dessie X) > [10]> and <(Dessie X) < [32]>> and <<(Dessie Y) > [-119]> and <(Dessie Y) < [-80]>>> then\n            if <(Piping) = [0]> then\n                set [pipe where v] to [19]\n                set [piping v] to [1]\n                wait until <(Piping) = [0]>\n            end\n            if <(Piping) = [1]> then\n                wait until <not <<<(Dessie X) > [10]> and <(Dessie X) < [32]>> and <<(Dessie Y) > [-119]> and <(Dessie Y) < [-80]>>>>\n                set [piping v] to [0]\n                set [pipe where v] to [0]\n            end\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Room#) = [3]> then\n        if <<<(Dessie X) > [72]> and <(Dessie X) < [81]>> and <<(Dessie Y) > [-150]> and <(Dessie Y) < [-116]>>> then\n            if <(Piping) = [0]> then\n                set [pipe where v] to [20]\n                set [piping v] to [1]\n                wait until <(Piping) = [0]>\n            end\n            if <(Piping) = [1]> then\n                wait until <not <<<(Dessie X) > [72]> and <(Dessie X) < [81]>> and <<(Dessie Y) > [-150]> and <(Dessie Y) < [-116]>>>>\n                set [piping v] to [0]\n                set [pipe where v] to [0]\n            end\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Room#) = [3]> then\n        if <<<(Dessie X) > [113]> and <(Dessie X) < [127]>> and <<(Dessie Y) > [-172]> and <(Dessie Y) < [-168]>>> then\n            if <(Piping) = [0]> then\n                set [pipe where v] to [21]\n                set [piping v] to [1]\n                wait until <(Piping) = [0]>\n            end\n            if <(Piping) = [1]> then\n                wait until <not <<<(Dessie X) > [113]> and <(Dessie X) < [127]>> and <<(Dessie Y) > [-172]> and <(Dessie Y) < [-168]>>>>\n                set [piping v] to [0]\n                set [pipe where v] to [0]\n            end\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Room#) = [3]> then\n        if <<<(Dessie X) > [157]> and <(Dessie X) < [178]>> and <<(Dessie Y) > [-154]> and <(Dessie Y) < [-116]>>> then\n            if <(Piping) = [0]> then\n                set [pipe where v] to [22]\n                set [piping v] to [1]\n                wait until <(Piping) = [0]>\n            end\n            if <(Piping) = [1]> then\n                wait until <not <<<(Dessie X) > [157]> and <(Dessie X) < [178]>> and <<(Dessie Y) > [-154]> and <(Dessie Y) < [-116]>>>>\n                set [piping v] to [0]\n                set [pipe where v] to [0]\n            end\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Room#) = [3]> then\n        if <<<(Dessie X) > [-108]> and <(Dessie X) < [-85]>> and <<(Dessie Y) > [135]> and <(Dessie Y) < [170]>>> then\n            if <(Piping) = [0]> then\n                set [pipe where v] to [2]\n                set [piping v] to [1]\n                wait until <(Piping) = [0]>\n            end\n            if <(Piping) = [1]> then\n                wait until <not <<<(Dessie X) > [-108]> and <(Dessie X) < [-85]>> and <<(Dessie Y) > [135]> and <(Dessie Y) < [170]>>>>\n                set [piping v] to [0]\n                set [pipe where v] to [0]\n            end\n        end\n    end\nend\n\nset [pipe where v] to [0]\nset [piping v] to [0]\nset [size v] to [1]\n\nset [ghost v] effect to (50)\n\nwhen flag clicked\nforever\n    if <(Room#) = [3]> then\n        if <<<(Dessie X) > [-184]> and <(Dessie X) < [-172]>> and <<(Dessie Y) > [119]> and <(Dessie Y) < [128]>>> then\n            if <(Piping) = [0]> then\n                set [pipe where v] to [1]\n                set [piping v] to [1]\n                wait until <(Piping) = [0]>\n            end\n            if <(Piping) = [1]> then\n                wait until <not <<<(Dessie X) > [-183]> and <(Dessie X) < [-172]>> and <<(Dessie Y) > [119]> and <(Dessie Y) < [128]>>>>\n                set [piping v] to [0]\n                set [pipe where v] to [0]\n            end\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <<(Room#) = [5]> and <(Bomb Explode) = [0]>> then\n        if <<<(Dessie X) > [92]> and <(Dessie X) < [99]>> and <<(Dessie Y) > [-96]> and <(Dessie Y) < [-93]>>> then\n            if <(Piping) = [0]> then\n                set [pipe where v] to [23]\n                set [piping v] to [1]\n                wait until <(Piping) = [0]>\n            end\n            if <(Piping) = [1]> then\n                wait until <not <<<(Dessie X) > [92]> and <(Dessie X) < [99]>> and <<(Dessie Y) > [-96]> and <(Dessie Y) < [-93]>>>>\n                set [piping v] to [0]\n                set [pipe where v] to [0]\n            end\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <<(Room#) = [5]> and <(Bomb Explode) = [0]>> then\n        if <<<(Dessie X) > [-228]> and <(Dessie X) < [-220]>> and <<(Dessie Y) > [133]> and <(Dessie Y) < [135]>>> then\n            if <(Piping) = [0]> then\n                set [pipe where v] to [24]\n                set [piping v] to [1]\n                wait until <(Piping) = [0]>\n            end\n            if <(Piping) = [1]> then\n                wait until <not <<<(Dessie X) > [-228]> and <(Dessie X) < [-220]>> and <<(Dessie Y) > [133]> and <(Dessie Y) < [135]>>>>\n                set [piping v] to [0]\n                set [pipe where v] to [0]\n            end\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <<(Room#) = [5]> and <(Bomb Explode) = [0]>> then\n        if <<<(Dessie X) > [146]> and <(Dessie X) < [165]>> and <<(Dessie Y) > [14]> and <(Dessie Y) < [17]>>> then\n            if <(Piping) = [0]> then\n                set [pipe where v] to [25]\n                set [piping v] to [1]\n                wait until <(Piping) = [0]>\n            end\n            if <(Piping) = [1]> then\n                wait until <not <<<(Dessie X) > [146]> and <(Dessie X) < [165]>> and <<(Dessie Y) > [14]> and <(Dessie Y) < [17]>>>>\n                set [piping v] to [0]\n                set [pipe where v] to [0]\n            end\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <<(Room#) = [5]> and <(Bomb Explode) = [0]>> then\n        if <<<(Dessie X) > [-138]> and <(Dessie X) < [-125]>> and <<(Dessie Y) > [-30]> and <(Dessie Y) < [-24]>>> then\n            if <(Piping) = [0]> then\n                set [pipe where v] to [26]\n                set [piping v] to [1]\n                wait until <(Piping) = [0]>\n            end\n            if <(Piping) = [1]> then\n                wait until <not <<<(Dessie X) > [-138]> and <(Dessie X) < [-125]>> and <<(Dessie Y) > [-30]> and <(Dessie Y) < [-24]>>>>\n                set [piping v] to [0]\n                set [pipe where v] to [0]\n            end\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <<(Room#) = [5]> and <(Bomb Explode) = [0]>> then\n        if <<<(Dessie X) > [16]> and <(Dessie X) < [29]>> and <<(Dessie Y) > [-23]> and <(Dessie Y) < [-18]>>> then\n            if <(Piping) = [0]> then\n                set [pipe where v] to [27]\n                set [piping v] to [1]\n                wait until <(Piping) = [0]>\n            end\n            if <(Piping) = [1]> then\n                wait until <not <<<(Dessie X) > [16]> and <(Dessie X) < [29]>> and <<(Dessie Y) > [-23]> and <(Dessie Y) < [-18]>>>>\n                set [piping v] to [0]\n                set [pipe where v] to [0]\n            end\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <<(Room#) = [5]> and <(Bomb Explode) = [0]>> then\n        if <<<(Dessie X) > [76]> and <(Dessie X) < [89]>> and <<(Dessie Y) > [-23]> and <(Dessie Y) < [-17]>>> then\n            if <(Piping) = [0]> then\n                set [pipe where v] to [28]\n                set [piping v] to [1]\n                wait until <(Piping) = [0]>\n            end\n            if <(Piping) = [1]> then\n                wait until <not <<<(Dessie X) > [76]> and <(Dessie X) < [89]>> and <<(Dessie Y) > [-23]> and <(Dessie Y) < [-17]>>>>\n                set [piping v] to [0]\n                set [pipe where v] to [0]\n            end\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <<(Room#) = [5]> and <(Bomb Explode) = [0]>> then\n        if <<<(Dessie X) > [150]> and <(Dessie X) < [163]>> and <<(Dessie Y) > [51]> and <(Dessie Y) < [56]>>> then\n            if <(Piping) = [0]> then\n                set [pipe where v] to [29]\n                set [piping v] to [1]\n                wait until <(Piping) = [0]>\n            end\n            if <(Piping) = [1]> then\n                wait until <not <<<(Dessie X) > [150]> and <(Dessie X) < [163]>> and <<(Dessie Y) > [51]> and <(Dessie Y) < [56]>>>>\n                set [piping v] to [0]\n                set [pipe where v] to [0]\n            end\n        end\n    end\nend\n\nset [brightness v] effect to (0)\n\nset [color v] effect to (0)\n\nwhen flag clicked\nforever\n    if <(Room#) = [5]> then\n        repeat until <(BP Fade in) = [1]>\n            set [brightness v] effect to (-100)\n        end\n        wait until <(BP Fade in) = [2]>\n        show\n        set [brightness v] effect to (-100)\n        repeat (50)\n            change [brightness v] effect by (2)\n        end\n        set [brightness v] effect to (0)\n        wait (1) seconds\n        set [bp fade in v] to [0]\n        stop [this script v]\n    end\nend\n\nset [box switcher v] to [1]\n\nwhen flag clicked\nforever\n    if <(Room#) = [5]> then\n        hide\n        wait until <(BP Fade in) = [2]>\n        stop [this script v]\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Room#) = [6]> then\n        repeat until <(P Fade In) = [1]>\n            set [brightness v] effect to (-100)\n        end\n        show\n        set [brightness v] effect to (-100)\n        repeat (50)\n            change [brightness v] effect by (2)\n        end\n        set [brightness v] effect to (0)\n        stop [this script v]\n    end\nend\n\nwait (0.15) seconds\n\nwhen flag clicked\nforever\n    if <(Game Over) = [0]> then\n        go to [front v] layer\n    end\nend\n\nwhen flag clicked\nshow\nforever\n    if <<<(Room#) = [3]> or <(Room#) = [4]>> or <(Room#) = [5]>> then\n        if <(Room#) = [3]> then\n            switch costume to (costume1 v)\n        end\n        if <(Room#) = [4]> then\n            switch costume to (costume2 v)\n        end\n        if <(Room#) = [5]> then\n            switch costume to (costume3 v)\n        end\n    else\n        switch costume to (costume4 v)\n    end\nend\n\nrepeat until <(BP Fade in) = [1]>\n    set [brightness v] effect to (-100)\nend\nwait until <(BP Fade in) = [2]>\n\nswitch costume to (abby-a v)\n\nset [ghost v] effect to (0)\ngo to [front v] layer\n\n@Doggo\n\nhide\n\nshow\n\nwhen flag clicked\ngo to x: (-190) y: (-153)\npoint in direction (90)\nset [dog level v] to [0]\nforever\n    go [backward v] (1) layers\nend\n\nwhen flag clicked\nforever\n    if <<(Room#) = [4]> and <(Using Door!) = [0]>> then\n        if <<<<(Dog Level) = [0]> and <<(Dessie X) < [-142]> and <(Dessie Y) < [-58]>>> or <<(Dog Level) = [1]> and <<(Dessie X) > [142]> and <<(Dessie Y) < [20]> and <(Dessie Y) > [-60]>>>>> or <<(Dog Level) = [2]> and <<(Dessie X) < [-144]> and <(Dessie Y) > [37]>>>> then\n            set [walkallowed v] to [0]\n            set [dog moving v] to [1]\n            set [dog angry v] to [1]\n            wait until <(Dog Moving) = [0]>\n            set [dog angry v] to [0]\n            set [walkallowed v] to [1]\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Dog Moving) = [1]> then\n        if <(Dog Level) = [1]> then\n            repeat until <(x position) = [256]>\n                change x by (1)\n            end\n            go to x: (-256) y: (39)\n            point in direction (90)\n            set [dog moving v] to [2]\n            set [dog level v] to [2]\n            repeat until <(x position) = [-190]>\n                change x by (1)\n            end\n            set [dog moving v] to [0]\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Dog Moving) = [1]> then\n        if <(Dog Level) = [2]> then\n            repeat until <(x position) = [-256]>\n                change x by (-1)\n            end\n            go to x: (256) y: (135)\n            point in direction (-90)\n            set [dog moving v] to [2]\n            set [dog level v] to [3]\n            repeat until <(x position) = [189]>\n                change x by (-1)\n            end\n            set [dog moving v] to [0]\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <<(Room#) = [4]> and <(Using Door!) = [0]>> then\n        if <not <(Dog Level) = [3]>> then\n            if <<(Dog Level) = [0]> or <(Dog Level) = [2]>> then\n                point in direction (90)\n            end\n            if <<(Dog Level) = [1]> or <(Dog Level) = [3]>> then\n                point in direction (-90)\n            end\n            if <(Dog Angry) = [0]> then\n                switch costume to (sleep v)\n                set [zz on v] to [1]\n                wait (pick random (pick random (0.5) to (2)) to (4.5)) seconds\n            end\n            if <(Dog Angry) = [0]> then\n                switch costume to (warn1a v)\n                start sound [tail v]\n                wait (0.1) seconds\n            end\n            if <(Dog Angry) = [0]> then\n                switch costume to (warn1b v)\n                wait (pick random (0.1) to (0.75)) seconds\n                set [zz on v] to [0]\n            end\n            if <(Dog Angry) = [0]> then\n                switch costume to (warn2a v)\n                wait (pick random (0.05) to (0.5)) seconds\n            end\n            if <(Dog Angry) = [0]> then\n                switch costume to (warn2b v)\n                wait (pick random (0.05) to (1)) seconds\n            end\n            if <(Dog Angry) = [0]> then\n                switch costume to (catcha v)\n                start sound [swish v]\n                wait (0.03) seconds\n            end\n            repeat (pick random (10) to (30))\n                if <<(Room#) = [4]> and <(Using Door!) = [0]>> then\n                    if <not <<<<(Dog Level) = [0]> or <(Dog Level) = [2]>> and <key (left arrow v) pressed?>> or <<(Dog Level) = [1]> and <key (right arrow v) pressed?>>>> then\n                        if <(Dog Angry) = [0]> then\n                            switch costume to (catchb v)\n                            wait (0.1) seconds\n                        end\n                    end\n                end\n            end\n            if <<<<(Dog Level) = [0]> or <(Dog Level) = [2]>> and <key (left arrow v) pressed?>> or <<(Dog Level) = [1]> and <key (right arrow v) pressed?>>> then\n                if <(Dog Seen) = [1]> then\n                    set [dog angry v] to [1]\n                    wait until <(Dog Angry) = [0]>\n                end\n            end\n            if <(Dog Angry) = [0]> then\n                switch costume to (warn2a v)\n                wait (0.5) seconds\n            end\n            if <(Dog Angry) = [0]> then\n                switch costume to (warn1b v)\n                wait (0.5) seconds\n            end\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <<(Room#) = [4]> and <(Using Door!) = [0]>> then\n        if <<<(Dog Level) = [0]> and <<(Dessie X) < [175]> and <(Dessie Y) < [-97]>>> or <<<(Dog Level) = [1]> and <<(Dessie X) > [-115]> and <<(Dessie Y) < [20]> and <(Dessie Y) > [-60]>>>> or <<(Dog Level) = [2]> and <<(Dessie X) < [110]> and <(Dessie Y) > [38]>>>>> then\n            set [dog seen v] to [1]\n        else\n            set [dog seen v] to [0]\n        end\n    else\n        set [dog seen v] to [0]\n    end\nend\n\nwhen flag clicked\nforever\n    if <<(Dog Level) = [0]> or <(Dog Level) = [2]>> then\n        set [zz x v] to ((x position) - (25))\n    end\n    if <<(Dog Level) = [1]> or <(Dog Level) = [3]>> then\n        set [zz x v] to ((x position) + (25))\n    end\n    set [zz y v] to ((y position) + (15))\nend\n\nwhen flag clicked\nforever\n    if <(Dog Angry) = [1]> then\n        repeat until <(Dog Angry) = [0]>\n            if <<(Room#) = [4]> and <(Using Door!) = [0]>> then\n                switch costume to (bork1 v)\n                start sound (pick random (1) to (6))\n                wait (0.15) seconds\n                switch costume to (bork2 v)\n                wait (0.05) seconds\n                switch costume to (bork1 v)\n                start sound (pick random (1) to (6))\n                wait (0.15) seconds\n                switch costume to (bork2 v)\n                wait (0.4) seconds\n            end\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Using Door!) = [-1]> then\n        repeat (10)\n            change [brightness v] effect by (-10)\n        end\n        set [brightness v] effect to (-100)\n        wait until <(Using Door!) = [-4]>\n    end\n    if <(Using Door!) = [-5]> then\n        wait (0.1) seconds\n        repeat (100)\n            change [brightness v] effect by (1)\n        end\n        set [brightness v] effect to (0)\n        wait until <(Using Door!) = [0]>\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Using Door!) = [1]> then\n        repeat (10)\n            change [brightness v] effect by (-10)\n        end\n        set [brightness v] effect to (-100)\n        wait until <(Using Door!) = [4]>\n    end\n    if <(Using Door!) = [5]> then\n        wait (0.1) seconds\n        repeat (100)\n            change [brightness v] effect by (1)\n        end\n        set [brightness v] effect to (0)\n        wait until <(Using Door!) = [0]>\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Dog Moving) = [1]> then\n        set [zz on v] to [0]\n    end\nend\n\nif  then\nend\n\nwhen flag clicked\nforever\n    if <(Dog Moving) = [0]> then\n        if <(Dog Level) = [3]> then\n            switch costume to (warn2a v)\n            wait (0.5) seconds\n            switch costume to (warn1b v)\n            wait (0.5) seconds\n            switch costume to (sleep v)\n            set [zz on v] to [1]\n            stop [this script v]\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Room#) = [4]> then\n        show\n    else\n        hide\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Dog Moving) = [1]> then\n        if <(Dog Level) = [0]> then\n            repeat until <(x position) = [-256]>\n                change x by (-1)\n            end\n            go to x: (256) y: (-57)\n            point in direction (-90)\n            set [dog moving v] to [2]\n            set [dog level v] to [1]\n            repeat until <(x position) = [187]>\n                change x by (-1)\n            end\n            set [dog moving v] to [0]\n        end\n    end\nend\n\n@zZ\n\nwhen flag clicked\nforever\n    go to x: (zZ X) y: (zZ Y)\n    switch costume to (costume7 v)\nend\n\nwhen I start as a clone\nset [brightness v] effect to (pick random (-35.5) to (20.5))\nswitch costume to (pick random (1) to (6))\nrepeat (75)\n    change size by (-1)\n    if <<(Dog Level) = [0]> or <(Dog Level) = [2]>> then\n        change x by (pick random (0.001) to (pick random (0.05) to (pick random (0.25) to (pick random (0.5) to (5)))))\n    end\n    if <<(Dog Level) = [1]> or <(Dog Level) = [3]>> then\n        change x by (pick random (-0.001) to (pick random (-0.05) to (pick random (-0.25) to (pick random (-0.5) to (-5)))))\n    end\n    change y by (1)\nend\ndelete this clone\n\nwhen flag clicked\nforever\n    if <<(Room#) = [4]> and <(Using Door!) = [0]>> then\n        if <(zZ on) = [1]> then\n            wait (0.4) seconds\n            create clone of (_myself_ v)\n        end\n    end\nend\n\nwhen I start as a clone\nforever\n    if <(Using Door!) = [1]> then\n        repeat (10)\n            change [brightness v] effect by (-10)\n        end\n        set [brightness v] effect to (-100)\n        wait until <(Using Door!) = [4]>\n    end\n    if <(Using Door!) = [5]> then\n        wait (0.1) seconds\n        repeat (100)\n            change [brightness v] effect by (1)\n        end\n        set [brightness v] effect to (0)\n        wait until <(Using Door!) = [0]>\n    end\nend\n\nwhen I start as a clone\nforever\n    if <(Using Door!) = [-1]> then\n        repeat (10)\n            change [brightness v] effect by (-10)\n        end\n        set [brightness v] effect to (-100)\n        wait until <(Using Door!) = [-4]>\n    end\n    if <(Using Door!) = [-5]> then\n        wait (0.1) seconds\n        repeat (100)\n            change [brightness v] effect by (1)\n        end\n        set [brightness v] effect to (0)\n        wait until <(Using Door!) = [0]>\n    end\nend\n\n@Ball 1\n\nwhen flag clicked\ngo to x: (256) y: (-53)\nswitch costume to (costume3 v)\nset [ball 1 go v] to [0]\n\nwhen I start as a clone\nforever\n    if <(Using Door!) = [1]> then\n        repeat (10)\n            change [brightness v] effect by (-10)\n        end\n        set [brightness v] effect to (-100)\n        wait until <(Using Door!) = [4]>\n        delete this clone\n    end\n    if <(Using Door!) = [5]> then\n        wait (0.1) seconds\n        repeat (100)\n            change [brightness v] effect by (1)\n        end\n        set [brightness v] effect to (0)\n        wait until <(Using Door!) = [0]>\n    end\nend\n\nwait until \n\nwhen I start as a clone\nforever\n    if <(Using Door!) = [-1]> then\n        repeat (10)\n            change [brightness v] effect by (-10)\n        end\n        set [brightness v] effect to (-100)\n        wait until <(Using Door!) = [-4]>\n        delete this clone\n    end\n    if <(Using Door!) = [-5]> then\n        wait (0.1) seconds\n        repeat (100)\n            change [brightness v] effect by (1)\n        end\n        set [brightness v] effect to (0)\n        wait until <(Using Door!) = [0]>\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Room#) = [4]> then\n        show\n    else\n        hide\n    end\nend\n\nwhen flag clicked\nforever\n    if <<(Room#) = [4]> and <(Using Door!) = [0]>> then\n        if <(Ball 1 Go) = [1]> then\n            if <(Dog Level) = [1]> then\n                create clone of (_myself_ v)\n            end\n            set [ball 1 go v] to [0]\n        end\n    end\nend\n\nrepeat (173)\n    change x by (-3)\n    turn left (15) degrees\n    if <(x position) < [-236]> then\n        delete this clone\n    end\n    if <touching (dessie v)?> then\n        wait (0.1) seconds\n        stop [this script v]\n    end\nend\n\nwhen I start as a clone\nwait until <touching (dessie v)?>\nwait (0.01) seconds\nchange y by (2)\nwait (0.01) seconds\nchange y by (1)\nwait (0.01) seconds\nchange y by (0)\nwait (0.01) seconds\nchange y by (-2)\nwait (0.01) seconds\nchange y by (-4)\nwait (0.01) seconds\nchange y by (-6)\nwait (0.01) seconds\nrepeat until <(y position) < [-174]>\n    change y by (-10)\nend\n\nwhen flag clicked\nforever\n    if <(Dog Level) = [0]> then\n        wait until <(Dog Level) = [1]>\n        create clone of (_myself_ v)\n    end\nend\n\nwhen I start as a clone\nforever\n    if <((480) - ((x position) + (240))) > (Ball 1 Spacer)> then\n        set [ball 1 go v] to [1]\n        stop [this script v]\n    end\nend\n\nwhen I start as a clone\nswitch costume to (pick random (1) to (2))\nset [ball 1 spacer v] to (pick random (pick random (50) to (100)) to (pick random (150) to (200)))\nforever\n    repeat (173)\n        change x by (-3)\n        turn left (15) degrees\n        if <(x position) < [-236]> then\n            delete this clone\n        end\n    end\nend\n\nwhen I start as a clone\nforever\n    if <not <(Room#) = [4]>> then\n        delete this clone\n    end\nend\n\n@Ball 2\n\nwhen flag clicked\ngo to x: (-256) y: (43)\nswitch costume to (costume3 v)\nset [ball 1 go v] to [0]\n\nwhen I start as a clone\nforever\n    if <(Using Door!) = [-1]> then\n        repeat (10)\n            change [brightness v] effect by (-10)\n        end\n        set [brightness v] effect to (-100)\n        wait until <(Using Door!) = [-4]>\n        delete this clone\n    end\n    if <(Using Door!) = [-5]> then\n        wait (0.1) seconds\n        repeat (100)\n            change [brightness v] effect by (1)\n        end\n        set [brightness v] effect to (0)\n        wait until <(Using Door!) = [0]>\n    end\nend\n\nwhen I start as a clone\nforever\n    if <(Using Door!) = [1]> then\n        repeat (10)\n            change [brightness v] effect by (-10)\n        end\n        set [brightness v] effect to (-100)\n        wait until <(Using Door!) = [4]>\n        delete this clone\n    end\n    if <(Using Door!) = [5]> then\n        wait (0.1) seconds\n        repeat (100)\n            change [brightness v] effect by (1)\n        end\n        set [brightness v] effect to (0)\n        wait until <(Using Door!) = [0]>\n    end\nend\n\nwhen flag clicked\nforever\n    if <<(Room#) = [4]> and <(Using Door!) = [0]>> then\n        if <(Ball 2 Go) = [1]> then\n            if <(Dog Level) = [2]> then\n                create clone of (_myself_ v)\n            end\n            set [ball 2 go v] to [0]\n        end\n    end\nend\n\ncreate clone of (_myself_ v)\n\nwhen flag clicked\nforever\n    if <(Dog Level) = [1]> then\n        wait until <(Dog Level) = [2]>\n        create clone of (_myself_ v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Room#) = [4]> then\n        show\n    else\n        hide\n    end\nend\n\nwhen I start as a clone\nwait until <touching (dessie v)?>\nwait (0.01) seconds\nchange y by (2)\nwait (0.01) seconds\nchange y by (1)\nwait (0.01) seconds\nchange y by (0)\nwait (0.01) seconds\nchange y by (-2)\nwait (0.01) seconds\nchange y by (-4)\nwait (0.01) seconds\nchange y by (-6)\nwait (0.01) seconds\nrepeat until <(y position) < [-174]>\n    change y by (-10)\nend\n\nwhen I start as a clone\nforever\n    if <([abs v] of ((-240) - (x position)) ) > (Ball 2 Spacer)> then\n        set [ball 2 go v] to [1]\n        stop [this script v]\n    end\nend\n\nwhen I start as a clone\nswitch costume to (pick random (1) to (2))\nset [ball 2 spacer v] to (pick random (100) to (pick random (150) to (150)))\nforever\n    repeat (173)\n        change x by (3)\n        turn right (15) degrees\n        if <(x position) > [236]> then\n            delete this clone\n        end\n    end\nend\n\nwhen I start as a clone\nforever\n    if <not <(Room#) = [4]>> then\n        delete this clone\n    end\nend\n\n@Squeaky Bone\n\nwhen I start as a clone\nforever\n    if <(Using Door!) = [-1]> then\n        repeat (10)\n            change [brightness v] effect by (-10)\n        end\n        set [brightness v] effect to (-100)\n        wait until <(Using Door!) = [-4]>\n        delete this clone\n    end\n    if <(Using Door!) = [-5]> then\n        wait (0.1) seconds\n        repeat (100)\n            change [brightness v] effect by (1)\n        end\n        set [brightness v] effect to (0)\n        wait until <(Using Door!) = [0]>\n    end\nend\n\nwhen I start as a clone\nforever\n    if <(Using Door!) = [1]> then\n        repeat (10)\n            change [brightness v] effect by (-10)\n        end\n        set [brightness v] effect to (-100)\n        wait until <(Using Door!) = [4]>\n        delete this clone\n    end\n    if <(Using Door!) = [5]> then\n        wait (0.1) seconds\n        repeat (100)\n            change [brightness v] effect by (1)\n        end\n        set [brightness v] effect to (0)\n        wait until <(Using Door!) = [0]>\n    end\nend\n\nwhen flag clicked\ngo to x: (-256) y: (48)\nswitch costume to (costume3 v)\n\ncreate clone of (_myself_ v)\n\nwhen flag clicked\nforever\n    if <(Dog Level) = [1]> then\n        wait until <(Dog Level) = [2]>\n        create clone of (_myself_ v)\n    end\nend\n\nwhen I start as a clone\npoint in direction (pick random (0) to (360))\nswitch costume to (pick random (1) to (2))\nset [squeaky bone spacer v] to (pick random (pick random (pick random (200) to (300)) to (400)) to (470))\nrepeat (128)\n    change x by (7)\n    set y to ((48) + (((3) * ([sin v] of (Bone Bounce) )) + (3)))\n    turn right (pick random (20) to (30)) degrees\n    if <(Bone Bounce) = [0]> then\n        turn right (pick random (-10) to (10)) degrees\n    end\n    if <touching (dessie v)?> then\n        stop [this script v]\n    end\nend\ndelete this clone\n\nwhen I start as a clone\nwait until <touching (dessie v)?>\nchange x by (4)\nwait (0.01) seconds\nchange y by (4)\nwait (0.01) seconds\nchange y by (2)\nwait (0.01) seconds\nchange y by (1)\nwait (0.01) seconds\nchange y by (0)\nwait (0.01) seconds\nchange y by (-4)\nwait (0.01) seconds\nchange y by (-7)\nwait (0.01) seconds\nrepeat until <(y position) < [-174]>\n    change y by (-10)\nend\ndelete this clone\n\nwhen flag clicked\nforever\n    if <(Room#) = [4]> then\n        show\n    else\n        hide\n    end\nend\n\nwhen flag clicked\nforever\n    if <<(Room#) = [4]> and <(Using Door!) = [0]>> then\n        if <(Squeaky Bone Go) = [1]> then\n            if <(Dog Level) = [2]> then\n                create clone of (_myself_ v)\n            end\n            set [squeaky bone go v] to [0]\n        end\n    end\nend\n\nif <([abs v] of ((-240) - (x position)) ) < (Squeaky Bone Spacer)> then\nend\n\nwhen flag clicked\nforever\n    set [bone bounce v] to ((Bone Bounce) + (30))\n    if <(Bone Bounce) = [360]> then\n        set [bone bounce v] to [0]\n    end\nend\n\nset [squeaky bone go v] to [1]\n\nwhen I start as a clone\nforever\n    if <([abs v] of ((-240) - (x position)) ) > (Squeaky Bone Spacer)> then\n        set [squeaky bone go v] to [1]\n        stop [this script v]\n    end\n    if <(y position) < [20]> then\n        set [squeaky bone go v] to [1]\n        stop [this script v]\n    end\nend\n\nif <([abs v] of ((-240) - (x position)) ) > (Squeaky Bone Spacer)> then\n    set [squeaky bone go v] to [1]\n    stop [this script v]\nend\n\nwhen I start as a clone\nwait until <touching (dessie v)?>\nrepeat until <<(x position) < [-250]> or <(y position) < [-200]>>\n    change x by (-4)\n    turn left (pick random (10) to (20)) degrees\n    if <<(x position) < [-238]> or <(y position) < [-170]>> then\n        delete this clone\n    end\nend\n\nwhen I start as a clone\nforever\n    if <not <(Room#) = [4]>> then\n        delete this clone\n    end\nend\n\nwhen flag clicked\nset [squeaky bone go v] to [0]\n\n@Cutscene1\n\nwhen flag clicked\nforever\n    if <<(Cutscene) = [1]> and <(Room#) = [0]>> then\n        wait (0.5) seconds\n        go to x: (18) y: (-96)\n        switch costume to (costume1 v)\n        show\n        wait (2) seconds\n        set [key down v] to [1]\n        wait until <key (down arrow v) pressed?>\n        set [key down v] to [0]\n        switch costume to (costume2 v)\n        wait (2) seconds\n        set [key down v] to [2]\n        wait until <key (down arrow v) pressed?>\n        set [key down v] to [0]\n        switch costume to (costume3 v)\n        wait (0.4) seconds\n        switch costume to (costume4 v)\n        stop all sounds\n        start sound [Thud v]\n        start sound [Clink v]\n        set [bp fade in v] to [-1]\n        repeat (5)\n            go to x: (pick random (14) to (22)) y: (pick random (-100) to (-92))\n            wait (0.01) seconds\n            go to x: (18) y: (-96)\n            wait (0.01) seconds\n        end\n        wait until <(costume [number v]) = [5]>\n        wait (2) seconds\n        set [key down v] to [3]\n        wait until <key (down arrow v) pressed?>\n        set [key down v] to [0]\n        switch costume to (costume6 v)\n        wait (2) seconds\n        set [key down v] to [4]\n        wait until <key (down arrow v) pressed?>\n        set [key down v] to [0]\n        set [cutscene v] to [0]\n        set [walkallowed v] to [1]\n    end\nend\n\nwait until <key (down arrow v) pressed?>\n\nwhen flag clicked\n\nshow\n\nset [room# v] to [0]\n\nwhen flag clicked\nforever\n    if <<(Cutscene) = [1]> and <(Room#) = [0]>> then\n        if <(Steal Balloons) = [1]> then\n            delete (all) of [balloons gotten v]\n            set [steal balloons v] to [0]\n        end\n    end\nend\n\nshow\n\nhide\nwait (0.25) seconds\ngo to x: (0) y: (0)\n\nwhen flag clicked\n\nwhen flag clicked\nrepeat until <(costume [number v]) = [4]>\n    play sound [Happy v] until done\nend\nstart sound [Sword v]\nplay sound [Evil Laugh v] until done\nswitch costume to (costume5 v)\nrepeat until <not <(Using Door!) = [0]>>\n    play sound [Evil v] until done\nend\n\nstop all sounds\n\nwhen flag clicked\nset [brightness v] effect to (100)\nforever\n    if <not <(Cutscene) = [1]>> then\n        hide\n    end\nend\n\nwhen flag clicked\nforever\n    change [brightness v] effect by (1)\nend\n\nswitch costume to (costume3 v)\nwait (0.4) seconds\nswitch costume to (costume4 v)\nstop all sounds\nstart sound [Thud v]\nstart sound [Clink v]\nrepeat (5)\n    go to x: (pick random (14) to (22)) y: (pick random (-100) to (-92))\n    wait (0.01) seconds\n    go to x: (18) y: (-96)\n    wait (0.01) seconds\nend\n\n@Cutscene2\n\nswitch costume to (costume3 v)\nrepeat (5)\n    go to x: (pick random (-4) to (-4)) y: (pick random (136) to (144))\n    wait (0.01) seconds\n    go to x: (0) y: (140)\n    wait (0.01) seconds\nend\nwait (0.5) seconds\nswitch costume to (costume4 v)\nrepeat (5)\n    go to x: (pick random (-4) to (-4)) y: (pick random (136) to (144))\n    wait (0.01) seconds\n    go to x: (0) y: (140)\n    wait (0.01) seconds\nend\n\nwait until <key (down arrow v) pressed?>\n\nwait until <key (down arrow v) pressed?>\n\nwhen flag clicked\nforever\n    set [brightness v] effect to (100)\nend\n\nset [room# v] to [4]\n\nset [walkallowed v] to [1]\n\nwhen flag clicked\nforever\n    if <not <<(Cutscene) = [1]> and <(Room#) = [5]>>> then\n        hide\n    end\nend\n\nstart sound [Thud v]\n\nstart sound [Thud v]\nstart sound [Clink v]\n\nplay sound [Evil Laugh v] until done\n\nset [boss battle v] to [1]\n\nrepeat (5)\n    go to x: (pick random (-4) to (4)) y: (pick random (136) to (144))\n    wait (0.01) seconds\n    go to x: (0) y: (140)\n    wait (0.01) seconds\nend\n\nwhen flag clicked\nforever\n    if <<(Cutscene) = [1]> and <(Room#) = [5]>> then\n        wait (0.5) seconds\n        go to x: (-174) y: (-107)\n        switch costume to (costume1 v)\n        show\n        wait (1) seconds\n        set [key down v] to [5]\n        wait until <key (down arrow v) pressed?>\n        set [key down v] to [0]\n        wait (0.25) seconds\n        hide\n        set [bp fade in v] to [1]\n        wait until <(BP Fade in) = [0]>\n        go to x: (40) y: (140)\n        switch costume to (costume2 v)\n        wait (0.5) seconds\n        show\n        wait (1) seconds\n        switch costume to (costume3 v)\n        start sound [Thud v]\n        start sound [Clink v]\n        repeat (5)\n            go to x: (pick random (36) to (44)) y: (pick random (136) to (144))\n            wait (0.01) seconds\n            go to x: (40) y: (140)\n            wait (0.01) seconds\n        end\n        wait (0.5) seconds\n        switch costume to (costume4 v)\n        start sound [Thud v]\n        start sound [Clink v]\n        repeat (5)\n            go to x: (pick random (36) to (44)) y: (pick random (136) to (144))\n            wait (0.01) seconds\n            go to x: (40) y: (140)\n            wait (0.01) seconds\n        end\n        wait (1) seconds\n        set [key down v] to [6]\n        wait until <key (down arrow v) pressed?>\n        set [key down v] to [0]\n        switch costume to (costume5 v)\n        wait (2) seconds\n        switch costume to (costume6 v)\n        start sound [Thud v]\n        start sound [Clink v]\n        repeat (5)\n            go to x: (pick random (36) to (44)) y: (pick random (136) to (144))\n            wait (0.01) seconds\n            go to x: (40) y: (140)\n            wait (0.01) seconds\n        end\n        wait (1) seconds\n        set [key down v] to [7]\n        wait until <key (down arrow v) pressed?>\n        set [key down v] to [0]\n        wait (0.25) seconds\n        hide\n        go to x: (-174) y: (-107)\n        switch costume to (costume7 v)\n        wait (0.25) seconds\n        show\n        wait (1) seconds\n        set [key down v] to [8]\n        wait until <key (down arrow v) pressed?>\n        set [key down v] to [0]\n        wait (0.25) seconds\n        hide\n        go to x: (40) y: (140)\n        switch costume to (costume8 v)\n        wait (0.25) seconds\n        show\n        wait (1) seconds\n        set [key down v] to [9]\n        wait until <key (down arrow v) pressed?>\n        set [key down v] to [0]\n        switch costume to (costume9 v)\n        wait (0.5) seconds\n        switch costume to (costume10 v)\n        start sound [Thud v]\n        start sound [Clink v]\n        repeat (5)\n            go to x: (pick random (34) to (46)) y: (pick random (134) to (146))\n            wait (0.01) seconds\n            go to x: (40) y: (140)\n            wait (0.01) seconds\n        end\n        wait (0.25) seconds\n        switch costume to (costume11 v)\n        start sound [Thud v]\n        start sound [Clink v]\n        repeat (5)\n            go to x: (pick random (34) to (46)) y: (pick random (134) to (146))\n            wait (0.01) seconds\n            go to x: (40) y: (140)\n            wait (0.01) seconds\n        end\n        start sound [Evil Laugh v]\n        set [bp fade in v] to [2]\n        wait until <(BP Fade in) = [0]>\n        set [key down v] to [10]\n        wait until <key (down arrow v) pressed?>\n        set [key down v] to [0]\n        stop all sounds\n        set [cutscene v] to [0]\n        set [walkallowed v] to [1]\n        set [boss battle v] to [1]\n        set [bomb 1 go v] to [1]\n    end\nend\n\nset [bomb 1 go v] to [2]\n\nwait (0.25) seconds\nhide\nset [bp fade in v] to [1]\nwait until <(BP Fade in) = [0]>\ngo to x: (40) y: (140)\nswitch costume to (costume2 v)\nwait (0.5) seconds\nshow\nwait (1) seconds\nswitch costume to (costume3 v)\nstart sound [Thud v]\nstart sound [Clink v]\nrepeat (5)\n    go to x: (pick random (36) to (44)) y: (pick random (136) to (144))\n    wait (0.01) seconds\n    go to x: (40) y: (140)\n    wait (0.01) seconds\nend\nwait (0.5) seconds\n\n@Cutscene3\n\nswitch costume to (costume3 v)\nrepeat (5)\n    go to x: (pick random (-4) to (-4)) y: (pick random (136) to (144))\n    wait (0.01) seconds\n    go to x: (0) y: (140)\n    wait (0.01) seconds\nend\nwait (0.5) seconds\nswitch costume to (costume4 v)\nrepeat (5)\n    go to x: (pick random (-4) to (-4)) y: (pick random (136) to (144))\n    wait (0.01) seconds\n    go to x: (0) y: (140)\n    wait (0.01) seconds\nend\n\nwait until <key (down arrow v) pressed?>\n\nset [room# v] to [4]\n\nwhen flag clicked\nforever\n    if <not <<(Cutscene) = [1]> and <(Room#) = [6]>>> then\n        hide\n    end\nend\n\nstart sound [Thud v]\n\nstart sound [Thud v]\nstart sound [Clink v]\n\nset [boss battle v] to [1]\n\nrepeat (5)\nend\n\nwhen flag clicked\nforever\n    set [brightness v] effect to (100)\nend\n\nwhen flag clicked\nset [game over v] to [0]\nset [bp fade in 2 v] to [0]\nset [p fade in v] to [0]\nset [surprise music v] to [0]\nset [eyepatch v] to [0]\nforever\n    if <<(Cutscene) = [1]> and <(Room#) = [6]>> then\n        set [walkallowed v] to [0]\n        wait (0.5) seconds\n        go to x: (-174) y: (-107)\n        switch costume to (costume1 v)\n        show\n        wait (1) seconds\n        set [key down v] to [5]\n        wait until <key (down arrow v) pressed?>\n        set [key down v] to [0]\n        switch costume to (costume2 v)\n        wait (1) seconds\n        set [key down v] to [12]\n        wait until <key (down arrow v) pressed?>\n        set [key down v] to [0]\n        hide\n        set [walkallowed v] to [1]\n        wait until <(WalkAllowed) = [0]>\n        set size to (200) %\n        go to x: (30) y: (-105)\n        switch costume to (costume3 v)\n        show\n        set [p fade in v] to [1]\n        play sound [344965__beerre__spanish-party-noisemaker.mp3 v] until done\n        set [surprise music v] to [1]\n        set [key down v] to [11]\n        wait until <key (down arrow v) pressed?>\n        set [key down v] to [0]\n        hide\n        set size to (100) %\n        go to x: (-35) y: (-80)\n        switch costume to (costume4 v)\n        show\n        wait (1) seconds\n        set [key down v] to [13]\n        wait until <key (down arrow v) pressed?>\n        set [key down v] to [0]\n        hide\n        go to x: (40) y: (-100)\n        switch costume to (costume5 v)\n        show\n        wait (1) seconds\n        set [key down v] to [14]\n        wait until <key (down arrow v) pressed?>\n        set [key down v] to [0]\n        hide\n        go to x: (-50) y: (-65)\n        switch costume to (costume6 v)\n        show\n        wait (1) seconds\n        set [key down v] to [15]\n        wait until <key (down arrow v) pressed?>\n        set [key down v] to [0]\n        hide\n        go to x: (-65) y: (-65)\n        switch costume to (costume7 v)\n        show\n        wait (1) seconds\n        set [key down v] to [16]\n        wait until <key (down arrow v) pressed?>\n        set [key down v] to [0]\n        hide\n        set [bp fade in 2 v] to [1]\n        wait until <(BP Fade In 2) = [0]>\n        set [turn dessie v] to [1]\n        wait until <(Turn Dessie) = [0]>\n        go to x: (-60) y: (-65)\n        switch costume to (costume8 v)\n        show\n        wait (1) seconds\n        set [key down v] to [16]\n        wait until <key (down arrow v) pressed?>\n        set [key down v] to [0]\n        hide\n        go to x: (-177) y: (-32)\n        switch costume to (costume9 v)\n        show\n        wait (0.75) seconds\n        switch costume to (costume10 v)\n        start sound [Thud v]\n        start sound [Clink v]\n        repeat (5)\n            go to x: (pick random (-181) to (-173)) y: (pick random (-36) to (-28))\n            wait (0.01) seconds\n            go to x: (-177) y: (-32)\n            wait (0.01) seconds\n        end\n        wait (0.5) seconds\n        switch costume to (costume11 v)\n        start sound [Thud v]\n        start sound [Clink v]\n        repeat (5)\n            go to x: (pick random (-181) to (-173)) y: (pick random (-36) to (-28))\n            wait (0.01) seconds\n            go to x: (-177) y: (-32)\n            wait (0.01) seconds\n        end\n        wait (0.5) seconds\n        set [key down v] to [17]\n        wait until <key (down arrow v) pressed?>\n        set [key down v] to [0]\n        hide\n        go to x: (-142) y: (-70)\n        switch costume to (costume12 v)\n        show\n        wait (0.3) seconds\n        switch costume to (costume13 v)\n        start sound [Thud v]\n        start sound [Clink v]\n        repeat (5)\n            go to x: (pick random (-146) to (-138)) y: (pick random (-74) to (-66))\n            wait (0.01) seconds\n            go to x: (-142) y: (-70)\n            wait (0.01) seconds\n        end\n        wait (0.5) seconds\n        set [key down v] to [17]\n        wait until <key (down arrow v) pressed?>\n        set [key down v] to [0]\n        hide\n        go to x: (-180) y: (-80)\n        switch costume to (costume15 v)\n        show\n        wait (1) seconds\n        set [key down v] to [18]\n        wait until <key (down arrow v) pressed?>\n        set [key down v] to [0]\n        start sound [Thud v]\n        start sound [Sword v]\n        set [bp fade in 2 v] to [-1]\n        hide\n        wait (2) seconds\n        go to x: (-50) y: (-80)\n        switch costume to (costume14 v)\n        show\n        wait (1) seconds\n        set [key down v] to [13]\n        wait until <key (down arrow v) pressed?>\n        set [key down v] to [0]\n        hide\n        go to x: (-175) y: (-40)\n        switch costume to (costume16 v)\n        show\n        wait (1) seconds\n        switch costume to (costume17 v)\n        start sound [Thud v]\n        start sound [Clink v]\n        repeat (5)\n            go to x: (pick random (-179) to (-171)) y: (pick random (-44) to (-36))\n            wait (0.01) seconds\n            go to x: (-175) y: (-40)\n            wait (0.01) seconds\n        end\n        wait (0.25) seconds\n        switch costume to (costume18 v)\n        start sound [Thud v]\n        start sound [Clink v]\n        repeat (5)\n            go to x: (pick random (-179) to (-171)) y: (pick random (-44) to (-36))\n            wait (0.01) seconds\n            go to x: (-175) y: (-40)\n            wait (0.01) seconds\n        end\n        wait (0.5) seconds\n        set [key down v] to [19]\n        wait until <key (down arrow v) pressed?>\n        set [key down v] to [0]\n        hide\n        go to x: (30) y: (-70)\n        switch costume to (costume19 v)\n        show\n        set [turn dessie v] to [2]\n        wait (2.5) seconds\n        set [key down v] to [20]\n        wait until <key (down arrow v) pressed?>\n        set [key down v] to [0]\n        hide\n        go to x: (-159) y: (-45)\n        switch costume to (costume20 v)\n        show\n        set [turn dessie v] to [3]\n        wait (0.5) seconds\n        switch costume to (costume21 v)\n        start sound [Thud v]\n        start sound [Clink v]\n        repeat (5)\n            go to x: (pick random (-163) to (-155)) y: (pick random (-49) to (-41))\n            wait (0.01) seconds\n            go to x: (-159) y: (-45)\n            wait (0.01) seconds\n        end\n        wait (0.25) seconds\n        switch costume to (costume22 v)\n        start sound [Thud v]\n        start sound [Clink v]\n        repeat (5)\n            go to x: (pick random (-163) to (-155)) y: (pick random (-49) to (-41))\n            wait (0.01) seconds\n            go to x: (-159) y: (-45)\n            wait (0.01) seconds\n        end\n        wait (0.5) seconds\n        set [key down v] to [21]\n        wait until <key (down arrow v) pressed?>\n        set [key down v] to [0]\n        hide\n        go to x: (-55) y: (-80)\n        switch costume to (costume23 v)\n        show\n        wait (1) seconds\n        set [key down v] to [22]\n        wait until <key (down arrow v) pressed?>\n        set [key down v] to [0]\n        hide\n        go to x: (-160) y: (-80)\n        switch costume to (costume24 v)\n        show\n        start sound [Thud v]\n        start sound [Clink v]\n        repeat (2)\n            go to x: (pick random (-164) to (-156)) y: (pick random (-84) to (-76))\n            wait (0.01) seconds\n            go to x: (-160) y: (-80)\n            wait (0.01) seconds\n        end\n        switch costume to (costume25 v)\n        start sound [Thud v]\n        start sound [Clink v]\n        repeat (3)\n            go to x: (pick random (-164) to (-156)) y: (pick random (-84) to (-76))\n            wait (0.01) seconds\n            go to x: (-160) y: (-80)\n            wait (0.01) seconds\n        end\n        set [bp fade in 2 v] to [-2]\n        wait until <(BP Fade In 2) = [0]>\n        set [key down v] to [23]\n        wait until <key (down arrow v) pressed?>\n        set [key down v] to [0]\n        hide\n        set [turn dessie v] to [4]\n        wait until <(Turn Dessie) = [0]>\n        go to x: (-50) y: (-30)\n        switch costume to (costume26 v)\n        show\n        wait (2.5) seconds\n        set [key down v] to [24]\n        wait until <key (down arrow v) pressed?>\n        set [key down v] to [0]\n        hide\n        go to x: (50) y: (-85)\n        switch costume to (costume27 v)\n        show\n        wait (1) seconds\n        set [key down v] to [25]\n        wait until <key (down arrow v) pressed?>\n        set [key down v] to [0]\n        hide\n        go to x: (45) y: (-90)\n        switch costume to (costume28 v)\n        show\n        wait (1) seconds\n        switch costume to (costume29 v)\n        start sound [Thud v]\n        start sound [Clink v]\n        start sound [Sword v]\n        start sound [Evil Laugh v]\n        set [p fade in v] to [-1]\n        repeat (5)\n            go to x: (pick random (41) to (49)) y: (pick random (-94) to (-86))\n            wait (0.01) seconds\n            go to x: (45) y: (-90)\n            wait (0.01) seconds\n        end\n        wait (1) seconds\n        hide\n        go to x: (-45) y: (-85)\n        switch costume to (costume30 v)\n        show\n        wait (6) seconds\n        set [key down v] to [26]\n        wait until <key (down arrow v) pressed?>\n        set [key down v] to [0]\n        hide\n        set [game over v] to [1]\n        wait until <[1] = [0]>\n    end\nend\n\npoint in direction (90)\n\nset [key down v] to [13]\n\nset [eyepatch v] to [0]\n\nset [surprise music v] to [1]\n\nwait (0.25) seconds\nhide\n\nwait (0.5) seconds\n\nplay sound [Evil Laugh v] until done\n\nwait (0.3) seconds\n\nset size to (100) %\n\nwait until <key (down arrow v) pressed?>\n\nswitch costume to (costume21 v)\nstart sound [Thud v]\nstart sound [Clink v]\nrepeat (5)\n    go to x: (pick random (-146) to (-138)) y: (pick random (-74) to (-66))\n    wait (0.01) seconds\n    go to x: (-142) y: (-70)\n    wait (0.01) seconds\nend\n\ngo to x: (-159) y: (-45)\n\nrepeat (5)\n    go to x: (pick random (-163) to (-155)) y: (pick random (-49) to (-41))\n    wait (0.01) seconds\n    go to x: (-159) y: (-45)\n    wait (0.01) seconds\nend\n\nswitch costume to (costume26 v)\nstart sound [Thud v]\nstart sound [Clink v]\n\nwait (0.5) seconds\n\nset [key down v] to [21]\n\nwait (0.01) seconds\ngo to x: (0) y: (140)\nwait (0.01) seconds\n\ngo to x: (10) y: (10)\n\nswitch costume to (costume26 v)\nshow\nwait (1) seconds\nset [key down v] to [24]\nwait until <key (down arrow v) pressed?>\nset [key down v] to [0]\nhide\n\nwait (0.4) seconds\nswitch costume to (costume29 v)\nstart sound [Thud v]\nstart sound [Clink v]\nstart sound [Sword v]\nset [p fade in v] to [-1]\nrepeat (5)\n    go to x: (pick random (41) to (49)) y: (pick random (-94) to (-86))\n    wait (0.01) seconds\n    go to x: (45) y: (-90)\n    wait (0.01) seconds\nend\nwait (0.5) seconds\n\nwait (0.5) seconds\n\ngo to x: (45) y: (-90)\nswitch costume to (costume28 v)\nshow\nwait (0.4) seconds\nswitch costume to (costume29 v)\nstart sound [Thud v]\nstart sound [Clink v]\nstart sound [Sword v]\nstart sound [Evil Laugh v]\nset [p fade in v] to [-1]\nrepeat (5)\n    go to x: (pick random (41) to (49)) y: (pick random (-94) to (-86))\n    wait (0.01) seconds\n    go to x: (45) y: (-90)\n    wait (0.01) seconds\nend\nwait (0.5) seconds\nhide\ngo to x: (-45) y: (-85)\nswitch costume to (costume30 v)\nshow\nwait (4) seconds\n\ngo to x: (30) y: (-70)\nswitch costume to (costume19 v)\n\n@Flash\n\nwhen flag clicked\ngo to x: (0) y: (0)\nswitch costume to (costume1 v)\nset [ghost v] effect to (100)\nhide\nforever\n    go to [front v] layer\nend\n\nwhen flag clicked\nforever\n    if <<(Cutscene) = [1]> and <(Room#) = [0]>> then\n        if <(BP Fade in) = [-1]> then\n            switch costume to (costume1 v)\n            show\n            set [ghost v] effect to (100)\n            wait (0.05) seconds\n            set [ghost v] effect to (50)\n            wait (0.05) seconds\n            set [ghost v] effect to (15)\n            wait (0.05) seconds\n            set [ghost v] effect to (5)\n            wait (0.05) seconds\n            set [ghost v] effect to (0)\n            set [steal balloons v] to [1]\n            wait until <(Steal Balloons) = [0]>\n            wait (0.1) seconds\n            set [ghost v] effect to (100)\n            hide\n            set [bp fade in v] to [0]\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <<(Cutscene) = [1]> and <(Room#) = [6]>> then\n        if <(BP Fade In 2) = [-1]> then\n            switch costume to (costume1 v)\n            show\n            set [ghost v] effect to (100)\n            wait (0.05) seconds\n            set [ghost v] effect to (50)\n            wait (0.05) seconds\n            set [ghost v] effect to (15)\n            wait (0.05) seconds\n            set [ghost v] effect to (5)\n            wait (0.05) seconds\n            set [ghost v] effect to (0)\n            set [eyepatch v] to [1]\n            wait (0.1) seconds\n            set [ghost v] effect to (100)\n            hide\n            set [bp fade in 2 v] to [0]\n        end\n    end\nend\n\nwhen flag clicked\nset [balloons! v] to [0]\nforever\n    if <<(Cutscene) = [1]> and <(Room#) = [6]>> then\n        if <(P Fade In) = [-1]> then\n            switch costume to (costume1 v)\n            show\n            set [ghost v] effect to (100)\n            wait (0.05) seconds\n            set [ghost v] effect to (50)\n            wait (0.05) seconds\n            set [ghost v] effect to (15)\n            wait (0.05) seconds\n            set [ghost v] effect to (5)\n            wait (0.05) seconds\n            set [ghost v] effect to (0)\n            set [balloons! v] to [1]\n            wait (0.1) seconds\n            set [ghost v] effect to (100)\n            hide\n            set [p fade in v] to [0]\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Game Over) = [1]> then\n        switch costume to (costume2 v)\n        set [ghost v] effect to (100)\n        show\n        repeat (200)\n            change [ghost v] effect by (-0.5)\n        end\n        set [ghost v] effect to (0)\n        stop [this script v]\n    end\nend\n\n@Down Arrow\n\nwhen flag clicked\nforever\n    if <(Key Down) = [1]> then\n        go to x: (138) y: (-137)\n    end\n    if <(Key Down) = [2]> then\n        go to x: (128) y: (-139)\n    end\n    if <(Key Down) = [3]> then\n        go to x: (138) y: (-105)\n    end\n    if <(Key Down) = [4]> then\n        go to x: (106) y: (-139)\n    end\n    if <(Key Down) = [5]> then\n        go to x: (-109) y: (-100)\n    end\n    if <(Key Down) = [6]> then\n        go to x: (128) y: (108)\n    end\n    if <(Key Down) = [7]> then\n        go to x: (145) y: (84)\n    end\n    if <(Key Down) = [8]> then\n        go to x: (-65) y: (-102)\n    end\n    if <(Key Down) = [9]> then\n        go to x: (110) y: (146)\n    end\n    if <(Key Down) = [10]> then\n        go to x: (120) y: (93)\n    end\nend\n\nwhen flag clicked\nset [key down v] to [0]\nforever\n    if <(Key Down) > [0]> then\n        show\n    else\n        if <<<(Room#) = [0]> and <(Dessie X) < [-192]>> and <(Using Door!) = [0]>> then\n            go to x: (-214) y: (-85)\n            show\n        else\n            hide\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    switch costume to (costume1 v)\n    wait (0.4) seconds\n    switch costume to (costume3 v)\n    wait (0.4) seconds\nend\n\nwhen flag clicked\nforever\n    if <(Key Down) = [11]> then\n        set size to (100) %\n    else\n        set size to (60) %\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Key Down) = [11]> then\n        go to x: (180) y: (-96)\n    end\n    if <(Key Down) = [12]> then\n        go to x: (-85) y: (-118)\n    end\n    if <(Key Down) = [13]> then\n        go to x: (50) y: (-75)\n    end\n    if <(Key Down) = [14]> then\n        go to x: (157) y: (-95)\n    end\n    if <(Key Down) = [15]> then\n        go to x: (10) y: (-79)\n    end\n    if <(Key Down) = [16]> then\n        go to x: (43) y: (-77)\n    end\n    if <(Key Down) = [17]> then\n        go to x: (-70) y: (-84)\n    end\n    if <(Key Down) = [18]> then\n        go to x: (-70) y: (-87)\n    end\n    if <(Key Down) = [19]> then\n        go to x: (-88) y: (-90)\n    end\n    if <(Key Down) = [20]> then\n        go to x: (170) y: (-97)\n    end\n    if <(Key Down) = [21]> then\n        go to x: (-77) y: (-95)\n    end\n    if <(Key Down) = [22]> then\n        go to x: (75) y: (-76)\n    end\n    if <(Key Down) = [23]> then\n        go to x: (-60) y: (-92)\n    end\n    if <(Key Down) = [24]> then\n        go to x: (73) y: (-73)\n    end\n    if <(Key Down) = [25]> then\n        go to x: (145) y: (-95)\n    end\n    if <(Key Down) = [26]> then\n        go to x: (60) y: (-80)\n    end\nend\n\nshow\n\n@Gates\n\nwhen flag clicked\ngo to x: (-105) y: (135)\nforever\n    if <not <[balloons gotten v] contains [DPink]?>> then\n        if <not <[balloons gotten v] contains [LBlue]?>> then\n            if <not <[balloons gotten v] contains [Purple]?>> then\n                if <not <[balloons gotten v] contains [LYellow]?>> then\n                    switch costume to (gates v)\n                end\n                if <[balloons gotten v] contains [LYellow]?> then\n                    switch costume to (gates4 v)\n                end\n            end\n            if <[balloons gotten v] contains [Purple]?> then\n                if <not <[balloons gotten v] contains [LYellow]?>> then\n                    switch costume to (gates3 v)\n                end\n                if <[balloons gotten v] contains [LYellow]?> then\n                    switch costume to (gates6 v)\n                end\n            end\n        end\n        if <[balloons gotten v] contains [LBlue]?> then\n            if <not <[balloons gotten v] contains [Purple]?>> then\n                if <not <[balloons gotten v] contains [LYellow]?>> then\n                    switch costume to (gates2 v)\n                end\n                if <[balloons gotten v] contains [LYellow]?> then\n                    switch costume to (gates7 v)\n                end\n            end\n            if <[balloons gotten v] contains [Purple]?> then\n                if <not <[balloons gotten v] contains [LYellow]?>> then\n                    switch costume to (gates5 v)\n                end\n                if <[balloons gotten v] contains [LYellow]?> then\n                    switch costume to (gates11 v)\n                end\n            end\n        end\n    end\n    if <[balloons gotten v] contains [DPink]?> then\n        if <not <[balloons gotten v] contains [LBlue]?>> then\n            if <not <[balloons gotten v] contains [Purple]?>> then\n                if <not <[balloons gotten v] contains [LYellow]?>> then\n                    switch costume to (gates8 v)\n                end\n                if <[balloons gotten v] contains [LYellow]?> then\n                    switch costume to (gates10 v)\n                end\n            end\n            if <[balloons gotten v] contains [Purple]?> then\n                if <not <[balloons gotten v] contains [LYellow]?>> then\n                    switch costume to (gates9 v)\n                end\n                if <[balloons gotten v] contains [LYellow]?> then\n                    switch costume to (gates12 v)\n                end\n            end\n        end\n        if <[balloons gotten v] contains [LBlue]?> then\n            if <not <[balloons gotten v] contains [Purple]?>> then\n                if <not <[balloons gotten v] contains [LYellow]?>> then\n                    switch costume to (gates15 v)\n                end\n                if <[balloons gotten v] contains [LYellow]?> then\n                    switch costume to (gates13 v)\n                end\n            end\n            if <[balloons gotten v] contains [Purple]?> then\n                if <not <[balloons gotten v] contains [LYellow]?>> then\n                    switch costume to (gates14 v)\n                end\n                if <[balloons gotten v] contains [LYellow]?> then\n                    switch costume to (gates16 v)\n                end\n            end\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Room#) = [4]> then\n        show\n    else\n        hide\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Using Door!) = [1]> then\n        repeat (10)\n            change [brightness v] effect by (-10)\n        end\n        set [brightness v] effect to (-100)\n        wait until <(Using Door!) = [4]>\n    end\n    if <(Using Door!) = [5]> then\n        wait (0.1) seconds\n        repeat (100)\n            change [brightness v] effect by (1)\n        end\n        set [brightness v] effect to (0)\n        wait until <(Using Door!) = [0]>\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Using Door!) = [-1]> then\n        repeat (10)\n            change [brightness v] effect by (-10)\n        end\n        set [brightness v] effect to (-100)\n        wait until <(Using Door!) = [-4]>\n    end\n    if <(Using Door!) = [-5]> then\n        wait (0.1) seconds\n        repeat (100)\n            change [brightness v] effect by (1)\n        end\n        set [brightness v] effect to (0)\n        wait until <(Using Door!) = [0]>\n    end\nend\n\n@Keys\n\nwhen flag clicked\nhide\nforever\n    wait until <<(Cutscene) = [1]> and <(Room#) = [0]>>\n    wait until <<(Cutscene) = [0]> and <(Room#) = [0]>>\n    show\n    repeat until <not <(Using Door!) = [0]>>\n        go to x: (0) y: (-80)\n        go [backward v] (1) layers\n        if <<<not <key (up arrow v) pressed?>> and <not <key (down arrow v) pressed?>>> and <<not <key (left arrow v) pressed?>> and <not <key (right arrow v) pressed?>>>> then\n            switch costume to (keys v)\n        end\n        if <key (left arrow v) pressed?> then\n            switch costume to (left v)\n        end\n        if <key (right arrow v) pressed?> then\n            switch costume to (right v)\n        end\n        if <key (up arrow v) pressed?> then\n            switch costume to (up v)\n        end\n        if <key (down arrow v) pressed?> then\n            switch costume to (down v)\n        end\n    end\n    hide\n    stop [this script v]\nend\n\n@Sprite1\n\nwhen flag clicked\nwait until <(BP Health) = [0]>\ngo to x: (0) y: (0)\ngo [backward v] (999) layers\nswitch costume to (costume2 v)\nset [ghost v] effect to (100)\nshow\nrepeat (50)\n    change [ghost v] effect by (-2)\nend\nwait until <(Room#) = [6]>\nhide\n\nset [ghost v] effect to (0)\n\nwhen flag clicked\nforever\n    if <(Using Door!) = [-1]> then\n        repeat (10)\n            change [brightness v] effect by (-10)\n        end\n        set [brightness v] effect to (-100)\n        wait until <(Using Door!) = [-4]>\n    end\n    if <(Using Door!) = [-5]> then\n        wait (0.1) seconds\n        repeat (100)\n            change [brightness v] effect by (1)\n        end\n        set [brightness v] effect to (0)\n        wait until <(Using Door!) = [0]>\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Using Door!) = [1]> then\n        repeat (10)\n            change [brightness v] effect by (-10)\n        end\n        set [brightness v] effect to (-100)\n        wait until <(Using Door!) = [4]>\n    end\n    if <(Using Door!) = [5]> then\n        wait (0.1) seconds\n        repeat (100)\n            change [brightness v] effect by (1)\n        end\n        set [brightness v] effect to (0)\n        wait until <(Using Door!) = [0]>\n    end\nend\n\nwhen flag clicked\nswitch costume to (costume1 v)\ngo to x: (215) y: (160)\nhide\nforever\n    if <(Room#) = [5]> then\n        show\n        go to [front v] layer\n        set [ghost v] effect to (0)\n        wait until <(BP Fade in) = [2]>\n        set [ghost v] effect to (0)\n        repeat (50)\n            change [ghost v] effect by (2)\n        end\n        set [ghost v] effect to (100)\n        hide\n        stop [this script v]\n    end\nend\n\n\n\nwhen flag clicked\nforever\n    if <(Room#) = [6]> then\n        hide\n        switch costume to (costume1 v)\n        go to [front v] layer\n        set [ghost v] effect to (0)\n        wait until <(Surprise Music) = [1]>\n        set [ghost v] effect to (0)\n        repeat (50)\n            change [ghost v] effect by (2)\n        end\n        set [ghost v] effect to (100)\n        hide\n        stop [this script v]\n    end\nend\n\n@Bomb1\n\nwhen I start as a clone\nforever\n    if <(Using Door!) = [1]> then\n        repeat (10)\n            change [brightness v] effect by (-10)\n        end\n        set [brightness v] effect to (-100)\n        wait until <(Using Door!) = [4]>\n        delete this clone\n    end\n    if <(Using Door!) = [5]> then\n        wait (0.1) seconds\n        repeat (100)\n            change [brightness v] effect by (1)\n        end\n        set [brightness v] effect to (0)\n        wait until <(Using Door!) = [0]>\n    end\nend\n\nwhen flag clicked\n\nchange x by (-10)\n\nrepeat (-5)\n    change x by (-3)\n    turn left (15) degrees\nend\n\nif  then\nend\n\nset [bomb explode v] to [0]\n\nset [bomb explode v] to [0]\n\nwait (0.2) seconds\n\nwhen I start as a clone\n\ncreate clone of (_myself_ v)\n\nset [bomb 1 go v] to [1]\n\nwhen I start as a clone\nforever\n    if <not <(Room#) = [5]>> then\n        delete this clone\n    end\nend\n\nwhen flag clicked\nset [bomb 1 go v] to [0]\ngo to x: (100) y: (-88)\nswitch costume to (costume2 v)\n\nshow\n\nrepeat (173)\n    change x by (-3)\n    turn left (15) degrees\n    if <(x position) < [-236]> then\n        delete this clone\n    end\n    if <touching (dessie v)?> then\n        wait (0.1) seconds\n        stop [this script v]\n    end\nend\n\nwhen flag clicked\nforever\n    if <<(Room#) = [5]> and <(Boss Battle) = [1]>> then\n        if <(Bomb 1 Go) = [1]> then\n            create clone of (_myself_ v)\n        end\n        set [bomb 1 go v] to [0]\n    end\nend\n\nwhen I start as a clone\nwait until <touching (dessie v)?>\nif <<(Bomb Explode) = [0]> and <(Dessie X) < [75]>> then\n    set [bomb x v] to (x position)\n    set [bomb y v] to (y position)\n    set [bomb explode v] to [1]\n    hide\nend\n\nwhen I start as a clone\nforever\n    if <(Using Door!) = [-1]> then\n        repeat (10)\n            change [brightness v] effect by (-10)\n        end\n        set [brightness v] effect to (-100)\n        wait until <(Using Door!) = [-4]>\n        delete this clone\n    end\n    if <(Using Door!) = [-5]> then\n        wait (0.1) seconds\n        repeat (100)\n            change [brightness v] effect by (1)\n        end\n        set [brightness v] effect to (0)\n        wait until <(Using Door!) = [0]>\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Room#) = [5]> then\n        show\n        go [backward v] (1) layers\n    else\n        hide\n    end\nend\n\nwhen I start as a clone\nforever\n    switch costume to (costume1 v)\n    wait (0.02) seconds\n    switch costume to (costume3 v)\n    wait (0.02) seconds\nend\n\nwhen I start as a clone\nforever\n    if <((100) - (x position)) > (Bomb 1 Spacer)> then\n        set [bomb 1 go v] to [1]\n        stop [this script v]\n    end\nend\n\ndelete this clone\n\nwhen I start as a clone\nset [bomb 1 spacer v] to (pick random (pick random (30) to (50)) to (pick random (95) to (200)))\nforever\n    change x by (-4)\n    turn left (10) degrees\n    if <(x position) < [-178]> then\n        set [bomb 2 go v] to [1]\n        delete this clone\n    end\nend\n\n@Bomb2\n\nwhen I start as a clone\nforever\n    if <(Using Door!) = [1]> then\n        repeat (10)\n            change [brightness v] effect by (-10)\n        end\n        set [brightness v] effect to (-100)\n        wait until <(Using Door!) = [4]>\n        delete this clone\n    end\n    if <(Using Door!) = [5]> then\n        wait (0.1) seconds\n        repeat (100)\n            change [brightness v] effect by (1)\n        end\n        set [brightness v] effect to (0)\n        wait until <(Using Door!) = [0]>\n    end\nend\n\nwhen flag clicked\n\nchange x by (-10)\n\nrepeat (-5)\n    change x by (-3)\n    turn left (15) degrees\nend\n\nif  then\nend\n\nset [bomb explode v] to [0]\n\nset [bomb 2 go v] to [0]\n\nwait (0.2) seconds\n\nwhen I start as a clone\n\ncreate clone of (_myself_ v)\n\nwhen flag clicked\nset [bomb 2 go v] to [0]\ngo to x: (160) y: (22)\nswitch costume to (costume2 v)\n\nrepeat (173)\n    change x by (-3)\n    turn left (15) degrees\n    if <(x position) < [-236]> then\n        delete this clone\n    end\n    if <touching (dessie v)?> then\n        wait (0.1) seconds\n        stop [this script v]\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Room#) = [5]> then\n        if <(Bomb 2 Go) = [1]> then\n            create clone of (_myself_ v)\n        end\n        set [bomb 2 go v] to [0]\n    end\nend\n\nwhen I start as a clone\nforever\n    if <(Using Door!) = [-1]> then\n        repeat (10)\n            change [brightness v] effect by (-10)\n        end\n        set [brightness v] effect to (-100)\n        wait until <(Using Door!) = [-4]>\n        delete this clone\n    end\n    if <(Using Door!) = [-5]> then\n        wait (0.1) seconds\n        repeat (100)\n            change [brightness v] effect by (1)\n        end\n        set [brightness v] effect to (0)\n        wait until <(Using Door!) = [0]>\n    end\nend\n\nset [bomb 2 go v] to [1]\ndelete this clone\n\nwhen I start as a clone\nforever\n    if <(x position) > [-62]> then\n        change x by (-4)\n        turn left (10) degrees\n    end\n    if <(x position) < [-62]> then\n        change x by (-4)\n        change y by ((-0.25) * ((-62) - (x position)))\n        turn left (10) degrees\n    end\n    if <(x position) < [-92]> then\n        set [bomb 3 go v] to [1]\n        delete this clone\n    end\n    if <(y position) < [-10]> then\n        set [bomb 3 go v] to [1]\n        delete this clone\n    end\nend\n\nwhen I start as a clone\nforever\n    if <not <(Room#) = [5]>> then\n        delete this clone\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Room#) = [5]> then\n        show\n        go [backward v] (1) layers\n    else\n        hide\n    end\nend\n\nwhen I start as a clone\nforever\n    switch costume to (costume1 v)\n    wait (0.02) seconds\n    switch costume to (costume3 v)\n    wait (0.02) seconds\nend\n\nshow\n\ndelete this clone\n\nwhen I start as a clone\nwait until <touching (dessie v)?>\nif <<(Bomb Explode) = [0]> and <(Dessie X) < [125]>> then\n    set [bomb x v] to (x position)\n    set [bomb y v] to (y position)\n    set [bomb explode v] to [1]\n    hide\nend\n\n@Bomb3\n\nwhen I start as a clone\nforever\n    if <(Using Door!) = [1]> then\n        repeat (10)\n            change [brightness v] effect by (-10)\n        end\n        set [brightness v] effect to (-100)\n        wait until <(Using Door!) = [4]>\n        delete this clone\n    end\n    if <(Using Door!) = [5]> then\n        wait (0.1) seconds\n        repeat (100)\n            change [brightness v] effect by (1)\n        end\n        set [brightness v] effect to (0)\n        wait until <(Using Door!) = [0]>\n    end\nend\n\nwhen flag clicked\n\nchange x by (-10)\n\nrepeat (-5)\n    change x by (-3)\nend\n\nif  then\nend\n\nset [bomb explode v] to [0]\n\nset [bomb 2 go v] to [0]\n\nwait (0.2) seconds\n\nwhen I start as a clone\n\ncreate clone of (_myself_ v)\n\nwhen flag clicked\nset [bomb 3 go v] to [0]\ngo to x: (-80) y: (150)\nswitch costume to (costume2 v)\n\nrepeat (173)\n    change x by (-3)\n    turn left (15) degrees\n    if <(x position) < [-236]> then\n        delete this clone\n    end\n    if <touching (dessie v)?> then\n        wait (0.1) seconds\n        stop [this script v]\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Room#) = [5]> then\n        if <(Bomb 3 Go) = [1]> then\n            create clone of (_myself_ v)\n        end\n        set [bomb 3 go v] to [0]\n    end\nend\n\nwhen I start as a clone\nforever\n    if <(Using Door!) = [-1]> then\n        repeat (10)\n            change [brightness v] effect by (-10)\n        end\n        set [brightness v] effect to (-100)\n        wait until <(Using Door!) = [-4]>\n        delete this clone\n    end\n    if <(Using Door!) = [-5]> then\n        wait (0.1) seconds\n        repeat (100)\n            change [brightness v] effect by (1)\n        end\n        set [brightness v] effect to (0)\n        wait until <(Using Door!) = [0]>\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Room#) = [5]> then\n        show\n        go [backward v] (1) layers\n    else\n        hide\n    end\nend\n\ndelete this clone\n\nwhen I start as a clone\nwait until <touching (dessie v)?>\nif <<(Bomb Explode) = [0]> and <(Dessie X) < [130]>> then\n    set [bomb x v] to (x position)\n    set [bomb y v] to (y position)\n    set [bomb explode v] to [1]\n    hide\nend\n\nwhen I start as a clone\nforever\n    if <not <(Room#) = [5]>> then\n        delete this clone\n    end\nend\n\nshow\n\nwhen I start as a clone\nforever\n    switch costume to (costume1 v)\n    wait (0.02) seconds\n    switch costume to (costume3 v)\n    wait (0.02) seconds\nend\n\nwhen I start as a clone\nforever\n    change y by (((-0.1) * ((176) - (y position))) - (2))\n    turn left (15) degrees\n    if <(y position) < [50]> then\n        set [bomb explode 2 v] to [1]\n        delete this clone\n    end\nend\n\ndelete this clone\n\nset [bomb 2 go v] to [1]\n\n@Bomb Explosion\n\nwhen I start as a clone\nswitch costume to (pick random (1) to (2))\nset size to (pick random (70) to (175)) %\nshow\nrepeat (10)\n    change size by (pick random (-2) to (-10))\n    set [brightness v] effect to (pick random (-50) to (50))\nend\ndelete this clone\n\nwhen flag clicked\nforever\n    hide\n    switch costume to (costume4 v)\nend\n\ngo to x: (10) y: (10)\n\nwhen flag clicked\nset [bomb explode v] to [0]\nforever\n    if <(Bomb Explode) = [1]> then\n        start sound [259962__thehorriblejoke__8-bit-explosion v]\n        repeat (10)\n            go to x: ((Bomb X) + (pick random (-5) to (5))) y: ((Bomb Y) + (pick random (-5) to (5)))\n            create clone of (_myself_ v)\n            go to x: (Bomb X) y: (Bomb Y)\n            wait (0.002) seconds\n        end\n        wait until <(Bomb Explode) = [0]>\n    end\nend\n\n@Sprite2\n\nwhen flag clicked\nforever\n    switch costume to (costume2 v)\n    wait (0.115) seconds\n    switch costume to (costume1 v)\n    wait (0.115) seconds\n    switch costume to (costume2 v)\n    wait (0.115) seconds\n    switch costume to (costume3 v)\n    wait (0.115) seconds\nend\n\nwhen flag clicked\nset [brightness v] effect to (-100)\nforever\n    if <(P Fade In) = [1]> then\n        set [brightness v] effect to (-100)\n        repeat (50)\n            change [brightness v] effect by (2)\n        end\n        set [brightness v] effect to (0)\n        set [p fade in v] to [0]\n    end\nend\n\nset [brightness v] effect to (0)\n\nwhen flag clicked\ngo to x: (90) y: (-153)\nforever\n    if <(Room#) = [6]> then\n        show\n    else\n        hide\n    end\nend\n\n@Bomb Explosion2\n\nwhen flag clicked\ngo to x: (-82) y: (57)\nset [bomb explode 2 v] to [0]\nforever\n    if <(Bomb Explode 2) = [1]> then\n        start sound [259962__thehorriblejoke__8-bit-explosion v]\n        repeat (10)\n            if <(Bomb Explode 2) = [1]> then\n                go to x: ((-82) + (pick random (-5) to (5))) y: ((57) + (pick random (-5) to (5)))\n                create clone of (_myself_ v)\n                go to x: (-82) y: (57)\n                wait (0.002) seconds\n            end\n        end\n        set [bomb explode 2 v] to [0]\n    end\nend\n\nwhen I start as a clone\nswitch costume to (pick random (1) to (2))\nset size to (pick random (70) to (175)) %\nshow\nrepeat (10)\n    change size by (pick random (-2) to (-10))\n    set [brightness v] effect to (pick random (-50) to (50))\nend\ndelete this clone\n\nwhen flag clicked\nforever\n    hide\n    switch costume to (costume4 v)\nend\n\nwait until \n\n@Sprite3\n\nwhen I start as a clone\nshow\ngo to x: (pick random (-240) to (240)) y: (-180)\nswitch costume to (pick random (1) to (7))\nset [color v] effect to (pick random (1) to (200))\nset size to (pick random (25) to (250)) %\nforever\n    if <(size) > [99]> then\n        go to [front v] layer\n    end\n    if <<(size) < [100]> and <(Game Over) = [0]>> then\n        go [backward v] (10) layers\n    end\n    if <<(size) < [100]> and <(Game Over) = [1]>> then\n        go to [front v] layer\n    end\n    change y by ((size) / (200))\n    if <(BALLOONS!) = [0]> then\n        delete this clone\n    end\nend\n\nwhen flag clicked\nforever\n    hide\n    go [backward v] (10) layers\n    if <(BALLOONS!) = [1]> then\n        wait (0.25) seconds\n        create clone of (_myself_ v)\n    end\nend\n\nset [balloons! v] to [0]\n\nwhen I start as a clone\nforever\n    if <<touching (_edge_ v)?> and <(y position) > [0]>> then\n        set [ghost v] effect to (0)\n        repeat (25)\n            change [ghost v] effect by (4)\n        end\n        set [ghost v] effect to (100)\n        delete this clone\n    end\nend\n\nstop [this script v]\n\nwhen I start as a clone\nif <<(size) > [99]> and <(Game Over) = [0]>> then\n    set [ghost v] effect to (100)\n    repeat (25)\n        change [ghost v] effect by (-4)\n    end\n    set [ghost v] effect to (0)\n    stop [this script v]\nend\n\nwhen I start as a clone\nif <(Game Over) = [1]> then\n    set [ghost v] effect to (100)\n    repeat (25)\n        change [ghost v] effect by (-4)\n    end\n    set [ghost v] effect to (0)\n    stop [this script v]\nend\n\n@Sprite4\n\nwhen flag clicked\nshow\nset [ghost v] effect to (0)\ngo to x: (0) y: (0)\nrepeat (24)\n    change [ghost v] effect by (4)\nend\nforever\n    go to [front v] layer\n    show\n    set [ghost v] effect to (99.9)\nend\n\n