Universal Script 📌
514 Views
291 Executions

JS Chat Coding

Universal Script 📌
MediorceExploiter
MediorceExploiterPublished 25
8 months ago
Get an executor
Please login to perform these actions:

Does it work?

No reports yet

No reports yet. Tried it? Be the first to say.

Also noticed:

Description

You can now code with JavaScript in chat because why not. Made with multiple AIs to the point where I forgot their specific models. EX Code: js: c.l(4) prints to console 4 ^

View Raw
-- SINGLE-LINE JS INTERPRETER WITH LIVE MODE & CLEARLL (evaluator fix)
local PREFIX = "js:"
local UNLOAD_KEY = Enum.KeyCode.M

local Players = game:GetService("Players")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local UserInputService = game:GetService("UserInputService")
local player = Players.LocalPlayer

-- FULL UNLOAD OLD COPY
if _G.JSInterpreterLoaded then
    if _G.JSUnloadFunc then _G.JSUnloadFunc() end
end
_G.JSInterpreterLoaded = true

-- Interpreter state
local codeBuffer = {}
local variables = {}
local functions = {}
local running = false
local enabled = true
local chatConn, inputConn

-- CONSOLE / CHAT API
local console = {}
local c = console

function console.log(msg)
    print("[JS]", tostring(msg))
end

function console.chat(msg)
    if ReplicatedStorage:FindFirstChild("DefaultChatSystemChatEvents") then
        pcall(function()
            ReplicatedStorage.DefaultChatSystemChatEvents.SayMessageRequest:FireServer(tostring(msg),"All")
        end)
    else
        if player then
            pcall(function() player:Chat(tostring(msg)) end)
        else


Comments

1
Log in to join the conversation. Login
f4dbec09ac464d79926's profile picture
f4dbec09ac464d799268 months ago

sawdwad

1