Well, firstly, you'll need a server & a client side script, but, I done the job for you, and seems to be working .
-- client side
addEventHandler( "onClientResourceStart", getResourceRootElement( getThisResource( ) ),
function ()
triggerServerEvent("isPlayerAdmin",getLocalPlayer(),getLocalPlayer())
end)
function initGUI()
btnOutput = guiCreateButton( 0.7, 0.1, 0.2, 0.1, "Output!", true )
addEventHandler ( "onClientGUIClick", btnOutput, outputEditBox, false )
editBox = guiCreateEdit( 0.3, 0.1, 0.4, 0.1, "Type your message here!", true )
guiEditSetMaxLength ( editBox, 128 )
end
addEvent("returnIsPlayerAdmin",true)
addEventHandler("returnIsPlayerAdmin",root,initGUI)
function outputEditBox ( button )
if button == "left" then
local text = guiGetText ( editBox )
triggerServerEvent("outputAdminText",getLocalPlayer(),text)
end
end
-- server side
addEvent("isPlayerAdmin",true)
addEventHandler("isPlayerAdmin",root,
function (client)
local account = getPlayerAccount(client)
if not account or isGuestAccount(account) then return end
local accountName = getAccountName(account)
if isObjectInACLGroup("user."..accountName,aclGetGroup("Admin")) then
triggerClientEvent(client,"returnIsPlayerAdmin",client)
end
end)
addEvent("outputAdminText",true)
addEventHandler("outputAdminText",root,
function (text)
outputChatBox(tostring(text))
end)
P.S: I added the outputChatBox server-sided because, it would have been output only to the client with your way.