ごめん Loop { の行は
While (GetKeyState("Shift","P")) {
に差し替えで

https://pastebin.pl/view/f751a89e