Advertisement
MandB

Roblox Admin Panel

Aug 8th, 2021
41,872
0
Never
1
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.42 KB | None | 0 0
  1. --LocalScript
  2. local rep = game.ReplicatedStorage
  3. local vip = rep.VIPServerOwner
  4.  
  5. vip.OnClientEvent:Connect(function() -- remote recieve function
  6. local GUIClone = game:GetService("ScreenGui"):WaitForChild("ScreenGui"):Clone() -- gui clone
  7. GUIClone.Parent = game.Players.LocalPlayer.PlayerGui -- gui parenting
  8. end)
  9.  
  10. --admins
  11. local button = script.Parent.toggleui
  12. local plr = game.Players.LocalPlayer
  13.  
  14. if plr.UserId == 226632513 or 119473669 or 138640350 or 14181023980 then
  15. button.Visible = true
  16. else
  17. script.Parent:Destroy()
  18. end
  19.  
  20. --main script
  21. script.Parent.Main.Active = true
  22. script.Parent.Main.Draggable = true
  23.  
  24. local main = script.Parent.Main
  25. local kick = main.Kick
  26. local admin = main.Admin
  27. local kill = main.Kill
  28. local fling = main.Fling
  29. local KcA = main.KickAll
  30. local KA = main.KillAll
  31. local FA = main.FlingAll
  32. local AA = main.AdminAll
  33. local UA = main.Unadmin
  34.  
  35. local user = main.User
  36. local reason = main.Reason
  37.  
  38. local rep = game.ReplicatedStorage
  39. local a = rep.kick
  40. local b = rep.kill
  41. local c = rep.fling
  42. local d = rep.admin
  43. local p = rep.adminall
  44. local v = rep.kickall
  45. local x = rep.killall
  46. local f = rep.flingall
  47. local h = rep.unadmin
  48.  
  49. kick.MouseButton1Click:connect(function()
  50. a:FireServer(user.Text, reason.Text)
  51. end)
  52.  
  53. admin.MouseButton1Click:connect(function()
  54. d:FireServer(user.Text)
  55. end)
  56.  
  57. kill.MouseButton1Click:connect(function()
  58. b:FireServer(user.Text)
  59. end)
  60.  
  61. fling.MouseButton1Click:connect(function()
  62. c:FireServer(user.Text)
  63. end)
  64.  
  65. KcA.MouseButton1Click:connect(function()
  66. v:FireServer(reason.Text)
  67. end)
  68.  
  69. KA.MouseButton1Click:connect(function()
  70. x:FireServer(reason.Text)
  71. end)
  72.  
  73. AA.MouseButton1Click:connect(function()
  74. p:FireServer()
  75. end)
  76.  
  77. FA.MouseButton1Click:connect(function()
  78. f:FireServer()
  79. end)
  80.  
  81. UA.MouseButton1Click:connect(function()
  82. h:FireServer(user.Text)
  83. end)
  84.  
  85. --notification
  86.  
  87. if game:GetService("Workspace").FilteringEnabled == true then
  88. warn("GUI STARTED!")
  89. game:GetService("StarterGui"):SetCore("SendNotification", {
  90. Title = "Admin Notification";
  91. Text = "Welcome user. You're An Admin! Click The Toggle Panel Button to Use The Admin Panel!";
  92. })
  93. else
  94. warn("GUI STARTED!")
  95. game:GetService("StarterGui"):SetCore("SendNotification", {
  96. Title = "Admin Notification";
  97. Text = "Welcome user. You're An Admin! Click The Toggle Panel Button to Use The Admin Panel!";
  98. })
  99. end
  100.  
  101. --ServerScriptService
  102.  
  103. local rep = game.ReplicatedStorage
  104. local kill = rep.kill
  105. local kick = rep.kick
  106. local fling = rep.fling
  107. local admin = rep.admin
  108. local unadmin = rep.unadmin
  109. local vip = rep.VIPServerOwner
  110.  
  111. local fa = rep.flingall
  112. local ka = rep.killall
  113. local kca = rep.kickall
  114. local aa = rep.adminall
  115.  
  116. kill.OnServerEvent:connect(function(player, playerToKill)
  117. game.Players:FindFirstChild(playerToKill).Character.Head:Destroy()
  118. end)
  119.  
  120. kick.OnServerEvent:connect(function(player, playerToKick, reason)
  121. game.Players:FindFirstChild(playerToKick):Kick(reason)
  122. end)
  123.  
  124. fling.OnServerEvent:connect(function(player, playerToFling)
  125. game.Players:FindFirstChild(playerToFling).Character.HumanoidRootPart.Position = Vector3.new(1234, 122.893, 2413)
  126. end)
  127.  
  128.  
  129. admin.OnServerEvent:connect(function(player, playerToAdmin)
  130. game.Players:FindFirstChild(playerToAdmin).PlayerGui.ScreenGui.toggleui.Visible = true
  131. end)
  132.  
  133. aa.OnServerEvent:connect(function(player)
  134. for i,v in pairs(game:GetService("Players"):GetChildren()) do v.PlayerGui.ScreenGui.toggleui.Visible = true end
  135. end)
  136.  
  137. kca.OnServerEvent:connect(function(player, reason)
  138. for i,v in pairs(game:GetService("Players"):GetChildren()) do v:Kick(reason) end
  139. end)
  140.  
  141. ka.OnServerEvent:connect(function(player)
  142. for i,v in pairs(game:GetService("Players"):GetChildren()) do v.Character.Head:Destroy() end
  143. end)
  144.  
  145. fa.OnServerEvent:connect(function(player)
  146. for i,v in pairs(game:GetService("Players"):GetChildren()) do v.Character.HumanoidRootPart.Position = Vector3.new(1234, 122.893, 2413) end
  147. end)
  148.  
  149. unadmin.OnServerEvent:connect(function(player, playerToUnadmin)
  150. game.Players:FindFirstChild(playerToUnadmin).PlayerGui.ScreenGui.toggleui.Visible = false
  151. end)
  152.  
  153. game.Players.PlayerAdded:Connect(function(plr) -- activated on player join
  154. if plr.UserId == game.PrivateServerOwnerId then -- is the player the vip server owner?
  155. vip:FireClient(plr) -- gives them a gui
  156. end
  157. end)
  158.  
  159. --username script in text label do not do this if you do not want to optional one
  160.  
  161. script.Parent.Text = game.Players.LocalPlayer.Name
Advertisement
Comments
Add Comment
Please, Sign In to add comment
Advertisement