Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- 스크립트를 StarterPlayerScripts에 넣으세요
- local player = game.Players.LocalPlayer
- local UserInputService = game:GetService("UserInputService")
- -- 텔레포트할 좌표들
- local teleportPositions = {
- Vector3.new(-39.17, -19.31, 38.94),
- Vector3.new(-39.03, -19.31, -39.21),
- Vector3.new(39.22, -19.31, -38.25),
- Vector3.new(38.87, -19.31, 37.36)
- }
- local isTeleporting = false -- 텔레포트 상태 체크
- -- T 키를 눌렀을 때 텔레포트 시작/중지
- UserInputService.InputBegan:Connect(function(input, gameProcessed)
- if gameProcessed then return end -- 게임에서 이미 처리된 입력은 무시
- if input.UserInputType == Enum.UserInputType.Keyboard and input.KeyCode == Enum.KeyCode.T then
- local character = player.Character
- if character and character:FindFirstChild("HumanoidRootPart") then
- -- 텔레포트 시작/중지 토글
- if isTeleporting then
- isTeleporting = false -- 텔레포트 중지
- else
- isTeleporting = true -- 텔레포트 시작
- -- 무한 반복
- while isTeleporting do
- for _, position in ipairs(teleportPositions) do
- character.HumanoidRootPart.CFrame = CFrame.new(position)
- wait(0.5) -- 0.5초 대기
- end
- end
- end
- end
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment