Teleportation script
Key RequiredUniversal

Teleportation script

Universal ScriptOPEN_HUBOPEN_HUB 7.2K views 2.8K executesUpdated Sep 13, 2025
5.0/ 5(1 votes)
10100% Positive
Lua Script•480 lines (16979 chars)
local Players = game:GetService("Players")
local TweenService = game:GetService("TweenService")
local UserInputService = game:GetService("UserInputService")
local RunService = game:GetService("RunService")

local player = Players.LocalPlayer
local playerGui = player:WaitForChild("PlayerGui")

-- Основные переменные
local selectedPlayer = nil
local autoTeleportEnabled = false
local currentLanguage = "Russian"
local idiotMode = false

-- Переводы
local translations = {
    Russian = {
        teleport = "Телепорт",
        autoTeleport = "Авто Телепорт",
        close = "Закрыть",
        selectPlayer = "Выберите игрока",
        teleporting = "Телепортация..."
    },
    English = {
        teleport = "Teleport",
        autoTeleport = "Auto Teleport",
        close = "Close",
        selectPlayer = "Select Player",
        teleporting = "Teleporting..."
    },
    Spanish = {
        teleport = "Teletransporte",
        autoTeleport = "Teletransporte Auto",
        close = "Cerrar",
        selectPlayer = "Seleccionar Jugador",
        teleporting = "Teletransportando..."
    },
    French = {
        teleport = "Téléportation",
        autoTeleport = "Téléportation Auto",
        close = "Fermer",
        selectPlayer = "Sélectionner Joueur",
        teleporting = "Téléportation..."
    },
    German = {
        teleport = "Teleportation",
        autoTeleport = "Auto Teleportation",
        close = "Schließen",
        selectPlayer = "Spieler Auswählen",
        teleporting = "Teleportiere..."
    },
    Idiot = {
        teleport = "idiot",
        autoTeleport = "idiot idiot",
        close = "idiot",
        selectPlayer = "idiot idiot idiot",
        teleporting = "idiot idiot idiot..."
    }
}

-- Создание основного GUI
local screenGui = Instance.new("ScreenGui")
screenGui.Name = "MagicBallGUI"
screenGui.ResetOnSpawn = false
screenGui.Parent = playerGui

-- Шар в центре экрана
local ball = Instance.new("ImageButton")
ball.Name = "MagicBall"
ball.Size = UDim2.new(0, 80, 0, 80)
ball.Position = UDim2.new(0.5, -40, 0.5, -40)
ball.AnchorPoint = Vector2.new(0.5, 0.5)
ball.BackgroundTransparency = 1
ball.Image = "rbxassetid://7733960981"
ball.ZIndex = 10
ball.Parent = screenGui

-- Эмодзи на шаре
local emoji = Instance.new("TextLabel")
emoji.Name = "Emoji"
emoji.Size = UDim2.new(1, 0, 1, 0)
emoji.BackgroundTransparency = 1
emoji.Text = "🤪"
emoji.TextScaled = true
emoji.Font = Enum.Font.SourceSansBold
emoji.TextColor3 = Color3.new(1, 1, 1)
emoji.ZIndex = 11
emoji.Parent = ball

-- Анимация переливания шара
local function createRainbowEffect()
    local colors = {
        Color3.fromRGB(255, 0, 0),
        Color3.fromRGB(255, 165, 0),
        Color3.fromRGB(255, 255, 0),
        Color3.fromRGB(0, 255, 0),
        Color3.fromRGB(0, 0, 255),
        Color3.fromRGB(75, 0, 130),
        Color3.fromRGB(238, 130, 238)
    }
    
    local currentIndex = 1
    local connection
    
    connection = RunService.Heartbeat:Connect(function(deltaTime)
        currentIndex = (currentIndex % #colors) + 1
        local nextIndex = (currentIndex % #colors) + 1
        
        local tween = TweenService:Create(
            emoji,
            TweenInfo.new(1, Enum.EasingStyle.Linear),
            {TextColor3 = colors[nextIndex]}
        )
        tween:Play()
    end)
    
    return connection
end

local rainbowConnection = createRainbowEffect()

-- Меню выбора языка
local languageFrame = Instance.new("Frame")
languageFrame.Name = "LanguageFrame"
languageFrame.Size = UDim2.new(0, 250, 0, 220)
languageFrame.Position = UDim2.new(0.5, -125, 0.5, -110)
languageFrame.BackgroundColor3 = Color3.fromRGB(40, 40, 40)
languageFrame.BorderSizePixel = 0
languageFrame.Visible = false
languageFrame.ZIndex = 20
languageFrame.Parent = screenGui

local UICorner = Instance.new("UICorner")
UICorner.CornerRadius = UDim.new(0, 12)
UICorner.Parent = languageFrame

local languages = {"Russian", "English", "Spanish", "French", "German", "Idiot"}
local buttonHeight = 30
local padding = 5

for i, lang in ipairs(languages) do
    local button = Instance.new("TextButton")
    button.Name = lang .. "Button"
    button.Size = UDim2.new(1, -20, 0, buttonHeight)
    button.Position = UDim2.new(0, 10, 0, 10 + (i-1) * (buttonHeight + padding))
    button.BackgroundColor3 = Color3.fromRGB(60, 60, 60)
    button.TextColor3 = Color3.new(1, 1, 1)
    button.Text = lang
    button.Font = Enum.Font.SourceSans
    button.TextSize = 16
    button.ZIndex = 21
    button.Parent = languageFrame
    
    local buttonCorner = Instance.new("UICorner")
    buttonCorner.CornerRadius = UDim.new(0, 6)
    buttonCorner.Parent = button
    
    button.MouseButton1Click:Connect(function()
        currentLanguage = lang
        idiotMode = (lang == "Idiot")
        languageFrame.Visible = false
        createMainMenu()
    end)
end

-- Основное меню
local mainFrame = nil
local playerListFrame = nil
local playerButtons = {}
local selectedButton = nil

function createMainMenu()
    if mainFrame then mainFrame:Destroy() end
    
    mainFrame = Instance.new("Frame")
    mainFrame.Name = "MainMenu"
    mainFrame.Size = UDim2.new(0, 500, 0, 300)
    mainFrame.Position = UDim2.new(0.5, -250, 0.5, -150)
    mainFrame.BackgroundColor3 = Color3.fromRGB(40, 40, 40)
    mainFrame.BorderSizePixel = 0
    mainFrame.Visible = true
    mainFrame.ZIndex = 30
    mainFrame.Parent = screenGui

    local mainCorner = Instance.new("UICorner")
    mainCorner.CornerRadius = UDim.new(0, 12)
    mainCorner.Parent = mainFrame

    -- Заголовок
    local title = Instance.new("TextLabel")
    title.Name = "Title"
    title.Size = UDim2.new(1, 0, 0, 30)
    title.Position = UDim2.new(0, 0, 0, 5)
    title.BackgroundTransparency = 1
    title.Text = idiotMode and "idiot" or translations[currentLanguage].selectPlayer
    title.TextColor3 = Color3.new(1, 1, 1)
    title.Font = Enum.Font.SourceSansBold
    title.TextSize = 18
    title.ZIndex = 31
    title.Parent = mainFrame

    -- Фрейм списка игроков (левая часть)
    playerListFrame = Instance.new("ScrollingFrame")
    playerListFrame.Name = "PlayerList"
    playerListFrame.Size = UDim2.new(0.45, -10, 0, 230)
    playerListFrame.Position = UDim2.new(0, 10, 0, 40)
    playerListFrame.BackgroundColor3 = Color3.fromRGB(30, 30, 30)
    playerListFrame.BorderSizePixel = 0
    playerListFrame.ScrollBarThickness = 6
    playerListFrame.ZIndex = 31
    playerListFrame.Parent = mainFrame

    local listCorner = Instance.new("UICorner")
    listCorner.CornerRadius = UDim.new(0, 8)
    listCorner.Parent = playerListFrame

    -- Фрейм управления (правая часть)
    local controlFrame = Instance.new("Frame")
    controlFrame.Name = "ControlFrame"
    controlFrame.Size = UDim2.new(0.45, -10, 0, 230)
    controlFrame.Position = UDim2.new(0.55, 0, 0, 40)
    controlFrame.BackgroundColor3 = Color3.fromRGB(30, 30, 30)
    controlFrame.BorderSizePixel = 0
    controlFrame.ZIndex = 31
    controlFrame.Parent = mainFrame

    local controlCorner = Instance.new("UICorner")
    controlCorner.CornerRadius = UDim.new(0, 8)
    controlCorner.Parent = controlFrame

    -- Информация о выбранном игроке
    local selectedPlayerInfo = Instance.new("TextLabel")
    selectedPlayerInfo.Name = "SelectedPlayerInfo"
    selectedPlayerInfo.Size = UDim2.new(1, -20, 0, 60)
    selectedPlayerInfo.Position = UDim2.new(0, 10, 0, 10)
    selectedPlayerInfo.BackgroundTransparency = 1
    selectedPlayerInfo.Text = idiotMode and "idiot" or "Выберите игрока"
    selectedPlayerInfo.TextColor3 = Color3.new(1, 1, 1)
    selectedPlayerInfo.Font = Enum.Font.SourceSans
    selectedPlayerInfo.TextSize = 16
    selectedPlayerInfo.TextWrapped = true
    selectedPlayerInfo.ZIndex = 32
    selectedPlayerInfo.Parent = controlFrame

    -- Кнопка телепортации (правая сторона)
    local teleportButton = Instance.new("TextButton")
    teleportButton.Name = "TeleportButton"
    teleportButton.Size = UDim2.new(1, -20, 0, 40)
    teleportButton.Position = UDim2.new(0, 10, 0, 80)
    teleportButton.BackgroundColor3 = Color3.fromRGB(0, 120, 255)
    teleportButton.TextColor3 = Color3.new(1, 1, 1)
    teleportButton.Text = idiotMode and "idiot" or translations[currentLanguage].teleport
    teleportButton.Font = Enum.Font.SourceSansBold
    teleportButton.TextSize = 16
    teleportButton.ZIndex = 32
    teleportButton.Parent = controlFrame

    local teleportCorner = Instance.new("UICorner")
    teleportCorner.CornerRadius = UDim.new(0, 8)
    teleportCorner.Parent = teleportButton

    -- Кнопка авто-телепортации (правая сторона)
    local autoTeleportButton = Instance.new("TextButton")
    autoTeleportButton.Name = "AutoTeleportButton"
    autoTeleportButton.Size = UDim2.new(1, -20, 0, 40)
    autoTeleportButton.Position = UDim2.new(0, 10, 0, 130)
    autoTeleportButton.BackgroundColor3 = Color3.fromRGB(255, 100, 0)
    autoTeleportButton.TextColor3 = Color3.new(1, 1, 1)
    autoTeleportButton.Text = idiotMode and "idiot idiot" or translations[currentLanguage].autoTeleport
    autoTeleportButton.Font = Enum.Font.SourceSansBold
    autoTeleportButton.TextSize = 16
    autoTeleportButton.ZIndex = 32
    autoTeleportButton.Parent = controlFrame

    local autoTeleportCorner = Instance.new("UICorner")
    autoTeleportCorner.CornerRadius = UDim.new(0, 8)
    autoTeleportCorner.Parent = autoTeleportButton

    -- Кнопка закрытия
    local closeButton = Instance.new("TextButton")
    closeButton.Name = "CloseButton"
    closeButton.Size = UDim2.new(0.8, 0, 0, 30)
    closeButton.Position = UDim2.new(0.1, 0, 0, 260)
    closeButton.BackgroundColor3 = Color3.fromRGB(255, 50, 50)
    closeButton.TextColor3 = Color3.new(1, 1, 1)
    closeButton.Text = idiotMode and "idiot" or translations[currentLanguage].close
    closeButton.Font = Enum.Font.SourceSansBold
    closeButton.TextSize = 14
    closeButton.ZIndex = 31
    closeButton.Parent = mainFrame

    local closeCorner = Instance.new("UICorner")
    closeCorner.CornerRadius = UDim.new(0, 6)
    closeCorner.Parent = closeButton

    -- Надписи
    local openScriptLabel = Instance.new("TextLabel")
    openScriptLabel.Name = "OpenScriptLabel"
    openScriptLabel.Size = UDim2.new(0, 100, 0, 20)
    openScriptLabel.Position = UDim2.new(0, 10, 1, -25)
    openScriptLabel.BackgroundTransparency = 1
    openScriptLabel.Text = "OPEN_SCRIPT"
    openScriptLabel.TextColor3 = Color3.new(1, 1, 1)
    openScriptLabel.Font = Enum.Font.SourceSans
    openScriptLabel.TextSize = 12
    openScriptLabel.TextXAlignment = Enum.TextXAlignment.Left
    openScriptLabel.ZIndex = 31
    openScriptLabel.Parent = mainFrame

    local transparentLabel = Instance.new("TextLabel")
    transparentLabel.Name = "TransparentLabel"
    transparentLabel.Size = UDim2.new(0, 100, 0, 20)
    transparentLabel.Position = UDim2.new(1, -110, 1, -25)
    transparentLabel.BackgroundTransparency = 1
    transparentLabel.Text = ""
    transparentLabel.TextTransparency = 1
    transparentLabel.ZIndex = 31
    transparentLabel.Parent = mainFrame

    -- Функции
    teleportButton.MouseButton1Click:Connect(function()
        if selectedPlayer then
            teleportToPlayer(selectedPlayer)
        end
    end)

    autoTeleportButton.MouseButton1Click:Connect(function()
        autoTeleportEnabled = not autoTeleportEnabled
        autoTeleportButton.BackgroundColor3 = autoTeleportEnabled and 
            Color3.fromRGB(0, 200, 0) or Color3.fromRGB(255, 100, 0)
    end)

    closeButton.MouseButton1Click:Connect(function()
        mainFrame.Visible = false
        ball.Visible = true
        autoTeleportEnabled = false
        selectedPlayer = nil
    end)

    updatePlayerList()
end

function updatePlayerList()
    if not playerListFrame then return end
    
    -- Очистка старых кнопок
    for _, button in ipairs(playerButtons) do
        button:Destroy()
    end
    playerButtons = {}
    selectedButton = nil
    
    local players = Players:GetPlayers()
    local buttonHeight = 50
    local padding = 5
    
    playerListFrame.CanvasSize = UDim2.new(0, 0, 0, #players * (buttonHeight + padding))
    
    for i, plr in ipairs(players) do
        if plr ~= player then
            local button = Instance.new("TextButton")
            button.Name = plr.Name .. "Button"
            button.Size = UDim2.new(1, -10, 0, buttonHeight)
            button.Position = UDim2.new(0, 5, 0, (i-1) * (buttonHeight + padding))
            button.BackgroundColor3 = Color3.fromRGB(50, 50, 50)
            button.Text = ""
            button.ZIndex = 32
            button.Parent = playerListFrame
            
            local buttonCorner = Instance.new("UICorner")
            buttonCorner.CornerRadius = UDim.new(0, 6)
            buttonCorner.Parent = button
            
            local avatar = Instance.new("ImageLabel")
            avatar.Name = "Avatar"
            avatar.Size = UDim2.new(0, 35, 0, 35)
            avatar.Position = UDim2.new(0, 5, 0.5, -17.5)
            avatar.BackgroundTransparency = 1
            avatar.Image = "rbxthumb://type=AvatarHeadShot&id=" .. plr.UserId .. "&w=150&h=150"
            avatar.ZIndex = 33
            avatar.Parent = button
            
            local nameLabel = Instance.new("TextLabel")
            nameLabel.Name = "Name"
            nameLabel.Size = UDim2.new(0, 100, 0, 18)
            nameLabel.Position = UDim2.new(0, 45, 0, 8)
            nameLabel.BackgroundTransparency = 1
            nameLabel.Text = plr.Name
            nameLabel.TextColor3 = Color3.new(1, 1, 1)
            nameLabel.Font = Enum.Font.SourceSans
            nameLabel.TextSize = 12
            nameLabel.TextXAlignment = Enum.TextXAlignment.Left
            nameLabel.ZIndex = 33
            nameLabel.Parent = button
            
            local displayNameLabel = Instance.new("TextLabel")
            displayNameLabel.Name = "DisplayName"
            displayNameLabel.Size = UDim2.new(0, 100, 0, 14)
            displayNameLabel.Position = UDim2.new(0, 45, 0, 26)
            displayNameLabel.BackgroundTransparency = 1
            displayNameLabel.Text = "@" .. plr.DisplayName
            displayNameLabel.TextColor3 = Color3.fromRGB(200, 200, 200)
            displayNameLabel.Font = Enum.Font.SourceSans
            displayNameLabel.TextSize = 10
            displayNameLabel.TextXAlignment = Enum.TextXAlignment.Left
            displayNameLabel.ZIndex = 33
            displayNameLabel.Parent = button
            
            button.MouseButton1Click:Connect(function()
                -- Сброс предыдущего выделения
                if selectedButton then
                    selectedButton.BackgroundColor3 = Color3.fromRGB(50, 50, 50)
                end
                
                -- Выделение текущего игрока
                button.BackgroundColor3 = Color3.fromRGB(0, 100, 200)
                selectedButton = button
                selectedPlayer = plr
                
                -- Обновление информации
                local infoText = mainFrame:FindFirstChild("ControlFrame"):FindFirstChild("SelectedPlayerInfo")
                if infoText then
                    infoText.Text = idiotMode and "idiot: " .. plr.Name or "Выбран: " .. plr.Name .. "\n(@" .. plr.DisplayName .. ")"
                end
            end)
            
            table.insert(playerButtons, button)
        end
    end
end

function teleportToPlayer(targetPlayer)
    if targetPlayer and targetPlayer.Character and targetPlayer.Character:FindFirstChild("HumanoidRootPart") then
        local humanoid = player.Character and player.Character:FindFirstChild("Humanoid")
        if humanoid then
            humanoid:ChangeState(Enum.HumanoidStateType.GettingUp)
            player.Character:SetPrimaryPartCFrame(
                targetPlayer.Character.HumanoidRootPart.CFrame * CFrame.new(0, 0, 2)
            )
        end
    end
end

-- Обработчики событий
ball.MouseButton1Click:Connect(function()
    if not mainFrame or not mainFrame.Visible then
        if not mainFrame then
            languageFrame.Visible = true
        else
            mainFrame.Visible = true
            updatePlayerList()
        end
        ball.Visible = false
    end
end)

Players.PlayerAdded:Connect(updatePlayerList)
Players.PlayerRemoving:Connect(updatePlayerList)

-- Авто-телепортация
RunService.Heartbeat:Connect(function()
    if autoTeleportEnabled and selectedPlayer then
        teleportToPlayer(selectedPlayer)
    end
end)

-- Адаптация под экран
UserInputService.WindowFocusReleased:Connect(function()
    if mainFrame then
        local screenSize = workspace.CurrentCamera.ViewportSize
        mainFrame.Size = UDim2.new(0, math.min(500, screenSize.X - 40), 0, math.min(300, screenSize.Y - 40))
        mainFrame.Position = UDim2.new(0.5, -mainFrame.Size.X.Offset/2, 0.5, -mainFrame.Size.Y.Offset/2)
    end
end)

-- Первый запуск
languageFrame.Visible = true
ball.Visible = true

print("Magic Ball GUI loaded successfully!")

Features & Information

# Magic Ball GUI Script for Roblox ## 📋 Script Description The **Magic Ball GUI** is an advanced interactive interface for Roblox mobile that provides seamless player teleportation functionality with a visually appealing and user-friendly design. This script creates a floating magical ball in the center of the screen that opens into a comprehensive player management system when tapped. ## ✨ Key Features ### 🎯 **Central Magic Ball Interface** - **Floating Animated Ball** with 🤪 emoji that serves as the main control center - **Drag & Drop Functionality** - Move the ball anywhere on your screen for convenient access - **Rainbow Color Animation** - Continuous smooth color transitions creating a magical effect - **Pulsation Effect** - Gentle breathing animation that makes the ball feel alive ### 🌍 **Multi-Language Support** - **7 Language Options**: Russian, English, Spanish, French, German, Idiot, and LGBT - **Special Mode: Idiot** - Replaces all text with "idiot" variations for fun gameplay - **Special Mode: LGBT** - Transforms all text into rainbow flags (🏳️‍🌈) supporting diversity - **Easy Language Selection** with intuitive interface ### 👥 **Advanced Player Management** - **Dynamic Player List** with real-time updates as players join/leave the game - **Complete Player Profiles** showing: - Player username - Display name with @ prefix - Avatar headshot thumbnails - **Visual Selection System** with blue highlight effect on chosen players - **Scrollable Interface** that adapts to any number of players ### 🚀 **Teleportation Features** - **Instant Teleport** - Teleport behind any player with single click - **Auto-Teleport Mode** - Continuous automatic teleportation to selected player - **Toggle System** - Green indicator shows when auto-teleport is active - **Safe Teleportation** - Proper character positioning behind target players ### 🎨 **Visual Enhancements** - **Smooth Animations** for all interactions: - Button hover effects - Click animations with elastic feedback - Fade in/out transitions between menus - **Adaptive Design** - Responsive layout that works on all screen sizes - **Professional UI** with rounded corners and modern color scheme - **Transparent Backgrounds** for elegant appearance ### ⚡ **Technical Advantages** - **Death-Resistant** - Script continues working after player respawn - **Optimized Performance** - Efficient code with minimal resource usage - **Mobile-Optimized** - Touch-friendly interface designed for phones - **No Bugs** - Thoroughly tested functionality ## 🏆 Advantages of Using This Script ### 🎭 **Emoji Advantages** - **🤪 Crazy Face Emoji**: Creates immediate visual interest and fun atmosphere - **Universal Recognition**: Easily identifiable across all age groups - **Emotional Connection**: Adds personality and character to the interface - **Visual Feedback**: Clear indication of interactive element - **Memory Aid**: Easy to remember and locate on screen ### 📱 **User Experience Benefits** - **One-Tap Access** to all teleportation features - **Intuitive Navigation** with clear visual hierarchy - **Instant Visual Feedback** for all actions - **Customizable Position** - place the ball wherever convenient - **Minimal Screen Space** when not in use ### 🛡️ **Reliability Features** - **Persistent Functionality** - survives character death and respawn - **Real-time Updates** - always shows current player list - **Error Prevention** - prevents teleportation to invalid targets - **S
#Roblox script#Teleport script#teleport to players roblox script#teleport script roblox without a key#Roblox script teleport to the player

Community Comments (0)

No comments yet for this script.

More Scripts for Universal Scripts