Ninja Cat 2 - Platformer Game (Mobile-friendly)
@Stage\n\nwhen I receive [backdrop v]\nswitch backdrop to (item (RunningUsersProgramStepNumber) of [stepcount/costumenumber v])\n\nwhen flag clicked\nswitch backdrop to (1 v)\n\nwhen I receive [levelup v]\nnext backdrop\n\n@Platforms\n\nwhen I receive [levelup v]\nif <[1] = [1]> then\n    delete this clone\nend\nif <(Level) = [3]> then\n    switch costume to (level3clone v)\n    create clone of (_myself_ v)\nend\nif <(Level) = [7]> then\n    switch costume to (level7clone v)\n    create clone of (_myself_ v)\nend\nif <(Level) = [9]> then\n    broadcast (gameover v)\nelse\n    show\n    switch costume to (Level)\nend\n\nwhen I receive [launchfirstlevel v]\nswitch costume to (1 v)\nshow\n\nwhen I receive [start v]\nshow\nswitch costume to (1 v)\n\nwhen flag clicked\nhide\ngo to x: (0) y: (0)\nswitch costume to (1 v)\n\nswitch costume to (wrtwer v)\nif <(Level) = [9]> then\n    broadcast (gameover v)\nend\n\nwhen I start as a clone\ngo to x: (0) y: (0)\nglide (2) secs to x: (0) y: (-50)\nforever\n    glide (4) secs to x: (0) y: (50)\n    glide (4) secs to x: (0) y: (-50)\nend\n\nwhen I receive [hideoriginalcodesonfarleft v]\nif <<(costume [name v]) = [Level3Clone]> or <(costume [name v]) = [Level7clone]>> then\n    stop [other scripts in sprite v]\n    go to x: (0) y: (0)\n    glide (2) secs to x: (0) y: (-50)\n    forever\n        glide (4) secs to x: (0) y: (50)\n        glide (4) secs to x: (0) y: (-50)\n    end\nend\n\nwhen I receive [gameover v]\nstop [other scripts in sprite v]\nhide\n\n@ListControl\n\ndefine EmptyListsAndVariables\ndelete all of [mainlist v]\ndelete all of [stepcount/costumenumber v]\nset [listitemnumberandnewcloneposition v] to [0]\n\nwhen flag clicked\nEmptyListsAndVariables\nbroadcast (Start v)\n\nwhen I receive [levelup v]\nEmptyListsAndVariables\n\n@YControlCharacter\n\nwhen I receive [gameover v]\nstop [other scripts in sprite v]\nhide\n\nset y to (42)\n\nwhen I receive [jump v]\nset [yvelocity v] to [7.5]\nset [stoodonplatforms? v] to [No]\nwait until <(StoodOnPlatforms?) = [Yes]>\n\nwhen [up arrow v] key pressed\n\nwhen I receive [start v]\nstop [other scripts in sprite v]\nset [yvelocity v] to [0]\nset [xvelocity v] to [0]\nset [ghost v] effect to (99)\nbroadcast (xtracker v)\nPositionControlCharacter\nshow\nforever\n    change [yvelocity v] by (-0.4)\n    if <[0] > (YVelocity)> then\n        if <not <touching (platforms v)?>> then\n            if <(YVelocity) < [0]> then\n                change y by (-1)\n            end\n        end\n        if <not <touching (platforms v)?>> then\n            if <(YVelocity) < [-1]> then\n                change y by (-1)\n            end\n        end\n        if <not <touching (platforms v)?>> then\n            if <(YVelocity) < [-2]> then\n                change y by (-1)\n            end\n        end\n        if <not <touching (platforms v)?>> then\n            if <(YVelocity) < [-3]> then\n                change y by (-1)\n            end\n        end\n        if <not <touching (platforms v)?>> then\n            if <(YVelocity) < [-4]> then\n                change y by (-1)\n            end\n        end\n        if <not <touching (platforms v)?>> then\n            if <(YVelocity) < [-5]> then\n                change y by (-1)\n            end\n        end\n        if <(YVelocity) < [-6]> then\n            set [yvelocity v] to [-6]\n        end\n        if <touching (platforms v)?> then\n            set [yvelocity v] to [0]\n            set [stoodonplatforms? v] to [Yes]\n            change y by (1)\n        end\n    end\n    if <(YVelocity) > [0]> then\n        set [stoodonplatforms? v] to [No]\n        if <not <touching (platforms v)?>> then\n            if <(YVelocity) > [0]> then\n                change y by (1)\n            end\n        end\n        if <not <touching (platforms v)?>> then\n            if <(YVelocity) > [1]> then\n                change y by (1)\n            end\n        end\n        if <not <touching (platforms v)?>> then\n            if <(YVelocity) > [1]> then\n                change y by (1)\n            end\n        end\n        if <not <touching (platforms v)?>> then\n            if <(YVelocity) > [1]> then\n                change y by (1)\n            end\n        end\n        if <not <touching (platforms v)?>> then\n            if <(YVelocity) > [1]> then\n                change y by (1)\n            end\n        end\n        if <not <touching (platforms v)?>> then\n            if <(YVelocity) > [1]> then\n                change y by (1)\n            end\n        end\n        if <(YVelocity) < [-5]> then\n            set [yvelocity v] to [-5]\n        end\n        if <touching (platforms v)?> then\n            change y by (-1)\n            set [yvelocity v] to [0]\n        end\n    end\n    if <touching (ghosts v)?> then\n        if <(Mode) = [Normal]> then\n            set [score v] to ((Score) - ((SmallDotsCollectedThisLevel) * (100)))\n            broadcast (RestartLevel v)\n        end\n        if <(Mode) = [Hard]> then\n            set [score v] to ((Score) - ((SmallDotsCollectedThisLevel) * (100)))\n            broadcast (RestartLevel v)\n        end\n        if <(Mode) = [Hardcore]> then\n            broadcast (HardcoreGameOver v)\n            stop [this script v]\n        end\n    end\nend\n\nwhen I receive [restartlevel v]\nbroadcast (PositionControlCharacter v)\n\nwhen I receive [levelup v]\nbroadcast (PositionControlCharacter v)\n\nwhen I receive [positioncontrolcharacter v]\nPositionControlCharacter\n\nclear graphic effects\n\nwhen I receive [restartlevel v]\nPositionControlCharacter\n\nclear graphic effects\n\nchange x by (-1)\nset [xvelocity v] to [0]\n\nif <[5] < (XVelocity)> then\n    set [xvelocity v] to [5]\nend\n\ngo to x: (-199) y: (-147)\n\ndefine PositionControlCharacter\ngo to x: (-200) y: (-130)\n\nbroadcast (#ReleaseTheFruit v)\n\nset [xvelocity v] to ((XVelocity) * (0.85))\nif <<(XVelocity) < [1]> and <(XVelocity) > [-1]>> then\n    set [xvelocity v] to [0]\nend\nif <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n    change [xvelocity v] by (1.5)\nend\nif <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n    change [xvelocity v] by (-1.5)\nend\n\nwhen I receive [xtracker v]\nforever\n    set x to ([x position v] of [xcontrolcharacter v])\nend\n\nwhen I receive [resetplayerposition v]\nPositionControlCharacter\n\nwait until <(StoodOnPlatforms?) = [Yes]>\n\nwhen I receive [levelup v]\nset [stoodonplatforms? v] to [Yes]\n\n@XControlCharacter\n\nwhen I receive [gameover v]\nstop [other scripts in sprite v]\nhide\n\nwhen I receive [jump v]\nset [stoodonplatforms? v] to [No]\nrepeat until <(StoodOnPlatforms?) = [Yes]>\n    if <(direction) = [90]> then\n        change x by (4)\n        if <touching (platforms v)?> then\n            set [stoodonplatforms? v] to [Yes]\n            change x by (-8)\n            stop [this script v]\n        end\n    else\n        change x by (-4)\n        if <touching (platforms v)?> then\n            set [stoodonplatforms? v] to [Yes]\n            change x by (8)\n            stop [this script v]\n        end\n    end\nend\n\nwhen I receive [start v]\nPositionControlCharacter\nstop [other scripts in sprite v]\nset [ghost v] effect to (99)\nset [yvelocity v] to [0]\nset [xvelocity v] to [0]\npoint in direction (90)\nshow\nforever\n    set y to ([y position v] of [ycontrolcharacter v])\nend\n\nset [xvelocity v] to ((XVelocity) * (0.85))\nif <<(XVelocity) < [1]> and <(XVelocity) > [-1]>> then\n    set [xvelocity v] to [0]\nend\nif <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n    change [xvelocity v] by (1.5)\nend\nif <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n    change [xvelocity v] by (-1.5)\nend\n\nwhen I receive [restartlevel v]\nbroadcast (PositionControlCharacter v)\n\nwhen I receive [levelup v]\nbroadcast (PositionControlCharacter v)\n\nwhen I receive [positioncontrolcharacter v]\nPositionControlCharacter\n\nclear graphic effects\n\nwhen I receive [restartlevel v]\nPositionControlCharacter\n\nclear graphic effects\n\nchange x by (-1)\nset [xvelocity v] to [0]\n\nif <[5] < (XVelocity)> then\n    set [xvelocity v] to [5]\nend\n\ndefine PositionControlCharacter\nrepeat (3)\n    wait (0.1) seconds\n    go to x: (-200) y: (-150)\n    point in direction (90)\nend\n\nbroadcast (#ReleaseTheFruit v)\n\nwhen I receive [run v]\nset [runfinished? v] to [No]\nrepeat (item (RunningUsersProgramStepNumber) of [stepcount/costumenumber v])\n    if <(direction) = [90]> then\n        change x by (30)\n        if <touching (platforms v)?> then\n            change x by (-30)\n            stop [this script v]\n        else\n            change x by (-30)\n            glide (0.1) secs to x: ((x position) + (30)) y: (y position)\n        end\n    else\n        change x by (-30)\n        if <touching (platforms v)?> then\n            change x by (30)\n            stop [this script v]\n        else\n            change x by (30)\n            glide (0.1) secs to x: ((x position) - (30)) y: (y position)\n        end\n    end\nend\nwait until <<(YVelocity) = [0]> and <(StoodOnPlatforms?) = [Yes]>>\n\nset [runfinished? v] to [Yes]\n\nwhen I receive [levelup v]\npoint in direction (90)\n\nwhen I receive [restartlevel v]\npoint in direction (90)\n\nwhen I receive [turn v]\nturn right (180) degrees\n\nwhen I receive [continuewithlevel v]\nPositionControlCharacter\n\nwhen I receive [stopandresetlevelinplay v]\nPositionControlCharacter\n\nwhen I receive [resetplayerposition v]\nPositionControlCharacter\n\nwhen I receive [levelup v]\nPositionControlCharacter\n\nrepeat (3)\n    wait (0.1) seconds\nend\n\n@RunningUsersProgram\n\nwhen I receive [gameover v]\nstop [other scripts in sprite v]\nhide\n\nwhen flag clicked\nset x to (-150)\nset y to (170)\nshow\n\nwhen this sprite clicked\nhide\nbroadcast (HideOriginalCodesOnFarLeft v)\nset [runningusersprogramstepnumber v] to [1]\nrepeat (length of [mainlist v])\n    broadcast (item (RunningUsersProgramStepNumber) of [mainlist v]) and wait\n    change [runningusersprogramstepnumber v] by (1)\nend\ncreate clone of (scratch cat v)\nbroadcast (ResetPlayerPosition v)\nbroadcast (UnhideCode v)\nset [runfinished? v] to [Yes]\nset [xvelocity v] to [0]\nset [yvelocity v] to [0]\nshow\n\nbroadcast (ResetPlayerPosition v) and wait\n\nwhen I receive [restartlevel v]\nstop [other scripts in sprite v]\nset [runfinished? v] to [Yes]\nset [xvelocity v] to [0]\nset [yvelocity v] to [0]\nshow\n\nbroadcast (#ReleaseTheFruit v)\n\nwhen I receive [levelup v]\nstop [other scripts in sprite v]\nbroadcast (UnhideCode v)\nset [runfinished? v] to [Yes]\nset [xvelocity v] to [0]\nset [yvelocity v] to [0]\nshow\nshow\n\nset [runfinished? v] to [Yes]\nset [xvelocity v] to [0]\nset [yvelocity v] to [0]\nshow\n\n@Run\n\nwhen I receive [gameover v]\nstop [other scripts in sprite v]\nhide\n\nwhen I receive [levelup v]\ndelete this clone\n\nwhen I receive [restartlevel v]\nshow\n\nwhen flag clicked\nswitch costume to (1 v)\nshow\ngo to x: (-228) y: (168)\nset [local_clone_position_number v] to [0]\n\nwhen this sprite clicked\nif <(x position) < [-220]> then\n    if <(mouse x) < [-205]> then\n        create clone of (_myself_ v)\n        go to x: (-228) y: (168)\n        stop [this script v]\n    end\n    if <(mouse x) < [-186]> then\n        next costume\n        stop [this script v]\n    end\n    if <(mouse x) < [-168]> then\n        switch costume to ((costume [number v]) - (1))\n        stop [this script v]\n    end\nend\nif <(mouse x) < [-131]> then\n    delete (local_clone_position_number) of [mainlist v]\n    delete (local_clone_position_number) of [stepcount/costumenumber v]\n    change [listitemnumberandnewcloneposition v] by (-1)\n    set [movelistitemup/shiftcodeup if item number greater than... v] to (local_clone_position_number)\n    broadcast (JiggleCodeUpWards v)\n    delete this clone\nend\nif <(mouse x) < [-108]> then\n    next costume\n    replace item (local_clone_position_number) of [stepcount/costumenumber v] with (costume [name v])\n    stop [this script v]\nend\nif <(mouse x) < [-90]> then\n    switch costume to ((costume [number v]) - (1))\n    replace item (local_clone_position_number) of [stepcount/costumenumber v] with (costume [name v])\n    stop [this script v]\nend\n\nwhen I start as a clone\nchange [listitemnumberandnewcloneposition v] by (1)\nset [local_clone_position_number v] to (ListItemNumberAndNewClonePosition)\nset x to (-150)\nset y to ((170) - ((ListItemNumberAndNewClonePosition) * (17)))\nadd [Run] to [mainlist v]\nadd (costume [number v]) to [stepcount/costumenumber v]\n\nforever\n    say (mouse x)\nend\n\nwhen I receive [jigglecodeupwards v]\nif <(local_clone_position_number) > [0]> then\n    if <(local_clone_position_number) > (MoveListItemUp/ShiftCodeUp if item number greater than...)> then\n        change [local_clone_position_number v] by (-1)\n    end\n    set y to ((170) - ((local_clone_position_number) * (17)))\nend\n\nwhen I receive [stopandresetlevelinplay v]\nstop [other scripts in sprite v]\ndelete this clone\n\nwhen I receive [hideoriginalcodesonfarleft v]\nhide\n\nstop [other scripts in sprite v]\ndelete this clone\n\nif <(x position) < [-220]> then\n\nwhen I receive [unhidecode v]\nshow\nclear graphic effects\n\n@Turn\n\nwhen I receive [gameover v]\nstop [other scripts in sprite v]\nhide\n\nwhen I receive [restartlevel v]\nshow\n\nwhen I receive [hideoriginalcodesonfarleft v]\nhide\n\nwhen I receive [unhidecode v]\nshow\nclear graphic effects\n\nwhen I receive [stopandresetlevelinplay v]\nstop [other scripts in sprite v]\ndelete this clone\n\nwhen flag clicked\nshow\ngo to x: (-228) y: (143)\nset [local_clone_position_number v] to [0]\n\nwhen this sprite clicked\nif <(x position) < [-220]> then\n    create clone of (_myself_ v)\n    go to x: (-228) y: (143)\n    stop [this script v]\nend\nif <(mouse x) < [-131]> then\n    delete (local_clone_position_number) of [mainlist v]\n    delete (local_clone_position_number) of [stepcount/costumenumber v]\n    change [listitemnumberandnewcloneposition v] by (-1)\n    set [movelistitemup/shiftcodeup if item number greater than... v] to (local_clone_position_number)\n    broadcast (JiggleCodeUpWards v)\n    delete this clone\nend\n\nif <(mouse x) < [-210]> then\n\nwhen I start as a clone\nchange [listitemnumberandnewcloneposition v] by (1)\nset [local_clone_position_number v] to (ListItemNumberAndNewClonePosition)\nset x to (-150)\nset y to ((170) - ((ListItemNumberAndNewClonePosition) * (17)))\nadd [Turn] to [mainlist v]\nadd (costume [number v]) to [stepcount/costumenumber v]\n\nforever\n    say (mouse x)\nend\n\nwhen I receive [jigglecodeupwards v]\nif <(local_clone_position_number) > [0]> then\n    if <(local_clone_position_number) > (MoveListItemUp/ShiftCodeUp if item number greater than...)> then\n        change [local_clone_position_number v] by (-1)\n    end\n    set y to ((170) - ((local_clone_position_number) * (17)))\nend\n\nwhen I receive [levelup v]\ndelete this clone\n\n@Jump\n\nwhen I receive [gameover v]\nstop [other scripts in sprite v]\nhide\n\nwhen I receive [levelup v]\ndelete this clone\n\nwhen I receive [restartlevel v]\nshow\n\nwhen I receive [hideoriginalcodesonfarleft v]\nhide\n\nwhen I receive [unhidecode v]\nshow\nclear graphic effects\n\nwhen I receive [stopandresetlevelinplay v]\nstop [other scripts in sprite v]\ndelete this clone\n\nwhen flag clicked\nshow\ngo to x: (-228) y: (118)\nset [local_clone_position_number v] to [0]\n\nwhen this sprite clicked\nif <(x position) < [-220]> then\n    create clone of (_myself_ v)\n    go to x: (-228) y: (118)\n    stop [this script v]\nend\nif <(mouse x) < [-131]> then\n    delete (local_clone_position_number) of [mainlist v]\n    delete (local_clone_position_number) of [stepcount/costumenumber v]\n    change [listitemnumberandnewcloneposition v] by (-1)\n    set [movelistitemup/shiftcodeup if item number greater than... v] to (local_clone_position_number)\n    broadcast (JiggleCodeUpWards v)\n    delete this clone\nend\n\nif <(mouse x) < [-210]> then\n\nwhen I start as a clone\nchange [listitemnumberandnewcloneposition v] by (1)\nset [local_clone_position_number v] to (ListItemNumberAndNewClonePosition)\nset x to (-150)\nset y to ((170) - ((ListItemNumberAndNewClonePosition) * (17)))\nadd [Jump] to [mainlist v]\nadd (costume [number v]) to [stepcount/costumenumber v]\n\nforever\n    say (mouse x)\nend\n\nwhen I receive [jigglecodeupwards v]\nif <(local_clone_position_number) > [0]> then\n    if <(local_clone_position_number) > (MoveListItemUp/ShiftCodeUp if item number greater than...)> then\n        change [local_clone_position_number v] by (-1)\n    end\n    set y to ((170) - ((local_clone_position_number) * (17)))\nend\n\n@Wait\n\nwhen I receive [gameover v]\nstop [other scripts in sprite v]\nhide\n\nwhen I receive [levelup v]\ndelete this clone\n\nwhen I receive [restartlevel v]\nshow\n\nwhen I receive [hideoriginalcodesonfarleft v]\nhide\n\nwhen I receive [unhidecode v]\nshow\nclear graphic effects\n\nwhen I receive [stopandresetlevelinplay v]\nstop [other scripts in sprite v]\ndelete this clone\n\nwhen flag clicked\nshow\ngo to x: (-228) y: (93)\nset [local_clone_position_number v] to [0]\n\nwhen this sprite clicked\nif <(x position) < [-220]> then\n    if <(mouse x) < [-205]> then\n        create clone of (_myself_ v)\n        go to x: (-228) y: (93)\n        stop [this script v]\n    end\n    if <(mouse x) < [-186]> then\n        next costume\n        stop [this script v]\n    end\n    if <(mouse x) < [-168]> then\n        switch costume to ((costume [number v]) - (1))\n        stop [this script v]\n    end\nend\nif <(mouse x) < [-131]> then\n    delete (local_clone_position_number) of [mainlist v]\n    delete (local_clone_position_number) of [stepcount/costumenumber v]\n    change [listitemnumberandnewcloneposition v] by (-1)\n    set [movelistitemup/shiftcodeup if item number greater than... v] to (local_clone_position_number)\n    broadcast (JiggleCodeUpWards v)\n    delete this clone\nend\nif <(mouse x) < [-108]> then\n    next costume\n    replace item (local_clone_position_number) of [stepcount/costumenumber v] with (costume [name v])\n    stop [this script v]\nend\nif <(mouse x) < [-90]> then\n    switch costume to ((costume [number v]) - (1))\n    replace item (local_clone_position_number) of [stepcount/costumenumber v] with (costume [name v])\n    stop [this script v]\nend\n\nwhen I start as a clone\nchange [listitemnumberandnewcloneposition v] by (1)\nset [local_clone_position_number v] to (ListItemNumberAndNewClonePosition)\nset x to (-150)\nset y to ((170) - ((ListItemNumberAndNewClonePosition) * (17)))\nadd [Wait] to [mainlist v]\nadd (costume [number v]) to [stepcount/costumenumber v]\n\nforever\n    say (mouse x)\nend\n\nwhen I receive [jigglecodeupwards v]\nif <(local_clone_position_number) > [0]> then\n    if <(local_clone_position_number) > (MoveListItemUp/ShiftCodeUp if item number greater than...)> then\n        change [local_clone_position_number v] by (-1)\n    end\n    set y to ((170) - ((local_clone_position_number) * (17)))\nend\n\nwhen I receive [wait v]\nwait (item (RunningUsersProgramStepNumber) of [stepcount/costumenumber v]) seconds\n\n@Music\n\nwhen I receive [gameover v]\nstop [other scripts in sprite v]\nhide\n\nwhen I receive [levelup v]\ndelete this clone\n\nwhen I receive [restartlevel v]\nshow\n\nwhen I receive [hideoriginalcodesonfarleft v]\nhide\n\nwhen I receive [unhidecode v]\nshow\nclear graphic effects\n\nwhen I receive [stopandresetlevelinplay v]\nstop all sounds\nstop [other scripts in sprite v]\ndelete this clone\n\nwhen flag clicked\nshow\ngo to x: (-228) y: (68)\nset [local_clone_position_number v] to [0]\nforever\n    play sound [happy-and-fun-background-music-upbeat-ukulele v] until done\nend\n\nwhen this sprite clicked\nif <(x position) < [-220]> then\n    if <(mouse x) < [-205]> then\n        create clone of (_myself_ v)\n        go to x: (-228) y: (68)\n        stop [this script v]\n    end\n    if <(mouse x) < [-186]> then\n        next costume\n        stop [this script v]\n    end\n    if <(mouse x) < [-168]> then\n        switch costume to ((costume [number v]) - (1))\n        stop [this script v]\n    end\nend\nif <(mouse x) < [-131]> then\n    delete (local_clone_position_number) of [mainlist v]\n    delete (local_clone_position_number) of [stepcount/costumenumber v]\n    change [listitemnumberandnewcloneposition v] by (-1)\n    set [movelistitemup/shiftcodeup if item number greater than... v] to (local_clone_position_number)\n    broadcast (JiggleCodeUpWards v)\n    delete this clone\nend\nif <(mouse x) < [-108]> then\n    next costume\n    replace item (local_clone_position_number) of [stepcount/costumenumber v] with (costume [name v])\n    stop [this script v]\nend\nif <(mouse x) < [-90]> then\n    switch costume to ((costume [number v]) - (1))\n    replace item (local_clone_position_number) of [stepcount/costumenumber v] with (costume [name v])\n    stop [this script v]\nend\n\nwhen I start as a clone\nchange [listitemnumberandnewcloneposition v] by (1)\nset [local_clone_position_number v] to (ListItemNumberAndNewClonePosition)\nset x to (-150)\nset y to ((170) - ((ListItemNumberAndNewClonePosition) * (17)))\nadd [Music] to [mainlist v]\nadd (costume [number v]) to [stepcount/costumenumber v]\n\nwhen I receive [jigglecodeupwards v]\nif <(local_clone_position_number) > [0]> then\n    if <(local_clone_position_number) > (MoveListItemUp/ShiftCodeUp if item number greater than...)> then\n        change [local_clone_position_number v] by (-1)\n    end\n    set y to ((170) - ((local_clone_position_number) * (17)))\nend\n\nwhen I receive [music v]\nstop all sounds\nstop [other scripts in sprite v]\nstart sound (item (RunningUsersProgramStepNumber) of [stepcount/costumenumber v])\n\nplay sound [Taylor Swift - Look What You Made Me Do v] until done\n\nforever\n\ndelete this clone\n\nstop [other scripts in sprite v]\n\n@Backdrop\n\nwhen I receive [gameover v]\nstop [other scripts in sprite v]\nhide\n\nwhen I receive [levelup v]\ndelete this clone\n\nwhen I receive [restartlevel v]\nshow\n\nwhen I receive [hideoriginalcodesonfarleft v]\nhide\n\nwhen I receive [unhidecode v]\nshow\nclear graphic effects\n\nwhen I receive [stopandresetlevelinplay v]\nstop [other scripts in sprite v]\ndelete this clone\n\nwhen flag clicked\nshow\ngo to x: (-228) y: (43)\nset [local_clone_position_number v] to [0]\n\nwhen this sprite clicked\nif <(x position) < [-220]> then\n    if <(mouse x) < [-190]> then\n        create clone of (_myself_ v)\n        go to x: (-228) y: (43)\n        stop [this script v]\n    end\n    if <(mouse x) < [-168]> then\n        next costume\n        stop [this script v]\n    end\n    if <(mouse x) < [-154]> then\n        switch costume to ((costume [number v]) - (1))\n        stop [this script v]\n    end\nend\nif <(mouse x) < [-108]> then\n    delete (local_clone_position_number) of [mainlist v]\n    delete (local_clone_position_number) of [stepcount/costumenumber v]\n    change [listitemnumberandnewcloneposition v] by (-1)\n    set [movelistitemup/shiftcodeup if item number greater than... v] to (local_clone_position_number)\n    broadcast (JiggleCodeUpWards v)\n    delete this clone\nend\nif <(mouse x) < [-90]> then\n    next costume\n    replace item (local_clone_position_number) of [stepcount/costumenumber v] with (costume [name v])\n    stop [this script v]\nend\nif <(mouse x) < [-76]> then\n    switch costume to ((costume [number v]) - (1))\n    replace item (local_clone_position_number) of [stepcount/costumenumber v] with (costume [name v])\n    stop [this script v]\nend\n\nwhen I start as a clone\nchange [listitemnumberandnewcloneposition v] by (1)\nset [local_clone_position_number v] to (ListItemNumberAndNewClonePosition)\nset x to (-150)\nset y to ((170) - ((ListItemNumberAndNewClonePosition) * (17)))\nadd [Backdrop] to [mainlist v]\nadd (costume [number v]) to [stepcount/costumenumber v]\n\nforever\n    say (mouse x)\nend\n\nwhen I receive [jigglecodeupwards v]\nif <(local_clone_position_number) > [0]> then\n    if <(local_clone_position_number) > (MoveListItemUp/ShiftCodeUp if item number greater than...)> then\n        change [local_clone_position_number v] by (-1)\n    end\n    set y to ((170) - ((local_clone_position_number) * (17)))\nend\n\nwhen I receive [wait v]\nwait (item (RunningUsersProgramStepNumber) of [stepcount/costumenumber v]) seconds\n\n@Dance\n\nwhen I receive [gameover v]\nstop [other scripts in sprite v]\nhide\n\nwhen I receive [levelup v]\ndelete this clone\n\nwhen I receive [restartlevel v]\nshow\n\nwhen I receive [hideoriginalcodesonfarleft v]\nhide\n\nwhen I receive [unhidecode v]\nshow\nclear graphic effects\n\nwhen I receive [stopandresetlevelinplay v]\nstop [other scripts in sprite v]\ndelete this clone\n\nwhen flag clicked\nshow\ngo to x: (-228) y: (18)\nset [local_clone_position_number v] to [0]\n\nwhen this sprite clicked\nif <(x position) < [-220]> then\n    create clone of (_myself_ v)\n    go to x: (-228) y: (18)\n    stop [this script v]\nend\nif <(mouse x) < [-131]> then\n    delete (local_clone_position_number) of [mainlist v]\n    delete (local_clone_position_number) of [stepcount/costumenumber v]\n    change [listitemnumberandnewcloneposition v] by (-1)\n    set [movelistitemup/shiftcodeup if item number greater than... v] to (local_clone_position_number)\n    broadcast (JiggleCodeUpWards v)\n    delete this clone\nend\n\nwhen I start as a clone\nchange [listitemnumberandnewcloneposition v] by (1)\nset [local_clone_position_number v] to (ListItemNumberAndNewClonePosition)\nset x to (-150)\nset y to ((170) - ((ListItemNumberAndNewClonePosition) * (17)))\nadd [Dance] to [mainlist v]\nadd (costume [number v]) to [stepcount/costumenumber v]\n\nforever\n    say (mouse x)\nend\n\nwhen I receive [jigglecodeupwards v]\nif <(local_clone_position_number) > [0]> then\n    if <(local_clone_position_number) > (MoveListItemUp/ShiftCodeUp if item number greater than...)> then\n        change [local_clone_position_number v] by (-1)\n    end\n    set y to ((170) - ((local_clone_position_number) * (17)))\nend\n\n@Scratch Cat\n\nwhen I receive [gameover v]\nstop [other scripts in sprite v]\nhide\n\n\n\nwhen I receive [run v]\nif <(AmIAClone?) = [Yes]> then\n    stop [this script v]\nend\nset [runfinished? v] to [No]\nrepeat until <<(YVelocity) = [0]> and <(StoodOnPlatforms?) = [Yes]>>\n    next costume\nend\n\nwhen I receive [start v]\nshow\nif <(AmIAClone?) = [Yes]> then\n    stop [this script v]\nend\nstop [other scripts in sprite v]\nforever\n    set y to ([y position v] of [ycontrolcharacter v])\n    set x to ([x position v] of [xcontrolcharacter v])\n    point in direction ([direction v] of [xcontrolcharacter v])\n    if <touching (enemy! v)?> then\n        say [Ow!] for (2) seconds\n        broadcast (RestartLevel v)\n    end\nend\n\nwhen I receive [dance v]\nif <(AmIAClone?) = [Yes]> then\n    stop [this script v]\nend\nrepeat (40)\n    switch costume to (pick random (1) to (16))\nend\n\nset [runfinished? v] to [No]\nrepeat until <(RunFinished?) = [Yes]>\n    next costume\nend\n\nwhen I start as a clone\nif <(AmIAClone?) = [Yes]> then\n    stop [this script v]\nend\nset [amiaclone? v] to [Yes]\nset [ghost v] effect to (50)\nwait (20) seconds\nrepeat (90)\n    change [ghost v] effect by (1)\nend\ndelete this clone\n\nwhen I receive [levelup v]\nset [runfinished? v] to [Yes]\n\nif <(AmIAClone?) = [Yes]> then\n    stop [this script v]\nend\nset [amiaclone? v] to [Yes]\nset [ghost v] effect to (50)\nwait (20) seconds\nrepeat (90)\n    change [ghost v] effect by (1)\nend\ndelete this clone\n\n@StopAndResetLevelInPlay\n\nwhen this sprite clicked\ndelete all of [mainlist v]\ndelete all of [stepcount/costumenumber v]\nset [listitemnumberandnewcloneposition v] to [0]\nbroadcast (StopAndResetLevelInPlay v)\n\n@Tutorial\n\nwhen I receive [gameover v]\nstop [other scripts in sprite v]\nhide\n\nwhen I receive [hideoriginalcodesonfarleft v]\n\nhide\n\nwhen I receive [unhidecode v]\n\nshow\n\nwhen [space v] key pressed\nnext costume\ngo to [front v] layer\n\nwhen flag clicked\nclear graphic effects\ngo to [front v] layer\nshow\nswitch costume to (costume2 v)\nwait (3) seconds\nswitch costume to (click run v)\ngo to [front v] layer\nset [ghost v] effect to (30)\nwait (0.1) seconds\ngo to x: (0) y: (0)\nwait until <(item (1) of [mainlist v]) = [Run]>\nnext costume\nwait until <(item (1) of [stepcount/costumenumber v]) = [5]>\nnext costume\nwait until <(item (2) of [mainlist v]) = [Turn]>\nnext costume\nwait until <(item (3) of [mainlist v]) = [Jump]>\nnext costume\nwait until <(item (4) of [mainlist v]) = [Run]>\nnext costume\nwait until <<mouse down?> and <not <touching (mouse-pointer v)?>>>\nhide\nwait (2) seconds\nshow\nnext costume\nwait until <(length of [mainlist v]) = [3]>\nnext costume\nwait until <(item (4) of [mainlist v]) = [Turn]>\nnext costume\nwait until <<mouse down?> and <not <touching (mouse-pointer v)?>>>\nbroadcast (ShowExitDuringTutorial v)\nnext costume\n\nwhen I receive [levelup v]\nhide\n\nchange [level v] by (1)\nbroadcast (LevelUp v)\n\nset [level v] to [2]\n\nhide\n\n@portal\n\nwhen I receive [gameover v]\nstop [other scripts in sprite v]\nhide\n\nwhen flag clicked\nhide\nset size to (100) %\nbroadcast (PortalPositioning v)\n\nwhen I receive [gameover v]\nhide\nstop [other scripts in sprite v]\n\nwhen I receive [showexitduringtutorial v]\nset [level v] to [1]\ngo to x: (72) y: (-25)\nshow\nset size to (100) %\nforever\n    if <touching (scratch cat v)?> then\n        broadcast (AnimateLevelUp v)\n        hide\n        start sound [start v]\n        change [level v] by (1)\n        broadcast (LevelUp v)\n        wait (1) seconds\n        show\n    end\nend\n\nbroadcast (#ReleaseTheFruit v)\n\nwhen I receive [levelup v]\nif <(Level) = [2]> then\n    go to x: (-7) y: (-26)\nend\nif <(Level) = [3]> then\n    go to x: (-171) y: (-23)\nend\nif <(Level) = [4]> then\n    go to x: (-221) y: (-35)\nend\nif <(Level) = [5]> then\n    go to x: (135) y: (38)\nend\nif <(Level) = [6]> then\n    go to x: (231) y: (-81)\nend\nif <(Level) = [7]> then\n    go to x: (154) y: (23)\nend\n\nwhen I receive [redbananashow v]\nset size to (100) %\nwait (1) seconds\nforever\n    repeat (2)\n        repeat (10)\n            change size by (2)\n        end\n        repeat (10)\n            change size by (-2)\n        end\n    end\n    wait (10) seconds\nend\n\ngo to x: (177) y: (162)\n\nset [level v] to [6]\n\ngo to [front v] layer\n\nif <(Mode) = [Normal]> then\nif <<(Mode) = [Hard]> or <(Mode) = [Hardcore]>> then\n    if <(SmallDotsLeft) = [0]> then\n        hide\n        start sound [start v]\n        broadcast (ScoreLevelUp v) and wait\n        change [level v] by (1)\n        broadcast (LevelUp v)\n        wait (1) seconds\n    else\n        think [Collect all the dots!]\n    end\nend\n\nbroadcast (ScoreLevelUp v) and wait\n\nwait (1) seconds\n\nwhen I receive [start v]\nset [level v] to [1]\ngo to x: (72) y: (-25)\nshow\nset size to (100) %\n\nif <(Level) = [6]> then\n    go to x: (-219) y: (95)\nend\nif <(Level) = [7]> then\n    go to x: (218) y: (-139)\nend\nif <(Level) = [87]> then\n    go to x: (218) y: (-139)\nend\n\ngo to x: (-156) y: (224)\n\n@lava\n\nwhen I receive [gameover v]\nwait (0.2) seconds\nstop [other scripts in sprite v]\nhide\n\nwhen flag clicked\nhide\ngo to [back v] layer\ngo to x: (-193) y: (-165)\nrepeat (6)\n    create clone of (_myself_ v)\n    change x by (80)\nend\n\nwhen I start as a clone\nshow\nforever\n    next costume\n    if <touching (ycontrolcharacter v)?> then\n        start sound [Mine v]\n        broadcast (RestartLevel v)\n    end\nend\n\nswitch costume to (lava v)\n\nsay [NextLevel] for (2) seconds\n\nplay sound [Mine v] until done\n\nset [runfinished? v] to [Yes]\nset [xvelocity v] to [0]\nset [yvelocity v] to [0]\n\n@Enemy!\n\nwhen I receive [gameover v]\nstop [other scripts in sprite v]\nhide\n\nwhen flag clicked\n\nwhen I receive [restartlevel v]\nPosition\n\nwhen I receive [levelup v]\nPosition\n\ndefine Position\nstop [other scripts in sprite v]\nhide\nif <(Level) = [4]> then\n    go to x: (-20) y: (-4)\n    show\nend\nif <(Level) = [7]> then\n    go to x: (-160) y: (-140)\n    show\nend\nforever\n    point in direction (90)\n    repeat (28)\n        wait (0.1) seconds\n        next costume\n        change x by (3)\n    end\n    point in direction (-90)\n    repeat (28)\n        wait (0.1) seconds\n        next costume\n        change x by (-3)\n    end\nend\n\nwhen flag clicked\nhide\n\nwhen I receive [hideoriginalcodesonfarleft v]\nPosition\n\nforever\n    point in direction (90)\n    repeat (30)\n        wait (0.1) seconds\n        next costume\n        change x by (3)\n    end\n    point in direction (-90)\n    repeat (30)\n        wait (0.1) seconds\n        next costume\n        change x by (-3)\n    end\nend\n\n@coollogo_com-2796771\n\nwhen flag clicked\nhide\nforever\n    if <not <(costume [number v]) = [11]>> then\n        wait (1) seconds\n        switch costume to (Level)\n    end\nend\n\nwhen I receive [start v]\nshow\n\nhide\n\n@Sprite1\n\nwhen I receive [animatelevelup v]\ngo to x: (0) y: (0)\nclear graphic effects\nset [ghost v] effect to (100)\ngo to [front v] layer\nrepeat (25)\n    show\n    change [ghost v] effect by (-3)\n    turn right (2) degrees\n    go to [front v] layer\nend\nrepeat (25)\n    change [brightness v] effect by (-2)\n    turn right (2) degrees\n    go to [front v] layer\nend\nrepeat (25)\n    change [ghost v] effect by (-2)\n    go to [front v] layer\n    turn right (2) degrees\nend\nrepeat (50)\n    change [brightness v] effect by (2)\n    change [ghost v] effect by (2)\n    go to [front v] layer\n    turn right (2) degrees\nend\nif <(Level) = [8]> then\n    broadcast (gameover v)\nend\n\nshow\n\ngo to [front v] layer\n\nshow\ngo to [front v] layer\n\nshow\ngo to [front v] layer\n\nwhen flag clicked\nhide\n\nset size to (200) %\n\n@coollogo_com-5041248\n\nwhen flag clicked\nhide\n\nwhen I receive [animatelevelup v]\nshow\nset size to (0) %\npoint in direction (70)\nrepeat (30)\n    go to [front v] layer\n    change size by (4)\n    turn right (1) degrees\nend\nrepeat (30)\n    go to [front v] layer\n    change size by (4)\n    turn right (-1) degrees\nend\nrepeat (60)\n    go to [front v] layer\n    change size by (-4)\n    turn right (1) degrees\nend\nhide\n\nbroadcast (AnimateLevelUp v)\n\n@Sprite2\n\nwhen I receive [gameover v]\nshow\ngo to [front v] layer\ngo to x: (0) y: (0)\n\nwhen flag clicked\nhide\n\nwhen this sprite clicked\nbroadcast (Say winner v)\n\n@Sprite3\n\nwhen I receive [gameover v]\ngo to x: (0) y: (200)\nswitch costume to (1 v)\nwait (0.1) seconds\nforever\n    go to [front v] layer\n    show\n    glide (2) secs to x: (0) y: (-136)\n    wait (1) seconds\n    glide (2) secs to x: (0) y: (200)\n    hide\n    next costume\n    wait (1) seconds\nend\n\nswitch costume to (pick random (1) to (4))\n\nwhen flag clicked\nhide\n\n@Sprite4\n\nwhen flag clicked\nhide\n\ngo to x: (0) y: (0)\n\nwhen I receive [hideoriginalcodesonfarleft v]\nhide\n\nwhen I receive [unhidecode v]\nif <(Level) > [1]> then\n    show\nend\n\nwhen this sprite clicked\nchange [level v] by (1)\nbroadcast (LevelUp v)\n\n@Sprite5\n\nwhen flag clicked\nhide\n\nwhen I receive [say winner v]\nsay [Awesome Winner!] for (2) seconds\n\nchange y by (10)\n\n
In Generic City, you are the most powerful superhero of them all: Love Hero! When darkness descends upon the city and all seems lost, you're there to save the day with the power of...love?\n\nCONTROLS:\n⭐ WASD / arrow keys - move / jump\n⭐ SPACE - interact / shoot\n⭐ R - reset level (use in case of glitches)\n\nBONUS STUFF: (for AFTER you've beaten the game)\n⭐ Press E to enter Edit Mode and mess with the levels (warning: might be glitchy)!\n⭐ Press Z to enter Cheat Mode!\n\nFor those curious, the game timer is paused during cutscenes and dialogue, so they shouldn't affect your score.