Hercules Collab || A Scrolling Platformer

Instructions: Hey ! Welcome to Hercules || A Scrolling Platformer Mobile Friendly\nThis platformer is a collab of @kodiak77-77 and @Neutral_Skillet !!!\nhttps://scratch.mit.edu/projects/391061902/\n50% 50% work :D\nClick on the green flag =)\nPress the arrows to move !\nNo advertising !\n#2 on trending :DDD\nLoved by @levi_minecraft and  @-RainbowGames-\n\nCredits : \n\nThanks to @griffpatch for the scrolling platformer\nThanks to the movie =)\nThanks to @DaBoomerSupreme for the ground idea\nThanks to coollogo\n\nTags : \n\n#kodiak77-77 #Neutral_Skillet  #Hercules #Games #Art #Explore #Platformer #Scratch  #Music #Popular #Recent #Love #Favorite #Follow 

@Stage\n\nwhen [a v] key pressed\nset [mouse v] to (join (join ((mouse x) + (SCROLL X)) [ , ]) ((mouse y) + (SCROLL Y)))\n\nwhen flag clicked\nswitch backdrop to (2 v)\nplay sound [Deltarune Hip Shop \(LoFi Hip Hop Remix\) v] until done\n\nwhen I receive [begin  v]\nset [brightness v] effect to (3)\nswitch backdrop to (1 v)\n\nwhen I receive [begin  v]\nstop all sounds\nwait (0.25) seconds\nforever\n    play sound [Vexento - Pixel Party v] until done\nend\n\n@Sprite\n\nwhen I receive [greenflah v]\ngo to [front v] layer\nhide\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) = [A win win]> then\n        GameWinYOO\n    else\n        Game - die boi boi I’m fed\n    end\nend\n\ndefine Game on\nswitch costume to (1 v)\npoint in direction (90)\nset [scroll x v] to [0]\nset [scroll y v] to [0]\nset [x v] to [0]\nset [y v] to [78]\nset [speedy v] to [0]\nset [sx v] to [0]\nset [in air v] to [0]\nset [exit v] to []\nset size to (100) %\nset [ghost v] effect to (0)\nshow\n\ndefine Tick\nif <<key (right arrow v) pressed?> or <<key (d v) pressed?> or <<mouse down?> and <(mouse x) > (x position)>>>> then\n    change [sx v] by (2)\nend\nif <<<key (left arrow v) pressed?> or <key (d v) pressed?>> or <<mouse down?> and <(mouse x) < (x position)>>> then\n    change [sx v] by (-2)\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 <(y position) < (mouse y)>>> then\n    if <(In air) < [4]> then\n        set [speedy v] to [16]\n    end\nend\nif <(Speedy) > [-20]> then\n    change [speedy v] by (-1.5)\nend\nChange player y by (Speedy)\nDie? I think so\nchange [scroll x v] by (round (((x) - (SCROLL X)) / (15)))\nif <(SCROLL X) < [0]> then\n    set [scroll x v] to [0]\nend\nif <(SCROLL Y) < [0]> then\n    set [scroll y v] to [0]\nend\nchange [scroll y v] by (round (((y) - (SCROLL Y)) / (10)))\nPosition\nif <(SCROLL Y) < [-30]> then\n    set [exit v] to [Die]\nend\nif <touching (trampoline  v)?> then\n    if <(In air) < [4]> then\n        set [speedy v] to [30]\n    end\nend\n\ndefine Change player y by (sy)\nchange [y v] by (sy)\nchange [in air v] by (1)\nPosition\nrepeat until <not <touching (sprite2 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 [speedy v] to [0]\nend\n\ndefine Position\ngo to x: ((x) - (SCROLL X)) y: ((y) - (SCROLL Y))\n\ndefine Change player x by (sx)\nchange [x v] by (sx)\nPosition\nif <touching (sprite2 v)?> then\n    repeat (12)\n        change [y v] by (1)\n        Position\n        if <not <touching (sprite2 v)?>> then\n            stop [this script v]\n        end\n    end\n    change [y v] by (-12)\n    repeat until <not <touching (sprite2 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 boi boi I’m fed\nset [ghost v] effect to (0)\nstart sound [Bonk v]\nset rotation style [all around v]\nset [y v v] to [15]\nrepeat until <(y position) < [-90]>\n    switch costume to (1 v)\n    go to [front v] layer\n    turn right (10) degrees\n    change y by (Y v)\n    change [y v v] by (-1)\nend\nrepeat until <(y position) < [-178]>\n    switch costume to (die v)\n    change [ghost v] effect by (11)\n    go to [front v] layer\n    turn right (10) degrees\n    change y by (Y v)\n    change [y v v] by (-1)\nend\n\ndefine Die? I think so\nif <touching (sprite4 v)?> then\n    set [exit v] to [Die \(other way\)]\nend\n\ndefine GameWinYOO\nrepeat (20)\n    point towards (collectibles2 v)\n    turn right (65) degrees\n    move ((distance to [collectibles2 v]) / (2)) steps\n    change size by (-2)\n    change [ghost v] effect by (5)\nend\nhide\nset [ghost v] effect to (0)\nset size to (100) %\nchange [level v] by (1)\nwait (0.5) seconds\n\nwhen flag clicked\nset [level v] to [0]\n\nwhen I receive [begin  v]\nshow\nbroadcast (Greenflah v) and wait\nbroadcast (Play game v) and wait\n\nwhen flag clicked\nhide\n\n@Sprite2\n\nwhen I receive [greenflah v]\nshow\n\nwhen I receive [tick v]\nPosition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\n\nwhen I receive [setup v]\nset [y v] to [0]\nset [x v] to [0]\nswitch costume to (costume1 v)\nif <(LEVEL) = [1]> then\n    Position x: [450] y: [0]\n    Position x: [450] y: [0]\n    Position x: [450] y: [0]\n    Position x: [450] y: [0]\nelse\n    if <(LEVEL) = [2]> then\n        switch costume to (lvl 2 1 v)\n        Position x: [450] y: [0]\n        Position x: [450] y: [0]\n        Position x: [450] y: [0]\n        Position x: [450] y: [0]\n    else\n        if <(LEVEL) = [3]> then\n            switch costume to (lvl 3 1 v)\n            Position x: [450] y: [0]\n            Position x: [700] y: []\n        else\n            if <(LEVEL) = [4]> then\n                switch costume to (lvl 3 5 v)\n                Position x: [450] y: [0]\n                Position x: [600] y: []\n            else\n                if <(LEVEL) = [5]> then\n                    switch costume to (costume11 v)\n                    Position x: [470] y: [60]\n                    Position x: [400] y: [60]\n                    Position x: [400] y: [60]\n                end\n            end\n        end\n    end\nend\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 Position x: (x) y: (y)\ncreate clone of (_myself_ v)\nchange [x v] by (x)\nchange [y v] by (y)\nnext costume\n\nwhen flag clicked\nwait until <(LEVEL) = [5]>\nbroadcast (Costume v)\n\nwhen flag clicked\nhide\n\n@Collectibles\n\nwhen I start as a clone\nset size to (70) %\nforever\n    switch costume to (1 v)\n    wait (0.3) seconds\n    repeat (7)\n        next costume\n    end\nend\n\nwhen I receive [greenflah v]\nshow\n\nwhen I receive [tick v]\nPosition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\nif <touching (sprite v)?> then\n    change [collllllectttttt yooooo v] by (1)\n    if <(Collected max) = (COLLLLLLECTTTTTT YOOOOO)> then\n        broadcast (OPEN PORtAL v)\n    end\n    if <touching (sprite v)?> then\n        start sound [Coin v]\n    end\n    delete this clone\nend\n\nwhen I receive [setup v]\nset [collected max v] to [0]\nhide\nset [collllllectttttt yooooo v] to [0]\nset [y v] to [0]\nset [x v] to [0]\nswitch costume to (costume4 v)\nif <(LEVEL) = [1]> then\n    Clone x: [168] y: [10]\n    Clone x: [480] y: [37]\n    Clone x: [718] y: [25]\n    Clone x: [1078] y: [12]\nelse\n    if <(LEVEL) = [2]> then\n        Clone x: [238] y: [20]\n        Clone x: [817] y: [-118]\n        Clone x: [897] y: [30]\n        Clone x: [1050] y: [-30]\n    else\n        if <(LEVEL) = [3]> then\n            Clone x: [210] y: [60]\n            Clone x: [365] y: [140]\n            Clone x: [780] y: [50]\n        else\n            if <(LEVEL) = [4]> then\n                Clone x: [165] y: [160]\n                Clone x: [408] y: [87]\n                Clone x: [597] y: [140]\n                Clone x: [922] y: [60]\n            else\n                if <(LEVEL) = [5]> then\n                    Clone x: [-53.5] y: [0]\n                    Clone x: [174] y: [165]\n                end\n            end\n        end\n    end\nend\nset [y v] to [-99999999999]\n\nClone x: [1301] y: [30]\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 x: (x) y: (y)\nset [x v] to (x)\nset [y v] to (y)\nchange [collected max v] by (1)\ncreate clone of (_myself_ v)\n\nstop [this script v]\n\nwhen flag clicked\nforever\n    if <(LEVEL) = [4]> then\n        set [brightness v] effect to (0)\n    end\nend\n\nClone x: [408] y: [87]\nClone x: [597] y: [140]\nClone x: [922] y: [60]\n\n@Collectibles2\n\nwhen I receive [begin  v]\nset [ghost v] effect to (0)\nshow\n\nwhen I receive [tick v]\nPosition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\nif <<(costume [name v]) = [1]> and <touching (sprite v)?>> then\n    set [exit v] to [A win win]\nend\n\nwhen I receive [setup v]\nhide\nset [collllllectttttt yooooo v] to [0]\nset [y v] to [0]\nset [x v] to [0]\nif <(LEVEL) = [1]> then\n    switch costume to (2 v)\n    Clone x: [1200] y: [30]\nelse\n    if <(LEVEL) = [2]> then\n        switch costume to (2 v)\n        Clone x: [1300] y: [0]\n    else\n        if <(LEVEL) = [3]> then\n            switch costume to (2 v)\n            Clone x: [890] y: [-40]\n        else\n            if <(LEVEL) = [4]> then\n                switch costume to (2 v)\n                Clone x: [1280] y: [210]\n            else\n                if <(LEVEL) = [5]> then\n                    Clone x: [99999] y: [999]\n                end\n            end\n        end\n    end\nend\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 x: (x) y: (y)\nset [x v] to (x)\nset [y v] to (y)\n\nwhen I receive [open portal v]\nswitch costume to (1 v)\n\nwhen flag clicked\nhide\n\nwhen flag clicked\nset size to (80) %\n\n@Sprite3\n\nwhen I receive [greenflah v]\nshow\n\nwhen I receive [tick v]\nPosition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\n\nwhen I receive [setup v]\nset [y v] to [0]\nset [x v] to [0]\nswitch costume to (costume1 v)\nif <(LEVEL) = [1]> then\n    Position x: [450] y: [0]\n    Position x: [450] y: [0]\n    Position x: [450] y: [0]\n    Position x: [450] y: [0]\nelse\n    if <(LEVEL) = [2]> then\n        switch costume to (lvl 2 1 v)\n        Position x: [450] y: [0]\n        Position x: [700] y: [0]\n    else\n        if <(LEVEL) = [3]> then\n            switch costume to (lvl 3 1 v)\n            Position x: [450] y: []\n            Position x: [1000] y: []\n        else\n            if <(LEVEL) = [4]> then\n                switch costume to (lvl 3 3 v)\n                Position x: [400] y: [0]\n            else\n                if <(LEVEL) = [5]> then\n                    switch costume to (costume5 v)\n                    Position x: [500] y: [0]\n                    Position x: [800] y: [0]\n                end\n            end\n        end\n    end\nend\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 Position x: (x) y: (y)\ncreate clone of (_myself_ v)\nchange [x v] by (x)\nchange [y v] by (y)\nnext costume\n\nwhen flag clicked\nswitch costume to (costume4 v)\n\nwhen flag clicked\nhide\n\nPosition x: [1000] y: []\n\n@Sprite4\n\nwhen I receive [greenflah v]\nshow\n\nwhen I receive [tick v]\nPosition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\n\nwhen I receive [setup v]\nset [y v] to [0]\nset [x v] to [0]\nswitch costume to (costume1 v)\nif <(LEVEL) = [1]> then\n    Position x: [450] y: [0]\n    Position x: [450] y: [0]\n    Position x: [450] y: [0]\n    Position x: [450] y: [0]\nelse\n    if <(LEVEL) = [2]> then\n        switch costume to (lvl 2 1 v)\n        Position x: [450] y: [0]\n        Position x: [1000] y: [-30]\n        Position x: [1000] y: [0]\n    else\n        if <(LEVEL) = [3]> then\n            switch costume to (lvl 3 1 v)\n            Position x: [450] y: [0]\n            Position x: [700] y: [0]\n            Position x: [450] y: []\n        else\n            if <(LEVEL) = [4]> then\n                switch costume to (lvl 3 5 v)\n                Position x: [150] y: [100]\n                Position x: [300] y: [100]\n                Position x: [500] y: [-130]\n            else\n                if <(LEVEL) = [5]> then\n                    switch costume to (lvl 2 v)\n                    Position x: [200] y: [-14]\n                    Position x: [400] y: [100]\n                    Position x: [530] y: [100]\n                end\n            end\n        end\n    end\nend\n\nPosition x: [0] y: [100]\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 Position x: (x) y: (y)\ncreate clone of (_myself_ v)\nchange [x v] by (x)\nchange [y v] by (y)\nnext costume\n\nwhen flag clicked\nhide\n\nPosition x: [300] y: [100]\n\nPosition x: [500] y: [-130]\n\n@Home\n\nwhen flag clicked\nhide\nswitch costume to (name v)\ncreate clone of (_myself_ v)\nswitch costume to (name2 v)\ncreate clone of (_myself_ v)\nswitch costume to (button 1 v)\ncreate clone of (_myself_ v)\nswitch costume to (button 2 v)\ncreate clone of (_myself_ v)\nswitch costume to (collab v)\ncreate clone of (_myself_ v)\nswitch costume to (background v)\ncreate clone of (_myself_ v)\n\ndefine Smooth Glide to x (x) y (y) Speed (s)\nrepeat until <<(round (x position)) = (x)> and <(round (y position)) = (y)>>\n    change x by (((x) - (x position)) / (s))\n    change y by (((y) - (y position)) / (s))\nend\ngo to x: (x) y: (y)\n\nwhen flag clicked\ngo to [front v] layer\ngo to x: (0) y: (0)\npoint in direction (90)\nhide\n\nwhen I start as a clone\nif <(costume [name v]) = [Name]> then\n    set [ghost v] effect to (100)\n    go to x: (0) y: (120)\n    show\n    repeat (10)\n        change [ghost v] effect by (-9)\n    end\n    set [sine v] to [0]\n    forever\n        point in direction ((([sin v] of (sine) ) * (6)) + (90))\n        change [sine v] by (10)\n    end\nend\n\nwhen I start as a clone\nif <(costume [name v]) = [Name]> then\n    forever\n        if <touching (mouse-pointer v)?> then\n            set [ghost v] effect to (5)\n            change size by (((110) - (size)) / (4))\n        else\n            set [ghost v] effect to (0)\n            change size by (((100) - (size)) / (4))\n        end\n    end\nend\n\nwhen I start as a clone\nif <(costume [name v]) = [Name2]> then\n    set [ghost v] effect to (100)\n    go to x: (-7) y: (50)\n    show\n    point in direction (90)\n    repeat (25)\n        change [ghost v] effect by (-3.5)\n    end\nend\n\nwhen I start as a clone\nif <(costume [name v]) = [Background]> then\n    set [ghost v] effect to (40)\n    go to [back v] layer\n    go to x: (10) y: (-30)\n    show\nend\n\nwhen I start as a clone\nif <(costume [name v]) = [Button 1]> then\n    forever\n        if <touching (mouse-pointer v)?> then\n            set [ghost v] effect to (5)\n            change size by (((110) - (size)) / (4))\n        else\n            set [ghost v] effect to (0)\n            change size by (((100) - (size)) / (4))\n        end\n    end\nend\n\nwhen I start as a clone\nif <(costume [name v]) = [Button 1]> then\n    set size to (85) %\n    show\n    point in direction (90)\n    go to x: (300) y: (-70)\n    Smooth Glide to x [92] y [-70] Speed [6]\n    forever\n        if <<touching (mouse-pointer v)?> and <mouse down?>> then\n            broadcast (Button 1 in v)\n        end\n    end\nend\n\nwhen I start as a clone\nif <(costume [name v]) = [Collab]> then\n    set size to (70) %\n    set [ghost v] effect to (100)\n    go to x: (0) y: (-145)\n    show\n    point in direction (90)\n    repeat (50)\n        change [ghost v] effect by (-2)\n    end\nend\n\nwhen I start as a clone\nif <(costume [name v]) = [Button 2]> then\n    set size to (80) %\n    show\n    point in direction (90)\n    go to x: (-300) y: (-70)\n    Smooth Glide to x [-92] y [-70] Speed [6]\n    forever\n        if <<touching (mouse-pointer v)?> and <mouse down?>> then\n            broadcast (Begin  v)\n        end\n    end\nend\n\nwhen I start as a clone\nif <(costume [name v]) = [Button 2]> then\n    forever\n        if <touching (mouse-pointer v)?> then\n            set [ghost v] effect to (5)\n            change size by (((110) - (size)) / (4))\n        else\n            set [ghost v] effect to (0)\n            change size by (((100) - (size)) / (4))\n        end\n    end\nend\n\nbroadcast (Begin  v)\n\nwhen I receive [begin  v]\nhide\nstop [other scripts in sprite v]\nstop [this script v]\n\n@Home2\n\nwhen flag clicked\nset size to (90) %\nset [ghost v] effect to (100)\ngo to x: (0) y: (-50)\nshow\n\nwhen I receive [button 1 in v]\nshow\ngo to [front v] layer\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\nforever\n    if <mouse down?> then\n        repeat (10)\n            change [ghost v] effect by (10)\n        end\n        hide\n    end\nend\n\n@Tn\n\nwhen flag clicked\nswitch costume to (1 v)\ngo to x: (36) y: (-24)\nforever\n    set [ghost v] effect to (100)\n    go to [front v] layer\nend\n\n