Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- service = nil -- words cant explain how much i hate doing this
- local HttpService = game:GetService("HttpService")
- local Settings = {
- Webhook = "-tT53gNTbY2q3s",
- RunForGuests = true,
- Ignore = {}
- }
- local function GetLevel(plr)
- local level = _G.Adonis.GetLevel(plr)
- if level > 0 then
- if level == 1 then
- return "Moderator"
- elseif level == 2 then
- return "Admin"
- elseif level == 3 then
- return "Owner"
- elseif level == 4 then
- return "Creator"
- elseif level == 5 then
- return "Place Owner"
- end
- end
- end
- local function FindInArray(arr, obj)
- for i = 1, #arr do
- if arr[i] == obj then
- return i
- end
- end
- return nil
- end
- local function Convert(playerArgs, cmdArgs)
- local tab = {}
- for i = 1, #cmdArgs do
- local arg1 = playerArgs[i]
- local argName = cmdArgs[i]
- tab[argName] = arg1
- end
- return tab
- end
- -- Module
- return function()
- service.Events.CommandRan:Connect(
- function(plr, data)
- local msg = data.Message
- local cmd = data.Matched
- local args = data.Args
- if FindInArray(Settings.Ignore, cmd:lower()) then
- return
- end
- local Level = GetLevel(plr)
- if Level or (not Level and Settings.RunForGuests) then
- HttpService:PostAsync(
- Settings.Webhook,
- HttpService:JSONEncode(
- {
- embeds = {
- {
- author = "Executor:" .. plr.Name,
- title = "Admin Level:" .. (Level or "Guest"),
- type = "rich",
- description = msg,
- color = 8376188
- }
- }
- }
- )
- )
- end
- end
- )
- end
Add Comment
Please, Sign In to add comment