Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local player = game.Players.LocalPlayer
- -- 맵 이름과 좌표들
- local mapData = {
- ["🌁 중국 맵"] = {
- 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)
- },
- ["🌾 풍차 집 맵"] = {
- Vector3.new(24.82, -22.31, -24.05),
- Vector3.new(24.27, -22.31, 23.32),
- Vector3.new(-23.54, -22.31, 25.06),
- Vector3.new(-24.38, -22.31, -22.49)
- },
- ["🏗️ 공사장 맵"] = {
- Vector3.new(-17.31, -31.31, 14.90),
- Vector3.new(-15.38, -31.31, -18.16),
- Vector3.new(17.41, -31.31, -14.75),
- Vector3.new(14.03, -31.31, 16.79)
- },
- ["🌊 바다 맵"] = {
- 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 teleportingMap = nil
- -- UI 설정
- local screenGui = Instance.new("ScreenGui")
- screenGui.Name = "TeleportUI"
- screenGui.ResetOnSpawn = false
- screenGui.Parent = player:WaitForChild("PlayerGui")
- -- 버튼 생성 함수
- local function createButton(name, position)
- local button = Instance.new("TextButton")
- button.Size = UDim2.new(0, 160, 0, 40)
- button.Position = position
- button.BackgroundColor3 = Color3.fromRGB(25, 25, 25)
- button.TextColor3 = Color3.fromRGB(0, 255, 255)
- button.BorderSizePixel = 0
- button.Text = name
- button.Font = Enum.Font.SourceSansBold
- button.TextSize = 16
- button.Parent = screenGui
- local corner = Instance.new("UICorner")
- corner.CornerRadius = UDim.new(0, 8)
- corner.Parent = button
- return button
- end
- -- 텔레포트 기능 실행
- local function startTeleport(mapName, button)
- teleportingMap = mapName
- task.spawn(function()
- while teleportingMap == mapName do
- local character = player.Character
- if character and character:FindFirstChild("HumanoidRootPart") then
- for _, pos in ipairs(mapData[mapName]) do
- if teleportingMap ~= mapName then break end
- character.HumanoidRootPart.CFrame = CFrame.new(pos)
- task.wait(0.5)
- end
- else
- teleportingMap = nil
- end
- end
- end)
- end
- -- 버튼 생성 및 이벤트 연결
- local index = 0
- for mapName, _ in pairs(mapData) do
- local button = createButton(mapName, UDim2.new(0, 20, 0, 60 + index * 50))
- button.MouseButton1Click:Connect(function()
- if teleportingMap == mapName then
- teleportingMap = nil
- button.Text = mapName
- else
- teleportingMap = nil -- 다른 맵 실행 중이면 끔
- button.Text = "🌀 실행완료 !"
- startTeleport(mapName, button)
- end
- end)
- index += 1
- end
Advertisement
Add Comment
Please, Sign In to add comment