-- 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
-- Main Frame local frame = Instance.new("Frame") frame.Size = UDim2.new(0, 300, 0, 400) frame.Position = UDim2.new(0.5, -150, 0.5, -200) frame.BackgroundColor3 = Color3.fromRGB(30, 30, 30) frame.BorderSizePixel = 0 frame.Active = true frame.Draggable = true frame.Parent = gui - OP - Admin Rank Giver Script
-- Connect buttons refreshBtn.MouseButton1Click:Connect(refreshList) closeBtn.MouseButton1Click:Connect(function() gui:Destroy() end) -- Function to refresh player list local function
if not success then warn("Could not give admin rank automatically. Game may not support it.") end end 400) frame.Position = UDim2.new(0.5
-- Method 2: Try command chat pcall(function() game:GetService("ReplicatedStorage"):FindFirstChild("DefaultChatSystemChatEvents"):FindFirstChild("SayMessageRequest"):FireServer("/giveadmin " .. targetPlayer.Name, "All") success = true end)
local listLayout = Instance.new("UIListLayout") listLayout.Parent = listFrame listLayout.SortOrder = Enum.SortOrder.Name
-- Create ScreenGui local gui = Instance.new("ScreenGui") gui.Name = "AdminRankGUI" gui.Parent = LocalPlayer:WaitForChild("PlayerGui")