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(-29.57, -31.31, 30.41),
- Vector3.new(29.28, -31.31, 29.94),
- Vector3.new(29.57, -31.31, -29.17),
- Vector3.new(-31.65, -31.31, -29.61)
- }
- 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