Admin Script not working at all and doesn't print any errors?
Hello, I've been recently working on an Admin Script that has worked fine until I added the Trello API to it, it's a Server Script located in ServerScriptService. I don't know what the issue is as it's printing nothing to show any sign of errors or warnings.
001 | local ReplicatedStorage = game:WaitForChild( "ReplicatedStorage" ) |
002 | local kick = Instance.new( "RemoteFunction" , ReplicatedStorage) |
004 | local API = require(game:GetService( "ServerScriptService" ):WaitForChild( "TrelloAPI" )) |
005 | local BoardID = API:GetBoardID( "Game: Inspired Bans" ) |
006 | local ListID = API:GetListID( "Bans" , BoardID) |
007 | local Banned = API:GetCardsInList(ListID) |
017 | local Players = game:GetService( "Players" ) |
020 | Commands.kick = function (Sender, Arguments) |
021 | local Message = table.concat(Arguments, " " ) |
022 | if (Arguments = = nil ) then return end |
023 | local Victim = Arguments [ 1 ] ; |
024 | if Victim = = "me" then |
027 | local Reason = Arguments [ 2 ] ; |
028 | if (Arguments [ 2 ] = = nil ) then |
029 | Reason = "No reason provided." |
031 | game:GetService( "Players" ):FindFirstChild(Victim):Kick(Reason) |
034 | Commands.ban = function (Sender, Arguments) |
035 | local Message = table.concat(Arguments, " " ) |
036 | if (Arguments = = nil ) then return end |
037 | local Victim = Arguments [ 1 ] ; |
038 | if (Arguments [ 1 ] = = nil ) then return end |
039 | local Reason = Arguments [ 2 ] ; |
040 | if (Arguments [ 2 ] = = nil ) then |
041 | Reason = "No reason provided." |
043 | game:GetService( "Players" ):FindFirstChild(Victim):Kick( "You have been banned." ) |
044 | local NewCard = API:AddCard(Victim,Reason,ListID) |
048 | Commands.speed = function (Sender, Arguments) |
049 | local Message = table.concat(Arguments, " " ) |
050 | if (Arguments = = nil ) then return end |
051 | local Victim = Arguments [ 1 ] ; |
052 | if Victim = = "me" then |
055 | local Speed = tonumber (Arguments [ 2 ] ); |
056 | if (Arguments [ 2 ] = = nil ) then |
059 | game:GetService( "Players" ):FindFirstChild(Victim).Character.Humanoid.WalkSpeed = Speed |
062 | local function checkBanned(name) |
063 | local isBanned = false |
064 | for i, v in pairs (Banned) do |
065 | if v.name = = name then |
072 | local function IsAdmin(Player) |
073 | for _, Admin in pairs (Admins) do |
075 | if type (Admin) = = "table" then |
076 | local Rank = Player:GetRankInGroup(Admin.GroupId) |
077 | if Rank > = (Admin.RankId or 248 ) then |
085 | local function ParseMessage(Player, Message) |
086 | local PrefixMatch = string.match(Message, "^" ..Prefix) |
088 | Message = string.gsub(Message, PrefixMatch, "" , 1 ) |
091 | for Argument in string.gmatch(Message, "[^%s]+" ) do |
092 | table.insert(Arguments, Argument) |
095 | local CommandName = Arguments [ 1 ] |
096 | table.remove(Arguments, 1 ) |
097 | local CommandFunc = Commands [ CommandName ] |
099 | if CommandFunc ~ = nil then |
100 | CommandFunc(Player, Arguments) |
105 | Players.PlayerAdded:Connect( function (Player) |
106 | if checkBanned(Player.Name) then |
107 | game:GetService( "Players" ):FindFirstChild(Player.Name):Kick( "You have been banned." ) |
109 | Player.Chatted:Connect( function (Message, Recipient) |
110 | if not Recipient and IsAdmin(Player) then |
111 | ParseMessage(Player, Message) |
This is the full script because I don't know where the issue is contained.