Radiant-a platformer  #games #trending

Instructions: Hi ! \nIt one of my best platformer ! I sincerely hope you will like it ^^ and, if you want to play once again : go see this one https://scratch.mit.edu/projects/535183297/\nhttps://scratch.mit.edu/projects/558391146/\nCould finish all my platformers ???\n\n\nHAVE FUN ! ?

@Stage\n\nwhen flag clicked\nforever\n    play sound [Unlimited v] until done\nend\n\n@Player\n\nwhen flag clicked\npoint in direction (90)\nshow\nbroadcast (Green Flag v) and wait\nbroadcast (Play Game v) and wait\n\nwhen I receive [green flag v]\nhide\ngo to [front v] layer\n\nwhen I receive [play game v]\nset [level v] to [1]\nforever\n    broadcast (Reset v) and wait\n    broadcast (Setup v) and wait\n    Game On\n    repeat until <(EXIT) > []>\n        Tick\n        broadcast (Tick v)\n    end\n    if <(EXIT) = [win]> then\n        Game - Win\n    else\n        Game - Die\n    end\nend\n\ndefine Game On\nset [y v] to [0]\nset [x v] to [0]\nset [sx v] to [0]\nset [sy v] to [0]\nset [in air v] to [0]\nset [exit v] to []\nset [ghost v] effect to (0)\nset size to (100) %\nshow\n\ndefine Tick\nif <<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<mouse down?> and <(x position) > (mouse x)>>> then\n    switch costume to (left v)\n    change [sx v] by (-2)\nend\nif <<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<mouse down?> and <(mouse x) > (x position)>>> then\n    switch costume to (right v)\n    change [sx v] by (2)\nend\nif <<<key (left arrow v) pressed?> or <key (a v) pressed?>> and <<key (up arrow v) pressed?> or <key (w v) pressed?>>> then\n    switch costume to (left up v)\nend\nif <<<key (right arrow v) pressed?> or <key (d v) pressed?>> and <<key (up arrow v) pressed?> or <key (w v) pressed?>>> then\n    switch costume to (right up v)\nend\nset [sx v] to ((sx) * (0.8))\nif <([abs v] of (sx) ) > [0.9]> then\n    Change Player x by (round (sx))\nend\nif <<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<mouse down?> and <(mouse y) > (y position)>>> then\n    if <(in air) < [4]> then\n        set [sy v] to [16]\n    end\nend\nif <(sy) > [-20]> then\n    change [sy v] by (-2)\nend\nChange Player y by (sy)\nTest - Die\nset [scroll x v] to (x)\nif <(SCROLL X) < [0]> then\n    set [scroll x v] to [0]\nend\nchange [scroll y v] by (round (((y) - (SCROLL Y)) / (10)))\nif <(SCROLL Y) < [0]> then\n    set [scroll y v] to [0]\nend\nPosition\nif <(y) < [-180]> then\n    set [exit v] to [die]\nend\n\ndefine Change Player y by (sy)\nchange [y v] by (sy)\nchange [in air v] by (1)\nPosition\nrepeat until <not <touching (platforms v)?>>\n    if <(sy) > [0]> then\n        change [y v] by (-1)\n    else\n        change [y v] by (1)\n        set [in air v] to [0]\n    end\n    Position\n    set [sy v] to [0]\nend\n\ndefine Position\ngo to x: ((x) - (SCROLL X)) y: ((y) - (SCROLL Y))\n\ndefine Change Player x by (sx)\npoint in direction (90)\nchange [x v] by (sx)\nPosition\nif <touching (platforms v)?> then\n    repeat (12)\n        change [y v] by (1)\n        Position\n        if <not <touching (platforms v)?>> then\n            stop [this script v]\n        end\n    end\n    change [y v] by (-12)\n    if <key (up arrow v) pressed?> then\n        if <(sx) > [0]> then\n            set [sx v] to [-16]\n        else\n            set [sx v] to [16]\n        end\n        set [in air v] to [0]\n    else\n        set [sx v] to [0]\n    end\n    repeat until <not <touching (platforms v)?>>\n        if <(sx) > [0]> then\n            change [x v] by (-1)\n        else\n            change [x v] by (1)\n        end\n        Position\n    end\nend\n\ndefine Game - Die\nset [exit v] to []\nrepeat (5)\n    hide\n    wait (.1) seconds\n    show\n    wait (0.1) seconds\nend\nhide\nwait (0.5) seconds\n\ndefine Test - Die\nif <touching (danger v)?> then\n    set [exit v] to [die]\nend\n\ndefine Game - Win\nrepeat (50)\n    point towards (exit v)\n    turn right (65) degrees\n    move ((distance to [exit v]) / (2)) steps\n    change size by (-1)\n    change [ghost v] effect by (2)\nend\nhide\nchange [level v] by (1)\nwait (1) seconds\n\nwhen I receive [trampoline v]\nchange [sy v] by (45)\n\nwhen I receive [new skin v]\n\n@Platforms\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [tick v]\nPosition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\n\nwhen I receive [setup v]\nhide\nset [x v] to [0]\nset [y v] to [0]\nif <(LEVEL) = [1]> then\n    switch costume to (level 1 1 v)\n    Clone at x: [700] y: [3]\n    Clone at x: [360] y: [0]\n    Clone at x: [700] y: [0]\nelse\n    if <(LEVEL) = [2]> then\n        switch costume to (level 2 1 v)\n        Clone at x: [800] y: [0]\n        Clone at x: [600] y: [30]\n        Clone at x: [600] y: [0]\n    else\n        if <(LEVEL) = [3]> then\n            switch costume to (level 3 1 v)\n            Clone at x: [500] y: [0]\n            Clone at x: [500] y: [0]\n            Clone at x: [500] y: [0]\n        else\n            if <(LEVEL) = [4]> then\n                switch costume to (level 4 1 v)\n            end\n        end\n    end\nend\n\ndefine Position (x) (y)\nset size to (100) %\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\nwhen I receive [reset v]\ndelete this clone\n\ndefine Clone at x: (x) y: (y)\ncreate clone of (_myself_ v)\nchange [x v] by (x)\nchange [y v] by (y)\nnext costume\n\nnext costume\nnext costume\n\ncreate clone of (_myself_ v)\n\n@Exit\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [tick v]\nswitch costume to (open v)\nPosition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\nif <<touching (player v)?> and <(costume [number v]) = [1]>> then\n    set [exit v] to [win]\nend\n\nwhen I receive [setup v]\nhide\nset [collected v] to [0]\nset [x v] to [0]\nset [y v] to [0]\nif <(LEVEL) = [1]> then\n    switch costume to (closed v)\n    Clone at x: [1898] y: [71]\nelse\n    if <(LEVEL) = [2]> then\n        switch costume to (closed v)\n        Clone at x: [2120] y: [87]\n    else\n        if <(LEVEL) = [3]> then\n            switch costume to (closed v)\n            Clone at x: [1700] y: [-30]\n        else\n            if <(LEVEL) = [4]> then\n                switch costume to (end v)\n            else\n                Clone at x: [3148734] y: [3273459]\n            end\n        end\n    end\nend\n\ndefine Position (x) (y)\ngo to [back v] layer\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\nwhen I receive [reset v]\ndelete this clone\n\ndefine Clone at x: (x) y: (y)\nset [x v] to (x)\nset [y v] to (y)\n\nshow\n\n@DANGER\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [tick v]\nPosition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\n\nwhen I receive [setup v]\nhide\nset [x v] to [0]\nset [y v] to [0]\nif <(LEVEL) = [1]> then\n    switch costume to (level 1 1 v)\n    Clone at x: [360] y: [0]\n    Clone at x: [360] y: [0]\n    Clone at x: [700] y: [0]\nelse\n    if <(LEVEL) = [2]> then\n        switch costume to (level 2 1 v)\n        Clone at x: [800] y: [100]\n        Clone at x: [600] y: [100]\n    else\n        if <(LEVEL) = [3]> then\n            switch costume to (level 3 1 v)\n            Clone at x: [360] y: [0]\n            Clone at x: [500] y: [0]\n            Clone at x: [500] y: [0]\n        else\n            if <(LEVEL) = [4]> then\n                switch costume to (bob v)\n            end\n        end\n    end\nend\n\ndefine Position (x) (y)\ngo to [back v] layer\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\nwhen I receive [reset v]\ndelete this clone\n\ndefine Clone at x: (x) y: (y)\ncreate clone of (_myself_ v)\nchange [x v] by (x)\nchange [y v] by (y)\nnext costume\n\nif <(LEVEL) = [4]> then\n    switch costume to (level 4 1 v)\nend\n\n@Trampoline\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [tick v]\nPosition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\nif <touching (player v)?> then\n    broadcast (Trampoline v)\n    next costume\n    wait (0.01) seconds\n    next costume\nend\n\nwhen I receive [setup v]\nhide\nset [collected max v] to [0]\nset [collected v] to [0]\nset [x v] to [0]\nset [y v] to [0]\nif <(LEVEL) = [1]> then\n    switch costume to (spring v)\n    Clone at x: [1630] y: [-100]\nelse\n    if <(LEVEL) = [2]> then\n        switch costume to (spring v)\n    else\n        if <(LEVEL) = [3]> then\n            switch costume to (spring v)\n            Clone at x: [348] y: [-35]\n            Clone at x: [478] y: [-35]\n            Clone at x: [600] y: [-35]\n        end\n        set [x v] to [-9999999999]\n    end\n    set [x v] to [-9999999999]\nend\nset [x v] to [-9999999999]\n\ndefine Position (x) (y)\ngo to [back v] layer\nset size to (200) %\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\nwhen I receive [reset v]\ndelete this clone\n\ndefine Clone at x: (x) y: (y)\nset [x v] to (x)\nset [y v] to (y)\ncreate clone of (_myself_ v)\n\n@Landscape\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [tick v]\nPosition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\n\nwhen I receive [setup v]\nhide\nset [x v] to [0]\nset [y v] to [0]\nif <(LEVEL) = [1]> then\n    switch costume to (level 1 1 v)\n    Clone at x: [700] y: [3]\n    Clone at x: [360] y: [0]\n    Clone at x: [700] y: [0]\nelse\n    if <(LEVEL) = [2]> then\n        switch costume to (level 2 1 v)\n        Clone at x: [800] y: [0]\n        Clone at x: [600] y: [30]\n        Clone at x: [600] y: [0]\n    else\n        if <(LEVEL) = [3]> then\n            switch costume to (level 3 1 v)\n            Clone at x: [500] y: [0]\n            Clone at x: [500] y: [0]\n            Clone at x: [500] y: [0]\n        else\n            if <(LEVEL) = [4]> then\n                switch costume to (blnak v)\n            end\n        end\n    end\nend\n\ndefine Position (x) (y)\ngo to [back v] layer\nset size to (100) %\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\nwhen I receive [reset v]\ndelete this clone\n\ndefine Clone at x: (x) y: (y)\ncreate clone of (_myself_ v)\nchange [x v] by (x)\nchange [y v] by (y)\nnext costume\n\nnext costume\nnext costume\n\ncreate clone of (_myself_ v)\n\n@TB\n\nwhen flag clicked\ngo to x: (36) y: (28)\nset [ghost v] effect to (100)\n\n@Skip Button\n\nwhen flag clicked\nset size to (100) %\nhide\nshow\ngo to x: (-188) y: (-148)\n\nwhen I receive [tick v]\nif <<key (s v) pressed?> or <mouse down?>> then\n    if <touching (mouse-pointer v)?> then\n        change [level v] by (1)\n        broadcast (Setup v)\n        wait until <not <<key (s v) pressed?> or <mouse down?>>>\n        wait until <not <<key (s v) pressed?> or <mouse down?>>>\n    else\n    end\nend\n\nif <touching (mouse-pointer v)?> then\n    change [level v] by (1)\n    broadcast (Setup v)\nend\n\n@Collectables\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [tick v]\nnext costume\nPosition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\nif <touching (player v)?> then\n    change [normal coins' v] by (1)\n    change [coins v] by (1)\n    change [collected v] by (1)\n    delete this clone\nend\n\nwhen I receive [setup v]\nset [coins v] to [0]\nhide\nset [x v] to [0]\nset [y v] to [0]\nif <(LEVEL) = [1]> then\n    switch costume to (coin1 v)\n    Clone at x: [-208] y: [-6]\n    Clone at x: [87] y: [-6]\n    Clone at x: [144] y: [-6]\n    Clone at x: [364] y: [6]\n    Clone at x: [720] y: [32]\n    Clone at x: [1142] y: [122]\n    Clone at x: [1624] y: [-30]\n    Clone at x: [1624] y: [30]\nelse\n    if <(LEVEL) = [2]> then\n        switch costume to (coin1 v)\n        Clone at x: [-160] y: [-33]\n        Clone at x: [167] y: [144]\n        Clone at x: [382] y: [117]\n        Clone at x: [720] y: [73]\n        Clone at x: [780] y: [73]\n        Clone at x: [840] y: [73]\n        Clone at x: [1614] y: [85]\n        Clone at x: [1909] y: [59]\n    else\n        if <(LEVEL) = [3]> then\n            switch costume to (coin1 v)\n            Clone at x: [-147] y: [12]\n            Clone at x: [175] y: [30]\n            Clone at x: [415] y: [85]\n            Clone at x: [539] y: [85]\n            Clone at x: [700] y: [107]\n            Clone at x: [1477] y: [100]\n            Clone at x: [1428] y: [180]\n        else\n        end\n        set [x v] to [-9999999999]\n    end\n    set [x v] to [-9999999999]\nend\nset [x v] to [-9999999999]\n\ncreate clone of (_myself_ v)\n\nnext costume\nnext costume\n\ndefine Position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\nwhen I receive [reset v]\ndelete this clone\n\ndefine Clone at x: (x) y: (y)\nset [x v] to (x)\nset [y v] to (y)\ncreate clone of (_myself_ v)\n\nwhen I receive [green flag v]\nset [normal coins' v] to [0]\nset [collected v] to [0]\n\n@Text\n\nwhen I receive [green flag v]\nset [coins v] to [0]\nshow variable [coins v]\nshow\n\n@lf_UI\n\nwhen I receive [alert v]\nstop [other scripts in sprite v]\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nshow\nswitch costume to (costume2 v)\ngo to x: (0) y: (50)\nrepeat until <(y position) < [0.2]>\n    change [ghost v] effect by (-10)\n    change y by (((0) - (y position)) / (7))\nend\nwait (4) seconds\nrepeat until <(y position) > [50]>\n    change [ghost v] effect by (10)\n    change y by (((y position) + (5)) / (5))\nend\nhide\n\nwhen flag clicked\ncheck\n\ndefine check\nswitch costume to (costume1 v)\ngo to x: (0) y: (50)\nhide\nset [ghost v] effect to (100)\nwait (pick random (11) to (16)) seconds\nforever\n    if <<(Stared?) = [1]> and <(Loved?) = [1]>> then\n        stop [this script v]\n    end\n    show\n    repeat until <(y position) < [0.2]>\n        change [ghost v] effect by (-10)\n        change y by (((0) - (y position)) / (7))\n    end\n    wait (4) seconds\n    repeat until <(y position) > [50]>\n        change [ghost v] effect by (10)\n        change y by (((y position) + (5)) / (5))\n    end\n    hide\n    wait (pick random (20) to (40)) seconds\nend\n\n@Detector\n\nwhen flag clicked\nshow\nset [@id v] to [1]\ncreate clone of (_myself_ v)\nset [@id v] to [2]\ncreate clone of (_myself_ v)\nset [stared? v] to [0]\nset [loved? v] to [0]\nwait until <<(Stared?) = [1]> and <(Loved?) = [1]>>\nwait (0.1) seconds\nbroadcast (alert v)\n\nwhen I start as a clone\nshow\ngo to x: (-15) y: (0)\nif <(@id) = [1]> then\n    switch costume to (fave v)\n    forever\n        if <touching (mouse-pointer v)?> then\n            wait (0.03) seconds\n            if <touching (mouse-pointer v)?> then\n                set [stared? v] to ((1) - (Stared?))\n                wait until <not <touching (mouse-pointer v)?>>\n                wait (0.05) seconds\n            end\n        end\n    end\nelse\n    if <(@id) = [2]> then\n        switch costume to (love v)\n        forever\n            if <touching (mouse-pointer v)?> then\n                wait (0.03) seconds\n                if <touching (mouse-pointer v)?> then\n                    set [loved? v] to ((1) - (Loved?))\n                    wait until <not <touching (mouse-pointer v)?>>\n                    wait (0.05) seconds\n                end\n            end\n        end\n    else\n    end\nend\n\n@Shop Button\n\nwhen flag clicked\nswitch costume to (shop button v)\ngo to x: (-177) y: (147)\nhide\n\nshow\n\nwhen I receive [tick v]\n\nif <touching (mouse-pointer v)?> then\n    set size to (130) %\n    if <mouse down?> then\n        broadcast (Shop Open v)\n        hide\n        wait until <not <mouse down?>>\n    end\nelse\n    set size to (110) %\nend\n\nwhen I receive [shop close v]\nshow\n\n@Shop\n\nwhen flag clicked\nswitch costume to (shop v)\ngo to x: (0) y: (0)\nhide\n\nwhen I receive [shop open v]\nset size to (100) %\ngo to x: (0) y: (0)\nshow\nwait (0.5) seconds\nforever\n    if <mouse down?> then\n        broadcast (Shop Close v)\n        wait until <not <mouse down?>>\n    end\nend\n\nwhen I receive [shop close v]\nhide\n\nwait (0.5) seconds\nforever\n    if <mouse down?> then\n        broadcast (Shop Close v)\n        wait until <not <mouse down?>>\n    end\nend\n\n@Shop Things\n\nwhen flag clicked\nhide\ngo to x: (33) y: (52)\n\nwhen I receive [shop open v]\nshow\nwait (0.5) seconds\nforever\nend\n\nwhen I receive [shop close v]\nhide\n\nwait (0.5) seconds\n\n