Grappling Hook: A platformer
@Stage\n\nwhen flag clicked\nswitch backdrop to (backdrop1 v)\nswitch backdrop to (backdrop1 v)\n\nwhen I receive [level 2 v]\nstart sound [Triumph v]\n\nwhen I receive [level 3 v]\nstart sound [Triumph v]\n\nwhen I receive [level 4 v]\nstart sound [Triumph v]\n\nwhen I receive [level 5 v]\nstart sound [Triumph v]\n\nwhen I receive [level 6 v]\nstart sound [Triumph v]\n\nwhen I receive [go intro v]\nwait until <(intro over?) = [1]>\nstop all sounds\nwait (1) seconds\nforever\n    play sound [Video Game 1 v] until done\nend\n\nwhen I receive [go intro v]\nforever\n    if <(intro over?) = [0]> then\n        play sound [Odesong v] until done\n    end\nend\n\nwhen I receive [level 7 v]\nstart sound [Triumph v]\n\n@Player\n\nwhen flag clicked\nset [shop v] to [0]\nset [pause? v] to [0]\nset [player lv. v] to [1]\nset [player hp v] to [1]\nset [intro over? v] to [0]\nif <<<(username) = [GillettesofZola]> or <(username) = [teamholm]>> or <(@coins) = [5]>> then\n    set [hook lv. v] to [2]\n    set [@coins v] to [5]\nelse\n    set [hook lv. v] to [1]\n    set [@coins v] to [0]\nend\nset [level v] to [1]\nhide\nset [speed v] to [1]\nset [jump height v] to [8]\nset [hook throw distance v] to [20]\nReset Player to x: [-33] y: [-19]\nwait until <not <mouse down?>>\nwait until <(intro over?) = [1]>\nwait (0.1) seconds\nshow\nbroadcast (Hook ran out? v)\nforever\n    if <<(pause?) = [0]> and <(shop) = [closed]>> then\n        set rotation style [left-right v]\n        erase all\n        if <not <mouse down?>> then\n            set [hook just activated v] to [0]\n        end\n        if <not <[2] = (HStage)>> then\n            if <<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<key (left arrow v) pressed?> or <key (a v) pressed?>>> then\n                change [xvel v] by ((Speed) * (<<key (right arrow v) pressed?> or <key (d v) pressed?>> - <<key (left arrow v) pressed?> or <key (a v) pressed?>>))\n            end\n            set [xvel v] to ((0.8) * (xvel))\n            change x by (xvel)\n            if <touching color (#000000)?> then\n                change x by ((0) - (xvel))\n                set [xvel v] to ((-0.3) * (xvel))\n            end\n        end\n        change [yvel v] by (-1)\n        set [yvel v] to ((0.98) * (yvel))\n        change y by (yvel)\n        if <touching color (#000000)?> then\n            change y by ((0) - (yvel))\n            if <[0] < (yvel)> then\n                set [yvel v] to ((-0.5) * (yvel))\n            else\n                set [yvel v] to [0]\n                if <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n                    set [yvel v] to (Jump Height)\n                end\n            end\n            if <[2] = (HStage)> then\n                if <<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<key (left arrow v) pressed?> or <key (a v) pressed?>>> then\n                    change [xvel v] by ((Speed) * (<<key (right arrow v) pressed?> or <key (d v) pressed?>> - <<key (left arrow v) pressed?> or <key (a v) pressed?>>))\n                end\n                set [xvel v] to ((0.8) * (xvel))\n                if <<mouse down?> and <[0] = (Hook Just Activated)>> then\n                    set [hook just activated v] to [1]\n                    set [hstage v] to [3]\n                    set [yvel v] to (((xvel) / ([sin v] of (([atan v] of (((Px) - (Hx)) / ((Py) - (Hy))) ) + (((((Py) - (Hy)) / ([abs v] of ((Py) - (Hy)) )) - (1)) * (90))) )) * ([cos v] of (([atan v] of (((Px) - (Hx)) / ((Py) - (Hy))) ) + (((((Py) - (Hy)) / ([abs v] of ((Py) - (Hy)) )) - (1)) * (90))) ))\n                end\n                change x by (xvel)\n                if <touching color (#000000)?> then\n                    change x by ((0) - (xvel))\n                    set [xvel v] to ((-0.3) * (xvel))\n                end\n            end\n        else\n            if <[2] = (HStage)> then\n                if <<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<key (left arrow v) pressed?> or <key (a v) pressed?>>> then\n                    change [xvel v] by ((Speed) * ((0.3) * (<<key (right arrow v) pressed?> or <key (d v) pressed?>> - <<key (left arrow v) pressed?> or <key (a v) pressed?>>)))\n                end\n                set [xvel v] to ((1) * (xvel))\n                if <<mouse down?> and <[0] = (Hook Just Activated)>> then\n                    set [hook just activated v] to [1]\n                    set [hstage v] to [3]\n                    set [yvel v] to ((0) - (((xvel) / ([cos v] of (([atan v] of (((Px) - (Hx)) / ((Py) - (Hy))) ) + (((((Py) - (Hy)) / ([abs v] of ((Py) - (Hy)) )) - (1)) * (90))) )) * ([sin v] of (([atan v] of (((Px) - (Hx)) / ((Py) - (Hy))) ) + (((((Py) - (Hy)) / ([abs v] of ((Py) - (Hy)) )) - (1)) * (90))) )))\n                end\n                change x by (xvel)\n                if <touching color (#000000)?> then\n                    change x by ((0) - (xvel))\n                    set [xvel v] to ((-0.3) * (xvel))\n                end\n            end\n        end\n        set [px v] to (x position)\n        set [py v] to (y position)\n        if <[2] = (HStage)> then\n            if <(Hdis) < ([sqrt v] of ((((Px) - (Hx)) * ((Px) - (Hx))) + (((Py) - (Hy)) * ((Py) - (Hy)))) )> then\n                set x to ((Hx) + ((Hdis) * ([sin v] of (([atan v] of (((Px) - (Hx)) / ((Py) - (Hy))) ) + (((((Py) - (Hy)) / ([abs v] of ((Py) - (Hy)) )) - (1)) * (90))) )))\n                if <touching color (#000000)?> then\n                    set x to (Px)\n                    set [xvel v] to ((-0.5) * (xvel))\n                else\n                    change [xvel v] by ((-1) * ([sin v] of (([atan v] of (((Px) - (Hx)) / ((Py) - (Hy))) ) + (((((Py) - (Hy)) / ([abs v] of ((Py) - (Hy)) )) - (1)) * (90))) ))\n                end\n                set y to ((Hy) + ((Hdis) * ([cos v] of (([atan v] of (((Px) - (Hx)) / ((Py) - (Hy))) ) + (((((Py) - (Hy)) / ([abs v] of ((Py) - (Hy)) )) - (1)) * (90))) )))\n                if <touching color (#000000)?> then\n                    set y to (Py)\n                end\n                set [yvel v] to [0]\n            end\n            set [px v] to (x position)\n            set [py v] to (y position)\n            if <not <[0] = (<<key (down arrow v) pressed?> or <key (s v) pressed?>> - <<key (up arrow v) pressed?> or <key (w v) pressed?>>)>> then\n                change [hdis v] by ((Speed) * ((3) * (<<key (down arrow v) pressed?> or <key (s v) pressed?>> - <<key (up arrow v) pressed?> or <key (w v) pressed?>>)))\n                if <(Hdis) < ([sqrt v] of ((((Px) - (Hx)) * ((Px) - (Hx))) + (((Py) - (Hy)) * ((Py) - (Hy)))) )> then\n                    set x to ((Hx) + ((Hdis) * ([sin v] of (([atan v] of (((Px) - (Hx)) / ((Py) - (Hy))) ) + (((((Py) - (Hy)) / ([abs v] of ((Py) - (Hy)) )) - (1)) * (90))) )))\n                    set y to ((Hy) + ((Hdis) * ([cos v] of (([atan v] of (((Px) - (Hx)) / ((Py) - (Hy))) ) + (((((Py) - (Hy)) / ([abs v] of ((Py) - (Hy)) )) - (1)) * (90))) )))\n                    if <touching color (#000000)?> then\n                        go to x: (Px) y: (Py)\n                        change [hdis v] by ((Speed) * ((-3) * (<<key (down arrow v) pressed?> or <key (s v) pressed?>> - <<key (up arrow v) pressed?> or <key (w v) pressed?>>)))\n                    end\n                end\n                if <[10] > (Hdis)> then\n                    set [hdis v] to [10]\n                end\n            end\n            set [px v] to (x position)\n            set [py v] to (y position)\n        end\n        if <<<not <[0] = (HStage)>> and <not <(Hook duration) = [0]>>> and <not <(pause?) = [1]>>> then\n            if <(pause?) = [1]> then\n                hide\n            else\n                if <(intro over?) = [1]> then\n                    show\n                end\n            end\n            switch costume to (Hook LV.)\n            go to x: (Hx) y: (Hy)\n            if <[3] = (HStage)> then\n                change [hdis v] by (-20)\n                set x to ((Px) + ((Hdis) * ([sin v] of (([atan v] of (((Hx) - (Px)) / ((Hy) - (Py))) ) + (((((Hy) - (Py)) / ([abs v] of ((Hy) - (Py)) )) - (1)) * (90))) )))\n                set y to ((Py) + ((Hdis) * ([cos v] of (([atan v] of (((Hx) - (Px)) / ((Hy) - (Py))) ) + (((((Hy) - (Py)) / ([abs v] of ((Hy) - (Py)) )) - (1)) * (90))) )))\n                if <[10] > (Hdis)> then\n                    set [hstage v] to [0]\n                end\n            else\n                set [hxvel v] to ((0.98) * (Hxvel))\n                change x by (Hxvel)\n                if <not <touching color (#000000)?>> then\n                    change [hyvel v] by (-1)\n                end\n                set [hyvel v] to ((0.98) * (Hyvel))\n                change y by (Hyvel)\n                if <touching color (#000000)?> then\n                    if <[1] = (HStage)> then\n                        set [hdis v] to ([sqrt v] of ((((Px) - (Hx)) * ((Px) - (Hx))) + (((Py) - (Hy)) * ((Py) - (Hy)))) )\n                    end\n                    set [hstage v] to [2]\n                    set [hxvel v] to [0]\n                    set [hyvel v] to [0]\n                end\n            end\n            set [hx v] to (x position)\n            set [hy v] to (y position)\n            go to x: (Px) y: (Py)\n            pen down\n            go to x: (Hx) y: (Hy)\n            pen up\n            stamp\n        else\n            if <<mouse down?> and <[0] = (Hook Just Activated)>> then\n                set [hook just activated v] to [1]\n                set [hstage v] to [1]\n                set [hx v] to (Px)\n                set [hy v] to ((5) + (Py))\n                set [hxvel v] to ((Hook Throw Distance) * ([sin v] of (([atan v] of (((mouse x) - (Px)) / ((mouse y) - (Py))) ) + (((((mouse y) - (Py)) / ([abs v] of ((mouse y) - (Py)) )) - (1)) * (90))) ))\n                set [hyvel v] to ((Hook Throw Distance) * ([cos v] of (([atan v] of (((mouse x) - (Px)) / ((mouse y) - (Py))) ) + (((((mouse y) - (Py)) / ([abs v] of ((mouse y) - (Py)) )) - (1)) * (90))) ))\n            end\n        end\n        switch costume to (join (player LV.) [-2])\n        set x to (Px)\n        set y to (Py)\n        change [counter v] by (1)\n    end\nend\n\ndefine Reset Player to x: (x) y: (y)\ngo to x: (x) y: (y)\nif <(Hook LV.) > [0]> then\n    set pen color to (#7b7b7b)\nend\nif <(Hook LV.) > [5]> then\n    set pen color to (#6f0000)\nend\nif <(Hook LV.) > [8]> then\n    set pen color to (#ffe900)\nend\nset pen size to (2)\nset [px v] to (x position)\nset [py v] to (y position)\nset [xvel v] to [0]\nset [yvel v] to [0]\nset [hstage v] to [0]\nset [hxvel v] to [0]\nset [hyvel v] to [0]\n\nwhen flag clicked\nforever\n    if <touching (finish v)?> then\n        if <<(level) = [1]> and <touching (finish v)?>> then\n            set [level v] to [2]\n            Reset Player to x: [-33] y: [-19]\n            wait (0.1) seconds\n        end\n        if <<(level) = [2]> and <touching (finish v)?>> then\n            set [level v] to [3]\n            Reset Player to x: [-33] y: [-19]\n            wait (0.1) seconds\n        end\n        if <<(level) = [3]> and <touching (finish v)?>> then\n            set [level v] to [4]\n            Reset Player to x: [-33] y: [-19]\n            wait (0.1) seconds\n        end\n        if <<(level) = [4]> and <touching (finish v)?>> then\n            set [level v] to [5]\n            Reset Player to x: [-33] y: [-19]\n            wait (0.1) seconds\n        end\n        if <<(level) = [5]> and <touching (finish v)?>> then\n            set [level v] to [6]\n            Reset Player to x: [-33] y: [0]\n            wait (0.1) seconds\n        end\n        if <<(level) = [6]> and <touching (finish v)?>> then\n            set [level v] to [7]\n            Reset Player to x: [-33] y: [-19]\n            wait (0.1) seconds\n        end\n        if <<touching (finish v)?> and <(level) = [7]>> then\n            set [level v] to [8]\n            Reset Player to x: [-33] y: [-19]\n            wait (0.1) seconds\n        end\n        if <<touching (finish v)?> and <(level) = [8]>> then\n            stop [this script v]\n        end\n        hide\n        broadcast (join [level ] (level))\n    end\nend\n\nwhen flag clicked\nset [recon v] to [0]\nforever\n    if <<<touching color (#ff0000)?> and <touching (ground v)?>> and <not <touching (enimies v)?>>> then\n        start sound [Crunch v]\n        if <(level) = [4]> then\n            Reset Player to x: [-120] y: [-100]\n        else\n            if <(level) = [6]> then\n                Reset Player to x: [-33] y: [0]\n            else\n                Reset Player to x: [-33] y: [-19]\n            end\n        end\n        broadcast (reHP v)\n        recon two\n    end\nend\n\nwhen I receive [part two v]\nReset Player to x: [-33] y: [-19]\nif <(level) = [4]> then\n    Reset Player to x: [-120] y: [-100]\nend\nif <(level) = [6]> then\n    Reset Player to x: [-33] y: [0]\nend\nshow\n\nwhen [up arrow v] key pressed\nif <<(HStage) = [0]> and <key (up arrow v) pressed?>> then\n    play sound [Low Whoosh v] until done\nend\n\nwhen I receive [level 2 v]\nhide\n\nwhen I receive [level 3 v]\nhide\n\nwhen I receive [level 5 v]\nhide\n\nwhen I receive [level 4 v]\nhide\n\nwhen flag clicked\npoint in direction (90)\nforever\n    if <<(shop) = [open]> and <(intro over?) = [1]>> then\n        hide\n    else\n        if <(intro over?) = [1]> then\n            show\n        end\n    end\nend\n\nwhen [right arrow v] key pressed\npoint in direction (90)\n\nwhen [left arrow v] key pressed\npoint in direction (-90)\n\nwhen I receive [hook ran out? v]\nif <(Hook LV.) = [1]> then\n    set [hook duration v] to [5]\nend\nif <(Hook LV.) = [2]> then\n    set [hook duration v] to [8]\nend\nif <(Hook LV.) = [3]> then\n    set [hook duration v] to [15]\nend\nif <(Hook LV.) = [4]> then\n    set [hook duration v] to [20]\nend\nif <(Hook LV.) = [5]> then\n    set [hook duration v] to [26]\nend\nif <(Hook LV.) = [6]> then\n    set [hook duration v] to [35]\nend\nif <(Hook LV.) = [7]> then\n    set [hook duration v] to [50]\nend\nif <(Hook LV.) = [8]> then\n    set [hook duration v] to [75]\nend\nif <(Hook LV.) = [9]> then\n    set [hook duration v] to [100]\nend\n\nwhen I receive [damage? v]\nif <(player HP) = [1]> then\n    if <(recon) = [0]> then\n        start sound [Crunch v]\n        if <(level) = [4]> then\n            Reset Player to x: [-120] y: [-100]\n        else\n            if <(level) = [6]> then\n                Reset Player to x: [-33] y: [0]\n            else\n                Reset Player to x: [-33] y: [-19]\n            end\n        end\n        broadcast (reHP v)\n        recon two\n    end\nelse\n    if <(recon) = [0]> then\n        start sound [Crunch v]\n        change [player hp v] by (-1)\n        recon\n    end\nend\n\ndefine recon\nset [recon v] to [1]\nrepeat (4)\n    set [brightness v] effect to (100)\n    wait (0.2) seconds\n    set [brightness v] effect to (0)\n    wait (0.2) seconds\nend\nset [recon v] to [0]\n\nwhen I receive [rehp v]\nif <(player LV.) = [1]> then\n    set [player hp v] to [1]\nend\nif <(player LV.) = [2]> then\n    set [player hp v] to [3]\nend\nif <(player LV.) = [3]> then\n    set [player hp v] to [6]\nend\nif <(player LV.) = [4]> then\n    set [player hp v] to [10]\nend\nif <(player LV.) = [5]> then\n    set [player hp v] to [15]\nend\nif <(player LV.) = [6]> then\n    set [player hp v] to [25]\nend\nif <(player LV.) = [7]> then\n    set [player hp v] to [50]\nend\n\ndefine recon two\nset [recon v] to [1]\nrepeat (4)\n    set [brightness v] effect to (0)\n    wait (0.2) seconds\n    set [brightness v] effect to (0)\n    wait (0.2) seconds\nend\nset [recon v] to [0]\n\nwhen I receive [new hook v]\nswitch costume to (Hook LV.)\n\nwhen I receive [pause v]\nrepeat until <(pause?) = [0]>\n    set [hstage v] to [0]\n    set [hook just activated v] to [0]\nend\n\nwhen I receive [unpause v]\nset [hstage v] to [0]\nset [hook just activated v] to [0]\n\nwhen I receive [level 7 v]\nwait until <<touching color (#000000)?> and <(x position) > [0]>>\nbroadcast ($21 doller pyramid v)\n\nwhen I receive [jump! v]\nset [yvel v] to [20]\n\nset [player lv. v] to [7]\nset [hook lv. v] to [9]\n\n@Ground\n\nwhen flag clicked\nshow\nerase all\nhide variable [speed v]\nhide variable [jump height v]\nhide variable [hook throw distance v]\nswitch costume to (costume7 v)\nstamp\nswitch costume to (costume1 v)\nwait until <(intro over?) = [1]>\nwait (1) seconds\nwait until <<key (any v) pressed?> or <mouse down?>>\nFade and Stamp Costume (2)\nwait (1) seconds\nFade and Stamp Costume (3)\nwait until <[60] < ([x position v] of [player v])>\nFade and Stamp Costume (4)\nwait until <[150] < ([x position v] of [player v])>\nFade and Stamp Costume (5)\nwait until <<[200] > ([x position v] of [player v])> and <[70] < ([y position v] of [player v])>>\nbroadcast (1 part 2 v)\nFade and Stamp Costume (6)\n\ndefine Fade and Stamp Costume (costume)\nset [fade v] to [0]\nrepeat (20)\n    change [fade v] by (1)\n    switch costume to (join [costume] (costume))\n    set [ghost v] effect to ((100) - ((5) * (Fade)))\n    stamp\n    switch costume to (join [costume] ((-1) + (costume)))\n    set [ghost v] effect to (0)\n    stamp\nend\nswitch costume to (join [costume] (costume))\nstamp\n\nwhen I receive [level 2 v]\nswitch costume to (costume8 v)\nwait (3) seconds\nwait until <([x position v] of [player v]) > [100]>\nFade and Stamp Costume (9)\nwait until <([x position v] of [player v]) > [190]>\nbroadcast (2 part 2 v)\nFade and Stamp Costume (10)\n\nwhen I receive [level 3 v]\nswitch costume to (costume11 v)\ngo to [back v] layer\n\nwhen I receive [level 3 gone brodcast v]\nFade and Stamp Costume (12)\nwait until <([y position v] of [player v]) > [15]>\nbroadcast (3 part 2 v)\nFade and Stamp Costume (13)\n\nwhen I receive [level 4 v]\nswitch costume to (costume14 v)\nwait (3) seconds\nwait until <([x position v] of [player v]) > [199]>\nbroadcast (4 part 2 v)\nFade and Stamp Costume (15)\n\nwhen I receive [level 5 v]\nswitch costume to (costume16 v)\nwait (3) seconds\nwait until <not <color (#000000) is touching (#00d5ff)?>>\nFade and Stamp Costume (17)\nwait until <([x position v] of [player v]) > [160]>\nbroadcast (5 part 2 v)\nFade and Stamp Costume (18)\n\nwhen I receive [level 6 v]\nswitch costume to (costume19 v)\nbroadcast (6 part 2 v)\nwait (3) seconds\n\nwhen I receive [level 7 v]\nswitch costume to (costume20 v)\nwait (3) seconds\n\nwhen I receive [$21 doller pyramid v]\nFade and Stamp Costume (21)\nbroadcast (7 part two v)\n\nwhen I receive [level 8 v]\nswitch costume to (costume22 v)\n\nwhen I receive [8 part two in level 8 v]\nFade and Stamp Costume (23)\n\n@Thumbnail\n\nwhen flag clicked\ngo to [front v] layer\nset [ghost v] effect to (0)\nset [pixelate v] effect to (0)\nforever\n    change [ghost v] effect by (15)\n    change [pixelate v] effect by (15)\nend\n\nwhen flag clicked\n\nforever\n    go [forward v] (100) layers\nend\n\nwhen flag clicked\n\nforever\n    repeat (10)\n        show\n        go to [front v] layer\n    end\nend\n\nwhen [a v] key pressed\nif <<key (p v) pressed?> and <<key (i v) pressed?> and <key (g v) pressed?>>> then\n    set [brightness v] effect to (0)\n    set [pixelate v] effect to (0)\n    go to [front v] layer\n    set [ghost v] effect to (0)\nend\n\nstop [all v]\n\n@finish\n\nwhen flag clicked\nhide\nforever\n    go to [back v] layer\n    switch costume to (join [costume] (level))\nend\n\nwhen I receive [level 2 v]\nhide\n\nwhen I receive [level 3 v]\nhide\n\nwhen I receive [level 4 v]\nhide\n\nwhen I receive [level 5 v]\nhide\n\nwhen I receive [2 part 2 v]\nshow\n\nwhen I receive [3 part 2 v]\nshow\n\nwhen I receive [1 part 2 v]\nshow\n\nwhen I receive [4 part 2 v]\nshow\n\nwhen I receive [5 part 2 v]\nshow\n\nwhen I receive [level 6 v]\nhide\n\nwhen I receive [6 part 2 v]\nshow\n\nwhen I receive [level 7 v]\nhide\n\nwhen I receive [7 part two v]\nshow\n\nwhen I receive [level 8 v]\nhide\n\n@level up\n\nwhen flag clicked\nhide\n\nwhen I receive [level 2 v]\nlevel up\n\nwhen I receive [level 3 v]\nlevel up\n\nwhen I receive [level 4 v]\nlevel up\n\nwhen I receive [level 5 v]\nlevel up\n\nwhen I receive [level 6 v]\nlevel up\n\nwhen I receive [level 7 v]\nchange [@coins v] by (1)\nlevel up\n\ndefine level up\nchange [@coins v] by (1)\ngo to [front v] layer\ngo to x: (500) y: (0)\nshow\nglide (0.5) secs to x: (0) y: (0)\nrepeat (20)\n    change [color v] effect by (-5)\nend\nrepeat (20)\n    change [color v] effect by (5)\nend\nset [color v] effect to (0)\nwait (1) seconds\nglide (0.5) secs to x: (-500) y: (0)\nbroadcast (part two v)\nhide\n\n@enimies\n\nwhen flag clicked\nhide\n\nwhen I receive [level 3 v]\nwait (3) seconds\ncreate enemie x: [190] y: [0] type [ground]\n\ndefine create enemie x: (x?) y: (y?) type (type?)\npoint towards (player v)\nswitch costume to (type?)\ngo to x: (x?) y: (y?)\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\nshow\nforever\n    if <<<<<(Hook LV.) = [7]> and <touching color (#0146fe)?>> or <<(Hook LV.) = [7]> and <touching color (#44f506)?>>> or <<<(Hook LV.) = [8]> and <touching color (#484848)?>> or <<(Hook LV.) = [6]> and <touching color (#851703)?>>>> or <<< or <<<(Hook LV.) = [2]> and <touching color (#663e00)?>> or <<(Hook LV.) = [5]> and <touching color (#02f8fa)?>>>> or <<(Hook LV.) = [3]> and <touching color (#8d8e8e)?>>> or <<(Hook LV.) = [4]> and <touching color (#cab403)?>>>> then\n        change [hook duration v] by (-1)\n        change [@coins v] by (1)\n        start sound [Crunch v]\n        if <(costume [name v]) = [ground]> then\n            change [@coins v] by (-1)\n            if <(level) = [3]> then\n                broadcast (level 3 gone brodcast v)\n            end\n        end\n        if <(level) = [8]> then\n            broadcast (8 part two in level 8 v)\n        end\n        if <<(costume [name v]) = [air]> or <(costume [name v]) = [rocket]>> then\n            coinify\n        end\n        delete this clone\n    end\nend\n\nwhen I start as a clone\ngo to [front v] layer\nforever\n    if <(costume [number v]) = [1]> then\n        set rotation style [left-right v]\n        if <not <touching color (#000000)?>> then\n            repeat until <touching color (#000000)?>\n                change y by (-3)\n            end\n        end\n    end\n    if <(costume [number v]) = [2]> then\n        repeat until <not <(costume [number v]) = [2]>>\n            set rotation style [all around v]\n            wait (2) seconds\n            repeat (10)\n                move (5) steps\n            end\n            repeat (5)\n                move (4) steps\n            end\n            repeat (3)\n                move (3) steps\n            end\n            repeat (2)\n                move (2) steps\n            end\n            repeat (2)\n                move (1) steps\n            end\n        end\n    end\n    if < (costume [name v]) contains [rocket]?> then\n        switch costume to (rocket  v)\n        point in direction (90)\n        set rotation style [don't rotate v]\n        repeat until <<touching (ground v)?> and <touching color (#000000)?>>\n            change y by (-1)\n        end\n        repeat until <not < (costume [number v]) contains [rocket]?>>\n            wait (3) seconds\n            switch costume to (rocket 2 v)\n            repeat (2)\n                broadcast (shoot \(rocket\) v)\n                wait (0.5) seconds\n            end\n            switch costume to (rocket  v)\n        end\n    end\nend\n\nwhen I receive [level 4 v]\nwait (3) seconds\ncreate enemie x: [0] y: [0] type [air]\nwait (2) seconds\ncreate enemie x: [0] y: [0] type [air]\nwait (2) seconds\ncreate enemie x: [0] y: [0] type [air]\nwait (2) seconds\nif <(level) = [4]> then\n    create enemie x: [0] y: [0] type [air]\nend\n\nwhen I start as a clone\nforever\n    if <(costume [number v]) = [2]> then\n        point towards (player v)\n    end\nend\n\nwhen I start as a clone\nforever\n    if <(costume [number v]) = [2]> then\n        if <touching (player v)?> then\n            wait (0.1) seconds\n            repeat (20)\n                change [ghost v] effect by (5)\n            end\n            delete this clone\n        end\n    end\nend\n\nwhen I receive [level 5 v]\nwait (3) seconds\ncreate enemie x: [0] y: [0] type [air]\nwait (2) seconds\ncreate enemie x: [0] y: [0] type [air]\nwait (4) seconds\nif <(level) = [5]> then\n    create enemie x: [0] y: [0] type [air]\nend\n\nwhen I start as a clone\nforever\n    if <touching (player v)?> then\n        broadcast (damage? v)\n        wait (1) seconds\n    end\nend\n\ndefine coinify\npoint in direction (90)\nset rotation style [don't rotate v]\nrepeat (7)\n    change [ghost v] effect by (15)\n    hide\n    set [ghost v] effect to (0)\n    switch costume to (coin v)\n    show\n    repeat (10)\n        change y by (2)\n    end\n    wait (1) seconds\n    repeat (25)\n        change [ghost v] effect by (4)\n    end\n    delete this clone\nend\n\nwhen I receive [level 8 v]\nwait (3) seconds\ncreate enemie x: [222] y: [0] type [rocket]\n\n@shadow\n\nwhen flag clicked\nforever\n    go to (player v)\n    go to [back v] layer\n    set [ghost v] effect to (75)\nend\n\nwhen flag clicked\nforever\n    if <(shop) = [closed]> then\n        show\n    else\n        hide\n    end\nend\n\n@shop\n\nwhen flag clicked\nswitch costume to (closed v)\ngo to [front v] layer\ngo [forward v] (10000000) layers\nforever\n    go to x: (0) y: (0)\n    if <(intro over?) = [1]> then\n        show\n    else\n        hide\n    end\nend\n\nwhen this sprite clicked\nif <(shop) = [closed]> then\n    switch costume to (open v)\n    wait (0.1) seconds\n    shoppy\nend\n\nwhen I receive [shop closed v]\nswitch costume to (closed v)\nwait (0.1) seconds\nshoppy\n\ndefine shoppy\nset [shop v] to (costume [name v])\n\nwhen I receive [intro over? v]\nset [shop v] to [closed]\n\n@exit\n\nwhen flag clicked\nhide\nforever\n    if <(shop) = [open]> then\n        show\n    else\n        hide\n    end\nend\n\nwhen flag clicked\nforever\n    forever\n        go to [front v] layer\n    end\nend\n\nwhen this sprite clicked\nif <<(shop) = [open]> and <<touching (mouse-pointer v)?> and <mouse down?>>> then\n    wait (0.1) seconds\n    broadcast (shop closed v)\nend\n\nwhen I receive [shop closed v]\nhide\n\n@@@@\n\nwhen flag clicked\nswitch costume to (10 v)\nhide\nforever\n    if <(Hook duration) = [0]> then\n        show\n        repeat until <(costume [name v]) = [1]>\n            wait (1) seconds\n            start sound [tick v]\n            next costume\n        end\n        wait (1) seconds\n        if <(Hook duration) = [0]> then\n            broadcast (Hook ran out? v)\n        end\n        hide\n        stop [this script v]\n    end\nend\n\nwhen I receive [hook hook v]\nif <not <<(costume [name v]) = [10]> and <(Hook duration) = [0]>>> then\n    switch costume to (10 v)\nend\n\n@waiting\n\nwhen flag clicked\nhide\nforever\n    if <(Hook duration) = [0]> then\n        show\n    else\n        hide\n    end\nend\n\nwhen this sprite clicked\nif <<(Hook duration) = [0]> and <(@coins) > [9]>> then\n    if <(Hook LV.) = [1]> then\n        set [hook duration v] to [5]\n    end\n    if <(Hook LV.) = [2]> then\n        set [hook duration v] to [8]\n    end\nend\n\n@cannon\n\nwhen flag clicked\nshow\nset rotation style [all around v]\nforever\n    switch costume to (player LV.)\n    go to (player v)\n    point towards (mouse-pointer v)\nend\n\nwhen I receive [part two v]\nshow\n\nwhen I receive [level 2 v]\nhide\n\nwhen I receive [level 3 v]\nhide\n\nwhen I receive [level 4 v]\nhide\n\nwhen I receive [level 5 v]\nhide\n\nwhen flag clicked\nforever\n    if <(shop) = [closed]> then\n        show\n    else\n        hide\n    end\nend\n\n@weapon\n\nwhen flag clicked\nset size to (0) %\nhide\n\nwhen I start as a clone\ngo to (player v)\nset size to (0) %\nshow\nrepeat (20)\n    change size by (5)\nend\nwait (2) seconds\nglide (1) secs to (mouse-pointer v)\nrepeat (20)\n    change size by (-5)\nend\ndelete this clone\n\nwhen I start as a clone\nforever\n    turn right (4) degrees\nend\n\n@coins\n\nwhen flag clicked\nhide\n\nwhen I receive [level 6 v]\nwait (2) seconds\ncoin X: [200] Y: [142] [1]\ncoin X: [-26] Y: [89] [1]\ncoin X: [213] Y: [75] [1]\ncoin X: [-163] Y: [-101] [1]\ncoin X: [163] Y: [-101] [1]\n\ndefine coin X: (x) Y: (y) (ammount)\nswitch costume to (ammount)\ngo to x: (x) y: (y)\ncreate clone of (_myself_ v)\nwait (0.02) seconds\n\nwhen I start as a clone\ngo to [back v] layer\nshow\nforever\n    if <touching (player v)?> then\n        wait (0.01) seconds\n        start sound [Coin v]\n        set [@coins v] to ((@coins) + (1))\n        delete this clone\n    end\nend\n\nwhen I receive [level 4 v]\ncoin X: [62] Y: [-30] [1]\n\nwhen I start as a clone\nforever\n    wait (0.02) seconds\n    next costume\nend\n\n@Did you read the instructions?\n\nwhen flag clicked\nshow\nswitch costume to (costume20 v)\nwait (1) seconds\nset [intro over? v] to [0]\nflash\nstart sound [Coin v]\nswitch costume to (costume33 v)\nflash 2\nwait (2) seconds\nflash\nswitch costume to (costume20 v)\nflash 2\nwait (1) seconds\nflash\nstart sound [Coin v]\nswitch costume to (costume34 v)\nflash 2\nwait (2) seconds\nflash\nswitch costume to (costume20 v)\nflash 2\nwait (1) seconds\nflash\nstart sound [Coin v]\nswitch costume to (costume35 v)\nflash 2\nwait (2) seconds\nflash\nswitch costume to (costume36 v)\nflash 2\nbroadcast (go intro v)\nwait until <key (space v) pressed?>\nwait until <(intro over?) = [1]>\nbroadcast (intro over? v)\nforever\n    change [ghost v] effect by (15)\n    change [pixelate v] effect by (15)\nend\n\ndefine flash\nrepeat (20)\n    change [pixelate v] effect by (10)\nend\n\ndefine flash 2\nrepeat (20)\n    change [pixelate v] effect by (-10)\nend\n\nwhen flag clicked\nforever\n    if <not <[people who played this v] contains (username)?>> then\n        insert (username) at (1) of [people who played this v] \n    end\nend\n\nswitch costume to (costume20 v)\nflash 2\nwait (1) seconds\n\n@confeti\n\nwhen flag clicked\nhide\n\nwhen I receive [level 2 v]\nconfeti\n\nwhen I receive [level 3 v]\nconfeti\n\nwhen I receive [level 4 v]\nconfeti\n\nwhen I receive [level 5 v]\nconfeti\n\nwhen I receive [level 6 v]\nconfeti\n\ndefine confeti\nrepeat (3)\n    go to x: (pick random (-200) to (200)) y: (-300)\n    switch costume to (pick random (1) to (3))\n    wait (0.3) seconds\n    repeat (10)\n        create clone of (_myself_ v)\n    end\nend\n\nwhen I start as a clone\nforever\n    move (10) steps\n    if <(direction) > [0]> then\n        turn right (1) degrees\n    else\n        turn left (1) degrees\n    end\nend\n\nwhen I start as a clone\npoint in direction (pick random (-45) to (45))\nshow\nwait (1) seconds\nwait until <touching (_edge_ v)?>\nwait (0.3) seconds\ndelete this clone\n\nwhen I start as a clone\nforever\n    repeat (3)\n        go to [front v] layer\n    end\nend\n\nwhen I receive [level 7 v]\nconfeti\n\nwhen I receive [level 8 v]\nconfeti\n\n@shoppy one\n\nwhen flag clicked\nswitch costume to (1 v)\nforever\n    if <(shop) = [open]> then\n        show variable [@coins v]\n        show\n    else\n        hide variable [@coins v]\n        hide\n    end\nend\n\nwhen this sprite clicked\nif <<(@coins) > (((5) * (costume [name v])) - (1))> and <(shop) = [open]>> then\n    change [@coins v] by (((costume [name v]) * (5)) - (((costume [name v]) * (5)) * (2)))\n    if <(player LV.) = [1]> then\n        set [player lv. v] to [2]\n        switch costume to (3 v)\n        wait (0.3) seconds\n    else\n        if <(player LV.) = [2]> then\n            set [player lv. v] to [3]\n            switch costume to (5 v)\n            wait (0.3) seconds\n        else\n            if <(player LV.) = [3]> then\n                set [player lv. v] to [4]\n                switch costume to (10 v)\n                wait (0.3) seconds\n            else\n                if <(player LV.) = [4]> then\n                    set [player lv. v] to [5]\n                    switch costume to (15 v)\n                    wait (0.3) seconds\n                else\n                    if <(player LV.) = [5]> then\n                        set [player lv. v] to [6]\n                        switch costume to (20 v)\n                        wait (0.3) seconds\n                    else\n                        if <(player LV.) = [6]> then\n                            set [player lv. v] to [7]\n                            switch costume to (closed v)\n                            wait (0.3) seconds\n                        end\n                    end\n                end\n            end\n        end\n    end\n    broadcast (reHP v)\nend\n\nwhen flag clicked\nforever\n    go to [front v] layer\n    if <not <(@coins) > (((costume [name v]) * (5)) - (1))>> then\n        set [brightness v] effect to (-100)\n    else\n        set [brightness v] effect to (0)\n    end\nend\n\n@shoppy two\n\nwhen flag clicked\nhide variable [@coins v]\nswitch costume to (1 v)\nwait until <(intro over?) = [1]>\nwait (1) seconds\nif <(Hook LV.) = [2]> then\n    switch costume to (2 v)\nend\nforever\n    if <(shop) = [open]> then\n        show\n        go to [front v] layer\n    else\n        hide\n    end\nend\n\nwhen this sprite clicked\nif <<(@coins) > (((costume [name v]) * (5)) - (1))> and <(shop) = [open]>> then\n    change [@coins v] by (((costume [name v]) * (5)) - (((costume [name v]) * (5)) * (2)))\n    if <(Hook LV.) = [1]> then\n        set [hook lv. v] to [2]\n        switch costume to (2 v)\n        wait (0.3) seconds\n    else\n        if <(Hook LV.) = [2]> then\n            set [hook lv. v] to [3]\n            switch costume to (4 v)\n            wait (0.3) seconds\n        else\n            if <(Hook LV.) = [3]> then\n                set [hook lv. v] to [4]\n                switch costume to (6 v)\n                wait (0.3) seconds\n            else\n                if <(Hook LV.) = [4]> then\n                    set [hook lv. v] to [5]\n                    switch costume to (closed v)\n                    wait (0.3) seconds\n                else\n                    if <[] = [5]> then\n                end\n            end\n        end\n    end\n    broadcast (new hook v)\nend\n\nwhen flag clicked\nforever\n    if <not <(@coins) > (((costume [name v]) * (5)) - (1))>> then\n        set [brightness v] effect to (-100)\n    else\n        set [brightness v] effect to (0)\n    end\nend\n\nwhen [space v] key pressed\nif <key (7 v) pressed?> then\n    set [@coins v] to [400]\nend\n\n@man\n\nwhen flag clicked\ngo to x: (-225) y: (-94)\nhide\n\nwhen I receive [go intro v]\nswitch costume to (costume1 v)\nset rotation style [left-right v]\npoint in direction (90)\nshow\nforever\n    if <(intro over?) = [0]> then\n        repeat (2)\n            repeat until <not <touching (_edge_ v)?>>\n                move (5) steps\n            end\n            repeat until <touching (_edge_ v)?>\n                move (5) steps\n            end\n            repeat (5)\n                move (5) steps\n            end\n            hide\n            turn right (180) degrees\n            wait (1) seconds\n            show\n        end\n        repeat until <not <touching (_edge_ v)?>>\n            move (5) steps\n        end\n        switch costume to (costume2 v)\n        wait (1) seconds\n        switch costume to (costume1 v)\n        wait (0.5) seconds\n        switch costume to (costume3 v)\n        wait (0.5) seconds\n        switch costume to (costume1 v)\n        wait (0.5) seconds\n    end\nend\n\nwhen I receive [intro over? v]\nhide\nstop [other scripts in sprite v]\nstop [this script v]\n\n@paused\n\nwhen flag clicked\nswitch costume to (costume1 v)\nhide\n\nwhen I receive [intro over? v]\nwait (1) seconds\nshow\n\nwhen this sprite clicked\nif <<mouse down?> and <touching (mouse-pointer v)?>> then\n    wait (0.01) seconds\n    if <(pause?) = [0]> then\n        set [pause? v] to [1]\n        broadcast (pause v)\n        switch costume to (costume2 v)\n    else\n        wait (0.1) seconds\n        set [pause? v] to [0]\n        broadcast (unpause v)\n        switch costume to (costume1 v)\n    end\nend\n\n@paused?\n\nwhen flag clicked\nforever\n    if <(pause?) = [1]> then\n        show\n        go to (random position v)\n        glide (1) secs to x: (0) y: (0)\n        repeat until <not <(pause?) = [1]>>\n            show\n        end\n    else\n        hide\n    end\nend\n\n@play\n\nwhen flag clicked\nhide\nwait (13) seconds\nwait until <key (space v) pressed?>\nset [pixelate v] effect to (200)\nshow\nrepeat (20)\n    change [pixelate v] effect by (-10)\nend\nforever\n    go to [front v] layer\nend\n\nwhen this sprite clicked\nbroadcast (intro over? v)\nset [intro over? v] to [1]\nhide\n\n@facts\n\nwhen flag clicked\nclear graphic effects\nhide\nset [pixelate v] effect to (200)\nforever\n    if <(intro over?) = [1]> then\n        hide\n    end\nend\n\nwhen I receive [go intro v]\nshow\nrepeat until <(intro over?) = [1]>\n    switch costume to (join [costume] (pick random (1) to (9)))\n    pix one\n    wait (5) seconds\n    pix two\nend\nhide\n\ndefine pix one\nrepeat (20)\n    change [pixelate v] effect by (-10)\nend\n\ndefine pix two\nrepeat (20)\n    change [pixelate v] effect by (10)\nend\n\nwhen flag clicked\nforever\n    go to [front v] layer\nend\n\n@coins2\n\nwhen flag clicked\nhide\n\nwhen I receive [level 6 v]\nwait (2) seconds\ncoin X: [-137] Y: [37] [1]\n\ndefine coin X: (x) Y: (y) (ammount)\nswitch costume to (ammount)\ngo to x: (x) y: (y)\ncreate clone of (_myself_ v)\nwait (0.02) seconds\n\nwhen I start as a clone\ngo to [back v] layer\nshow\nforever\n    if <touching (player v)?> then\n        wait (0.01) seconds\n        start sound [Coin v]\n        set [@coins v] to ((@coins) + (5))\n        delete this clone\n    end\nend\n\nwhen I start as a clone\nforever\n    wait (0.02) seconds\n    next costume\nend\n\n@tramps\n\nwhen flag clicked\nhide\nforever\n    if <touching (player v)?> then\n        broadcast (Jump! v)\n    end\nend\n\nwhen I receive [level 7 v]\nshow\n\nwhen I receive [level 8 v]\nhide\n\n@shoot\n\nwhen flag clicked\nhide\n\nwhen I receive [shoot \(rocket\) v]\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\npoint towards (player v)\ngo to (enimies v)\nshow\nrepeat until <<touching color (#000000)?> or <<touching (player v)?> or <<<<<(Hook LV.) = [7]> and <touching color (#0146fe)?>> or <<(Hook LV.) = [7]> and <touching color (#44f506)?>>> or <<<(Hook LV.) = [8]> and <touching color (#484848)?>> or <<(Hook LV.) = [6]> and <touching color (#851703)?>>>> or <<< or <<<(Hook LV.) = [2]> and <touching color (#663e00)?>> or <<(Hook LV.) = [5]> and <touching color (#02f8fa)?>>>> or <<(Hook LV.) = [3]> and <touching color (#8d8e8e)?>>> or <<(Hook LV.) = [4]> and <touching color (#cab403)?>>>>>>\n    move (5) steps\nend\ndelete this clone\n\n
AHA!! ITS FIXED!! FINALLY!!\n\n         100 hearts and I'll make a part 2... I'll try.\n\n         EDIT: This offer has expired. I am not that active anymore, and won't be able to see if this has reached any amount of hearts or stars, and don't feel like editing it.\n_________________________________________________\nYou are on a quest for power, but power does not come easy. You will have to face grave danger from enemies and the final boss. Collect coins and become the highest platformer player ever!\n\nWhy am I bad at stories?\n\n               INSTRUCTIONS READ THIS.\n_________________________________________________\nArrow keys, tap to use the grapple, tap again to stop using it. I did add sounds and enemies and a lot more. He said not to make it a game, but I made it a game! Try to get to the door. If your duration runs out, wait 10 seconds, or pay 10 coins. You can collect coins and buy at the shop. Tap space to get the play button.