Radiant - A platformer || #All #Games #Trending #Art #Platformer #All

Instructions: Radiant - a platformer! This is my entry for @Mon_guillon 's contest!\n------------\nIn this platformer you can move back into previous levels, and collect items to help you win. The goal is to collect all 5 coins in the map.\nUse WASD or arrow keys\nJump when touching orbs to get a special boost\nIf it is lagging, turn off effects it helps a lot\n------------\n\nCredit to @griffpatch for the level changing script and backing out script, mine was too laggy :/\nThe orb's colour schemes are from Geometry Dash.\nAlso credit to YouTube audio library for the soundtrack.\n\nNo advertisements please!\n\nUpdates: \nv1.0 - Game release\nv1.1 - Fixed the clone issue with the menus\nv1.2 - Made a difficulty setting\n\nhttps://scratch.mit.edu/projects/679750740/remixtree

@Stage\n\nwhen flag clicked\nforever\n    play sound [1 v] until done\nend\n\nwhen flag clicked\nforever\n    if <[0] = (Music?)> then\n        set volume to (0) %\n    else\n        set volume to (Volume) %\n    end\nend\n\n@Game\n\ndefine fixlevel\nrepeat ((3) - (length of (LEVEL)))\n    set [level v] to (join [0] (LEVEL))\nend\n\nwhen flag clicked\nif <<(username) = [griffpatch_tutor]> or <(username) = [griffpatch]>> then\n    set [☁ viewed by griffpatch? v] to [1]\nend\nset [level v] to [001]\nforever\n    tick\nend\n\ndefine tick\nfixlevel\nset [hazard speed v] to ((Difficulty) / (3))\nset [hazard speed 2 v] to ((Difficulty) * (3))\n\n@Player\n\ndefine movement (v)\nchange [falling speed v] by (1)\nrepeat (v)\n    set [last value v] to (x position)\n    change x by ((xv) / (v))\n    checkCollision\n    if <[0] < (touching)> then\n        set x to (last value)\n        set [xv v] to [0]\n    end\n    set [last value v] to (y position)\n    change y by ((yv) / (v))\n    checkCollision\n    if <[0] < (touching)> then\n        if <(GRAVITY) = [-1]> then\n            set y to (last value)\n            if <(yv) < [0]> then\n                set [falling speed v] to [0]\n            end\n            set [yv v] to [0]\n        else\n            set y to (last value)\n            if <[0] < (yv)> then\n                set [falling speed v] to [0]\n            end\n            set [yv v] to [0]\n        end\n    end\nend\n\ndefine cloneTICK\nif <(username) = [ZanbarBone]> then\n    switch costume to (costume4 v)\nelse\n    switch costume to (costume2 v)\nend\ngo to (join [Player] [])\nif <[1] = (game started?)> then\n    if <[1] = (menu?)> then\n        hide\n    else\n        show\n    end\nelse\n    hide\nend\nif <touching color (#fff400)?> then\n    set [colour v] to [yellow]\nelse\n    if <touching color (#00e2ff)?> then\n        set [colour v] to [aqua]\n    else\n        if <touching color (#18ff00)?> then\n            set [colour v] to [green]\n        else\n            set [colour v] to []\n        end\n    end\nend\n\nwhen I start as a clone\nclear graphic effects\ngo to [front v] layer\nswitch costume to (costume2 v)\nset rotation style [all around v]\nforever\n    turn right (((xv) * ((groundFRICTION) * (3))) * ((GRAVITY) * (-1))) degrees\n    cloneTICK\nend\n\ndefine checkCollision\nif <<touching (levels v)?> or <touching (locked v)?>> then\n    if <<[0] = (Key collected)> and <touching (locked v)?>> then\n        set [touching v] to [0]\n    else\n        set [touching v] to [1]\n    end\nelse\n    set [touching v] to [0]\nend\n\ndefine controls\nif <<<key (up arrow v) pressed?> or <key (w v) pressed?>> and <(Falling speed) < [4]>> then\n    set [yv v] to ((jump force) * ((GRAVITY) * (-1)))\nend\nif <[0] = (dashing)> then\n    change [yv v] by ((gravityV) * (GRAVITY))\nend\nif <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n    change [xv v] by ((speed) * (-1))\nend\nif <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n    change [xv v] by (speed)\nend\nset [xv v] to ((xv) * (groundFRICTION))\n\ndefine tick\ncontrols\nmovement (([abs v] of (xv) ) + ([abs v] of (yv) ))\nif <touching (hazards v)?> then\n    broadcast (oops i ded  v)\n    reset\nend\nset [particle yv v] to (yv)\n\ndefine change level (level) go to x, y (x) (y)\nset [level v] to (level)\nif <[] < (x)> then\n    set x to (x)\nend\nif <[] < (y)> then\n    set y to (y)\nend\nwait () seconds\nbroadcast (change level v)\nwait () seconds\nstop [other scripts in sprite v]\nwait () seconds\nif <[] < (x)> then\n    back out [0]\nelse\n    back out [90]\nend\nbroadcast (Start v)\n\ndefine back out (dir)\nset [temporary direction v] to (direction)\nset [distance v] to [1]\npoint in direction (dir)\nrepeat (64)\n    checkCollision\n    if <(touching) < [1]> then\n        point in direction (temporary direction)\n        stop [this script v]\n    end\n    move (distance) steps\n    turn left (180) degrees\n    change [distance v] by (1)\nend\nstop [this script v]\n\nwhen I receive [start v]\nif <[1] = [1]> then\n    delete this clone\nend\ncreate clone of (_myself_ v)\nforever\n    tick\nend\n\nwhen flag clicked\nswitch costume to (costume3 v)\ncreate clone of (_myself_ v)\nset [ghost v] effect to (100)\npoint in direction (90)\nset [level v] to [001]\nbroadcast (change level v)\ngo to x: (-120) y: (-80)\nset [jump force v] to [15]\nset [groundfriction v] to [0.8]\nset [gravityv v] to [1.5]\nset [gravity v] to [-1]\nset [xv v] to [0]\nset [yv v] to [0]\n\nwhen I receive [start v]\nforever\n    if <(x position) > [235]> then\n        change level ((LEVEL) + (1)) go to x, y [-230] []\n    end\n    if <[-235] > (x position)> then\n        change level ((LEVEL) - (1)) go to x, y [230] []\n    end\n    if <(y position) > [180]> then\n        change level ((LEVEL) + (100)) go to x, y [] [-170]\n    end\n    if <[-180] > (y position)> then\n        change level ((LEVEL) - (100)) go to x, y [] [170]\n    end\nend\n\ndefine orbs movement\nif <not <<key (up arrow v) pressed?> or <key (w v) pressed?>>> then\n    set [dashing v] to [0]\n    set [gravityv v] to [1.5]\nend\nif <<<key (up arrow v) pressed?> or <key (w v) pressed?>> and <[aqua] = (colour)>> then\n    set [yv v] to [0]\n    if <(GRAVITY) = [-1]> then\n        set [gravity v] to [1]\n    else\n        set [gravity v] to [-1]\n    end\n    wait until <not <<key (up arrow v) pressed?> or <key (w v) pressed?>>>\nend\nif <<<key (up arrow v) pressed?> or <key (w v) pressed?>> and <[green] = (colour)>> then\n    set [dashing v] to [1]\n    set [yv v] to [0]\n    set [gravityv v] to [0]\nend\nif <<<key (up arrow v) pressed?> or <key (w v) pressed?>> and <[yellow] = (colour)>> then\n    set [yv v] to ((jump force) * ((GRAVITY) * (-1.1)))\n    wait until <not <<key (up arrow v) pressed?> or <key (w v) pressed?>>>\nend\n\nwhen I receive [start v]\nforever\n    orbs movement\nend\n\ndefine reset\nset [level v] to [001]\nbroadcast (change level v)\ngo to x: (-120) y: (-80)\nset [xv v] to [0]\nset [yv v] to [0]\n\n@Levels\n\nwhen I receive [change level v]\nswitch costume to (join [level] (LEVEL))\n\ngo [forward v] (10) layers\n\n@LevelsDeco\n\nwhen I receive [change level v]\nswitch costume to (join [level] (LEVEL))\n\n@Hazards\n\nwhen I receive [change level v]\nswitch costume to (join [level] (LEVEL))\ngo to x: (0) y: (0)\n\nwhen I receive [start v]\nshow\nforever\n    if <(costume [name v]) = [level002]> then\n        go to x: (0) y: (0)\n        set [v v] to [-1]\n        repeat until <(y position) < [-164]>\n            change y by (v)\n            change [v v] by ((hazard speed) * (-1))\n        end\n        set [v v] to [1]\n        wait (0.2) seconds\n        repeat until <[-1] < (y position)>\n            change y by (v)\n            change [v v] by (hazard speed)\n        end\n        wait (0.2) seconds\n    else\n        if <(costume [name v]) = [level003]> then\n            go to x: (0) y: (0)\n            set [v v] to [-1]\n            repeat until <(y position) < [-160]>\n                change y by (v)\n                change [v v] by ((hazard speed) * (-1))\n            end\n            set [v v] to [1]\n            repeat until <[-1] < (y position)>\n                change y by (v)\n                change [v v] by (hazard speed)\n            end\n        else\n            go to x: (0) y: (0)\n        end\n    end\nend\n\nwhen flag clicked\nhide\n\nwhen I receive [hidemenu v]\nshow\n\nwhen I receive [options v]\nhide\n\n@Orbs\n\nwhen I receive [change level v]\nturbo\n\ndefine turbo\nrepeat until <(LEVEL) = (costume [name v])>\n    next costume\nend\n\nwhen flag clicked\nrepeat (10)\n    hide\nend\n\nwhen I receive [start v]\nshow\n\nwhen I receive [options v]\nhide\n\nwhen I receive [hidemenu v]\nshow\n\n@Sprite2\n\nwhen flag clicked\nset [game started? v] to [0]\nset [menu? v] to [1]\nbroadcast (Menu v)\n\nwhen I start as a clone\ngo to x: (0) y: (0)\nif <[1] = (costume [number v])> then\n    forever\n        go to x: ((mouse x) * (0.2)) y: ((mouse y) * (0.2))\n    end\nend\nif <[Start] = (costume [name v])> then\n    forever\n        set y to (-25)\n        if <touching (mouse-pointer v)?> then\n            set [brightness v] effect to (0)\n            set size to (100) %\n            repeat (2)\n                change size by (10)\n                set [brightness v] effect to (-10)\n            end\n            set [brightness v] effect to (-20)\n            set size to (120) %\n            wait until <not <touching (mouse-pointer v)?>>\n            repeat (2)\n                change size by (-10)\n                set [brightness v] effect to (10)\n            end\n        else\n            set [brightness v] effect to (0)\n            set size to (100) %\n        end\n    end\nend\nif <[Options] = (costume [name v])> then\n    forever\n        set y to (-110)\n        if <touching (mouse-pointer v)?> then\n            set [brightness v] effect to (0)\n            set size to (100) %\n            repeat (2)\n                change size by (10)\n                set [brightness v] effect to (-10)\n            end\n            set [brightness v] effect to (-20)\n            set size to (120) %\n            wait until <not <touching (mouse-pointer v)?>>\n            repeat (2)\n                change size by (-10)\n                set [brightness v] effect to (10)\n            end\n        else\n            set [brightness v] effect to (0)\n            set size to (100) %\n        end\n    end\nend\n\nwhen I receive [start v]\nhide\ndelete this clone\n\nwhen I receive [options v]\nhide\ndelete this clone\n\nwhen I receive [menu v]\nshow\nswitch costume to (movingbg v)\ncreate clone of (_myself_ v)\nswitch costume to (start v)\ncreate clone of (_myself_ v)\nswitch costume to (options v)\ncreate clone of (_myself_ v)\nswitch costume to (costume2 v)\nforever\n    if <touching (mouse-pointer v)?> then\n        set [brightness v] effect to (0)\n        set size to (100) %\n        repeat (2)\n            change size by (5)\n        end\n        set size to (110) %\n        wait until <not <touching (mouse-pointer v)?>>\n        repeat (2)\n            change size by (-5)\n        end\n    else\n        set size to (100) %\n    end\n    go to x: (0) y: (95)\n    show\nend\n\nwhen I receive [menu v]\ndelete this clone\n\nwhen I start as a clone\nif <[Start] = (costume [name v])> then\n    forever\n        if <(game started?) = [0]> then\n            if <<mouse down?> and <touching (mouse-pointer v)?>> then\n                set [level v] to [001]\n                set [game started? v] to [1]\n                set [menu? v] to [0]\n                broadcast (Start v)\n            end\n        end\n    end\nend\nif <[Options] = (costume [name v])> then\n    forever\n        if <(game started?) = [0]> then\n            if <<mouse down?> and <touching (mouse-pointer v)?>> then\n                broadcast (Options v)\n            end\n        end\n    end\nend\n\nwhen I receive [start v]\nhide\nstop [other scripts in sprite v]\n\n@Options menu2\n\nwhen flag clicked\nswitch costume to (gear v)\ncreate clone of (_myself_ v)\nswitch costume to (button v)\nhide\nforever\n    if <<touching (mouse-pointer v)?> and <mouse down?>> then\n        broadcast (Options v)\n        hide\n    end\nend\n\nwhen I receive [start v]\nshow\n\nwhen I receive [hidemenu v]\nshow\n\nwhen I start as a clone\ngo to [front v] layer\nhide\nforever\n    if <touching (mouse-pointer v)?> then\n        point in direction (90)\n        repeat (5)\n            turn right (12) degrees\n        end\n        wait until <not <touching (mouse-pointer v)?>>\n        repeat (5)\n            turn left (12) degrees\n        end\n    end\nend\n\nwhen I receive [options v]\nhide\n\n@Options menu\n\nwhen flag clicked\nset [background? v] to [1]\nset [sound effects? v] to [1]\nset [effects? v] to [1]\nset [music? v] to [1]\nset [volume v] to [50]\nset [difficulty v] to [2]\n\nwhen I start as a clone\ngo to x: (0) y: (0)\nif <[1] = (costume [number v])> then\n    forever\n        go to x: ((mouse x) * (0.2)) y: ((mouse y) * (0.2))\n    end\nend\nif <[Back] = (costume [name v])> then\n    forever\n        if <touching (mouse-pointer v)?> then\n            set [brightness v] effect to (-20)\n            if <not <(size) = [110]>> then\n                repeat (2)\n                    change size by (2)\n                end\n            end\n            set size to (110) %\n            if <mouse down?> then\n                if <(game started?) = [0]> then\n                    broadcast (Menu v)\n                else\n                    set [menu? v] to [0]\n                    broadcast (hidemenu v)\n                end\n            end\n        else\n            set [brightness v] effect to (0)\n            set size to (100) %\n        end\n        go to x: (-166) y: (140)\n    end\nend\n\nwhen I receive [start v]\nhide\nhide variable [background? v]\nhide variable [volume v]\nhide variable [sound effects? v]\nhide variable [music? v]\nhide variable [effects? v]\nhide variable [fps v]\nhide variable [coins collected v]\nhide variable [difficulty v]\ndelete this clone\n\nwhen I receive [menu v]\nhide\nhide variable [background? v]\nhide variable [volume v]\nhide variable [sound effects? v]\nhide variable [music? v]\nhide variable [effects? v]\nhide variable [fps v]\nhide variable [coins collected v]\nhide variable [difficulty v]\ndelete this clone\n\nwhen I receive [options v]\nshow\nshow variable [background? v]\nshow variable [volume v]\nshow variable [sound effects? v]\nshow variable [music? v]\nshow variable [effects? v]\nshow variable [fps v]\nshow variable [coins collected v]\nshow variable [difficulty v]\nset [menu? v] to [1]\nshow\nswitch costume to (movingbg v)\ncreate clone of (_myself_ v)\nswitch costume to (back v)\ncreate clone of (_myself_ v)\nswitch costume to (start v)\nforever\n    go to x: (0) y: (0)\nend\n\nwhen I receive [hidemenu v]\nhide\nhide variable [background? v]\nhide variable [volume v]\nhide variable [sound effects? v]\nhide variable [music? v]\nhide variable [effects? v]\nhide variable [fps v]\nhide variable [coins collected v]\nhide variable [difficulty v]\ndelete this clone\n\n@Ring effect\n\nwhen flag clicked\nforever\n    if <[1] = (Effects?)> then\n        hide\n        go to (player v)\n        if <<(colour) = [Aqua]> and <<key (w v) pressed?> or <key (up arrow v) pressed?>>> then\n            switch costume to (aqua v)\n            if <(Sound effects?) = [1]> then\n                start sound [C2 Elec Bass v]\n            end\n            create clone of (_myself_ v)\n            wait until <not <<key (w v) pressed?> or <key (up arrow v) pressed?>>>\n        end\n        if <<(colour) = [yellow]> and <<key (w v) pressed?> or <key (up arrow v) pressed?>>> then\n            switch costume to (yellow v)\n            if <(Sound effects?) = [1]> then\n                start sound [E Elec Bass v]\n            end\n            create clone of (_myself_ v)\n            wait until <not <<key (w v) pressed?> or <key (up arrow v) pressed?>>>\n        end\n        if <<(colour) = [Green]> and <<key (w v) pressed?> or <key (up arrow v) pressed?>>> then\n            switch costume to (green v)\n            if <(Sound effects?) = [1]> then\n                start sound [A Elec Bass v]\n            end\n            create clone of (_myself_ v)\n            wait until <not <<key (w v) pressed?> or <key (up arrow v) pressed?>>>\n        end\n    else\n        hide\n        if <<(colour) = [Aqua]> and <<key (w v) pressed?> or <key (up arrow v) pressed?>>> then\n            if <(Sound effects?) = [1]> then\n                start sound [C2 Elec Bass v]\n            end\n            wait until <not <<key (w v) pressed?> or <key (up arrow v) pressed?>>>\n        end\n        if <<(colour) = [Yellow]> and <<key (w v) pressed?> or <key (up arrow v) pressed?>>> then\n            if <(Sound effects?) = [1]> then\n                start sound [E Elec Bass v]\n            end\n            wait until <not <<key (w v) pressed?> or <key (up arrow v) pressed?>>>\n        end\n        if <<(colour) = [Green]> and <<key (w v) pressed?> or <key (up arrow v) pressed?>>> then\n            if <(Sound effects?) = [1]> then\n                start sound [A Elec Bass v]\n            end\n            wait until <not <<key (w v) pressed?> or <key (up arrow v) pressed?>>>\n        end\n    end\nend\n\nwhen I start as a clone\nshow\nset size to (50) %\nset [ghost v] effect to (0)\nrepeat (10)\n    change [ghost v] effect by (10)\n    change size by (15)\nend\ndelete this clone\n\n@bg\n\nwhen flag clicked\ncreate clone of (_myself_ v)\nswitch costume to (costume1 v)\ngo to [back v] layer\nforever\n    repeat (10)\n        change x by (5.6)\n    end\n    go to x: () y: ()\nend\n\nwhen flag clicked\nforever\n    if <(Background?) = [1]> then\n        show\n    else\n        hide\n    end\nend\n\nwhen I start as a clone\nswitch costume to (costume2 v)\ngo to [back v] layer\nforever\n    if <(Background?) = [1]> then\n        show\n    else\n        hide\n    end\nend\n\nforever\n    repeat (10)\n        change x by (5.6)\n    end\n    go to x: () y: ()\nend\n\n@death\n\nwhen I receive [oops i ded  v]\nif <(Sound effects?) = [1]> then\n    start sound [D Bass v]\n    start sound [B Bass v]\nend\ngo to x: () y: ()\nshow\nswitch costume to (costume1 v)\nset [ghost v] effect to (0)\nwait (0.8) seconds\nrepeat (20)\n    change [ghost v] effect by (5)\nend\nhide\n\nwhen flag clicked\nhide\n\n@Coins\n\nwhen flag clicked\nset [coins collected v] to [0]\nhide\nswitch costume to (102 v)\ncreate clone of (_myself_ v)\nswitch costume to (003 v)\ncreate clone of (_myself_ v)\nswitch costume to (105 v)\ncreate clone of (_myself_ v)\nswitch costume to (205 v)\ncreate clone of (_myself_ v)\nswitch costume to (207 v)\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\nforever\n    set size to (100) %\n    repeat (10)\n        change size by (1)\n    end\n    repeat (10)\n        change size by (-1)\n    end\nend\n\nwhen I start as a clone\nforever\n    turn right (1) degrees\n    if <(costume [name v]) = (LEVEL)> then\n        show\n    else\n        hide\n    end\n    if <(costume [name v]) = [102]> then\n        if <touching (player v)?> then\n            change [coins collected v] by (1)\n            start sound [?mode=trending v]\n            go to x: (65) y: (-70)\n            repeat (5)\n                change y by (2)\n            end\n            repeat (3)\n                change y by (4)\n            end\n            repeat (2)\n                change y by (10)\n            end\n            repeat (5)\n                change y by (-2)\n            end\n            repeat (3)\n                change y by (-2)\n            end\n            repeat (2)\n                change y by (-10)\n            end\n            repeat (10)\n                change [ghost v] effect by (10)\n            end\n            delete this clone\n        else\n            go to x: (65) y: (-70)\n        end\n    else\n        if <(costume [name v]) = [003]> then\n            if <touching (player v)?> then\n                change [coins collected v] by (1)\n                start sound [?mode=trending v]\n                go to x: (127) y: (0)\n                repeat (5)\n                    change y by (2)\n                end\n                repeat (3)\n                    change y by (4)\n                end\n                repeat (2)\n                    change y by (10)\n                end\n                repeat (5)\n                    change y by (-2)\n                end\n                repeat (3)\n                    change y by (-2)\n                end\n                repeat (2)\n                    change y by (-10)\n                end\n                repeat (10)\n                    change [ghost v] effect by (10)\n                end\n                delete this clone\n            else\n                go to x: (127) y: (0)\n            end\n        else\n            if <(costume [name v]) = [105]> then\n                if <touching (player v)?> then\n                    change [coins collected v] by (1)\n                    start sound [?mode=trending v]\n                    go to x: (-85) y: (-55)\n                    repeat (5)\n                        change y by (2)\n                    end\n                    repeat (3)\n                        change y by (4)\n                    end\n                    repeat (2)\n                        change y by (10)\n                    end\n                    repeat (5)\n                        change y by (-2)\n                    end\n                    repeat (3)\n                        change y by (-2)\n                    end\n                    repeat (2)\n                        change y by (-10)\n                    end\n                    repeat (10)\n                        change [ghost v] effect by (10)\n                    end\n                    delete this clone\n                else\n                    go to x: (-85) y: (-55)\n                end\n            else\n                if <(costume [name v]) = [205]> then\n                    if <touching (player v)?> then\n                        change [coins collected v] by (1)\n                        start sound [?mode=trending v]\n                        go to x: (120) y: (0)\n                        repeat (5)\n                            change y by (2)\n                        end\n                        repeat (3)\n                            change y by (4)\n                        end\n                        repeat (2)\n                            change y by (10)\n                        end\n                        repeat (5)\n                            change y by (-2)\n                        end\n                        repeat (3)\n                            change y by (-2)\n                        end\n                        repeat (2)\n                            change y by (-10)\n                        end\n                        repeat (10)\n                            change [ghost v] effect by (10)\n                        end\n                        delete this clone\n                    else\n                        go to x: (120) y: (0)\n                    end\n                else\n                    if <(costume [name v]) = [207]> then\n                        if <touching (player v)?> then\n                            change [coins collected v] by (1)\n                            start sound [?mode=trending v]\n                            go to x: (0) y: (0)\n                            repeat (5)\n                                change y by (2)\n                            end\n                            repeat (3)\n                                change y by (4)\n                            end\n                            repeat (2)\n                                change y by (10)\n                            end\n                            repeat (5)\n                                change y by (-2)\n                            end\n                            repeat (3)\n                                change y by (-2)\n                            end\n                            repeat (2)\n                                change y by (-10)\n                            end\n                            repeat (10)\n                                change [ghost v] effect by (10)\n                            end\n                            delete this clone\n                        else\n                            go to x: (0) y: (0)\n                        end\n                    else\n                        go to x: (0) y: (0)\n                    end\n                end\n            end\n        end\n    end\nend\n\n@Particle1\n\nwhen flag clicked\nhide\nset [ghost v] effect to (50)\n\nwhen I start as a clone\nshow\nset size to (100) %\ngo to [back v] layer\ngo [forward v] (7) layers\nset [temp xv v] to ((xv) * (-1))\nrepeat (pick random (10) to (25))\n    change y by ((particle yv) * (pick random (0.2) to (0.5)))\n    change x by ((temp xv) * (pick random (0.2) to (0.5)))\n    change size by (((size) * (pick random (0.5) to (2))) / (100))\n    change [ghost v] effect by (pick random (1) to (10))\nend\ndelete this clone\n\ndefine particles\ngo to (player v)\ncreate clone of (_myself_ v)\n\nwhen I receive [change level v]\ndelete this clone\n\nwhen I receive [start v]\nforever\n    if <(Effects?) = [1]> then\n        particles\n    end\nend\n\n@note\n\nwhen flag clicked\nhide\n\nwhen I receive [options v]\nhide\n\nwhen I receive [start v]\nif <[002] = (LEVEL)> then\n    go to x: (80) y: (-85)\n    show\nelse\n    if <[001] = (LEVEL)> then\n        go to x: (120) y: (-85)\n        show\n    else\n        hide\n    end\nend\n\nwhen I receive [start v]\nforever\n    if <[002] = (LEVEL)> then\n        if <touching (player v)?> then\n            say [You may want to switch your gravity for this one...] for (0) seconds\n        end\n    else\n        if <[001] = (LEVEL)> then\n            if <touching (player v)?> then\n                say [Try jumping while on that yellow orb...] for (0) seconds\n            end\n        end\n    end\nend\n\n@Particle2\n\nwhen flag clicked\nhide\nset [ghost v] effect to (50)\n\nwhen I start as a clone\nshow\nset size to (100) %\ngo to [back v] layer\ngo [forward v] (7) layers\nset [temp xv v] to ((xv) * (-1))\npoint in direction (pick random (0) to (360))\nrepeat (pick random (10) to (25))\n    move (pick random (2) to (5)) steps\n    change size by (((size) * (pick random (0.5) to (2))) / (100))\n    change [ghost v] effect by (pick random (1) to (10))\nend\ndelete this clone\n\ndefine particles\ngo to (player v)\ncreate clone of (_myself_ v)\n\nwhen I receive [change level v]\ndelete this clone\n\nwhen I receive [start v]\nforever\n    if <(Effects?) = [1]> then\n        particles\n    end\nend\n\n@fps thingo\n\nwhen flag clicked\nset [counter v] to [0]\nforever\n    change [counter v] by (1)\n    wait (0) seconds\n    if <(timer) > [1]> then\n        set [fps v] to (counter)\n        set [counter v] to [0]\n        reset timer\n    end\nend\n\nwhen flag clicked\nforever\n    if <[10] > (FPS)> then\n        set [tempeffects v] to (Effects?)\n        set [tempbackground v] to (Background?)\n        set [effects? v] to [0]\n        set [background? v] to [0]\n        wait until <(FPS) > [15]>\n        set [effects? v] to (tempEffects)\n        set [background? v] to (tempBackground)\n    end\n    if <[20] < (FPS)> then\n        set [hazard speed 2 v] to [2]\n        set [hazard speed v] to [0.5]\n        set [gravityv v] to [0.5]\n        set [jump force v] to [9]\n        set [speed v] to [1.2]\n    else\n        set [hazard speed 2 v] to [1]\n        set [hazard speed v] to [1]\n        set [gravityv v] to [1.5]\n        set [speed v] to [2]\n        set [jump force v] to [15]\n    end\nend\n\n@locked\n\nwhen I receive [start v]\nhide\nforever\n    if <(done) = [0]> then\n        if <(LEVEL) = [106]> then\n            show\n            if <<(Key collected) = [1]> and <touching (player v)?>> then\n                set [done v] to [1]\n                set [ghost v] effect to (0)\n                repeat (10)\n                    change [ghost v] effect by (10)\n                end\n                hide\n            end\n        else\n            hide\n        end\n    else\n        hide\n    end\nend\n\nwhen flag clicked\nset [done v] to [0]\nhide\n\n@Sprite4\n\nwhen I receive [start v]\nhide\nforever\n    if <(LEVEL) = [005]> then\n        show\n        if <<touching (player v)?> and <(Key collected) = [0]>> then\n            set [key collected v] to [1]\n            set [ghost v] effect to (0)\n            repeat (10)\n                change [ghost v] effect by (10)\n            end\n            hide\n        end\n    else\n        hide\n    end\nend\n\nwhen flag clicked\nset [key collected v] to [0]\nhide\n\nset [ghost v] effect to (0)\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nhide\n\n@Sprite1\n\nwhen flag clicked\nhide\n\ngo to [front v] layer\nshow\nstop [all v]\n\n@Sprite5\n\nwhen I receive [change level v]\nset [ghost v] effect to (0)\nrepeat (10)\n    change [ghost v] effect by (10)\nend\n\nwhen flag clicked\nset [ghost v] effect to (0)\nwait (1) seconds\nrepeat (100)\n    change [ghost v] effect by (1)\nend\nset [ghost v] effect to (100)\n\n@Sprite6\n\nwhen flag clicked\nhide\ngo to [front v] layer\nwait until <[5] = (Coins collected)>\nset [ghost v] effect to (100)\nshow\nrepeat (10)\n    go to [front v] layer\n    change [ghost v] effect by (10)\n    change [volume v] by (-10)\nend\nwait (1) seconds\nstop [all v]\n\ngo to [front v] layer\nshow\n\n