How to do the Rules command with the Team only can see? (Basic admin essensitials)

Hello, scripters! I didn’t have an ideas how to do the Rules command plugins within the Basic admin essitials with the Team only can see the Rules message when I sended that command. Can someone help me for that?

Thank you!


--[[
	
	 ____                                   
	/\  _`\                    __           
	\ \ \L\ \     __      ____/\_\    ___   
	 \ \  _ <'  /'__`\   /',__\/\ \  /'___\ 
	  \ \ \L\ \/\ \L\.\_/\__, `\ \ \/\ \__/ 
	   \ \____/\ \__/.\_\/\____/\ \_\ \____\
	    \/___/  \/__/\/_/\/___/  \/_/\/____/
	                                        
	            
	Admin Essentials v2
	Plugin Documentation
	*coming soon^tm
	
	If you have any questions regarding Plugins, contact TheFurryFish.
	
--]]

local Plugin = function(...)
	local Data = {...}

	-- Included Functions and Info --
	local remoteEvent = Data[1][1]
	local remoteFunction = Data[1][2]
	local returnPermissions = Data[1][3]
	local Commands = Data[1][4]
	local Prefix = Data[1][5]
	local actionPrefix = Data[1][6]
	local returnPlayers = Data[1][7]
	local cleanData = Data[1][8] -- cleanData(Sender,Receiver,Data)
	-- Practical example, for a gui specifically for a player, from another player
	-- cleanData(Sender,Receiver,"hi") -- You need receiver because it's being sent to everyone
	-- Or for a broadcast (something everyone sees, from one person, to nobody specific)
	-- cleanData(Sender,nil,"hi") -- Receiver is nil because it is a broadcast

	-- Plugin Configuration --
	local pluginName = 'Rules'
	local pluginPrefix = ""
	local pluginLevel = 1
	local pluginUsage = "<User(s)>" -- leave blank if the command has no arguments
	local pluginDescription = "Broadcast the rules."

	-- Example Plugin Function --
	local function pluginFunction(Args) -- keep the name of the function as "pluginFunction"
		local Player = Args[1]
		if Args[3] then
			local Victims = returnPlayers(Player, Args[3]) if not Victims then return end
			local combinedVictims = ''
			for a,b in pairs(Victims) do
				if combinedVictims == '' then
					combinedVictims = b.Name
				else
					combinedVictims = table.concat(Victims,", ")
				end
			end
			for a,b,c in next,Victims do
				remoteEvent:FireClient(b,'Message','Rule 1','No toxicity- Toxicity will not be tolerated, don’t talk trash, or make people feel bad.');
				wait(10)
				remoteEvent:FireClient(b,'Message','Rule 2','Be respectful, to the Host, Co- Host, your peer’s, and yourself.');
				wait(8)
				remoteEvent:FireClient(b,'Message','Rule 3','Don’t swearing, or bypassing chat.');
				wait(5)
				remoteEvent:FireClient(b,'Message','Rule 4','PTS(Permission To Speak) is always active.');
				wait(5)
				remoteEvent:FireClient(b,'Message','Rule 5','Listen to your host/trainer.');
				wait(4)
				remoteEvent:FireClient(b,'Message','last rule','If you have any question, it is your time to ask now.');
				wait(36)
				remoteEvent:FireClient(b,'Message','Claim Group','We will now claiming group. Please do not move and wait to be teleport.')
			end
		end
	end


	-- Return Everything to the MainModule --
	local descToReturn
	if pluginUsage ~= "" then
		descToReturn = pluginPrefix..pluginName..' '..pluginUsage..'\n'..pluginDescription
	else
		descToReturn = pluginPrefix..pluginName..'\n'..pluginDescription
	end

	return pluginName,pluginFunction,pluginLevel,pluginPrefix,{pluginName,pluginUsage,pluginDescription}
end

return Plugin
1 Like