Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Create the UI elements
- local ScreenGui = Instance.new("ScreenGui")
- local MainFrame = Instance.new("Frame")
- local MinimizeButton = Instance.new("TextButton")
- local SmallIcon = Instance.new("TextButton")
- local RankButtonsFrame = Instance.new("Frame")
- local AddHDAdminButton = Instance.new("TextButton")
- -- Parent to player GUI
- ScreenGui.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
- ScreenGui.Name = "HDAdminMenu"
- -- Style the main frame
- MainFrame.Size = UDim2.new(0, 300, 0, 400)
- MainFrame.Position = UDim2.new(0.5, -150, 0.5, -200)
- MainFrame.BackgroundColor3 = Color3.new(0.2, 0.2, 0.2)
- MainFrame.Parent = ScreenGui
- MainFrame.Active = true
- MainFrame.Draggable = true
- -- Add minimize button
- MinimizeButton.Size = UDim2.new(0, 30, 0, 30)
- MinimizeButton.Position = UDim2.new(1, -35, 0, 5)
- MinimizeButton.BackgroundColor3 = Color3.new(1, 0, 0)
- MinimizeButton.Text = "-"
- MinimizeButton.Parent = MainFrame
- -- Add small icon
- SmallIcon.Size = UDim2.new(0, 50, 0, 50)
- SmallIcon.Position = UDim2.new(0, 10, 0, 10)
- SmallIcon.BackgroundColor3 = Color3.new(0, 0, 1)
- SmallIcon.Text = "+"
- SmallIcon.Visible = false
- SmallIcon.Parent = ScreenGui
- SmallIcon.Active = true
- SmallIcon.Draggable = true
- -- Frame for rank buttons
- RankButtonsFrame.Size = UDim2.new(1, 0, 0.6, 0)
- RankButtonsFrame.Position = UDim2.new(0, 0, 0.2, 0)
- RankButtonsFrame.BackgroundTransparency = 1
- RankButtonsFrame.Parent = MainFrame
- -- Add rank buttons
- local ranks = {"Owner", "Admin", "Mod", "VIP"}
- for i, rank in ipairs(ranks) do
- local RankButton = Instance.new("TextButton")
- RankButton.Size = UDim2.new(0, 200, 0, 50)
- RankButton.Position = UDim2.new(0.5, -100, 0, (i - 1) * 60)
- RankButton.BackgroundColor3 = Color3.new(0.5, 0.5, 0.5)
- RankButton.Text = "Set Rank: " .. rank
- RankButton.Parent = RankButtonsFrame
- -- Set rank functionality
- RankButton.MouseButton1Click:Connect(function()
- local player = game.Players.LocalPlayer
- -- Assuming you have HD Admin installed in your game
- local HDAdmin = game:GetService("ServerScriptService"):FindFirstChild("HDAdmin")
- if HDAdmin then
- HDAdmin:FireServer("SetRank", player, rank)
- else
- warn("HD Admin is not installed in your game!")
- end
- end)
- end
- -- Add button to add HD Admin
- AddHDAdminButton.Size = UDim2.new(0, 200, 0, 50)
- AddHDAdminButton.Position = UDim2.new(0.5, -100, 0.1, 10)
- AddHDAdminButton.BackgroundColor3 = Color3.new(0, 1, 0)
- AddHDAdminButton.Text = "Add HD Admin"
- AddHDAdminButton.Parent = MainFrame
- -- Minimize button functionality
- MinimizeButton.MouseButton1Click:Connect(function()
- MainFrame.Visible = false
- SmallIcon.Visible = true
- end)
- -- Restore main frame from small icon
- SmallIcon.MouseButton1Click:Connect(function()
- MainFrame.Visible = true
- SmallIcon.Visible = false
- end)
- -- Function to add HD Admin
- AddHDAdminButton.MouseButton1Click:Connect(function()
- if not game:GetService("ServerScriptService"):FindFirstChild("HDAdmin") then
- local hdAdmin = Instance.new("Script")
- hdAdmin.Name = "HDAdmin"
- hdAdmin.Source = [[-- Add HD Admin script source here]]
- hdAdmin.Parent = game:GetService("ServerScriptService")
- else
- warn("HD Admin is already installed!")
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment