Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local Players = game:GetService("Players")
- local StarterGui = game:GetService("StarterGui")
- local screenGui = Instance.new("ScreenGui")
- local mainFrame = Instance.new("Frame")
- local topBar = Instance.new("Frame")
- local titleLabel = Instance.new("TextLabel")
- local copyButton = Instance.new("TextButton")
- local placeIdLabel = Instance.new("TextLabel")
- screenGui.Name = "PlaceIdCopier"
- screenGui.ResetOnSpawn = false
- screenGui.Parent = Players.LocalPlayer:WaitForChild("PlayerGui")
- mainFrame.Name = "MainFrame"
- mainFrame.Size = UDim2.new(0, 200, 0, 120)
- mainFrame.Position = UDim2.new(0.8, 0, 0.1, 0)
- mainFrame.BackgroundColor3 = Color3.fromRGB(45, 45, 45)
- mainFrame.BorderSizePixel = 0
- mainFrame.Parent = screenGui
- topBar.Name = "TopBar"
- topBar.Size = UDim2.new(1, 0, 0, 25)
- topBar.Position = UDim2.new(0, 0, 0, 0)
- topBar.BackgroundColor3 = Color3.fromRGB(35, 35, 35)
- topBar.BorderSizePixel = 0
- topBar.Parent = mainFrame
- titleLabel.Name = "TitleLabel"
- titleLabel.Size = UDim2.new(1, 0, 1, 0)
- titleLabel.BackgroundTransparency = 1
- titleLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
- titleLabel.Text = "Place ID Copier"
- titleLabel.TextSize = 14
- titleLabel.Font = Enum.Font.SourceSansBold
- titleLabel.Parent = topBar
- placeIdLabel.Name = "PlaceIdLabel"
- placeIdLabel.Size = UDim2.new(1, 0, 0.3, 0)
- placeIdLabel.Position = UDim2.new(0, 0, 0.3, 0)
- placeIdLabel.BackgroundTransparency = 1
- placeIdLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
- placeIdLabel.Text = "Place ID: " .. game.PlaceId
- placeIdLabel.TextSize = 14
- placeIdLabel.Parent = mainFrame
- copyButton.Name = "CopyButton"
- copyButton.Size = UDim2.new(0.8, 0, 0.25, 0)
- copyButton.Position = UDim2.new(0.1, 0, 0.65, 0)
- copyButton.BackgroundColor3 = Color3.fromRGB(65, 65, 65)
- copyButton.TextColor3 = Color3.fromRGB(255, 255, 255)
- copyButton.Text = "Copy Place ID"
- copyButton.TextSize = 14
- copyButton.BorderSizePixel = 0
- copyButton.Parent = mainFrame
- local UserInputService = game:GetService("UserInputService")
- local dragging
- local dragInput
- local dragStart
- local startPos
- local function update(input)
- local delta = input.Position - dragStart
- mainFrame.Position = UDim2.new(startPos.X.Scale, startPos.X.Offset + delta.X, startPos.Y.Scale, startPos.Y.Offset + delta.Y)
- end
- topBar.InputBegan:Connect(function(input)
- if input.UserInputType == Enum.UserInputType.MouseButton1 then
- dragging = true
- dragStart = input.Position
- startPos = mainFrame.Position
- input.Changed:Connect(function()
- if input.UserInputState == Enum.UserInputState.End then
- dragging = false
- end
- end)
- end
- end)
- topBar.InputChanged:Connect(function(input)
- if input.UserInputType == Enum.UserInputType.MouseMovement then
- dragInput = input
- end
- end)
- UserInputService.InputChanged:Connect(function(input)
- if input == dragInput and dragging then
- update(input)
- end
- end)
- copyButton.MouseButton1Click:Connect(function()
- setclipboard(tostring(game.PlaceId))
- StarterGui:SetCore("SendNotification", {
- Title = "Success!",
- Text = "Place ID copied to clipboard",
- Duration = 2
- })
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement