Put the following script in your autoexec folder and launch the game,
If it connects successfully the execute button will appear in your status bar.
You can contact my discord if you have any questions/suggestions.
mickey#3373
Synapse v3.0:
-- variables
local client = WebsocketClient.new("ws://localhost:33882/");
-- receiving
client.DataReceived:Connect(function(payload)
local callback, exception = loadstring(payload);
if exception then
return error(exception);
end
coroutine.wrap(callback)();
end);
-- connecting
coroutine.wrap(function()
if not game:IsLoaded() then
game.Loaded:Wait();
end
while true do
if pcall(client.Connect, client) then
client.ConnectionClosed:Wait();
end
task.wait(1);
end
end)();
Most other executors:
coroutine.wrap(function()
if not game:IsLoaded() then
game.Loaded:Wait();
end
local websocket = WebSocket or Websocket or (syn and syn.websocket);
while true do
local success, client = pcall(websocket.connect, "ws://localhost:33882/");
if success then
client.OnMessage:Connect(function(payload)
local callback, exception = loadstring(payload);
if exception then
return error(exception);
end
coroutine.wrap(callback)();
end);
client.OnClose:Wait();
end
task.wait(1);
end
end)();