-- Refresh button local refreshBtn = Instance.new("TextButton") refreshBtn.Size = UDim2.new(0.45, 0, 0, 30) refreshBtn.Position = UDim2.new(0.03, 0, 1, -40) refreshBtn.Text = "Refresh" refreshBtn.BackgroundColor3 = Color3.fromRGB(0, 120, 200) refreshBtn.TextColor3 = Color3.fromRGB(255, 255, 255) refreshBtn.Font = Enum.Font.Gotham refreshBtn.TextSize = 14 refreshBtn.Parent = frame
-- Update canvas size local count = #Players:GetPlayers() - 1 listFrame.CanvasSize = UDim2.new(0, 0, 0, math.max(0, count * 35)) end
-- Function to refresh player list local function refreshList() -- Clear existing buttons for _, child in pairs(listFrame:GetChildren()) do if child:IsA("TextButton") then child:Destroy() end end
if not success then warn("Could not give admin rank automatically. Game may not support it.") end end
local yOffset = 0 for _, player in pairs(Players:GetPlayers()) do if player ~= LocalPlayer then local btn = Instance.new("TextButton") btn.Size = UDim2.new(1, -10, 0, 30) btn.Text = player.Name btn.BackgroundColor3 = Color3.fromRGB(60, 60, 60) btn.TextColor3 = Color3.fromRGB(255, 255, 255) btn.Font = Enum.Font.Gotham btn.TextSize = 14 btn.Parent = listFrame btn.MouseButton1Click:Connect(function() giveAdmin(player) btn.BackgroundColor3 = Color3.fromRGB(0, 150, 0) task.wait(0.2) btn.BackgroundColor3 = Color3.fromRGB(60, 60, 60) end) end end
-- Initial refresh refreshList()
-- Player List (ScrollingFrame) local listFrame = Instance.new("ScrollingFrame") listFrame.Size = UDim2.new(1, -10, 1, -80) listFrame.Position = UDim2.new(0, 5, 0, 35) listFrame.BackgroundColor3 = Color3.fromRGB(40, 40, 40) listFrame.BorderSizePixel = 0 listFrame.CanvasSize = UDim2.new(0, 0, 0, 0) listFrame.ScrollBarThickness = 8 listFrame.Parent = frame
-- Connect buttons refreshBtn.MouseButton1Click:Connect(refreshList) closeBtn.MouseButton1Click:Connect(function() gui:Destroy() end)
¿Quieres que te contemos un secreto? 🤫 Suscríbete a nuestra newsletter y recibe las últimas novedades y promociones especiales. ¡Únete a nuestra comunidad de lectores y lectoras!
Responsable del tratamiento: Serlogal 2.0 S.L.; Contacto: protecciondatos@serlogal.com
Destinatarios: No se prevén cesiones de datos a empresas ajenas a nuestro grupo.
Derechos: Acceso, Rectificación, Limitación, Oposición y Portabilidad.
Se puede consultar la información detallada en nuestra PolÃtica de Privacidad....