CoiledTom

Ttt

Jan 30th, 2026
12
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.62 KB | None | 0 0
  1. -- 📋 COPIAR USERID DO PLAYER
  2.  
  3. local Players = game:GetService("Players")
  4. local player = Players.LocalPlayer
  5.  
  6. local gui = Instance.new("ScreenGui")
  7. gui.ResetOnSpawn = false
  8. gui.Parent = player:WaitForChild("PlayerGui")
  9.  
  10. local frame = Instance.new("Frame", gui)
  11. frame.Size = UDim2.fromScale(0.3, 0.2)
  12. frame.Position = UDim2.fromScale(0.35, 0.4)
  13. frame.BackgroundColor3 = Color3.fromRGB(30,30,30)
  14. frame.BorderSizePixel = 0
  15. frame.Active = true
  16. frame.Draggable = true
  17.  
  18. local title = Instance.new("TextLabel", frame)
  19. title.Size = UDim2.fromScale(1, 0.3)
  20. title.Text = "SEU USER ID"
  21. title.TextScaled = true
  22. title.BackgroundTransparency = 1
  23. title.TextColor3 = Color3.new(1,1,1)
  24.  
  25. local box = Instance.new("TextBox", frame)
  26. box.Size = UDim2.fromScale(0.9, 0.3)
  27. box.Position = UDim2.fromScale(0.05, 0.35)
  28. box.Text = tostring(player.UserId)
  29. box.TextScaled = true
  30. box.ClearTextOnFocus = false
  31. box.BackgroundColor3 = Color3.fromRGB(45,45,45)
  32. box.TextColor3 = Color3.new(1,1,1)
  33.  
  34. local copyBtn = Instance.new("TextButton", frame)
  35. copyBtn.Size = UDim2.fromScale(0.9, 0.25)
  36. copyBtn.Position = UDim2.fromScale(0.05, 0.7)
  37. copyBtn.Text = "COPIAR ID"
  38. copyBtn.TextScaled = true
  39. copyBtn.BackgroundColor3 = Color3.fromRGB(70,70,70)
  40. copyBtn.TextColor3 = Color3.new(1,1,1)
  41.  
  42. copyBtn.MouseButton1Click:Connect(function()
  43. -- Tenta copiar (funciona no PC, e em alguns mobiles)
  44. if setclipboard then
  45. setclipboard(tostring(player.UserId))
  46. copyBtn.Text = "COPIADO ✅"
  47. else
  48. -- fallback: seleciona o texto
  49. box:CaptureFocus()
  50. box.SelectionStart = 1
  51. box.CursorPosition = #box.Text + 1
  52. copyBtn.Text = "SELECIONADO"
  53. end
  54. end)
Advertisement
Add Comment
Please, Sign In to add comment