Rick Astley Platformer                            #games #all #Capt_Boanerges
@Stage\n\n@my friend\n\nwhen flag clicked\nset [level v] to [1]\nhide\n\ndefine starting position\nset [fallspeed v] to [0]\ngo to x: (-220) y: (-20)\nshow\n\nwhen I receive [start v]\ngo to x: (0) y: (0)\nset size to (90) %\nhide\nshow\nset [ghost v] effect to (100)\nset [good v] to [1]\nset [takeoffspeed v] to [12]\nset [runspeed v] to [0]\nset [fallspeed v] to [0]\ngo to x: (0) y: (0)\nforever\n    change [fallspeed v] by (-1)\n    set [x player v] to (x position)\n    set [y player v] to (y position)\n    if <<key (a v) pressed?> or <key (left arrow v) pressed?>> then\n        set [runspeed v] to [-5]\n    end\n    if <<key (d v) pressed?> or <key (right arrow v) pressed?>> then\n        set [runspeed v] to [5]\n    end\n    if <not <<<key (a v) pressed?> or <key (left arrow v) pressed?>> or <<key (d v) pressed?> or <key (right arrow v) pressed?>>>> then\n        set [runspeed v] to [0]\n    end\n    if <touching (water v)?> then\n        change x by ((runspeed) / (3))\n    else\n        change x by (runspeed)\n    end\n    if <touching (ground v)?> then\n        change y by (1)\n    end\n    if <touching (ground v)?> then\n        change y by (1)\n    end\n    if <touching (ground v)?> then\n        change y by (1)\n    end\n    if <touching (ground v)?> then\n        change y by (1)\n    end\n    if <touching (ground v)?> then\n        change y by (-4)\n        change x by ((runspeed) * (-1))\n    end\n    if <touching (water v)?> then\n        change y by ((fallspeed) / (3))\n    else\n        change y by (fallspeed)\n    end\n    set [y v] to (y position)\n    if <touching (ground v)?> then\n        change y by ((fallspeed) - ((fallspeed) * (2)))\n        set [fallspeed v] to [0]\n    end\n    change y by (-1)\n    if <<<key (up arrow v) pressed?> or <key (w v) pressed?>> and <touching (ground v)?>> then\n        set [fallspeed v] to [12]\n    end\n    change y by (1)\n    if <<<key (up arrow v) pressed?> or <key (w v) pressed?>> and <touching (water v)?>> then\n        set [fallspeed v] to [5]\n    end\n    if <(x position) > [230]> then\n        if <not <(level) = [16]>> then\n            broadcast (next v)\n            starting position\n            change [level v] by (1)\n        end\n    end\n    if <touching (obstacles v)?> then\n        broadcast (OOF v)\n        wait (0.5) seconds\n        wait until <not <touching (obstacles v)?>>\n    end\n    if <<touching (enemies v)?> and <(die) = [1]>> then\n        broadcast (OOF v)\n        wait (0.5) seconds\n        wait until <not <touching (enemies v)?>>\n    end\n    if <key (n v) pressed?> then\n        if <not <(level) = [16]>> then\n            wait until <not <key (n v) pressed?>>\n            broadcast (next v)\n            starting position\n            change [level v] by (1)\n        end\n    end\n    if <touching (trampoline v)?> then\n        broadcast (boing v)\n        set [fallspeed v] to [18]\n    end\n    if <touching (saw v)?> then\n        broadcast (OOF v)\n        wait (0.5) seconds\n        wait until <not <touching (enemies v)?>>\n    end\n    if <(y position) < [-180]> then\n        broadcast (OOF v)\n        wait (0.5) seconds\n        wait until <not <touching (enemies v)?>>\n    end\nend\n\nturn right (15) degrees\n\nwhen I receive [back v]\nstarting position\n\n@Ground\n\nwhen I receive [start v]\nshow\nforever\n    switch costume to (level)\nend\n\nwhen flag clicked\nset [level v] to [1]\nhide\n\n@Rick Astley\n\nwhen flag clicked\nhide\n\nwhen flag clicked\nforever\n    go to (my friend v)\nend\n\nwhen I receive [start v]\nset [ghost v] effect to (0)\nset [mosaic v] effect to (0)\nshow\ngo to [front v] layer\nset rotation style [left-right v]\nset size to (30) %\nforever\n    if <<<key (left arrow v) pressed?> or <key (right arrow v) pressed?>> or <<key (a v) pressed?> or <key (d v) pressed?>>> then\n        next costume\n        if <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n            point in direction (-90)\n        end\n        if <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n            point in direction (90)\n        end\n        if <(costume [number v]) < [5]> then\n            switch costume to (run1 v)\n        end\n        if <(fallspeed) = [0]> then\n        wait (0.01) seconds\n    else\n        next costume\n        if <(costume [number v]) > [4]> then\n            switch costume to (idle1 v)\n        end\n        if <(fallspeed) = [0]> then\n        wait (0.1) seconds\n    end\nend\n\nif <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n    switch costume to (jumpup v)\n    wait until <touching (ground v)?>\nend\n\nif <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n    switch costume to (jumpup v)\n    wait until <touching (ground v)?>\nend\n\nwhen I receive [oof v]\nrepeat (10)\n    change [ghost v] effect by (10)\n    change [mosaic v] effect by (10)\nend\n\nwhen I receive [back v]\nwait (0.1) seconds\nset [ghost v] effect to (0)\nset [mosaic v] effect to (0)\n\n@Decor\n\nset [level v] to [2]\n\nwhen flag clicked\nset [level v] to [1]\nhide\n\nwhen I receive [start v]\nshow\nforever\n    switch costume to (level)\nend\n\n@VectorIntro\n\nwhen flag clicked\nset size to (300) %\nshow\ngo to [front v] layer\nset [ghost v] effect to (0)\nswitch costume to (ezgif v)\nrepeat (74)\n    next costume\nend\nbroadcast (START v)\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nhide\n\nswitch costume to (ezgif v)\nset [ghost v] effect to (0)\n\n@Backdrop\n\nwhen flag clicked\n\nset [ghost v] effect to (25)\nswitch costume to (costume4 v)\nset [brightness v] effect to (0)\ngo to [back v] layer\ngo to x: (0) y: (0)\nforever\n    go to x: ((x player) / (30)) y: ((y player) / (30))\nend\n\n@Thumbnail\n\nwhen flag clicked\nforever\n    go to [front v] layer\n    set [ghost v] effect to (100)\n    show\nend\n\n@Obstacles\n\nwhen flag clicked\nforever\n    switch costume to (level)\nend\n\n@Music\n\nwhen flag clicked\nset [pitch v] effect to (0)\nforever\n    play sound [pop v] until done\nend\n\nwhen I receive [oof v]\nrepeat (10)\n    change [pitch v] effect by (-4)\nend\n\nwhen I receive [back v]\nrepeat (10)\n    change [pitch v] effect by (4)\nend\n\n@Background Effects\n\nwhen flag clicked\nhide\nforever\n    create clone of (_myself_ v)\n    wait (pick random (0.1) to (0.5)) seconds\nend\n\nwhen I start as a clone\nswitch costume to (pick random (1) to (2))\npoint in direction (90)\nset [size v] to (pick random (0.1) to (0.5))\nset [turn v] to (pick random (2.1) to (-2.1))\nset [x glide v] to (pick random (-5) to (5))\nset [y glide v] to (pick random (-5) to (5))\ngo to [back v] layer\nshow\nset [pixelate v] effect to (47)\ngo to (random position v)\nset size to (5) %\nset [ghost v] effect to (100)\nrepeat (47)\n    change x by (x glide)\n    change y by (y glide)\n    turn right (turn) degrees\n    change [pixelate v] effect by (-1)\n    change [ghost v] effect by (-1)\n    change size by (0.3)\n    change [color v] effect by (size)\nend\nrepeat (47)\n    change x by (x glide)\n    change y by (y glide)\n    turn right (turn) degrees\n    change [pixelate v] effect by (1)\n    change [ghost v] effect by (1)\n    change size by ((size) * (-1))\n    change [color v] effect by (size)\nend\ndelete this clone\n\n@Lights\n\nwhen flag clicked\ngo to [front v] layer\nshow\nforever\n    go to (my friend v)\nend\n\n@Shadow\n\nwhen flag clicked\nbroadcast (Again v)\n\ndefine assign y position\nset y to (y player)\nrepeat until <<touching (ground v)?> or >\n    change y by (-1)\nend\nchange y by (2)\n\nset y to (-30)\n\nwhen I receive [explode v]\nhide\n\nwhen I receive [oof v]\nstop [other scripts in sprite v]\nrepeat (20)\n    change [ghost v] effect by (5)\nend\n\nwhen I receive [again v]\nshow\ngo to [front v] layer\ngo [backward v] (1) layers\nset rotation style [left-right v]\nforever\n    set size to ((100) - ((distance to [rick astley v]) / (3))) %\n    set [ghost v] effect to ((30) + ((distance to [rick astley v]) / (5)))\n    set x to (x player)\n    if <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n        point in direction (-90)\n    end\n    if <<key (d v) pressed?> or <key (right arrow v) pressed?>> then\n        point in direction (90)\n    end\n    assign y position\nend\n\nwhen I receive [back v]\nbroadcast (Again v)\n\n@Sprite1\n\nset y to ((0) + ((10) * ([cos v] of (((timer) - (50)) * (300)) )))\nset x to ((0) + ((10) * ([sin v] of (((timer) - (50)) * (200)) )))\n\nwhen flag clicked\nset size to (120) %\ngo to x: (0) y: (30)\nforever\n    next costume\n    wait (0.07) seconds\nend\n\nwhen flag clicked\nset [color v] effect to (0)\nset [pixelate v] effect to (0)\npoint in direction (90)\nforever\n    go to [back v] layer\n    go [forward v] (1) layers\n    point in direction ((90) + ((5) * ([cos v] of (((timer) - (50)) * (100)) )))\n    set [ghost v] effect to (0)\nend\n\nwhen flag clicked\n\nforever\nend\n\nset size to (50) %\nset [size of arnime v] to (size)\nwait (0.2678) seconds\nset size to (70) %\nset [size of arnime v] to (size)\nwait (0.2678) seconds\n\nset [color v] effect to ((0) + ((10) * ([cos v] of (((timer) - (50)) * (300)) )))\n\nwhen I receive [oof v]\nrepeat (10)\n    change [color v] effect by (5)\n    change [pixelate v] effect by (10)\nend\n\nwhen I receive [back v]\nrepeat (10)\n    change [color v] effect by (-5)\n    change [pixelate v] effect by (-10)\nend\n\n@Death Animation\n\nwhen flag clicked\nset [ghost v] effect to (100)\n\nwhen I receive [oof v]\ngo to [front v] layer\nset x to (x player)\nswitch costume to (costume1 v)\nshow\nrepeat (5)\n    change [ghost v] effect by (-20)\n    next costume\nend\nrepeat (5)\n    change [ghost v] effect by (20)\n    next costume\nend\nbroadcast (Back v)\nwait (0.1) seconds\nset x to (x player)\nswitch costume to (costume1 v)\nrepeat (5)\n    change [ghost v] effect by (-20)\n    next costume\nend\nrepeat (5)\n    change [ghost v] effect by (20)\n    next costume\nend\n\n@Sprite2\n\nwhen flag clicked\nshow\nswitch costume to (speaker v)\ncreate clone of (_myself_ v)\ngo to x: (-186) y: (125)\nforever\n    broadcast (ShockWave v)\n    set size to (100) %\n    wait (0.2678) seconds\n    set size to (110) %\n    wait (0.2678) seconds\nend\n\nwhen I start as a clone\nshow\nswitch costume to (costume1 v)\ngo to x: (186) y: (125)\nforever\n    broadcast (ShockWave v)\n    set size to (100) %\n    wait (0.2678) seconds\n    set size to (110) %\n    wait (0.2678) seconds\nend\n\n@Rings\n\nwhen I receive [shockwave v]\nif <(OG Ring) = [1]> then\n    set [ring # v] to [1]\n    create clone of (_myself_ v)\n    set [ring # v] to [2]\n    create clone of (_myself_ v)\nend\n\nwhen flag clicked\nset size to (100) %\nset [og ring v] to [1]\nhide\n\nwhen I start as a clone\ngo to [back v] layer\nshow\nset [og ring v] to [0]\nif <(ring #) = [1]> then\n    go to x: (-186) y: (125)\n    repeat (50)\n        change size by (10)\n        change [ghost v] effect by (2)\n    end\nend\nif <(ring #) = [2]> then\n    go to x: (186) y: (125)\n    repeat (50)\n        change size by (10)\n        change [ghost v] effect by (2)\n    end\nend\ndelete this clone\n\n@notes\n\nwhen flag clicked\nhide\nforever\n    if <<<key (left arrow v) pressed?> or <key (right arrow v) pressed?>> or <<key (a v) pressed?> or <key (d v) pressed?>>> then\n        create clone of (_myself_ v)\n        wait (0.1) seconds\n    end\nend\n\nwhen I start as a clone\nset [note drift x v] to (pick random (-3) to (3))\nset [note drift y v] to (pick random (-3) to (3))\nswitch costume to (costume1 v)\nset size to (10) %\nswitch costume to (pick random (1) to (3))\ngo to (my friend v)\nset [ghost v] effect to (0)\nshow\nrepeat (20)\n    change [ghost v] effect by (5)\n    change x by (note drift x)\n    change y by (note drift y)\nend\ndelete this clone\n\n@Enemies\n\nwhen flag clicked\nset [level v] to [1]\nhide\nforever\n    if <(level) = [5]> then\n        wait (0.1) seconds\n        set [current level v] to (level)\n        spawnclone [150] [0] [3]\n        spawnclone [200] [0] [3]\n        wait until <not <(current level) = (level)>>\n    end\n    if <(level) = [6]> then\n        wait (0.1) seconds\n        set [current level v] to (level)\n        spawnclone [200] [-30] [1]\n        wait until <not <(current level) = (level)>>\n    end\n    if <(level) = [7]> then\n        wait (0.1) seconds\n        set [current level v] to (level)\n        spawnclone [200] [75] [1]\n        wait until <not <(current level) = (level)>>\n    end\n    if <(level) = [12]> then\n        wait (0.1) seconds\n        set [current level v] to (level)\n        spawnclone [-50] [0] [3]\n        spawnclone [50] [0] [3]\n        wait until <not <(current level) = (level)>>\n    end\n    if <(level) = [13]> then\n        wait (0.1) seconds\n        set [current level v] to (level)\n        spawnclone [-100] [90] [1]\n        wait until <not <(current level) = (level)>>\n    end\n    if <(level) = [14]> then\n        wait (0.1) seconds\n        set [current level v] to (level)\n        spawnclone [200] [0] [3]\n        wait until <not <(current level) = (level)>>\n    end\nend\n\ndefine spawnclone (x) (y) (type)\nset [clone type of enemy v] to (type)\ngo to x: (x) y: (y)\ncreate clone of (_myself_ v)\n\nwhen I receive [next v]\ndelete this clone\n\nwhen I start as a clone\nif <(clone type of enemy) = [1]> then\n    set rotation style [left-right v]\n    show\n    forever\n        set size to (37) %\n        point towards (my friend v)\n        if <(distance to [rick astley v]) < [300]> then\n            switch costume to (costume1 v)\n            repeat (6)\n                next costume\n            end\n            set [clone type of enemy v] to [2]\n            create clone of (_myself_ v)\n            repeat (6)\n                next costume\n            end\n            switch costume to (costume1 v)\n            wait (4) seconds\n        else\n            switch costume to (breathe v)\n            repeat (5)\n                next costume\n                wait (0.1) seconds\n            end\n        end\n    end\nend\nif <(clone type of enemy) = [2]> then\n    start sound [Low Whoosh v]\n    set [die v] to [1]\n    set rotation style [all around v]\n    switch costume to (cup v)\n    set [cup speed x v] to (((direction) / (90)) * ((distance to [my friend v]) / (9)))\n    set [cup speed y v] to ((distance to [my friend v]) / (20))\n    repeat until <<<touching (_edge_ v)?> or <touching (my friend v)?>> or <touching (ground v)?>>\n        turn right (cup speed x) degrees\n        change x by (cup speed x)\n        change y by (cup speed y)\n        set [cup speed x v] to ((cup speed x) * (0.9))\n        change [cup speed y v] by (-1)\n    end\n    set [die v] to [0]\n    delete this clone\nend\nif <(clone type of enemy) = [3]> then\n    down\n    set rotation style [left-right v]\n    show\n    forever\n        set size to (100) %\n        start sound [Jump v]\n        point in direction (90)\n        switch costume to (costume9 v)\n        if <(x player) > (x position)> then\n            set [die v] to [1]\n            set [blobspeed x v] to [5]\n            set [blobspeed y v] to [10]\n            repeat until <touching (ground v)?>\n                change x by (blobspeed x)\n                change y by (blobspeed y)\n                change [blobspeed y v] by (-1)\n                set [blobspeed x v] to ((blobspeed x) * (0.9))\n                if <(costume [number v]) = [33]> then\n                    switch costume to (costume9 v)\n                end\n            end\n            change y by (1)\n            switch costume to (costume9 v)\n        end\n        if <(x position) > (x player)> then\n            set [die v] to [1]\n            set [blobspeed x v] to [-5]\n            set [blobspeed y v] to [10]\n            repeat until <touching (ground v)?>\n                change x by (blobspeed x)\n                change y by (blobspeed y)\n                change [blobspeed y v] by (-1)\n                set [blobspeed x v] to ((blobspeed x) * (0.9))\n                if <(costume [number v]) = [33]> then\n                    switch costume to (costume9 v)\n                end\n            end\n        end\n        set [die v] to [0]\n        switch costume to (costume9 v)\n        UP\n        wait (pick random (1) to (4)) seconds\n    end\nend\n\ndefine UP\nrepeat until <not <touching (ground v)?>>\n    change y by (2)\nend\n\n\n\nwhen I start as a clone\nforever\n    if <touching (_edge_ v)?> then\n        delete this clone\n    end\nend\n\nnext costume\n\nnext costume\n\nswitch costume to (costume25 v)\nswitch costume to (costume25 v)\n\ndefine down\n\nrepeat until <touching (ground v)?>\n    change y by (-1)\nend\nchange y by (2)\n\nwhen I receive [oof v]\nset [current level v] to [0]\ndelete this clone\n\n@Saw\n\nwhen flag clicked\n\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\nforever\n    if <(level) = [1]> then\n        hide\n    end\n    if <(level) = [2]> then\n        hide\n    end\n    if <(level) = [3]> then\n        hide\n    end\n    if <(level) = [4]> then\n    if <(level) = [5]> then\n    if <(level) = [6]> then\n    if <(level) = [7]> then\n    if <(level) = [8]> then\n    if <(level) = [9]> then\n        go to x: (60) y: (10)\n        next costume\n        show\n    end\n    if <(level) = [10]> then\n        hide\n    end\n    if <(level) = [11]> then\n        go to x: (-160) y: (-70)\n        next costume\n        show\n    end\n    if <(level) = [12]> then\n        hide\n    end\n    if <(level) = [13]> then\n    if <(level) = [14]> then\n    if <(level) = [15]> then\n        go to x: (80) y: (-63)\n        next costume\n        show\n    end\n    if <(level) = [16]> then\n        hide\n    end\nend\n\nwhen flag clicked\ncreate clone of (_myself_ v)\nforever\n    if <(level) = [1]> then\n        hide\n    end\n    if <(level) = [2]> then\n        hide\n    end\n    if <(level) = [3]> then\n        go to x: (36) y: (-45)\n        next costume\n        show\n    end\n    if <(level) = [4]> then\n        hide\n    end\n    if <(level) = [5]> then\n    if <(level) = [6]> then\n    if <(level) = [7]> then\n    if <(level) = [8]> then\n    if <(level) = [9]> then\n        go to x: (-60) y: (10)\n        next costume\n        show\n    end\n    if <(level) = [10]> then\n        hide\n    end\n    if <(level) = [11]> then\n    if <(level) = [12]> then\n    if <(level) = [13]> then\n    if <(level) = [14]> then\n        go to x: (-50) y: (-45)\n        next costume\n        show\n    end\n    if <(level) = [15]> then\n        go to x: (-80) y: (-63)\n        next costume\n        show\n    end\n    if <(level) = [16]> then\n        hide\n    end\nend\n\n@Trampoline\n\nwhen I start as a clone\nforever\n    if <(level) = [1]> then\n        hide\n    end\n    if <(level) = [2]> then\n        hide\n    end\n    if <(level) = [3]> then\n        hide\n    end\n    if <(level) = [4]> then\n        hide\n    end\n    if <(level) = [5]> then\n        hide\n    end\n    if <(level) = [6]> then\n        hide\n    end\n    if <(level) = [7]> then\n        hide\n    end\n    if <(level) = [8]> then\n        go to x: (100) y: (-63)\n        show\n    end\n    if <(level) = [9]> then\n        hide\n    end\n    if <(level) = [10]> then\n        hide\n    end\n    if <(level) = [11]> then\n        hide\n    end\n    if <(level) = [12]> then\n        hide\n    end\n    if <(level) = [13]> then\n        hide\n    end\n    if <(level) = [14]> then\n        hide\n    end\n    if <(level) = [15]> then\n    if <(level) = [16]> then\nend\n\nwhen I receive [boing v]\nstart sound [Big Boing v]\nswitch costume to (costume4 v)\nrepeat (13)\n    next costume\nend\nswitch costume to (costume4 v)\n\nwhen flag clicked\nswitch costume to (costume4 v)\ncreate clone of (_myself_ v)\nforever\n    if <(level) = [1]> then\n        hide\n    end\n    if <(level) = [2]> then\n        hide\n    end\n    if <(level) = [3]> then\n        hide\n    end\n    if <(level) = [4]> then\n        go to x: (-50) y: (-70)\n        show\n    end\n    if <(level) = [5]> then\n        hide\n    end\n    if <(level) = [6]> then\n        hide\n    end\n    if <(level) = [7]> then\n        go to x: (-150) y: (-57)\n        show\n    end\n    if <(level) = [8]> then\n        go to x: (-100) y: (-63)\n        show\n    end\n    if <(level) = [9]> then\n        go to x: (-150) y: (-80)\n        show\n    end\n    if <(level) = [10]> then\n        hide\n    end\n    if <(level) = [11]> then\n        hide\n    end\n    if <(level) = [12]> then\n        hide\n    end\n    if <(level) = [13]> then\n        go to x: (100) y: (-60)\n        show\n    end\n    if <(level) = [14]> then\n        show\n        go to x: (100) y: (-60)\n    end\n    if <(level) = [15]> then\n        hide\n    end\n    if <(level) = [16]> then\nend\n\n
              —  {]  Rick Astley Platformer  [} —       \n_________________________________________________     \n- Welcome to my favorite project EVER\n- Controls: WASD, Arrow Keys, and N to skip\n- RickRoll your friends, me and anybody on scratch with the newest and best thing since the original song. Just make sure to tell them its not advertising lol.\n_________________________________________________\nI made this project because me and my choir rick-rolled my entire school with this song at senior chapel. I though about an awesome way to interact with all ya'll and decided on this. \n_________________________________________________\n        \n          ✅ Please follow @Capt_Boanerges for \n                             more cool games!\n                Also consider subbing to me on yt https://www.youtube.com/channel/UCNh18K3f8Xii1uf7rqFoOMQ\n\n#Games #All #Capt_Boanerges #SavingNature #Griffpatch #RickAstley #Platformer #Tycoon