Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local Players = game:GetService("Players")
- -- Создаем ScreenGui
- local screenGui = Instance.new("ScreenGui")
- screenGui.Name = "AdminPanel"
- screenGui.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
- -- Создаем Frame для панели
- local frame = Instance.new("Frame")
- frame.Size = UDim2.new(0, 200, 0, 150)
- frame.Position = UDim2.new(0, 10, 0, 10)
- frame.BackgroundColor3 = Color3.fromRGB(30, 30, 30)
- frame.Parent = screenGui
- -- Заголовок панели
- local title = Instance.new("TextLabel")
- title.Size = UDim2.new(1, 0, 0, 30)
- title.BackgroundColor3 = Color3.fromRGB(45, 45, 45)
- title.Text = "Admin Panel"
- title.TextColor3 = Color3.fromRGB(255, 255, 255)
- title.Parent = frame
- -- Текстовое поле для ввода имени
- local playerNameInput = Instance.new("TextBox")
- playerNameInput.Size = UDim2.new(1, -20, 0, 30)
- playerNameInput.Position = UDim2.new(0, 10, 0, 40)
- playerNameInput.PlaceholderText = "Enter Player Name"
- playerNameInput.Text = ""
- playerNameInput.BackgroundColor3 = Color3.fromRGB(50, 50, 50)
- playerNameInput.TextColor3 = Color3.fromRGB(255, 255, 255)
- playerNameInput.Parent = frame
- -- Кнопка Teleport
- local teleportButton = Instance.new("TextButton")
- teleportButton.Size = UDim2.new(1, -20, 0, 30)
- teleportButton.Position = UDim2.new(0, 10, 0, 80)
- teleportButton.Text = "Teleport"
- teleportButton.BackgroundColor3 = Color3.fromRGB(0, 0, 255)
- teleportButton.TextColor3 = Color3.fromRGB(255, 255, 255)
- teleportButton.Parent = frame
- -- Водяной знак
- local watermark = Instance.new("TextLabel")
- watermark.Size = UDim2.new(1, 0, 0, 20)
- watermark.Position = UDim2.new(0, 0, 1, -20)
- watermark.BackgroundColor3 = Color3.fromRGB(45, 45, 45)
- watermark.Text = "by Xande | Scripts!"
- watermark.TextColor3 = Color3.fromRGB(255, 255, 255)
- watermark.TextScaled = true
- watermark.Parent = frame
- -- Функция для телепортации администратора к игроку
- local function teleportToPlayer(targetPlayerName)
- local targetPlayer = Players:FindFirstChild(targetPlayerName)
- local localPlayer = Players.LocalPlayer
- if targetPlayer and targetPlayer.Character and targetPlayer.Character:FindFirstChild("HumanoidRootPart") then
- local targetPosition = targetPlayer.Character.HumanoidRootPart.CFrame
- if localPlayer.Character and localPlayer.Character:FindFirstChild("HumanoidRootPart") then
- localPlayer.Character.HumanoidRootPart.CFrame = targetPosition
- else
- print("Local player's HumanoidRootPart not found.")
- end
- else
- print("Target player or their HumanoidRootPart not found.")
- end
- end
- -- Обработчик нажатия кнопки Teleport
- teleportButton.MouseButton1Click:Connect(function()
- local targetPlayerName = playerNameInput.Text
- if targetPlayerName ~= "" then
- teleportToPlayer(targetPlayerName)
- else
- print("Please enter a valid player name.")
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement