> For the complete documentation index, see [llms.txt](https://abdulkadir-aktas.gitbook.io/qadr_docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://abdulkadir-aktas.gitbook.io/qadr_docs/qadr_ui/score-ui.md).

# Score UI

### Video

{% embed url="<https://www.youtube.com/watch?v=mkgtrdlXp-Q>" %}

### Example

```lua
RegisterCommand("createScore",function()
    local data = {
        visible =  true,
        leftScore = tostring(math.random(0,30)),
        rightScore = tostring(math.random(0,30)),
        leftScoreColor = `COLOR_BLUE`,
        rightScoreColor = `COLOR_RED`,
        leftScoreTextColor = `COLOR_BLACK`,
        rightScoreTextColor = `COLOR_BLACK`,
        timerString = "", -- Must be string
        timerMessageString = "" -- Must be string
    }
    local score = exports["qadr_ui"]:createScore(data)
    Wait(2000)
    local data = {
        visible =  true,
        leftScore = tostring(math.random(0,30)),
        rightScore = tostring(math.random(0,30))
    }
    score:update(data)
    Wait(3000)
    local data = {
        visible =  true,
        leftScore = tostring(math.random(0,30)),
        rightScore = tostring(math.random(0,30))
    }
    score:update(data)
    Wait(3000)
    local data = {
        visible =  false,
        leftScore = tostring(math.random(0,30)),
        rightScore = tostring(math.random(0,30))
    }
    score:update(data)
    Wait(3000)
    local data = {
        visible =  true,
        leftScore = tostring(math.random(0,30)),
        rightScore = tostring(math.random(0,30))
    }
    score:update(data)
    Wait(3000)
    score:clear()
end)
```
