CoiledTom

Hh

Jan 30th, 2026
17
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.30 KB | None | 0 0
  1. -- by CoiledTom
  2.  
  3. -- SERVIÇOS
  4. local Players = game:GetService("Players")
  5. local UIS = game:GetService("UserInputService")
  6.  
  7. local player = Players.LocalPlayer
  8.  
  9. -- FUNÇÃO COPIAR
  10. local function copyText(text)
  11. if setclipboard then
  12. setclipboard(text)
  13. elseif toclipboard then
  14. toclipboard(text)
  15. end
  16. end
  17.  
  18. -- GUI
  19. local ScreenGui = Instance.new("ScreenGui")
  20. ScreenGui.Parent = game.CoreGui
  21.  
  22. -- BOTÃO ABRIR / FECHAR
  23. local ToggleButton = Instance.new("TextButton")
  24. ToggleButton.Parent = ScreenGui
  25. ToggleButton.Size = UDim2.new(0, 42, 0, 42)
  26. ToggleButton.Position = UDim2.new(0, 10, 0, 10)
  27. ToggleButton.Text = "≡"
  28. ToggleButton.BackgroundColor3 = Color3.fromRGB(30,30,30)
  29. ToggleButton.TextColor3 = Color3.fromRGB(255,255,255)
  30. ToggleButton.BorderSizePixel = 0
  31. ToggleButton.TextSize = 22
  32. ToggleButton.AutoButtonColor = true
  33. ToggleButton.Active = true
  34.  
  35. local ToggleCorner = Instance.new("UICorner", ToggleButton)
  36. ToggleCorner.CornerRadius = UDim.new(0,10)
  37.  
  38. -- FRAME PRINCIPAL
  39. local MainFrame = Instance.new("Frame")
  40. MainFrame.Parent = ScreenGui
  41. MainFrame.Size = UDim2.new(0, 260, 0, 320)
  42. MainFrame.Position = UDim2.new(0.5, -130, 0.5, -160)
  43. MainFrame.BackgroundColor3 = Color3.fromRGB(20,20,20)
  44. MainFrame.BorderSizePixel = 0
  45. MainFrame.Visible = false
  46. MainFrame.Active = true
  47.  
  48. local MainCorner = Instance.new("UICorner", MainFrame)
  49. MainCorner.CornerRadius = UDim.new(0,12)
  50.  
  51. -- TÍTULO
  52. local Title = Instance.new("TextLabel")
  53. Title.Parent = MainFrame
  54. Title.Size = UDim2.new(1, 0, 0, 40)
  55. Title.Text = "Jogadores do Servidor"
  56. Title.BackgroundTransparency = 1
  57. Title.TextColor3 = Color3.fromRGB(255,255,255)
  58. Title.TextSize = 16
  59. Title.Font = Enum.Font.GothamBold
  60.  
  61. -- BOTÃO REFRESH
  62. local Refresh = Instance.new("TextButton")
  63. Refresh.Parent = MainFrame
  64. Refresh.Size = UDim2.new(1, -20, 0, 30)
  65. Refresh.Position = UDim2.new(0, 10, 0, 45)
  66. Refresh.Text = "🔄 Atualizar Lista"
  67. Refresh.BackgroundColor3 = Color3.fromRGB(35,35,35)
  68. Refresh.TextColor3 = Color3.fromRGB(255,255,255)
  69. Refresh.BorderSizePixel = 0
  70. Refresh.TextSize = 14
  71.  
  72. local RefreshCorner = Instance.new("UICorner", Refresh)
  73. RefreshCorner.CornerRadius = UDim.new(0,8)
  74.  
  75. -- SCROLL
  76. local Scroll = Instance.new("ScrollingFrame")
  77. Scroll.Parent = MainFrame
  78. Scroll.Size = UDim2.new(1, -20, 1, -90)
  79. Scroll.Position = UDim2.new(0, 10, 0, 85)
  80. Scroll.CanvasSize = UDim2.new(0,0,0,0)
  81. Scroll.BackgroundTransparency = 1
  82. Scroll.ScrollBarImageTransparency = 0.3
  83.  
  84. local UIList = Instance.new("UIListLayout", Scroll)
  85. UIList.Padding = UDim.new(0,6)
  86.  
  87. -- ATUALIZAR LISTA
  88. local function refreshList()
  89. for _, v in pairs(Scroll:GetChildren()) do
  90. if v:IsA("TextButton") then
  91. v:Destroy()
  92. end
  93. end
  94.  
  95. for _, plr in pairs(Players:GetPlayers()) do
  96. local btn = Instance.new("TextButton")
  97. btn.Parent = Scroll
  98. btn.Size = UDim2.new(1, -5, 0, 32)
  99. btn.Text = plr.Name
  100. btn.BackgroundColor3 = Color3.fromRGB(40,40,40)
  101. btn.TextColor3 = Color3.fromRGB(255,255,255)
  102. btn.BorderSizePixel = 0
  103. btn.TextSize = 14
  104.  
  105. local c = Instance.new("UICorner", btn)
  106. c.CornerRadius = UDim.new(0,8)
  107.  
  108. btn.MouseButton1Click:Connect(function()
  109. copyText(plr.Name)
  110. btn.Text = "Copiado!"
  111. task.wait(0.6)
  112. btn.Text = plr.Name
  113. end)
  114. end
  115.  
  116. task.wait()
  117. Scroll.CanvasSize = UDim2.new(0,0,0, UIList.AbsoluteContentSize.Y + 5)
  118. end
  119.  
  120. -- DRAG FUNÇÃO (BOTÃO)
  121. local dragging, dragStart, startPos
  122.  
  123. ToggleButton.InputBegan:Connect(function(input)
  124. if input.UserInputType == Enum.UserInputType.MouseButton1
  125. or input.UserInputType == Enum.UserInputType.Touch then
  126. dragging = true
  127. dragStart = input.Position
  128. startPos = ToggleButton.Position
  129.  
  130. input.Changed:Connect(function()
  131. if input.UserInputState == Enum.UserInputState.End then
  132. dragging = false
  133. end
  134. end)
  135. end
  136. end)
  137.  
  138. UIS.InputChanged:Connect(function(input)
  139. if dragging and (input.UserInputType == Enum.UserInputType.MouseMovement
  140. or input.UserInputType == Enum.UserInputType.Touch) then
  141. local delta = input.Position - dragStart
  142. ToggleButton.Position = UDim2.new(
  143. startPos.X.Scale,
  144. startPos.X.Offset + delta.X,
  145. startPos.Y.Scale,
  146. startPos.Y.Offset + delta.Y
  147. )
  148. end
  149. end)
  150.  
  151. -- ABRIR / FECHAR
  152. ToggleButton.MouseButton1Click:Connect(function()
  153. MainFrame.Visible = not MainFrame.Visible
  154. if MainFrame.Visible then
  155. refreshList()
  156. end
  157. end)
  158.  
  159. refreshList()
Advertisement
Add Comment
Please, Sign In to add comment