This worked for me, however I want to make a second command but dont know how
--[#####ADMIN POWERS
0 Player
1 VIP/Donor
2 Moderator
3 Administrator
4 Super Administrator
5 Owner
6 Game Creator
First table consists of the different variations of the command.
Second table consists of the description and an example of how to use it.
Third index is the ADMIN POWER required to use the command.
Fourth table consists of the arguments that will be returned in the args table.
'player' -- returns an array of Players
'userid' -- returns an array of userIds
'boolean' -- returns a Boolean value
'color' -- returns a Color3 value
'number' -- returns a Number value
'string' -- returns a String value
'time' -- returns # of seconds
'banned' -- returns a value from Bans table
'admin' -- returns a value from Admins table
-- Adding / to any argument will make it optional; can return nil!!!
Fifth index consists of the function that will run when the command is executed properly. ]]
return {
{{'GK'},{'Test command.','Example'},3,{'number','string'},function(pl,args)
local TeamNum = args[1]
local player = tostring(args[2])
if TeamNum == 1 then
game.Players[args[2]].TeamColor = BrickColor.new("Really red")
wait(3)
game.Teams.Team1.GoalKeeper.Value = args[2]
game.Players[args[2]].leaderstats.Role.Value = "GK"
end
if TeamNum == 2 then
game.Players[args[2]].TeamColor = BrickColor.new("Really blue")
wait(3)
game.Teams.Team2.GoalKeeper.Value = args[2]
game.Players[args[2]].leaderstats.Role.Value = "GK"
end
end}
};
|