Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>SirHurt ExecuteNew to Visual Studio Code? Get it now.
SirHurt Execute

SirHurt Execute

Yxild

|
123 installs
| (0) | Free
Executes the code from your Visual Studio Code's current tab
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Put this in your Script-Ware autoexec folder

local HttpService = game:GetService('HttpService')
local integrity = HttpService:GenerateGUID()

shared.WebSocket = shared.WebSocket or {
    socket = nil,
    integrity = nil,
    debug = false
}

shared.WebSocket.integrity = integrity
shared.WebSocket.debug = false

local function send_message(type, name, message)
    if (shared.WebSocket.integrity == integrity and shared.WebSocket.socket) then
        shared.WebSocket.socket:Send(HttpService:JSONEncode({
            type = type,
            name = name,
            message = message
        }))
    end
end

local function Check(...)
    local success, data = pcall(...)

    if (not success) then
        send_message('error', nil, tostring(data))

        return false, data
    end

    return true, data
end

local function ConnectWS()
    local old_socket = shared.WebSocket.socket
    pcall(old_socket and old_socket.Close or function() end, old_socket)

    local socket = WebSocket.connect('ws://localhost:42069')

    if (shared.WebSocket.integrity ~= integrity) then
        return socket:Close()
    end
    
    shared.WebSocket.socket = socket
	
	socket.OnMessage:Connect(function(script)
        local success, call_function = Check(loadstring, script)

        if (success) then
            Check(call_function)
        end
	end)

	socket.OnClose:Wait()
    shared.WebSocket.socket = nil
end

do
    local w = task.wait
    task.spawn(function()
        while (w() and shared.WebSocket.integrity == integrity) do
            Check(ConnectWS)
        end
    end)

    task.spawn(function()
        while (w(1) and shared.WebSocket.integrity == integrity) do
            send_message('debug_enabled', nil, tostring(shared.WebSocket.debug == true))
        end
    end)
end
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft