repeat wait() until game:IsLoaded()
local ws = syn.websocket.connect("ws://localhost:34523/")
spawn(function()
while wait(1) do
pcall(function()
ws:Send("auth:" .. game.Players.LocalPlayer.Name)
ws.OnMessage:Connect(function(msg)
local func, err = loadstring(msg)
if err then
ws:Send("compile_err:" .. err)
return
end
func()
end)
ws.OnClose:Wait()
end)
end
end)
if syn and syn.cache_replace and syn.cache_invalidate and syn.set_thread_identity and syn.get_thread_identity then
game:GetService("LogService").MessageOut:Connect(function(m)
ws:Send(m)
end)
game.ScriptContext.ErrorDetailed:Connect(function(message)
ws:Send(message:sub(1, 1) .. utf8.char(8203) .. message:sub(2))
end)
end
print("loaded vscode")