Help with RemoteEvents placed in PlayerAdded

Hello! I made an admin Console but I’m not sure where I fire the code whereas when I click a day ban for a player. None of my methods seem to be working. Essentially, what I need is to fire code when an admin clicks this: image
I am just not sure how I would respond to the remote fired when clicked, or where I should respond to it. Here is my code:

game.Players.PlayerAdded:Connect(function(player)
local timeNow = os.time()

	local VIPdata
	pcall(function()
		VIPdata = myYtData:GetAsync(player.UserId.."-Bans")
	end)
	print(VIPdata)
	if VIPdata ~= nil then
		-- Returning Player
		local timeSinceLastVIPClaim = timeNow - VIPdata
		print(timeSinceLastVIPClaim.." Was The Player's Last CLaim")

		if (timeSinceLastVIPClaim / 3600) >= weekWait then
			VIPdata = myYtData:RemoveAsync(player.UserId.."-Bans")
		else
				player:Kick("You have been banned by an Administrator for 1 Day.")
		end

	else
		-- New Player
		VIPdata = myYtData:SetAsync(player.UserId.."-Bans", os.time())
		print(VIPdata)
	end
end)

You can make a Remote Event that the script will listen to, something like

local RepStg = game:GetService(“ReplicatedStorage”)
local RemoteEvent = RepStg.RemoteEvent

RemoteEvent.OnServerEvent:Connect(function(player, BannedUserId)
–Add security logic
–Add +1 ban count to Datastore
–Boot player now
end)

You’ll need to have a local script which can see that remote event, and has the logic to listen for the button being pressed

You can make a local script attached to the button itself which just listens for when it’s clicked and fires the Remote Event, something like…

local RepStg = game:GetServices(“ReplicatedStorage”)
local button = script.Parent
button.MouseButton1Click:Connect(function()
RepStg.RemoteEvent:FireServer(BannedUserId)
end)