websocket testing
Key RequiredUniversal

websocket testing

Universal ScriptImperialImperial 4.6K views 37 executesUpdated Jun 25, 2024
5.0/ 5(1 votes)
10100% Positive
Lua Script•21 lines (554 chars)
local WebSocket = WebSocket.connect("wss://echo.websocket.org") -- Specify your WebSocket URL here.

print("Connected.")

WebSocket.OnMessage:Connect(function(Msg)
    print("Message: ")
    print(Msg)
end)

local Ctr = 1
while wait(1) do
    print("Sending your username...")
    WebSocket:Send(game.Players.LocalPlayer.Name)
    Ctr = Ctr + 1

    if Ctr == 5 then 
        print("Closing connection...")
        WebSocket:Close() -- Close the websocket when you are done! (this is done implicitly on teleports aswell)
        do return end
    end
end

Features & Information

websocket tester, echos your username every 2 seconds

Community Comments (3)

Shadow_guyShadow_guyJun 25, 2024(edited)

G g

BrandonJayBRXBrandonJayBRXJun 26, 2024(edited)

Waht is this imperial?

voltexvoltexOct 11, 2026

Script does not serve a purpose for most (all) people on scriptblox, consider unlisting or privating the script.

More Scripts for Universal Scripts