# Control Flow

### If / Elseif / Else / End

Conditions allow your script to make decisions.

Example:

{% code lineNumbers="true" %}

```
var x = 10

if x > 10 then
    log("x is greater than 10")
elseif x == 10 then
    log("x is equal to 10")
else
    log("x is less than 10")
end
```

{% endcode %}

### Supported Comparison Operators

Supported Operators:

<table><thead><tr><th width="114">Operator</th><th width="424">Meaning</th><th width="204">Example</th></tr></thead><tbody><tr><td><code>==</code></td><td>Equal to</td><td><code>if x == 10 then</code></td></tr><tr><td><code>!=</code></td><td>Not equal to</td><td><code>if x != 10 then</code></td></tr><tr><td><code>></code></td><td>Greater than</td><td><code>if x > 10 then</code></td></tr><tr><td><code>&#x3C;</code></td><td>Less than</td><td><code>if x &#x3C; 10 then</code></td></tr><tr><td><code>>=</code></td><td>Greater than or equal to</td><td><code>if x >= 10 then</code></td></tr><tr><td><code>&#x3C;=</code></td><td>Less than or equal to</td><td><code>if x &#x3C;= 10 then</code></td></tr></tbody></table>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://control-blocks-mod.gitbook.io/control-blocks-mod-docs/controlscript/control-flow.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
