Potter Platform 9¾ Game

Instructions: Runs best in small window (no lag).\n\n✪This is an awesome 2 handed game!\n✪Use ASWD or arrow keys to move (usually left hand) \n✪Use mouse to cast your spells. (usually right hand)\n✪Kill the beasts, avoid the drops, collect charms and save the world.\n\n❤ LOVE ❤ FAV ❤ FOLLOW ❤ LOVE ❤ FAV ❤ FOLLOW ❤\n✪✪✪✪✪✪✪✪✪✪✪✪✪✪✪✪✪✪✪✪✪✪✪✪✪✪✪✪✪✪\nPLEASE follow the link below and suggest this to be featured!\nhttps://scratch.mit.edu/discuss/topic/2733/\n✪✪✪✪✪✪✪✪✪✪✪✪✪✪✪✪✪✪✪✪✪✪✪✪✪✪✪✪✪✪\n  

@Stage\n\nwhen I receive [runmaingame v]\nshow\nset [brightness v] effect to (-60)\nwait (1) seconds\nforever\n    next costume\nend\n\nwhen flag clicked\nset [brightness v] effect to (-60)\n\n@Pick\n\nwhen I receive [runmaingame v]\nhide\nforever\n    if <mouse down?> then\n        create clone of (_myself_ v)\n        wait (0.3) seconds\n    end\nend\n\nwhen I receive [select letters v]\nswitch costume to (sword v)\n\nwhen I start as a clone\ngo to x: (0) y: (5)\npoint towards (mouse-pointer v)\nshow\ngo to [front v] layer\nrepeat (18)\n    move (10) steps\nend\nrepeat (5)\n    move (10) steps\n    change [ghost v] effect by (20)\nend\ndelete this clone\n\nwhen I receive [weapondown v]\nnext costume\n\nwhen I receive [weaponup v]\nnext costume\n\nwhen I receive [death sequence 2016 v]\nstop [other scripts in sprite v]\nhide\ndelete this clone\n\n@WEAPONS UPGRADE\n\nwhen I receive [select letters v]\nhide\n\nwhen I receive [you are dead v]\nstop [other scripts in sprite v]\n\nwhen I receive [runmaingame v]\nshow\ngo to x: (0) y: (0)\ngo to [front v] layer\n\n@L1+Ghost\n\ndefine Monkey\nforever\n    go to (harrypotter v)\n    turn right (pick random (0) to (360)) degrees\n    move (300) steps\n    show\n    switch costume to (smallghost-0 v)\n    repeat until <<<(y position) < [-179]> or <(x position) < [-239]>> or <(x position) > [239]>>\n        next costume\n        if <(costume [number v]) = [5]> then\n            switch costume to (smallghost-0 v)\n        end\n        point towards (harrypotter v)\n        move ((LEVEL) + (3)) steps\n        change y by ((y) - (Lasty))\n        change x by ((x) - (Lastx))\n        if <touching (pick v)?> then\n            start sound [robinhood76 dizzy-bolt-spell v]\n            switch costume to (axe wielder-19 v)\n            repeat (11)\n                next costume\n            end\n            hide\n            go to x: (400) y: (pick random (-100) to (100))\n            switch costume to (cmf-0 v)\n            wait (1) seconds\n            show\n        end\n        if <<([abs v] of (x position) ) < [60]> and <<(y position) < [20]> and <(y position) > [-50]>>> then\n            broadcast (Injured v)\n            hide\n            wait (3) seconds\n            go to x: (400) y: (pick random (-100) to (100))\n        end\n    end\nend\n\nwhen I receive [nextlevelstart v]\nstop [other scripts in sprite v]\nwait (5) seconds\nhide\nMonkey\n\nwhen I receive [nextlevelsequence v]\nstop [other scripts in sprite v]\nhide\n\nwhen I receive [death sequence 2016 v]\nstop [other scripts in sprite v]\nhide\n\nwhen I receive [showinstructions v]\nstop [other scripts in sprite v]\nhide\n\n@L1+Meteor\n\nwhen I receive [runmaingame v]\nMeteor\n\nwhen flag clicked\nhide\n\nwhen I receive [select letters v]\nhide\n\nwhen I receive [death sequence 2016 v]\nstop [other scripts in sprite v]\nhide\ndelete this clone\n\nwhen I receive [nextlevelstart v]\nMeteor\n\nwhen I receive [nextlevelsequence v]\nhide\n\ndefine Meteor\nshow\nswitch costume to (ezgif.com-ef5b2b5c33-0 v)\ngo to x: (pick random (-240) to (240)) y: (300)\nforever\n    change x by ((x) - (Lastx))\n    change y by (((y) - (Lasty)) - ((3) + (LEVEL)))\n    next costume\n    if <(costume [number v]) = [4]> then\n        switch costume to (ezgif.com-ef5b2b5c33-0 v)\n    end\n    if <(y position) < [-170]> then\n        go to x: (pick random (-240) to (240)) y: (300)\n    end\n    if <touching (pick v)?> then\n        start sound [BPop v]\n        switch costume to (ezgif.com-ef5b2b5c33-2 v)\n        repeat (8)\n            next costume\n        end\n        hide\n        go to x: (pick random (-240) to (240)) y: (-300)\n        wait (2) seconds\n        switch costume to (ezgif.com-ef5b2b5c33-0 v)\n        show\n    end\n    if <<([abs v] of (x position) ) < [17]> and <<(y position) < [20]> and <(y position) > [-50]>>> then\n        broadcast (Injured v)\n        hide\n        go to x: (pick random (-240) to (240)) y: (-300)\n        wait (4) seconds\n        show\n    end\nend\n\n@Wizard with bolt\n\nwhen I receive [nextlevelstart v]\nstop [other scripts in sprite v]\nif <(LEVEL) > [2]> then\n    wait (5) seconds\n    hide\n    Wizard\nend\n\nwhen I receive [nextlevelsequence v]\nstop [other scripts in sprite v]\nhide\n\nwhen I receive [nextlevelsequence v]\nstop [other scripts in sprite v]\nhide\n\nwhen I receive [death sequence 2016 v]\nstop [other scripts in sprite v]\nhide\n\ndefine Wizard\nforever\n    switch costume to (reshaped wizard with bolt-0 v)\n    go to x: (-300) y: (pick random (-150) to (150))\n    repeat until <<<(y position) < [-179]> or <(x position) < [-239]>> or <(x position) > [239]>>\n        next costume\n        if <(costume [number v]) = [29]> then\n            switch costume to (reshaped wizard with bolt-0 v)\n        end\n        point towards (harrypotter v)\n        move ((LEVEL) + (4)) steps\n        change y by ((y) - (Lasty))\n        change x by ((x) - (Lastx))\n        if <touching (pick v)?> then\n            start sound [schlump v]\n            switch costume to (axe wielder-19 v)\n            repeat (11)\n                next costume\n            end\n            hide\n            go to x: (400) y: (pick random (-100) to (100))\n            switch costume to (cmf-0 v)\n            change [score v] by (1)\n            broadcast (DrawScore v)\n            wait (1) seconds\n        end\n        if <touching (harrypotter v)?> then\n            broadcast (Injured v)\n            hide\n            wait (3) seconds\n            go to x: (400) y: (pick random (-100) to (100))\n        end\n    end\nend\n\n@DeathEater\n\nwhen I receive [nextlevelstart v]\ndelete this clone\n\nwhen I receive [death sequence 2016 v]\nstop [other scripts in sprite v]\nhide\ndelete this clone\n\nwhen I receive [select letters v]\nhide\n\nwhen I receive [nextlevelstart v]\nstop [other scripts in sprite v]\nhide\ngo to x: (pick random (-240) to (240)) y: (300)\nset size to (80) %\nswitch costume to (monstershrunk-0 v)\nif <(LEVEL) > [4]> then\n    wait (8) seconds\n    point towards (harrypotter v)\n    turn left (180) degrees\n    Death\nend\n\ndefine Death\nforever\n    next costume\n    if <(costume [number v]) = [24]> then\n        switch costume to (monstershrunk-0 v)\n    end\n    move ((0) - ((LEVEL) + (1))) steps\n    change x by ((x) - (Lastx))\n    change y by ((y) - (Lasty))\n    if <touching (pick v)?> then\n        switch costume to (explosion2-0 v)\n        start sound [chomp v]\n        repeat (13)\n            next costume\n        end\n        hide\n        change [score v] by (1)\n        broadcast (DrawScore v)\n        delete this clone\n    end\n    if <<([abs v] of (x position) ) < [30]> and <<(y position) < [25]> and <(y position) > [-55]>>> then\n        broadcast (Injured v)\n        delete this clone\n    end\nend\n\n@Charms\n\nwhen I receive [finishedrace v]\nstop [other scripts in sprite v]\nstop [this script v]\n\nwhen I receive [select letters v]\nhide\n\nwhen I receive [runmaingame v]\nhide\nswitch costume to (star v)\nset [setupcounter v] to [0]\nset [starsleft v] to (length of [stary v])\nrepeat until <(SetupCounter) = [36]>\n    change [setupcounter v] by (1)\n    create clone of (_myself_ v)\nend\nhide\n\nwhen I receive [death sequence 2016 v]\nstop [other scripts in sprite v]\nhide\ndelete this clone\n\ndefine Tokens\nforever\n    if <<([abs v] of ((x) - (item (SetupCounter) of [pokemonx v])) ) > [244]> or <([abs v] of ((y) - (item (SetupCounter) of [pokemony v])) ) > [184]>> then\n        hide\n    else\n        go to x: ((x) - (item (SetupCounter) of [pokemonx v])) y: ((y) - (item (SetupCounter) of [pokemony v]))\n        show\n        if <<<(x position) > [-40]> and <(x position) < [40]>> and <<(y position) > [-40]> and <(y position) < [40]>>> then\n            change [score v] by (20)\n            hide\n            broadcast (DrawScore v)\n            broadcast (UpdateCrafters v)\n            start sound [Yes v]\n            replace item (SetupCounter) of [pokemonx v] with (pick random (-850) to (850))\n            replace item (SetupCounter) of [pokemony v] with (pick random (-430) to (430))\n        end\n    end\nend\n\nnext costume\n\nwhen I start as a clone\ngo to [front v] layer\ngo [backward v] (30) layers\nTokens\n\nwhen I receive [nextlevelsequence v]\n\nrepeat (9)\n    repeat (9)\n        change [setupcounter v] by (1)\n        add (CharmxTemp) to [pokemonx v]\n        add (Charmytemp) to [pokemony v]\n        change [charmxtemp v] by (250)\n    end\n    set [charmxtemp v] to [-1000]\n    change [charmytemp v] by (-190)\nend\nset [setupcounter v] to [0]\nrepeat until <(SetupCounter) = [62]>\n    change [setupcounter v] by (1)\n    add (pick random (-850) to (850)) to [pokemonx v]\n    add (pick random (-430) to (430)) to [pokemony v]\nend\n\nwhen [b v] key pressed\ndelete (all) of [pokemonx v]\ndelete (all) of [pokemony v]\nset [setupcounter v] to [0]\nset [charmxtemp v] to [-1000]\nset [charmytemp v] to [750]\nrepeat (6)\n    repeat (6)\n        change [setupcounter v] by (1)\n        add (CharmxTemp) to [pokemonx v]\n        add (Charmytemp) to [pokemony v]\n        change [charmxtemp v] by (375)\n    end\n    set [charmxtemp v] to [-1000]\n    change [charmytemp v] by (-300)\nend\n\n@Iphone MP3\n\nwhen flag clicked\nset [track v] to [1]\nforever\n    if <(Track) = [1]> then\n        play sound [Harry potter v] until done\n    end\n    if <(Track) = [2]> then\n        play sound [Prologue Book v] until done\n    end\n    if <(Track) = [3]> then\n    end\n    if <(Track) = [4]> then\n        set [track v] to [1]\n    end\nend\n\nwhen this sprite clicked\nstop all sounds\nchange [track v] by (1)\n\nwhen I receive [select letters v]\nhide\n\nwhen I receive [runmaingame v]\nshow\nwait (0.1) seconds\nswitch costume to (music icon v)\ngo to [front v] layer\nwait (1) seconds\ngo to [front v] layer\nwait (1) seconds\n\nforever\nend\n\n@Sprite2\n\nwhen flag clicked\nbroadcast (ShowWelcome v)\ngo to x: (0) y: (-150)\nset size to (80) %\nwait (5) seconds\nshow\ngo to [front v] layer\nforever\n    repeat (10)\n        go to [front v] layer\n        wait (0.01) seconds\n        change size by (2)\n    end\n    repeat (10)\n        go to [front v] layer\n        wait (0.01) seconds\n        change size by (-2)\n    end\nend\n\nwhen I receive [launchcountdown v]\nstop [other scripts in sprite v]\nhide\n\n@shield\n\nwhen I receive [runmaingame v]\ngo to [front v] layer\nshow\n\nwhen I receive [injured v]\ngo to [front v] layer\nshow\nchange [shields v] by (-1)\nif <(Shields) < [1]> then\n    broadcast (Death Sequence 2016 v)\nend\nswitch costume to (Shields)\n\nwhen I receive [runmaingame v]\nset [flag v] to [Off]\nset [shields v] to [5]\nshow\ngo to [front v] layer\nwait (0.2) seconds\nforever\n    go to [front v] layer\n    wait (5) seconds\nend\n\nwhen I receive [nextlevelstart v]\nset [shields v] to [5]\nswitch costume to (5 v)\n\n@Sprite5\n\nwhen I receive [showinstructions v]\ngo to x: (0) y: (0)\nhide\n\nwhen I receive [injured v]\nstart sound [No v]\nset size to (50) %\nset [ghost v] effect to (100)\nshow\nrepeat (10)\n    change [ghost v] effect by (-10)\n    go to [front v] layer\nend\nrepeat (10)\n    change [ghost v] effect by (10)\n    go to [front v] layer\nend\nhide\n\n@Level\n\nwhen I receive [runmaingame v]\nset size to (60) %\nset [brightness v] effect to (20)\nset [color v] effect to (10)\nshow\nset [level v] to [1]\nswitch costume to (LEVEL)\nwait (0.1) seconds\ngo to [front v] layer\n\nwhen I receive [death sequence 2016 v]\nstop [other scripts in sprite v]\n\nwhen I receive [select letters v]\nhide\n\nwhen I receive [nextlevelstart v]\nswitch costume to (LEVEL)\nwait (1) seconds\nswitch costume to (LEVEL)\n\nchange [color v] effect by (-20)\n\n@CharmsNeeded\n\nwhen I receive [updatecrafters v]\nshow\nswitch costume to ((costume [number v]) - (1))\nif <(costume [number v]) = [56]> then\n    change [level v] by (1)\n    change [score v] by (100)\n    broadcast (NextLevelSequence v)\n    broadcast (UpdateScore v)\nend\n\nwhen I receive [runmaingame v]\nset [brightness v] effect to (20)\nset [color v] effect to (10)\nshow\nswitch costume to (5 v)\ngo to [front v] layer\nwait (0.2) seconds\ngo to [front v] layer\n\nwhen I receive [nextlevelsequence v]\nshow\nstop [other scripts in sprite v]\nswitch costume to ((LEVEL) * (5))\n\nwhen I receive [select letters v]\nhide\n\nwhen I receive [death sequence 2016 v]\nstop [other scripts in sprite v]\n\n@WelcomeGif\n\nwhen I receive [launchcountdown v]\nstop all sounds\nstart sound [HES MINE.mp3 v]\ngo to [front v] layer\nhide\nswitch costume to (duel_little_hangleton-22 v)\nset [ghost v] effect to (100)\nshow\nrepeat (10)\n    change [ghost v] effect by (-10)\n    next costume\nend\ngo to [front v] layer\ngo to x: (0) y: (0)\nrepeat (80)\n    next costume\nend\nrepeat (10)\n    change [brightness v] effect by (10)\n    next costume\nend\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nbroadcast (RunMainGame v)\n\nwhen I receive [runmaingame v]\nhide\nstop [other scripts in sprite v]\n\nset size to (193) %\n\nwait (0.01) seconds\nwait (0.01) seconds\n\nwait (0.01) seconds\n\nbroadcast (RunMainGame v)\n\nbroadcast (RunMainGame v)\n\n@TextScreens\n\nwhen I receive [runmaingame v]\nhide\n\nwhen I receive [showinstructions v]\nerase all\ngo to x: (0) y: (0)\nswitch costume to (instructions v)\nrepeat (50)\n    change [brightness v] effect by (-2)\nend\ngo to [front v] layer\nshow\ngo to [front v] layer\nwait until <not <mouse down?>>\nwait until <mouse down?>\nbroadcast (LaunchCountdown v)\nwait (3) seconds\nhide\n\ngo to x: (0) y: (0)\ngo to [front v] layer\nshow\nswitch costume to (welcome v)\n\nwhen I receive [death sequence 2016 v]\nstart sound [He is mine v]\nswitch costume to (gameover v)\ngo to x: (0) y: (300)\ngo to [front v] layer\nshow\nrepeat until <(y position) = [0]>\n    go to [front v] layer\n    change y by (-10)\n    go to [front v] layer\nend\ngo to [front v] layer\nbroadcast (RankMe v)\n\nwhen [p v] key pressed\nshow\ngo to [front v] layer\nswitch costume to (welcomepage v)\n\nrepeat until <mouse down?>\n    go to [front v] layer\nend\nhide\n\nwhen I receive [showwelcome v]\nswitch costume to (welcomepage v)\nclear graphic effects\nshow\ngo to [front v] layer\nwait (2) seconds\nrepeat (50)\n    change [brightness v] effect by (2)\nend\nbroadcast (ShowInstructions v)\n\n@LevelUp\n\nwhen I receive [nextlevelsequence v]\ngo to x: (0) y: (0)\nset size to (0) %\nshow\ngo to [front v] layer\nswitch costume to (levelup2 v)\nrepeat (19)\n    change size by (5)\n    go to [front v] layer\nend\nchange size by (4)\ngo to [front v] layer\nwait (1.5) seconds\nbroadcast (NextLevelStart v)\nrepeat (20)\n    change size by (-5)\n    go to [front v] layer\nend\nhide\n\nwhen I receive [select letters v]\nhide\n\n@0-0\n\nwhen I receive [runmaingame v]\nshow\nset size to (200) %\ngo to x: (500) y: (500)\n0-0\n\nwhen I receive [falling v]\nstop [other scripts in sprite v]\n\nwhen flag clicked\nset [height v] to [540]\nset [width v] to [715]\n\nwhen I receive [finishedfalling v]\ngo to x: (x) y: (y)\nwait (0.1) seconds\n0-0\n\nwhen I receive [select letters v]\nhide\n\ndefine 0-0\nforever\n    if <<(x) > [170]> and <(y) < [-30]>> then\n        go to x: ((x) - (Width)) y: ((y) + (Height))\n        go [backward v] (10) layers\n        show\n        if <<(x) > [355]> and <(y) < [-265]>> then\n            if <not <touching (shadow v)?>> then\n                broadcast (Falling v)\n            end\n        end\n    else\n        hide\n    end\nend\n\n@0-1\n\nwhen I receive [runmaingame v]\nshow\nset size to (200) %\ngo to x: (500) y: (500)\n0-1\n\ndefine 0-1\nforever\n    if <<<(x) > [-600]> and <(x) < [600]>> and <(y) < [-30]>> then\n        go to x: (x) y: ((y) + (Height))\n        go [backward v] (10) layers\n        show\n        if <<([abs v] of (x) ) < [355]> and <(y) < [-265]>> then\n            if <not <touching (shadow v)?>> then\n                broadcast (Falling v)\n            end\n        end\n    else\n        hide\n    end\nend\n\nwhen I receive [falling v]\nstop [other scripts in sprite v]\n\nwhen I receive [finishedfalling v]\ngo to x: (x) y: (y)\nwait (0.1) seconds\n0-1\n\n@0-2\n\nwhen I receive [runmaingame v]\nset size to (200) %\nshow\ngo to x: (500) y: (500)\n0-2\n\nwhen I receive [finishedfalling v]\ngo to x: (x) y: (y)\nwait (0.1) seconds\n0-2\n\nwhen I receive [falling v]\nstop [other scripts in sprite v]\n\ndefine 0-2\nforever\n    if <<(x) < [-170]> and <(y) < [-30]>> then\n        go to x: ((x) + (Width)) y: ((y) + (Height))\n        go [backward v] (10) layers\n        show\n        if <<(x) < [-355]> and <(y) < [-265]>> then\n            if <not <touching (shadow v)?>> then\n                broadcast (Falling v)\n            end\n        end\n    else\n        hide\n    end\nend\n\n@1-0\n\nwhen I receive [runmaingame v]\nshow\nset size to (200) %\ngo to x: (500) y: (500)\n1-0\n\ndefine 1-0\nforever\n    if <<<(x) > [170]> and <(y) > [-420]>> and <(y) < [420]>> then\n        go to x: ((x) - (Width)) y: (y)\n        go [backward v] (10) layers\n        show\n        if <<(x) > [355]> and <([abs v] of (y) ) < [265]>> then\n            if <not <touching (shadow v)?>> then\n                broadcast (Falling v)\n            end\n        end\n    else\n        hide\n    end\nend\n\nwhen I receive [falling v]\nstop [other scripts in sprite v]\n\nwhen I receive [finishedfalling v]\ngo to x: (x) y: (y)\nwait (0.1) seconds\n1-0\n\n@1-1\n\nwhen I receive [runmaingame v]\nshow\ngo to x: (0) y: (0)\npoint in direction (0)\nset size to (200) %\ngo [backward v] (10) layers\n1-1\n\ndefine 1-1\nforever\n    if <<<<(x) > [-600]> and <(x) < [600]>> and <(y) > [-420]>> and <(y) < [420]>> then\n        go to x: (x) y: (y)\n        show\n        if <<([abs v] of (x) ) < [355]> and <([abs v] of (y) ) < [265]>> then\n            if <not <touching (shadow v)?>> then\n                broadcast (Falling v)\n            end\n        end\n    else\n        hide\n    end\nend\n\nwhen I receive [falling v]\nstop [other scripts in sprite v]\n\nwhen I receive [finishedfalling v]\ngo to x: (x) y: (y)\nwait (0.1) seconds\n1-1\n\ngo [backward v] (10) layers\n\n@1-2\n\nwhen I receive [runmaingame v]\nshow\nset size to (200) %\ngo to x: (500) y: (500)\n1-2\n\nwhen I receive [falling v]\nstop [other scripts in sprite v]\n\nwhen I receive [finishedfalling v]\ngo to x: (x) y: (y)\nwait (0.1) seconds\n1-2\n\ndefine 1-2\nforever\n    if <<<(x) < [-120]> and <(y) > [-420]>> and <(y) < [420]>> then\n        go to x: ((x) + (Width)) y: (y)\n        go [backward v] (10) layers\n        show\n        if <<(x) < [-355]> and <([abs v] of (y) ) < [265]>> then\n            if <not <touching (shadow v)?>> then\n                broadcast (Falling v)\n            end\n        end\n    else\n        hide\n    end\nend\n\n@2-0\n\nwhen I receive [runmaingame v]\nshow\nset size to (200) %\ngo to x: (500) y: (500)\n2-0\n\ndefine 2-0\nforever\n    if <<(x) > [170]> and <(y) > [30]>> then\n        go to x: ((x) - (Width)) y: ((y) - (Height))\n        show\n        go [backward v] (10) layers\n        if <<(x) > [355]> and <(y) > [265]>> then\n            if <not <touching (shadow v)?>> then\n                broadcast (Falling v)\n            end\n        end\n    else\n        hide\n    end\nend\n\nwhen I receive [falling v]\nstop [other scripts in sprite v]\n\nwhen I receive [finishedfalling v]\ngo to x: (x) y: (y)\nwait (0.1) seconds\n2-0\n\n@2-1\n\nwhen I receive [runmaingame v]\nshow\nset size to (200) %\ngo [backward v] (10) layers\ngo to x: (500) y: (500)\n2-1\n\nwhen I receive [finishedfalling v]\ngo to x: (x) y: (y)\nwait (0.1) seconds\n2-1\n\nwhen I receive [falling v]\nstop [other scripts in sprite v]\n\ndefine 2-1\nforever\n    if <<<(x) > [-600]> and <(x) < [600]>> and <(y) > [30]>> then\n        go to x: (x) y: ((y) - (Height))\n        show\n        if <<([abs v] of (x) ) < [355]> and <(y) > [265]>> then\n            if <not <touching (shadow v)?>> then\n                broadcast (Falling v)\n            end\n        end\n    else\n        hide\n    end\nend\n\n@2-2\n\nwhen I receive [runmaingame v]\nshow\nset size to (200) %\ngo to x: (500) y: (500)\n2-2\n\nwhen I receive [finishedfalling v]\ngo to x: (x) y: (y)\nwait (0.1) seconds\n2-2\n\nwhen I receive [falling v]\nstop [other scripts in sprite v]\n\ndefine 2-2\nforever\n    if <<(x) < [-120]> and <(y) > [30]>> then\n        go to x: ((x) + (Width)) y: ((y) - (Height))\n        show\n        go [backward v] (10) layers\n        if <<(x) < [-355]> and <(y) > [265]>> then\n            if <not <touching (shadow v)?>> then\n                broadcast (Falling v)\n            end\n        end\n    else\n        hide\n    end\nend\n\n@Score\n\nwhen I receive [drawscore v]\nshow\ngo to [front v] layer\nswitch costume to (0 v)\nswitch costume to (letter ((length of (Score)) - (0)) of (Score))\nif <(Score) > (☁ HighScore)> then\n    set [☁ highscore v] to (Score)\n    broadcast (UpdateHiScore v)\nend\n\nwhen I receive [select letters v]\nhide\n\nwhen I receive [runmaingame v]\nbroadcast (DrawScore v)\n\n@Score2\n\nwhen I receive [drawscore v]\nshow\ngo to [front v] layer\nswitch costume to (0 v)\nswitch costume to (letter ((length of (Score)) - (1)) of (Score))\n\nwhen I receive [runmaingame v]\nbroadcast (DrawScore v)\n\n@Score3\n\nwhen I receive [drawscore v]\nshow\ngo to [front v] layer\nswitch costume to (0 v)\nswitch costume to (letter ((length of (Score)) - (2)) of (Score))\n\nwhen I receive [runmaingame v]\nbroadcast (DrawScore v)\n\n@Score4\n\nwhen I receive [drawscore v]\nshow\ngo to [front v] layer\nswitch costume to (0 v)\nswitch costume to (letter ((length of (Score)) - (3)) of (Score))\n\nwhen I receive [runmaingame v]\nbroadcast (DrawScore v)\n\n@Score5\n\nwhen I receive [drawscore v]\nshow\ngo to [front v] layer\nswitch costume to (0 v)\nswitch costume to (letter ((length of (Score)) - (4)) of (Score))\n\nwhen I receive [runmaingame v]\nbroadcast (DrawScore v)\n\n@High\n\nwhen I receive [select letters v]\nhide\n\nwhen I receive [updatehiscore v]\nshow\ngo to [front v] layer\nswitch costume to (letter ((length of (☁ HighScore)) - (0)) of (☁ HighScore))\n\nset size to (50) %\n\nwhen I receive [runmaingame v]\nwait (1) seconds\nbroadcast (UpdateHiScore v)\n\n@High2\n\nwhen I receive [updatehiscore v]\nshow\ngo to [front v] layer\nif <(☁ HighScore) > [0]> then\n    switch costume to (letter ((length of (☁ HighScore)) - (1)) of (☁ HighScore))\nelse\n    switch costume to (0 v)\nend\n\nwhen I receive [select letters v]\nhide\n\n@High3\n\nwhen I receive [updatehiscore v]\nshow\ngo to [front v] layer\nif <(☁ HighScore) > [99]> then\n    switch costume to (letter ((length of (☁ HighScore)) - (2)) of (☁ HighScore))\nelse\n    switch costume to (0 v)\nend\n\nwhen I receive [select letters v]\nhide\n\n@High4\n\nwhen I receive [updatehiscore v]\nshow\ngo to [front v] layer\nif <(☁ HighScore) > [999]> then\n    switch costume to (letter ((length of (☁ HighScore)) - (3)) of (☁ HighScore))\nelse\n    switch costume to (0 v)\nend\n\nwhen I receive [select letters v]\nhide\n\n@High5\n\nwhen I receive [updatehiscore v]\nshow\ngo to [front v] layer\nif <(☁ HighScore) > [9999]> then\n    switch costume to (letter ((length of (☁ HighScore)) - (4)) of (☁ HighScore))\nelse\n    switch costume to (0 v)\nend\n\nwhen I receive [select letters v]\nhide\n\n@HarryPotter\n\nwhen I receive [death sequence 2016 v]\nstop [other scripts in sprite v]\nhide\ndelete this clone\n\ndefine Keysense1\nswitch costume to (fronthands v)\nforever\n    go to [front v] layer\n    set [lastx v] to (x)\n    set [lasty v] to (y)\n    if <<key (w v) pressed?> or <key (up arrow v) pressed?>> then\n        change [y v] by (-10)\n        broadcast (Up v)\n        set [lastshift v] to [w]\n    end\n    if <<key (s v) pressed?> or <key (down arrow v) pressed?>> then\n        change [y v] by (10)\n        broadcast (Down v)\n        set [lastshift v] to [s]\n    end\n    if <<key (d v) pressed?> or <key (right arrow v) pressed?>> then\n        change [x v] by (-10)\n        broadcast (Right v)\n        set [lastshift v] to [d]\n    end\n    if <<key (a v) pressed?> or <key (left arrow v) pressed?>> then\n        change [x v] by (10)\n        broadcast (Left v)\n        set [lastshift v] to [a]\n    end\n    if <(x) > [1100]> then\n        set [x v] to [1100]\n    end\n    if <(x) < [-1100]> then\n        set [x v] to [-1100]\n    end\n    if <(y) > [850]> then\n        set [y v] to [850]\n    end\n    if <(y) < [-850]> then\n        set [y v] to [-850]\n    end\nend\n\nwhen I receive [falling v]\nstop [other scripts in sprite v]\nswitch costume to (fronthands v)\nif <not <(LastShift) = [s]>> then\n    go [backward v] (20) layers\nend\nrepeat (15)\n    next costume\n    next costume\n    next costume\n    next costume\n    next costume\n    change y by (-5)\nend\nif <(LastShift) = [w]> then\n    change [y v] by (30)\n    switch costume to (front v)\nend\nif <(LastShift) = [s]> then\n    change [y v] by (-30)\n    switch costume to (up v)\nend\nif <(LastShift) = [a]> then\n    change [x v] by (-30)\n    switch costume to (right v)\nend\nif <(LastShift) = [d]> then\n    change [x v] by (30)\n    switch costume to (left v)\nend\nbroadcast (Injured v)\ngo to x: (0) y: (0)\ngo to [front v] layer\nbroadcast (FinishedFalling v)\nwait (0.1) seconds\nKeysense1\n\nwhen I receive [down v]\nif <(costume [number v]) < [6]> then\n    next costume\nelse\n    switch costume to (front v)\nend\n\nwhen I receive [right v]\nif <<(costume [number v]) > [13]> and <(costume [number v]) < [19]>> then\n    next costume\nelse\n    switch costume to (right v)\nend\n\nwhen I receive [left v]\nif <<(costume [number v]) > [6]> and <(costume [number v]) < [12]>> then\n    next costume\nelse\n    switch costume to (left v)\nend\n\nwhen I receive [up v]\nif <<(costume [number v]) > [19]> and <(costume [number v]) < [25]>> then\n    next costume\nelse\n    switch costume to (up v)\nend\n\nwhen I receive [runmaingame v]\nset size to (100) %\nswitch costume to (fronthands v)\ngo to x: (0) y: (0)\nshow\nbroadcast (Starting game v)\nset [x v] to [0]\nset [y v] to [0]\nset [lives v] to [3]\nset [score v] to [0]\nset [lastshift v] to [ ]\nKeysense1\n\n@Shadow\n\nwhen I receive [runmaingame v]\nset [ghost v] effect to (60)\nforever\n    go to (harrypotter v)\n    go to [front v] layer\n    go [backward v] (1) layers\nend\n\nwait (0.1) seconds\n\n@Voldemort\n\ndefine Monkey\nforever\n    hide\n    wait (10) seconds\n    go to (harrypotter v)\n    turn right (pick random (0) to (360)) degrees\n    move (200) steps\n    clear graphic effects\n    show\n    repeat (20)\n        next costume\n        point towards (harrypotter v)\n        move (3) steps\n        change y by ((y) - (Lasty))\n        change x by ((x) - (Lastx))\n    end\n    broadcast (Voldecast v)\n    repeat (10)\n        next costume\n        change [ghost v] effect by (10)\n        point towards (harrypotter v)\n        change y by ((y) - (Lasty))\n        change x by ((x) - (Lastx))\n        move (3) steps\n    end\nend\n\nwhen I receive [select letters v]\nset size to (100) %\nhide\n\nwhen I receive [nextlevelstart v]\nif <(LEVEL) > [3]> then\n    set size to (60) %\n    wait (10) seconds\n    Monkey\nend\n\nwhen I receive [death sequence 2016 v]\nstop [other scripts in sprite v]\nhide\n\nwhen I receive [nextlevelsequence v]\nhide\n\n@smallcast\n\nwhen I receive [voldecast v]\ngo to (voldemort v)\npoint towards (harrypotter v)\nturn right (90) degrees\nshow\nrepeat (12)\n    move (8) steps\n    show\n    go to [front v] layer\n    next costume\nend\nbroadcast (Voldemonster v)\nhide\n\nwhen flag clicked\nhide\n\nwhen I receive [death sequence 2016 v]\nstop [other scripts in sprite v]\nhide\ndelete this clone\n\nwhen I receive [starting game v]\nhide\n\nwhen I receive [showinstructions v]\nhide\n\n@Voldemonster\n\ndelete this clone\n\nwhen I receive [nextlevelstart v]\ndelete this clone\n\nwhen I receive [death sequence 2016 v]\nstop [other scripts in sprite v]\nhide\ndelete this clone\n\nwhen I receive [showinstructions v]\nhide\ndelete this clone\n\nwhen I receive [nextlevelsequence v]\nhide\n\nwhen I receive [voldemonster v]\ngo to (smallcast v)\nshow\ngo to [front v] layer\nswitch costume to (dragon-0 v)\npoint towards (harrypotter v)\nrepeat until <(Lives) < [1]>\n    move (LEVEL) steps\n    next costume\n    if <(costume [number v]) = [5]> then\n        switch costume to (dragon-0 v)\n    end\n    if <<([abs v] of (x position) ) < [35]> and <<(y position) < [25]> and <(y position) > [-55]>>> then\n        broadcast (Injured v)\n        delete this clone\n    end\n    if <touching (pick v)?> then\n        change [score v] by (1)\n        switch costume to (explosion2-0 v)\n        start sound [Brulock v]\n        repeat (11)\n            next costume\n        end\n        hide\n        change [score v] by (10)\n        broadcast (DrawScore v)\n        delete this clone\n    end\nend\ndelete this clone\n\nwhen I receive [runmaingame v]\nhide\ndelete this clone\n\n@Rank\n\nwhen I receive [rankme v]\nset size to (100) %\nclear graphic effects\ngo to [front v] layer\ngo to x: (0) y: (0)\nset [score v] to [1000]\nset [ramp v] to [500]\nset [achievementscrollspeed v] to [0.1]\nswitch costume to (intro v)\nshow\ncreate clone of (_myself_ v)\nwait (1) seconds\nswitch costume to (1 v)\nif <(Score) > ((Ramp) * (24))> then\n    set [achievementcostume v] to [10]\nelse\n    if <(Score) > ((Ramp) * (18))> then\n        set [achievementcostume v] to [9]\n    else\n        if <(Score) > ((Ramp) * (13))> then\n            set [achievementcostume v] to [8]\n        else\n            if <(Score) > ((Ramp) * (10))> then\n                set [achievementcostume v] to [7]\n            else\n                if <(Score) > ((Ramp) * (7))> then\n                    set [achievementcostume v] to [6]\n                else\n                    if <(Score) > ((Ramp) * (5))> then\n                        set [achievementcostume v] to [5]\n                    else\n                        if <(Score) > ((Ramp) * (3))> then\n                            set [achievementcostume v] to [4]\n                        else\n                            if <(Score) > ((Ramp) * (2))> then\n                                set [achievementcostume v] to [3]\n                            else\n                                if <(Score) > ((Ramp) * (1))> then\n                                    set [achievementcostume v] to [2]\n                                else\n                                    set [achievementcostume v] to [1]\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\nshow\nswitch costume to (1 v)\nrepeat (9)\n    play drum (3 v) for (AchievementScrollSpeed) beats\n    next costume\n    change [achievementscrollspeed v] by (0.01)\nend\nswitch costume to (1 v)\nrepeat ((AchievementCostume) - (1))\n    play drum (3 v) for (AchievementScrollSpeed) beats\n    next costume\n    change [achievementscrollspeed v] by (0.1)\nend\nwait (1) seconds\ncreate clone of (_myself_ v)\nswitch costume to (target v)\ncreate clone of (_myself_ v)\nswitch costume to (1 v)\nchange y by (-35)\nif <(Score) > ((Ramp) * (24))> then\n    set [achievementcostume v] to [10]\nelse\n    if <(Score) > ((Ramp) * (18))> then\n        set [achievementcostume v] to [10]\n    else\n        if <(Score) > ((Ramp) * (13))> then\n            set [achievementcostume v] to [9]\n        else\n            if <(Score) > ((Ramp) * (10))> then\n                set [achievementcostume v] to [8]\n            else\n                if <(Score) > ((Ramp) * (7))> then\n                    set [achievementcostume v] to [7]\n                else\n                    if <(Score) > ((Ramp) * (5))> then\n                        set [achievementcostume v] to [6]\n                    else\n                        if <(Score) > ((Ramp) * (3))> then\n                            set [achievementcostume v] to [5]\n                        else\n                            if <(Score) > ((Ramp) * (2))> then\n                                set [achievementcostume v] to [4]\n                            else\n                                if <(Score) > ((Ramp) * (1))> then\n                                    set [achievementcostume v] to [3]\n                                else\n                                    set [achievementcostume v] to [0]\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\nshow\nswitch costume to (1 v)\nchange y by (-35)\nrepeat (9)\n    play drum (3 v) for (AchievementScrollSpeed) beats\n    next costume\n    change [achievementscrollspeed v] by (0.01)\nend\nswitch costume to (2 v)\nrepeat ((AchievementCostume) - (1))\n    play drum (3 v) for (AchievementScrollSpeed) beats\n    next costume\n    change [achievementscrollspeed v] by (0.1)\nend\ncreate clone of (_myself_ v)\nchange y by (70)\nswitch costume to (lovefavfollow v)\nforever\n    repeat (9)\n        change size by (1)\n        change [color v] effect by (2)\n        wait (0.05) seconds\n    end\n    repeat (9)\n        change size by (-1)\n        change [color v] effect by (2)\n        wait (0.05) seconds\n    end\nend\n\nwhen flag clicked\nhide\nset size to (100) %\nclear graphic effects\ndelete this clone\n\nbroadcast (FollowMe v)\n\n