local Prefix = "/"
local Admins = {115733309,}
-- Commands
local Balance = require(game.ServerScriptService.Commands.Balance)
local Coinflip = require(game.ServerScriptService.Commands.Coinflip)
game.Players.PlayerAdded:Connect(function(player)
player.Chatted:Connect(function(message)
local loweredMessage = string.lower(message)
local args = string.split(loweredMessage," ")
if args[1] == Prefix.."bal" then
Balance.BalanceFunction(player)
end
end)
end)
--Admin Commands
local Kick = require(game.ServerScriptService.Commands.Kick)
game.Players.PlayerAdded:Connect(function(player)
for i,v in pairs(Admins) do
if player.UserId == v then
player.Chatted:Connect(function(message)
local loweredMessage = string.lower(message)
local args = string.split(loweredMessage," ")
if args[1] == Prefix.."kick" then
local playertokick = string.sub(message,6)
Kick.KickFunction(playertokick)
end
end)
end
end
end)
local Commands = {}
Commands.KickFunction = function(player)
player:Kick()
end
return Commands
ServerScriptService.Commands.Kick:3: attempt to call a nil value
so its like 1 am and im to lazy to define the player so yk yk ima head off