# Example Service/Controller

```lua
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Packages = ReplicatedStorage:WaitForChild("Packages")

local KNIGHT_TYPES = require(ReplicatedStorage:WaitForChild("KNIGHT_TYPES"))
local require = require(require(Packages:WaitForChild("knight")).import)

local ClientPointsService = {} :: KNIGHT_TYPES.KnightClass

function ClientPointsService:Start()
    warn("ClientPointsService has started!")
    task.wait(1)
    warn("Got local points:", ClientPointsService.Server.PointService:GetLocalPoints())
    warn("Import test - GetService()", self:GetService("TestClientService"):foo())
    warn("Require test", require("TestClientService"):bar())
end

function ClientPointsService:Init()
    warn("ClientPointsService has inited!")
    warn("Starting error logger test 3000")
    
    local b = false
    assert(b == true, "expected b to be true")

    task.delay(0.25, function()
        warn("Starting error logger test 2")
        local b = false
        assert(b == true, "expected b to be true")
    end)
    
    warn(self)
end

return ClientPointsService

--------------------------------------------------------------------

local ReplicatedStorage = game:GetService("ReplicatedStorage")
local KNIGHT_TYPES = require(ReplicatedStorage:WaitForChild("KNIGHT_TYPES"))

local TestClientService = {} :: KNIGHT_TYPES.KnightClass

function TestClientService:foo()
	warn("TestClientService has imported!")

    return self;
end

function TestClientService:bar()
    return "Hi mom from custom-require!";
end

return TestClientService
```


---

# 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://knight.metatable.dev/examples/example-service-controller.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.
