SmileyE-Watcher

HD ADMIN SCRIPT 1

Dec 29th, 2024
4,099
-1
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.25 KB | None | 0 1
  1. -- Create the UI elements
  2. local ScreenGui = Instance.new("ScreenGui")
  3. local MainFrame = Instance.new("Frame")
  4. local MinimizeButton = Instance.new("TextButton")
  5. local SmallIcon = Instance.new("TextButton")
  6. local RankButtonsFrame = Instance.new("Frame")
  7. local AddHDAdminButton = Instance.new("TextButton")
  8.  
  9. -- Parent to player GUI
  10. ScreenGui.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
  11. ScreenGui.Name = "HDAdminMenu"
  12.  
  13. -- Style the main frame
  14. MainFrame.Size = UDim2.new(0, 300, 0, 400)
  15. MainFrame.Position = UDim2.new(0.5, -150, 0.5, -200)
  16. MainFrame.BackgroundColor3 = Color3.new(0.2, 0.2, 0.2)
  17. MainFrame.Parent = ScreenGui
  18. MainFrame.Active = true
  19. MainFrame.Draggable = true
  20.  
  21. -- Add minimize button
  22. MinimizeButton.Size = UDim2.new(0, 30, 0, 30)
  23. MinimizeButton.Position = UDim2.new(1, -35, 0, 5)
  24. MinimizeButton.BackgroundColor3 = Color3.new(1, 0, 0)
  25. MinimizeButton.Text = "-"
  26. MinimizeButton.Parent = MainFrame
  27.  
  28. -- Add small icon
  29. SmallIcon.Size = UDim2.new(0, 50, 0, 50)
  30. SmallIcon.Position = UDim2.new(0, 10, 0, 10)
  31. SmallIcon.BackgroundColor3 = Color3.new(0, 0, 1)
  32. SmallIcon.Text = "+"
  33. SmallIcon.Visible = false
  34. SmallIcon.Parent = ScreenGui
  35. SmallIcon.Active = true
  36. SmallIcon.Draggable = true
  37.  
  38. -- Frame for rank buttons
  39. RankButtonsFrame.Size = UDim2.new(1, 0, 0.6, 0)
  40. RankButtonsFrame.Position = UDim2.new(0, 0, 0.2, 0)
  41. RankButtonsFrame.BackgroundTransparency = 1
  42. RankButtonsFrame.Parent = MainFrame
  43.  
  44. -- Add rank buttons
  45. local ranks = {"Owner", "Admin", "Mod", "VIP"}
  46. for i, rank in ipairs(ranks) do
  47. local RankButton = Instance.new("TextButton")
  48. RankButton.Size = UDim2.new(0, 200, 0, 50)
  49. RankButton.Position = UDim2.new(0.5, -100, 0, (i - 1) * 60)
  50. RankButton.BackgroundColor3 = Color3.new(0.5, 0.5, 0.5)
  51. RankButton.Text = "Set Rank: " .. rank
  52. RankButton.Parent = RankButtonsFrame
  53.  
  54. -- Set rank functionality
  55. RankButton.MouseButton1Click:Connect(function()
  56. local player = game.Players.LocalPlayer
  57. -- Assuming you have HD Admin installed in your game
  58. local HDAdmin = game:GetService("ServerScriptService"):FindFirstChild("HDAdmin")
  59. if HDAdmin then
  60. HDAdmin:FireServer("SetRank", player, rank)
  61. else
  62. warn("HD Admin is not installed in your game!")
  63. end
  64. end)
  65. end
  66.  
  67. -- Add button to add HD Admin
  68. AddHDAdminButton.Size = UDim2.new(0, 200, 0, 50)
  69. AddHDAdminButton.Position = UDim2.new(0.5, -100, 0.1, 10)
  70. AddHDAdminButton.BackgroundColor3 = Color3.new(0, 1, 0)
  71. AddHDAdminButton.Text = "Add HD Admin"
  72. AddHDAdminButton.Parent = MainFrame
  73.  
  74. -- Minimize button functionality
  75. MinimizeButton.MouseButton1Click:Connect(function()
  76. MainFrame.Visible = false
  77. SmallIcon.Visible = true
  78. end)
  79.  
  80. -- Restore main frame from small icon
  81. SmallIcon.MouseButton1Click:Connect(function()
  82. MainFrame.Visible = true
  83. SmallIcon.Visible = false
  84. end)
  85.  
  86. -- Function to add HD Admin
  87. AddHDAdminButton.MouseButton1Click:Connect(function()
  88. if not game:GetService("ServerScriptService"):FindFirstChild("HDAdmin") then
  89. local hdAdmin = Instance.new("Script")
  90. hdAdmin.Name = "HDAdmin"
  91. hdAdmin.Source = [[-- Add HD Admin script source here]]
  92. hdAdmin.Parent = game:GetService("ServerScriptService")
  93. else
  94. warn("HD Admin is already installed!")
  95. end
  96. end)
  97.  
Tags: Script
Advertisement
Add Comment
Please, Sign In to add comment