BAE 2 | Show GUI on command

Hi! I need some assistance on making a custom command using Basic Admin Essentials 2.

When you run the command :editpoints it should brings up a GUI.

I’m not a very advanced scripter, but I could do with some help. I tried the script below.

	/\  _`\                    __           
	\ \ \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 = 'editpoints'
	local pluginPrefix = Prefix
	local pluginLevel = 1
	local pluginUsage = "" -- leave blank if the command has no arguments
	local pluginDescription = "This command shows the change point GUI.\nUse this for when someone has passed a section."
	-- Example Plugin Function --
	local function pluginFunction(Args) -- keep the name of the function as "pluginFunction"
		local Player = Args[1]
		if Args[1]
			game.StarterGui.Staff.Staff.Visible = true
	-- Return Everything to the MainModule --
	local descToReturn
	if pluginUsage ~= "" then
		descToReturn = pluginPrefix..pluginName..' '..pluginUsage..'\n'..pluginDescription
		descToReturn = pluginPrefix..pluginName..'\n'..pluginDescription
	return pluginName,pluginFunction,pluginLevel,pluginPrefix,{pluginName,pluginUsage,pluginDescription}

return Plugin

If you offer to help me, thanks! Feel free to DM me if it’s easier for you. | reu;#2020

Well, I do have experience on making plugins with BAE, so I can help you with that.

  1. First of all, you need to create your own RemoteEvent instead of the remote event BAE provided.
  2. Then on the local script, have it receive the event and enable the GUI.

Hi, as I’m not a very advanced, how do I do that? :flushed:
Do I put the RemoteEvent in ReplicatedStorage, and where does this local script go?

Yes. as long as it can be seen by the server and the client.

Either StarterPlayerScripts or PlayerGui