function pings.setSpeechBubble(x)
    speechBubble = x
end

if host:isHost() then
    function events.tick()
        local chat = host:getChatText()
        if chat and chat ~= "" then
            if previousSpeechBubble == false then
                pings.setSpeechBubble(true)
                previousSpeechBubble = true
            end
        elseif previousSpeechBubble then
            pings.setSpeechBubble(false)
            previousSpeechBubble = false
        end
    end
end


-- Variables --
speechBubble = false
previousSpeechBubble = false
-- Add More Here as Needed


function events.tick()
    models.player_model.Player.HEAD.speechBubble:setVisible(speechBubble)
    -- Add More Here as Needed
end

function events.tick()
    local time = world.getTime()
    models.player_model.Player.HEAD.speechBubble:setUV(math.floor(time/20)/3,0)
end