100%PEN A Sclloling Platformer
@Stage\n\n@スプライト1\n\ndefine xy (x) (y)\ngo to x: (((-1) * (ステージｘ)) + (x)) y: (((-1) * (ステージｙ)) + (y))\n\nwhen flag clicked\nset [自機ｘ v] to [0]\nset [自機ｙ v] to [0]\nset [ステージｘ v] to [0]\nset [ステージｙ v] to [0]\nset [xv v] to [0]\nset [yv v] to [0]\nforever\n    動く\nend\n\ndefine 接触判定\ndelete all of [接触 v]\nset [i v] to [0]\nrepeat ((length of [コース v]) / (5))\n    if <<<(((item ((i) + (1)) of [コース v]) + ((-1) * (item ((i) + (3)) of [コース v]))) + (-5)) < (((ステージｘ) + (自機ｘ)) + (20))> and <(((ステージｘ) + (自機ｘ)) + (-20)) < (((item ((i) + (1)) of [コース v]) + (item ((i) + (3)) of [コース v])) + (5))>> and <<(((item ((i) + (2)) of [コース v]) + ((-1) * (item ((i) + (4)) of [コース v]))) + (-5)) < (((ステージｙ) + (自機ｙ)) + (20))> and <(((ステージｙ) + (自機ｙ)) + (-20)) < (((item ((i) + (2)) of [コース v]) + (item ((i) + (4)) of [コース v])) + (5))>>> then\n        add (item ((i) + (5)) of [コース v]) to [接触 v]\n    end\n    change [i v] by (5)\nend\n\ndefine ステージ入れる用xy (x) (y) 横長さ (横) 縦の長さ (縦) 種類 (種類)\nadd (x) to [コース v]\nadd (y) to [コース v]\nadd (横) to [コース v]\nadd (縦) to [コース v]\nadd (種類) to [コース v]\n\ndefine 四角xy (x) (y) 横の長さ (横の長さ) 縦の長さ (縦の長さ) 種類 (種類)\nset pen size to (10)\nset pen color to (#ff0000)\nif <(種類) = [1]> then\n    set pen (brightness v) to (0)\nend\nif <(種類) = [3]> then\n    change pen (color v) by (70)\nend\nif <(種類) = [4]> then\n    set pen color to (#ff6e00)\n    xy ((x) + (-20)) ((y) + (-30))\n    pen down\n    xy ((x) + (-20)) ((y) + (30))\n    xy ((x) + (20)) ((y) + (15))\n    xy ((x) + (-20)) (y)\n    pen up\nelse\n    xy ((x) + ((-1) * (横の長さ))) ((y) + (縦の長さ))\n    pen down\n    xy ((x) + (横の長さ)) ((y) + (縦の長さ))\n    xy ((x) + (横の長さ)) ((y) + ((-1) * (縦の長さ)))\n    xy ((x) + ((-1) * (横の長さ))) ((y) + ((-1) * (縦の長さ)))\n    xy ((x) + ((-1) * (横の長さ))) ((y) + (縦の長さ))\n    pen up\nend\n\ndefine 全体描画\nerase all\nset [ii v] to [0]\nrepeat ((length of [コース v]) / (5))\n    四角xy (item ((ii) + (1)) of [コース v]) (item ((ii) + (2)) of [コース v]) 横の長さ (item ((ii) + (3)) of [コース v]) 縦の長さ (item ((ii) + (4)) of [コース v]) 種類 (item ((ii) + (5)) of [コース v])\n    change [ii v] by (5)\nend\n四角xy ((自機ｘ) + (ステージｘ)) ((自機ｙ) + (ステージｙ)) 横の長さ [15] 縦の長さ [15] 種類 [1]\n\nwhen flag clicked\nforever\n    全体描画\nend\n\nwhen flag clicked\nforever\n    接触判定\nend\n\ndelete all of [コース v]\nステージ入れる用xy [0] [-200] 横長さ [100] 縦の長さ [100] 種類 [1]\nステージ入れる用xy [320] [-115] 横長さ [100] 縦の長さ [15] 種類 [1]\nステージ入れる用xy [445] [-90] 横長さ [15] 縦の長さ [40] 種類 [2]\nステージ入れる用xy [570] [-115] 横長さ [100] 縦の長さ [15] 種類 [1]\nステージ入れる用xy [710] [-120] 横長さ [30] 縦の長さ [10] 種類 [3]\nステージ入れる用xy [765] [-30] 横長さ [15] 縦の長さ [100] 種類 [1]\nステージ入れる用xy [765] [-30] 横長さ [15] 縦の長さ [100] 種類 [1]\nステージ入れる用xy [765] [-30] 横長さ [15] 縦の長さ [100] 種類 [1]\nステージ入れる用xy [1000] [265] 横長さ [60] 縦の長さ [40] 種類 [4]\nステージ入れる用xy [1000] [180] 横長さ [100] 縦の長さ [50] 種類 [1]\n\ndefine 動く\nif <<<<(mouse x) < (x position)> and <mouse down?>> or <key (a v) pressed?>> or <key (left arrow v) pressed?>> then\n    change [xv v] by (-1)\nend\nif <<<<(x position) < (mouse x)> and <mouse down?>> or <key (d v) pressed?>> or <key (right arrow v) pressed?>> then\n    change [xv v] by (1)\nend\nset [xv v] to ((Xv) * (0.88))\nchange [自機ｘ v] by (Xv)\nif <[接触 v] contains [1]?> then\n    change [自機ｙ v] by (1)\n    if <[接触 v] contains [1]?> then\n        change [自機ｙ v] by (1)\n        if <[接触 v] contains [1]?> then\n            change [自機ｙ v] by (1)\n            if <[接触 v] contains [1]?> then\n                change [自機ｙ v] by (1)\n                if <[接触 v] contains [1]?> then\n                    change [自機ｙ v] by (1)\n                    接触判定\n                    if <[接触 v] contains [1]?> then\n                        change [自機ｘ v] by ((-1) * (Xv))\n                        change [自機ｙ v] by (-5)\n                        if <[0] < (Xv)> then\n                            set [xv v] to [-10]\n                        else\n                            set [xv v] to [10]\n                            set [yv v] to [15]\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\nchange [自機ｙ v] by (4)\nif <<<<[0] < (mouse y)> and <mouse down?>> or <<key (w v) pressed?> or <key (up arrow v) pressed?>>> and <(jump) < [1]>> then\n    set [yv v] to [15]\n    change [jump v] by (1)\nend\nif <[接触 v] contains [3]?> then\n    set [yv v] to [22]\nend\nchange [自機ｙ v] by (-5)\nif <<[接触 v] contains [2]?> or <(ステージｙ) < [-1500]>> then\n    set [自機ｘ v] to [0]\n    set [自機ｙ v] to [0]\n    set [ステージｘ v] to [0]\n    set [ステージｙ v] to [0]\n    set [xv v] to [0]\n    set [yv v] to [0]\nend\nchange [自機ｙ v] by (Yv)\nchange [yv v] by (-1)\n接触判定\nif <[接触 v] contains [1]?> then\n    change [自機ｙ v] by ((-1) * (Yv))\n    set [yv v] to [0]\n    set [jump v] to [0]\nelse\n    set [jump v] to [1]\nend\n\nwhen flag clicked\nforever\n    change [ステージｘ v] by (round (((自機ｘ) + (Xv)) / (9)))\n    change [自機ｘ v] by (round ((-1) * (((自機ｘ) + (Xv)) / (9))))\n    change [ステージｙ v] by (round (((自機ｙ) + (Yv)) / (9)))\n    change [自機ｙ v] by (round ((-1) * (((自機ｙ) + (Yv)) / (9))))\nend\n\n@スプライト2\n\nwhen flag clicked\nhide\n\n
WASDkey   arrow key\nWASDキーか矢印キー\n\n超軽いでしょ！　超軽量化させました！\nhttps://scratch.mit.edu/studios/26677951/projects/\n☝僕の作品があるところ