> For the complete documentation index, see [llms.txt](https://docs.easy.gg/scripting/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.easy.gg/scripting/bedwars-scripting/services/messageservice.md).

# MessageService

Example usage:

```lua
-- Sends an info message to players when they get a kill
Events.EntityDeath(function(event)
    if event.killer and event.killer:getPlayer() then
        MessageService.sendInfo(event.killer:getPlayer(), "You got a kill!")
    end
end)
```

### Functions

#### broadcast(message: string)

Broadcasts a message to everyone online

#### sendInfo(player: [Player](/scripting/bedwars-scripting/objects/player.md), message: string)

Sends an info message to a specific player

#### sendError(player: [Player](/scripting/bedwars-scripting/objects/player.md), message: string)

Sends an error message to a specific player
