[HELP] How do I make this script for server.lua?

So I made a script that shows a marker above your head when you talk, but I don’t know how to make it so everyone can see who talks, please help!

Client.lua:
Citizen.CreateThread(function()
local ped = GetPlayerPed(-1)
while true do
Citizen.Wait(0)
local pedCoords = GetEntityCoords(ped)
if IsControlPressed(0,249) then
DrawMarker(0, pedCoords.x, pedCoords.y, pedCoords.z + 1, 0.0, 0.0, 0.0, 0.0, 360.0, 0.0, 0.1, 0.1, 0.1, 255, 255, 255, 0.8, true, false, 1, nil, nil, false)
end
end
end)