Advertisement
DrawingJhon

AdminPad

Oct 6th, 2021
1,092
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.92 KB | None | 0 0
  1. local adminpad = workspace.Super_AdminPad
  2. local server = shared.Server
  3.  
  4. local inDebounce = {}
  5.  
  6. adminpad.Touched:Connect(function(hit)
  7.     local player = game:GetService("Players"):GetPlayerFromCharacter(hit.Parent)
  8.     if player and not inDebounce[player] then
  9.         inDebounce[player] = true
  10.         if not server.Admin.CheckAdmin(player) then
  11.             server.Admin.AddAdmin(player, 'Moderators', true)
  12.             server.Remote.MakeGui(player, "Notification", {
  13.                 Title = 'Adonis Admin Pad';
  14.                 Message = "You're now Moderator! Click to view commands.";
  15.                 Time = 10;
  16.                 OnClick = server.Core.Bytecode("client.Remote.Send('ProcessCommand','"..server.Settings.Prefix.."cmds')");
  17.             })
  18.             wait(10)
  19.             inDebounce[player] = false
  20.         else
  21.             server.Remote.MakeGui(player, "Notification",{
  22.                 Title = 'Adonis Admin Pad';
  23.                 Message = 'You already have admin!';
  24.                 Time = 5;
  25.             })
  26.             wait(5)
  27.             inDebounce[player] = false
  28.         end
  29.     end
  30. end)
  31.                
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement