Blue Box Platformer


@Stage\n\nwhen flag clicked\nset volume to (95) %\nforever\n    if <(lag) = [on]> then\n        play sound [Elektronomia-Energy-NCS-Release-ytmp3.com.mp3 v] until done\n    end\n    if <(lag) = [off]> then\n        stop all sounds\n    end\nend\n\nif  then\nelse\nend\n\n@Fish\n\nwhen flag clicked\nset size to (75) %\nhide\n\n@Play Button\n\nwhen flag clicked\nset [start v] to [0]\ngo to x: (0) y: (-120)\nset size to (60) %\nshow\nforever\n    if <touching (mouse-pointer v)?> then\n        set [brightness v] effect to (20)\n        set size to (70) %\n        if <mouse down?> then\n            set [start v] to [1]\n            repeat (10)\n                change [ghost v] effect by (10)\n            end\n            hide\n        end\n    else\n        set size to (60) %\n        switch costume to (play button v)\n        clear graphic effects\n    end\nend\n\n@Water\n\nwhen I start as a clone\nset [ghost v] effect to (80)\nswitch costume to (scaleup v)\nset size to (100) %\nswitch costume to (ripples v)\nshow\nforever\n    go to x: (150) y: (-150)\n    if <(lag) = [on]> then\n        repeat until <(x position) < [-113]>\n            change x by ((speedx) * (-1))\n            change y by (speedy)\n        end\n    else\n        go to x: (150) y: (-150)\n    end\nend\n\nwhen flag clicked\nInit\nshow\n\ndefine Init\nhide\ncreate clone of (_myself_ v)\ngo to x: (0) y: (0)\nset [ghost v] effect to (40)\nswitch costume to (water v)\n\nrepeat (10)\n    if  then\n    end\nend\n\n@Play Button (2)\n\nwhen flag clicked\nshow\nreset timer\ngo to x: (0) y: (18)\nset size to (80) %\nforever\n    point in direction ((([sin v] of ((timer) * (75)) ) * (4)) + (90))\n    if <(start) = [1]> then\n        hide\n        stop [this script v]\n    end\nend\n\n@Sticks\n\nwhen flag clicked\nhide\ngo to x: (-14) y: (28)\nforever\n    set [level v] to ([costume # v] of [levels v])\n    if <([costume # v] of [levels v]) = [9]> then\n        show\n    else\n        hide\n    end\nend\n\nif  then\nend\n\n@Levels\n\nwhen flag clicked\nswitch costume to (1 v)\nset [shown v] to [0]\ngo to x: (0) y: (0)\nhide\ngo to [front v] layer\nforever\n    if <(start) = [1]> then\n        show\n    end\n    if <(start) = [0]> then\n        hide\n    end\nend\n\nwhen I receive [next level v]\nnext costume\n\nwhen [space v] key pressed\nif <(username) = [DiamondKing111]> then\n    ask [] and wait\n    switch costume to (answer)\nend\n\n@Stick\n\nwhen flag clicked\nhide\ngo to x: (289) y: (28)\nforever\n    if <<(level) = [10]> or <(level) = [12]>> then\n        show\n    else\n        hide\n    end\nend\n\n@Player\n\nwhen flag clicked\nset [start v] to [0]\nset size to (300) %\nhide\ngo to [front v] layer\nset [xvelocity v] to [0]\nset [yvelocity v] to [0]\nforever\n    if <(start) = [1]> then\n        show\n        go to x: (-207) y: (-114)\n        forever\n            change [yvelocity v] by (-0.5)\n            if <key (right arrow v) pressed?> then\n                change [xvelocity v] by (0.7)\n                point in direction (90)\n            end\n            if <key (left arrow v) pressed?> then\n                change [xvelocity v] by (-0.7)\n                point in direction (-90)\n            end\n            set [xvelocity v] to ((XVelocity) * (0.9))\n            change x by (XVelocity)\n            if <touching color (#1e3246)?> then\n                change y by (1)\n                if <touching color (#1e3246)?> then\n                    change y by (1)\n                    if <touching color (#1e3246)?> then\n                        change y by (1)\n                        if <touching color (#1e3246)?> then\n                            change y by (1)\n                            if <touching color (#1e3246)?> then\n                                change y by (1)\n                                if <touching color (#1e3246)?> then\n                                    change x by ((XVelocity) * (-1))\n                                    change x by (0)\n                                    change y by (-5)\n                                    change x by (0)\n                                    if <key (up arrow v) pressed?> then\n                                        if <(XVelocity) > [0]> then\n                                            set [xvelocity v] to [-8]\n                                        else\n                                            set [xvelocity v] to [8]\n                                        end\n                                        set [yvelocity v] to [10]\n                                    else\n                                        set [xvelocity v] to [0]\n                                    end\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n            change y by (YVelocity)\n            if <touching color (#1e3246)?> then\n                change y by ((YVelocity) * (-1))\n                set [yvelocity v] to [0]\n            end\n            change y by (-1)\n            if <touching color (#1e3246)?> then\n                if <key (up arrow v) pressed?> then\n                    set [yvelocity v] to [10]\n                end\n            end\n            change y by (1)\n            if <(x position) > [235]> then\n                go to x: (-207) y: (-114)\n                set [xvelocity v] to [0]\n                set [yvelocity v] to [0]\n                if <not <(level) = [11]>> then\n                    broadcast (next level v)\n                    set [xvelocity v] to [0]\n                    set [yvelocity v] to [0]\n                end\n                if <([costume # v] of [levels v]) = [5]> then\n                    go to x: (-207) y: (-120)\n                end\n            end\n            if <key (r v) pressed?> then\n                go to x: (-207) y: (-114)\n                set [xvelocity v] to [0]\n                set [yvelocity v] to [0]\n            end\n            if <<<<<touching color (#990000)?> or <touching color (#000000)?>> or <touching (gui star v)?>> or <<touching (gui star2 v)?> or <touching (gui star3 v)?>>> or <touching (gui star4 v)?>> then\n                go to x: (-207) y: (-114)\n                set [xvelocity v] to [0]\n                set [yvelocity v] to [0]\n            end\n            if <touching color (#cc99ff)?> then\n                set [yvelocity v] to [15]\n            end\n        end\n    end\nend\n\nwhen I start as a clone\nshow\nrepeat until <(start) = [1]>\n    go to x: (-117) y: (10)\n    repeat until <[101] < (x position)>\n        change x by (3)\n    end\nend\nif <(start) = [1]> then\n    Delete this clone\n    stop [this script v]\nend\n\ndefine Delete this clone\ndelete this clone\n\ncreate clone of (_myself_ v)\n\nchange [yvelocity v] by (2)\n\nchange x by (-10)\n\nset [xvelocity v] to [0]\nset [yvelocity v] to [0]\n\n@gui star2\n\nwhen flag clicked\nset size to (340) %\npoint in direction (90)\nhide\ngo to x: (72) y: (-130)\ncreate clone of (_myself_ v)\nforever\n    if <(level) = [9]> then\n        go to x: (72) y: (-130)\n        show\n        repeat until <(y position) = [130]>\n            change y by (10)\n            turn right (15) degrees\n            if <not <(level) = [9]>> then\n                hide\n            end\n            if <[9] < (level)> then\n                hide\n                stop [this script v]\n            end\n        end\n        repeat until <(y position) = [-130]>\n            change y by (-10)\n            turn right (15) degrees\n            if <not <(level) = [9]>> then\n                hide\n            end\n            if <[9] < (level)> then\n                hide\n                stop [this script v]\n            end\n        end\n        if <not <(level) = [9]>> then\n            hide\n        end\n    end\n    if <[9] < (level)> then\n        hide\n        stop [this script v]\n    end\nend\n\nstop [this script v]\n\n@gui star3\n\nwhen flag clicked\nset size to (340) %\npoint in direction (90)\nhide\ngo to x: (289) y: (-130)\ngo to [front v] layer\ngo to x: (200) y: (130)\nforever\n    if <(level) = [10]> then\n        hide\n        repeat until <(y position) = [-130]>\n            change y by (-10)\n            turn right (15) degrees\n            if <not <(level) = [10]>> then\n                hide\n            end\n        end\n        repeat until <(y position) = [130]>\n            turn right (15) degrees\n            change y by (10)\n            if <not <(level) = [10]>> then\n                hide\n            end\n        end\n    else\n        hide\n        if <not <(level) = [10]>> then\n            hide\n        end\n    end\nend\n\nshow\n\n@gui star4\n\nwhen flag clicked\nset size to (340) %\npoint in direction (90)\nhide\ngo to x: (289) y: (-130)\ngo to [front v] layer\ngo to x: (200) y: (130)\nforever\n    if <(level) = [10]> then\n        wait (0.010101001010110102) seconds\n        show\n        repeat until <(y position) = [130]>\n            change y by (10)\n            turn right (15) degrees\n            if <not <(level) = [10]>> then\n                hide\n            end\n        end\n        repeat until <(y position) = [-130]>\n            turn right (15) degrees\n            change y by (-10)\n            if <not <(level) = [10]>> then\n                hide\n            end\n        end\n    else\n        hide\n        if <(level) > [10]> then\n            stop [this script v]\n        end\n    end\n    if <not <(level) = [10]>> then\n        hide\n    end\nend\n\nwhen flag clicked\n\n@Lag_\n\nif  then\n    if  then\n    else\n    end\nend\n\nwhen flag clicked\nset [speedx v] to [1]\nset [speedy v] to [1]\nhide\nset [lag v] to [on]\nforever\n    if <(start) = [0]> then\n        show\n        go to x: (199) y: (128)\n        if <touching (mouse-pointer v)?> then\n            set size to (35) %\n            set [brightness v] effect to (20)\n            if <<<mouse down?> and <(lag) = [on]>> and <touching (mouse-pointer v)?>> then\n                set [lag v] to [off]\n                wait until <not <mouse down?>>\n            else\n                set [va v] to [0]\n            end\n            if <<<mouse down?> and <(lag) = [off]>> and <touching (mouse-pointer v)?>> then\n                set [lag v] to [on]\n                wait until <not <mouse down?>>\n            end\n        else\n            clear graphic effects\n            set size to (30) %\n        end\n    else\n        hide\n    end\nend\n\nif  then\nend\n\nif  then\nend\n\nset [lag v] to [off]\n\nif  then\nelse\nend\n\nset [speedy v] to [0]\nset [speedx v] to [0]\nset [speedy v] to [1]\nset [speedx v] to [-1]\nif <<<mouse down?> and <(lag) = [on]>> and <touching (mouse-pointer v)?>> then\n    set [lag v] to [off]\nend\n\nset [lag v] to [on]\n\n@Thumbnail\n\nwhen flag clicked\ngo to x: (0) y: (8)\nhide\nforever\n    go to [front v] layer\n    set [ghost v] effect to (100)\n    show\nend\n\n@gui star\n\nwhen flag clicked\nset size to (340) %\npoint in direction (90)\nhide\ngo to x: (-81) y: (-130)\ncreate clone of (_myself_ v)\nforever\n    if <[9] < (level)> then\n        hide\n        stop [this script v]\n    end\n    if <(level) = [9]> then\n        show\n        repeat until <(y position) = [130]>\n            change y by (10)\n            turn right (15) degrees\n            if <not <(level) = [9]>> then\n                hide\n            end\n        end\n        repeat until <(y position) = [-130]>\n            turn right (15) degrees\n            change y by (-10)\n            if <not <(level) = [9]>> then\n                hide\n            end\n        end\n        if <not <(level) = [9]>> then\n            hide\n        end\n    else\n        hide\n    end\nend\n\nforever\nend\n\n