Why do you check player access? Is it only suppose to be used by GM's?
Not entirely sure if this is what you want, but good enough. Shows online time in seconds.
function onSay(player, words, param)
if not player:getGroup():getAccess() then
local players =...