Handling a RemoteEvent with multiple connections

I’ve been trying to come up with a system for a RemoteEvent that can handle multiple connections. If that sounds confusing, what I’m essentially trying to do is this:

local remoteEvent = --The remote event
local player = --The player allowed to activate the event in this instance
               --This value is also constantly changing

local function onServerEvent(plr)
   if player == plr then

      -- Do something

   end
end

remoteEvent.OnServerEvent:Connect(onServerEvent)

I have this script copied throughout my game, except with different players who can activate the RemoteEvent, with those players always changing. I don’t think this script is as efficient as it could be because of all the connections to a single RemoteEvent.

I’ve thought about having a main Script in ServerScriptService to control Bindable Events for each instance of this script, but I just don’t know how to execute anything correctly. Any pointers would help.
*Gonna go to sleep in a bit and might not see replies until tomorrow.

Have a table of whitelisted UserId’s that can execute it. You can use table.remove() and table.insert() to add/remove players.

local Whitelist = {}

if table.find(Whitelist,plr.UserId) then -- Checks if the players UserId is whitelisted.

From what I understand, you want one script to receive multiple event fires.
What I did was, added a type:

RemoteEvent.OnServerEvent:Connect(function(Player, Type)
if Type == "TypeOne" then
print("TypeOne")
elseif Type == "TypeTwo" then
print("TypeTwo")
end

end)