Apaul - Simple Platformer (v2.0)

Instructions: Waittt... 100K VIEWS?!!?!?! Thanks you guys soooooooooooooo much!\n\n◀️NEW GAME: https://scratch.mit.edu/projects/977802868/ ◀️\n\n40 Levels + 7 Pro Levels\n\nPlease ❤️ and ⭐️ i will be thankful :D\n\nFollow @BeeKeyProAnimations and @freder1 ✅\n\nUpdates:\n\n1 Update 03.06.2023 game relased \n\n2 Update 04.06.2023 changed game topic\n\n3 Update 06.06.2023 bounce platforms fixed\n\n4 Update 06.06.2023 added new levels!\n\n5 Update 07.06.2023 17 lvl lagging fixed and lava fixed and level 16 maked esier(Thanks @Cyberfishofant2 for help)\n\n6 Update 08.06.2023 added cave land to game and new platforms\n\n7 Update 10.06.2023 i fixed all lags in game and i again added Cave Land update\n\n8 Update 12.06.2023 Desert Land update! and world record update!\n\n9 Update 15.06.2023 Mobile Controls added!\n\n10 (LAST) Update 18.06.2023 Added PRO LEVELS

@Stage\n\nwhen I receive [new level v]\nswitch costume to (Level)\n\n@Player\n\nwhen I start as a clone\nif <(costume [number v]) = [1]> then\n    switch costume to (eyelid v)\n    go [forward v] (1) layers\n    forever\n        go to (player v)\n        change y by (8)\n        if <(pick random (0) to (200)) = [0]> then\n            set [eyelid v] to [8]\n            repeat (8)\n                change [eyelid v] by (-1)\n                go to (player v)\n                change y by (eyelid)\n            end\n            repeat (8)\n                change [eyelid v] by (1)\n                go to (player v)\n                change y by (eyelid)\n            end\n        end\n    end\nelse\n    set [start x v] to (pick random (3) to (10))\n    set [start y v] to (pick random (-90) to (90))\n    set [x speed v] to ((start x) * ([sin v] of (start y) ))\n    set [y speed v] to ((start x) * ([cos v] of (start y) ))\n    set [brightness v] effect to (pick random (-10) to (10))\n    repeat (25)\n        change [y speed v] by (-1)\n        change [ghost v] effect by (4)\n        change x by (x speed)\n        change y by (y speed)\n    end\n    delete this clone\nend\n\ndefine Spawn Particles\nswitch costume to (particle v)\nrepeat (20)\n    create clone of (_myself_ v)\nend\nswitch costume to (player v)\n\nwhen I receive [new level v]\nif <(costume [number v]) = [3]> then\n    delete this clone\nend\n\nwhen I receive [start v]\nset [level v] to [1]\nbroadcast (New Level v) and wait\nswitch costume to (player v)\ngo to x: (0) y: (0)\nset [x speed v] to [0]\nset [y speed v] to [0]\ncreate clone of (_myself_ v)\nforever\n    if <<key (right arrow v) pressed?> or <<mouse down?> and <(x position) < (mouse x)>>> then\n        change [x speed v] by (2)\n    end\n    if <<key (left arrow v) pressed?> or <<mouse down?> and <(mouse x) < (x position)>>> then\n        change [x speed v] by (-2)\n    end\n    set [x speed v] to ((x speed) * (0.8))\n    change x by (x speed)\n    if <touching (ground v)?> then\n        change y by (1)\n        if <touching (ground v)?> then\n            change y by (1)\n            if <touching (ground v)?> then\n                change y by (1)\n                if <touching (ground v)?> then\n                    change y by (1)\n                    if <touching (ground v)?> then\n                        change y by (1)\n                        if <touching (ground v)?> then\n                            change y by (1)\n                            if <touching (ground v)?> then\n                                change y by (-6)\n                                change x by ((0) - (x speed))\n                                set [x speed v] to ((x speed) * (0.5))\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\n    change [y speed v] by (-1)\n    set [y speed v] to ((y speed) * (0.95))\n    change y by (y speed)\n    if <touching (ground v)?> then\n        change y by ((0) - (y speed))\n        if <<(y speed) < [0]> and <<key (up arrow v) pressed?> or <<mouse down?> and <((y position) + (20)) < (mouse y)>>>> then\n            set [y speed v] to [15]\n        else\n            set [y speed v] to ((y speed) * (0.5))\n        end\n    end\n    if <(x position) > [225]> then\n        change [level v] by (1)\n        set x to (-225)\n        set [start x v] to (x position)\n        set [start y v] to (y position)\n        broadcast (New Level v) and wait\n    end\n    if <(x position) < [-225]> then\n        change [level v] by (-1)\n        set x to (225)\n        set [start x v] to (x position)\n        set [start y v] to (y position)\n        broadcast (New Level v) and wait\n    end\n    if <<(y position) < [-175]> or <touching (danger v)?>> then\n        Spawn Particles\n        set [x speed v] to [0]\n        set [y speed v] to [0]\n        go to x: (start x) y: (start y)\n    end\nend\n\n@Ground\n\nwhen I receive [new level v]\nswitch costume to (Level)\n\n@Effect\n\n@Decorations\n\nwhen I start as a clone\nshow\nforever\n    if <(letter (1) of (costume [name v])) = [V]> then\n        Decoration decrease % [0.98] player effect [-0.01] reset factor [0.02]\n    end\n    if <(letter (1) of (costume [name v])) = [G]> then\n        Decoration decrease % [0.95] player effect [0.06] reset factor [0.2]\n    end\n    if <(letter (1) of (costume [name v])) = [S]> then\n        Decoration decrease % [1] player effect [0] reset factor [0]\n    end\n    if <(letter (1) of (costume [name v])) = [O]> then\n        change [speed v] by (4)\n        set [brightness v] effect to ((7) * ([sin v] of (speed) ))\n        if <touching (player v)?> then\n            broadcast (Win v)\n            forever\n                change [speed v] by (4)\n                set [brightness v] effect to ((7) * ([sin v] of (speed) ))\n            end\n        end\n    end\nend\n\ndefine Decoration decrease % (decrease %) player effect (player effect) reset factor (reset factor)\nset [speed v] to ((speed) * (decrease %))\nif <touching (player v)?> then\n    change [speed v] by ((player effect) * ([x speed v] of [player v]))\nend\nif <(direction) > [90.5]> then\n    change [speed v] by ((0) - (reset factor))\nend\nif <(direction) < [89.5]> then\n    change [speed v] by (reset factor)\nend\nturn right (speed) degrees\n\nwhen I receive [new level v]\nif <[0] = [0]> then\n    delete this clone\nend\nClone\n\ndefine Clone\npoint in direction (90)\nset [speed v] to [0]\nif <(Level) = [2]> then\n    switch costume to (vine 1 v)\n    go to x: (-10) y: (149)\n    repeat (5)\n        create clone of (_myself_ v)\n        change x by (15)\n    end\n    switch costume to (grass 1 v)\n    go to x: (83) y: (-38)\n    repeat (3)\n        repeat (3)\n            create clone of (_myself_ v)\n            next costume\n        end\n        switch costume to (grass 1 v)\n        change x by (50)\n    end\nend\nif <(Level) = [3]> then\n    switch costume to (grass 1 v)\n    go to x: (-200) y: (-22)\n    repeat (2)\n        repeat (3)\n            create clone of (_myself_ v)\n            next costume\n        end\n        switch costume to (grass 1 v)\n        change x by (60)\n    end\n    go to x: (28) y: (40)\n    repeat (3)\n        create clone of (_myself_ v)\n        next costume\n    end\n    switch costume to (grass 1 v)\n    go to x: (194) y: (-22)\n    repeat (3)\n        create clone of (_myself_ v)\n        next costume\n    end\nend\nif <(Level) = [4]> then\n    switch costume to (vine 1 v)\n    go to x: (9) y: (142)\n    repeat (4)\n        create clone of (_myself_ v)\n        change x by (65)\n    end\nend\nif <(Level) = [5]> then\n    switch costume to (vine 1 v)\n    go to x: (-9) y: (142)\n    repeat (4)\n        create clone of (_myself_ v)\n        change x by (-65)\n    end\nend\nif <(Level) = [6]> then\n    switch costume to (grass 1 v)\n    go to x: (-80) y: (60)\n    repeat (2)\n        repeat (3)\n            create clone of (_myself_ v)\n            next costume\n        end\n        switch costume to (grass 1 v)\n        change x by (125)\n    end\n    switch costume to (shaft v)\n    go to x: (-17) y: (112)\n    set [speed v] to [2]\n    create clone of (_myself_ v)\n    set [speed v] to [0]\nend\nif <(Level) = [9]> then\n    switch costume to (vine 2 v)\n    go to x: (-75) y: (50)\n    create clone of (_myself_ v)\n    go to x: (-30) y: (60)\n    create clone of (_myself_ v)\n    go to x: (15) y: (62)\n    create clone of (_myself_ v)\n    go to x: (64) y: (47)\n    create clone of (_myself_ v)\n    switch costume to (orb v)\n    go to x: (0) y: (0)\n    create clone of (_myself_ v)\n    switch costume to (grass 1 v)\n    go to x: (-30) y: (-55)\n    repeat (2)\n        repeat (3)\n            create clone of (_myself_ v)\n            next costume\n        end\n        switch costume to (grass 1 v)\n        change x by (60)\n    end\nend\n\n@Danger\n\nwhen I receive [new level v]\nif <[0] = [0]> then\n    delete this clone\nend\nClone\n\ndefine Clone\npoint in direction (90)\nset [speed v] to [0]\nif <(Level) = [6]> then\n    switch costume to (gear 1 v)\n    go to x: (-17) y: (112)\n    repeat (2)\n        create clone of (_myself_ v)\n        turn right (180) degrees\n    end\nend\nif <(Level) = [7]> then\n    switch costume to (gear 1 v)\n    go to x: (-100) y: (-190)\n    point in direction (-90)\n    repeat (3)\n        create clone of (_myself_ v)\n        change x by (100)\n        turn left (60) degrees\n    end\n    point in direction (90)\nend\nif <(Level) = [8]> then\n    switch costume to (gear 2 v)\n    go to x: (115) y: (200)\n    create clone of (_myself_ v)\n    go to x: (-1) y: (1)\n    set [speed v] to [1]\n    create clone of (_myself_ v)\n    set [speed v] to [0]\nend\n\nwhen I start as a clone\nshow\nset [origin x v] to (x position)\nset [origin y v] to (y position)\nset [origin direction v] to (direction)\nif <<(speed) = [1]> and <(costume [name v]) = [Gear 2]>> then\n    set [speed v] to [0.6]\n    go to x: (7) y: (-12)\n    repeat (38)\n        turn right (-8) degrees\n        set [speed v] to ((speed) * (0.95))\n        change [speed v] by (-1)\n        change y by (speed)\n        if <(x position) < [115]> then\n            set [speed v] to ((speed) * (0.95))\n            change x by (-3)\n        end\n        if <(y position) < [-20]> then\n            set [speed v] to ((0) - (speed))\n            change y by (speed)\n            change x by (-1)\n        end\n    end\n    repeat (22)\n        turn right (-8) degrees\n        set [speed v] to ((speed) * (0.95))\n        change [speed v] by (-1)\n        change y by (speed)\n        change x by (-3)\n    end\nend\nforever\n    if <(costume [name v]) = [Gear 1]> then\n        if <(Level) = [6]> then\n            change [origin direction v] by (2)\n            go to x: ((origin x) + (([sin v] of (origin direction) ) * (150))) y: ((origin y) + (([cos v] of (origin direction) ) * (150)))\n            turn right (-4) degrees\n        end\n        if <(Level) = [7]> then\n            if <(origin direction) > [90]> then\n                change [origin direction v] by (-180)\n            end\n            change [origin direction v] by (4)\n            go to x: ((origin x) + (([sin v] of (origin direction) ) * (40))) y: ((origin y) + (([cos v] of (origin direction) ) * (250)))\n            turn right (-8) degrees\n        end\n    end\n    if <(costume [name v]) = [Gear 2]> then\n        set [speed v] to [0]\n        go to x: (115) y: (200)\n        repeat (98)\n            turn right (-8) degrees\n            set [speed v] to ((speed) * (0.95))\n            change [speed v] by (-1)\n            change y by (speed)\n            if <(x position) < [115]> then\n                set [speed v] to ((speed) * (0.95))\n                change x by (-3)\n            end\n            if <(y position) < [-20]> then\n                set [speed v] to ((0) - (speed))\n                change y by (speed)\n                change x by (-1)\n            end\n        end\n        repeat (22)\n            turn right (-8) degrees\n            set [speed v] to ((speed) * (0.95))\n            change [speed v] by (-1)\n            change y by (speed)\n            change x by (-3)\n        end\n    end\nend\n\n@Thumbnail\n\nwhen flag clicked\nswitch costume to (intro v)\nshow\nwait (1) seconds\nClone [Line 1]\nwait (1) seconds\nClone [Line 2]\nwait (3) seconds\nClone [Line 3]\nwait (1) seconds\nClone [Line 4]\nwait (3) seconds\nClone [Line 5]\nwait (2) seconds\nClone [Line 6]\nwait (4) seconds\nbroadcast (Start v)\nswitch costume to (thumbnail v)\nwait (0.5) seconds\nstart sound [Seven Years In Tibet - Theme - John Williams v]\nrepeat (50)\n    change [ghost v] effect by (2)\nend\n\nwhen I start as a clone\nset [ghost v] effect to (100)\ngo [forward v] (1) layers\nrepeat (20)\n    change [ghost v] effect by (-5)\nend\n\ndefine Clone (line)\nswitch costume to (line)\ncreate clone of (_myself_ v)\nswitch costume to (intro v)\n\nwhen I receive [start v]\ndelete this clone\n\nwhen I receive [win v]\nswitch costume to (win v)\nrepeat (20)\n    change [ghost v] effect by (-5)\nend\n\n