~ Scratch 3.0 Platformer ~

Instructions: ~ Welcome to Scratch 3.0 Platformer! ~\n\nUse the arrow keys to move.\nSome of the levels may be difficult, but none of them are impossible! \nPress f to turn the falling blocks off, and n to turn them back on.\n\nThis game is heavily based off of one of my older projects, Scratch Day Platformer (link: https://scratch.mit.edu/projects/220952936/)\nI really enjoyed making this sequel and I hope you enjoy it too!\n

@Stage\n\nwhen flag clicked\nforever\n    play sound [Tune01 v] until done\nend\n\n@Confetti\n\nwhen I start as a clone\nset size to (pick random (25) to (50)) %\ngo [backward v] (100) layers\nswitch costume to (pick random (1) to (4))\ngo to x: (pick random (-235) to (195)) y: (180)\nshow\nrepeat until <(y position) < [-175]>\n    turn right (pick random (5) to (15)) degrees\n    change y by (-10)\nend\ndelete this clone\n\nwhen flag clicked\nhide variable [falling? v]\nFalling Blocks\n\ndefine Falling Blocks\nset [falling? v] to [1]\ngo [backward v] (500) layers\nrepeat until <key (f v) pressed?>\n    create clone of (_myself_ v)\n    wait (0.1) seconds\nend\nset [falling? v] to [0]\nstop [this script v]\n\nwhen [n v] key pressed\nif <not <(Falling?) = [1]>> then\n    Falling Blocks\nend\n\n@Thumbnail!\n\nwhen flag clicked\ngo [backward v] (-5) layers\ngo to [front v] layer\ngo to [front v] layer\ngo to [front v] layer\ngo to [front v] layer\ngo to [front v] layer\ngo to [front v] layer\ngo to [front v] layer\ngo to [front v] layer\ngo to [front v] layer\ngo to [front v] layer\ngo to x: (0) y: (0)\nclear graphic effects\nrepeat (10)\n    change [ghost v] effect by (25)\nend\nset [ghost v] effect to (100)\ngo to [front v] layer\ngo to [front v] layer\ngo to [front v] layer\ngo to [front v] layer\ngo to [front v] layer\ngo to [front v] layer\ngo to [front v] layer\ngo to [front v] layer\ngo to [front v] layer\ngo to [front v] layer\nshow\nswitch costume to (costume1 v)\n\n@Edge\n\nwhen flag clicked\nswitch costume to (costume1 v)\ngo to x: (0) y: (0)\n\nwhen I receive [next level v]\nnext costume\n\n@Story\n\nwhen flag clicked\nswitch costume to (1 v)\ngo to [front v] layer\ngo to [front v] layer\ngo to [front v] layer\ngo [backward v] (1) layers\nshow\ngo to x: (0) y: (0)\nwait until <key (space v) pressed?>\nhide\nbroadcast (Start v)\n\nwhen I receive [gobo desert v]\nswitch costume to (2 v)\nshow\nwait until <key (space v) pressed?>\nhide\n\nwhen I receive [gobo desert v]\nwait (1) seconds\nbroadcast (Lvl 6 v)\nstop [this script v]\n\nwhen I receive [script canyon v]\nswitch costume to (3 v)\nshow\nwait until <key (space v) pressed?>\nhide\n\nwhen I receive [script canyon v]\nwait (1) seconds\nbroadcast (Lvl 11 v)\nstop [this script v]\n\nwhen I receive [neigh dilemma v]\nwait (1) seconds\nbroadcast (Lvl 16 v)\nstop [this script v]\n\nwhen I receive [neigh dilemma v]\nswitch costume to (4 v)\nshow\nwait until <key (any v) pressed?>\nif <<key (1 v) pressed?> or <<key (3 v) pressed?> or <<key (5 v) pressed?> or <<key (7 v) pressed?> or <key (9 v) pressed?>>>>> then\n    broadcast (Continue; Neigh v)\nelse\n    if <<key (2 v) pressed?> or <<key (4 v) pressed?> or <<key (6 v) pressed?> or <<key (8 v) pressed?> or <key (0 v) pressed?>>>>> then\n        broadcast (Continue; Gobo's Friends v)\n    end\nend\nhide\n\nwhen I receive [thanks for playing! v]\nshow\nswitch costume to (5 v)\n\n@Platform\n\nwhen flag clicked\ngo to x: (0) y: (0)\nswitch costume to (backdrop1 v)\n\nwhen I receive [lvl 6 v]\nswitch costume to (backdrop6 v)\n\nwhen I receive [next level v]\nif <(costume [number v]) = [5]> then\n    broadcast (Gobo Desert v)\nelse\n    if <(costume [number v]) = [10]> then\n        broadcast (Script Canyon v)\n    else\n        if <(costume [number v]) = [15]> then\n            broadcast (Neigh Dilemma v)\n        else\n            if <(costume [number v]) = [20]> then\n                broadcast (Thanks for Playing! v)\n            else\n                next costume\n            end\n        end\n    end\nend\n\nwhen I receive [lvl 11 v]\nswitch costume to (backdrop11 v)\n\nwhen I receive [lvl 16 v]\nswitch costume to (backdrop16 v)\n\n@Character\n\nwhen I receive [start v]\nset rotation style [left-right v]\ngo to x: (-200) y: (-85)\nswitch costume to (neigh pony v)\nset size to (50) %\nshow\nset [x v] to [0]\nset [y v] to [0]\nforever\n    change [y v] by (-1)\n    if <key (left arrow v) pressed?> then\n        point in direction (-90)\n        change [x v] by (-1)\n    end\n    if <key (right arrow v) pressed?> then\n        point in direction (90)\n        change [x v] by (1)\n    end\n    set [x v] to ((x) * (0.9))\n    change x by (x)\n    if <touching color (#ffae28)?> then\n        change y by (1)\n    end\n    if <touching color (#ffae28)?> then\n        change y by (1)\n    end\n    if <touching color (#ffae28)?> then\n        change y by (1)\n    end\n    if <touching color (#ffae28)?> then\n        change y by (1)\n    end\n    if <touching color (#ffae28)?> then\n        change y by (-4)\n        change x by ((x) * (-1))\n        if <key (up arrow v) pressed?> then\n            set [y v] to [15]\n            if <([abs v] of (x) ) = (x)> then\n                set [x v] to [-10]\n            else\n                set [x v] to [10]\n            end\n        else\n            set [x v] to [0]\n        end\n    end\n    change y by (y)\n    if <touching color (#ffae28)?> then\n        change y by ((y) - ((y) * (2)))\n        set [y v] to [0]\n    end\n    change y by (-1)\n    if <<key (up arrow v) pressed?> and <touching color (#ffae28)?>> then\n        set [y v] to [15]\n    end\n    change y by (1)\n    if <touching color (#43b8ff)?> then\n        if <([costume # v] of [platform v]) = [13]> then\n            go to x: (-200) y: (115)\n        else\n            go to x: (-200) y: (-85)\n        end\n    end\n    if <touching (edge v)?> then\n        broadcast (Next Level v)\n        go to x: (-200) y: (-85)\n    end\n    if <touching color (#336423)?> then\n        set [y v] to [25]\n    end\nend\n\nwhen I receive [lvl 6 v]\nwait until <key (space v) pressed?>\nwait until <key (space v) pressed?>\ngo to x: (-200) y: (-85)\npoint in direction (90)\n\nwhen I receive [lvl 11 v]\nswitch costume to (carry v)\nwait until <key (space v) pressed?>\ngo to x: (-200) y: (-85)\npoint in direction (90)\nwait until <([costume # v] of [platform v]) = [13]>\ngo to x: (-200) y: (115)\n\nwhen I receive [continue; gobo's friends v]\nswitch costume to (carry v)\n\nwhen I receive [continue; neigh v]\nswitch costume to (neigh pony v)\n\nwhen I receive [lvl 16 v]\nwait until <key (any v) pressed?>\ngo to x: (-200) y: (-85)\npoint in direction (90)\n\nwhen I receive [continue; gobo's friends v]\nswitch costume to (carry v)\n\n@Moving Platform\n\nwhen flag clicked\ngo to x: (0) y: (0)\nswitch costume to (costume1 v)\nhide\nwait until <([costume # v] of [platform v]) = [15]>\nshow\nrepeat until <([costume # v] of [platform v]) = [16]>\n    turn right (1) degrees\nend\n\nwhen flag clicked\nwait until <([costume # v] of [platform v]) = [16]>\ngo to x: (60) y: (20)\npoint in direction (90)\nswitch costume to (costume2 v)\nrepeat until <([costume # v] of [platform v]) = [17]>\n    Fade\nend\n\ndefine Fade\nswitch costume to (costume2 v)\nwait (0.1) seconds\nswitch costume to (costume3 v)\nwait (0.1) seconds\nswitch costume to (costume4 v)\nwait (0.1) seconds\nswitch costume to (costume5 v)\nwait (0.1) seconds\nswitch costume to (costume6 v)\nwait (0.1) seconds\nswitch costume to (costume5 v)\nwait (0.1) seconds\nswitch costume to (costume4 v)\nwait (0.1) seconds\nswitch costume to (costume3 v)\nwait (0.1) seconds\nswitch costume to (costume2 v)\nwait (2) seconds\n\nwhen flag clicked\nwait until <([costume # v] of [platform v]) = [18]>\nhide\n\nwhen flag clicked\nwait until <([costume # v] of [platform v]) = [19]>\ngo to x: (0) y: (0)\nshow\nswitch costume to (costume2 v)\nrepeat until <([costume # v] of [platform v]) = [20]>\n    Fade\nend\n\nwhen flag clicked\nwait until <([costume # v] of [platform v]) = [19]>\nshow\nrepeat until <([costume # v] of [platform v]) = [20]>\n    repeat (48)\n        change x by (-10)\n    end\n    repeat (48)\n        change x by (10)\n    end\nend\n\nwhen flag clicked\nwait until <([costume # v] of [platform v]) = [20]>\nhide\n\nwhen flag clicked\nwait until <([costume # v] of [platform v]) = [17]>\nhide\n\n@Falling Dots\n\nwhen I start as a clone\nset size to (pick random (50) to (100)) %\ngo to [front v] layer\ngo to [front v] layer\nswitch costume to (costume1 v)\ngo to x: (pick random (-235) to (195)) y: (180)\nshow\nrepeat until <(y position) < [-175]>\n    change y by (-10)\nend\ndelete this clone\n\nwhen flag clicked\ngo to [front v] layer\ngo to [front v] layer\nwait until <([costume # v] of [platform v]) = [20]>\nforever\n    create clone of (_myself_ v)\n    wait (0.25) seconds\nend\n\nwhen flag clicked\nwait until <([costume # v] of [story v]) = [5]>\nstop [other scripts in sprite v]\nstop [this script v]\n\n@Scratch Cat\n\nwhen flag clicked\nhide\nset size to (125) %\n\nwhen I receive [thanks for playing! v]\ngo to [front v] layer\nshow\ngo to x: (0) y: (-110)\nforever\n    switch costume to (cat1-a v)\n    wait (0) seconds\n    switch costume to (cat1-a2 v)\n    wait (0) seconds\n    switch costume to (cat1-a3 v)\n    wait (0) seconds\n    switch costume to (cat1-a4 v)\n    wait (0) seconds\n    switch costume to (cat1-a3 v)\n    wait (0) seconds\n    switch costume to (cat1-a2 v)\n    wait (0) seconds\n    switch costume to (cat1-a v)\n    wait (0) seconds\nend\n\n@Moving Platform2\n\nwhen flag clicked\nwait until <([costume # v] of [platform v]) = [17]>\ngo to x: (180) y: (0)\ngo [backward v] (1) layers\ngo [backward v] (1) layers\nswitch costume to (costume7 v)\nshow\nrepeat until <([costume # v] of [platform v]) = [18]>\n    repeat (48)\n        change x by (-10)\n    end\n    repeat (48)\n        change x by (10)\n    end\nend\n\nwhen flag clicked\nwait until <([costume # v] of [platform v]) = [18]>\nhide\n\nwhen flag clicked\nhide\n\n