Geo || A Platformer 

Instructions: Help Steve find his way through the unknown lands! \n\n< < < How to Play > > >\n<> WASD or Arrow Keys to move!\n<> Run against a wall and hold jump to wall jump!

@Stage\n\nwhen I receive [menutick v]\nswitch backdrop to (mainemenu2 v)\n\nwhen I receive [maptick v]\nswitch backdrop to (1 v)\n\nwhen I receive [gametick v]\nif <<(Level) = [4]> or <(Level) = [11]>> then\n    switch backdrop to (4 v)\nelse\n    if <(Level) = [6]> then\n        switch backdrop to (6 v)\n    else\n        if <(Level) = [9]> then\n            switch backdrop to (9 v)\n        else\n            if <<(Level) = [10]> or <(Level) = [12]>> then\n                switch backdrop to (10 v)\n            else\n                switch backdrop to (1 v)\n            end\n        end\n    end\nend\n\nwhen I receive [flagclicked v]\nswitch backdrop to (mainmenu1 v)\nwait (2.6) seconds\nswitch backdrop to (mainemenu2 v)\nset [brightness v] effect to (25)\nrepeat (50)\n    change [brightness v] effect by (-0.5)\nend\n\nwhen I receive [mapchange v]\nset volume to (75) %\nforever\n    wait (0.5) seconds\n    if <<(Dead) = [0]> and <<(PassedGoal) = [0]> and <(LoadingLevel) = [0]>>> then\n        if <(Menu) = [Map]> then\n            if <(World) = [1]> then\n                wait until <(AllowMapChanges) = [1]>\n                play sound [06 World 1 v] until done\n            else\n                wait until <(AllowMapChanges) = [1]>\n                play sound [07 World 2 v] until done\n            end\n        else\n            if <(Menu) = [Game]> then\n                if <(Underground) = [1]> then\n                    if <<(Level) = [8]> or <<(Level) = [4]> or <<(Level) = [11]> or <(Level) = [14]>>>> then\n                        play sound [23 Boss Battle v] until done\n                    else\n                        if <<(Level) = [3]> or <(Level) = [10]>> then\n                            play sound [20 Water Level v] until done\n                        else\n                            play sound [19 Underground Level v] until done\n                        end\n                    end\n                else\n                    if <(ClearedLag?) = [0]> then\n                        wait (3.6) seconds\n                    else\n                        wait (1.6) seconds\n                    end\n                    if <<(Level) = [1]> or <<(Level) = [3]> or <<(Level) = [7]> or <<(Level) = [10]> or <(Level) = [13]>>>>> then\n                        play sound [17 Normal Level 1 v] until done\n                    end\n                    if <<(Level) = [2]> or <<(Level) = [6]> or <<(Level) = [9]> or <(Level) = [12]>>>> then\n                        play sound [18 Normal Level 2 v] until done\n                    end\n                    if <(Level) = [5]> then\n                        play sound [55 Super Mario World Ghost House v] until done\n                    end\n                    if <<(Level) = [8]> or <(Level) = [14]>> then\n                        play sound [22 Airship v] until done\n                    end\n                    if <<(Level) = [4]> or <(Level) = [11]>> then\n                        play sound [21 Fortress v] until done\n                    end\n                end\n            end\n        end\n    end\nend\n\n@Cheats\n\nset [powerupcollected v] to [Frog]\nbroadcast (Powerup v)\n\nset [powerupcollected v] to [Tanooki]\nbroadcast (Powerup v)\n\nset [powerupcollected v] to [Fire]\nbroadcast (Powerup v)\n\nset [levelscompleted v] to [14]\n\nforever\n    set [allowplayerdamage v] to [0]\nend\n\nhide variable [fps v]\n\nshow variable [fps v]\n\nset [lives v] to [100]\n\n@Menu\n\nwhen flag clicked\nset [level v] to [0]\nbroadcast (StartGame v)\nset [clearedlag? v] to [0]\nset [allowmapchanges v] to [0]\nhide\nbroadcast (HideGame v)\nbroadcast (HideMap v)\nwait (3) seconds\nbroadcast (FlagClicked v)\n\nwhen I receive [menutick v]\nshow\n\nwhen I receive [hidemenu v]\nhide\n\nwhen I receive [flagclicked v]\nset [coins v] to [0]\nset volume to (100) %\nset [brightness v] effect to (-100)\nstart sound [04 Super Mario Bros v]\nhide\nwait (1) seconds\nshow\ngo to x: (-29) y: (500)\nset size to (350) %\nrepeat (10)\n    change [brightness v] effect by (10)\n    set y to ((((y position) - (60)) / (1.1)) + (60))\nend\nrepeat (38)\n    set y to ((((y position) - (60)) / (1.1)) + (60))\nend\nset [brightness v] effect to (0)\n\n@Player\n\nif <(AllowPlayerMovement) = [1]> then\n    switch costume to (playercentre v)\n    set [sliding v] to [0]\n    set [slidingfunction v] to [0]\n    set [crouching v] to [0]\n    change [tanookicooldown v] by ((-1) / (30))\n    change [statueswapcooldown v] by ((-1) / (10))\n    if <touching (water v)?> then\n        if <(Powerup) = [Frog]> then\n            if <<key (w v) pressed?> or <key (up arrow v) pressed?>> then\n                change [yvel v] by (1.8)\n            end\n            if <<key (s v) pressed?> or <key (down arrow v) pressed?>> then\n                change [yvel v] by (-1.8)\n            end\n            if <<key (d v) pressed?> or <key (right arrow v) pressed?>> then\n                change [xvel v] by (1.5)\n                point in direction (90)\n            end\n            if <<key (a v) pressed?> or <key (left arrow v) pressed?>> then\n                change [xvel v] by (-1.5)\n                point in direction (-90)\n            end\n            if <(YVel) > [0]> then\n                switch costume to (frogswimmingtop v)\n            else\n                switch costume to (allbottom v)\n            end\n            change y by (YVel)\n            if <<touching (map v)?> or <<<touching (semisolids v)?> or <touching (platforms v)?>> and <not <(YVel) > [0]>>>> then\n                change y by ((YVel) * (-1))\n                if <(YVel) > [0]> then\n                    FindCeilingV2\n                    set [yvel v] to [0]\n                else\n                    FindFloor\n                    set [yvel v] to [0]\n                end\n            end\n            switch costume to (frogswimmingsides v)\n            change x by (XVel)\n            YSmoothing\n            if <touching (map v)?> then\n                set [playerx v] to ((x position) - (MapX))\n                FindXPosition\n                set [xvel v] to [0]\n            end\n            if <([abs v] of (XVel) ) > [4.499999]> then\n                set [xvel v] to ((XVel) / (1.3))\n                set [yvel v] to ((YVel) / (1.3))\n            else\n                set [xvel v] to ((XVel) / (1.5))\n                set [yvel v] to ((YVel) / (1.5))\n            end\n            set [playerx v] to ((x position) - (MapX))\n            set [playery v] to ((y position) - (MapY))\n        else\n            if <(YVel) > [-2.5]> then\n                change [yvel v] by (-0.41)\n            end\n            if <(YVel) < [-2.5]> then\n                set [yvel v] to [-2.5]\n            end\n            if <<<key (w v) pressed?> or <key (up arrow v) pressed?>> and <<(Statue) = [0]> and <<(YVel) < [-1.3]> or <(YVel) = [-0.41]>>>> then\n                if <not <(YVel) = [-1.41]>> then\n                    start sound [Swim v]\n                end\n                set [yvel v] to [6]\n            end\n            if <(YVel) > [0]> then\n                if <<(Powerup) = [None]> or <(Crouching) = [1]>> then\n                    switch costume to (nonetop v)\n                else\n                    switch costume to (bigtop v)\n                end\n            else\n                switch costume to (allbottom v)\n            end\n            change y by (YVel)\n            if <<touching (map v)?> or <<<touching (semisolids v)?> or <touching (platforms v)?>> and <not <(YVel) > [0]>>>> then\n                change y by ((YVel) * (-1))\n                if <(YVel) > [0]> then\n                    FindCeilingV2\n                    set [yvel v] to [-1]\n                else\n                    FindFloor\n                    if <<(Statue) = [0]> and <<key (s v) pressed?> or <key (down arrow v) pressed?>>> then\n                        set [crouching v] to [1]\n                    end\n                    set [yvel v] to [0]\n                end\n            end\n            if <<(Statue) = [0]> and <<(SlidingFunction) = [0]> and <(Crouching) = [0]>>> then\n                if <<<key (d v) pressed?> or <key (right arrow v) pressed?>> and <not <<key (a v) pressed?> or <key (left arrow v) pressed?>>>> then\n                    change [xvel v] by (2)\n                    point in direction (90)\n                    if <(YVel) = [0]> then\n                        if <([abs v] of (XVel) ) > [2]> then\n                            if <(XVel) > [0]> then\n                                set [xvel v] to [2]\n                            else\n                                set [xvel v] to [-2]\n                            end\n                        end\n                    else\n                        if <([abs v] of (XVel) ) > [4.5]> then\n                            if <(XVel) > [0]> then\n                                set [xvel v] to [4.5]\n                            else\n                                set [xvel v] to [-4.5]\n                            end\n                        end\n                    end\n                    if <(XVel) < [2]> then\n                        if <(YVel) = [0]> then\n                            change [xvel v] by (-1.9)\n                        else\n                            change [xvel v] by (-1.75)\n                        end\n                    end\n                end\n                if <<<key (a v) pressed?> or <key (left arrow v) pressed?>> and <not <<key (d v) pressed?> or <key (right arrow v) pressed?>>>> then\n                    change [xvel v] by (-2)\n                    point in direction (-90)\n                    if <(YVel) = [0]> then\n                        if <([abs v] of (XVel) ) > [2]> then\n                            if <(XVel) > [0]> then\n                                set [xvel v] to [2]\n                            else\n                                set [xvel v] to [-2]\n                            end\n                        end\n                    else\n                        if <([abs v] of (XVel) ) > [4.5]> then\n                            if <(XVel) > [0]> then\n                                set [xvel v] to [4.5]\n                            else\n                                set [xvel v] to [-4.5]\n                            end\n                        end\n                    end\n                    if <(XVel) > [-2]> then\n                        if <(YVel) = [0]> then\n                            change [xvel v] by (1.9)\n                        else\n                            change [xvel v] by (1.75)\n                        end\n                    end\n                end\n            end\n            if <<(Powerup) = [None]> or <(Crouching) = [1]>> then\n                switch costume to (nonesides v)\n            else\n                switch costume to (bigsides v)\n            end\n            if <<(Statue) = [0]> and <(SlidingFunction) = [0]>> then\n                change x by (XVel)\n                YSmoothing\n                if <touching (map v)?> then\n                    set [playerx v] to ((x position) - (MapX))\n                    FindXPosition\n                    set [xvel v] to [0]\n                end\n            end\n            set [xvel v] to ((XVel) / (1.05))\n            set [playerx v] to ((x position) - (MapX))\n            set [playery v] to ((y position) - (MapY))\n            if <<(Powerup) = [Fire]> and <(TanookiCooldown) < [0]>> then\n                if <key (space v) pressed?> then\n                    start sound [Fireball v]\n                    add ((((x position) + (((direction) / (90)) * (8))) - (MapX)) / (28)) to [fireballx v]\n                    add (((y position) - (MapY)) / (28)) to [firebally v]\n                    add (direction) to [fireballdir v]\n                    add [1] to [fireballtype v]\n                    add [0] to [fireballbounces v]\n                    set [tanookicooldown v] to [0.5]\n                end\n            end\n        end\n        switch costume to (playercentre v)\n        if <not <touching (water v)?>> then\n            if <<key (w v) pressed?> or <key (up arrow v) pressed?>> then\n                set [yvel v] to [12]\n                if <([abs v] of (XVel) ) > [1.5]> then\n                    set [xvel v] to ((direction) / (60))\n                end\n            end\n        end\n    else\n        if <(Powerup) = [Frog]> then\n            if <<<(YVel) > [-12]> and <(Statue) = [0]>> or <<(YVel) > [-16]> and <(Statue) = [1]>>> then\n                change [yvel v] by ((Gravity) / (3.2))\n                if <<(YVel) > [0]> and <not <<key (w v) pressed?> or <key (up arrow v) pressed?>>>> then\n                    set [yvel v] to ((YVel) / (1.3))\n                end\n            end\n            switch costume to (allbottom v)\n            change y by (Gravity)\n            if <<touching (map v)?> or <<<touching (semisolids v)?> or <touching (platforms v)?>> and <not <(YVel) > [0]>>>> then\n                change y by ((Gravity) * (-1))\n                set [yvel v] to [0]\n                if <<key (w v) pressed?> or <key (up arrow v) pressed?>> then\n                    start sound [Jump v]\n                    if <([abs v] of (XVel) ) > [2]> then\n                        set [yvel v] to [20]\n                    else\n                        set [yvel v] to [18]\n                    end\n                end\n                FindFloor\n            end\n            if <(YVel) > [0]> then\n                switch costume to (bigtop v)\n            else\n                switch costume to (allbottom v)\n            end\n            change y by (YVel)\n            if <<touching (map v)?> or <<<touching (semisolids v)?> or <touching (platforms v)?>> and <not <(YVel) > [0]>>>> then\n                if <(YVel) > [0]> then\n                    FindCeiling\n                    set [yvel v] to [3]\n                else\n                    change y by ((YVel) * (-1))\n                    FindFloor\n                    set [yvel v] to [0]\n                end\n            end\n            if <<(Statue) = [0]> and <<(SlidingFunction) = [0]> and <(Crouching) = [0]>>> then\n                if <<<key (d v) pressed?> or <key (right arrow v) pressed?>> and <not <<key (a v) pressed?> or <key (left arrow v) pressed?>>>> then\n                    change [xvel v] by (1)\n                    point in direction (90)\n                end\n                if <<<key (a v) pressed?> or <key (left arrow v) pressed?>> and <not <<key (d v) pressed?> or <key (right arrow v) pressed?>>>> then\n                    change [xvel v] by (-1)\n                    point in direction (-90)\n                end\n            end\n            switch costume to (bigsides v)\n            change x by (XVel)\n            YSmoothing\n            if <touching (map v)?> then\n                set [playerx v] to ((x position) - (MapX))\n                FindXPosition\n                set [xvel v] to [0]\n            end\n            if <<(Crouching) = [1]> or <(Sliding) = [1]>> then\n                set [xvel v] to ((XVel) / (1.1))\n            else\n                if <(YVel) = [0]> then\n                    set [xvel v] to ((XVel) / (1.2))\n                    if <(([floor v] of (((PlayerCostumeNo.) * (2.5)) mod (4)) ) + (1)) = [1]> then\n                        if <([abs v] of (XVel) ) > [1]> then\n                            if <(XVel) > [0]> then\n                                set [xvel v] to [1]\n                            else\n                                set [xvel v] to [-1]\n                            end\n                        end\n                    end\n                else\n                    set [xvel v] to ((XVel) / (1.15))\n                end\n            end\n            if <<<([abs v] of (XVel) ) > [4]> and <(TanookiFlying) = [1]>> and <<(YVel) = [-0.4]> and <<key (w v) pressed?> or <key (up arrow v) pressed?>>>> then\n                if <(XVel) > [0]> then\n                    set [xvel v] to [4]\n                else\n                    set [xvel v] to [-4]\n                end\n            end\n            set [playerx v] to ((x position) - (MapX))\n            set [playery v] to ((y position) - (MapY))\n        else\n            if <<<(YVel) > [-12]> and <(Statue) = [0]>> or <<(YVel) > [-16]> and <(Statue) = [1]>>> then\n                if <<(TanookiFlying) = [1]> and <(Statue) = [0]>> then\n                    if <(YVel) > [0]> then\n                        change [yvel v] by ((Gravity) / (3.4))\n                    else\n                        if <<key (w v) pressed?> or <key (up arrow v) pressed?>> then\n                            change [yvel v] by ((Gravity) / (6))\n                            if <(YVel) < [-0.4]> then\n                                set [yvel v] to [-0.4]\n                            end\n                        else\n                            change [yvel v] by ((Gravity) / (3.4))\n                        end\n                    end\n                else\n                    if <(Statue) = [1]> then\n                        change [yvel v] by ((Gravity) / (1))\n                    else\n                        change [yvel v] by ((Gravity) / (2.9))\n                        if <<(YVel) > [0]> and <not <<key (w v) pressed?> or <key (up arrow v) pressed?>>>> then\n                            set [yvel v] to ((YVel) / (1.3))\n                        end\n                    end\n                end\n            end\n            switch costume to (allbottom v)\n            if <<<(AllowTanookiFlightStart) = [1]> and <<(Powerup) = [Tanooki]> and <(Statue) = [0]>>> and <([abs v] of (XVel) ) > [2]>> then\n                if <<key (w v) pressed?> or <key (up arrow v) pressed?>> then\n                    set [allowtanookiflightstart v] to [0]\n                    set [tanookiflying v] to [1]\n                end\n            end\n            set [allowtanookiflightstart v] to [1]\n            change y by (Gravity)\n            if <<touching (map v)?> or <<<touching (semisolids v)?> or <touching (platforms v)?>> and <not <(YVel) > [0]>>>> then\n                change y by ((Gravity) * (-1))\n                set [yvel v] to [0]\n                set [tanookiflying v] to [0]\n                set [allowtanookiflightstart v] to [0]\n                set [allowtanookiflight v] to [0]\n                set [tanookiusesleft v] to [10]\n                if <(TanookiFlying) = [0]> then\n                    if <(Statue) = [0]> then\n                        if <<key (w v) pressed?> or <key (up arrow v) pressed?>> then\n                            start sound [Jump v]\n                            if <([abs v] of (XVel) ) > [2]> then\n                                set [yvel v] to [20]\n                            else\n                                set [yvel v] to [18]\n                            end\n                        else\n                            if <<key (s v) pressed?> or <key (down arrow v) pressed?>> then\n                                set [crouching v] to [1]\n                            end\n                        end\n                    end\n                end\n                FindFloor\n            end\n            if <not <(Powerup) = [Tanooki]>> then\n                set [tanookiflying v] to [0]\n            end\n            if <<<(TanookiFlying) = [1]> and <(YVel) < [-8]>> and <not <<<key (w v) pressed?> or <key (up arrow v) pressed?>> or <<<key (d v) pressed?> or <key (right arrow v) pressed?>> or <<key (a v) pressed?> or <key (left arrow v) pressed?>>>>>> then\n                set [tanookiflying v] to [0]\n                set [allowtanookiflightstart v] to [0]\n                set [allowtanookiflight v] to [0]\n            end\n            if <<(AllowTanookiFlight) = [0]> and <(TanookiFlying) = [1]>> then\n                if <not <<key (w v) pressed?> or <key (up arrow v) pressed?>>> then\n                    set [allowtanookiflight v] to [1]\n                    set [tanookiflying v] to [1]\n                end\n            end\n            if <<<key (w v) pressed?> or <key (up arrow v) pressed?>> and <<<(AllowTanookiFlight) = [1]> and <<(Powerup) = [Tanooki]> and <(Statue) = [0]>>> and <<(TanookiUsesLeft) > [0]> and <(TanookiCooldown) < [0]>>>> then\n                set [yvel v] to [11]\n                set [allowtanookiflight v] to [0]\n                set [tanookicooldown v] to [0.12]\n                change [tanookiusesleft v] by (-1)\n            end\n            if <(YVel) > [0]> then\n                if <<(Powerup) = [None]> or <(Crouching) = [1]>> then\n                    switch costume to (nonetop v)\n                else\n                    switch costume to (bigtop v)\n                end\n            else\n                switch costume to (allbottom v)\n            end\n            change y by (YVel)\n            if <<touching (map v)?> or <<<touching (semisolids v)?> or <touching (platforms v)?>> and <not <(YVel) > [0]>>>> then\n                if <(YVel) > [0]> then\n                    FindCeiling\n                    set [yvel v] to [3]\n                else\n                    change y by ((YVel) * (-1))\n                    FindFloor\n                    set [yvel v] to [0]\n                end\n            end\n            if <<(Statue) = [0]> and <<(SlidingFunction) = [0]> and <(Crouching) = [0]>>> then\n                if <<<key (d v) pressed?> or <key (right arrow v) pressed?>> and <not <<key (a v) pressed?> or <key (left arrow v) pressed?>>>> then\n                    change [xvel v] by (2)\n                    point in direction (90)\n                    if <(XVel) < [2]> then\n                        change [xvel v] by (-1.99)\n                    end\n                end\n                if <<<key (a v) pressed?> or <key (left arrow v) pressed?>> and <not <<key (d v) pressed?> or <key (right arrow v) pressed?>>>> then\n                    change [xvel v] by (-2)\n                    point in direction (-90)\n                    if <(XVel) > [-2]> then\n                        change [xvel v] by (1.99)\n                    end\n                end\n            end\n            if <(SlidingFunction) = [0]> then\n                if <<(Powerup) = [None]> or <(Crouching) = [1]>> then\n                    switch costume to (nonesides v)\n                else\n                    switch costume to (bigsides v)\n                end\n                change x by (XVel)\n                YSmoothing\n                if <touching (map v)?> then\n                    set [playerx v] to ((x position) - (MapX))\n                    FindXPosition\n                    set [xvel v] to [0]\n                end\n            end\n            if <<(Crouching) = [1]> or <(Sliding) = [1]>> then\n                set [xvel v] to ((XVel) / (1.1))\n            else\n                if <([abs v] of (XVel) ) < [3.99999999999]> then\n                    set [xvel v] to ((XVel) / (2))\n                else\n                    if <(YVel) = [0]> then\n                        set [xvel v] to ((XVel) / (1.4))\n                    else\n                        set [xvel v] to ((XVel) / (1.3))\n                    end\n                end\n            end\n            if <<<([abs v] of (XVel) ) > [4]> and <(TanookiFlying) = [1]>> and <<(YVel) = [-0.4]> and <<key (w v) pressed?> or <key (up arrow v) pressed?>>>> then\n                if <(XVel) > [0]> then\n                    set [xvel v] to [4]\n                else\n                    set [xvel v] to [-4]\n                end\n            end\n            set [playerx v] to ((x position) - (MapX))\n            set [playery v] to ((y position) - (MapY))\n            if <<(Powerup) = [Fire]> and <(TanookiCooldown) < [0]>> then\n                if <key (space v) pressed?> then\n                    add ((((x position) + (((direction) / (90)) * (12))) - (MapX)) / (28)) to [fireballx v]\n                    add (((y position) - (MapY)) / (28)) to [firebally v]\n                    add (direction) to [fireballdir v]\n                    add [1] to [fireballtype v]\n                    add [0] to [fireballbounces v]\n                    set [tanookicooldown v] to [0.5]\n                    start sound [Fireball v]\n                end\n            end\n        end\n    end\n    if <<(Powerup) = [None]> or <(Crouching) = [1]>> then\n        switch costume to (nonesides v)\n    else\n        if <<(Powerup) = [Frog]> and <touching (water v)?>> then\n            switch costume to (frogswimmingsides v)\n        else\n            switch costume to (bigsides v)\n        end\n    end\nend\nif <(AllowPlayerMovement) = [1]> then\n    if <<(y position) < [-172]> and <(Dead) = [0]>> then\n        broadcast (Death v)\n    end\nend\nif <<(Dead) = [1]> or <(PassedGoal) = [1]>> then\n    set [spinning v] to [0]\n    set [statue v] to [0]\nend\nif <(Dead) = [0]> then\n    if <<(Level) = [8]> and <(Underground) = [0]>> then\n        change [mapx v] by (-1)\n    else\n        change [mapx v] by (round ((((PlayerX) * (-1)) - (MapX)) / (4)))\n        change [mapy v] by ([floor v] of (((((PlayerY) + (-32)) * (-1)) - (MapY)) / (4)) )\n    end\nend\nif <(MapX) > [600]> then\n    set [mapx v] to [600]\nend\nif <(MapX) < [-5640]> then\n    set [mapx v] to [-5640]\nend\nif <(Level) = [7]> then\n    if <(MapX) < [-3848]> then\n        set [mapx v] to [-3848]\n    end\nend\nif <(Underground) = [1]> then\n    if <<(Level) = [4]> or <(Level) = [8]>> then\n        set [mapx v] to [-2254]\n    end\n    if <(Level) = [8]> then\n        set [mapy v] to [400]\n    end\n    if <(MapY) < [222]> then\n        set [mapy v] to [222]\n    end\n    if <(MapY) > [428]> then\n        set [mapy v] to [428]\n    end\nelse\n    if <(MapY) > [-138]> then\n        set [mapy v] to [-138]\n    end\n    if <(MapY) < [-450]> then\n        set [mapy v] to [-450]\n    end\n    if <(Level) = [8]> then\n        set [mapy v] to [-153]\n        change [mapy v] by (([sin v] of ((GlobalCostumeNo.) * (24)) ) * (15))\n        if <(MapX) < [-2280]> then\n            set [mapx v] to [-2280]\n        end\n        if <(x position) > [0]> then\n            change [mapx v] by ((x position) / (-24))\n        end\n    end\nend\nif <<(Powerup) = [Tanooki]> and <<(Dead) = [0]> and <(PassedGoal) = [0]>>> then\n    if <<<<key (space v) pressed?> and <not <touching (water v)?>>> and <<(Spinning) = [0]> and <<(Statue) = [0]> and <(StatueSwapCooldown) < [-0.6]>>>> or <<(TanookiCooldown) < [-0.3]> and <(Spinning) = [1]>>> then\n        set [statue v] to [0]\n        set [tanookiflying v] to [0]\n        set [tanookiusesleft v] to [0]\n        if <(Spinning) = [1]> then\n            set [statue v] to [0]\n            set [allowplayerdamage v] to [1]\n            set [tanookicooldown v] to [0]\n            set [spinning v] to [0]\n        else\n            start sound [Spin v]\n            set [allowplayerdamage v] to [0]\n            set [tanookicooldown v] to [0]\n            set [spinning v] to [1]\n            set [playercostumeno. v] to [0.5]\n        end\n        set [statueswapcooldown v] to [0]\n    else\n        if <<<<key (m v) pressed?> or <key (e v) pressed?>> and <(StatueSwapCooldown) < [0]>> or <<(Statue) = [1]> and <(TanookiCooldown) < [-5]>>> then\n            set [spinning v] to [0]\n            set [tanookiflying v] to [0]\n            set [tanookiusesleft v] to [0]\n            if <(Statue) = [1]> then\n                set [statue v] to [0]\n                set [allowplayerdamage v] to [1]\n                set [tanookicooldown v] to [0]\n            else\n                set [statue v] to [1]\n                set [yvel v] to [-5]\n                set [allowplayerdamage v] to [0]\n                set [tanookicooldown v] to [0]\n            end\n            set [statueswapcooldown v] to [1]\n        end\n    end\nelse\n    set [statue v] to [0]\n    set [spinning v] to [0]\nend\nchange y by (-1)\nif <(Dead) = [0]> then\n    broadcast (PlayerUpdated v)\nend\nbroadcast (CostumeEverything v)\n\nwhen I receive [updateplayer v]\nif <[1] = [1]> then\n    delete this clone\nend\nshow\ngo to x: ((PlayerX) + (MapX)) y: ((PlayerY) + (MapY))\nif <(AllowPlayerMovement) = [1]> then\n    switch costume to (playercentre v)\n    set [sliding v] to [0]\n    set [slidingfunction v] to [0]\n    set [crouching v] to [0]\n    change [tanookicooldown v] by ((-1) / (30))\n    change [statueswapcooldown v] by ((-1) / (10))\n    if <touching (water v)?> then\n        if <(Powerup) = [Frog]> then\n            FrogSwimming\n        else\n            if <(YVel) > [-2.5]> then\n                change [yvel v] by (-0.41)\n            end\n            if <(YVel) < [-2.5]> then\n                set [yvel v] to [-2.5]\n            end\n            if <<<key (w v) pressed?> or <key (up arrow v) pressed?>> and <<(Statue) = [0]> and <<(YVel) < [-1.3]> or <(YVel) = [-0.41]>>>> then\n                if <not <(YVel) = [-1.41]>> then\n                    start sound [Swim v]\n                end\n                set [yvel v] to [6]\n            end\n            if <(YVel) > [0]> then\n                if <<(Powerup) = [None]> or <(Crouching) = [1]>> then\n                    switch costume to (nonetop v)\n                else\n                    switch costume to (bigtop v)\n                end\n            else\n                switch costume to (allbottom v)\n            end\n            change y by (YVel)\n            if <<touching (map v)?> or <<<touching (semisolids v)?> or <touching (platforms v)?>> and <not <(YVel) > [0]>>>> then\n                change y by ((YVel) * (-1))\n                if <(YVel) > [0]> then\n                    FindCeilingV2\n                    set [yvel v] to [-1]\n                else\n                    FindFloor\n                    if <<(Statue) = [0]> and <<key (s v) pressed?> or <key (down arrow v) pressed?>>> then\n                        set [crouching v] to [1]\n                    end\n                    set [yvel v] to [0]\n                end\n            end\n            if <<(Statue) = [0]> and <<(SlidingFunction) = [0]> and <(Crouching) = [0]>>> then\n                if <<<key (d v) pressed?> or <key (right arrow v) pressed?>> and <not <<key (a v) pressed?> or <key (left arrow v) pressed?>>>> then\n                    change [xvel v] by (2)\n                    point in direction (90)\n                    if <(YVel) = [0]> then\n                        if <([abs v] of (XVel) ) > [2]> then\n                            if <(XVel) > [0]> then\n                                set [xvel v] to [2]\n                            else\n                                set [xvel v] to [-2]\n                            end\n                        end\n                    else\n                        if <([abs v] of (XVel) ) > [4.5]> then\n                            if <(XVel) > [0]> then\n                                set [xvel v] to [4.5]\n                            else\n                                set [xvel v] to [-4.5]\n                            end\n                        end\n                    end\n                    if <(XVel) < [2]> then\n                        if <(YVel) = [0]> then\n                            change [xvel v] by (-1.9)\n                        else\n                            change [xvel v] by (-1.75)\n                        end\n                    end\n                end\n                if <<<key (a v) pressed?> or <key (left arrow v) pressed?>> and <not <<key (d v) pressed?> or <key (right arrow v) pressed?>>>> then\n                    change [xvel v] by (-2)\n                    point in direction (-90)\n                    if <(YVel) = [0]> then\n                        if <([abs v] of (XVel) ) > [2]> then\n                            if <(XVel) > [0]> then\n                                set [xvel v] to [2]\n                            else\n                                set [xvel v] to [-2]\n                            end\n                        end\n                    else\n                        if <([abs v] of (XVel) ) > [4.5]> then\n                            if <(XVel) > [0]> then\n                                set [xvel v] to [4.5]\n                            else\n                                set [xvel v] to [-4.5]\n                            end\n                        end\n                    end\n                    if <(XVel) > [-2]> then\n                        if <(YVel) = [0]> then\n                            change [xvel v] by (1.9)\n                        else\n                            change [xvel v] by (1.75)\n                        end\n                    end\n                end\n            end\n            if <<(Powerup) = [None]> or <(Crouching) = [1]>> then\n                switch costume to (nonesides v)\n            else\n                switch costume to (bigsides v)\n            end\n            if <<(Statue) = [0]> and <(SlidingFunction) = [0]>> then\n                change x by (XVel)\n                YSmoothing\n                if <touching (map v)?> then\n                    set [playerx v] to ((x position) - (MapX))\n                    FindXPosition\n                    set [xvel v] to [0]\n                end\n            end\n            set [xvel v] to ((XVel) / (1.05))\n            set [playerx v] to ((x position) - (MapX))\n            set [playery v] to ((y position) - (MapY))\n            if <<(Powerup) = [Fire]> and <(TanookiCooldown) < [0]>> then\n                if <key (space v) pressed?> then\n                    start sound [Fireball v]\n                    add ((((x position) + (((direction) / (90)) * (8))) - (MapX)) / (28)) to [fireballx v]\n                    add (((y position) - (MapY)) / (28)) to [firebally v]\n                    add (direction) to [fireballdir v]\n                    add [1] to [fireballtype v]\n                    add [0] to [fireballbounces v]\n                    set [tanookicooldown v] to [0.5]\n                end\n            end\n        end\n        switch costume to (playercentre v)\n        if <not <touching (water v)?>> then\n            if <<key (w v) pressed?> or <key (up arrow v) pressed?>> then\n                set [yvel v] to [14]\n                if <([abs v] of (XVel) ) > [1.5]> then\n                    set [xvel v] to ((direction) / (60))\n                end\n            end\n        end\n    else\n        if <(Powerup) = [Frog]> then\n            FrogMovement\n        else\n            if <<<(YVel) > [-12]> and <(Statue) = [0]>> or <<(YVel) > [-16]> and <(Statue) = [1]>>> then\n                if <<(TanookiFlying) = [1]> and <(Statue) = [0]>> then\n                    if <(YVel) > [0]> then\n                        change [yvel v] by ((Gravity) / (3.4))\n                    else\n                        if <<key (w v) pressed?> or <key (up arrow v) pressed?>> then\n                            change [yvel v] by ((Gravity) / (6))\n                            if <(YVel) < [-0.4]> then\n                                set [yvel v] to [-0.4]\n                            end\n                        else\n                            change [yvel v] by ((Gravity) / (3.4))\n                        end\n                    end\n                else\n                    if <(Statue) = [1]> then\n                        change [yvel v] by ((Gravity) / (1))\n                    else\n                        change [yvel v] by ((Gravity) / (2.9))\n                        if <<(YVel) > [0]> and <not <<key (w v) pressed?> or <key (up arrow v) pressed?>>>> then\n                            set [yvel v] to ((YVel) / (1.3))\n                        end\n                    end\n                end\n            end\n            switch costume to (allbottom v)\n            if <<<(AllowTanookiFlightStart) = [1]> and <<(Powerup) = [Tanooki]> and <(Statue) = [0]>>> and <([abs v] of (XVel) ) > [2]>> then\n                if <<key (w v) pressed?> or <key (up arrow v) pressed?>> then\n                    set [allowtanookiflightstart v] to [0]\n                    set [tanookiflying v] to [1]\n                end\n            end\n            set [allowtanookiflightstart v] to [1]\n            change y by (Gravity)\n            if <<touching (map v)?> or <<<touching (semisolids v)?> or <touching (platforms v)?>> and <not <(YVel) > [0]>>>> then\n                change y by ((Gravity) * (-1))\n                set [yvel v] to [0]\n                set [tanookiflying v] to [0]\n                set [allowtanookiflightstart v] to [0]\n                set [allowtanookiflight v] to [0]\n                set [tanookiusesleft v] to [10]\n            end\n            if <<(YVel) = [0]> or <(YVel) = ((Gravity) / (2.9))>> then\n                if <(TanookiFlying) = [0]> then\n                    if <(Statue) = [0]> then\n                        if <<key (w v) pressed?> or <key (up arrow v) pressed?>> then\n                            start sound [Jump v]\n                            if <([abs v] of (XVel) ) > [2]> then\n                                set [yvel v] to [20]\n                            else\n                                set [yvel v] to [18]\n                            end\n                        else\n                            if <<key (s v) pressed?> or <key (down arrow v) pressed?>> then\n                                set [crouching v] to [1]\n                            end\n                        end\n                    end\n                end\n                if <(YVel) = [0]> then\n                    FindFloor\n                end\n            end\n            if <not <(Powerup) = [Tanooki]>> then\n                set [tanookiflying v] to [0]\n            end\n            if <<<(TanookiFlying) = [1]> and <(YVel) < [-8]>> and <not <<<key (w v) pressed?> or <key (up arrow v) pressed?>> or <<<key (d v) pressed?> or <key (right arrow v) pressed?>> or <<key (a v) pressed?> or <key (left arrow v) pressed?>>>>>> then\n                set [tanookiflying v] to [0]\n                set [allowtanookiflightstart v] to [0]\n                set [allowtanookiflight v] to [0]\n            end\n            if <<(AllowTanookiFlight) = [0]> and <(TanookiFlying) = [1]>> then\n                if <not <<key (w v) pressed?> or <key (up arrow v) pressed?>>> then\n                    set [allowtanookiflight v] to [1]\n                    set [tanookiflying v] to [1]\n                end\n            end\n            if <<<key (w v) pressed?> or <key (up arrow v) pressed?>> and <<<(AllowTanookiFlight) = [1]> and <<(Powerup) = [Tanooki]> and <(Statue) = [0]>>> and <<(TanookiUsesLeft) > [0]> and <(TanookiCooldown) < [0]>>>> then\n                set [yvel v] to [11]\n                set [allowtanookiflight v] to [0]\n                set [tanookicooldown v] to [0.12]\n                change [tanookiusesleft v] by (-1)\n            end\n            if <(YVel) > [0]> then\n                if <<(Powerup) = [None]> or <(Crouching) = [1]>> then\n                    switch costume to (nonetop v)\n                else\n                    switch costume to (bigtop v)\n                end\n            else\n                switch costume to (allbottom v)\n            end\n            change y by (YVel)\n            if <<touching (map v)?> or <<<touching (semisolids v)?> or <touching (platforms v)?>> and <not <(YVel) > [0]>>>> then\n                if <(YVel) > [0]> then\n                    FindCeiling\n                    set [yvel v] to [3]\n                else\n                    change y by ((YVel) * (-1))\n                    FindFloor\n                    set [yvel v] to [0]\n                end\n            end\n            if <<(Statue) = [0]> and <<(SlidingFunction) = [0]> and <(Crouching) = [0]>>> then\n                if <<<key (d v) pressed?> or <key (right arrow v) pressed?>> and <not <<key (a v) pressed?> or <key (left arrow v) pressed?>>>> then\n                    change [xvel v] by (2)\n                    point in direction (90)\n                    if <(XVel) < [2]> then\n                        change [xvel v] by (-1.99)\n                    end\n                end\n                if <<<key (a v) pressed?> or <key (left arrow v) pressed?>> and <not <<key (d v) pressed?> or <key (right arrow v) pressed?>>>> then\n                    change [xvel v] by (-2)\n                    point in direction (-90)\n                    if <(XVel) > [-2]> then\n                        change [xvel v] by (1.99)\n                    end\n                end\n            end\n            if <(SlidingFunction) = [0]> then\n                if <<(Powerup) = [None]> or <(Crouching) = [1]>> then\n                    switch costume to (nonesides v)\n                else\n                    switch costume to (bigsides v)\n                end\n                change x by (XVel)\n                YSmoothing\n                if <touching (map v)?> then\n                    set [playerx v] to ((x position) - (MapX))\n                    FindXPosition\n                    set [xvel v] to [0]\n                end\n            end\n            if <<(Crouching) = [1]> or <(Sliding) = [1]>> then\n                set [xvel v] to ((XVel) / (1.1))\n            else\n                if <([abs v] of (XVel) ) < [3.99999999999]> then\n                    set [xvel v] to ((XVel) / (2))\n                else\n                    if <(YVel) = [0]> then\n                        set [xvel v] to ((XVel) / (1.4))\n                    else\n                        set [xvel v] to ((XVel) / (1.3))\n                    end\n                end\n            end\n            if <<<([abs v] of (XVel) ) > [4]> and <(TanookiFlying) = [1]>> and <<(YVel) = [-0.4]> and <<key (w v) pressed?> or <key (up arrow v) pressed?>>>> then\n                if <(XVel) > [0]> then\n                    set [xvel v] to [4]\n                else\n                    set [xvel v] to [-4]\n                end\n            end\n            set [playerx v] to ((x position) - (MapX))\n            set [playery v] to ((y position) - (MapY))\n            if <<(Powerup) = [Fire]> and <(TanookiCooldown) < [0]>> then\n                if <key (space v) pressed?> then\n                    add ((((x position) + (((direction) / (90)) * (12))) - (MapX)) / (28)) to [fireballx v]\n                    add (((y position) - (MapY)) / (28)) to [firebally v]\n                    add (direction) to [fireballdir v]\n                    add [1] to [fireballtype v]\n                    add [0] to [fireballbounces v]\n                    set [tanookicooldown v] to [0.5]\n                    start sound [Fireball v]\n                end\n            end\n        end\n    end\n    if <<(Powerup) = [None]> or <(Crouching) = [1]>> then\n        switch costume to (nonesides v)\n    else\n        if <<(Powerup) = [Frog]> and <touching (water v)?>> then\n            switch costume to (frogswimmingsides v)\n        else\n            switch costume to (bigsides v)\n        end\n    end\nend\nif <(AllowPlayerMovement) = [1]> then\n    if <<(y position) < [-172]> and <(Dead) = [0]>> then\n        broadcast (Death v)\n    end\nend\nif <<(Dead) = [1]> or <(PassedGoal) = [1]>> then\n    set [spinning v] to [0]\n    set [statue v] to [0]\nend\nif <(Dead) = [0]> then\n    if <<<(Level) = [8]> or <(Level) = [14]>> and <(Underground) = [0]>> then\n        change [mapx v] by (-1)\n    else\n        change [mapx v] by (round ((((PlayerX) * (-1)) - (MapX)) / (4)))\n        change [mapy v] by ([floor v] of (((((PlayerY) + (-32)) * (-1)) - (MapY)) / (4)) )\n    end\nend\nif <(MapX) > [600]> then\n    set [mapx v] to [600]\nend\nif <(MapX) < [-5640]> then\n    set [mapx v] to [-5640]\nend\nif <(Level) = [7]> then\n    if <(MapX) < [-3848]> then\n        set [mapx v] to [-3848]\n    end\nend\nif <(Underground) = [1]> then\n    if <<<(Level) = [4]> or <(Level) = [14]>> or <<(Level) = [8]> or <(Level) = [11]>>> then\n        set [mapx v] to [-2254]\n    end\n    if <<(Level) = [8]> or <(Level) = [14]>> then\n        set [mapy v] to [400]\n    end\n    if <(MapY) < [222]> then\n        set [mapy v] to [222]\n    end\n    if <(MapY) > [428]> then\n        set [mapy v] to [428]\n    end\n    if <(Level) = [10]> then\n        if <(MapY) > [222]> then\n            set [mapy v] to [222]\n        end\n    end\nelse\n    if <(MapY) > [-138]> then\n        set [mapy v] to [-138]\n    end\n    if <(MapY) < [-450]> then\n        set [mapy v] to [-450]\n    end\n    if <<(Level) = [8]> or <(Level) = [14]>> then\n        set [mapy v] to [-153]\n        change [mapy v] by (([sin v] of ((GlobalCostumeNo.) * (24)) ) * (15))\n        if <(MapX) < [-2280]> then\n            set [mapx v] to [-2280]\n        end\n        if <(x position) > [0]> then\n            change [mapx v] by ((x position) / (-24))\n        end\n    end\nend\nif <<(Powerup) = [Tanooki]> and <<(Dead) = [0]> and <(PassedGoal) = [0]>>> then\n    if <<<<key (space v) pressed?> and <not <touching (water v)?>>> and <<(Spinning) = [0]> and <<(Statue) = [0]> and <(StatueSwapCooldown) < [-0.6]>>>> or <<(TanookiCooldown) < [-0.3]> and <(Spinning) = [1]>>> then\n        set [statue v] to [0]\n        set [tanookiflying v] to [0]\n        set [tanookiusesleft v] to [0]\n        if <(Spinning) = [1]> then\n            set [statue v] to [0]\n            set [allowplayerdamage v] to [1]\n            set [tanookicooldown v] to [0]\n            set [spinning v] to [0]\n        else\n            start sound [Spin v]\n            set [allowplayerdamage v] to [0]\n            set [tanookicooldown v] to [0]\n            set [spinning v] to [1]\n            set [playercostumeno. v] to [0.5]\n        end\n        set [statueswapcooldown v] to [0]\n    else\n        if <<<<key (m v) pressed?> or <key (e v) pressed?>> and <(StatueSwapCooldown) < [0]>> or <<(Statue) = [1]> and <(TanookiCooldown) < [-5]>>> then\n            set [spinning v] to [0]\n            set [tanookiflying v] to [0]\n            set [tanookiusesleft v] to [0]\n            if <(Statue) = [1]> then\n                set [statue v] to [0]\n                set [allowplayerdamage v] to [1]\n                set [tanookicooldown v] to [0]\n            else\n                set [statue v] to [1]\n                set [yvel v] to [-5]\n                set [allowplayerdamage v] to [0]\n                set [tanookicooldown v] to [0]\n            end\n            set [statueswapcooldown v] to [1]\n        end\n    end\nelse\n    set [statue v] to [0]\n    set [spinning v] to [0]\nend\nchange y by (-1)\nif <(Dead) = [0]> then\n    broadcast (PlayerUpdated v)\nend\nbroadcast (CostumeEverything v)\n\ndefine FindCeiling\nrepeat until <not <touching (map v)?>>\n    change y by (-1)\nend\n\ndefine FindFloor\nrepeat until <<touching (map v)?> or <<touching (semisolids v)?> or <touching (platforms v)?>>>\n    change y by (-0.5)\nend\nchange y by (0.5)\nif <<<key (s v) pressed?> or <key (down arrow v) pressed?>> and <<(Statue) = [0]> and <not <(Powerup) = [Frog]>>>> then\n    switch costume to (sliding v)\n    set [playerx v] to ((x position) - (MapX))\n    set [playery v] to ((y position) - (MapY))\n    change x by (((direction) / (90)) * ((6) + (([abs v] of (XVel) ) / (3))))\n    repeat until <<<touching (map v)?> or <<touching (semisolids v)?> and <not <(YVel) > [0]>>>> or <touching (_edge_ v)?>>\n        change y by (-1)\n    end\n    change y by (1)\n    set [sliding v] to [1]\n    set [slidingfunction v] to [1]\n    if <<not <((y position) - (MapY)) < ((PlayerY) - (1))>> or <not <((y position) - (MapY)) > ((PlayerY) - (27))>>> then\n        go to x: ((PlayerX) + (MapX)) y: ((PlayerY) + (MapY))\n        set [slidingfunction v] to [0]\n    else\n        go to x: (((x position) + ((PlayerX) + (MapX))) / (2)) y: (((y position) + ((PlayerY) + (MapY))) / (2))\n        change [xvel v] by ((((direction) / (90)) * (((y position) - (MapY)) - (PlayerY))) / (-6))\n        set [slidingtime v] to (([abs v] of (XVel) ) / (2))\n    end\n    if <(YVel) > [0]> then\n        if <<(Powerup) = [None]> or <(Crouching) = [1]>> then\n            switch costume to (nonetop v)\n        else\n            switch costume to (bigtop v)\n        end\n    else\n        switch costume to (allbottom v)\n    end\nend\nchange [slidingtime v] by (-0.2)\nif <(SlidingTime) < [0]> then\n    set [sliding v] to [0]\nend\n\ndefine YSmoothing\nif <<touching (map v)?> or <<<touching (semisolids v)?> or <touching (platforms v)?>> and <not <(YVel) > [0]>>>> then\n    repeat (16)\n        if <<touching (map v)?> or <<<touching (semisolids v)?> or <touching (platforms v)?>> and <not <(YVel) > [0]>>>> then\n            change y by (1)\n        end\n    end\nend\nif <<touching (map v)?> or <<<touching (semisolids v)?> or <touching (platforms v)?>> and <not <(YVel) > [0]>>>> then\n    change y by (-16)\nend\n\nwhen I receive [costumeeverything v]\nif <touching (water v)?> then\n    if <(Dead) = [1]> then\n        switch costume to (dead1none v)\n    else\n        if <(PipeTravel) = [1]> then\n            switch costume to (join [Pipe] (Powerup))\n        else\n            if <(Powerup) = [Frog]> then\n                if <([abs v] of (YVel) ) > (([abs v] of (XVel) ) + (0.5))> then\n                    if <(YVel) > [0]> then\n                        switch costume to (join [Up] (([floor v] of (((PlayerCostumeNo.) * (1.5)) mod (3)) ) + (1)))\n                    else\n                        switch costume to (join [Down] (([floor v] of (((PlayerCostumeNo.) * (1.5)) mod (3)) ) + (1)))\n                    end\n                else\n                    if <([abs v] of (XVel) ) > [0.4]> then\n                        switch costume to (join [Swim] (join (([floor v] of (((PlayerCostumeNo.) * (1.5)) mod (5)) ) + (1)) (Powerup)))\n                    else\n                        switch costume to (join [Swim] (join (([floor v] of (((PlayerCostumeNo.) * (1.5)) mod (3)) ) + (3)) (Powerup)))\n                    end\n                end\n            else\n                if <(Statue) = [1]> then\n                    switch costume to (statue1 v)\n                else\n                    if <<(TanookiCooldown) > [0.3]> and <(Powerup) = [Fire]>> then\n                        if <(TanookiCooldown) > [0.4]> then\n                            if <not <(YVel) = [0]>> then\n                                switch costume to (throw5 v)\n                            else\n                                switch costume to (throw1 v)\n                            end\n                        else\n                            if <not <(YVel) = [0]>> then\n                                switch costume to (throw6 v)\n                            else\n                                switch costume to (throw2 v)\n                            end\n                        end\n                    else\n                        if <not <(YVel) = [0]>> then\n                            if <(Powerup) = [None]> then\n                                switch costume to (join [Swim] (join (([floor v] of (((PlayerCostumeNo.) * (1)) mod (4)) ) + (1)) (Powerup)))\n                            else\n                                switch costume to (join [Swim] (join (([floor v] of (((PlayerCostumeNo.) * (1.5)) mod (5)) ) + (1)) (Powerup)))\n                            end\n                        else\n                            if <(Crouching) = [1]> then\n                                switch costume to (join [Crouch1] (Powerup))\n                            else\n                                if <<<<(XVel) < [0.99]> and <<key (d v) pressed?> or <key (right arrow v) pressed?>>> or <<(XVel) > [-0.99]> and <<key (a v) pressed?> or <key (left arrow v) pressed?>>>> and <<not <([abs v] of (XVel) ) < [0.001]>> and <(PassedGoal) = [0]>>> then\n                                    if <(Powerup) = [None]> then\n                                        switch costume to (walk3none v)\n                                    else\n                                        switch costume to (join [Walk5] (Powerup))\n                                    end\n                                    set [playercostumeno. v] to [0]\n                                else\n                                    if <([abs v] of (XVel) ) > [0.2]> then\n                                        if <(Powerup) = [None]> then\n                                            switch costume to (join [Walk] (join (([floor v] of (((PlayerCostumeNo.) * (1.5)) mod (2)) ) + (1)) [None]))\n                                        else\n                                            switch costume to (join [Walk] (join (([floor v] of (((PlayerCostumeNo.) * (1.5)) mod (4)) ) + (1)) (Powerup)))\n                                        end\n                                    else\n                                        switch costume to (join [Idle1] (Powerup))\n                                        set [playercostumeno. v] to [8]\n                                    end\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nelse\n    if <(Dead) = [1]> then\n        switch costume to (dead1none v)\n    else\n        if <(PipeTravel) = [1]> then\n            switch costume to (join [Pipe] (Powerup))\n        else\n            if <(Statue) = [1]> then\n                switch costume to (statue1 v)\n            else\n                if <(Spinning) = [1]> then\n                    switch costume to (join [Spin] (([floor v] of (((PlayerCostumeNo.) * (2.8)) mod (4)) ) + (1)))\n                else\n                    if <(TanookiFlying) = [1]> then\n                        switch costume to (join [Fly] (([floor v] of (((PlayerCostumeNo.) * (6)) mod (5)) ) + (1)))\n                    else\n                        if <(Sliding) = [1]> then\n                            switch costume to (join [Slide1] (Powerup))\n                        else\n                            if <(Crouching) = [1]> then\n                                switch costume to (join [Crouch1] (Powerup))\n                            else\n                                if <<(TanookiCooldown) > [0.3]> and <(Powerup) = [Fire]>> then\n                                    if <(TanookiCooldown) > [0.4]> then\n                                        if <not <(YVel) = [0]>> then\n                                            switch costume to (throw3 v)\n                                        else\n                                            switch costume to (throw1 v)\n                                        end\n                                    else\n                                        if <not <(YVel) = [0]>> then\n                                            switch costume to (throw4 v)\n                                        else\n                                            switch costume to (throw2 v)\n                                        end\n                                    end\n                                else\n                                    if <not <<(YVel) = [0]> or <(YVel) = ((Gravity) / (2.9))>>> then\n                                        if <<<([abs v] of (XVel) ) > [2]> or <(TanookiFlying) = [1]>> and <not <(Powerup) = [Frog]>>> then\n                                            switch costume to (join [Glide1] (Powerup))\n                                        else\n                                            switch costume to (join [Jump1] (Powerup))\n                                        end\n                                    else\n                                        if <<<<(XVel) < [0.99]> and <<key (d v) pressed?> or <key (right arrow v) pressed?>>> or <<(XVel) > [-0.99]> and <<key (a v) pressed?> or <key (left arrow v) pressed?>>>> and <<not <([abs v] of (XVel) ) < [0.001]>> and <<(PassedGoal) = [0]> and <not <(Powerup) = [Frog]>>>>> then\n                                            if <(Powerup) = [None]> then\n                                                switch costume to (walk3none v)\n                                            else\n                                                switch costume to (join [Walk5] (Powerup))\n                                            end\n                                            set [playercostumeno. v] to [0]\n                                        else\n                                            if <([abs v] of (XVel) ) > [0.2]> then\n                                                if <<([abs v] of (XVel) ) > [2]> and <not <(Powerup) = [Frog]>>> then\n                                                    if <(Powerup) = [None]> then\n                                                        switch costume to (join [Run] (join (([floor v] of (((PlayerCostumeNo.) * (5)) mod (2)) ) + (1)) [None]))\n                                                    else\n                                                        switch costume to (join [Run] (join (([floor v] of (((PlayerCostumeNo.) * (5)) mod (4)) ) + (1)) (Powerup)))\n                                                    end\n                                                else\n                                                    if <(Powerup) = [None]> then\n                                                        switch costume to (join [Walk] (join (([floor v] of (((PlayerCostumeNo.) * (2.5)) mod (2)) ) + (1)) [None]))\n                                                    else\n                                                        switch costume to (join [Walk] (join (([floor v] of (((PlayerCostumeNo.) * (2.5)) mod (4)) ) + (1)) (Powerup)))\n                                                    end\n                                                end\n                                            else\n                                                switch costume to (join [Idle1] (Powerup))\n                                                set [playercostumeno. v] to [2.5]\n                                            end\n                                        end\n                                    end\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\nif <<<<<<<(XVel) < [1]> and <<key (d v) pressed?> or <key (right arrow v) pressed?>>> or <<(XVel) > [-1]> and <<key (a v) pressed?> or <key (left arrow v) pressed?>>>> and <(Crouching) = [0]>> and <(YVel) = [0]>> or <<(YVel) = [20]> or <(SlidingFunction) = [1]>>> and <not <(PipeTravel) = [1]>>> then\n    if <<<(DeleteFireballNo.) = [0]> and <(DeleteBlockNo.) = [0]>> and <<<(Statue) = [0]> and <<(AllowPlayerMovement) = [1]> and <not <<<key (d v) pressed?> or <key (right arrow v) pressed?>> and <<key (a v) pressed?> or <key (left arrow v) pressed?>>>>>> and <<(PassedGoal) = [0]> and <<(Dead) = [0]> and <not <(XVel) = [0]>>>>>> then\n        set [spawnx v] to (x position)\n        set [spawny v] to (y position)\n        create clone of (fx v)\n    end\nend\n\ndefine FindXPosition\nset [playerx v] to ((x position) - (MapX))\nset [playery v] to ((y position) - (MapY))\nset [offset v] to [0]\nrepeat until <<not <touching (map v)?>> or <([abs v] of (Offset) ) > [28]>>\n    set x to ((PlayerX) + (MapX))\n    if <(Offset) > [0]> then\n        change [offset v] by (0.5)\n    else\n        change [offset v] by (-0.5)\n    end\n    set [offset v] to ((Offset) * (-1))\n    change x by (Offset)\nend\nif <([abs v] of (Offset) ) > [28]> then\n    set x to ((PlayerX) + (MapX))\n    set [offset v] to [0]\n    repeat until <<not <touching (map v)?>> or <([abs v] of (Offset) ) > [28]>>\n        set y to ((PlayerY) + (MapY))\n        if <(Offset) > [0]> then\n            change [offset v] by (0.5)\n        else\n            change [offset v] by (-0.5)\n        end\n        set [offset v] to ((Offset) * (-1))\n        change y by (Offset)\n    end\nend\nif <<([abs v] of (Offset) ) > [28]> and <(AllowPlayerMovement) = [1]>> then\n    set x to ((PlayerX) + (MapX))\n    set y to ((PlayerY) + (MapY))\n    if <(AllowPlayerDamage) = [1]> then\n        broadcast (Death v)\n    end\nend\n\nwhen I receive [playerhitboxswitch v]\nif <<(Powerup) = [None]> or <(Crouching) = [1]>> then\n    switch costume to (nonesides v)\nelse\n    switch costume to (bigsides v)\nend\nbroadcast (MoveMapParts v)\n\nwhen I receive [death v]\nif <[1] = [1]> then\n    delete this clone\nend\nset [powerup v] to [None]\nset [powerupcollected v] to [None]\nset [previouspowerup v] to [None]\nchange [lives v] by (-1)\nstop all sounds\nstart sound [Death v]\nif <(y position) < [-172]> then\n    set [ghost v] effect to (100)\nend\nset [allowplayerdamage v] to [0]\nset [allowplayermovement v] to [0]\nset [timesincedeath v] to [0]\nset [dead v] to [1]\nchange [playery v] by (1)\nwait (1) seconds\nrepeat (65)\n    change [playery v] by ((12) - (TimeSinceDeath))\n    change [timesincedeath v] by (0.8)\n    if <(y position) < [-172]> then\n        set [ghost v] effect to (100)\n    end\nend\nif <(Lives) < [0.1]> then\n    broadcast (GameOver v)\n    wait (2) seconds\n    clear graphic effects\n    set [menu v] to [Map]\nelse\n    broadcast (Transition6 v)\n    wait (0.4) seconds\n    clear graphic effects\n    set [menu v] to [Map]\nend\nset [dead v] to [0]\n\nwhen I receive [startgame v]\nclear graphic effects\npoint in direction (90)\nset [playerx v] to [-720]\nset [playery v] to [90]\nif <<(Level) = [8]> or <(Level) = [14]>> then\n    change [playery v] by (120)\nend\nset [gravity v] to [-3]\nset [mapx v] to [600]\nset [mapy v] to [-138]\nset [playercostumeno. v] to [0]\nset [xvel v] to [0]\nset [yvel v] to [0]\nset [allowplayermovement v] to [1]\nset [passedgoal v] to [0]\nset [timesincedeath v] to [0]\nset [dead v] to [0]\nset [tanookiflying v] to [0]\nset [tanookicooldown v] to [0]\nset [statueswapcooldown v] to [0]\nset [pipetravel v] to [0]\nset [allowplayerdamage v] to [1]\nset [underground v] to [0]\nset [time v] to [500]\nset [score v] to [0]\nset [statue v] to [0]\n\nwhen I receive [powerup v]\nstart sound [Powerup v]\nset [allowplayerdamage v] to [0]\nif <<<(PowerupCollected) = [Big]> and <(Powerup) = [None]>> or <<not <(PowerupCollected) = [Big]>> and <not <(PowerupCollected) = (Powerup)>>>> then\n    set [previousownedpowerup v] to (Powerup)\n    set [powerup v] to (PowerupCollected)\n    wait (0.1) seconds\n    set [powerup v] to (PreviousOwnedPowerup)\n    wait (0.1) seconds\n    set [powerup v] to (PowerupCollected)\n    wait (0.1) seconds\n    set [powerup v] to (PreviousOwnedPowerup)\n    wait (0.1) seconds\n    set [powerup v] to (PowerupCollected)\n    wait (0.1) seconds\n    set [powerup v] to (PreviousOwnedPowerup)\n    wait (0.1) seconds\n    set [powerup v] to (PowerupCollected)\n    wait (1) seconds\nelse\n    set [ghost v] effect to (100)\n    wait (0.1) seconds\n    set [ghost v] effect to (0)\n    wait (0.1) seconds\n    set [ghost v] effect to (100)\n    wait (0.1) seconds\n    set [ghost v] effect to (0)\n    wait (0.1) seconds\nend\nset [allowplayerdamage v] to [1]\n\nwhen I receive [won v]\nset [statue v] to [0]\nset [tanookiflying v] to [0]\nset [xvel v] to [0]\nwait until <(YVel) = [0]>\npoint in direction (90)\nset [tanookiflying v] to [0]\nset [crouching v] to [0]\nset [sliding v] to [0]\nset [allowplayermovement v] to [0]\nrepeat (120)\n    set [xvel v] to [1]\n    change [playerx v] by (3)\n    if <(x position) > [238]> then\n        set [ghost v] effect to (100)\n        stop [this script v]\n    end\nend\n\nwhen I receive [hidegame v]\nhide\n\nwhen I receive [powerdown v]\nstart sound [Pipe/Powerdown v]\nset [tanookiflying v] to [0]\nif <(Powerup) = [None]> then\n    broadcast (Death v)\nelse\n    if <(Powerup) = [Big]> then\n        set [previouspowerup v] to [None]\n    else\n        set [previouspowerup v] to [Big]\n    end\n    set [allowplayerdamage v] to [0]\n    set [previousownedpowerup v] to (Powerup)\n    set [powerup v] to (PreviousPowerup)\n    wait (0.1) seconds\n    set [powerup v] to (PreviousOwnedPowerup)\n    wait (0.1) seconds\n    set [powerup v] to (PreviousPowerup)\n    wait (0.1) seconds\n    set [powerup v] to (PreviousOwnedPowerup)\n    wait (0.1) seconds\n    set [powerup v] to (PreviousPowerup)\n    wait (0.1) seconds\n    set [powerup v] to (PreviousOwnedPowerup)\n    wait (0.1) seconds\n    set [powerup v] to (PreviousPowerup)\n    wait (1) seconds\n    set [allowplayerdamage v] to [1]\nend\n\nwhen I receive [pipetravel v]\nstart sound [Pipe/Powerdown v]\nset [crouching v] to [0]\nset [tanookiflying v] to [0]\nset [statue v] to [0]\nset [allowplayerdamage v] to [0]\nset [allowplayermovement v] to [0]\nset [pipetravel v] to [1]\nset [xvel v] to [0]\nset [yvel v] to [0]\ngo to [back v] layer\ngo [forward v] (8) layers\nrepeat (30)\n    change [playery v] by (-1)\nend\nstop all sounds\nbroadcast (Transition5 v)\nif <(Underground) = [0]> then\n    set [underground v] to [1]\n    set [playery v] to [-122]\n    if <<(Level) = [4]> or <(Level) = [11]>> then\n        change [playery v] by (-56)\n    end\n    if <<(Level) = [8]> or <(Level) = [14]>> then\n        change [playery v] by (-168)\n        set [playerx v] to [2172]\n    end\n    wait (0) seconds\n    change [playery v] by (-1)\n    repeat (2)\n        change [playery v] by (-1)\n    end\n    repeat until <not <touching (map v)?>>\n        change [playery v] by (-1)\n    end\n    if <not <<(Level) = [4]> or <(Level) = [11]>>> then\n        repeat (4)\n            change [playery v] by (-1)\n        end\n    end\nelse\n    set [underground v] to [0]\n    set [playery v] to [24]\n    wait (0) seconds\n    change [playery v] by (1)\n    repeat (2)\n        change [playery v] by (1)\n    end\n    repeat until <not <touching (map v)?>>\n        change [playery v] by (1)\n    end\nend\nset [allowplayermovement v] to [1]\nset [allowplayerdamage v] to [1]\nset [pipetravel v] to [0]\ngo to [front v] layer\ngo [backward v] (24) layers\n\nwhen I receive [bossdefeated v]\nset [tanookiflying v] to [0]\nset [xvel v] to [0]\nwait until <(YVel) = [0]>\nif <(x position) > [0]> then\n    point in direction (-90)\nelse\n    point in direction (90)\nend\nset [tanookiflying v] to [0]\nset [crouching v] to [0]\nset [sliding v] to [0]\nset [allowplayermovement v] to [0]\n\nwhen I receive [flagclicked v]\nset [lives v] to [5]\nhide\nswitch costume to (idle1none v)\nset size to (350) %\ngo to x: (0) y: (0)\npoint in direction (90)\nset rotation style [left-right v]\nset [powerup v] to [None]\nset [powerupcollected v] to [None]\nset [previouspowerup v] to [None]\nset [totalscore v] to [0]\nwait until <(Menu) = [Game]>\nbroadcast (StartGame2 v)\n\ndefine FindCeilingV2\nrepeat until <touching (map v)?>\n    change y by (0.5)\nend\nchange y by (-0.5)\n\ndefine FrogSwimming\nif <<key (w v) pressed?> or <key (up arrow v) pressed?>> then\n    change [yvel v] by (1)\nend\nif <<key (s v) pressed?> or <key (down arrow v) pressed?>> then\n    change [yvel v] by (-1)\nend\nif <<key (d v) pressed?> or <key (right arrow v) pressed?>> then\n    change [xvel v] by (1)\n    point in direction (90)\nend\nif <<key (a v) pressed?> or <key (left arrow v) pressed?>> then\n    change [xvel v] by (-1)\n    point in direction (-90)\nend\nif <(YVel) > [0]> then\n    switch costume to (frogswimmingtop v)\nelse\n    switch costume to (allbottom v)\nend\nchange y by (YVel)\nif <<touching (map v)?> or <<<touching (semisolids v)?> or <touching (platforms v)?>> and <not <(YVel) > [0]>>>> then\n    change y by ((YVel) * (-1))\n    if <(YVel) > [0]> then\n        FindCeilingV2\n        set [yvel v] to [0]\n    else\n        FindFloor\n        set [yvel v] to [0]\n    end\nend\nswitch costume to (frogswimmingsides v)\nchange x by (XVel)\nYSmoothing\nif <touching (map v)?> then\n    set [playerx v] to ((x position) - (MapX))\n    FindXPosition\n    set [xvel v] to [0]\nend\nif <([abs v] of (XVel) ) > [4.333]> then\n    set [xvel v] to ((XVel) / (1.2))\nelse\n    set [xvel v] to ((XVel) / (1.3))\nend\nif <([abs v] of (YVel) ) > [4.333]> then\n    set [yvel v] to ((YVel) / (1.2))\nelse\n    set [yvel v] to ((YVel) / (1.3))\nend\nset [playerx v] to ((x position) - (MapX))\nset [playery v] to ((y position) - (MapY))\n\ndefine FrogMovement\nset [spinning v] to [0]\nset [statue v] to [0]\nset [tanookiflying v] to [0]\nif <<<(YVel) > [-12]> and <(Statue) = [0]>> or <<(YVel) > [-16]> and <(Statue) = [1]>>> then\n    change [yvel v] by ((Gravity) / (3.3))\n    if <<(YVel) > [0]> and <not <<key (w v) pressed?> or <key (up arrow v) pressed?>>>> then\n        set [yvel v] to ((YVel) / (1.2))\n    end\nend\nswitch costume to (allbottom v)\nchange y by (Gravity)\nif <<touching (map v)?> or <<<touching (semisolids v)?> or <touching (platforms v)?>> and <not <(YVel) > [0]>>>> then\n    change y by ((Gravity) * (-1))\n    set [yvel v] to [0]\n    if <<key (w v) pressed?> or <key (up arrow v) pressed?>> then\n        start sound [Jump v]\n        if <([abs v] of (XVel) ) > [2]> then\n            set [yvel v] to [20]\n        else\n            set [yvel v] to [18]\n        end\n    end\n    FindFloor\nend\nif <(YVel) > [0]> then\n    switch costume to (bigtop v)\nelse\n    switch costume to (allbottom v)\nend\nchange y by (YVel)\nif <<touching (map v)?> or <<<touching (semisolids v)?> or <touching (platforms v)?>> and <not <(YVel) > [0]>>>> then\n    if <(YVel) > [0]> then\n        FindCeiling\n        set [yvel v] to [3]\n    else\n        change y by ((YVel) * (-1))\n        FindFloor\n        set [yvel v] to [0]\n    end\nend\nif <<(Statue) = [0]> and <<(SlidingFunction) = [0]> and <(Crouching) = [0]>>> then\n    if <<<key (d v) pressed?> or <key (right arrow v) pressed?>> and <not <<key (a v) pressed?> or <key (left arrow v) pressed?>>>> then\n        change [xvel v] by (1)\n        point in direction (90)\n    end\n    if <<<key (a v) pressed?> or <key (left arrow v) pressed?>> and <not <<key (d v) pressed?> or <key (right arrow v) pressed?>>>> then\n        change [xvel v] by (-1)\n        point in direction (-90)\n    end\nend\nswitch costume to (bigsides v)\nchange x by (XVel)\nYSmoothing\nif <touching (map v)?> then\n    set [playerx v] to ((x position) - (MapX))\n    FindXPosition\n    set [xvel v] to [0]\nend\nif <<(Crouching) = [1]> or <(Sliding) = [1]>> then\n    set [xvel v] to ((XVel) / (1.1))\nelse\n    if <(YVel) = [0]> then\n        set [xvel v] to ((XVel) / (1.2))\n        if <(([floor v] of (((PlayerCostumeNo.) * (2.5)) mod (4)) ) + (1)) = [1]> then\n            if <([abs v] of (XVel) ) > [1]> then\n                if <(XVel) > [0]> then\n                    set [xvel v] to [1]\n                else\n                    set [xvel v] to [-1]\n                end\n            end\n        end\n    else\n        set [xvel v] to ((XVel) / (1.15))\n    end\nend\nset [playerx v] to ((x position) - (MapX))\nset [playery v] to ((y position) - (MapY))\n\n@Map\n\nwhen I receive [gametick v]\nif <(CloneNo.) = [0]> then\n    change [playercostumeno. v] by (0.1)\nend\nswitch costume to (sizebypass v)\nset size to (350) %\nswitch costume to (join (Level) (join [-] (CloneNo.)))\ngo to x: ((MapX) + ((CloneNo.) * (1680))) y: (MapY)\nif <([abs v] of ((MapX) + ((CloneNo.) * (1680))) ) > [1078]> then\n    hide\nelse\n    show\nend\nif <(CloneNo.) = [0]> then\n    if <<(Dead) = [0]> and <(PassedGoal) = [0]>> then\n        broadcast (PlayerHitboxSwitch v)\n    else\n        broadcast (UpdateAllPositions v)\n        broadcast (UpdatePlayer v)\n    end\nend\n\nwhen I receive [hidegame v]\nhide\n\nwhen I receive [updateallpositions v]\nswitch costume to (sizebypass v)\nset size to (350) %\nswitch costume to (join (Level) (join [-] (CloneNo.)))\ngo to x: ((MapX) + ((CloneNo.) * (1680))) y: (MapY)\n\nwhen I receive [flagclicked v]\nif <[1] = [1]> then\n    delete this clone\nend\nhide\nset [allowmapchanges v] to [0]\nset [levelscompleted v] to [0]\nset [menu v] to [Main]\nbroadcast (HideGame v)\nbroadcast (HideMap v)\nset [cloneno. v] to [1]\ncreate clone of (_myself_ v)\nset [cloneno. v] to [2]\ncreate clone of (_myself_ v)\nset [cloneno. v] to [3]\ncreate clone of (_myself_ v)\nset [cloneno. v] to [0]\nwait (2.6) seconds\nbroadcast (StartGame v)\nif <[1] = [1]> then\n    delete this clone\nend\nforever\n    change [globalcostumeno. v] by (0.1)\n    if <(Menu) = [Main]> then\n        broadcast (MenuTick v)\n        broadcast (HideGame v)\n        broadcast (HideMap v)\n    else\n        if <(Menu) = [Map]> then\n            broadcast (MapTick v)\n            broadcast (HideMenu v)\n            broadcast (HideGame v)\n        else\n            broadcast (GameTick v)\n            broadcast (HideMenu v)\n            broadcast (HideMap v)\n        end\n    end\n    set [fps v] to ((1) / (timer))\n    reset timer\nend\n\n@Text\n\ndefine ShowText\nset [letter v] to [1]\nrepeat (length of (TextToShow))\n    switch costume to (letter (Letter) of (TextToShow))\n    create clone of (_myself_ v)\n    change x by (((size) / (200)) * (16))\n    change [letter v] by (1)\nend\n\nwhen I receive [gametick v]\nif <[1] = [1]> then\n    delete this clone\nend\nif <<(Dead) = [0]> and <<(PassedGoal) = [0]> and <(AllowPlayerMovement) = [1]>>> then\n    change [time v] by ((-1) / (30))\n    if <(Time) < [0.1]> then\n        set [dead v] to [1]\n        broadcast (Death v)\n    end\nend\nif <(FPS) > [5]> then\n    GameTick\nend\nstop [this script v]\n\nwhen I receive [menutick v]\nif <[1] = [1]> then\n    delete this clone\nend\nset [brightness v] effect to (0)\nif <([floor v] of (((mouse y) + (0)) / (35)) ) = [-3]> then\n    set [brightness v] effect to (25)\n    if <mouse down?> then\n        broadcast (Transition4 v)\n        set [menu v] to [Map]\n        stop all sounds\n    end\nend\ngo to x: (0) y: (-90)\nset size to (200) %\nset [texttoshow v] to [play]\nchange x by (((length of (TextToShow)) - (1)) * (((size) / (200)) * (-8)))\nShowText\n\nwhen I receive [maptick v]\nif <[1] = [1]> then\n    delete this clone\nend\ngo to x: (-215) y: (-170)\nset [texttoshow v] to (join [' *] ([floor v] of (Lives) ))\nShowText\nstop [this script v]\n\nwhen I receive [won v]\nWinning\n\nwhen I receive [flagclicked v]\nif <[1] = [1]> then\n    delete this clone\nend\nhide\nset [ghost v] effect to (100)\nset size to (200) %\nwait (2.6) seconds\nrepeat (20)\n    change [ghost v] effect by (-5)\nend\nclear graphic effects\nstop [this script v]\n\nwhen I start as a clone\nshow\nstop [this script v]\n\ndefine GameTick\nif <[1] = [1]> then\n    delete this clone\nend\ngo to x: (225) y: (172)\nset [texttoshow v] to (round (TotalScore))\nchange x by (((length of (TextToShow)) - (1)) * (((size) / (200)) * (-16)))\nShowText\ngo to x: (0) y: (172)\nset [texttoshow v] to (join [+] ([floor v] of (Time) ))\nchange x by (((length of (TextToShow)) - (1)) * (((size) / (200)) * (-8)))\nShowText\ngo to x: (64) y: (172)\nif <([floor v] of (Coins) ) > [99]> then\n    set [coins v] to [0]\n    change [lives v] by (1)\n    start sound [1Up v]\nend\nset [texttoshow v] to (join [.] ([floor v] of (Coins) ))\nShowText\ngo to x: (-64) y: (172)\nset [texttoshow v] to (join [' *] ([floor v] of (Lives) ))\nchange x by (((length of (TextToShow)) - (1)) * (((size) / (200)) * (-16)))\nShowText\n\nwhen I receive [startgame v]\nclear graphic effects\nif <[1] = [1]> then\n    delete this clone\nend\nset size to (200) %\nhide\n\ndefine Winning\nif <[1] = [1]> then\n    delete this clone\nend\nset [score v] to (([floor v] of (Time) ) * (100))\nrepeat (30)\n    go to x: (0) y: (60)\n    set [texttoshow v] to [level cleared]\n    change x by (((length of (TextToShow)) - (1)) * (((size) / (200)) * (-8)))\n    ShowText\nend\nrepeat (60)\n    go to x: (0) y: (60)\n    set [texttoshow v] to [level cleared]\n    change x by (((length of (TextToShow)) - (1)) * (((size) / (200)) * (-8)))\n    ShowText\n    go to x: (0) y: (20)\n    set [texttoshow v] to (join (join ([floor v] of (Time) ) [ * 100 = ]) (Score))\n    change x by (((length of (TextToShow)) - (1)) * (((size) / (200)) * (-8)))\n    ShowText\nend\nset [scoreend v] to ((Score) / (60))\nrepeat (60)\n    start sound [Score v]\n    change [totalscore v] by (ScoreEnd)\n    change [score v] by ((ScoreEnd) / (-1))\n    go to x: (0) y: (60)\n    set [texttoshow v] to [level cleared]\n    change x by (((length of (TextToShow)) - (1)) * (((size) / (200)) * (-8)))\n    ShowText\n    go to x: (0) y: (20)\n    set [texttoshow v] to (join (join ([floor v] of (Time) ) [ * 100 = ]) ([floor v] of (Score) ))\n    change x by (((length of (TextToShow)) - (1)) * (((size) / (200)) * (-8)))\n    ShowText\nend\nset [score v] to [0]\nstart sound [Score2 v]\nrepeat (60)\n    go to x: (0) y: (60)\n    set [texttoshow v] to [level cleared]\n    change x by (((length of (TextToShow)) - (1)) * (((size) / (200)) * (-8)))\n    ShowText\n    go to x: (0) y: (20)\n    set [texttoshow v] to (join (join ([floor v] of (Time) ) [ * 100 = ]) (Score))\n    change x by (((length of (TextToShow)) - (1)) * (((size) / (200)) * (-8)))\n    ShowText\nend\nstop [this script v]\n\nwhen I receive [bossdefeated v]\nWinning\n\nwhen I receive [worldmapupdated v]\nclear graphic effects\n\n@WorldPlayer\n\nwhen I receive [maptick v]\nswitch costume to (3 v)\nbroadcast (WorldPlayerUpdate v)\n\nwhen I receive [worldmapupdated v]\nif <(Repeating) > [0]> then\n    move (7.2) steps\n    change [repeating v] by (-1)\n    if <(Repeating) < [0]> then\n        set [repeating v] to [0]\n    end\n    if <(Repeating) = [0]> then\n        if <<touching color (#fffbff)?> or <touching color (#ffc36b)?>> then\n            set [mapmoving v] to [0]\n            if <(LevelHovering) > [0]> then\n                start sound [Move v]\n            end\n        else\n            set [repeating v] to [5]\n        end\n    end\nend\nswitch costume to (join (([floor v] of ((GlobalCostumeNo.) mod (2)) ) + (1)) (Powerup))\n\nwhen I receive [flagclicked v]\nset [world v] to [1]\nif <[1] = [1]> then\n    delete this clone\nend\nbroadcast (MapChange v)\n\nwhen I receive [gameover v]\nset [powerup v] to [None]\nset [powerupcollected v] to [None]\nset [previouspowerup v] to [None]\nset [lives v] to [5]\nset [coins v] to [0]\nset [totalscore v] to [0]\nset [levelscompleted v] to [0]\nset [repeating v] to [0]\nset [loadinglevel v] to [0]\nset rotation style [don't rotate v]\nhide\nset size to (225) %\ngo to x: (-186) y: (72)\nwait until <(Menu) = [Map]>\nset [repeating v] to [0]\nset [loadinglevel v] to [0]\n\nwhen I receive [mapchange v]\nset [level v] to [0]\nset [repeating v] to [0]\nset [loadinglevel v] to [0]\nset rotation style [don't rotate v]\nhide\nset size to (225) %\ngo to x: (-186) y: (72)\nstop all sounds\nrepeat (10)\n    set [repeating v] to [0]\n    set [loadinglevel v] to [0]\n    set rotation style [don't rotate v]\n    hide\n    set size to (225) %\n    go to x: (-186) y: (72)\nend\nwait until <(Menu) = [Map]>\nset [repeating v] to [0]\nset [loadinglevel v] to [0]\nforever\n    hide\n    wait until <(Menu) = [Map]>\n    show\n    if <<(LoadingLevel) = [0]> and <(AllowMapChanges) = [1]>> then\n        if <<<key (w v) pressed?> or <key (up arrow v) pressed?>> and <<not <<(LevelHovering) = [7]> and <(LevelsCompleted) < [7]>>> and <<not <<(LevelHovering) = [14]> and <(LevelsCompleted) < [14]>>> and <<not <(LevelHovering) = [8]>> and <not <(LevelHovering) = [14]>>>>>> then\n            point in direction (0)\n            move (36) steps\n            switch costume to (3 v)\n            if <touching (worldmap v)?> then\n                move (-36) steps\n                set [mapmoving v] to [1]\n                set [repeating v] to [5]\n                wait until <(Repeating) = [0]>\n                repeat until <(MapMoving) = [0]>\n                    set [repeating v] to [5]\n                    wait until <(Repeating) = [0]>\n                end\n            else\n                move (-36) steps\n            end\n        end\n        if <<<key (s v) pressed?> or <key (down arrow v) pressed?>> and <<<not <<(LevelHovering) = [3]> and <(LevelsCompleted) < [3]>>> and <not <<(LevelHovering) = [5]> and <(LevelsCompleted) < [5]>>>> and <<not <<(LevelHovering) = [6]> and <(LevelsCompleted) < [6]>>> and <not <<(LevelHovering) = [10]> and <(LevelsCompleted) < [10]>>>>>> then\n            point in direction (180)\n            move (36) steps\n            switch costume to (3 v)\n            if <touching (worldmap v)?> then\n                move (-36) steps\n                set [mapmoving v] to [1]\n                set [repeating v] to [5]\n                wait until <(Repeating) = [0]>\n                repeat until <(MapMoving) = [0]>\n                    set [repeating v] to [5]\n                    wait until <(Repeating) = [0]>\n                end\n            else\n                move (-36) steps\n            end\n        end\n        if <<<key (d v) pressed?> or <key (right arrow v) pressed?>> and <<<not <<(LevelHovering) = [1]> and <(LevelsCompleted) < [1]>>> and <not <<(LevelHovering) = [11]> and <(LevelsCompleted) < [11]>>>> and <<not <<(LevelHovering) = [2]> and <(LevelsCompleted) < [2]>>> and <not <<(LevelHovering) = [12]> and <(LevelsCompleted) < [12]>>>>>> then\n            point in direction (90)\n            move (36) steps\n            switch costume to (3 v)\n            if <touching (worldmap v)?> then\n                move (-36) steps\n                set [mapmoving v] to [1]\n                set [repeating v] to [5]\n                wait until <(Repeating) = [0]>\n                repeat until <(MapMoving) = [0]>\n                    set [repeating v] to [5]\n                    wait until <(Repeating) = [0]>\n                end\n            else\n                move (-36) steps\n            end\n        end\n        if <<<<key (a v) pressed?> or <key (left arrow v) pressed?>> and <not <(x position) < [-180]>>> and <<not <<(LevelHovering) = [4]> and <(LevelsCompleted) < [4]>>> and <<not <<(LevelHovering) = [9]> and <(LevelsCompleted) < [9]>>> and <not <<(LevelHovering) = [13]> and <(LevelsCompleted) < [13]>>>>>> then\n            point in direction (-90)\n            move (36) steps\n            switch costume to (3 v)\n            if <touching (worldmap v)?> then\n                move (-36) steps\n                set [mapmoving v] to [1]\n                set [repeating v] to [5]\n                wait until <(Repeating) = [0]>\n                repeat until <(MapMoving) = [0]>\n                    wait until <(Repeating) = [0]>\n                end\n            else\n                move (-36) steps\n            end\n        end\n    end\n    if <<<(MapMoving) = [0]> and <(LevelHovering) > [0]>> and <(AllowMapChanges) = [1]>> then\n        if <<key (space v) pressed?> and <(LoadingLevel) = [0]>> then\n            set [allowplayermovement v] to [0]\n            set [loadinglevel v] to (LevelHovering)\n            broadcast (Transition1 v)\n            wait (2) seconds\n            stop all sounds\n            set [level v] to (LoadingLevel)\n            set [menu v] to [Game]\n            hide\n            broadcast (StartGame v)\n            set [loadinglevel v] to [0]\n            if <<(ClearedLag?) = [0]> or <(FPS) < [15]>> then\n                broadcast (Delay v)\n                repeat (120)\n                    set [allowplayermovement v] to [0]\n                end\n                broadcast (StartGame v)\n                set [clearedlag? v] to [1]\n            end\n        end\n    end\nend\n\n@SemiSolids\n\nwhen I receive [movemapparts v]\nswitch costume to (sizebypass v)\nset size to (350) %\nswitch costume to (join (Level) (join [-] (CloneNo.)))\ngo to x: ((MapX) + ((CloneNo.) * (1680))) y: (MapY)\nif <([abs v] of ((MapX) + ((CloneNo.) * (1680))) ) > [1078]> then\n    hide\nelse\n    show\nend\nif <(CloneNo.) = [0]> then\n    broadcast (UpdateEverything v)\nend\n\nwhen I receive [hidegame v]\nhide\n\nwhen I receive [flagclicked v]\nif <[1] = [1]> then\n    delete this clone\nend\nset [ghost v] effect to (100)\nhide\n\nwhen I receive [startgame v]\nif <[1] = [1]> then\n    delete this clone\nend\nset [ghost v] effect to (100)\nhide\nset [cloneno. v] to [1]\ncreate clone of (_myself_ v)\nset [cloneno. v] to [2]\ncreate clone of (_myself_ v)\nset [cloneno. v] to [3]\ncreate clone of (_myself_ v)\nset [cloneno. v] to [0]\n\nwhen I receive [updateallpositions v]\nswitch costume to (sizebypass v)\nset size to (350) %\nswitch costume to (join (Level) (join [-] (CloneNo.)))\ngo to x: ((MapX) + ((CloneNo.) * (1680))) y: (MapY)\nif <([abs v] of ((MapX) + ((CloneNo.) * (1680))) ) > [1078]> then\n    hide\nelse\n    show\nend\n\n@WorldMap\n\nwhen I receive [worldplayerupdate v]\ngo to [back v] layer\ngo [forward v] (5) layers\ngo to x: (48) y: (72)\nset size to (450) %\nshow\nif <[1] = [1]> then\n    delete this clone\nend\nset [levelhovering v] to [0]\nif <(World) = [1]> then\n    switch costume to (1 v)\n    create clone of (_myself_ v)\n    switch costume to (2 v)\n    create clone of (_myself_ v)\n    switch costume to (3 v)\n    create clone of (_myself_ v)\n    switch costume to (4 v)\n    create clone of (_myself_ v)\n    switch costume to (5 v)\n    create clone of (_myself_ v)\n    switch costume to (6 v)\n    create clone of (_myself_ v)\n    switch costume to (7 v)\n    create clone of (_myself_ v)\n    switch costume to (8 v)\n    create clone of (_myself_ v)\nend\nif <(World) = [2]> then\n    switch costume to (9 v)\n    create clone of (_myself_ v)\n    switch costume to (10 v)\n    create clone of (_myself_ v)\n    switch costume to (11 v)\n    create clone of (_myself_ v)\n    switch costume to (12 v)\n    create clone of (_myself_ v)\n    switch costume to (13 v)\n    create clone of (_myself_ v)\n    switch costume to (14 v)\n    create clone of (_myself_ v)\n    switch costume to (14 v)\n    create clone of (_myself_ v)\nend\nswitch costume to (join [Map] (World))\nbroadcast (WorldMapUpdated v)\n\nwhen I receive [hidemap v]\nif <[1] = [1]> then\n    delete this clone\nend\nhide\n\nwhen I start as a clone\ngo [forward v] (9) layers\nif <touching (worldplayer v)?> then\n    set [levelhovering v] to (costume [name v])\n    set [brightness v] effect to (25)\nend\nwait (0) seconds\ndelete this clone\n\nwhen I receive [flagclicked v]\nif <[1] = [1]> then\n    delete this clone\nend\nhide\ngo to x: (48) y: (72)\nset size to (450) %\n\n@WorldMapBackground\n\nwhen I receive [hidemap v]\nhide\n\nwhen I receive [maptick v]\nhide\ngo to x: (48) y: (72)\nset size to (450) %\nswitch costume to (([floor v] of ((GlobalCostumeNo.) mod (4)) ) + ((((World) - (1)) * (4)) + (1)))\nshow\n\nwhen I receive [flagclicked v]\ngo to [back v] layer\nhide\ngo to x: (48) y: (72)\nset size to (450) %\n\n@Background\n\nwhen I receive [updateeverything v]\ngo to [back v] layer\ngo [forward v] (4) layers\nswitch costume to (sizebypass v)\nset size to (350) %\nif <<<(Level) = [4]> or <(Level) = [11]>> and <(CloneNo.) = [0]>> then\n    switch costume to (join [Lava] (([floor v] of (((GlobalCostumeNo.) * (1.5)) mod (4)) ) + (1)))\nelse\n    switch costume to (join (Level) (join [-] (CloneNo.)))\nend\ngo to x: ((MapX) + ((CloneNo.) * (1680))) y: (MapY)\nif <([abs v] of ((MapX) + ((CloneNo.) * (1680))) ) > [1078]> then\n    hide\nelse\n    show\nend\nif <(CloneNo.) = [0]> then\n    broadcast (UpdatePlayer v)\nend\n\nwhen I receive [hidegame v]\nif <[1] = [1]> then\n    delete this clone\nend\nhide\n\nwhen I receive [updateallpositions v]\nswitch costume to (sizebypass v)\nset size to (350) %\nif <<<(Level) = [4]> or <(Level) = [11]>> and <(CloneNo.) = [0]>> then\n    switch costume to (join [Lava] (([floor v] of (((GlobalCostumeNo.) * (1.5)) mod (4)) ) + (1)))\nelse\n    switch costume to (join (Level) (join [-] (CloneNo.)))\nend\ngo to x: ((MapX) + ((CloneNo.) * (1680))) y: (MapY)\n\nwhen I receive [flagclicked v]\nif <[1] = [1]> then\n    delete this clone\nend\nhide\nset [cloneno. v] to [1]\ncreate clone of (_myself_ v)\nset [cloneno. v] to [2]\ncreate clone of (_myself_ v)\nset [cloneno. v] to [3]\ncreate clone of (_myself_ v)\nset [cloneno. v] to [0]\n\nwhen I receive [startgame v]\nif <[1] = [1]> then\n    delete this clone\nend\nhide\nset [cloneno. v] to [1]\ncreate clone of (_myself_ v)\nset [cloneno. v] to [2]\ncreate clone of (_myself_ v)\nset [cloneno. v] to [3]\ncreate clone of (_myself_ v)\nset [cloneno. v] to [0]\n\n@? Blocks\n\nwhen I receive [updateeverything v]\nif <[1] = [1]> then\n    delete this clone\nend\nswitch costume to (5 v)\nif <(DeleteBlockNo.) > [0]> then\n    delete (DeleteBlockNo.) of [blockx v]\n    delete (DeleteBlockNo.) of [blocky v]\n    delete (DeleteBlockNo.) of [blockcontents v]\n    set [deleteblockno. v] to [0]\nend\nFormBlocks\n\ndefine FormBlocks\nshow\nset [blockno. v] to [0]\nrepeat (length of [blockx v])\n    change [blockno. v] by (1)\n    go to x: ((((item (BlockNo.) of [blockx v]) + (0.5)) * (28)) + (MapX)) y: (((item (BlockNo.) of [blocky v]) * (28)) + (MapY))\n    if <<<(x position) < [240]> and <(x position) > [-240]>> and <<(y position) < [180]> and <(y position) > [-166]>>> then\n        create clone of (_myself_ v)\n    end\nend\nset [blockno. v] to [0]\nhide\n\ndefine AddBlock (x) (y) (contents)\nadd (x) to [blockx v]\nadd (y) to [blocky v]\nadd (contents) to [blockcontents v]\n\nwhen I receive [startgame v]\nif <[1] = [1]> then\n    delete this clone\nend\nset [deleteblockno. v] to [0]\ndelete all of [blockx v]\ndelete all of [blocky v]\ndelete all of [blockcontents v]\nif <(Level) = [1]> then\n    AddBlock [-14] [6] [C]\n    AddBlock [-4] [6] [M]\n    AddBlock [6] [14] [C]\n    AddBlock [14] [8] [T]\n    AddBlock [37] [7] [1]\n    AddBlock [59] [7] [C]\n    AddBlock [76] [5] [M]\n    AddBlock [97] [8] [T]\n    AddBlock [124] [7] [C]\n    AddBlock [156] [10] [C]\n    AddBlock [172] [7] [C]\n    AddBlock [177] [13] [C]\nend\nif <(Level) = [2]> then\n    AddBlock [-17] [6] [C]\n    AddBlock [-8] [10] [T]\n    AddBlock [48] [8] [M]\n    AddBlock [73] [8] [M]\n    AddBlock [110] [15] [1]\n    AddBlock [125] [10] [M]\nend\nif <(Level) = [3]> then\n    AddBlock [-23] [6] [F]\n    AddBlock [-4] [-10] [F]\n    AddBlock [127] [-13] [F]\n    AddBlock [114] [7] [C]\nend\nif <(Level) = [4]> then\n    AddBlock [-20] [6] [M]\n    AddBlock [2] [4] [F]\n    AddBlock [71] [6] [M]\nend\nif <(Level) = [5]> then\n    AddBlock [20] [-11] [M]\nend\nif <(Level) = [7]> then\n    AddBlock [-19] [4] [C]\n    AddBlock [-18] [4] [C]\n    AddBlock [-16] [7] [C]\n    AddBlock [-15] [7] [M]\n    AddBlock [-4] [6] [C]\n    AddBlock [14] [4] [T]\n    AddBlock [60] [18] [1]\nend\nif <(Level) = [8]> then\n    AddBlock [-20] [10] [F]\nend\nif <(Level) = [9]> then\n    AddBlock [-18] [7] [M]\n    AddBlock [7] [21] [1]\n    AddBlock [-1] [5] [C]\n    AddBlock [47] [9] [F]\n    AddBlock [64] [9] [C]\n    AddBlock [68] [2] [1]\n    AddBlock [96] [6] [F]\n    AddBlock [116] [9] [1]\n    AddBlock [130] [6] [C]\nend\nif <(Level) = [10]> then\n    AddBlock [-24] [7] [S]\n    AddBlock [16] [-10] [S]\n    AddBlock [122] [-9] [S]\n    AddBlock [121] [7] [C]\n    AddBlock [123] [7] [C]\n    AddBlock [122] [12] [1]\nend\nif <(Level) = [11]> then\n    AddBlock [-22] [8] [S]\n    AddBlock [19] [21] [1]\n    AddBlock [26] [10] [M]\n    AddBlock [60] [6] [M]\n    AddBlock [71] [9] [1]\nend\nif <(Level) = [12]> then\n    AddBlock [94] [5] [C]\n    AddBlock [96] [5] [C]\n    AddBlock [95] [9] [F]\n    AddBlock [119] [9] [1]\nend\nif <(Level) = [13]> then\n    AddBlock [-4] [10] [S]\nend\nif <(Level) = [14]> then\n    AddBlock [-19] [10] [S]\n    AddBlock [-16] [6] [1]\n    AddBlock [12] [3] [S]\n    AddBlock [47] [7] [M]\nend\n\nwhen I receive [playerupdated v]\nif <(DeleteBlockNo.) = [0]> then\n    if <touching (player v)?> then\n        set [brightness v] effect to (25)\n        change y by (1)\n        set [spawnx v] to ((item (BlockNo.) of [blockx v]) + (0.5))\n        set [spawny v] to (item (BlockNo.) of [blocky v])\n        if <(item (BlockNo.) of [blockcontents v]) = [C]> then\n            create clone of (coinanimation v)\n            start sound [Coin v]\n        else\n            start sound [Appear v]\n        end\n        if <(item (BlockNo.) of [blockcontents v]) = [M]> then\n            add (SpawnX) to [itemx v]\n            add (SpawnY) to [itemy v]\n            add [Big] to [itemtype v]\n            add ([direction v] of [player v]) to [itemdir v]\n            add [0] to [itemyvelocity v]\n            add [0] to [itemstate v]\n        end\n        if <(item (BlockNo.) of [blockcontents v]) = [T]> then\n            add (SpawnX) to [itemx v]\n            add (SpawnY) to [itemy v]\n            add [Tanooki] to [itemtype v]\n            add [90] to [itemdir v]\n            add [0] to [itemyvelocity v]\n            add [1] to [itemstate v]\n        end\n        if <(item (BlockNo.) of [blockcontents v]) = [F]> then\n            add (SpawnX) to [itemx v]\n            add (SpawnY) to [itemy v]\n            add [Fire] to [itemtype v]\n            add [90] to [itemdir v]\n            add [0] to [itemyvelocity v]\n            add [1] to [itemstate v]\n        end\n        if <(item (BlockNo.) of [blockcontents v]) = [S]> then\n            add (SpawnX) to [itemx v]\n            add (SpawnY) to [itemy v]\n            add [Frog] to [itemtype v]\n            add [90] to [itemdir v]\n            add [0] to [itemyvelocity v]\n            add [1] to [itemstate v]\n        end\n        if <(item (BlockNo.) of [blockcontents v]) = [1]> then\n            add (SpawnX) to [itemx v]\n            add (SpawnY) to [itemy v]\n            add [1Up] to [itemtype v]\n            add ([direction v] of [player v]) to [itemdir v]\n            add [0] to [itemyvelocity v]\n            add [1] to [itemstate v]\n        end\n        set [deleteblockno. v] to (BlockNo.)\n    end\nend\n\nwhen I receive [hidegame v]\nif <[1] = [1]> then\n    delete this clone\nend\nhide\n\nwhen I receive [updateallpositions v]\ngo to x: ((((item (BlockNo.) of [blockx v]) + (0.5)) * (28)) + (MapX)) y: (((item (BlockNo.) of [blocky v]) * (28)) + (MapY))\n\nwhen I receive [costumeeverything v]\nswitch costume to (([floor v] of (((GlobalCostumeNo.) * (2)) mod (4)) ) + (1))\n\nwhen I receive [flagclicked v]\ngo to x: (0) y: (0)\nset size to (350) %\nhide\nif <[1] = [1]> then\n    delete this clone\nend\n\n@CoinAnimation\n\nwhen I start as a clone\nchange [coins v] by (1)\nswitch costume to (1 v)\nset [myx v] to (SpawnX)\nset [myy v] to ((SpawnY) + (1))\nset [timesincespawn v] to [0]\nwait (0.68) seconds\nrepeat (4)\n    change [ghost v] effect by (20)\nend\ndelete this clone\n\nwhen I receive [gametick v]\nif <(costume [number v]) > [1]> then\n    show\n    switch costume to (([floor v] of (((GlobalCostumeNo.) * (2)) mod (4)) ) + (2))\n    go to x: (((MyX) * (28)) + (MapX)) y: (((MyY) * (28)) + (MapY))\n    change [timesincespawn v] by (1)\n    change [myy v] by (((12) - (TimeSinceSpawn)) / (28))\nend\n\nwhen I receive [hidegame v]\nhide\n\nwhen I receive [flagclicked v]\nif <[1] = [1]> then\n    delete this clone\nend\nclear graphic effects\nset size to (350) %\nswitch costume to (notaclone v)\nhide\n\n@Setting\n\nwhen I receive [updateeverything v]\nswitch costume to (sizebypass v)\nset size to (240) %\nif <(Underground) = [1]> then\n    if <<(Level) = [3]> or <(Level) = [10]>> then\n        switch costume to (3u v)\n    end\n    if <<(Level) = [4]> or <(Level) = [11]>> then\n        switch costume to (4 v)\n    end\n    if <(Level) = [5]> then\n        switch costume to (5 v)\n    end\nelse\n    if <<(Level) = [1]> or <(Level) = [3]>> then\n        switch costume to (1 v)\n    end\n    if <(Level) = [2]> then\n        switch costume to (2 v)\n    end\n    if <<(Level) = [4]> or <(Level) = [11]>> then\n        switch costume to (4 v)\n    end\n    if <(Level) = [5]> then\n        switch costume to (5 v)\n    end\n    if <(Level) = [6]> then\n        switch costume to (6 v)\n    end\n    if <(Level) = [7]> then\n        switch costume to (1 v)\n    end\n    if <<(Level) = [8]> or <(Level) = [14]>> then\n        if <([sin v] of ((GlobalCostumeNo.) * (20)) ) > [0.988]> then\n            if <([sin v] of ((GlobalCostumeNo.) * (20)) ) > [0.995]> then\n                switch costume to (8b v)\n                if <<(CloneNo.) = [0]> and <([sin v] of ((GlobalCostumeNo.) * (20)) ) > [0.999]>> then\n                    start sound [Thunder v]\n                end\n            else\n                switch costume to (8a v)\n            end\n        else\n            switch costume to (8 v)\n        end\n    end\n    if <<(Level) = [9]> or <(Level) = [13]>> then\n        switch costume to (9 v)\n    end\n    if <<(Level) = [10]> or <(Level) = [12]>> then\n        switch costume to (10 v)\n    end\nend\nif <<<(Level) = [8]> or <(Level) = [14]>> and <(Underground) = [1]>> then\n    switch costume to (sizebypass v)\n    set size to (110) %\n    switch costume to (8c v)\n    go to [back v] layer\n    go to x: (14) y: (0)\n    show\n    if <not <([abs v] of (x position) ) = [801]>> then\n        go [forward v] (1) layers\n    end\nelse\n    go to [back v] layer\n    go to x: ((((MapX) * (0.8)) mod (1152)) + ((CloneNo.) * (-1152))) y: (((MapY) + (((138) * <(Underground) = [0]>) + ((-138) * <(Underground) = [1]>))) / (4))\n    show\n    if <not <([abs v] of (x position) ) = [801]>> then\n        go [forward v] (1) layers\n    end\nend\n\nwhen I receive [hidegame v]\nhide\n\nwhen I receive [bossdefeated v]\nset [color v] effect to (0)\nset [brightness v] effect to (10)\nrepeat (50)\n    change [color v] effect by (40)\n    set [brightness v] effect to ((((GlobalCostumeNo.) * (25)) mod (25)) + (10))\nend\nset [brightness v] effect to (10)\nrepeat (10)\n    change [color v] effect by (40)\n    change [brightness v] effect by (-1)\nend\nset [color v] effect to (0)\nset [brightness v] effect to (0)\n\nwhen I receive [flagclicked v]\nif <[1] = [1]> then\n    delete this clone\nend\nhide\nset [cloneno. v] to [1]\ncreate clone of (_myself_ v)\nset [cloneno. v] to [0]\n\n@Items\n\nwhen I receive [updateeverything v]\nif <[1] = [1]> then\n    delete this clone\nend\nset [x v] to ([floor v] of (((mouse x) - (MapX)) / (28)) )\nset [y v] to ([floor v] of ((((mouse y) + (14)) - (MapY)) / (28)) )\nswitch costume to (hitbox v)\nif <(DeleteItemNo.) > [0]> then\n    delete (DeleteItemNo.) of [itemx v]\n    delete (DeleteItemNo.) of [itemy v]\n    delete (DeleteItemNo.) of [itemtype v]\n    delete (DeleteItemNo.) of [itemdir v]\n    delete (DeleteItemNo.) of [itemyvelocity v]\n    delete (DeleteItemNo.) of [itemstate v]\n    set [deleteitemno. v] to [0]\n    set [spawnx v] to (x position)\n    set [spawny v] to (y position)\n    create clone of (fx v)\nend\nif <(length of [itemx v]) > [0]> then\n    FormItems\nend\n\ndefine FormItems\nshow\nset [itemno. v] to [0]\nrepeat (length of [itemx v])\n    change [itemno. v] by (1)\n    go to x: (((item (ItemNo.) of [itemx v]) * (28)) + (MapX)) y: (((item (ItemNo.) of [itemy v]) * (28)) + (MapY))\n    if <<<(x position) < [240]> and <(x position) > [-240]>> and <<<(y position) < [180]> and <(Underground) = [1]>> or <<(y position) > [-180]> and <(Underground) = [0]>>>> then\n        point in direction (item (ItemNo.) of [itemdir v])\n        create clone of (_myself_ v)\n    end\nend\nset [itemno. v] to [0]\nhide\n\nwhen I start as a clone\nif <<(item (ItemNo.) of [itemtype v]) = [Big]> or <(item (ItemNo.) of [itemtype v]) = [1Up]>> then\n    change y by ((Gravity) * (2.5))\n    if <<touching (map v)?> or <touching (semisolids v)?>> then\n        change y by ((Gravity) * (-2.5))\n        FindFloor\n    end\n    move (2) steps\n    YSmoothing\n    if <touching (map v)?> then\n        turn right (180) degrees\n        move (4) steps\n        if <touching (map v)?> then\n            turn right (180) degrees\n            move (2) steps\n        end\n        replace item (ItemNo.) of [itemdir v] with (direction)\n    end\nend\nif <(item (ItemNo.) of [itemtype v]) = [Raccoon]> then\n    turn right (4) degrees\n    if <<(direction) > [-180]> and <(direction) < [0]>> then\n        change y by (([cos v] of (direction) ) * (1))\n    else\n        change y by (([cos v] of (direction) ) * (-1))\n    end\n    change x by (([sin v] of (direction) ) * (3))\n    change y by (-0.6)\n    replace item (ItemNo.) of [itemdir v] with (direction)\n    if <(y position) < [-170]> then\n        set [deleteitemno. v] to (ItemNo.)\n    end\nend\nif <(item (ItemNo.) of [itemtype v]) = [Tanooki]> then\n    change y by ((Gravity) * (1))\n    if <<touching (map v)?> or <<touching (semisolids v)?> and <(item (ItemNo.) of [itemyvelocity v]) < [0]>>> then\n        change y by ((Gravity) * (-1))\n        replace item (ItemNo.) of [itemyvelocity v] with [13.7]\n        FindFloor\n    end\n    change y by (item (ItemNo.) of [itemyvelocity v])\n    if <<touching (map v)?> or <<touching (semisolids v)?> and <(item (ItemNo.) of [itemyvelocity v]) < [0]>>> then\n        change y by ((item (ItemNo.) of [itemyvelocity v]) * (-1))\n        if <(item (ItemNo.) of [itemyvelocity v]) > [0]> then\n            replace item (ItemNo.) of [itemyvelocity v] with [0]\n        else\n            replace item (ItemNo.) of [itemyvelocity v] with [13.7]\n            FindFloor\n        end\n    end\n    move (1.5) steps\n    if <touching (map v)?> then\n        turn right (180) degrees\n        move (3) steps\n        if <touching (map v)?> then\n            turn right (180) degrees\n            move (1.5) steps\n        end\n        replace item (ItemNo.) of [itemdir v] with (direction)\n    end\n    replace item (ItemNo.) of [itemyvelocity v] with ((item (ItemNo.) of [itemyvelocity v]) - (0.7))\nend\nif <(item (ItemNo.) of [itemtype v]) = [Fire]> then\n    change y by ((Gravity) * (2.5))\n    if <<touching (map v)?> or <touching (semisolids v)?>> then\n        change y by ((Gravity) * (-2.5))\n        FindFloor\n    end\nend\nif <(item (ItemNo.) of [itemtype v]) = [Frog]> then\n    change y by ((Gravity) * (0.8))\n    if <<touching (map v)?> or <<touching (semisolids v)?> and <(item (ItemNo.) of [itemyvelocity v]) < [0]>>> then\n        change y by ((Gravity) * (-0.8))\n        replace item (ItemNo.) of [itemyvelocity v] with [10]\n        FindFloor\n    end\n    change y by (item (ItemNo.) of [itemyvelocity v])\n    if <<touching (map v)?> or <<touching (semisolids v)?> and <(item (ItemNo.) of [itemyvelocity v]) < [0]>>> then\n        change y by ((item (ItemNo.) of [itemyvelocity v]) * (-1))\n        if <(item (ItemNo.) of [itemyvelocity v]) > [0]> then\n            replace item (ItemNo.) of [itemyvelocity v] with [0]\n        else\n            replace item (ItemNo.) of [itemyvelocity v] with [10]\n            FindFloor\n        end\n    end\n    move (2) steps\n    if <touching (map v)?> then\n        turn right (180) degrees\n        move (4) steps\n        if <touching (map v)?> then\n            turn right (180) degrees\n            move (2) steps\n        end\n        replace item (ItemNo.) of [itemdir v] with (direction)\n    end\n    replace item (ItemNo.) of [itemyvelocity v] with ((item (ItemNo.) of [itemyvelocity v]) - (0.7))\nend\nreplace item (ItemNo.) of [itemx v] with (((x position) - (MapX)) / (28))\nreplace item (ItemNo.) of [itemy v] with (((y position) - (MapY)) / (28))\n\nwhen I receive [startgame v]\nif <[1] = [1]> then\n    delete this clone\nend\ngo to x: (0) y: (0)\nset size to (350) %\nhide\ndelete all of [itemx v]\ndelete all of [itemy v]\ndelete all of [itemtype v]\ndelete all of [itemdir v]\ndelete all of [itemyvelocity v]\ndelete all of [itemstate v]\nset [deleteitemno. v] to [0]\nset rotation style [left-right v]\n\ndefine FindFloor\nrepeat until <<touching (map v)?> or <touching (semisolids v)?>>\n    change y by (-1)\nend\nchange y by (1)\n\ndefine YSmoothing\nif <<touching (map v)?> or <touching (semisolids v)?>> then\n    repeat (6)\n        if <<touching (map v)?> or <touching (semisolids v)?>> then\n            change y by (1)\n        end\n    end\n    if <<touching (map v)?> or <touching (semisolids v)?>> then\n        change y by (-6)\n    end\nend\n\nwhen I receive [costumeeverything v]\nswitch costume to (item (ItemNo.) of [itemtype v])\n\nwhen I receive [hidegame v]\nif <[1] = [1]> then\n    delete this clone\nend\nhide\n\nwhen I receive [playerupdated v]\nif <touching (player v)?> then\n    if <(item (ItemNo.) of [itemtype v]) = [1Up]> then\n        change [lives v] by (1)\n        start sound [1Up v]\n    else\n        set [powerupcollected v] to (item (ItemNo.) of [itemtype v])\n        broadcast (Powerup v)\n    end\n    set [deleteitemno. v] to (ItemNo.)\nend\n\nwhen I receive [updateallpositions v]\ngo to x: (((item (ItemNo.) of [itemx v]) * (28)) + (MapX)) y: (((item (ItemNo.) of [itemy v]) * (28)) + (MapY))\n\nset [powerupcollected v] to [Tanooki]\nbroadcast (Powerup v)\nset [deleteitemno. v] to (ItemNo.)\n\nset [powerupcollected v] to [Fire]\nbroadcast (Powerup v)\nset [deleteitemno. v] to (ItemNo.)\n\nwhen I receive [flagclicked v]\nif <[1] = [1]> then\n    delete this clone\nend\ngo to x: (0) y: (0)\nset size to (350) %\nhide\ndelete all of [itemx v]\ndelete all of [itemy v]\ndelete all of [itemtype v]\ndelete all of [itemdir v]\ndelete all of [itemyvelocity v]\ndelete all of [itemstate v]\nset [deleteitemno. v] to [0]\nset rotation style [left-right v]\n\nwhen I receive [startgame2 v]\nwait (1) seconds\nbroadcast (StartGame v)\n\nset [powerupcollected v] to [Frog]\nbroadcast (Powerup v)\nset [deleteitemno. v] to (ItemNo.)\n\n@Panel\n\nwhen I receive [gametick v]\nif <(costume [number v]) < [4]> then\n    if <<<(x position) < [247]> and <(x position) > [-247]>> and <<(y position) < [187]> and <(y position) > [-187]>>> then\n        show\n    else\n        hide\n    end\n    go to x: ((5640) + (MapX)) y: ((160) + (MapY))\n    if <(Level) = [7]> then\n        go to x: ((3848) + (MapX)) y: ((132) + (MapY))\n    end\n    if <(PassedGoal) = [0]> then\n        switch costume to (([floor v] of (((GlobalCostumeNo.) * (2)) mod (3)) ) + (1))\n        if <touching (player v)?> then\n            if <(LevelsCompleted) < (Level)> then\n                set [levelscompleted v] to (Level)\n            end\n            broadcast (Won v)\n            set [passedgoal v] to [1]\n            set [cloneno. v] to [0]\n            create clone of (_myself_ v)\n            set [cloneno. v] to [1]\n            create clone of (_myself_ v)\n            set [cloneno. v] to [2]\n            create clone of (_myself_ v)\n            set [cloneno. v] to [3]\n        end\n    end\nend\n\nwhen I receive [startgame v]\nif <[1] = [1]> then\n    delete this clone\nend\nset size to (350) %\nclear graphic effects\nswitch costume to (m v)\n\nwhen I receive [won v]\nif <(costume [number v]) < [4]> then\n    set [passedgoal v] to [1]\n    stop all sounds\n    start sound [SMA4-Goal v]\n    start sound [30 Course Clear v]\n    repeat (10)\n        change [ghost v] effect by (10)\n    end\n    wait (6.5) seconds\n    broadcast (Transition3 v)\n    clear graphic effects\n    set [menu v] to [Map]\n    set [passedgoal v] to [0]\nend\n\nwhen I receive [hidegame v]\nif <[1] = [1]> then\n    delete this clone\nend\nhide\n\nwhen I start as a clone\ngo [forward v] (24) layers\nclear graphic effects\nshow\ngo to x: ((164) + ((CloneNo.) * (28))) y: (-165)\nif <(CloneNo.) = [0]> then\n    switch costume to (Box1)\nend\nif <(CloneNo.) = [1]> then\n    switch costume to (Box2)\nend\nif <(CloneNo.) = [2]> then\n    switch costume to (Box3)\nend\nrepeat (240)\n    if <(CloneNo.) = [0]> then\n        switch costume to (Box1)\n    end\n    if <(CloneNo.) = [1]> then\n        switch costume to (Box2)\n    end\n    if <(CloneNo.) = [2]> then\n        switch costume to (Box3)\n    end\nend\ndelete this clone\n\nwhen I receive [won v]\nif <(costume [number v]) < [4]> then\n    if <(Box1) = []> then\n        set [box1 v] to (join [Box] (costume [name v]))\n        wait (1) seconds\n        repeat (7)\n            set [box1 v] to (join [Box] (costume [name v]))\n            wait (0.2) seconds\n            set [box1 v] to []\n            wait (0.2) seconds\n        end\n        set [box1 v] to (join [Box] (costume [name v]))\n    else\n        if <(Box2) = []> then\n            set [box2 v] to (join [Box] (costume [name v]))\n            wait (1) seconds\n            repeat (7)\n                set [box2 v] to (join [Box] (costume [name v]))\n                wait (0.2) seconds\n                set [box2 v] to []\n                wait (0.2) seconds\n            end\n            set [box2 v] to (join [Box] (costume [name v]))\n        else\n            if <(Box3) = []> then\n                set [box3 v] to (join [Box] (costume [name v]))\n                wait (1) seconds\n                repeat (7)\n                    set [box3 v] to (join [Box] (costume [name v]))\n                    wait (0.2) seconds\n                    set [box3 v] to []\n                    wait (0.2) seconds\n                end\n                set [box3 v] to (join [Box] (costume [name v]))\n            end\n        end\n    end\n    if <<not <(Box1) = []>> and <<not <(Box2) = []>> and <not <(Box3) = []>>>> then\n        if <<(Box1) = [BoxM]> and <<(Box2) = [BoxM]> and <(Box3) = [BoxM]>>> then\n            set [box1 v] to (join [Box] [2])\n            change [lives v] by (2)\n        else\n            if <<(Box1) = [BoxF]> and <<(Box2) = [BoxF]> and <(Box3) = [BoxF]>>> then\n                set [box1 v] to (join [Box] [3])\n                change [lives v] by (3)\n            else\n                if <<(Box1) = [BoxS]> and <<(Box2) = [BoxS]> and <(Box3) = [BoxS]>>> then\n                    set [box1 v] to (join [Box] [5])\n                    change [lives v] by (5)\n                else\n                    set [box1 v] to (join [Box] [1])\n                    change [lives v] by (1)\n                end\n            end\n        end\n        set [box2 v] to (join [Box] [U])\n        set [box3 v] to (join [Box] [P])\n        broadcast (RisePanels v)\n        wait (4) seconds\n        set [box1 v] to []\n        set [box2 v] to []\n        set [box3 v] to []\n    end\nend\n\nwhen I receive [risepanels v]\nif <(costume [number v]) > [3]> then\n    repeat (60)\n        change y by (((-124) - (y position)) / (12))\n    end\nend\n\nwhen I receive [bossdefeated v]\nif <(costume [number v]) < [4]> then\n    if <(LevelsCompleted) < (Level)> then\n        set [levelscompleted v] to (Level)\n    end\n    set [passedgoal v] to [1]\n    stop all sounds\n    start sound [SMA4-Goal v]\n    start sound [34 Fortress Clear v]\n    wait (6.5) seconds\n    broadcast (Transition3 v)\n    clear graphic effects\n    set [menu v] to [Map]\n    set [passedgoal v] to [0]\nend\n\nwhen I receive [flagclicked v]\nif <[1] = [1]> then\n    delete this clone\nend\nswitch costume to (m v)\nset [box1 v] to []\nset [box2 v] to []\nset [box3 v] to []\nhide\n\n@Fireballs\n\nwhen I receive [hidegame v]\nif <[1] = [1]> then\n    delete this clone\nend\nhide\n\nwhen I receive [startgame v]\nif <[1] = [1]> then\n    delete this clone\nend\ngo to x: (0) y: (0)\nset size to (350) %\nhide\ndelete all of [fireballx v]\ndelete all of [firebally v]\ndelete all of [fireballtype v]\ndelete all of [fireballdir v]\ndelete all of [fireballbounces v]\nset rotation style [all around v]\nset [deletefireballno. v] to [0]\nif <(Level) = [3]> then\n    AddFireBar [-9.5] [-5]\n    AddFireBar [-0.5] [-16]\n    AddFireBar [40.5] [-7]\n    AddFireBar [40.5] [-13]\n    AddFireBar [49.5] [-7]\n    AddFireBar [49.5] [-13]\n    AddFireBar [58.5] [-7]\n    AddFireBar [58.5] [-13]\n    AddFireBar [102.5] [-10]\n    AddFireBar [108.5] [-10]\n    AddFireBar [119.5] [-7]\n    AddFireBar [165.5] [0]\nend\nif <(Level) = [4]> then\n    AddFireBar [-1.5] [5]\n    AddFireBar [6.5] [5]\n    AddFireBar [38.5] [6]\n    AddFireBar [44.5] [9]\nend\nif <(Level) = [11]> then\n    AddFireBar [15.5] [6]\n    AddFireBar [21.5] [6]\n    AddFireBar [15.5] [10]\n    AddFireBar [21.5] [10]\nend\nif <(Level) = [14]> then\n    AddFireBar [-11.5] [6]\n    AddFireBar [-6.5] [6]\nend\n\nwhen I receive [won v]\nif <[1] = [1]> then\n    delete this clone\nend\ngo to x: (0) y: (0)\nset size to (350) %\nhide\ndelete all of [fireballx v]\ndelete all of [firebally v]\ndelete all of [fireballtype v]\ndelete all of [fireballdir v]\ndelete all of [fireballbounces v]\nset [deletefireballno. v] to [0]\n\nwhen I receive [gametick v]\nif <[1] = [1]> then\n    delete this clone\nend\nif <(DeleteFireballNo.) > [0]> then\n    delete (DeleteFireballNo.) of [fireballx v]\n    delete (DeleteFireballNo.) of [firebally v]\n    delete (DeleteFireballNo.) of [fireballdir v]\n    delete (DeleteFireballNo.) of [fireballtype v]\n    delete (DeleteFireballNo.) of [fireballbounces v]\n    set [deletefireballno. v] to [0]\nend\nif <(length of [fireballx v]) > [0]> then\n    switch costume to (hitbox1 v)\n    FormFireballs\nend\n\nwhen I receive [updateallpositions v]\ngo to x: (((item (FireballNo.) of [fireballx v]) * (28)) + (MapX)) y: (((item (FireballNo.) of [firebally v]) * (28)) + (MapY))\nchange y by (-1)\n\ndefine FormFireballs\nshow\nset [fireballno. v] to [0]\nrepeat (length of [fireballx v])\n    change [fireballno. v] by (1)\n    go to x: (((item (FireballNo.) of [fireballx v]) * (28)) + (MapX)) y: (((item (FireballNo.) of [firebally v]) * (28)) + (MapY))\n    if <<<(((item (FireballNo.) of [fireballx v]) * (28)) + (MapX)) < [240]> and <(((item (FireballNo.) of [fireballx v]) * (28)) + (MapX)) > [-240]>> and <<(((item (FireballNo.) of [firebally v]) * (28)) + (MapY)) < [180]> and <(((item (FireballNo.) of [firebally v]) * (28)) + (MapY)) > [-180]>>> then\n        point in direction (item (FireballNo.) of [fireballdir v])\n        if <(item (FireballNo.) of [fireballtype v]) = [0]> then\n            switch costume to (hitbox2 v)\n            set rotation style [all around v]\n        else\n            switch costume to (hitbox1 v)\n            set rotation style [left-right v]\n        end\n        create clone of (_myself_ v)\n    end\nend\nset [fireballno. v] to [0]\nhide\n\nwhen I start as a clone\nif <(item (FireballNo.) of [fireballtype v]) = [2]> then\n    go [backward v] (12) layers\n    move (3) steps\n    replace item (FireballNo.) of [fireballx v] with (((x position) - (MapX)) / (28))\n    replace item (FireballNo.) of [firebally v] with (((y position) - (MapY)) / (28))\n    if <<touching (map v)?> or <not <<<(x position) < [235]> and <(x position) > [-235]>> and <<(y position) < [175]> and <(y position) > [-175]>>>>> then\n        set [deletefireballno. v] to (FireballNo.)\n    end\n    change y by (-1)\nelse\n    if <(item (FireballNo.) of [fireballtype v]) = [3]> then\n        move (6) steps\n        if <(item (FireballNo.) of [fireballdir v]) > [0]> then\n            turn right (6) degrees\n            if <(direction) > [135]> then\n                point in direction (135)\n            end\n        else\n            turn left (6) degrees\n            if <(direction) < [-135]> then\n                point in direction (-135)\n            end\n        end\n        if <not <<<(x position) < [235]> and <(x position) > [-235]>> and <<(y position) < [175]> and <(y position) > [-175]>>>> then\n            set [deletefireballno. v] to (FireballNo.)\n        end\n        if <<touching (map v)?> or <touching (semisolids v)?>> then\n            replace item (FireballNo.) of [fireballbounces v] with ((item (FireballNo.) of [fireballbounces v]) + (1))\n            if <(item (FireballNo.) of [fireballbounces v]) > [6]> then\n                set [deletefireballno. v] to (FireballNo.)\n            end\n            move (-4) steps\n            if <([abs v] of (direction) ) > [90]> then\n                point in direction ((180) - (direction))\n            else\n                point in direction ((direction) * (-1))\n            end\n            move (4) steps\n        end\n        replace item (FireballNo.) of [fireballx v] with (((x position) - (MapX)) / (28))\n        replace item (FireballNo.) of [firebally v] with (((y position) - (MapY)) / (28))\n        replace item (FireballNo.) of [fireballdir v] with (direction)\n    else\n        if <(item (FireballNo.) of [fireballtype v]) = [0]> then\n            turn right (2.5) degrees\n        else\n            if <<(item (FireballNo.) of [fireballbounces v]) = [0]> and <touching (map v)?>> then\n                set [deletefireballno. v] to (FireballNo.)\n            end\n            switch costume to (hitbox3 v)\n            if <<<<touching (goombas v)?> or <touching (larry v)?>> or <<<touching (piranhaplants v)?> or <touching (bullets v)?>> or <touching (hammerbros v)?>>> or <<touching (koopas v)?> or <<touching (cheepcheep v)?> or <touching (boomboom v)?>>>> then\n                broadcast (FireballHit v)\n                set [deletefireballno. v] to (FireballNo.)\n            end\n            switch costume to (hitbox1 v)\n            move (6) steps\n            if <(item (FireballNo.) of [fireballdir v]) > [0]> then\n                turn right (6) degrees\n                if <(direction) > [135]> then\n                    point in direction (135)\n                end\n            else\n                turn left (6) degrees\n                if <(direction) < [-135]> then\n                    point in direction (-135)\n                end\n            end\n            if <not <<<(x position) < [235]> and <(x position) > [-235]>> and <<(y position) < [175]> and <(y position) > [-175]>>>> then\n                set [deletefireballno. v] to (FireballNo.)\n            end\n            if <<touching (map v)?> or <touching (semisolids v)?>> then\n                replace item (FireballNo.) of [fireballbounces v] with ((item (FireballNo.) of [fireballbounces v]) + (1))\n                if <(item (FireballNo.) of [fireballbounces v]) > [6]> then\n                    set [deletefireballno. v] to (FireballNo.)\n                end\n                move (-4) steps\n                if <([abs v] of (direction) ) > [90]> then\n                    point in direction ((180) - (direction))\n                else\n                    point in direction ((direction) * (-1))\n                end\n                move (4) steps\n            end\n            replace item (FireballNo.) of [fireballx v] with (((x position) - (MapX)) / (28))\n            replace item (FireballNo.) of [firebally v] with (((y position) - (MapY)) / (28))\n        end\n        replace item (FireballNo.) of [fireballdir v] with (direction)\n    end\nend\n\nwhen I receive [costumeeverything v]\nif <(item (FireballNo.) of [fireballtype v]) = [0]> then\n    switch costume to (([floor v] of (((GlobalCostumeNo.) * (1.5)) mod (4)) ) + (6))\nelse\n    switch costume to (([floor v] of (((GlobalCostumeNo.) * (1.5)) mod (4)) ) + (1))\n    if <<(DeleteFireballNo.) = (FireballNo.)> and <(FireballNo.) > [0]>> then\n        set [spawnx v] to (x position)\n        set [spawny v] to (y position)\n        create clone of (fx v)\n    end\nend\n\ndefine AddFireBar (x) (y)\nadd (x) to [fireballx v]\nadd (y) to [firebally v]\nadd [0] to [fireballtype v]\nadd [90] to [fireballdir v]\nadd [0] to [fireballbounces v]\n\nwhen I receive [playerupdated v]\nif <(item (FireballNo.) of [fireballtype v]) = [0]> then\n    switch costume to (hitbox2 v)\nelse\n    switch costume to (hitbox3 v)\nend\nif <(item (FireballNo.) of [fireballtype v]) = [1]> then\n\nwhen I receive [flagclicked v]\nif <[1] = [1]> then\n    delete this clone\nend\nhide\n\n@BoomBoom\n\nwhen I receive [startgame v]\nif <[1] = [1]> then\n    delete this clone\nend\ngo to x: (0) y: (0)\nset size to (350) %\nhide\nset rotation style [left-right v]\nif <<(Level) = [4]> or <(Level) = [11]>> then\n    set [boomboomx v] to [84]\n    set [boomboomy v] to [-18]\n    set [boomboomstate v] to [0]\n    set [boomboomhealth v] to [3]\n    set [boomboomyvelocity v] to [0]\n    broadcast (BossStateChange v)\nend\n\nwhen I receive [hidegame v]\nif <[1] = [1]> then\n    delete this clone\nend\nhide\n\nwhen I receive [updateeverything v]\nif <<(Level) = [4]> or <(Level) = [11]>> then\n    switch costume to (hitbox v)\n    go to x: (((BoomBoomX) * (28)) + (MapX)) y: (((BoomBoomY) * (28)) + (MapY))\n    if <<<<(x position) < [240]> and <(x position) > [-240]>> and <<(y position) < [179]> and <(y position) > [-189]>>> and <(BoomBoomState) < [5]>> then\n        show\n        if <<(BoomBoomState) = [0]> or <(BoomBoomState) = [1]>> then\n            change [boomboomyvelocity v] by ((Gravity) / (4.05))\n            change y by ((Gravity) * (1))\n            if <<touching (map v)?> or <touching (semisolids v)?>> then\n                change y by ((Gravity) * (-1))\n                FindFloor\n            end\n            change y by ((BoomBoomYVelocity) * (1))\n            if <<touching (map v)?> or <touching (semisolids v)?>> then\n                change y by ((BoomBoomYVelocity) * (-1))\n                if <(BoomBoomYVelocity) > [0]> then\n                    set [boomboomyvelocity v] to [-1]\n                else\n                    FindFloor\n                    set [boomboomyvelocity v] to [0]\n                end\n            end\n            if <<not <(BoomBoomYVelocity) = [0]>> or <(BoomBoomState) = [1]>> then\n                if <([abs v] of ((x position) - ([x position v] of [player v])) ) > [5]> then\n                    if <(x position) > ([x position v] of [player v])> then\n                        point in direction (-90)\n                    else\n                        point in direction (90)\n                    end\n                    if <(BoomBoomState) = [0]> then\n                        move (2) steps\n                        if <touching (map v)?> then\n                            move (-2) steps\n                        end\n                    else\n                        move (3) steps\n                        if <touching (map v)?> then\n                            move (-4) steps\n                        end\n                    end\n                end\n            end\n            set [boomboomx v] to (((x position) - (MapX)) / (28))\n            set [boomboomy v] to (((y position) - (MapY)) / (28))\n        end\n        if <(BoomBoomState) = [4]> then\n            change y by (1)\n            set [boomboomy v] to (((y position) - (MapY)) / (28))\n        end\n    else\n        hide\n    end\nend\n\nwhen I receive [bossstatechange v]\nif <<(Level) = [4]> or <(Level) = [11]>> then\n    wait until <<<(x position) < [240]> and <(x position) > [-240]>> and <<(y position) < [180]> and <(y position) > [-180]>>>\n    if <(BoomBoomState) = [0]> then\n        wait until <(BoomBoomYVelocity) = [0]>\n        wait (1) seconds\n        if <(BoomBoomYVelocity) = [0]> then\n            set [boomboomyvelocity v] to [15]\n            if <<<(BoomBoomHealth) < [3]> and <(Level) = [11]>> and <(pick random (1) to (3)) = [1]>> then\n                set [boomboomyvelocity v] to [20]\n            end\n            wait (1) seconds\n        end\n        wait until <(BoomBoomYVelocity) = [0]>\n        if <(BoomBoomState) = [0]> then\n            if <(pick random (1) to (3)) = [1]> then\n                set [boomboomstate v] to [1]\n            end\n            broadcast (BossStateChange v)\n        end\n    end\n    if <(BoomBoomState) = [1]> then\n        set [boomboomyvelocity v] to [-1]\n        wait (2) seconds\n        if <(BoomBoomState) = [1]> then\n            set [boomboomstate v] to [0]\n            broadcast (BossStateChange v)\n        end\n    end\n    if <(BoomBoomState) = [2]> then\n        set [boomboomyvelocity v] to [-1]\n        repeat (10)\n            wait (0.05) seconds\n            set [boomboomstate v] to [3]\n            wait (0.05) seconds\n            set [boomboomstate v] to [2]\n        end\n        if <(BoomBoomHealth) < [0.1]> then\n            broadcast (BossDefeated v)\n            set [boomboomstate v] to [5]\n        else\n            set [boomboomstate v] to [0]\n            broadcast (BossStateChange v)\n        end\n    end\nend\n\ndefine FindFloor\nrepeat until <<touching (map v)?> or <touching (semisolids v)?>>\n    change y by (-1)\nend\nchange y by (1)\n\nwhen I receive [costumeeverything v]\nif <(BoomBoomState) = [0]> then\n    if <(BoomBoomYVelocity) = [0]> then\n        switch costume to (1 v)\n    else\n        switch costume to (2 v)\n    end\nelse\n    if <(BoomBoomState) = [1]> then\n        switch costume to (([floor v] of (((GlobalCostumeNo.) * (4)) mod (7)) ) + (4))\n    else\n        if <(BoomBoomState) = [2]> then\n            switch costume to (11 v)\n        else\n            switch costume to (([floor v] of (((GlobalCostumeNo.) * (3)) mod (4)) ) + (13))\n        end\n    end\nend\n\nwhen I receive [playerupdated v]\nif <<(BoomBoomState) = [0]> or <(BoomBoomState) = [1]>> then\n    switch costume to (hitbox v)\n    if <touching (player v)?> then\n        if <<not <(BoomBoomYVelocity) = [0]>> or <(BoomBoomState) = [1]>> then\n            if <([y position v] of [player v]) > (y position)> then\n                set [boomboomstate v] to [2]\n                set [boomboomyvelocity v] to [-1]\n                change [boomboomhealth v] by (-1)\n                set [yvel v] to [18]\n                broadcast (BossStateChange v)\n                start sound [Stompv2 v]\n            else\n                if <(AllowPlayerDamage) = [1]> then\n                    broadcast (Powerdown v)\n                end\n            end\n        else\n            if <(AllowPlayerDamage) = [1]> then\n                broadcast (Powerdown v)\n            end\n        end\n    end\nend\n\nwhen I receive [fireballhit v]\nswitch costume to (hitbox v)\nif <<<not <(BoomBoomYVelocity) = [0]>> and <(BoomBoomState) = [0]>> or <(BoomBoomState) = [1]>> then\n    if <touching (fireballs v)?> then\n        set [boomboomstate v] to [2]\n        set [boomboomyvelocity v] to [-1]\n        change [boomboomhealth v] by (-0.6)\n        broadcast (BossStateChange v)\n    end\nend\n\nwhen I receive [flagclicked v]\nif <[1] = [1]> then\n    delete this clone\nend\nhide\n\n@Larry\n\nwhen I receive [startgame v]\nif <[1] = [1]> then\n    delete this clone\nend\ngo to x: (0) y: (0)\nset size to (350) %\nhide\nset rotation style [left-right v]\nif <(Level) = [8]> then\n    set [larryx v] to [84]\n    set [larryy v] to [-16]\n    set [larrystate v] to [0]\n    set [larryhealth v] to [3]\n    set [larryyvelocity v] to [0]\n    broadcast (BossStateChange v)\nend\n\nwhen I receive [hidegame v]\nif <[1] = [1]> then\n    delete this clone\nend\nhide\n\nwhen I receive [updateeverything v]\nif <(Level) = [8]> then\n    if <(LarryState) > [-0.1]> then\n        switch costume to (hitbox v)\n        go to x: (((LarryX) * (28)) + (MapX)) y: (((LarryY) * (28)) + (MapY))\n        if <<<<(x position) < [240]> and <(x position) > [-240]>> and <<(y position) < [179]> and <(y position) > [-189]>>> and <(LarryState) < [5]>> then\n            show\n            if <<(LarryState) < [4]> and <not <(LarryState) = [2]>>> then\n                change [larryyvelocity v] by ((Gravity) / (4.05))\n                change y by ((Gravity) * (1))\n                if <<touching (map v)?> or <touching (semisolids v)?>> then\n                    change y by ((Gravity) * (-1))\n                    FindFloor\n                    if <not <<(LarryState) = [1.5]> or <(LarryState) = [1]>>> then\n                        if <(pick random (1) to (15)) = [1]> then\n                            set [larryyvelocity v] to [14]\n                        end\n                    end\n                end\n                change y by ((LarryYVelocity) * (1))\n                if <<touching (map v)?> or <touching (semisolids v)?>> then\n                    change y by ((LarryYVelocity) * (-1))\n                    if <(LarryYVelocity) > [0]> then\n                        set [larryyvelocity v] to [-1]\n                    else\n                        FindFloor\n                        set [larryyvelocity v] to [0]\n                    end\n                end\n                if <(x position) > ([x position v] of [player v])> then\n                    point in direction (-90)\n                else\n                    point in direction (90)\n                end\n                if <not <<(LarryState) = [1.5]> or <(LarryState) = [1]>>> then\n                    if <([abs v] of ((x position) - ([x position v] of [player v])) ) > [5]> then\n                        if <(LarryState) = [0]> then\n                            move (2) steps\n                            if <touching (map v)?> then\n                                move (-2) steps\n                            end\n                        else\n                            move (3) steps\n                            if <touching (map v)?> then\n                                move (-3) steps\n                            end\n                        end\n                    end\n                end\n                set [larryx v] to (((x position) - (MapX)) / (28))\n                set [larryy v] to (((y position) - (MapY)) / (28))\n            end\n            if <(LarryState) = [4]> then\n                change y by (0.5)\n                if <([abs v] of (x position) ) < [3]> then\n                    change y by (4)\n                else\n                    if <(x position) > [0]> then\n                        change x by (-2)\n                    else\n                        change x by (2)\n                    end\n                end\n                set [larryx v] to (((x position) - (MapX)) / (28))\n                set [larryy v] to (((y position) - (MapY)) / (28))\n            end\n        else\n            hide\n        end\n    end\nend\n\nwhen I receive [bossstatechange v]\nif <(Level) = [8]> then\n    if <(LarryState) > [-0.1]> then\n        wait until <<<(x position) < [240]> and <(x position) > [-240]>> and <<(y position) < [180]> and <(y position) > [-180]>>>\n        forever\n            if <(LarryState) = [0]> then\n                wait (1) seconds\n                if <(pick random (1) to (2)) = [1]> then\n                    set [larrystate v] to [1]\n                end\n                broadcast (BossStateChange v)\n            end\n            if <(LarryState) = [1]> then\n                repeat (3)\n                    set [larrystate v] to [1.5]\n                    wait (0.5) seconds\n                    create clone of (_myself_ v)\n                    set [larrystate v] to [1]\n                    wait (0.25) seconds\n                end\n                set [larrystate v] to [0]\n                wait (2) seconds\n                broadcast (BossStateChange v)\n            end\n            if <(LarryState) = [1.5]> then\n                set [larrystate v] to (pick random (0) to (1))\n                broadcast (BossStateChange v)\n            end\n            if <(LarryState) = [2]> then\n                wait (1) seconds\n                if <(LarryHealth) < [0.1]> then\n                    set [larrystate v] to [4]\n                    wait (3) seconds\n                    broadcast (BossDefeated v)\n                    broadcast (WandAnimation v)\n                    wait (2) seconds\n                    hide\n                    set [larrystate v] to [5]\n                else\n                    set [larrystate v] to [3]\n                    wait (2) seconds\n                    set [larrystate v] to [0.5]\n                    wait (1) seconds\n                    set [larrystate v] to (pick random (0) to (1))\n                    broadcast (BossStateChange v)\n                end\n            end\n        end\n    end\nend\n\ndefine FindFloor\nrepeat until <<touching (map v)?> or <touching (semisolids v)?>>\n    change y by (-1)\nend\nchange y by (1)\n\nwhen I receive [costumeeverything v]\nif <(LarryState) > [-0.1]> then\n    if <<(LarryState) = [0]> or <(LarryState) = [0.5]>> then\n        switch costume to (([floor v] of (((GlobalCostumeNo.) * (2)) mod (2)) ) + (1))\n    else\n        if <(LarryState) = [1]> then\n            switch costume to (([floor v] of (((GlobalCostumeNo.) * (2)) mod (2)) ) + (1))\n        else\n            if <(LarryState) = [1.5]> then\n                switch costume to (3 v)\n            else\n                if <(LarryState) = [2]> then\n                    switch costume to (([floor v] of (((GlobalCostumeNo.) * (3)) mod (5)) ) + (12))\n                else\n                    if <(LarryState) = [4]> then\n                        switch costume to (([floor v] of (((GlobalCostumeNo.) * (3)) mod (7)) ) + (4))\n                    else\n                        switch costume to (([floor v] of (((GlobalCostumeNo.) * (3)) mod (5)) ) + (12))\n                    end\n                end\n            end\n        end\n    end\nend\n\nwhen I receive [playerupdated v]\nif <(LarryState) > [-0.1]> then\n    if <(LarryState) = [3]> then\n        switch costume to (hitbox2 v)\n    else\n        switch costume to (hitbox v)\n    end\n    if <touching (player v)?> then\n        if <(LarryState) < [2]> then\n            if <([y position v] of [player v]) > ((y position) + (3))> then\n                set [larrystate v] to [2]\n                set [larryyvelocity v] to [-1]\n                change [larryhealth v] by (-1)\n                set [yvel v] to [18]\n                broadcast (BossStateChange v)\n                start sound [Stompv2 v]\n            else\n                if <(AllowPlayerDamage) = [1]> then\n                    broadcast (Powerdown v)\n                end\n            end\n        else\n            if <(LarryState) = [3]> then\n                if <([y position v] of [player v]) > ((y position) + (1))> then\n                    set [yvel v] to [14]\n                    set [xvel v] to (((direction) / (90)) * (3))\n                    start sound [Stompv2 v]\n                else\n                    if <(AllowPlayerDamage) = [1]> then\n                        broadcast (Powerdown v)\n                    end\n                end\n            end\n        end\n    end\nelse\n    change size by (-50)\n    if <touching (player v)?> then\n        if <(AllowPlayerDamage) = [1]> then\n            broadcast (Powerdown v)\n        end\n    end\n    change size by (50)\nend\n\nwhen I receive [fireballhit v]\nif <<(LarryState) > [-0.1]> and <(LarryState) < [2]>> then\n    switch costume to (hitbox v)\n    if <touching (fireballs v)?> then\n        set [larrystate v] to [2]\n        set [larryyvelocity v] to [-1]\n        change [larryhealth v] by (-0.25)\n        broadcast (BossStateChange v)\n    end\n    switch costume to (1 v)\nend\n\nwhen I receive [flagclicked v]\nif <[1] = [1]> then\n    delete this clone\nend\nhide\n\nwhen I start as a clone\npoint towards (player v)\npoint in direction ((round ((direction) / (45))) * (45))\nswitch costume to (18 v)\nset [larrystate v] to [-1]\nrepeat (15)\n    move (3) steps\n    switch costume to (18 v)\nend\nrepeat (15)\n    move (3) steps\n    switch costume to (19 v)\nend\nrepeat until <not <<<(x position) < [240]> and <(x position) > [-240]>> and <<(y position) < [179]> and <(y position) > [-189]>>>>\n    move (3) steps\n    switch costume to (20 v)\nend\ndelete this clone\n\n@Morton\n\nwhen I receive [startgame v]\nif <[1] = [1]> then\n    delete this clone\nend\ngo to x: (0) y: (0)\nset size to (350) %\nhide\nset rotation style [left-right v]\nif <(Level) = [14]> then\n    set [larryx v] to [84]\n    set [larryy v] to [-16]\n    set [larrystate v] to [0]\n    set [larryhealth v] to [3]\n    set [larryyvelocity v] to [0]\n    broadcast (BossStateChange v)\nend\n\nwhen I receive [hidegame v]\nif <[1] = [1]> then\n    delete this clone\nend\nhide\n\nwhen I receive [updateeverything v]\nif <(Level) = [14]> then\n    if <(LarryState) > [-0.1]> then\n        switch costume to (hitbox v)\n        go to x: (((LarryX) * (28)) + (MapX)) y: (((LarryY) * (28)) + (MapY))\n        if <<<<(x position) < [240]> and <(x position) > [-240]>> and <<(y position) < [179]> and <(y position) > [-189]>>> and <(LarryState) < [5]>> then\n            show\n            if <<(LarryState) < [4]> and <not <(LarryState) = [2]>>> then\n                change [larryyvelocity v] by ((Gravity) / (4.05))\n                change y by ((Gravity) * (1))\n                if <<touching (map v)?> or <touching (semisolids v)?>> then\n                    change y by ((Gravity) * (-1))\n                    FindFloor\n                    if <not <<(LarryState) = [1.5]> or <(LarryState) = [1]>>> then\n                        if <(pick random (1) to (20)) = [1]> then\n                            set [larryyvelocity v] to [14]\n                        end\n                    end\n                end\n                change y by ((LarryYVelocity) * (1))\n                if <<touching (map v)?> or <touching (semisolids v)?>> then\n                    change y by ((LarryYVelocity) * (-1))\n                    if <(LarryYVelocity) > [0]> then\n                        set [larryyvelocity v] to [-1]\n                    else\n                        FindFloor\n                        set [larryyvelocity v] to [0]\n                    end\n                end\n                if <(x position) > ([x position v] of [player v])> then\n                    point in direction (-90)\n                else\n                    point in direction (90)\n                end\n                if <not <<(LarryState) = [1.5]> or <(LarryState) = [1]>>> then\n                    if <([abs v] of ((x position) - ([x position v] of [player v])) ) > [5]> then\n                        if <(LarryState) = [0]> then\n                            move (2) steps\n                            if <touching (map v)?> then\n                                move (-2) steps\n                            end\n                        else\n                            move (3) steps\n                            if <touching (map v)?> then\n                                move (-3) steps\n                            end\n                        end\n                    end\n                end\n                set [larryx v] to (((x position) - (MapX)) / (28))\n                set [larryy v] to (((y position) - (MapY)) / (28))\n            end\n            if <(LarryState) = [4]> then\n                change y by (0.5)\n                if <([abs v] of (x position) ) < [3]> then\n                    change y by (4)\n                else\n                    if <(x position) > [0]> then\n                        change x by (-2)\n                    else\n                        change x by (2)\n                    end\n                end\n                set [larryx v] to (((x position) - (MapX)) / (28))\n                set [larryy v] to (((y position) - (MapY)) / (28))\n            end\n        else\n            hide\n        end\n    end\nend\n\nwhen I receive [bossstatechange v]\nif <(Level) = [14]> then\n    if <(LarryState) > [-0.1]> then\n        wait until <<<(x position) < [240]> and <(x position) > [-240]>> and <<(y position) < [180]> and <(y position) > [-180]>>>\n        forever\n            if <(LarryState) = [0]> then\n                wait (0.5) seconds\n                if <(pick random (1) to (3)) = [1]> then\n                    set [larrystate v] to [0]\n                else\n                    set [larrystate v] to [1]\n                end\n                broadcast (BossStateChange v)\n            end\n            if <(LarryState) = [1]> then\n                set [larrystate v] to [1.5]\n                wait (0.5) seconds\n                repeat (3)\n                    set [larrystate v] to [1]\n                    wait (0.35) seconds\n                    change y by (10)\n                    change x by ((direction) / (9))\n                    create clone of (_myself_ v)\n                    change y by (-10)\n                    change x by ((direction) / (-9))\n                end\n                set [larrystate v] to [0]\n                wait (1) seconds\n                broadcast (BossStateChange v)\n            end\n            if <(LarryState) = [1.5]> then\n                set [larrystate v] to (pick random (0) to (1))\n                broadcast (BossStateChange v)\n            end\n            if <(LarryState) = [2]> then\n                wait (1) seconds\n                if <(LarryHealth) < [0.1]> then\n                    set [larrystate v] to [4]\n                    wait (3) seconds\n                    broadcast (BossDefeated v)\n                    broadcast (WandAnimation v)\n                    wait (2) seconds\n                    hide\n                    set [larrystate v] to [5]\n                else\n                    set [larrystate v] to [3]\n                    wait (2) seconds\n                    set [larrystate v] to [0.5]\n                    wait (1) seconds\n                    set [larrystate v] to (pick random (0) to (1))\n                    broadcast (BossStateChange v)\n                end\n            end\n        end\n    end\nend\n\ndefine FindFloor\nrepeat until <<touching (map v)?> or <touching (semisolids v)?>>\n    change y by (-1)\nend\nchange y by (1)\n\nwhen I receive [costumeeverything v]\nif <(LarryState) > [-0.1]> then\n    if <<(LarryState) = [0]> or <(LarryState) = [0.5]>> then\n        switch costume to (([floor v] of (((GlobalCostumeNo.) * (2)) mod (2)) ) + (1))\n    else\n        if <(LarryState) = [1]> then\n            switch costume to (21 v)\n        else\n            if <(LarryState) = [1.5]> then\n                switch costume to (3 v)\n            else\n                if <(LarryState) = [2]> then\n                    switch costume to (([floor v] of (((GlobalCostumeNo.) * (3)) mod (5)) ) + (12))\n                else\n                    if <(LarryState) = [4]> then\n                        switch costume to (([floor v] of (((GlobalCostumeNo.) * (3)) mod (7)) ) + (4))\n                    else\n                        switch costume to (([floor v] of (((GlobalCostumeNo.) * (3)) mod (5)) ) + (12))\n                    end\n                end\n            end\n        end\n    end\nend\n\nwhen I receive [playerupdated v]\nif <(LarryState) > [-0.1]> then\n    if <(LarryState) = [3]> then\n        switch costume to (hitbox2 v)\n    else\n        switch costume to (hitbox v)\n    end\n    if <touching (player v)?> then\n        if <(LarryState) < [2]> then\n            if <([y position v] of [player v]) > ((y position) + (3))> then\n                set [larrystate v] to [2]\n                set [larryyvelocity v] to [-1]\n                change [larryhealth v] by (-1)\n                set [yvel v] to [18]\n                broadcast (BossStateChange v)\n                start sound [Stompv2 v]\n            else\n                if <(AllowPlayerDamage) = [1]> then\n                    broadcast (Powerdown v)\n                end\n            end\n        else\n            if <(LarryState) = [3]> then\n                if <([y position v] of [player v]) > ((y position) + (1))> then\n                    set [yvel v] to [14]\n                    set [xvel v] to (((direction) / (90)) * (3))\n                    start sound [Stompv2 v]\n                else\n                    if <(AllowPlayerDamage) = [1]> then\n                        broadcast (Powerdown v)\n                    end\n                end\n            end\n        end\n    end\nelse\n    change size by (-50)\n    if <touching (player v)?> then\n        if <(AllowPlayerDamage) = [1]> then\n            broadcast (Powerdown v)\n        end\n    end\n    change size by (50)\nend\n\nwhen I receive [fireballhit v]\nif <<(LarryState) > [-0.1]> and <(LarryState) < [2]>> then\n    switch costume to (hitbox v)\n    if <touching (fireballs v)?> then\n        set [larrystate v] to [2]\n        set [larryyvelocity v] to [-1]\n        change [larryhealth v] by (-0.25)\n        broadcast (BossStateChange v)\n    end\n    switch costume to (1 v)\nend\n\nwhen I receive [flagclicked v]\nif <[1] = [1]> then\n    delete this clone\nend\nhide\n\nwhen I start as a clone\npoint towards (player v)\npoint in direction ((round ((direction) / (45))) * (45))\nswitch costume to (18 v)\nset [larrystate v] to [-1]\nrepeat (10)\n    move (3.5) steps\n    switch costume to (18 v)\nend\nrepeat (10)\n    move (3.5) steps\n    switch costume to (19 v)\nend\nrepeat until <not <<<(x position) < [240]> and <(x position) > [-240]>> and <<(y position) < [179]> and <(y position) > [-189]>>>>\n    move (3.5) steps\n    switch costume to (20 v)\nend\ndelete this clone\n\n@WandAnim\n\nwhen I receive [wandanimation v]\nif <(Level) = [4]> then\n    go to (boomboom v)\nend\nif <(Level) = [8]> then\n    go to (larry v)\nend\nif <(Level) = [14]> then\n    go to (morton v)\nend\nif <<<<(x position) < [240]> and <(x position) > [-240]>> and <<(y position) < [179]> and <(y position) > [-189]>>> and <(LarryState) < [5]>> then\n    show\nelse\n    hide\nend\nswitch costume to (1 v)\nwait (1) seconds\nshow\nset [wandyvel v] to [16]\nrepeat (170)\n    if <not <<(y position) < [-30]> and <(WandYVel) < [0]>>> then\n        change y by ((WandYVel) * (1))\n        change [wandyvel v] by ((Gravity) / (3.1))\n    end\n    set x to ((x position) / (1.1))\n    switch costume to (([floor v] of (((GlobalCostumeNo.) * (3)) mod (8)) ) + (1))\nend\nhide\n\nwhen I receive [startgame v]\nif <[1] = [1]> then\n    delete this clone\nend\ngo to x: (0) y: (0)\nset size to (350) %\nhide\nset rotation style [left-right v]\n\nwhen I receive [hidegame v]\nhide\n\nwhen I receive [flagclicked v]\nif <[1] = [1]> then\n    delete this clone\nend\ngo to x: (0) y: (0)\nset size to (350) %\nhide\nset rotation style [left-right v]\n\n@Bullets\n\nwhen I receive [updateeverything v]\nif <[1] = [1]> then\n    delete this clone\nend\nif <(DeleteBulletNo.) > [0]> then\n    delete (DeleteBulletNo.) of [bulletdir v]\n    delete (DeleteBulletNo.) of [bullettype v]\n    delete (DeleteBulletNo.) of [bulletx v]\n    delete (DeleteBulletNo.) of [bullety v]\n    delete (DeleteBulletNo.) of [allowbulletcollision v]\n    set [deletebulletno. v] to [0]\nend\nif <(length of [spawnbulletx v]) > [0]> then\n    switch costume to (hitbox v)\n    CheckSpawns\nend\nif <(length of [bulletx v]) > [0]> then\n    switch costume to (hitbox v)\n    FormBullets\nend\n\ndefine CheckSpawns\nshow\nset [bulletno. v] to [0]\nrepeat (length of [spawnbulletx v])\n    change [bulletno. v] by (1)\n    go to x: (((item (BulletNo.) of [spawnbulletx v]) * (28)) + (MapX)) y: (((item (BulletNo.) of [spawnbullety v]) * (28)) + (MapY))\n    if <<<(x position) < [235]> and <(x position) > [-235]>> and <<(y position) < [175]> and <(y position) > [-175]>>> then\n        replace item (BulletNo.) of [spawnbulletcooldown v] with ((item (BulletNo.) of [spawnbulletcooldown v]) - (0.1))\n        if <(item (BulletNo.) of [spawnbulletcooldown v]) < [0.01]> then\n            start sound [Shot v]\n            replace item (BulletNo.) of [spawnbulletcooldown v] with [9]\n            add ((item (BulletNo.) of [spawnbulletx v]) + (0.5)) to [bulletx v]\n            add (item (BulletNo.) of [spawnbullety v]) to [bullety v]\n            add (item (BulletNo.) of [spawnbullettype v]) to [bullettype v]\n            add [0] to [allowbulletcollision v]\n            if <(item (BulletNo.) of [spawnbullettype v]) = [1]> then\n                add (item (BulletNo.) of [spawnbulletdir v]) to [bulletdir v]\n            else\n                if <([x position v] of [player v]) > (x position)> then\n                    add [90] to [bulletdir v]\n                else\n                    add [-90] to [bulletdir v]\n                end\n            end\n        end\n    end\nend\nset [bulletno. v] to [0]\nhide\n\nwhen I start as a clone\nmove (3) steps\nif <(item (BulletNo.) of [allowbulletcollision v]) = [0]> then\n    if <not <touching (map v)?>> then\n        replace item (BulletNo.) of [allowbulletcollision v] with [1]\n    end\nelse\n    if <touching (map v)?> then\n        set [deletebulletno. v] to (BulletNo.)\n        set [spawnx v] to (x position)\n        set [spawny v] to (y position)\n        create clone of (fx v)\n    end\nend\nif <not <<<(x position) < [230]> and <(x position) > [-230]>> and <<(y position) < [175]> and <(y position) > [-172]>>>> then\n    set [deletebulletno. v] to (BulletNo.)\nend\nreplace item (BulletNo.) of [bulletx v] with (((x position) - (MapX)) / (28))\nreplace item (BulletNo.) of [bullety v] with (((y position) - (MapY)) / (28))\nchange y by (-1)\n\nwhen I receive [startgame v]\nif <[1] = [1]> then\n    delete this clone\nend\ngo to x: (0) y: (0)\nset size to (350) %\nhide\ndelete all of [bulletdir v]\ndelete all of [bullettype v]\ndelete all of [bulletx v]\ndelete all of [bullety v]\ndelete all of [spawnbulletdir v]\ndelete all of [spawnbullettype v]\ndelete all of [spawnbulletx v]\ndelete all of [spawnbullety v]\ndelete all of [spawnbulletcooldown v]\ndelete all of [allowbulletcollision v]\nset rotation style [left-right v]\nset [deletebulletno. v] to [0]\nif <(Level) = [8]> then\n    AddSpawnPoint [-16] [3] [45] [1]\n    AddSpawnPoint [-9] [3] [-45] [1]\n    AddSpawnPoint [4] [7] [-135] [1]\n    AddSpawnPoint [9] [1] [45] [1]\n    AddSpawnPoint [14] [1] [-45] [1]\n    AddSpawnPoint [19] [5] [0] [2]\n    AddSpawnPoint [37] [6] [0] [2]\n    AddSpawnPoint [46] [2] [45] [1]\n    AddSpawnPoint [50] [2] [-45] [1]\n    AddSpawnPoint [53] [2] [45] [1]\n    AddSpawnPoint [57] [2] [-45] [1]\n    AddSpawnPoint [60] [5] [0] [2]\n    AddSpawnPoint [71] [4] [45] [1]\nend\nif <(Level) = [14]> then\n    AddSpawnPoint [-11] [3] [45] [1]\n    AddSpawnPoint [0] [9] [-135] [1]\n    AddSpawnPoint [0] [6] [0] [2]\n    AddSpawnPoint [1] [5] [0] [2]\n    AddSpawnPoint [2] [4] [0] [2]\n    AddSpawnPoint [14] [9] [-135] [1]\n    AddSpawnPoint [17] [6] [-135] [1]\n    AddSpawnPoint [22] [2] [0] [2]\n    AddSpawnPoint [33] [5] [0] [2]\n    AddSpawnPoint [35] [6] [0] [2]\n    AddSpawnPoint [37] [7] [0] [2]\n    AddSpawnPoint [39] [6] [0] [2]\n    AddSpawnPoint [41] [5] [0] [2]\n    AddSpawnPoint [50] [5] [0] [2]\n    AddSpawnPoint [52] [6] [0] [2]\n    AddSpawnPoint [54] [7] [0] [2]\n    AddSpawnPoint [56] [6] [0] [2]\n    AddSpawnPoint [58] [5] [0] [2]\n    AddSpawnPoint [63] [4] [45] [1]\n    AddSpawnPoint [66] [5] [45] [1]\n    AddSpawnPoint [69] [6] [45] [1]\nend\n\nwhen I receive [costumeeverything v]\nswitch costume to (item (BulletNo.) of [bullettype v])\n\nwhen I receive [hidegame v]\nif <[1] = [1]> then\n    delete this clone\nend\nhide\n\nwhen I receive [playerupdated v]\nif <(BulletNo.) > [0]> then\n    switch costume to (4 v)\n    if <<<(Spinning) = [1]> and <<(distance to [player v]) < [42]> and <(distance to [player v]) > [8]>>> and <not <((y position) - (4)) > ([y position v] of [player v])>>> then\n        start sound [Stomp v]\n        set [deletebulletno. v] to (BulletNo.)\n        set [spawnx v] to (x position)\n        set [spawny v] to (y position)\n        create clone of (fx v)\n    else\n        if <touching (player v)?> then\n            if <<(Sliding) = [1]> or <<(Statue) = [1]> and <not <(YVel) = [0]>>>> then\n                start sound [Stomp v]\n                set [deletebulletno. v] to (BulletNo.)\n                set [spawnx v] to (x position)\n                set [spawny v] to (y position)\n                create clone of (fx v)\n            else\n                if <(Statue) = [0]> then\n                    if <([y position v] of [player v]) > ((y position) + (1))> then\n                        start sound [Stomp v]\n                        set [deletebulletno. v] to (BulletNo.)\n                        set [yvel v] to [18]\n                        set [spawnx v] to (x position)\n                        set [spawny v] to (y position)\n                        create clone of (fx v)\n                    else\n                        if <(AllowPlayerDamage) = [1]> then\n                            broadcast (Powerdown v)\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\ndefine AddSpawnPoint (x) (y) (dir) (type)\nadd (type) to [spawnbullettype v]\nadd (dir) to [spawnbulletdir v]\nadd (x) to [spawnbulletx v]\nadd (y) to [spawnbullety v]\nadd [1] to [spawnbulletcooldown v]\n\nwhen I receive [won v]\nif <[1] = [1]> then\n    delete this clone\nend\ngo to x: (0) y: (0)\nset size to (350) %\nhide\ndelete all of [bulletdir v]\ndelete all of [bullettype v]\ndelete all of [bulletx v]\ndelete all of [bullety v]\ndelete all of [spawnbulletdir v]\ndelete all of [spawnbullettype v]\ndelete all of [spawnbulletx v]\ndelete all of [spawnbullety v]\ndelete all of [spawnbulletcooldown v]\ndelete all of [allowbulletcollision v]\nset rotation style [left-right v]\nset [deletebulletno. v] to [0]\n\nwhen I receive [updateallpositions v]\ngo to x: (((item (BulletNo.) of [bulletx v]) * (28)) + (MapX)) y: (((item (BulletNo.) of [bullety v]) * (28)) + (MapY))\nchange y by (-1)\n\nwhen I receive [fireballhit v]\nswitch costume to (4 v)\nif <touching (fireballs v)?> then\n    set [deletebulletno. v] to (BulletNo.)\n    set [spawnx v] to (x position)\n    set [spawny v] to (y position)\n    create clone of (fx v)\nend\n\nwhen I receive [flagclicked v]\nif <[1] = [1]> then\n    delete this clone\nend\ngo to x: (0) y: (0)\nset size to (350) %\nhide\ndelete all of [bulletdir v]\ndelete all of [bullettype v]\ndelete all of [bulletx v]\ndelete all of [bullety v]\ndelete all of [spawnbulletdir v]\ndelete all of [spawnbullettype v]\ndelete all of [spawnbulletx v]\ndelete all of [spawnbullety v]\ndelete all of [spawnbulletcooldown v]\ndelete all of [allowbulletcollision v]\nset rotation style [left-right v]\nset [deletebulletno. v] to [0]\n\ndefine FormBullets\nshow\nset [bulletno. v] to [0]\nrepeat (length of [bulletx v])\n    change [bulletno. v] by (1)\n    go to x: (((item (BulletNo.) of [bulletx v]) * (28)) + (MapX)) y: (((item (BulletNo.) of [bullety v]) * (28)) + (MapY))\n    if <<<(x position) < [235]> and <(x position) > [-235]>> and <<(y position) < [175]> and <(y position) > [-175]>>> then\n        point in direction (item (BulletNo.) of [bulletdir v])\n        create clone of (_myself_ v)\n    end\nend\nset [bulletno. v] to [0]\nhide\n\n@Platforms\n\nwhen I receive [updateeverything v]\nif <[1] = [1]> then\n    delete this clone\nend\nif <(length of [platformx v]) > [0]> then\n    switch costume to (platformhitbox v)\n    FormPlatforms\nend\n\nwhen I receive [updateallpositions v]\ngo to x: ((((item (PlatformNo.) of [platformx v]) + (0.5)) * (28)) + (MapX)) y: (((item (PlatformNo.) of [platformy v]) * (28)) + (MapY))\n\nwhen I receive [hidegame v]\nif <[1] = [1]> then\n    delete this clone\nend\nhide\n\ndefine FormPlatforms\nshow\nset [platformno. v] to [0]\nrepeat (length of [platformx v])\n    change [platformno. v] by (1)\n    go to x: (((item (PlatformNo.) of [platformx v]) * (28)) + (MapX)) y: (((item (PlatformNo.) of [platformy v]) * (28)) + (MapY))\n    if <<<(x position) < [268]> and <(x position) > [-268]>> and <<(y position) < [168]> and <(y position) > [-168]>>> then\n        show\n    else\n        hide\n    end\n    point in direction (item (PlatformNo.) of [platformdir v])\n    create clone of (_myself_ v)\nend\nset [platformno. v] to [0]\nhide\n\nwhen I receive [startgame v]\nif <[1] = [1]> then\n    delete this clone\nend\ndelete all of [platformx v]\ndelete all of [platformy v]\ndelete all of [platformdir v]\ndelete all of [platformtype v]\ndelete all of [platformspeed v]\ndelete all of [platformrotspeed v]\ndelete all of [platformstatus v]\nif <(Level) = [2]> then\n    AddPlatform [92] [6] [90] [S] [1.5] [2] [1]\n    AddPlatform [103.5] [6] [-90] [S] [1.5] [2] [1]\n    AddPlatform [151.5] [3] [0] [L] [0.35] [2] [0]\nend\nif <(Level) = [3]> then\n    AddPlatform [132] [3] [0] [L] [0.29] [2] [0]\nend\nif <(Level) = [5]> then\n    AddPlatform [91.5] [7] [0] [L] [0.305] [2] [0]\nend\nif <(Level) = [6]> then\n    AddPlatform [100] [7] [90] [C] [2] [2] [1]\n    AddPlatform [108] [6] [-90] [S] [3] [2] [1]\n    AddPlatform [112] [6] [-90] [S] [3] [2] [1]\n    AddPlatform [129.5] [8] [90] [S] [2.25] [2] [1]\nend\nif <(Level) = [12]> then\n    AddPlatform [132.5] [7] [0] [C] [1] [2] [0]\n    AddPlatform [143.5] [5] [0] [C] [2] [2] [0]\nend\n\ndefine AddPlatform (x) (y) (dir) (type) (rotation) (speed) (status)\nadd (x) to [platformx v]\nadd (y) to [platformy v]\nadd (dir) to [platformdir v]\nadd (type) to [platformtype v]\nadd (rotation) to [platformrotspeed v]\nadd (speed) to [platformspeed v]\nadd (status) to [platformstatus v]\n\nwhen I receive [costumeeverything v]\nswitch costume to (platform v)\n\nwhen I start as a clone\nif <(item (PlatformNo.) of [platformstatus v]) = [1]> then\n    if <(item (PlatformNo.) of [platformtype v]) = [S]> then\n        turn right (item (PlatformNo.) of [platformrotspeed v]) degrees\n        change x by (([sin v] of (([floor v] of ((direction) / (90)) ) * (90)) ) * (item (PlatformNo.) of [platformspeed v]))\n        change y by (([cos v] of (([floor v] of ((direction) / (90)) ) * (90)) ) * (item (PlatformNo.) of [platformspeed v]))\n        change y by (3)\n        if <touching (player v)?> then\n            change [playerx v] by (([sin v] of (([floor v] of ((direction) / (90)) ) * (90)) ) * (item (PlatformNo.) of [platformspeed v]))\n            change [playery v] by (([cos v] of (([floor v] of ((direction) / (90)) ) * (90)) ) * (item (PlatformNo.) of [platformspeed v]))\n        end\n        change y by (-3)\n        replace item (PlatformNo.) of [platformx v] with ((item (PlatformNo.) of [platformx v]) + ((([sin v] of (([floor v] of ((direction) / (90)) ) * (90)) ) * (item (PlatformNo.) of [platformspeed v])) / (28)))\n        replace item (PlatformNo.) of [platformy v] with ((item (PlatformNo.) of [platformy v]) + ((([cos v] of (([floor v] of ((direction) / (90)) ) * (90)) ) * (item (PlatformNo.) of [platformspeed v])) / (28)))\n    else\n        if <(item (PlatformNo.) of [platformtype v]) = [L]> then\n            turn right (item (PlatformNo.) of [platformrotspeed v]) degrees\n            change x by (([sin v] of ((([floor v] of ((direction) / (180)) ) * (180)) + (90)) ) * (item (PlatformNo.) of [platformspeed v]))\n            change y by (([cos v] of ((([floor v] of ((direction) / (180)) ) * (180)) + (90)) ) * (item (PlatformNo.) of [platformspeed v]))\n            change y by (3)\n            if <touching (player v)?> then\n                change [playerx v] by (([sin v] of ((([floor v] of ((direction) / (180)) ) * (180)) + (90)) ) * (item (PlatformNo.) of [platformspeed v]))\n                change [playery v] by (([cos v] of ((([floor v] of ((direction) / (180)) ) * (180)) + (90)) ) * (item (PlatformNo.) of [platformspeed v]))\n            end\n            change y by (-3)\n            replace item (PlatformNo.) of [platformx v] with ((item (PlatformNo.) of [platformx v]) + ((([sin v] of ((([floor v] of ((direction) / (180)) ) * (180)) + (90)) ) * (item (PlatformNo.) of [platformspeed v])) / (28)))\n            replace item (PlatformNo.) of [platformy v] with ((item (PlatformNo.) of [platformy v]) + ((([cos v] of ((([floor v] of ((direction) / (180)) ) * (180)) + (90)) ) * (item (PlatformNo.) of [platformspeed v])) / (28)))\n        else\n            turn right (item (PlatformNo.) of [platformrotspeed v]) degrees\n            change x by (([sin v] of (direction) ) * (item (PlatformNo.) of [platformspeed v]))\n            change y by (([cos v] of (direction) ) * (item (PlatformNo.) of [platformspeed v]))\n            change y by (3)\n            if <touching (player v)?> then\n                change [playerx v] by (([sin v] of (direction) ) * (item (PlatformNo.) of [platformspeed v]))\n                change [playery v] by (([cos v] of (direction) ) * (item (PlatformNo.) of [platformspeed v]))\n            end\n            change y by (-3)\n            replace item (PlatformNo.) of [platformx v] with ((item (PlatformNo.) of [platformx v]) + ((([sin v] of (direction) ) * (item (PlatformNo.) of [platformspeed v])) / (28)))\n            replace item (PlatformNo.) of [platformy v] with ((item (PlatformNo.) of [platformy v]) + ((([cos v] of (direction) ) * (item (PlatformNo.) of [platformspeed v])) / (28)))\n        end\n    end\n    replace item (PlatformNo.) of [platformdir v] with (direction)\nelse\n    change y by (3)\n    if <touching (player v)?> then\n        replace item (PlatformNo.) of [platformstatus v] with [1]\n    end\n    change y by (-3)\nend\n\nwhen I receive [flagclicked v]\nif <[1] = [1]> then\n    delete this clone\nend\nset rotation style [don't rotate v]\ngo to x: (0) y: (0)\nset size to (350) %\nhide\n\n@HammerBros\n\nwhen I receive [updateeverything v]\nif <[1] = [1]> then\n    delete this clone\nend\nif <(DeleteHammerNo.) > [0]> then\n    delete (DeleteHammerNo.) of [hammerx v]\n    delete (DeleteHammerNo.) of [hammery v]\n    delete (DeleteHammerNo.) of [hammerdir v]\n    delete (DeleteHammerNo.) of [hammercooldown v]\n    delete (DeleteHammerNo.) of [hammertype v]\n    set [deletehammerno. v] to [0]\nend\nif <(length of [hammerx v]) > [0]> then\n    switch costume to (hitbox v)\n    FormHammers\nend\n\ndefine FormHammers\nshow\nset [hammerno. v] to [0]\nrepeat (length of [hammerx v])\n    change [hammerno. v] by (1)\n    go to x: (((item (HammerNo.) of [hammerx v]) * (28)) + (MapX)) y: (((item (HammerNo.) of [hammery v]) * (28)) + (MapY))\n    set rotation style [left-right v]\n    if <<(item (HammerNo.) of [hammertype v]) = [1]> or <(item (HammerNo.) of [hammertype v]) = [3]>> then\n        switch costume to (hitbox v)\n        if <<<(x position) < [240]> and <(x position) > [-240]>> and <<(y position) < [182]> and <(y position) > [-172]>>> then\n            create clone of (_myself_ v)\n        end\n    else\n        switch costume to (hitbox2 v)\n        if <<<(x position) < [240]> and <(x position) > [-240]>> and <<<(y position) < [180]> and <(Underground) = [1]>> or <<(y position) > [-180]> and <(Underground) = [0]>>>> then\n            point in direction (item (HammerNo.) of [hammerdir v])\n            create clone of (_myself_ v)\n        end\n    end\nend\nset [hammerno. v] to [0]\nhide\n\nwhen I start as a clone\nif <(item (HammerNo.) of [hammertype v]) = [1]> then\n    replace item (HammerNo.) of [hammerdir v] with ((item (HammerNo.) of [hammerdir v]) + ((Gravity) / (3.1)))\n    replace item (HammerNo.) of [hammercooldown v] with ((item (HammerNo.) of [hammercooldown v]) - (0.1))\n    if <(x position) > ([x position v] of [player v])> then\n        point in direction (-90)\n    else\n        point in direction (90)\n    end\n    change y by ((Gravity) * (2))\n    if <<touching (map v)?> or <<touching (semisolids v)?> and <not <(item (HammerNo.) of [hammerdir v]) > [0]>>>> then\n        change y by ((Gravity) * (-2))\n        FindFloor\n        replace item (HammerNo.) of [hammerdir v] with [0]\n        if <<(pick random (1) to (40)) = [1]> and <<(item (HammerNo.) of [hammercooldown v]) < [2.19]> and <(item (HammerNo.) of [hammercooldown v]) > [0.5]>>> then\n            replace item (HammerNo.) of [hammerdir v] with [18]\n        end\n    end\n    change y by (item (HammerNo.) of [hammerdir v])\n    if <<touching (map v)?> or <<touching (semisolids v)?> and <not <(item (HammerNo.) of [hammerdir v]) > [0]>>>> then\n        change y by ((item (HammerNo.) of [hammerdir v]) * (-1))\n        if <(item (HammerNo.) of [hammerdir v]) > [0]> then\n        replace item (HammerNo.) of [hammerdir v] with [0]\n    end\n    if <((GlobalCostumeNo.) mod (12)) < [6]> then\n        move (1) steps\n        YSmoothing\n        if <(item (HammerNo.) of [hammerdir v]) = [0]> then\n            switch costume to (hitbox3 v)\n            if <not <touching (map v)?>> then\n                move (-1) steps\n            end\n            switch costume to (hitbox v)\n        end\n        if <touching (map v)?> then\n            move (-1) steps\n        end\n    else\n        move (-1) steps\n        YSmoothing\n        if <(item (HammerNo.) of [hammerdir v]) = [0]> then\n            switch costume to (hitbox4 v)\n            if <not <touching (map v)?>> then\n                move (1) steps\n            end\n            switch costume to (hitbox v)\n        end\n        if <touching (map v)?> then\n            move (1) steps\n        end\n    end\n    if <(item (HammerNo.) of [hammercooldown v]) < [0]> then\n        replace item (HammerNo.) of [hammercooldown v] with [4.5]\n        add ((((x position) - (MapX)) / (28)) + ((direction) / (-360))) to [hammerx v]\n        add ((((y position) - (MapY)) / (28)) + (0.6)) to [hammery v]\n        add [2] to [hammertype v]\n        add [0] to [hammercooldown v]\n        if <(direction) = [90]> then\n            add [15] to [hammerdir v]\n        else\n            add [-15] to [hammerdir v]\n        end\n    end\nelse\n    if <(item (HammerNo.) of [hammertype v]) = [3]> then\n        replace item (HammerNo.) of [hammerdir v] with ((item (HammerNo.) of [hammerdir v]) + ((Gravity) / (3.1)))\n        replace item (HammerNo.) of [hammercooldown v] with ((item (HammerNo.) of [hammercooldown v]) - (0.1))\n        if <(x position) > ([x position v] of [player v])> then\n            point in direction (-90)\n        else\n            point in direction (90)\n        end\n        change y by ((Gravity) * (2))\n        if <<touching (map v)?> or <<touching (semisolids v)?> and <not <(item (HammerNo.) of [hammerdir v]) > [0]>>>> then\n            change y by ((Gravity) * (-2))\n            FindFloor\n            replace item (HammerNo.) of [hammerdir v] with [0]\n            if <<(pick random (1) to (40)) = [1]> and <<(item (HammerNo.) of [hammercooldown v]) < [2.19]> and <(item (HammerNo.) of [hammercooldown v]) > [0.5]>>> then\n                replace item (HammerNo.) of [hammerdir v] with [18]\n            end\n        end\n        change y by (item (HammerNo.) of [hammerdir v])\n        if <<touching (map v)?> or <<touching (semisolids v)?> and <not <(item (HammerNo.) of [hammerdir v]) > [0]>>>> then\n            change y by ((item (HammerNo.) of [hammerdir v]) * (-1))\n            if <(item (HammerNo.) of [hammerdir v]) > [0]> then\n            replace item (HammerNo.) of [hammerdir v] with [0]\n        end\n        if <((GlobalCostumeNo.) mod (16)) < [8]> then\n            move (1) steps\n            YSmoothing\n            if <(item (HammerNo.) of [hammerdir v]) = [0]> then\n                switch costume to (hitbox3 v)\n                if <not <touching (map v)?>> then\n                    move (-1) steps\n                end\n                switch costume to (hitbox v)\n            end\n            if <touching (map v)?> then\n                move (-1) steps\n            end\n        else\n            move (-1) steps\n            YSmoothing\n            if <(item (HammerNo.) of [hammerdir v]) = [0]> then\n                switch costume to (hitbox3 v)\n                if <not <touching (map v)?>> then\n                    move (1) steps\n                end\n                switch costume to (hitbox v)\n            end\n            if <touching (map v)?> then\n                move (1) steps\n            end\n        end\n        if <(item (HammerNo.) of [hammercooldown v]) < [0]> then\n            replace item (HammerNo.) of [hammercooldown v] with [4.5]\n            add ((((x position) + ((direction) / (18))) - (MapX)) / (28)) to [fireballx v]\n            add ((((y position) + (2)) - (MapY)) / (28)) to [firebally v]\n            add [3] to [fireballtype v]\n            add (direction) to [fireballdir v]\n            add [0] to [fireballbounces v]\n        end\n    else\n        if <(item (HammerNo.) of [hammertype v]) = [5]> then\n            replace item (HammerNo.) of [hammercooldown v] with ((item (HammerNo.) of [hammercooldown v]) - (0.1))\n            replace item (HammerNo.) of [hammerdir v] with ((item (HammerNo.) of [hammerdir v]) + ((Gravity) / (4.1)))\n            change y by ((Gravity) * (2))\n            if <<touching (map v)?> or <touching (semisolids v)?>> then\n                change y by ((Gravity) * (-2))\n                FindFloor\n                replace item (HammerNo.) of [hammerdir v] with [0]\n            end\n            if <<(item (HammerNo.) of [hammerdir v]) = [0]> and <<(pick random (1) to (40)) = [1]> and <(item (HammerNo.) of [hammercooldown v]) < [3]>>> then\n                replace item (HammerNo.) of [hammerdir v] with [16]\n            end\n            change y by (item (HammerNo.) of [hammerdir v])\n            if <<touching (map v)?> or <<touching (semisolids v)?> and <not <(item (HammerNo.) of [hammerdir v]) > [0]>>>> then\n                change y by ((item (HammerNo.) of [hammerdir v]) * (-1))\n                if <(item (HammerNo.) of [hammerdir v]) > [0]> then\n                replace item (HammerNo.) of [hammerdir v] with [0]\n            end\n            if <(x position) > ([x position v] of [player v])> then\n                point in direction (-90)\n            else\n                point in direction (90)\n            end\n            move (1) steps\n            YSmoothing\n            switch costume to (hitbox3 v)\n            if <<not <touching (map v)?>> and <(item (HammerNo.) of [hammerdir v]) = [0]>> then\n                move (-1) steps\n            else\n                switch costume to (hitbox2 v)\n                if <touching (map v)?> then\n                    move (-1) steps\n                end\n            end\n            switch costume to (hitbox2 v)\n            if <(item (HammerNo.) of [hammercooldown v]) < [0]> then\n                replace item (HammerNo.) of [hammercooldown v] with [10]\n                add (((x position) - (MapX)) / (28)) to [hammerx v]\n                add ((((y position) - (MapY)) / (28)) + (1)) to [hammery v]\n                add [4] to [hammertype v]\n                add (direction) to [hammerdir v]\n                add [0] to [hammercooldown v]\n            end\n        else\n            if <(item (HammerNo.) of [hammertype v]) = [4]> then\n                move (4) steps\n                if <not <<<(x position) < [240]> and <(x position) > [-240]>> and <<(y position) < [180]> or <(y position) > [-180]>>>> then\n                    set [deletehammerno. v] to (HammerNo.)\n                end\n            else\n                go [forward v] (1) layers\n                if <(direction) > [0]> then\n                    turn right (6) degrees\n                    if <(direction) > [150]> then\n                        point in direction (150)\n                    end\n                else\n                    turn left (6) degrees\n                    if <(direction) < [-150]> then\n                        point in direction (-150)\n                    end\n                end\n                change y by (([cos v] of (direction) ) * (6))\n                move (5) steps\n                replace item (HammerNo.) of [hammerdir v] with (direction)\n                if <not <<<(x position) < [240]> and <(x position) > [-240]>> and <<<(y position) < [180]> and <(Underground) = [1]>> or <(y position) > [-180]>>>> then\n                    set [deletehammerno. v] to (HammerNo.)\n                end\n            end\n        end\n    end\nend\nreplace item (HammerNo.) of [hammerx v] with (((x position) - (MapX)) / (28))\nreplace item (HammerNo.) of [hammery v] with (((y position) - (MapY)) / (28))\nchange y by (-1)\n\nwhen I receive [startgame v]\ngo to x: (0) y: (0)\nset size to (350) %\nhide\ndelete all of [hammerx v]\ndelete all of [hammery v]\ndelete all of [hammerdir v]\ndelete all of [hammertype v]\ndelete all of [hammercooldown v]\nset rotation style [left-right v]\nset [deletehammerno. v] to [0]\nif <[1] = [1]> then\n    delete this clone\nend\nif <(Level) = [2]> then\n    AddHammer [125] [6] [1]\nend\nif <(Level) = [6]> then\n    AddHammer [86] [3] [1]\nend\nif <(Level) = [9]> then\n    AddHammer [27] [5] [3]\n    AddHammer [57] [3] [1]\n    AddHammer [87] [4] [3]\n    AddHammer [108] [4] [1]\n    AddHammer [153] [5] [3]\n    AddHammer [7] [3] [3]\nend\nif <(Level) = [12]> then\n    AddHammer [46] [8] [5]\n    AddHammer [38] [5] [5]\n    AddHammer [-4] [7] [5]\n    AddHammer [73.5] [6] [5]\n    AddHammer [66.5] [10] [5]\n    AddHammer [178] [5] [5]\n    AddHammer [188] [3] [5]\n    AddHammer [159] [5] [3]\nend\n\ndefine FindFloor\nrepeat until <<touching (map v)?> or <touching (semisolids v)?>>\n    change y by (-1)\nend\nchange y by (1)\n\ndefine YSmoothing\nif <<touching (map v)?> or <touching (semisolids v)?>> then\n    repeat (8)\n        if <<touching (map v)?> or <touching (semisolids v)?>> then\n            change y by (1)\n        end\n    end\n    if <<touching (map v)?> or <touching (semisolids v)?>> then\n        change y by (-8)\n    end\nend\n\nwhen I receive [costumeeverything v]\nif <(item (HammerNo.) of [hammertype v]) = [1]> then\n    if <<(item (HammerNo.) of [hammercooldown v]) < [2]> or <(item (HammerNo.) of [hammercooldown v]) = [4.5]>> then\n        switch costume to (([floor v] of (((GlobalCostumeNo.) * (1.5)) mod (2)) ) + (3))\n    else\n        switch costume to (([floor v] of (((GlobalCostumeNo.) * (1.5)) mod (2)) ) + (1))\n    end\nelse\n    if <(item (HammerNo.) of [hammertype v]) = [3]> then\n        if <<(item (HammerNo.) of [hammercooldown v]) < [3]> or <(item (HammerNo.) of [hammercooldown v]) = [4.5]>> then\n            switch costume to (([floor v] of (((GlobalCostumeNo.) * (1.5)) mod (2)) ) + (8))\n        else\n            switch costume to (([floor v] of (((GlobalCostumeNo.) * (1.5)) mod (2)) ) + (6))\n        end\n    else\n        if <(item (HammerNo.) of [hammertype v]) = [5]> then\n            switch costume to (([floor v] of (((GlobalCostumeNo.) * (1.5)) mod (2)) ) + (10))\n            if <(item (HammerNo.) of [hammercooldown v]) < [3]> then\n                switch costume to (12 v)\n            end\n            if <(item (HammerNo.) of [hammercooldown v]) < [2]> then\n                switch costume to (13 v)\n            end\n            if <<(item (HammerNo.) of [hammercooldown v]) < [1]> or <(item (HammerNo.) of [hammercooldown v]) = [8]>> then\n                switch costume to (14 v)\n            end\n        else\n            if <(item (HammerNo.) of [hammertype v]) = [4]> then\n                switch costume to (15 v)\n            else\n                point in direction (([floor v] of (((GlobalCostumeNo.) * (2.5)) mod (4)) ) * (90))\n                switch costume to (5 v)\n                set rotation style [all around v]\n            end\n        end\n    end\nend\n\nwhen I receive [hidegame v]\nif <[1] = [1]> then\n    delete this clone\nend\nhide\n\nwhen I receive [playerupdated v]\nif <(HammerNo.) > [0]> then\n    if <<(item (HammerNo.) of [hammertype v]) = [1]> or <<(item (HammerNo.) of [hammertype v]) = [3]> or <(item (HammerNo.) of [hammertype v]) = [5]>>> then\n        switch costume to (hitbox v)\n        if <<(item (HammerNo.) of [hammertype v]) = [5]> and <not <(item (HammerNo.) of [hammercooldown v]) < [1]>>> then\n            switch costume to (hitbox2 v)\n        end\n        if <<<(Spinning) = [1]> and <<(distance to [player v]) < [42]> and <(distance to [player v]) > [8]>>> and <not <((y position) - (4)) > ([y position v] of [player v])>>> then\n            start sound [Stomp v]\n            set [deletehammerno. v] to (HammerNo.)\n            set [spawnx v] to (x position)\n            set [spawny v] to (y position)\n            create clone of (fx v)\n        else\n            if <touching (player v)?> then\n                if <<(Sliding) = [1]> or <<(Statue) = [1]> and <not <(YVel) = [0]>>>> then\n                    start sound [Stomp v]\n                    set [deletehammerno. v] to (HammerNo.)\n                    set [spawnx v] to (x position)\n                    set [spawny v] to (y position)\n                    create clone of (fx v)\n                else\n                    if <(Statue) = [0]> then\n                        if <<([y position v] of [player v]) > ((y position) + ((1) + (<(item (HammerNo.) of [hammertype v]) = [5]> * (2))))> and <not <<(item (HammerNo.) of [hammertype v]) = [5]> and <(item (HammerNo.) of [hammercooldown v]) < [1]>>>> then\n                            start sound [Stomp v]\n                            set [deletehammerno. v] to (HammerNo.)\n                            set [yvel v] to [18]\n                            set [spawnx v] to (x position)\n                            set [spawny v] to (y position)\n                            create clone of (fx v)\n                        else\n                            if <(AllowPlayerDamage) = [1]> then\n                                broadcast (Powerdown v)\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    else\n        if <touching (player v)?> then\n            if <(AllowPlayerDamage) = [1]> then\n                broadcast (Powerdown v)\n            end\n        end\n    end\nend\n\ndefine AddHammer (x) (y) (type)\nadd (x) to [hammerx v]\nadd (y) to [hammery v]\nadd (type) to [hammertype v]\nadd [0] to [hammerdir v]\nadd [1] to [hammercooldown v]\n\nwhen I receive [won v]\nif <[1] = [1]> then\n    delete this clone\nend\ngo to x: (0) y: (0)\nset size to (350) %\nhide\ndelete all of [hammerx v]\ndelete all of [hammery v]\ndelete all of [hammerdir v]\ndelete all of [hammertype v]\ndelete all of [hammercooldown v]\nset rotation style [left-right v]\nset [deletehammerno. v] to [0]\n\nwhen I receive [updateallpositions v]\ngo to x: (((item (HammerNo.) of [hammerx v]) * (28)) + (MapX)) y: (((item (HammerNo.) of [hammery v]) * (28)) + (MapY))\nchange y by (-1)\n\nwhen I receive [fireballhit v]\nif <<(item (HammerNo.) of [hammertype v]) = [1]> or <(item (HammerNo.) of [hammertype v]) = [3]>> then\n    switch costume to (hitbox v)\nelse\n    switch costume to (hitbox2 v)\nend\nif <touching (fireballs v)?> then\n    set [deletehammerno. v] to (HammerNo.)\n    set [spawnx v] to (x position)\n    set [spawny v] to (y position)\n    create clone of (fx v)\nend\n\ngo to x: (500) y: (-500)\n\n@Goombas\n\nwhen I receive [updateeverything v]\nif <[1] = [1]> then\n    delete this clone\nend\nif <(DeleteGoombaNo.) > [0]> then\n    start sound [Stomp v]\n    delete (DeleteGoombaNo.) of [goombax v]\n    delete (DeleteGoombaNo.) of [goombay v]\n    delete (DeleteGoombaNo.) of [goombadir v]\n    set [deletegoombano. v] to [0]\nend\nif <(length of [goombax v]) > [0]> then\n    switch costume to (5 v)\n    FormGoombas\nend\n\ndefine FormGoombas\nshow\nset [goombano. v] to [0]\nrepeat (length of [goombax v])\n    change [goombano. v] by (1)\n    go to x: (((item (GoombaNo.) of [goombax v]) * (28)) + (MapX)) y: (((item (GoombaNo.) of [goombay v]) * (28)) + (MapY))\n    if <<<(x position) < [230]> and <(x position) > [-230]>> and <<(y position) < [175]> and <(y position) > [-172]>>> then\n        point in direction (item (GoombaNo.) of [goombadir v])\n        create clone of (_myself_ v)\n    end\nend\nset [goombano. v] to [0]\nhide\n\nwhen I start as a clone\nchange y by ((Gravity) * (2))\nif <<touching (map v)?> or <touching (semisolids v)?>> then\n    change y by ((Gravity) * (-2))\n    FindFloor\nend\nmove (1) steps\nYSmoothing\nif <touching (map v)?> then\n    turn right (180) degrees\n    move (2) steps\n    if <touching (map v)?> then\n        turn right (180) degrees\n        move (1) steps\n    end\n    replace item (GoombaNo.) of [goombadir v] with (direction)\nend\nreplace item (GoombaNo.) of [goombax v] with (((x position) - (MapX)) / (28))\nreplace item (GoombaNo.) of [goombay v] with (((y position) - (MapY)) / (28))\nchange y by (-1)\n\nwhen I receive [startgame v]\nif <[1] = [1]> then\n    delete this clone\nend\ngo to x: (0) y: (0)\nset size to (350) %\nhide\ndelete all of [goombax v]\ndelete all of [goombay v]\ndelete all of [goombadir v]\nset rotation style [left-right v]\nset [deletegoombano. v] to [0]\nif <(Level) = [1]> then\n    AddGoomba [-14] [2] [-90]\n    AddGoomba [6] [10] [90]\n    AddGoomba [60] [8] [-90]\n    AddGoomba [50] [9] [90]\n    AddGoomba [108] [11] [-90]\n    AddGoomba [146] [6] [-90]\n    AddGoomba [181] [2] [90]\nend\nif <(Level) = [4]> then\n    AddGoomba [28] [2] [-90]\n    AddGoomba [26] [2] [-90]\n    AddGoomba [24] [2] [-90]\nend\nif <(Level) = [5]> then\n    AddGoomba [15] [-13] [-90]\n    AddGoomba [17] [-13] [-90]\n    AddGoomba [19] [-13] [-90]\nend\nif <(Level) = [6]> then\n    AddGoomba [14] [9] [-90]\n    AddGoomba [125] [9] [-90]\n    AddGoomba [165] [13] [-90]\nend\nif <(Level) = [7]> then\n    AddGoomba [-14] [1] [-90]\n    AddGoomba [3] [1] [-90]\n    AddGoomba [19] [2] [-90]\n    AddGoomba [24] [2] [-90]\n    AddGoomba [29] [2] [-90]\n    AddGoomba [31] [2] [-90]\nend\nif <(Level) = [9]> then\n    AddGoomba [180] [4] [-90]\n    AddGoomba [178] [4] [-90]\n    AddGoomba [176] [4] [-90]\nend\nif <(Level) = [12]> then\n    AddGoomba [18] [3] [-90]\n    AddGoomba [21] [3] [-90]\n    AddGoomba [24] [3] [-90]\nend\nif <(Level) = [13]> then\n    AddGoomba [134] [0] [-90]\n    AddGoomba [130] [0] [-90]\n    AddGoomba [126] [0] [-90]\n    AddGoomba [122] [0] [-90]\nend\n\ndefine FindFloor\nrepeat until <<touching (map v)?> or <touching (semisolids v)?>>\n    change y by (-1)\nend\nchange y by (1)\n\ndefine YSmoothing\nif <<touching (map v)?> or <touching (semisolids v)?>> then\n    repeat (8)\n        if <<touching (map v)?> or <touching (semisolids v)?>> then\n            change y by (1)\n        end\n    end\n    if <<touching (map v)?> or <touching (semisolids v)?>> then\n        change y by (-8)\n    end\nend\n\nwhen I receive [costumeeverything v]\nswitch costume to (([floor v] of (((GlobalCostumeNo.) * (1.5)) mod (2)) ) + (1))\nif <(GoombaNo.) = (DeleteGoombaNo.)> then\n    switch costume to (3 v)\nend\n\nwhen I receive [hidegame v]\nif <[1] = [1]> then\n    delete this clone\nend\nhide\n\nwhen I receive [playerupdated v]\nif <(GoombaNo.) > [0]> then\n    switch costume to (4 v)\n    if <<<(Spinning) = [1]> and <<(distance to [player v]) < [42]> and <(distance to [player v]) > [8]>>> and <not <((y position) - (4)) > ([y position v] of [player v])>>> then\n        set [deletegoombano. v] to (GoombaNo.)\n        set [spawnx v] to (x position)\n        set [spawny v] to (y position)\n        create clone of (fx v)\n    else\n        if <touching (player v)?> then\n            if <<(Sliding) = [1]> or <<(Statue) = [1]> and <not <(YVel) = [0]>>>> then\n                set [deletegoombano. v] to (GoombaNo.)\n                set [spawnx v] to (x position)\n                set [spawny v] to (y position)\n                create clone of (fx v)\n            else\n                if <(Statue) = [0]> then\n                    if <([y position v] of [player v]) > ((y position) + (1))> then\n                        set [deletegoombano. v] to (GoombaNo.)\n                        set [yvel v] to [18]\n                        set [spawnx v] to (x position)\n                        set [spawny v] to (y position)\n                        create clone of (fx v)\n                    else\n                        if <(AllowPlayerDamage) = [1]> then\n                            broadcast (Powerdown v)\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\ndefine AddGoomba (x) (y) (dir)\nadd (dir) to [goombadir v]\nadd (x) to [goombax v]\nadd (y) to [goombay v]\n\nwhen I receive [won v]\nif <[1] = [1]> then\n    delete this clone\nend\ngo to x: (0) y: (0)\nset size to (350) %\nhide\ndelete all of [goombax v]\ndelete all of [goombay v]\ndelete all of [goombadir v]\nset rotation style [left-right v]\nset [deletegoombano. v] to [0]\n\nwhen I receive [updateallpositions v]\ngo to x: (((item (GoombaNo.) of [goombax v]) * (28)) + (MapX)) y: (((item (GoombaNo.) of [goombay v]) * (28)) + (MapY))\nchange y by (-1)\n\nwhen I receive [fireballhit v]\nswitch costume to (4 v)\nif <touching (fireballs v)?> then\n    set [deletegoombano. v] to (GoombaNo.)\n    set [spawnx v] to (x position)\n    set [spawny v] to (y position)\n    create clone of (fx v)\nend\n\nwhen I receive [flagclicked v]\nif <[1] = [1]> then\n    delete this clone\nend\ngo to x: (0) y: (0)\nset size to (350) %\nhide\ndelete all of [goombax v]\ndelete all of [goombay v]\ndelete all of [goombadir v]\nset rotation style [left-right v]\nset [deletegoombano. v] to [0]\n\n@Boos\n\nwhen I receive [updateeverything v]\nif <[1] = [1]> then\n    delete this clone\nend\nif <(length of [boox v]) > [0]> then\n    switch costume to (3 v)\n    FormBoos\nend\n\ndefine FormBoos\nshow\nset [boono. v] to [0]\nrepeat (length of [boox v])\n    change [boono. v] by (1)\n    go to x: (((item (BooNo.) of [boox v]) * (28)) + (MapX)) y: (((item (BooNo.) of [booy v]) * (28)) + (MapY))\n    if <<<(x position) < [230]> and <(x position) > [-230]>> and <<(y position) < [175]> and <(y position) > [-172]>>> then\n        create clone of (_myself_ v)\n    end\nend\nset [boono. v] to [0]\nhide\n\nwhen I start as a clone\npoint towards (player v)\nif <(x position) > ([x position v] of [player v])> then\n    if <not <([direction v] of [player v]) = [90]>> then\n        move (1) steps\n        replace item (BooNo.) of [boox v] with (((x position) - (MapX)) / (28))\n        replace item (BooNo.) of [booy v] with (((y position) - (MapY)) / (28))\n        if <(pick random (1) to (120)) = [1]> then\n            start sound [Boo v]\n        end\n    end\nelse\n    if <([direction v] of [player v]) = [90]> then\n        move (1) steps\n        replace item (BooNo.) of [boox v] with (((x position) - (MapX)) / (28))\n        replace item (BooNo.) of [booy v] with (((y position) - (MapY)) / (28))\n        if <(pick random (1) to (120)) = [1]> then\n            start sound [Boo v]\n        end\n    end\nend\nchange y by (([sin v] of ((GlobalCostumeNo.) * (56)) ) * (4))\nchange y by (-1)\n\nwhen I receive [startgame v]\nif <[1] = [1]> then\n    delete this clone\nend\ngo to x: (0) y: (0)\nset size to (350) %\nhide\ndelete all of [boox v]\ndelete all of [booy v]\nset rotation style [left-right v]\nif <(Level) = [5]> then\n    AddBoo [-16] [7]\n    AddBoo [-17] [8]\n    AddBoo [5] [7]\n    AddBoo [4] [8]\n    AddBoo [27] [4]\n    AddBoo [28] [5]\n    AddBoo [27] [6]\n    AddBoo [29] [-11]\n    AddBoo [33] [-10]\n    AddBoo [11.5] [-3]\n    AddBoo [12] [-4]\n    AddBoo [22] [-13]\n    AddBoo [0] [-13]\n    AddBoo [0] [-15]\n    AddBoo [141] [7]\n    AddBoo [142] [6]\n    AddBoo [157] [15]\n    AddBoo [158] [14]\n    AddBoo [180] [2]\n    AddBoo [190] [12]\n    AddBoo [122] [12]\n    AddBoo [127] [12]\n    AddBoo [132] [12]\nend\n\ndefine FindFloor\nrepeat until <<touching (map v)?> or <touching (semisolids v)?>>\n    change y by (-1)\nend\nchange y by (1)\n\ndefine YSmoothing\nif <<touching (map v)?> or <touching (semisolids v)?>> then\n    repeat (8)\n        if <<touching (map v)?> or <touching (semisolids v)?>> then\n            change y by (1)\n        end\n    end\n    if <<touching (map v)?> or <touching (semisolids v)?>> then\n        change y by (-8)\n    end\nend\n\nwhen I receive [costumeeverything v]\nif <(x position) > ([x position v] of [player v])> then\n    if <([direction v] of [player v]) = [90]> then\n        switch costume to (1 v)\n    else\n        switch costume to (2 v)\n    end\nelse\n    if <([direction v] of [player v]) = [90]> then\n        switch costume to (2 v)\n    else\n        switch costume to (1 v)\n    end\nend\n\nwhen I receive [hidegame v]\nif <[1] = [1]> then\n    delete this clone\nend\nhide\n\nwhen I receive [playerupdated v]\nif <(BooNo.) > [0]> then\n    if <touching (player v)?> then\n        if <(AllowPlayerDamage) = [1]> then\n            broadcast (Powerdown v)\n        end\n    end\nend\n\ndefine AddBoo (x) (y)\nadd (x) to [boox v]\nadd (y) to [booy v]\n\nwhen I receive [won v]\nif <[1] = [1]> then\n    delete this clone\nend\ngo to x: (0) y: (0)\nset size to (350) %\nhide\ndelete all of [boox v]\ndelete all of [booy v]\nset rotation style [left-right v]\n\nwhen I receive [updateallpositions v]\ngo to x: (((item (BooNo.) of [boox v]) * (28)) + (MapX)) y: (((item (BooNo.) of [booy v]) * (28)) + (MapY))\nchange y by (-1)\n\nwhen I receive [flagclicked v]\nif <[1] = [1]> then\n    delete this clone\nend\nhide\n\n@PiranhaPlants\n\nwhen I receive [hidegame v]\nif <[1] = [1]> then\n    delete this clone\nend\nhide\n\nwhen I receive [startgame v]\nif <[1] = [1]> then\n    delete this clone\nend\ngo to x: (0) y: (0)\nset size to (350) %\nhide\ndelete all of [planty v]\ndelete all of [plantx v]\ndelete all of [plantdir v]\ndelete all of [plantstate v]\nset rotation style [left-right v]\nset [deleteplantno. v] to [0]\nif <(Level) = [2]> then\n    AddPlant [80] [3.85] [-90] [150]\nend\nif <(Level) = [3]> then\n    AddPlant [-7] [-20.15] [-90] [-150]\n    AddPlant [14] [-13.15] [-90] [-150]\n    AddPlant [10] [-4.85] [90] [-150]\n    AddPlant [18] [-4.85] [90] [-150]\n    AddPlant [99] [-17.15] [-90] [-150]\n    AddPlant [112] [-17.15] [-90] [-150]\n    AddPlant [139] [-1.15] [-90] [-150]\n    AddPlant [149] [-1.15] [-90] [-150]\n    AddPlant [159] [-1.15] [-90] [-150]\n    AddPlant [172] [-1.15] [-90] [-150]\nend\nif <(Level) = [4]> then\n    AddPlant [53] [13.15] [90] [-150]\n    AddPlant [55] [11.15] [90] [-150]\n    AddPlant [57] [9.15] [90] [-150]\n    AddPlant [59] [7.15] [90] [-150]\nend\nif <(Level) = [7]> then\n    AddPlant [-7] [1.85] [-90] [-150]\n    AddPlant [83] [0.85] [-90] [150]\n    AddPlant [87] [1.85] [-90] [-150]\n    AddPlant [112] [17.85] [-90] [-150]\n    AddPlant [116] [0.85] [-90] [150]\nend\nif <(Level) = [10]> then\n    AddPlant [160] [4.85] [-90] [150]\n    AddPlant [168] [4.85] [-90] [-150]\n    AddPlant [176] [2.85] [-90] [150]\n    AddPlant [186] [1.85] [-90] [150]\nend\nif <(Level) = [11]> then\n    AddPlant [34] [3.85] [-90] [150]\n    AddPlant [40] [3.85] [-90] [150]\n    AddPlant [46] [4.85] [-90] [150]\n    AddPlant [46] [12.15] [90] [150]\n    AddPlant [53] [3.85] [-90] [150]\n    AddPlant [53] [12.15] [90] [150]\n    AddPlant [59] [4.85] [-90] [-150]\n    AddPlant [59] [13.15] [90] [-150]\nend\n\nwhen I receive [won v]\nif <[1] = [1]> then\n    delete this clone\nend\ngo to x: (0) y: (0)\nset size to (350) %\nhide\ndelete all of [planty v]\ndelete all of [plantx v]\ndelete all of [plantdir v]\ndelete all of [plantstate v]\nset rotation style [left-right v]\nset [deleteplantno. v] to [0]\n\ndefine AddPlant (x) (y) (dir) (state)\nadd (dir) to [plantdir v]\nadd (x) to [plantx v]\nadd (y) to [planty v]\nadd (state) to [plantstate v]\n\nwhen I receive [updateeverything v]\nif <[1] = [1]> then\n    delete this clone\nend\nif <(DeletePlantNo.) > [0]> then\n    start sound [Stomp v]\n    delete (DeletePlantNo.) of [plantx v]\n    delete (DeletePlantNo.) of [planty v]\n    delete (DeletePlantNo.) of [plantdir v]\n    delete (DeletePlantNo.) of [plantstate v]\n    set [deleteplantno. v] to [0]\nend\nif <(length of [plantx v]) > [0]> then\n    FormPlants\nend\n\nwhen I receive [playerupdated v]\nif <(item (PlantNo.) of [plantdir v]) = [90]> then\n    switch costume to (hitbox2 v)\nelse\n    switch costume to (hitbox v)\nend\nif <touching (player v)?> then\n    if <<(Statue) = [1]> and <not <(YVel) = [0]>>> then\n        set [deleteplantno. v] to (PlantNo.)\n        set [spawnx v] to (x position)\n        set [spawny v] to (y position)\n        create clone of (fx v)\n    else\n        if <(Statue) = [0]> then\n            if <(AllowPlayerDamage) = [1]> then\n                broadcast (Powerdown v)\n            end\n        end\n    end\nend\n\nwhen I receive [updateallpositions v]\nif <(item (PlantNo.) of [plantdir v]) = [90]> then\n    switch costume to (hitbox2 v)\nelse\n    switch costume to (hitbox v)\nend\ngo to x: (((item (PlantNo.) of [plantx v]) * (28)) + (MapX)) y: (((item (PlantNo.) of [planty v]) * (28)) + (MapY))\npoint in direction (item (PlantNo.) of [plantdir v])\nif <(item (PlantNo.) of [plantstate v]) < [0]> then\n    if <(item (PlantNo.) of [plantstate v]) > [-30]> then\n        turn right (90) degrees\n        move (([abs v] of (item (PlantNo.) of [plantstate v]) ) * (2)) steps\n        turn left (90) degrees\n    else\n        if <(item (PlantNo.) of [plantstate v]) > [-60]> then\n            turn right (90) degrees\n            move (60) steps\n            turn left (90) degrees\n        else\n            if <(item (PlantNo.) of [plantstate v]) > [-90]> then\n                turn right (90) degrees\n                move (60) steps\n                move (((item (PlantNo.) of [plantstate v]) + (60)) * (2)) steps\n                turn left (90) degrees\n            end\n        end\n    end\n    point towards (player v)\n    point in direction (([floor v] of ((direction) / (90)) ) * (90))\n    turn right (45) degrees\nelse\n    if <(item (PlantNo.) of [plantstate v]) < [30]> then\n        turn right (90) degrees\n        move (([abs v] of (item (PlantNo.) of [plantstate v]) ) * (2)) steps\n        turn left (90) degrees\n    else\n        if <(item (PlantNo.) of [plantstate v]) < [60]> then\n            turn right (90) degrees\n            move (60) steps\n            turn left (90) degrees\n        else\n            if <(item (PlantNo.) of [plantstate v]) < [90]> then\n                turn right (90) degrees\n                move (60) steps\n                move (((item (PlantNo.) of [plantstate v]) - (60)) * (-2)) steps\n                turn left (90) degrees\n            end\n        end\n    end\nend\nchange y by (-1)\n\ndefine FormPlants\nshow\nset [plantno. v] to [0]\nrepeat (length of [plantx v])\n    change [plantno. v] by (1)\n    if <(item (PlantNo.) of [plantdir v]) = [90]> then\n        switch costume to (hitbox2 v)\n    else\n        switch costume to (hitbox v)\n    end\n    go to x: (((item (PlantNo.) of [plantx v]) * (28)) + (MapX)) y: (((item (PlantNo.) of [planty v]) * (28)) + (MapY))\n    if <(item (PlantNo.) of [plantdir v]) = [90]> then\n        if <<<(x position) < [240]> and <(x position) > [-240]>> and <<(y position) < [208]> and <(y position) > [-182]>>> then\n            point in direction (item (PlantNo.) of [plantdir v])\n            create clone of (_myself_ v)\n        end\n    else\n        if <<<(x position) < [240]> and <(x position) > [-240]>> and <<(y position) < [182]> and <(y position) > [-208]>>> then\n            point in direction (item (PlantNo.) of [plantdir v])\n            create clone of (_myself_ v)\n        end\n    end\nend\nset [plantno. v] to [0]\nhide\n\nwhen I start as a clone\nif <(item (PlantNo.) of [plantstate v]) < [0]> then\n    replace item (PlantNo.) of [plantstate v] with ((item (PlantNo.) of [plantstate v]) - (1))\n    if <(item (PlantNo.) of [plantstate v]) > [-30]> then\n        turn right (90) degrees\n        move (([abs v] of (item (PlantNo.) of [plantstate v]) ) * (2)) steps\n        turn left (90) degrees\n    else\n        if <(item (PlantNo.) of [plantstate v]) > [-60]> then\n            turn right (90) degrees\n            move (60) steps\n            if <(item (PlantNo.) of [plantstate v]) = [-45]> then\n                point towards (player v)\n                point in direction (([floor v] of ((direction) / (90)) ) * (90))\n                turn right (45) degrees\n                add ((((x position) + (([sin v] of ((item (PlantNo.) of [plantdir v]) + (90)) ) * (28))) - (MapX)) / (28)) to [fireballx v]\n                add ((((y position) + (([cos v] of ((item (PlantNo.) of [plantdir v]) + (90)) ) * (28))) - (MapY)) / (28)) to [firebally v]\n                add [2] to [fireballtype v]\n                add (direction) to [fireballdir v]\n                add [0] to [fireballbounces v]\n                go to x: (((item (PlantNo.) of [plantx v]) * (28)) + (MapX)) y: (((item (PlantNo.) of [planty v]) * (28)) + (MapY))\n                point in direction (item (PlantNo.) of [plantdir v])\n                turn right (90) degrees\n                move (60) steps\n            end\n            turn left (90) degrees\n        else\n            if <(item (PlantNo.) of [plantstate v]) > [-90]> then\n                turn right (90) degrees\n                move (60) steps\n                move (((item (PlantNo.) of [plantstate v]) + (60)) * (2)) steps\n                turn left (90) degrees\n            else\n                if <(item (PlantNo.) of [plantstate v]) > [-150]> then\n            end\n        end\n    end\n    point towards (player v)\n    point in direction (([floor v] of ((direction) / (90)) ) * (90))\n    turn right (45) degrees\nelse\n    replace item (PlantNo.) of [plantstate v] with ((item (PlantNo.) of [plantstate v]) + (1))\n    if <(item (PlantNo.) of [plantstate v]) < [30]> then\n        turn right (90) degrees\n        move (([abs v] of (item (PlantNo.) of [plantstate v]) ) * (2)) steps\n        turn left (90) degrees\n    else\n        if <(item (PlantNo.) of [plantstate v]) < [60]> then\n            turn right (90) degrees\n            move (60) steps\n            turn left (90) degrees\n        else\n            if <(item (PlantNo.) of [plantstate v]) < [90]> then\n                turn right (90) degrees\n                move (60) steps\n                move (((item (PlantNo.) of [plantstate v]) - (60)) * (-2)) steps\n                turn left (90) degrees\n            else\n                if <(item (PlantNo.) of [plantstate v]) < [150]> then\n            end\n        end\n    end\nend\n\nwhen I receive [costumeeverything v]\nif <(item (PlantNo.) of [plantstate v]) < [0]> then\n    if <(item (PlantNo.) of [plantdir v]) = [90]> then\n        if <([abs v] of (direction) ) < [90]> then\n            switch costume to (6 v)\n            if <<(item (PlantNo.) of [plantstate v]) > [-55]> and <not <(item (PlantNo.) of [plantstate v]) > [-35]>>> then\n                switch costume to (5 v)\n            end\n        else\n            switch costume to (8 v)\n            if <<(item (PlantNo.) of [plantstate v]) > [-60]> and <not <(item (PlantNo.) of [plantstate v]) > [-30]>>> then\n                switch costume to (7 v)\n            end\n        end\n    else\n        if <([abs v] of (direction) ) < [90]> then\n            switch costume to (4 v)\n            if <<(item (PlantNo.) of [plantstate v]) > [-60]> and <not <(item (PlantNo.) of [plantstate v]) > [-30]>>> then\n                switch costume to (3 v)\n            end\n        else\n            switch costume to (2 v)\n            if <<(item (PlantNo.) of [plantstate v]) > [-55]> and <not <(item (PlantNo.) of [plantstate v]) > [-35]>>> then\n                switch costume to (1 v)\n            end\n        end\n    end\nelse\n    set rotation style [all around v]\n    turn right (180) degrees\n    switch costume to (([floor v] of (((GlobalCostumeNo.) * (3)) mod (2)) ) + (9))\nend\n\nreplace item (PlantNo.) of [koopax v] with (((x position) - (MapX)) / (28))\nreplace item (PlantNo.) of [koopay v] with (((y position) - (MapY)) / (28))\n\nwhen I receive [fireballhit v]\nif <(PlantNo.) > [0]> then\n    if <(item (PlantNo.) of [plantdir v]) = [90]> then\n        switch costume to (hitbox2 v)\n    else\n        switch costume to (hitbox v)\n    end\n    if <<touching (fireballs v)?> and <not <<(item (PlantNo.) of [plantstate v]) > [-47]> and <not <(item (PlantNo.) of [plantstate v]) > [-45]>>>>> then\n        set [deleteplantno. v] to (PlantNo.)\n        set [spawnx v] to (x position)\n        set [spawny v] to (y position)\n        create clone of (fx v)\n    end\nend\n\nwhen I receive [flagclicked v]\nif <[1] = [1]> then\n    delete this clone\nend\ngo to x: (0) y: (0)\nset size to (350) %\nhide\ndelete all of [planty v]\ndelete all of [plantx v]\ndelete all of [plantdir v]\ndelete all of [plantstate v]\nset rotation style [all around v]\nset [deletegoombano. v] to [0]\n\n@Koopas\n\nwhen I receive [updateeverything v]\nif <[1] = [1]> then\n    delete this clone\nend\nif <(DeleteKoopaNo.) > [0]> then\n    start sound [Stomp v]\n    delete (DeleteKoopaNo.) of [koopax v]\n    delete (DeleteKoopaNo.) of [koopay v]\n    delete (DeleteKoopaNo.) of [koopadir v]\n    delete (DeleteKoopaNo.) of [koopastate v]\n    delete (DeleteKoopaNo.) of [koopatype v]\n    delete (DeleteKoopaNo.) of [koopayvelocity v]\n    set [deletekoopano. v] to [0]\nend\nif <(length of [koopax v]) > [0]> then\n    switch costume to (hitbox v)\n    FormKoopas\nend\n\ndefine FormKoopas\nshow\nset [koopano. v] to [0]\nrepeat (length of [koopax v])\n    change [koopano. v] by (1)\n    go to x: (((item (KoopaNo.) of [koopax v]) * (28)) + (MapX)) y: (((item (KoopaNo.) of [koopay v]) * (28)) + (MapY))\n    if <<<(x position) < [230]> and <(x position) > [-230]>> and <<(y position) < [175]> and <(y position) > [-172]>>> then\n        point in direction (item (KoopaNo.) of [koopadir v])\n        if <(item (KoopaNo.) of [koopastate v]) > [1]> then\n            switch costume to (shellmove v)\n        else\n            switch costume to (fullmove v)\n        end\n        create clone of (_myself_ v)\n    end\nend\nset [koopano. v] to [0]\nhide\n\nwhen I start as a clone\nif <<(item (KoopaNo.) of [koopastate v]) = [0]> and <(item (KoopaNo.) of [koopatype v]) = [R]>> then\n    change y by (([sin v] of ((GlobalCostumeNo.) * (20)) ) * (48))\nend\nif <<(item (KoopaNo.) of [koopastate v]) > [0]> or <<(item (KoopaNo.) of [koopastate v]) = [0]> and <(item (KoopaNo.) of [koopatype v]) = [G]>>> then\n    change y by ((Gravity) * (2))\n    if <<touching (map v)?> or <touching (semisolids v)?>> then\n        change y by ((Gravity) * (-2))\n        FindFloor\n        if <(item (KoopaNo.) of [koopayvelocity v]) < [-20]> then\n            replace item (KoopaNo.) of [koopayvelocity v] with [16]\n        end\n        if <<(item (KoopaNo.) of [koopastate v]) = [1]> and <(item (KoopaNo.) of [koopatype v]) = [R]>> then\n            switch costume to (rscan v)\n            if <not <<touching (map v)?> or <touching (semisolids v)?>>> then\n                turn right (180) degrees\n                replace item (KoopaNo.) of [koopadir v] with (direction)\n            end\n            if <(item (KoopaNo.) of [koopastate v]) > [1]> then\n                switch costume to (shellmove v)\n            else\n                switch costume to (fullmove v)\n            end\n        end\n    end\n    if <<(item (KoopaNo.) of [koopastate v]) = [0]> and <(item (KoopaNo.) of [koopatype v]) = [G]>> then\n        replace item (KoopaNo.) of [koopayvelocity v] with ((item (KoopaNo.) of [koopayvelocity v]) - (0.5))\n        change y by (item (KoopaNo.) of [koopayvelocity v])\n        if <<touching (map v)?> or <touching (semisolids v)?>> then\n            change y by ((item (KoopaNo.) of [koopayvelocity v]) * (-1))\n            if <(item (KoopaNo.) of [koopayvelocity v]) > [0]> then\n                FindCeiling\n            else\n                FindFloor\n            end\n        end\n    end\n    if <<<(item (KoopaNo.) of [koopastate v]) = [1]> or <(item (KoopaNo.) of [koopastate v]) = [3]>> or <<(item (KoopaNo.) of [koopastate v]) = [0]> and <(item (KoopaNo.) of [koopatype v]) = [G]>>> then\n        move ((1) + (<(item (KoopaNo.) of [koopastate v]) = [3]> * (4))) steps\n        YSmoothing\n        if <touching (map v)?> then\n            turn right (180) degrees\n            move ((2) + (<(item (KoopaNo.) of [koopastate v]) = [3]> * (8))) steps\n            if <touching (map v)?> then\n                turn right (180) degrees\n                move ((1) + (<(item (KoopaNo.) of [koopastate v]) = [3]> * (4))) steps\n            end\n            replace item (KoopaNo.) of [koopadir v] with (direction)\n        end\n    end\n    replace item (KoopaNo.) of [koopax v] with (((x position) - (MapX)) / (28))\n    replace item (KoopaNo.) of [koopay v] with (((y position) - (MapY)) / (28))\nend\nchange y by (-1)\n\nwhen I receive [startgame v]\nif <[1] = [1]> then\n    delete this clone\nend\ngo to x: (0) y: (0)\nset size to (350) %\nhide\ndelete all of [koopax v]\ndelete all of [koopay v]\ndelete all of [koopadir v]\ndelete all of [koopastate v]\ndelete all of [koopatype v]\ndelete all of [koopayvelocity v]\nset rotation style [left-right v]\nset [deletekoopano. v] to [0]\nif <(Level) = [1]> then\n    AddKoopa [-11] [5] [90] [1] [G]\n    AddKoopa [9] [7] [90] [1] [R]\n    AddKoopa [70] [5] [-90] [1] [R]\n    AddKoopa [131] [6] [-90] [1] [R]\n    AddKoopa [162] [8] [-90] [1] [R]\nend\nif <(Level) = [2]> then\n    AddKoopa [9] [2] [-90] [0] [G]\n    AddKoopa [36] [3] [-90] [1] [R]\n    AddKoopa [59] [4] [-90] [0] [G]\n    AddKoopa [61] [4] [-90] [0] [G]\n    AddKoopa [160] [4] [-90] [0] [R]\n    AddKoopa [164] [4] [-90] [0] [R]\n    AddKoopa [180] [4] [-90] [0] [R]\n    AddKoopa [184] [4] [-90] [0] [R]\nend\nif <(Level) = [3]> then\n    AddKoopa [154] [2] [-90] [0] [R]\n    AddKoopa [116] [3] [90] [0] [G]\n    AddKoopa [118] [3] [90] [0] [G]\nend\nif <(Level) = [6]> then\n    AddKoopa [0] [12] [-90] [0] [G]\n    AddKoopa [34] [5] [-90] [0] [R]\n    AddKoopa [65] [9] [-90] [0] [G]\n    AddKoopa [78] [12] [-90] [1] [G]\nend\nif <(Level) = [7]> then\n    AddKoopa [5] [3] [90] [1] [R]\n    AddKoopa [53.5] [7] [-90] [0] [G]\n    AddKoopa [56.5] [7] [-90] [0] [G]\n    AddKoopa [59.5] [7] [-90] [0] [G]\n    AddKoopa [62.5] [1] [-90] [1] [G]\n    AddKoopa [101] [3] [-90] [1] [R]\nend\nif <(Level) = [11]> then\n    AddKoopa [25] [11] [90] [1] [R]\nend\nif <(Level) = [13]> then\n    AddKoopa [169] [5] [-90] [1] [R]\n    AddKoopa [173] [5] [-90] [1] [R]\n    AddKoopa [177] [5] [-90] [1] [R]\nend\n\ndefine FindFloor\nrepeat until <<touching (map v)?> or <touching (semisolids v)?>>\n    change y by (-1)\nend\nchange y by (1)\n\ndefine YSmoothing\nif <<touching (map v)?> or <touching (semisolids v)?>> then\n    repeat (8)\n        if <<touching (map v)?> or <touching (semisolids v)?>> then\n            change y by (1)\n        end\n    end\n    if <<touching (map v)?> or <touching (semisolids v)?>> then\n        change y by (-8)\n    end\nend\n\nwhen I receive [costumeeverything v]\nif <(item (KoopaNo.) of [koopastate v]) = [0]> then\n    switch costume to (join (([floor v] of (((GlobalCostumeNo.) * (3)) mod (4)) ) + (11)) (item (KoopaNo.) of [koopatype v]))\nend\nif <(item (KoopaNo.) of [koopastate v]) = [1]> then\n    switch costume to (join (([floor v] of (((GlobalCostumeNo.) * (1.5)) mod (2)) ) + (1)) (item (KoopaNo.) of [koopatype v]))\nend\nif <(item (KoopaNo.) of [koopastate v]) = [2]> then\n    switch costume to (join [3] (item (KoopaNo.) of [koopatype v]))\nend\nif <(item (KoopaNo.) of [koopastate v]) = [3]> then\n    switch costume to (join (([floor v] of (((GlobalCostumeNo.) * (3)) mod (7)) ) + (3)) (item (KoopaNo.) of [koopatype v]))\nend\n\nwhen I receive [hidegame v]\nif <[1] = [1]> then\n    delete this clone\nend\nhide\n\nwhen I receive [playerupdated v]\nif <(item (KoopaNo.) of [koopastate v]) > [1]> then\n    switch costume to (shell v)\nelse\n    switch costume to (full v)\nend\nif <<<(Spinning) = [1]> and <<(distance to [player v]) < [42]> and <(distance to [player v]) > [8]>>> and <not <((y position) - (4)) > ([y position v] of [player v])>>> then\n    set [deletekoopano. v] to (KoopaNo.)\n    set [spawnx v] to (x position)\n    set [spawny v] to (y position)\n    create clone of (fx v)\nelse\n    if <touching (player v)?> then\n        if <<(Sliding) = [1]> or <<(Statue) = [1]> and <not <(YVel) = [0]>>>> then\n            set [deletekoopano. v] to (KoopaNo.)\n            set [spawnx v] to (x position)\n            set [spawny v] to (y position)\n            create clone of (fx v)\n        else\n            if <(Statue) = [0]> then\n                if <(item (KoopaNo.) of [koopastate v]) = [2]> then\n                    replace item (KoopaNo.) of [koopastate v] with [3]\n                    point in direction ([direction v] of [player v])\n                    replace item (KoopaNo.) of [koopadir v] with (direction)\n                    move (2) steps\n                    replace item (KoopaNo.) of [koopax v] with (((x position) - (MapX)) / (28))\n                    replace item (KoopaNo.) of [koopay v] with (((y position) - (MapY)) / (28))\n                    set [yvel v] to [18]\n                    start sound [Kick v]\n                else\n                    if <([y position v] of [player v]) > ((y position) + (1))> then\n                        if <(item (KoopaNo.) of [koopastate v]) = [1]> then\n                            replace item (KoopaNo.) of [koopastate v] with [2]\n                            start sound [Stomp v]\n                        end\n                        if <(item (KoopaNo.) of [koopastate v]) = [3]> then\n                            replace item (KoopaNo.) of [koopastate v] with [2]\n                            start sound [Stomp v]\n                        end\n                        if <(item (KoopaNo.) of [koopastate v]) = [0]> then\n                            if <<(item (KoopaNo.) of [koopayvelocity v]) > [-1]> and <(item (KoopaNo.) of [koopatype v]) = [G]>> then\n                                replace item (KoopaNo.) of [koopay v] with ((((y position) - (12)) - (MapY)) / (28))\n                            else\n                                replace item (KoopaNo.) of [koopay v] with (((y position) - (MapY)) / (28))\n                            end\n                            replace item (KoopaNo.) of [koopastate v] with [1]\n                            start sound [Stomp v]\n                        end\n                        set [yvel v] to [18]\n                    else\n                        if <(AllowPlayerDamage) = [1]> then\n                            broadcast (Powerdown v)\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\ndefine AddKoopa (x) (y) (dir) (state) (colour)\nadd (state) to [koopastate v]\nadd (dir) to [koopadir v]\nadd (x) to [koopax v]\nadd (y) to [koopay v]\nadd (colour) to [koopatype v]\nadd [0] to [koopayvelocity v]\n\nwhen I receive [won v]\nif <[1] = [1]> then\n    delete this clone\nend\ngo to x: (0) y: (0)\nset size to (350) %\nhide\ndelete all of [koopax v]\ndelete all of [koopay v]\ndelete all of [koopadir v]\ndelete all of [koopastate v]\ndelete all of [koopatype v]\ndelete all of [koopayvelocity v]\nset rotation style [left-right v]\nset [deletekoopano. v] to [0]\n\nwhen I receive [updateallpositions v]\ngo to x: (((item (KoopaNo.) of [koopax v]) * (28)) + (MapX)) y: (((item (KoopaNo.) of [koopay v]) * (28)) + (MapY))\nchange y by (-1)\n\ndefine FindCeiling\nrepeat until <<touching (map v)?> or <touching (semisolids v)?>>\n    change y by (1)\nend\nchange y by (-1)\n\nwhen I receive [fireballhit v]\nif <(KoopaNo.) > [0]> then\n    if <(item (KoopaNo.) of [koopastate v]) > [1]> then\n        switch costume to (shell v)\n    else\n        switch costume to (full2 v)\n    end\n    if <touching (fireballs v)?> then\n        set [deletekoopano. v] to (KoopaNo.)\n    end\nend\n\nwhen I receive [flagclicked v]\nif <[1] = [1]> then\n    delete this clone\nend\ngo to x: (0) y: (0)\nset size to (350) %\nhide\ndelete all of [koopax v]\ndelete all of [koopay v]\ndelete all of [koopadir v]\ndelete all of [koopastate v]\ndelete all of [koopatype v]\ndelete all of [koopayvelocity v]\nset rotation style [left-right v]\nset [deletekoopano. v] to [0]\n\n@CheepCheep\n\nwhen I receive [updateeverything v]\nif <[1] = [1]> then\n    delete this clone\nend\nif <(DeleteCheepNo.) > [0]> then\n    start sound [Stomp v]\n    delete (DeleteCheepNo.) of [cheepx v]\n    delete (DeleteCheepNo.) of [cheepy v]\n    delete (DeleteCheepNo.) of [cheepdir v]\n    delete (DeleteCheepNo.) of [cheeptype v]\n    delete (DeleteCheepNo.) of [cheepvelocity v]\n    set [deletecheepno. v] to [0]\nend\nif <(length of [cheepx v]) > [0]> then\n    switch costume to (movementhitbox v)\n    FormCheeps\nend\n\ndefine FormCheeps\nshow\nset [cheepno. v] to [0]\nrepeat (length of [cheepx v])\n    change [cheepno. v] by (1)\n    go to x: (((item (CheepNo.) of [cheepx v]) * (28)) + (MapX)) y: (((item (CheepNo.) of [cheepy v]) * (28)) + (MapY))\n    if <<<(x position) < [230]> and <(x position) > [-230]>> and <<(y position) < [175]> and <(y position) > [-172]>>> then\n        point in direction (item (CheepNo.) of [cheepdir v])\n        create clone of (_myself_ v)\n    end\nend\nset [cheepno. v] to [0]\nhide\n\nwhen I start as a clone\nif <(item (CheepNo.) of [cheeptype v]) = [C]> then\n    move (1) steps\n    if <touching (map v)?> then\n        turn right (180) degrees\n        move (2) steps\n        if <touching (map v)?> then\n            turn right (180) degrees\n            move (1) steps\n        end\n        replace item (CheepNo.) of [cheepdir v] with (direction)\n    end\n    replace item (CheepNo.) of [cheepx v] with (((x position) - (MapX)) / (28))\n    replace item (CheepNo.) of [cheepy v] with (((y position) - (MapY)) / (28))\n    change y by (-1)\n    change y by (([sin v] of ((GlobalCostumeNo.) * (56)) ) * (4))\nelse\n    if <(item (CheepNo.) of [cheepvelocity v]) < [0]> then\n        if <([y position v] of [player v]) > (y position)> then\n            replace item (CheepNo.) of [cheepvelocity v] with ((item (CheepNo.) of [cheepvelocity v]) - (0.2))\n        end\n    else\n        replace item (CheepNo.) of [cheepvelocity v] with ((item (CheepNo.) of [cheepvelocity v]) - (0.2))\n    end\n    if <(item (CheepNo.) of [cheepvelocity v]) < [0]> then\n        change y by (-1)\n    end\n    if <<(item (CheepNo.) of [cheepvelocity v]) < [-5]> and <([y position v] of [player v]) > (y position)>> then\n        point towards (player v)\n        point in direction (([floor v] of ((direction) / (90)) ) * (90))\n        turn right (45) degrees\n        replace item (CheepNo.) of [cheepdir v] with (direction)\n        replace item (CheepNo.) of [cheepvelocity v] with [6]\n    end\n    if <(item (CheepNo.) of [cheepvelocity v]) > [0]> then\n        move (item (CheepNo.) of [cheepvelocity v]) steps\n    end\n    replace item (CheepNo.) of [cheepx v] with (((x position) - (MapX)) / (28))\n    replace item (CheepNo.) of [cheepy v] with (((y position) - (MapY)) / (28))\n    change y by (-1)\nend\n\nwhen I receive [startgame v]\nif <[1] = [1]> then\n    delete this clone\nend\ngo to x: (0) y: (0)\nset size to (350) %\nhide\ndelete all of [cheepx v]\ndelete all of [cheepy v]\ndelete all of [cheepdir v]\ndelete all of [cheeptype v]\ndelete all of [cheepvelocity v]\nset rotation style [left-right v]\nset [deletecheepno. v] to [0]\nif <(Level) = [3]> then\n    AddCheep [-21] [-12] [90] [C]\n    AddCheep [-19] [-12] [90] [C]\n    AddCheep [-17] [-12] [90] [C]\n    AddCheep [-21] [-10.5] [90] [C]\n    AddCheep [-19] [-10.5] [90] [C]\n    AddCheep [-17] [-10.5] [90] [C]\n    AddCheep [19] [-9.5] [90] [C]\n    AddCheep [19] [-11] [90] [C]\n    AddCheep [19] [-12.5] [90] [C]\n    AddCheep [21] [-10] [90] [C]\n    AddCheep [21] [-11.5] [90] [C]\n    AddCheep [21] [-13] [90] [C]\n    AddCheep [17] [-10] [90] [C]\n    AddCheep [17] [-11.5] [90] [C]\n    AddCheep [17] [-13] [90] [C]\n    AddCheep [64] [-7] [90] [C]\n    AddCheep [62] [-7] [90] [C]\n    AddCheep [80] [-14] [-90] [C]\n    AddCheep [78] [-14] [-90] [C]\n    AddCheep [90] [-11.5] [90] [C]\n    AddCheep [90] [-13] [90] [C]\n    AddCheep [93] [-12] [90] [C]\n    AddCheep [93] [-13.5] [90] [C]\n    AddCheep [96] [-11.5] [90] [C]\n    AddCheep [96] [-13] [90] [C]\nend\nif <(Level) = [9]> then\n    AddCheep [75] [2] [-90] [C]\n    AddCheep [72] [2] [-90] [C]\nend\nif <(Level) = [10]> then\n    AddCheep [-6.5] [-5] [-90] [B]\n    AddCheep [-6.5] [-12] [-90] [B]\n    AddCheep [5.5] [-5] [-90] [B]\n    AddCheep [5.5] [-12] [-90] [B]\n    AddCheep [50] [-8] [-90] [C]\n    AddCheep [45] [-6] [-90] [C]\n    AddCheep [45] [-10] [-90] [C]\n    AddCheep [66] [-8] [-90] [C]\n    AddCheep [76] [-6] [-90] [B]\n    AddCheep [88.5] [-8.5] [-90] [B]\n    AddCheep [28] [-4] [-90] [B]\n    AddCheep [28] [-12] [-90] [B]\n    AddCheep [17] [-4] [-90] [B]\n    AddCheep [17] [-12] [-90] [B]\nend\nif <(Level) = [13]> then\n    AddCheep [48] [0] [-90] [C]\n    AddCheep [42] [0] [-90] [C]\n    AddCheep [108] [1] [-90] [C]\n    AddCheep [104] [1] [-90] [C]\nend\n\nwhen I receive [costumeeverything v]\nif <(item (CheepNo.) of [cheeptype v]) = [C]> then\n    switch costume to (([floor v] of (((GlobalCostumeNo.) * (1.5)) mod (2)) ) + (1))\nelse\n    if <(item (CheepNo.) of [cheepvelocity v]) > [-1]> then\n        switch costume to (3 v)\n    else\n        switch costume to (4 v)\n    end\nend\n\nwhen I receive [hidegame v]\nif <[1] = [1]> then\n    delete this clone\nend\nhide\n\nwhen I receive [playerupdated v]\nif <(CheepNo.) > [0]> then\n    switch costume to (hitbox v)\n    if <touching (player v)?> then\n        if <<(Sliding) = [1]> or <<(Statue) = [1]> and <not <(YVel) = [0]>>>> then\n            set [deletecheepno. v] to (CheepNo.)\n            set [spawnx v] to (x position)\n            set [spawny v] to (y position)\n            create clone of (fx v)\n        else\n            if <(Statue) = [0]> then\n                if <(AllowPlayerDamage) = [1]> then\n                    broadcast (Powerdown v)\n                end\n            end\n        end\n    end\nend\n\ndefine AddCheep (x) (y) (dir) (type)\nadd (dir) to [cheepdir v]\nadd (x) to [cheepx v]\nadd (y) to [cheepy v]\nadd (type) to [cheeptype v]\nadd [0] to [cheepvelocity v]\n\nwhen I receive [won v]\nif <[1] = [1]> then\n    delete this clone\nend\ngo to x: (0) y: (0)\nset size to (350) %\nhide\ndelete all of [cheepx v]\ndelete all of [cheepy v]\ndelete all of [cheepdir v]\ndelete all of [cheeptype v]\ndelete all of [cheepvelocity v]\nset rotation style [left-right v]\nset [deletecheepno. v] to [0]\n\nwhen I receive [updateallpositions v]\ngo to x: (((item (CheepNo.) of [cheepx v]) * (28)) + (MapX)) y: (((item (CheepNo.) of [cheepy v]) * (28)) + (MapY))\nchange y by (-1)\n\nwhen I receive [fireballhit v]\nswitch costume to (hitbox v)\nif <touching (fireballs v)?> then\n    set [deletecheepno. v] to (CheepNo.)\n    set [spawnx v] to (x position)\n    set [spawny v] to (y position)\n    create clone of (fx v)\nend\n\nwhen I receive [flagclicked v]\nif <[1] = [1]> then\n    delete this clone\nend\ngo to x: (0) y: (0)\nset size to (350) %\nhide\ndelete all of [cheepx v]\ndelete all of [cheepy v]\ndelete all of [cheepdir v]\ndelete all of [cheeptype v]\ndelete all of [cheepvelocity v]\nset rotation style [left-right v]\nset [deletecheepno. v] to [0]\n\n@Transition\n\nwhen flag clicked\ngo to [front v] layer\ngo [backward v] (1) layers\nclear graphic effects\ngo to x: (2.25) y: (0)\nswitch costume to (sizebypass v)\nset size to (300) %\nswitch costume to (costume1 v)\nshow\nrepeat (15)\n    show\nend\nstart sound [Start v]\nwait (3) seconds\nrepeat (4)\n    change [ghost v] effect by (22)\n    switch costume to (sizebypass v)\n    change size by (5)\n    switch costume to (costume1 v)\nend\nhide\nclear graphic effects\n\nwhen I receive [transition1 v]\nset [allowmapchanges v] to [0]\ngo to [front v] layer\nshow\nswitch costume to (sizebypass v)\nset size to (8000) %\nswitch costume to (hole v)\ngo to (worldplayer v)\nrepeat (55)\n    switch costume to (sizebypass v)\n    change size by (((size) / (50)) * (-1))\n    switch costume to (hole v)\n    switch costume to (sizebypass v)\n    change size by (-70)\n    switch costume to (hole v)\nend\ngo to x: (0) y: (0)\nset size to (100) %\nswitch costume to (allblack v)\nwait (1) seconds\nrepeat (37)\n    switch costume to (sizebypass v)\n    change size by (((size) / (20)) * (1))\n    switch costume to (hole v)\n    switch costume to (sizebypass v)\n    change size by (70)\n    switch costume to (hole v)\nend\nhide\nset [allowmapchanges v] to [1]\n\nwhen I receive [transition2 v]\nset [allowmapchanges v] to [0]\ngo to [front v] layer\nshow\nswitch costume to (sizebypass v)\nset size to (8000) %\nswitch costume to (hole v)\ngo to x: (0) y: (0)\nrepeat (55)\n    switch costume to (sizebypass v)\n    change size by (((size) / (50)) * (-1))\n    switch costume to (hole v)\n    switch costume to (sizebypass v)\n    change size by (-70)\n    switch costume to (hole v)\nend\nswitch costume to (sizebypass v)\nset size to (286) %\nswitch costume to (allblack v)\ngo to (worldplayer v)\nwait (1) seconds\nrepeat (37)\n    switch costume to (sizebypass v)\n    change size by (((size) / (20)) * (1))\n    switch costume to (hole v)\n    switch costume to (sizebypass v)\n    change size by (70)\n    switch costume to (hole v)\nend\nhide\nset [allowmapchanges v] to [1]\n\nwhen I receive [transition3 v]\nset [allowmapchanges v] to [0]\nshow\nswitch costume to (sizebypass v)\nset size to (286) %\nswitch costume to (allblack v)\ngo to (worldplayer v)\nwait (1) seconds\nrepeat (37)\n    switch costume to (sizebypass v)\n    change size by (((size) / (20)) * (1))\n    switch costume to (hole v)\n    switch costume to (sizebypass v)\n    change size by (70)\n    switch costume to (hole v)\nend\nhide\nset [allowmapchanges v] to [1]\n\nwhen I receive [transition4 v]\ngo to x: (0) y: (0)\nset [allowmapchanges v] to [0]\nshow\nswitch costume to (sizebypass v)\nset size to (375) %\nswitch costume to (instructions v)\nset [brightness v] effect to (-100)\nwait (0.5) seconds\nrepeat (10)\n    change [brightness v] effect by (10)\nend\nwait (3) seconds\nrepeat (10)\n    change [brightness v] effect by (-10)\nend\nswitch costume to (sizebypass v)\nset size to (286) %\nswitch costume to (allblack v)\nset [brightness v] effect to (0)\ngo to (worldplayer v)\nrepeat (37)\n    switch costume to (sizebypass v)\n    change size by (((size) / (20)) * (1))\n    switch costume to (hole v)\n    switch costume to (sizebypass v)\n    change size by (70)\n    switch costume to (hole v)\nend\nhide\nset [allowmapchanges v] to [1]\n\nwhen I receive [transition5 v]\nshow\nswitch costume to (sizebypass v)\nset size to (286) %\nswitch costume to (allblack v)\ngo to x: (0) y: (0)\nwait (0.5) seconds\nrepeat (37)\n    switch costume to (sizebypass v)\n    change size by (((size) / (20)) * (1))\n    switch costume to (hole v)\n    switch costume to (sizebypass v)\n    change size by (70)\n    switch costume to (hole v)\nend\nhide\n\nwhen I receive [transition6 v]\nset [allowmapchanges v] to [0]\nshow\nswitch costume to (sizebypass v)\nset size to (286) %\nswitch costume to (allblack v)\ngo to x: (0) y: (0)\nset [ghost v] effect to (100)\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\nwait (1) seconds\nwait (0.5) seconds\nswitch costume to (sizebypass v)\nset size to (286) %\nswitch costume to (allblack v)\ngo to (worldplayer v)\nrepeat (37)\n    switch costume to (sizebypass v)\n    change size by (((size) / (20)) * (1))\n    switch costume to (hole v)\n    switch costume to (sizebypass v)\n    change size by (70)\n    switch costume to (hole v)\nend\nhide\nset [allowmapchanges v] to [1]\n\nwhen I receive [gameover v]\nset [allowmapchanges v] to [0]\nswitch costume to (gameover v)\nshow\nset [brightness v] effect to (-100)\ngo to x: (0) y: (0)\nset size to (450) %\nwait (1) seconds\nstart sound [You Lose, Loser. v]\nrepeat (20)\n    change [brightness v] effect by (5)\nend\nwait (4) seconds\nrepeat (20)\n    change [brightness v] effect by (-5)\nend\nclear graphic effects\nswitch costume to (sizebypass v)\nset size to (286) %\nswitch costume to (allblack v)\ngo to (worldplayer v)\nwait (1) seconds\nrepeat (37)\n    switch costume to (sizebypass v)\n    change size by (((size) / (20)) * (1))\n    switch costume to (hole v)\n    switch costume to (sizebypass v)\n    change size by (70)\n    switch costume to (hole v)\nend\nhide\nset [allowmapchanges v] to [1]\n\nwhen I receive [delay v]\nstop [other scripts in sprite v]\nshow\ngo to x: (0) y: (0)\nset size to (100) %\nswitch costume to (allblack v)\nwait (3.9) seconds\nrepeat (37)\n    switch costume to (sizebypass v)\n    change size by (((size) / (20)) * (1))\n    switch costume to (hole v)\n    switch costume to (sizebypass v)\n    change size by (70)\n    switch costume to (hole v)\nend\nhide\nset [allowmapchanges v] to [1]\n\nwhen I receive [transition7 v]\nset [allowmapchanges v] to [0]\ngo to [front v] layer\nshow\nswitch costume to (sizebypass v)\nset size to (8000) %\nswitch costume to (hole v)\ngo to (worldplayer v)\nrepeat (55)\n    switch costume to (sizebypass v)\n    change size by (((size) / (50)) * (-1))\n    switch costume to (hole v)\n    switch costume to (sizebypass v)\n    change size by (-70)\n    switch costume to (hole v)\nend\nswitch costume to (sizebypass v)\nset size to (286) %\nswitch costume to (allblack v)\nwait (1) seconds\nswitch costume to (sizebypass v)\nset size to (286) %\nswitch costume to (allblack v)\ngo to (worldplayer v)\nrepeat (37)\n    switch costume to (sizebypass v)\n    change size by (((size) / (20)) * (1))\n    switch costume to (hole v)\n    switch costume to (sizebypass v)\n    change size by (70)\n    switch costume to (hole v)\nend\nhide\nset [allowmapchanges v] to [1]\n\n@LavaBubbles\n\nwhen I receive [gametick v]\nif <[1] = [1]> then\n    delete this clone\nend\nif <(length of [firex v]) > [0]> then\n    switch costume to (hitbox v)\n    FormBubbles\nend\n\ndefine FormBubbles\nshow\nset [bubbleno. v] to [0]\nrepeat (length of [firex v])\n    change [bubbleno. v] by (1)\n    go to x: (((item (BubbleNo.) of [firex v]) * (28)) + (MapX)) y: (((item (BubbleNo.) of [firey v]) * (28)) + (MapY))\n    if <<<(x position) < [240]> and <(x position) > [-240]>> and <<(y position) < [180]> and <(y position) > [-180]>>> then\n        create clone of (_myself_ v)\n    end\nend\nset [bubbleno. v] to [0]\nhide\n\nwhen I start as a clone\ngo [backward v] (5) layers\nreplace item (BubbleNo.) of [fireyvel v] with ((item (BubbleNo.) of [fireyvel v]) - (0.9))\nif <(item (BubbleNo.) of [fireyvel v]) < [-48]> then\n    replace item (BubbleNo.) of [fireyvel v] with [17]\n    start sound [Bubble v]\nend\nchange y by (item (BubbleNo.) of [fireyvel v])\nreplace item (BubbleNo.) of [firey v] with (((y position) - (MapY)) / (28))\nif <(((y position) - (MapY)) / (28)) < (item (BubbleNo.) of [ogfirey v])> then\n    set y to (((item (BubbleNo.) of [ogfirey v]) * (28)) + (MapY))\n    replace item (BubbleNo.) of [firey v] with (item (BubbleNo.) of [ogfirey v])\n    hide\nend\nchange y by (-1)\n\nwhen I receive [startgame v]\ndelete all of [firex v]\ndelete all of [firey v]\ndelete all of [fireyvel v]\ndelete all of [ogfirey v]\nset rotation style [all around v]\nif <[1] = [1]> then\n    delete this clone\nend\ngo to x: (0) y: (0)\nset size to (350) %\nhide\nif <(Level) = [4]> then\n    AddBubble [-12] [-1]\n    AddBubble [9] [-1]\n    AddBubble [17] [-1]\nend\nif <(Level) = [11]> then\n    AddBubble [-12.5] [-1]\n    AddBubble [-6.5] [-1]\n    AddBubble [-0.5] [-1]\n    AddBubble [5.5] [-1]\nend\n\ndefine FindFloor\nrepeat until <<touching (map v)?> or <touching (semisolids v)?>>\n    change y by (-1)\nend\nchange y by (1)\n\ndefine YSmoothing\nif <<touching (map v)?> or <touching (semisolids v)?>> then\n    repeat (8)\n        if <<touching (map v)?> or <touching (semisolids v)?>> then\n            change y by (1)\n        end\n    end\n    if <<touching (map v)?> or <touching (semisolids v)?>> then\n        change y by (-8)\n    end\nend\n\nwhen I receive [costumeeverything v]\nswitch costume to (([floor v] of (((GlobalCostumeNo.) * (1.5)) mod (3)) ) + (1))\nif <(item (BubbleNo.) of [fireyvel v]) < [0]> then\n    point in direction (-90)\nelse\n    point in direction (90)\nend\n\nwhen I receive [hidegame v]\nif <[1] = [1]> then\n    delete this clone\nend\nhide\n\nwhen I receive [playerupdated v]\nif <(BubbleNo.) > [0]> then\n    if <<touching (player v)?> and <(AllowPlayerDamage) = [1]>> then\n        broadcast (Powerdown v)\n    end\nend\n\ndefine AddBubble (x) (y)\nadd (x) to [firex v]\nadd (y) to [firey v]\nadd (y) to [ogfirey v]\nadd [-12] to [fireyvel v]\n\nwhen I receive [won v]\nif <[1] = [1]> then\n    delete this clone\nend\ngo to x: (0) y: (0)\nset size to (350) %\nhide\ndelete all of [firex v]\ndelete all of [firey v]\ndelete all of [fireyvel v]\ndelete all of [ogfirey v]\nset rotation style [all around v]\n\nwhen I receive [updateallpositions v]\ngo to x: (((item (BubbleNo.) of [firex v]) * (28)) + (MapX)) y: (((item (BubbleNo.) of [firey v]) * (28)) + (MapY))\nchange y by (-1)\n\nwhen I receive [flagclicked v]\nif <[1] = [1]> then\n    delete this clone\nend\ngo to x: (0) y: (0)\nset size to (350) %\nhide\ndelete all of [firex v]\ndelete all of [firey v]\ndelete all of [fireyvel v]\ndelete all of [ogfirey v]\nset rotation style [all around v]\n\n@Pipes\n\nwhen I receive [updateeverything v]\nif <(PipeTravel) = [0]> then\n    if <(Level) = [3]> then\n        show\n        CheckPipes\n        hide\n    end\n    if <(Level) = [4]> then\n        show\n        CheckPipes\n        hide\n    end\n    if <(Level) = [5]> then\n        show\n        CheckPipes\n        hide\n    end\n    if <<(Level) = [8]> or <(Level) = [14]>> then\n        show\n        CheckPipes\n        hide\n    end\n    if <(Level) = [10]> then\n        show\n        CheckPipes\n        hide\n    end\n    if <(Level) = [11]> then\n        show\n        CheckPipes\n        hide\n    end\nend\n\ndefine CheckPipes\nif <(Level) = [3]> then\n    go to x: ((-505) + (MapX)) y: ((114) + (MapY))\n    if <(distance to [player v]) < [84]> then\n        if <touching (player v)?> then\n            if <<key (s v) pressed?> or <key (down arrow v) pressed?>> then\n                broadcast (PipeTravel v)\n                set [playerx v] to [-505]\n            end\n        end\n    end\n    go to x: ((3472) + (MapX)) y: ((-444) + (MapY))\n    if <(distance to [player v]) < [84]> then\n        if <touching (player v)?> then\n            if <<key (s v) pressed?> or <key (down arrow v) pressed?>> then\n                broadcast (PipeTravel v)\n                set [playerx v] to [3472]\n            end\n        end\n    end\nend\nif <(Level) = [4]> then\n    go to x: ((2128) + (MapX)) y: ((84) + (MapY))\n    if <(distance to [player v]) < [84]> then\n        if <touching (player v)?> then\n            if <<key (s v) pressed?> or <key (down arrow v) pressed?>> then\n                broadcast (PipeTravel v)\n                set [playerx v] to [2128]\n            end\n        end\n    end\nend\nif <(Level) = [5]> then\n    go to x: ((560) + (MapX)) y: ((84) + (MapY))\n    if <(distance to [player v]) < [84]> then\n        if <touching (player v)?> then\n            if <<key (s v) pressed?> or <key (down arrow v) pressed?>> then\n                broadcast (PipeTravel v)\n                set [playerx v] to [560]\n            end\n        end\n    end\n    go to x: ((1372) + (MapX)) y: ((-364) + (MapY))\n    if <(distance to [player v]) < [84]> then\n        if <touching (player v)?> then\n            if <<key (s v) pressed?> or <key (down arrow v) pressed?>> then\n                broadcast (PipeTravel v)\n                set [playerx v] to [1372]\n            end\n        end\n    end\nend\nif <<(Level) = [8]> or <(Level) = [14]>> then\n    go to x: ((2352) + (MapX)) y: ((252) + (MapY))\n    if <(distance to [player v]) < [84]> then\n        if <touching (player v)?> then\n            if <<key (s v) pressed?> or <key (down arrow v) pressed?>> then\n                broadcast (PipeTravel v)\n                set [playerx v] to [2352]\n            end\n        end\n    end\nend\nif <(Level) = [10]> then\n    go to x: ((-308) + (MapX)) y: ((168) + (MapY))\n    if <(distance to [player v]) < [84]> then\n        if <touching (player v)?> then\n            if <<key (s v) pressed?> or <key (down arrow v) pressed?>> then\n                broadcast (PipeTravel v)\n                set [playerx v] to [-308]\n            end\n        end\n    end\n    go to x: (((110) * (28)) + (MapX)) y: (((-8) * (28)) + (MapY))\n    if <(distance to [player v]) < [84]> then\n        if <touching (player v)?> then\n            if <<key (s v) pressed?> or <key (down arrow v) pressed?>> then\n                broadcast (PipeTravel v)\n                set [playerx v] to ((110) * (28))\n            end\n        end\n    end\nend\nif <(Level) = [11]> then\n    go to x: (((76) * (28)) + (MapX)) y: (((4) * (28)) + (MapY))\n    if <(distance to [player v]) < [84]> then\n        if <touching (player v)?> then\n            if <<key (s v) pressed?> or <key (down arrow v) pressed?>> then\n                broadcast (PipeTravel v)\n                set [playerx v] to ((76) * (28))\n            end\n        end\n    end\nend\n\nwhen I receive [flagclicked v]\ngo to x: (0) y: (0)\nset size to (350) %\nhide\n\n@FX\n\nwhen I start as a clone\ngo to [front v] layer\ngo [backward v] (20) layers\nshow\ngo to x: (SpawnX) y: (SpawnY)\nif <(distance to [player v]) < [1]> then\n    change y by (-12)\n    point in direction ([direction v] of [player v])\n    move (-4) steps\n    if <<(YVel) = [0]> and <(SlidingFunction) = [0]>> then\n        change x by ((XVel) * (8))\n    end\n    if <(SlidingFunction) = [1]> then\n        if <(direction) > [0]> then\n            turn right (25) degrees\n        else\n            turn left (25) degrees\n        end\n        move (-12) steps\n        change x by (pick random (-5) to (0))\n        change y by (-4)\n    end\nend\nswitch costume to (1 v)\nwait (0) seconds\nmove (-2) steps\nswitch costume to (2 v)\nwait (0) seconds\nmove (-2) steps\nswitch costume to (3 v)\nwait (0) seconds\nmove (-1) steps\nswitch costume to (4 v)\nwait (0) seconds\nmove (-1) steps\nswitch costume to (5 v)\nwait (0) seconds\ndelete this clone\n\nwhen I receive [flagclicked v]\nif <[1] = [1]> then\n    delete this clone\nend\nset rotation style [left-right v]\ngo to x: (0) y: (0)\nset size to (350) %\nhide\n\n@Coins\n\nwhen I receive [updateeverything v]\nif <[1] = [1]> then\n    delete this clone\nend\nswitch costume to (hitbox v)\nif <(DeleteCoinNo.) > [0]> then\n    change [coins v] by (1)\n    delete (DeleteCoinNo.) of [coinx v]\n    delete (DeleteCoinNo.) of [coiny v]\n    set [deletecoinno. v] to [0]\nend\nFormCoins\n\ndefine FormCoins\nshow\nset [coinno. v] to [0]\nrepeat (length of [coinx v])\n    change [coinno. v] by (1)\n    go to x: ((((item (CoinNo.) of [coinx v]) + (0.5)) * (28)) + (MapX)) y: (((item (CoinNo.) of [coiny v]) * (28)) + (MapY))\n    if <<<(x position) < [240]> and <(x position) > [-240]>> and <<(y position) < [180]> and <(y position) > [-166]>>> then\n        create clone of (_myself_ v)\n    end\nend\nset [coinno. v] to [0]\nhide\n\ndefine AddCoin (x) (y)\nadd (x) to [coinx v]\nadd (y) to [coiny v]\n\nwhen I receive [startgame v]\nset [deletecoinno. v] to [0]\ndelete all of [coinx v]\ndelete all of [coiny v]\nif <(Level) = [1]> then\n    AddCoin [-9] [7]\n    AddCoin [-9] [8]\n    AddCoin [-8] [7]\n    AddCoin [-8] [8]\n    AddCoin [-7] [7]\n    AddCoin [-7] [8]\n    AddCoin [-6] [7]\n    AddCoin [-6] [8]\n    AddCoin [64] [7]\n    AddCoin [64] [8]\n    AddCoin [65] [7]\n    AddCoin [65] [8]\n    AddCoin [66] [7]\n    AddCoin [66] [8]\n    AddCoin [67] [7]\n    AddCoin [67] [8]\n    AddCoin [101] [7]\n    AddCoin [101] [8]\n    AddCoin [103] [7]\n    AddCoin [103] [8]\n    AddCoin [105] [7]\n    AddCoin [105] [8]\n    AddCoin [156] [6]\n    AddCoin [156] [7]\n    AddCoin [157] [6]\n    AddCoin [157] [7]\n    AddCoin [158] [6]\n    AddCoin [158] [7]\n    AddCoin [159] [6]\n    AddCoin [159] [7]\nend\nif <(Level) = [2]> then\n    AddCoin [161] [8]\n    AddCoin [162] [8]\n    AddCoin [161] [9]\n    AddCoin [162] [9]\n    AddCoin [161] [10]\n    AddCoin [162] [10]\nend\nif <(Level) = [3]> then\n    AddCoin [40] [-18]\n    AddCoin [40] [-20]\n    AddCoin [42] [-18]\n    AddCoin [42] [-20]\n    AddCoin [44] [-18]\n    AddCoin [44] [-20]\n    AddCoin [46] [-18]\n    AddCoin [46] [-20]\n    AddCoin [48] [-18]\n    AddCoin [48] [-20]\n    AddCoin [50] [-18]\n    AddCoin [50] [-20]\n    AddCoin [52] [-18]\n    AddCoin [52] [-20]\n    AddCoin [54] [-18]\n    AddCoin [54] [-20]\n    AddCoin [56] [-18]\n    AddCoin [56] [-20]\n    AddCoin [58] [-18]\n    AddCoin [58] [-20]\n    AddCoin [127] [-4]\n    AddCoin [127] [-6]\n    AddCoin [126] [-5]\n    AddCoin [125] [-4]\n    AddCoin [125] [-6]\n    AddCoin [124] [-5]\n    AddCoin [123] [-4]\n    AddCoin [123] [-6]\n    AddCoin [122] [-5]\n    AddCoin [121] [-4]\n    AddCoin [121] [-6]\n    AddCoin [120] [-5]\n    AddCoin [119] [-6]\n    AddCoin [119] [-4]\nend\nif <(Level) = [5]> then\n    AddCoin [46] [-8]\n    AddCoin [47] [-8]\n    AddCoin [48] [-8]\n    AddCoin [49] [-8]\n    AddCoin [50] [-8]\n    AddCoin [51] [-8]\n    AddCoin [46] [-9]\n    AddCoin [47] [-9]\n    AddCoin [48] [-9]\n    AddCoin [49] [-9]\n    AddCoin [50] [-9]\n    AddCoin [51] [-9]\n    AddCoin [46] [-10]\n    AddCoin [47] [-10]\n    AddCoin [48] [-10]\n    AddCoin [49] [-10]\n    AddCoin [50] [-10]\n    AddCoin [51] [-10]\n    AddCoin [108] [11]\n    AddCoin [108] [10]\n    AddCoin [108] [9]\n    AddCoin [108] [8]\n    AddCoin [109] [11]\n    AddCoin [109] [10]\n    AddCoin [109] [9]\n    AddCoin [109] [8]\n    AddCoin [110] [11]\n    AddCoin [110] [10]\n    AddCoin [110] [9]\n    AddCoin [110] [8]\n    AddCoin [111] [11]\n    AddCoin [111] [10]\n    AddCoin [111] [9]\n    AddCoin [111] [8]\nend\nif <(Level) = [6]> then\n    AddCoin [71] [7]\n    AddCoin [72] [7]\n    AddCoin [73] [7]\n    AddCoin [71] [8]\n    AddCoin [72] [8]\n    AddCoin [73] [8]\n    AddCoin [173] [9]\n    AddCoin [174] [9]\n    AddCoin [175] [9]\n    AddCoin [176] [9]\n    AddCoin [173] [10]\n    AddCoin [174] [10]\n    AddCoin [175] [10]\n    AddCoin [176] [10]\n    AddCoin [174] [11]\n    AddCoin [175] [11]\n    AddCoin [176] [11]\n    AddCoin [174] [12]\n    AddCoin [175] [12]\nend\nif <(Level) = [7]> then\n    AddCoin [37] [6]\n    AddCoin [39] [8]\n    AddCoin [41] [10]\n    AddCoin [43] [12]\n    AddCoin [45] [14]\n    AddCoin [62] [19]\n    AddCoin [63] [19]\n    AddCoin [66] [18]\n    AddCoin [67] [18]\n    AddCoin [68] [18]\n    AddCoin [69] [18]\n    AddCoin [71] [19]\n    AddCoin [72] [19]\n    AddCoin [73] [19]\n    AddCoin [74] [19]\nend\nif <(Level) = [10]> then\n    AddCoin [97] [5]\n    AddCoin [98] [5]\n    AddCoin [99] [5]\n    AddCoin [97] [6]\n    AddCoin [98] [6]\n    AddCoin [99] [6]\n    AddCoin [97] [7]\n    AddCoin [98] [7]\n    AddCoin [99] [7]\n    AddCoin [97] [8]\n    AddCoin [98] [8]\n    AddCoin [99] [8]\n    AddCoin [97] [9]\n    AddCoin [98] [9]\n    AddCoin [99] [9]\n    AddCoin [97] [10]\n    AddCoin [98] [10]\n    AddCoin [99] [10]\nend\n\nwhen I receive [playerupdated v]\nif <touching (player v)?> then\n    set [deletecoinno. v] to (CoinNo.)\n    set [brightness v] effect to (25)\n    set [ghost v] effect to (50)\n    start sound [Coin v]\nend\n\nwhen I receive [hidegame v]\nif <[1] = [1]> then\n    delete this clone\nend\nhide\n\nwhen I receive [updateallpositions v]\ngo to x: ((((item (CoinNo.) of [coinx v]) + (0.5)) * (28)) + (MapX)) y: (((item (CoinNo.) of [coiny v]) * (28)) + (MapY))\n\nwhen I receive [costumeeverything v]\nswitch costume to (([floor v] of (((GlobalCostumeNo.) * (2)) mod (4)) ) + (1))\n\nwhen I receive [flagclicked v]\nif <[1] = [1]> then\n    delete this clone\nend\nset [coins v] to [0]\nset [deletecoinno. v] to [0]\ndelete all of [coinx v]\ndelete all of [coiny v]\ngo to x: (0) y: (0)\nset size to (350) %\nhide\n\n@Water\n\nwhen I receive [updateeverything v]\nif <<(Level) = [3]> or <(Level) = [10]>> then\n    show\n    switch costume to (sizebypass v)\n    set size to (350) %\n    switch costume to (3 v)\n    go to x: (0) y: (MapY)\nelse\n    if <(Level) = [13]> then\n        show\n        switch costume to (sizebypass v)\n        set size to (350) %\n        switch costume to (join [Water] ([floor v] of ((((GlobalCostumeNo.) * (2)) mod (4)) + (1)) ))\n        go to x: ((MapX) mod (28)) y: (((MapY) - (2)) + (([sin v] of ((GlobalCostumeNo.) * (12)) ) * (28)))\n    else\n        if <(Level) = [9]> then\n            switch costume to (sizebypass v)\n            set size to (350) %\n            switch costume to (join [9-] ([floor v] of ((((GlobalCostumeNo.) * (2)) mod (4)) + (1)) ))\n            go to x: ((MapX) + (1680)) y: (MapY)\n            if <([abs v] of ((MapX) + (1680)) ) > [1078]> then\n                hide\n            else\n                show\n            end\n        else\n            hide\n        end\n    end\nend\n\nwhen I receive [hidegame v]\nhide\n\nwhen I receive [startgame v]\nhide\nif <<(Level) = [9]> or <(Level) = [13]>> then\n    set [ghost v] effect to (20)\nelse\n    set [ghost v] effect to (50)\nend\n\n@Thumbnail\n\nwhen flag clicked\nswitch costume to (thumbnailupdate v)\nshow\ngo to [front v] layer\ngo to x: (0) y: (0)\nrepeat (10)\n    change [brightness v] effect by (-10)\nend\nwait (0.5) seconds\nset [ghost v] effect to (100)\n\n@Worlds\n\nwhen I receive [maptick v]\ngo to x: (-181) y: (163)\nshow\nswitch costume to (World)\nnext costume\nif <(((80) - (distance to [worldplayer v])) * (2)) > [0]> then\n    change x by (((80) - (distance to [worldplayer v])) * (-2))\nend\nchange size by ((((350) + (<touching (mouse-pointer v)?> * (25))) - (size)) / (2))\n\nwhen I receive [hidemap v]\nhide\n\nwhen this sprite clicked\nif <(AllowMapChanges) = [1]> then\n    set [brightness v] effect to (25)\n    stop all sounds\n    broadcast (Transition7 v)\n    wait (0.1) seconds\n    clear graphic effects\n    wait (2) seconds\n    set [world v] to (costume [number v])\n    broadcast (MapChange v)\n    stop all sounds\nend\nclear graphic effects\n\nchange [levelscompleted v] by (5)\n\nwhen flag clicked\nset rotation style [don't rotate v]\n\nwhen I receive [mapchange v]\nset size to (350) %\n\n