Purple Platformer

Instructions: This is my first platformer\nI hope you like it \nPlease like and fave\nSorry if there are any glitches\nYou can remix

@Stage\n\n@Player3\n\ndefine Right/Left Movement (move speed) (drag)\nchange x by (xVelocity)\nif <touching (level v)?> then\n    repeat ([ceiling v] of ([abs v] of (xVelocity) ) )\n        if <touching (level v)?> then\n            change x by (((xVelocity) / ([abs v] of (xVelocity) )) * (-1))\n        end\n    end\n    set [xvelocity v] to [0]\nend\nif <key (right arrow v) pressed?> then\n    point in direction (90)\n    set [xvelocity v] to (move speed)\nelse\n    if <key (left arrow v) pressed?> then\n        point in direction (-90)\n        set [xvelocity v] to ((move speed) * (-1))\n    end\nend\nset [xvelocity v] to ((xVelocity) * (drag))\n\nwhen I receive [makeplayerfollowhitbox v]\ngo to (hitbox v)\n\nwhen flag clicked\nswitch costume to (costume1 v)\nset rotation style [left-right v]\npoint in direction (90)\nforever\n    if <key (right arrow v) pressed?> then\n        switch costume to ((costume [number v]) + (1))\n        point in direction (90)\n    else\n        if <key (left arrow v) pressed?> then\n            switch costume to ((costume [number v]) - (1))\n            point in direction (-90)\n        else\n            switch costume to (costume1 v)\n        end\n    end\n    wait (0.04) seconds\nend\n\nwhen flag clicked\nforever\n    play sound [Martin garrix tremor \(original mix\) v] until done\nend\n\n@level\n\nwhen flag clicked\ngo to x: (65) y: (-40)\nswitch costume to (costume1 v)\n\nwhen I receive [next level v]\nchange [level v] by (1)\nnext costume\n\nwhen flag clicked\nset [level v] to [1]\n\n@hitbox\n\ndefine Up/down Movement (jump hight) (fallspeed)\nchange y by (yVelocity)\nif <touching (level v)?> then\n    CheckTouchingLava/Spikes\n    repeat ([ceiling v] of ([abs v] of (yVelocity) ) )\n        if <touching (level v)?> then\n            change y by (((yVelocity) / ([abs v] of (yVelocity) )) * (-1))\n        end\n    end\n    if <<not <(yVelocity) > [0]>> and <key (up arrow v) pressed?>> then\n        set [yvelocity v] to (jump hight)\n    else\n        set [yvelocity v] to [0]\n    end\nelse\n    change [yvelocity v] by (fallspeed)\nend\n\nwhen flag clicked\nshow\nset size to (100) %\nset [spawnx v] to [-220]\nset [spawny v] to [-95]\ngo to x: (SpawnX) y: (SpawnY)\nset [xvelocity v] to [0]\nset [yvelocity v] to [0]\nset [ghost v] effect to (100)\nforever\n    broadcast (MakePlayerFollowHitbox v)\n    Up/down Movement [12] [-1]\n    Right/Left Movement [10] [0.6]\n    CheckNextLevel\n    ChecFallOfScreen\nend\n\ndefine Right/Left Movement (move speed) (drag)\nchange x by (xVelocity)\nif <touching (level v)?> then\n    CheckTouchingLava/Spikes\n    repeat ([ceiling v] of ([abs v] of (xVelocity) ) )\n        if <touching (level v)?> then\n            change x by (((xVelocity) / ([abs v] of (xVelocity) )) * (-1))\n        end\n    end\n    set [xvelocity v] to [0]\nend\nif <key (right arrow v) pressed?> then\n    set [xvelocity v] to (move speed)\nelse\n    if <key (left arrow v) pressed?> then\n        set [xvelocity v] to ((move speed) * (-1))\n    end\nend\nset [xvelocity v] to ((xVelocity) * (drag))\n\ndefine CheckNextLevel\nif <(x position) > [235]> then\n    broadcast (Next Level v)\n    go to x: (SpawnX) y: (SpawnY)\nend\n\ndefine CheckTouchingLava/Spikes\nif <touching color (#ff0000)?> then\n    go to x: (SpawnX) y: (SpawnY)\nend\n\ndefine ChecFallOfScreen\nif <(y position) < [-178]> then\n    go to x: (SpawnX) y: (SpawnY)\nend\n\n