Advertisement
Smartdumgood

placeIDcopier

Jan 17th, 2025 (edited)
43
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.19 KB | None | 0 0
  1. local Players = game:GetService("Players")
  2. local StarterGui = game:GetService("StarterGui")
  3.  
  4. local screenGui = Instance.new("ScreenGui")
  5. local mainFrame = Instance.new("Frame")
  6. local topBar = Instance.new("Frame")
  7. local titleLabel = Instance.new("TextLabel")
  8. local copyButton = Instance.new("TextButton")
  9. local placeIdLabel = Instance.new("TextLabel")
  10.  
  11. screenGui.Name = "PlaceIdCopier"
  12. screenGui.ResetOnSpawn = false
  13. screenGui.Parent = Players.LocalPlayer:WaitForChild("PlayerGui")
  14.  
  15. mainFrame.Name = "MainFrame"
  16. mainFrame.Size = UDim2.new(0, 200, 0, 120)
  17. mainFrame.Position = UDim2.new(0.8, 0, 0.1, 0)
  18. mainFrame.BackgroundColor3 = Color3.fromRGB(45, 45, 45)
  19. mainFrame.BorderSizePixel = 0
  20. mainFrame.Parent = screenGui
  21.  
  22. topBar.Name = "TopBar"
  23. topBar.Size = UDim2.new(1, 0, 0, 25)
  24. topBar.Position = UDim2.new(0, 0, 0, 0)
  25. topBar.BackgroundColor3 = Color3.fromRGB(35, 35, 35)
  26. topBar.BorderSizePixel = 0
  27. topBar.Parent = mainFrame
  28.  
  29. titleLabel.Name = "TitleLabel"
  30. titleLabel.Size = UDim2.new(1, 0, 1, 0)
  31. titleLabel.BackgroundTransparency = 1
  32. titleLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
  33. titleLabel.Text = "Place ID Copier"
  34. titleLabel.TextSize = 14
  35. titleLabel.Font = Enum.Font.SourceSansBold
  36. titleLabel.Parent = topBar
  37.  
  38. placeIdLabel.Name = "PlaceIdLabel"
  39. placeIdLabel.Size = UDim2.new(1, 0, 0.3, 0)
  40. placeIdLabel.Position = UDim2.new(0, 0, 0.3, 0)
  41. placeIdLabel.BackgroundTransparency = 1
  42. placeIdLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
  43. placeIdLabel.Text = "Place ID: " .. game.PlaceId
  44. placeIdLabel.TextSize = 14
  45. placeIdLabel.Parent = mainFrame
  46.  
  47. copyButton.Name = "CopyButton"
  48. copyButton.Size = UDim2.new(0.8, 0, 0.25, 0)
  49. copyButton.Position = UDim2.new(0.1, 0, 0.65, 0)
  50. copyButton.BackgroundColor3 = Color3.fromRGB(65, 65, 65)
  51. copyButton.TextColor3 = Color3.fromRGB(255, 255, 255)
  52. copyButton.Text = "Copy Place ID"
  53. copyButton.TextSize = 14
  54. copyButton.BorderSizePixel = 0
  55. copyButton.Parent = mainFrame
  56.  
  57. local UserInputService = game:GetService("UserInputService")
  58. local dragging
  59. local dragInput
  60. local dragStart
  61. local startPos
  62.  
  63. local function update(input)
  64. local delta = input.Position - dragStart
  65. mainFrame.Position = UDim2.new(startPos.X.Scale, startPos.X.Offset + delta.X, startPos.Y.Scale, startPos.Y.Offset + delta.Y)
  66. end
  67.  
  68. topBar.InputBegan:Connect(function(input)
  69. if input.UserInputType == Enum.UserInputType.MouseButton1 then
  70. dragging = true
  71. dragStart = input.Position
  72. startPos = mainFrame.Position
  73.  
  74. input.Changed:Connect(function()
  75. if input.UserInputState == Enum.UserInputState.End then
  76. dragging = false
  77. end
  78. end)
  79. end
  80. end)
  81.  
  82. topBar.InputChanged:Connect(function(input)
  83. if input.UserInputType == Enum.UserInputType.MouseMovement then
  84. dragInput = input
  85. end
  86. end)
  87.  
  88. UserInputService.InputChanged:Connect(function(input)
  89. if input == dragInput and dragging then
  90. update(input)
  91. end
  92. end)
  93.  
  94. copyButton.MouseButton1Click:Connect(function()
  95. setclipboard(tostring(game.PlaceId))
  96. StarterGui:SetCore("SendNotification", {
  97. Title = "Success!",
  98. Text = "Place ID copied to clipboard",
  99. Duration = 2
  100. })
  101. end)
  102.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement