> For the complete documentation index, see [llms.txt](https://flare-studio.gitbook.io/exe-6/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://flare-studio.gitbook.io/exe-6/custom-commands/demostration.md).

# Demostration

Now that we went through all you need to learn, Lets create our first command as example.

Client Side

```lua
local players = game:GetService("Players")
local replicated_storage = game:GetService("ReplicatedStorage")

local client = players.LocalPlayer

local storage = replicated_storage:WaitForChild("EXE6_STORAGE")
local events = storage.events

local CustomCommands = require(storage.modules.CustomCommands)

local TimeCC = CustomCommands:RegisterCommand("Time")
TimeCC.Description = "Change in-game time."
TimeCC.Icon = "rbxassetid://11963371162"
TimeCC.Event = storage.utilities.custom_commands.ChangeTime

TimeCC:AddParameter("Boolean", {
	Name = "Animate"
})

TimeCC:AddParameter("Slider", {
	Name = "Time",
	SliderRange = NumberRange.new(1, 24),
	SliderDefault = game.Lighting.ClockTime,
	SliderIncrement = .01,
})
```

Server Side

```lua
local tween_service = game:GetService("TweenService")
local replicated_storage = game:GetService("ReplicatedStorage")

local smooth = TweenInfo.new(10, Enum.EasingStyle.Exponential)

local storage = replicated_storage:WaitForChild("EXE6_STORAGE")

storage.utilities.custom_commands.ChangeTime.OnServerEvent:Connect(function(moderator, data)
	if data.Animate then
		tween_service:Create(game.Lighting, smooth, {ClockTime = data["Time"]}):Play()
	else
		game.Lighting.ClockTime = data["Time"]
	end
end)
```

**Congrats!** You have now officially learned everything about Custom Commands.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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://flare-studio.gitbook.io/exe-6/custom-commands/demostration.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.
