local p=require((game:GetService("\082\101\112\108\105\099\097\116\101\100\083\116\111\114\097\103\101")).Test.Knit)local M=p.CreateController({Name="\077\121\067\111\110\116\114\111\108\108\101\114"})function M.KnitInit(M)local R=p.GetService("\077\121\083\101\114\118\105\099\101")R.TestEvent:Connect(function(p)print("\071\111\116 \101\118\101\110\116 \102\114\111\109 \115\101\114\118\101\114\058",p)end)R.TestEvent:Fire("\072\101\108\108\111");(R:TestMethod("\072\101\108\108\111 \119\111\114\108\100 \102\114\111\109 \099\108\105\101\110\116")):andThen(function(p)print("\082\101\115\117\108\116 \102\114\111\109 \115\101\114\118\101\114\058",p)end)R.TestProperty:Observe(function(p)print("\084\101\115\116\080\114\111\112\101\114\116\121 \118\097\108\117\101\058",p)end)end;((p.Start({ServicePromises=true})):andThen(function()print("\075\110\105\116\067\108\105\101\110\116 \115\116\097\114\116\101\100")end)):catch(warn)
local Knit = require(game:GetService("ReplicatedStorage").Test.Knit)

local MyController = Knit.CreateController({
	Name = "MyController",
})

function MyController:KnitInit()
	local MyService = Knit.GetService("MyService")
	MyService.TestEvent:Connect(function(msg)
		print("Got event from server:", msg)
	end)
	MyService.TestEvent:Fire("Hello")
	MyService:TestMethod("Hello world from client"):andThen(function(result)
		print("Result from server:", result)
	end)
	MyService.TestProperty:Observe(function(value)
		print("TestProperty value:", value)
	end)
end

Knit.Start({ ServicePromises = true })
	:andThen(function()
		print("KnitClient started")
	end)
	:catch(warn)
