A Single Life - Platformer
@Stage\n\nwhen flag clicked\nforever\n    if <(Level) = [1]> then\n        switch backdrop to (backdrop2 v)\n    end\n    if <(Level) = [8]> then\n        switch backdrop to (backdrop3 v)\n    end\n    if <(Level) = [9]> then\n        switch backdrop to (backdrop4 v)\n    end\n    if <(Level) = [10]> then\n        switch backdrop to (backdrop5 v)\n    end\n    if <(Level) = [11]> then\n        switch backdrop to (backdrop6 v)\n    end\n    if <(Level) = [12]> then\n        switch backdrop to (backdrop7 v)\n    end\n    if <<(Level) > [1]> and <(Level) < [8]>> then\n        switch backdrop to (backdrop1 v)\n    end\nend\n\nif <<[] = [8]> or <[] = [9]>> then\n    if <(Level) = [8]> then\nelse\n    switch backdrop to (backdrop1 v)\nend\n\n\n\nswitch backdrop to (backdrop3 v)\n\nwhen flag clicked\nhide variable [chance of epic song v]\nset [chance of epic song v] to (pick random (1) to (15))\nforever\n    if <(chance of epic song) = [15]> then\n        play sound [The Pelones - Megalovania \(Full Version\) v] until done\n    end\nend\n\nif <key (e v) pressed?> then\n    show variable [chance of epic song v]\n    wait until <not <key (e v) pressed?>>\n    hide variable [chance of epic song v]\nend\n\nset [level v] to [12]\n\n@player\n\ndefine Platform Gravity: (gravity) Jump Height: (jump height) Side Movement Speed: (side movement) Fricktion: (friction)\nif <(Intro) = [0]> then\n    change [y velo v] by (gravity)\n    change y by (Y Velo)\nend\nif <(Life) = [1]> then\n    if <(Intro) = [0]> then\n        if <<<<touching (level v)?> or <touching (moving stuff v)?>> or <touching (ladder level 12 v)?>> or <touching (sack climbable v)?>> then\n            repeat until <not <<<<touching (level v)?> or <touching (moving stuff v)?>> or <touching (ladder level 12 v)?>> or <touching (sack climbable v)?>>>\n                change y by ((([abs v] of (Y Velo) ) / (Y Velo)) * (-1))\n            end\n            set [y velo v] to (<<<<<<key (w v) pressed?> or <key (up arrow v) pressed?>> or <(Mobile Arrow) = [Up]>> or <(Mobile Arrow) = [Up and Left]>> or <(Mobile Arrow) = [Up and Right]>> and <(([abs v] of (Y Velo) ) / (Y Velo)) = [-1]>> * (jump height))\n        end\n        set [x velo v] to (((X Velo) + ((<<<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <(Mobile Arrow) = [Left]>> or <(Mobile Arrow) = [Up and Left]>> * ((side movement) * (-1))) + (<<<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <(Mobile Arrow) = [Right]>> or <(Mobile Arrow) = [Up and Right]>> * (side movement)))) * (friction))\n        change x by (X Velo)\n        if <<<<touching (level v)?> or <touching (moving stuff v)?>> or <touching (ladder level 12 v)?>> or <touching (sack climbable v)?>> then\n            repeat until <not <<<<touching (level v)?> or <touching (moving stuff v)?>> or <touching (ladder level 12 v)?>> or <touching (sack climbable v)?>>>\n                change x by ((([abs v] of (X Velo) ) / (X Velo)) * (-1))\n            end\n        end\n    end\nend\n\nwhen flag clicked\ngo to x: (-193) y: (6)\nswitch costume to (normal v)\nhide\nset [chance of e v] to (pick random (1) to (10))\n\nif <(Y Velo) = [0]> then\n    switch costume to (normal v)\nend\nif <not <(Y Velo) = [0]>> then\n    switch costume to (costume2 v)\nend\n\nwhen I receive [death v]\nswitch costume to (ow :\( v)\nif <(chance of e) = [10]> then\n    play sound [e v] until done\nend\n\ngo [forward v] (1) layers\n\nwhen I receive [start v]\nswitch costume to (normal v)\nshow\nset [life v] to [1]\nforever\n    if <(Intro) = [0]> then\n        if <(Life) = [1]> then\n            if <<<<key (a v) pressed?> or <key (left arrow v) pressed?>> or <(Mobile Arrow) = [Left]>> or <(Mobile Arrow) = [Up and Left]>> then\n                point in direction (-90)\n            end\n            if <<<<key (d v) pressed?> or <key (right arrow v) pressed?>> or <(Mobile Arrow) = [Right]>> or <(Mobile Arrow) = [Up and Right]>> then\n                point in direction (90)\n            end\n        end\n        if <<(x position) = [249]> or <(x position) = [263]>> then\n            change [level v] by (1)\n            go to x: (-193) y: (6)\n        end\n        if <<(y position) = [-216]> or <(y position) = [-184]>> then\n            broadcast (death v)\n            hide\n            set [life v] to [0]\n        end\n        if <touching (danger v)?> then\n            set [life v] to [0]\n            broadcast (death v)\n        end\n        if <<(Level) = [12]> or <(Level) > [12]>> then\n            if <key (i v) pressed?> then\n                if <not <(username) = [epicboi17]>> then\n                    switch costume to (inventory v)\n                end\n            end\n            if <not <key (i v) pressed?>> then\n                if <not <(username) = [epicboi17]>> then\n                    switch costume to (anger v)\n                else\n                    switch costume to (roblox avatar v)\n                end\n            end\n        end\n        if <<key (down arrow v) pressed?> or <key (s v) pressed?>> then\n            switch costume to (crawl v)\n        end\n    end\nend\n\nwhen I receive [start v]\nswitch costume to (normal v)\nset [x velo v] to [0]\nset [y velo v] to [0]\nforever\n    if <not <touching (slow stuff v)?>> then\n        Platform Gravity: [-1] Jump Height: [15] Side Movement Speed: [3] Fricktion: [0.7]\n    end\n    if <touching (slow stuff v)?> then\n        Platform Gravity: [-1] Jump Height: [10] Side Movement Speed: [1] Fricktion: [0.7]\n    end\nend\n\nset [x velo v] to [1]\n\nset [x velo v] to [1]\n\nwhen I receive [begin cave intro v]\nhide\nset volume to (100) %\nforever\n    if <not <(skip cave intro) = [1]>> then\n        if <(Intro) = [2]> then\n            wait (6.9) seconds\n            play sound [plot? v] until done\n        end\n        if <(Intro) = [0]> then\n            set volume to (0) %\n        end\n    end\nend\n\nwhen I receive [begin cave intro v]\ngo to x: (-193) y: (6)\n\nhide\n\nwhen I receive [start cave level v]\nshow\n\nwhen I receive [start cave level v]\nswitch costume to (anger v)\n\nwhen flag clicked\nforever\n    if <(chance of epic song) = [15]> then\n        if <not <(username) = [epicboi17]>> then\n            switch costume to (epic music v)\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(username) = [epicboi17]> then\n        switch costume to (roblox avatar v)\n    end\n    if <not <(username) = [epicboi17]>> then\n        if <not <(chance of epic song) = [15]>> then\n            if <not <(Level) < [10]>> then\n                switch costume to (normal v)\n            else\n                switch costume to (anger v)\n            end\n        else\n            switch costume to (epic music v)\n        end\n    end\nend\n\nstop all sounds\n\nset [level v] to [9]\n\nwhen flag clicked\nforever\n    if <(Level) = [11]> then\n        broadcast (level 11 think v)\n    end\n    if <(Level) = [12]> then\n        wait (1) seconds\n        stop [this script v]\n    end\nend\n\nthink [This definitely is plot..]\n\nwhen I receive [level 11 think v]\nthink [This definitely is plot..] for (0.001) seconds\n\nif <<(costume [name v]) = [normal]> or <(costume [name v]) = [roblox avatar]>> then\n\nif <(costume [name v]) = [crawl]> then\n\n\n\nstop [this script v]\n\nstop [this script v]\n\nstop [this script v]\n\nstart sound [TheFatRat Unity+Megalovania v]\n\nwhen I receive [begin cave intro v]\nhide\nset volume to (100) %\nforever\n    if <(skip cave intro) = [1]> then\n        set volume to (0) %\n    end\nend\n\nif <not <(skip cave intro) = [1]>> then\n    if <(Intro) = [2]> then\n        wait (6.9) seconds\n        play sound [plot? v] until done\n    end\n    if <(Intro) = [0]> then\n        set volume to (0) %\n    end\nend\n\n@Level\n\nwhen flag clicked\nset [level v] to [1]\ngo to x: (0) y: (0)\nhide\n\nwhen I receive [start v]\nshow\nforever\n    switch costume to (Level)\nend\n\nset [level v] to [11]\n\nset [level v] to [13]\n\nset [level v] to [10]\n\n@you died\n\nwhen flag clicked\nhide\nset [life v] to [1]\nset [ghost v] effect to (100)\ngo to [front v] layer\nforever\n    if <(Life) = [0]> then\n        show\n        repeat (50)\n            change [ghost v] effect by (-2)\n        end\n        stop [all v]\n    end\nend\n\n@danger\n\nwhen flag clicked\ngo to x: (0) y: (0)\nforever\n    switch costume to (Level)\nend\n\nwhen flag clicked\ngo to x: (0) y: (0)\nforever\n    if <(Level) = [5]> then\n        repeat until <(Level) = [6]>\n            change y by (-10)\n            if <(y position) = [-343]> then\n                go to x: (0) y: (0)\n            end\n        end\n    end\nend\n\nforever\n\nwhen flag clicked\ngo to x: (0) y: (0)\nforever\n    if <not <<<(Level) = [5]> or <(Level) = [6]>> or <(Level) = [9]>>> then\n        go to x: (0) y: (0)\n    end\nend\n\nwhen flag clicked\ngo to x: (0) y: (0)\nforever\n    if <(Level) = [6]> then\nend\n\ngo to x: (0) y: (0)\n\nwhen flag clicked\ngo to x: (0) y: (0)\nforever\n    if  then\n        set y to (0)\n    end\n    if  then\n        set x to (0)\n    end\nend\n\ngo [forward v] (1) layers\n\nwhen flag clicked\ngo to x: (0) y: (0)\nforever\n    if <(Level) = [9]> then\n        repeat until <(Level) = [10]>\n            change x by (-7)\n            if <(x position) = [-458]> then\n                go to x: (0) y: (0)\n            end\n        end\n    end\nend\n\nforever\n    set x to (mouse x)\nend\n\n\n\nrepeat until <(Level) = [7]>\n    repeat (8)\n        change x by (-10)\n    end\n    wait (0.1) seconds\n    repeat (8)\n        change x by (10)\n    end\nend\n\nwhen flag clicked\ngo to x: (0) y: (0)\nforever\n    if <<(Level) = [10]> or > then\n        set [ghost v] effect to (40)\n    else\n        set [ghost v] effect to (0)\n    end\nend\n\n@decoration\n\nwhen flag clicked\nforever\n    switch costume to (2 v)\n    if <<(Level) = [10]> or <(Level) = [11]>> then\n        set [ghost v] effect to (30)\n    else\n        set [ghost v] effect to (0)\n    end\nend\n\ngo [forward v] (1) layers\n\nwhen flag clicked\nforever\n    switch costume to (Level)\n    if <<<(Level) = [7]> or <(Level) = [3]>> or <(Level) = [11]>> then\n        go to [back v] layer\n    else\n        go to [front v] layer\n    end\nend\n\nset [ghost v] effect to (20)\n\nset [ghost v] effect to (0)\n\nwhen flag clicked\nhide\n\nwhen flag clicked\nforever\n    if <(Life) = [0]> then\n        go to [back v] layer\n    else\n    end\nend\n\nwhen I receive [start v]\nforever\n    if <not <(Intro) = [0]>> then\n        hide\n    else\n        show\n    end\nend\n\n@story wow\n\nwhen flag clicked\nhide\n\nwhen I receive [start v]\nhide\nforever\n    if <(Level) = [10]> then\n        if <(Intro) = [0]> then\n            set [intro v] to [2]\n            if <not <(Intro) = [0]>> then\n                set [intro v] to [2]\n                broadcast (begin cave intro v)\n                show\n                switch costume to (costume4 v)\n                wait (3.7) seconds\n                switch costume to (costume5 v)\n                wait (3.2) seconds\n                switch costume to (costume6 v)\n                wait (1.09) seconds\n                switch costume to (costume7 v)\n                wait (3.5) seconds\n                broadcast (start cave level v)\n                set [intro v] to [0]\n                hide\n                stop [this script v]\n            end\n        end\n    end\nend\n\nwhen I receive [start intro v]\nset [intro v] to [1]\nshow\nswitch costume to (costume1 v)\nwait (2) seconds\nswitch costume to (costume2 v)\nwait (6) seconds\nswitch costume to (costume3 v)\nwait (2.7) seconds\nbroadcast (start v)\nhide\nset [intro v] to [0]\n\ngo [forward v] (1) layers\n\ngo to [front v] layer\n\nwhen I receive [start cave level v]\nhide\n\nwhen I receive [start v]\n\nif <(Level) = [10]> then\n    set [intro v] to [2]\n    stop [this script v]\nend\n\n@skip intro\n\nwhen I receive [start v]\nhide\n\nwhen flag clicked\nhide\n\nbroadcast (start v)\n\nwhen I receive [start intro v]\nswitch costume to (skip v)\nset [skip cave intro v] to [0]\nshow\nforever\n    if <(Intro) = [1]> then\n        show\n        if <<touching (mouse-pointer v)?> and <mouse down?>> then\n            broadcast (start v)\n            set [intro v] to [0]\n        end\n        if <touching (mouse-pointer v)?> then\n            switch costume to (skip2 v)\n        end\n        if <not <touching (mouse-pointer v)?>> then\n            switch costume to (skip v)\n        end\n    end\n    if <(Intro) = [2]> then\n        show\n        if <<touching (mouse-pointer v)?> and <mouse down?>> then\n            set [skip cave intro v] to [1]\n            broadcast (start cave level v)\n            set [intro v] to [0]\n        end\n        if <touching (mouse-pointer v)?> then\n            switch costume to (skip2 v)\n        end\n        if <not <touching (mouse-pointer v)?>> then\n            switch costume to (skip v)\n        end\n    end\nend\n\ngo [forward v] (1) layers\n\nwhen I receive [start cave level v]\nhide\n\n@START\n\nwhen flag clicked\nshow\ngo to [front v] layer\nswitch costume to (costume1 v)\nforever\n    if <touching (mouse-pointer v)?> then\n        switch costume to (costume2 v)\n        if <mouse down?> then\n            broadcast (start intro v)\n        end\n    else\n        switch costume to (costume1 v)\n    end\nend\n\nwhen I receive [start intro v]\nhide\nstop [other scripts in sprite v]\n\n@device?\n\nwhen flag clicked\nswitch costume to (pc v)\nshow\nset [device: v] to [PC]\nset [ghost v] effect to (50)\nforever\n    if <touching (mouse-pointer v)?> then\n        set [ghost v] effect to (30)\n        if <mouse down?> then\n            if <(Device:) = [PC]> then\n                set [device: v] to [Mobile]\n                switch costume to (mobile v)\n                wait (0.3) seconds\n            end\n        end\n        if <mouse down?> then\n            if <(Device:) = [Mobile]> then\n                set [device: v] to [PC]\n                switch costume to (pc v)\n                wait (0.3) seconds\n            end\n        end\n    else\n        set [ghost v] effect to (50)\n    end\nend\n\nwhen I receive [start intro v]\nhide\nstop [other scripts in sprite v]\n\ngo [forward v] (1) layers\n\nif <(Level) = [0]> then\nend\n\n@mobile left\n\nwhen flag clicked\nset [ghost v] effect to (60)\nhide\n\nwhen I receive [start v]\nforever\n    if <(Device:) = [Mobile]> then\n        show\n    else\n        hide\n    end\nend\n\nwhen I receive [start v]\nforever\n    if <(Device:) = [Mobile]> then\n        show\n        if <touching (mouse-pointer v)?> then\n            if <mouse down?> then\n                set [mobile arrow v] to [Left]\n                set [touching mobile arrow? v] to [1]\n                set [ghost v] effect to (30)\n            else\n                set [mobile arrow v] to [0]\n                set [touching mobile arrow? v] to [0]\n                set [ghost v] effect to (60)\n            end\n        end\n    else\n        hide\n    end\nend\n\nwhen I receive [start v]\nforever\nend\n\nif <not <<(Mobile Arrow) = [Up]> or <<(Mobile Arrow) = [Left]> or <(Mobile Arrow) = [Right]>>>> then\n    set [mobile arrow v] to [0]\n    set [touching mobile arrow? v] to [0]\nend\n\n@mobile right\n\nwhen flag clicked\nset [ghost v] effect to (60)\nhide\n\nwhen I receive [start v]\nforever\n    if <(Device:) = [Mobile]> then\n        show\n    else\n        hide\n    end\nend\n\nwhen I receive [start v]\nforever\n    if <(Device:) = [Mobile]> then\n        show\n        if <touching (mouse-pointer v)?> then\n            if <mouse down?> then\n                set [mobile arrow v] to [Right]\n                set [touching mobile arrow? v] to [1]\n                set [ghost v] effect to (30)\n            else\n                set [mobile arrow v] to [0]\n                set [touching mobile arrow? v] to [0]\n                set [ghost v] effect to (60)\n            end\n        end\n    else\n        hide\n    end\nend\n\nwhen I receive [start v]\nforever\nend\n\nif <not <<(Mobile Arrow) = [Up]> or <<(Mobile Arrow) = [Left]> or <(Mobile Arrow) = [Right]>>>> then\n    set [mobile arrow v] to [0]\n    set [touching mobile arrow? v] to [0]\nend\n\n@thumbnail\n\nwhen flag clicked\nshow\ngo to x: (0) y: (0)\n\ngo to [front v] layer\n\nwhen I receive [start intro v]\nhide\n\ngo [forward v] (1) layers\n\nwhen flag clicked\nforever\n    if <(username) = [epicboi17]> then\n        if <key (l v) pressed?> then\n            show variable [level v]\n        else\n            hide variable [level v]\n        end\n    end\nend\n\n@mobile up\n\nwhen flag clicked\nset [touching mobile arrow? v] to [0]\nset [mobile arrow v] to [0]\nset [ghost v] effect to (60)\nhide\n\nwhen I receive [start v]\nforever\n    if <(Device:) = [Mobile]> then\n        show\n        if <touching (mouse-pointer v)?> then\n            if <mouse down?> then\n                set [mobile arrow v] to [Up]\n                set [touching mobile arrow? v] to [1]\n                set [ghost v] effect to (30)\n            else\n                set [mobile arrow v] to [0]\n                set [touching mobile arrow? v] to [0]\n                set [ghost v] effect to (60)\n            end\n        end\n    else\n        hide\n    end\nend\n\nwhen I receive [start v]\nforever\n    if  then\n    end\nend\n\nif  then\n    show\nelse\n    hide\nend\n\nset [mobile arrow v] to [Up]\n\nwhen I receive [start v]\nforever\nend\n\nif <not <<(Mobile Arrow) = [Up]> or <<(Mobile Arrow) = [Left]> or <(Mobile Arrow) = [Right]>>>> then\n    set [mobile arrow v] to [0]\n    set [touching mobile arrow? v] to [0]\nend\n\ngo [forward v] (1) layers\n\n@slow stuff\n\nwhen I receive [start v]\nshow\nforever\n    switch costume to (Level)\nend\n\nwhen flag clicked\nhide\n\n@mobile diagonal r\n\nwhen flag clicked\nset [touching mobile arrow? v] to [0]\nset [mobile arrow v] to [0]\nset [ghost v] effect to (60)\nhide\n\nwhen I receive [start v]\nforever\n    if <(Device:) = [Mobile]> then\n        show\n        if <touching (mouse-pointer v)?> then\n            if <mouse down?> then\n                set [mobile arrow v] to [Up and Right]\n                set [touching mobile arrow? v] to [1]\n                set [ghost v] effect to (30)\n            else\n                set [mobile arrow v] to [0]\n                set [touching mobile arrow? v] to [0]\n                set [ghost v] effect to (60)\n            end\n        end\n    else\n        hide\n    end\nend\n\nwhen I receive [start v]\nforever\n    \nend\n\n\n    show\nelse\n    hide\nend\n\nset [mobile arrow v] to [Up]\n\nwhen I receive [start v]\nforever\n    if  then\n        set [mobile arrow v] to [0]\n        set [touching mobile arrow? v] to [0]\n    end\nend\n\ngo [forward v] (1) layers\n\n@mobile diagonal l\n\nwhen flag clicked\nset [touching mobile arrow? v] to [0]\nset [mobile arrow v] to [0]\nset [ghost v] effect to (60)\nhide\n\nwhen I receive [start v]\nforever\n    if <(Device:) = [Mobile]> then\n        show\n        if <touching (mouse-pointer v)?> then\n            if <mouse down?> then\n                set [mobile arrow v] to [Up and Left]\n                set [touching mobile arrow? v] to [1]\n                set [ghost v] effect to (30)\n            else\n                set [mobile arrow v] to [0]\n                set [touching mobile arrow? v] to [0]\n                set [ghost v] effect to (60)\n            end\n        end\n    else\n        hide\n    end\nend\n\nwhen I receive [start v]\nforever\n    \nend\n\n\n    show\nelse\n    hide\nend\n\nset [mobile arrow v] to [Up]\n\nwhen I receive [start v]\nforever\n    if  then\n        set [mobile arrow v] to [0]\n        set [touching mobile arrow? v] to [0]\n    end\nend\n\ngo [forward v] (1) layers\n\n@mobile inventory\n\nwhen flag clicked\nset [touching mobile arrow? v] to [0]\nset [mobile arrow v] to [0]\nset [ghost v] effect to (60)\nhide\n\nwhen I receive [start cave level v]\ngo to x: (-124) y: (-144)\nset [mobile: inventory on/off? v] to [Off]\nforever\n    if <not <(Level) < [12]>> then\n        if <(Device:) = [Mobile]> then\n            show\n            if <touching (mouse-pointer v)?> then\n                set [ghost v] effect to (30)\n                if <mouse down?> then\n                    if <(Mobile: Inventory on/off?) = [Off]> then\n                        set [mobile: inventory on/off? v] to [On]\n                        wait (0.3) seconds\n                    end\n                end\n                if <mouse down?> then\n                    if <(Mobile: Inventory on/off?) = [On]> then\n                        set [mobile: inventory on/off? v] to [Off]\n                        wait (0.3) seconds\n                    end\n                end\n            else\n                set [ghost v] effect to (60)\n            end\n        else\n            hide\n        end\n    else\n        hide\n    end\nend\n\nif  then\nend\n\nset [touching mobile arrow? v] to [1]\n\nset [touching mobile arrow? v] to [0]\n\nset [mobile arrow v] to [Up]\n\nset [mobile arrow v] to [0]\nset [touching mobile arrow? v] to [0]\n\nif  then\n\n@moving stuff\n\nwhen flag clicked\ngo to x: (111) y: (-73)\nhide\nforever\n    switch costume to (Level)\nend\n\nwhen I receive [start cave level v]\nshow\nforever\n    if <(Level) = [11]> then\n        glide (1) secs to x: (-89) y: (-73)\n        glide (0.5) secs to x: (-89) y: (47)\n        glide (1) secs to x: (-69) y: (47)\n        glide (0.2) secs to x: (-89) y: (47)\n        glide (1) secs to x: (-89) y: (-73)\n        glide (1) secs to x: (111) y: (-73)\n    end\nend\n\nrepeat (20)\n    change x by (-10)\nend\n\nrepeat (12)\n    change y by (10)\nend\n\nrepeat (5)\n    change x by (2)\nend\nrepeat (5)\n    change x by (2)\nend\n\nrepeat (2)\n    change x by (-5)\nend\nrepeat (2)\n    change x by (-5)\nend\n\nrepeat (12)\n    change y by (-10)\nend\n\nrepeat (20)\n    change x by (10)\nend\n\ngo to x: (111) y: (-73)\n\nset [level v] to [12]\n\nbroadcast (start cave level v)\n\n@Ladder (pickup)\n\nwhen flag clicked\nset [ladder v] to [0]\nhide\ngo to x: (195) y: (-114)\n\nwhen I receive [start cave level v]\nforever\n    if <(Level) = [12]> then\n        show\n        if <(Ladder) = [0]> then\n            if <touching (player v)?> then\n                change [ladder v] by (1)\n                wait (0.3) seconds\n            end\n        else\n            hide\n        end\n    else\n        hide\n    end\nend\n\nwhen I receive [start cave level v]\nforever\n    if <(Level) = [12]> then\n        repeat (10)\n            change y by (1)\n        end\n        repeat (10)\n            change y by (-1)\n        end\n    else\n        hide\n    end\nend\n\nshow\n\n\n\nhide\n\n\n\n@Ladder (placed)\n\n@Ladder (inventory)\n\nwhen I receive [start cave level v]\nforever\n    if <key (i v) pressed?> then\n        if <(Ladder) = [1]> then\n            repeat until <not <key (i v) pressed?>>\n                repeat (10)\n                    change y by (1)\n                end\n                repeat (10)\n                    change y by (-1)\n                end\n            end\n        end\n    end\n    go to x: (-192) y: (100)\nend\n\nwhen I receive [start cave level v]\nset [mouse-pointer touching inventory ladder? v] to [0]\nforever\n    if <(Ladder) = [1]> then\n        if <key (i v) pressed?> then\n            show\n            wait until <not <key (i v) pressed?>>\n            hide\n        end\n    else\n        hide\n    end\nend\n\nwhen I receive [start cave level v]\nforever\n    if <key (i v) pressed?> then\n        if <(Ladder) = [1]> then\n            if <touching (mouse-pointer v)?> then\n                set [ghost v] effect to (0)\n                set [mouse-pointer touching inventory ladder? v] to [1]\n            else\n                set [ghost v] effect to (30)\n                set [mouse-pointer touching inventory ladder? v] to [0]\n            end\n        end\n    end\nend\n\nwhen flag clicked\nhide\ngo to x: (-192) y: (100)\n\nif  then\n\nwhen I receive [start cave level v]\nforever\n    if <(Ladder) = [1]> then\n        if <(Mobile: Inventory on/off?) = [On]> then\n            show\n            wait until <(Mobile: Inventory on/off?) = [Off]>\n            hide\n        end\n    else\n        hide\n    end\nend\n\nwhen I receive [start cave level v]\nforever\n    if <(Mobile: Inventory on/off?) = [On]> then\n        if <(Ladder) = [1]> then\n            if <touching (mouse-pointer v)?> then\n                set [ghost v] effect to (0)\n                set [mouse-pointer touching inventory ladder? v] to [1]\n            else\n                set [ghost v] effect to (30)\n                set [mouse-pointer touching inventory ladder? v] to [0]\n            end\n        end\n    end\nend\n\nwhen I receive [start cave level v]\nforever\n    if <(Mobile: Inventory on/off?) = [On]> then\n        if <(Ladder) = [1]> then\n            repeat until <(Mobile: Inventory on/off?) = [Off]>\n                repeat (10)\n                    change y by (1)\n                end\n                repeat (10)\n                    change y by (-1)\n                end\n            end\n        end\n    end\n    go to x: (-192) y: (100)\nend\n\n@inventory box (pc)\n\nwhen flag clicked\nhide\ngo to x: (-178) y: (34)\nset [ghost v] effect to (60)\n\nwhen I receive [start cave level v]\nforever\n    if <<key (i v) pressed?> or > then\n        show\n        wait until <not <key (i v) pressed?>>\n        hide\n    end\nend\n\nwait until \n\nwhen I receive [start cave level v]\nforever\n    if <key (i v) pressed?> then\n        repeat until <not <key (i v) pressed?>>\n            repeat (10)\n                change y by (1)\n            end\n            repeat (10)\n                change y by (-1)\n            end\n        end\n    end\n    go to x: (-178) y: (34)\nend\n\nshow\n\nhide\n\nif <<not <key (i v) pressed?>> and <(Mobile: Inventory on/off?) = [Off]>> then\nend\n\nshow\n\nwhen I receive [start cave level v]\nforever\nend\n\nif < or <(Mobile: Inventory on/off?) = [On]>> then\n    repeat until < or <(Mobile: Inventory on/off?) = [Off]>>\n        repeat (10)\n            change y by (1)\n        end\n        repeat (10)\n            change y by (-1)\n        end\n    end\nend\ngo to x: (-178) y: (34)\n\nbroadcast (begin cave intro v)\n\n@books inventory (pc)\n\nwhen flag clicked\nhide\ngo to x: (-178) y: (34)\n\nwhen I receive [start cave level v]\nforever\n    if <key (i v) pressed?> then\n        show\n        wait until <not <key (i v) pressed?>>\n        hide\n    end\nend\n\nwhen I receive [start cave level v]\nforever\n    if <key (i v) pressed?> then\n        repeat until <not <key (i v) pressed?>>\n            repeat (10)\n                change y by (1)\n            end\n            repeat (10)\n                change y by (-1)\n            end\n        end\n    end\n    go to x: (-178) y: (34)\nend\n\nshow\n\nwait until <not <key (i v) pressed?>>\n\nhide\n\nwhen I receive [start cave level v]\nforever\n    if <key (i v) pressed?> then\n        if <touching (mouse-pointer v)?> then\n            set [ghost v] effect to (0)\n        else\n            set [ghost v] effect to (30)\n        end\n    end\nend\n\nshow\nwait until <not <key (i v) pressed?>>\nhide\n\nif  then\n\n@hitbox to place ladder\n\nwhen flag clicked\nhide\n\nwhen I receive [start cave level v]\nforever\n    if <(Level) = [12]> then\n        show\n        if <(Ladder) = [1]> then\n            if <key (i v) pressed?> then\n                if <touching (player v)?> then\n                    if <(Mouse-pointer touching inventory ladder?) = [1]> then\n                        if <key (e v) pressed?> then\n                            broadcast (place ladder v)\n                            set [ladder v] to [0]\n                        end\n                    end\n                    switch costume to (costume2 v)\n                else\n                    switch costume to (costume1 v)\n                end\n            else\n                switch costume to (costume1 v)\n            end\n        else\n            switch costume to (costume1 v)\n        end\n    else\n        hide\n    end\nend\n\n\n\ngo to [back v] layer\n\n@ladder level 12\n\nwhen flag clicked\ngo to x: (-23) y: (-97)\nhide\n\nwhen I receive [place ladder v]\nshow\n\nwhen flag clicked\nforever\n    if <(Level) = [13]> then\n        hide\n        stop [other scripts in sprite v]\n    end\nend\n\n@deco ladder lv 12\n\nwhen flag clicked\ngo to x: (-23) y: (-97)\nhide\n\nwhen I receive [place ladder v]\nshow\n\nwhen flag clicked\nforever\n    if <(Level) = [13]> then\n        hide\n        stop [other scripts in sprite v]\n    end\nend\n\n@inventory (mobile)\n\nwhen flag clicked\nhide\ngo to x: (-178) y: (34)\nset [ghost v] effect to (60)\n\nwhen I receive [start cave level v]\nforever\n    if <(Mobile: Inventory on/off?) = [On]> then\n        show\n        wait until <(Mobile: Inventory on/off?) = [Off]>\n        hide\n    end\nend\n\nwait until \n\nwhen I receive [start cave level v]\nforever\n    if <(Mobile: Inventory on/off?) = [On]> then\n        repeat until <(Mobile: Inventory on/off?) = [Off]>\n            repeat (10)\n                change y by (1)\n            end\n            repeat (10)\n                change y by (-1)\n            end\n        end\n    end\n    go to x: (-178) y: (34)\nend\n\nshow\n\nhide\n\nif <<not <key (i v) pressed?>> and > then\nend\n\nshow\n\nwhen I receive [start cave level v]\nforever\nend\n\nif < or <(Mobile: Inventory on/off?) = [On]>> then\n    repeat until < or <(Mobile: Inventory on/off?) = [Off]>>\n        repeat (10)\n            change y by (1)\n        end\n        repeat (10)\n            change y by (-1)\n        end\n    end\nend\ngo to x: (-178) y: (34)\n\n@books (mobile)\n\nwhen flag clicked\nhide\ngo to x: (-178) y: (34)\n\nwhen I receive [start cave level v]\nforever\n    if <(Mobile: Inventory on/off?) = [On]> then\n        show\n        wait until <(Mobile: Inventory on/off?) = [Off]>\n        hide\n    end\nend\n\nwhen I receive [start cave level v]\nforever\n    if <(Mobile: Inventory on/off?) = [On]> then\n        repeat until <(Mobile: Inventory on/off?) = [Off]>\n            repeat (10)\n                change y by (1)\n            end\n            repeat (10)\n                change y by (-1)\n            end\n        end\n    end\n    go to x: (-178) y: (34)\nend\n\nshow\n\nwait until <not <key (i v) pressed?>>\n\nhide\n\nwhen I receive [start cave level v]\nforever\n    if <(Mobile: Inventory on/off?) = [On]> then\n        if <touching (mouse-pointer v)?> then\n            set [ghost v] effect to (0)\n        else\n            set [ghost v] effect to (30)\n        end\n    end\nend\n\nshow\nwait until <not <key (i v) pressed?>>\nhide\n\n\n\n@mobile e thing\n\nwhen flag clicked\nset [touching mobile arrow? v] to [0]\nset [mobile arrow v] to [0]\nset [ghost v] effect to (60)\nhide\n\nwhen I receive [start cave level v]\ngo to x: (124) y: (-144)\nset [place ladder mobile v] to [Off]\nforever\n    if <not <(Level) < [12]>> then\n        if <(Device:) = [Mobile]> then\n            show\n            if <touching (mouse-pointer v)?> then\n                set [ghost v] effect to (30)\n                if <mouse down?> then\n                    if <(Place Ladder Mobile) = [Off]> then\n                        set [place ladder mobile v] to [On]\n                        wait (0.3) seconds\n                    end\n                end\n                if <mouse down?> then\n                    if <(Place Ladder Mobile) = [On]> then\n                        set [place ladder mobile v] to [Off]\n                        wait (0.3) seconds\n                    end\n                end\n            else\n                set [ghost v] effect to (60)\n            end\n        else\n            hide\n        end\n    else\n        hide\n    end\nend\n\n\n\nset [touching mobile arrow? v] to [1]\n\nset [touching mobile arrow? v] to [0]\n\nset [mobile arrow v] to [Up]\n\nset [mobile arrow v] to [0]\nset [touching mobile arrow? v] to [0]\n\n\n\n@sack\n\nwhen flag clicked\nwait (0) seconds\nset [_sack v] to [0]\nhide\nwait until <(Level) = [13]>\ngo to x: (209) y: (-156)\nshow\nrepeat until <(_sack) = [1]>\n    if <touching (player v)?> then\n        set [_sack v] to [1]\n    end\nend\nhide\n\n@sack inv\n\nwhen I receive [start cave level v]\nforever\n    if <key (i v) pressed?> then\n        if <(_sack) = [1]> then\n            repeat until <not <key (i v) pressed?>>\n                repeat (10)\n                    change y by (1)\n                end\n                repeat (10)\n                    change y by (-1)\n                end\n            end\n        end\n    end\n    go to x: (-192) y: (100)\nend\n\nwhen I receive [start cave level v]\nset [_cursor touching sack v] to [0]\nforever\n    if <(_sack) = [1]> then\n        if <key (i v) pressed?> then\n            show\n            wait until <not <key (i v) pressed?>>\n            hide\n        end\n    else\n        hide\n    end\nend\n\nwhen I receive [start cave level v]\nforever\n    if <key (i v) pressed?> then\n        if <(_sack) = [1]> then\n            if <touching (mouse-pointer v)?> then\n                set [ghost v] effect to (0)\n                set [_cursor touching sack v] to [1]\n            else\n                set [ghost v] effect to (30)\n                set [_cursor touching sack v] to [0]\n            end\n        end\n    end\nend\n\nwhen flag clicked\nhide\ngo to x: (-192) y: (100)\n\n\n\nwhen I receive [start cave level v]\nforever\n    if <(_sack) = [1]> then\n        if <(Mobile: Inventory on/off?) = [On]> then\n            show\n            wait until <(Mobile: Inventory on/off?) = [Off]>\n            hide\n        end\n    else\n        hide\n    end\nend\n\nwhen I receive [start cave level v]\nforever\n    if <(Mobile: Inventory on/off?) = [On]> then\n        if <(_sack) = [1]> then\n            if <touching (mouse-pointer v)?> then\n                set [ghost v] effect to (0)\n                set [_cursor touching sack v] to [1]\n            else\n                set [ghost v] effect to (30)\n                set [_cursor touching sack v] to [0]\n            end\n        end\n    end\nend\n\nwhen I receive [start cave level v]\nforever\n    if <(Mobile: Inventory on/off?) = [On]> then\n        if <(_sack) = [1]> then\n            repeat until <(Mobile: Inventory on/off?) = [Off]>\n                repeat (10)\n                    change y by (1)\n                end\n                repeat (10)\n                    change y by (-1)\n                end\n            end\n            go to x: (-192) y: (100)\n        end\n    end\nend\n\n@sack place hitbox\n\nwhen flag clicked\nhide\ngo to x: (111) y: (-60)\n\nwhen I receive [start cave level v]\nforever\n    if <(Level) = [13]> then\n        show\n        if <(_sack) = [1]> then\n            if <key (i v) pressed?> then\n                if <touching (player v)?> then\n                    if <(_cursor touching sack) = [1]> then\n                        if <key (e v) pressed?> then\n                            broadcast (place sack v)\n                            set [ladder v] to [0]\n                        end\n                    end\n                    switch costume to (costume2 v)\n                else\n                    switch costume to (costume1 v)\n                end\n            else\n                switch costume to (costume1 v)\n            end\n        else\n            switch costume to (costume1 v)\n        end\n    else\n        hide\n    end\nend\n\n\n\ngo to [back v] layer\n\nset drag mode [draggable v]\n\nset drag mode [not draggable v]\n\nwhen I receive [place sack v]\nhide\n\n@sack climbable\n\nwhen flag clicked\nhide\nwait until <(Level) = [13]>\ngo to x: (98) y: (-98)\n\nwait (0) seconds\nset [_sack v] to [0]\n\nset drag mode [draggable v]\n\nwhen I receive [place sack v]\nshow\n\nwhen flag clicked\nwait until <(Level) = [14]>\nhide\n\n@sack deco\n\nwhen flag clicked\nhide\nwait until <(Level) = [13]>\ngo to x: (98) y: (-98)\n\nwait (0) seconds\nset [_sack v] to [0]\n\nset drag mode [draggable v]\n\nwhen I receive [place sack v]\nshow\n\nwhen flag clicked\nwait until <(Level) = [14]>\nhide\n\ngo to [back v] layer\n\ngo [forward v] (1) layers\n\n
WASD or arrow keys to move. Mobile support! Change the mode from PC to mobile on the bottom right.\n=---------------------------------------------------------------------=\nIt's your typical platformer. Move and avoid danger, go to the right to proceed to the next level. However, you only have 1 shot! If you die, you have to restart!\n\nDon't advertise!\n\n\nI just drew it by mouse in bitmap.