--[[
	SERVER PLUGINS' NAMES MUST START WITH "Server:"
	CLIENT PLUGINS' NAMES MUST START WITH "Client:"
	
	Hi, this is an example plugin, meaning this is only to show you how to make your own plugins!
	All plugins need to be MODULE SCRIPTS! Not regular or local scripts, if its not a module script it wont work.
	If you want to use events from the main admin script such as CharacterAdded, PlayerChatted and
	PlayerJoined then simply look the following:
	
	set.MakePluginEvent('PlayerChatted',function(msg,plr) print(msg..' from '..plr.Name..' Example Plugin') end)
	set.MakePluginEvent('PlayerJoined',function(p) print(p.Name..' Joined! Example Plugin') end)
	set.MakePluginEvent('CharacterAdded',function(plr) set.RunCommand('name',plr.Name,'BobTest Example Plugin') end)
	
	Use set.MakePluginEvent(type,function) to add a function that gets run when the event is fired in the
	main script, only CharacterAdded, PlayerJoined and PlayerChatted are currently supported.
	
	If you want to run an admin command from a plugin, you need to use set.RunCommand(cmd,args)
	EX: set.RunCommand('name',plr.Name,'BobTest Example Plugin') will run ":name Player1 BobTests Example Plugin"
	NOTE: If you are running a command that needs a sending player (such as !quote, !donate, !explore, or any command that
	spawns guis on the player running the command) it WILL break, the script will continue functioning fine however
	the command will error and do nothing.
	
	Plugins give you the ability to change or add things to the main script without editing the
	actual script. You can add commands, functions, features, and you can use anything in the 
	table "set" (the main script table which contains all functions, settings, and commands.)
	
	First off lets go over the format of commands.
	
	Commands must be formatted in the following way:
	
	set.MakeCommand(CommandName,AdminLevel,Prefix,{command1,command2},{argument1,argument2},function(plr,args)
		print('Hello World from inside an example command!')
	end)
	
	Now lets go over each element of MakeCommand function.
	CommandName - Name of the command
	AdminLevel - who can use the commands (-3=FunCommand Owners+; -2=FunCommand Admins+; -1=FunCommand Temp+; 0=Any Player; 1=Donors;2=Temp+;3=Admin+;4=Owner+;5=Place Owner)
	Prefix - the prefix to use (the : in :kill me) use set.Prefix to use the scripts set prefix (or set.AnyPrefix for the AnyPrefix setting)
	{command1,command2} - these are commands that can be chatted to run this command
	{argument1,argument2} - type of arguments (eg {"player","message"})
	NumberOfArguments - how many arguments are there? (How many times to split the message?)
	function(plr,args) - you need to include this, however you can change plr and args but its recommended you dont to avoid confusion.

	Now that we know what each thing is, go ahead and take a look at the example command.
	
	All the code to run MUST be in a function, as seen below, that gets returned. 
	Anything inside the main function will be ran by the main admin script. If you want to use
	things from the main admin script use set.
	For example: 
	
	return function(set) 
		print('hi') 
	end 
	
	Client plugins are EXACTLY the same as server plugins, just they run on the client instead.
	Because all guis are made via the client script, client plugins also gives you the ability to 
	edit and make your own guis for the script that you can call using set.Remote(PLAYER,"Function","GUI FUNCTIONS")
	Please note that if you want to be able to tell the client to load a gui, the gui will need to be in the client's "set"
	table as it is where all the functions to be executed by the server are stored. Read over the client script to get
	a better idea of how it works.
	
--]]
--------------------------------------------------------------------------
--Beginning of example plugin



return function(set) --function that the main script will run
	--Lets make an example command
	set.MakeCommand('Example Plugin Command',0,set.Prefix,{'example','forshow'},{'message1','message2'},function(plr,args)
		print('Hello World from inside an example command!')
		print('The first argument is '..args[1]..' and the second is '..args[2])
		print('The player who ran the command is '..plr.Name..'!')
	end)--Player chats ":example Args1 Args2"
	print('Hello World from inside an example plugin!')
	--makes the command "example" and prints "Hello World from inside an example plugin!"
end -- end of the main function