
770 Views
303 Executions
UNIVERSAL CHAT
Universal Script 📌
4P_4PPublished 5
7 months ago
Please login to perform these actions:Does it work?
No reports yetNo reports yet. Tried it? Be the first to say.
Also noticed:
Description
Universal chat with working servers allowing multiple hackers to chat across games
Updates
Script edited: Update script
--// Global Chat GUI (2x smaller, heartbeat online tracking)
local Players = game:GetService("Players")
local HttpService = game:GetService("HttpService")
local UserInputService = game:GetService("UserInputService")
local LocalPlayer = Players.LocalPlayer
local PlayerGui = LocalPlayer:WaitForChild("PlayerGui")
local API_BASE = "https://mii-response-server--721843.replit.app/api"
local JOIN_URL = API_BASE .. "/chat/join"
local LEAVE_URL = API_BASE .. "/chat/leave"
local SEND_URL = API_BASE .. "/chat/send"
local MESSAGES_URL = API_BASE .. "/chat/messages"
local ONLINE_URL = API_BASE .. "/chat/online"
local HEARTBEAT_URL = API_BASE .. "/chat/heartbeat"
local POLL_INTERVAL = 2
local ONLINE_INTERVAL = 5
local HEARTBEAT_INTERVAL = 10
local MAX_MESSAGE_LEN = 300
local function jsonDecodeSafe(str)
local ok, r = pcall(function() return HttpService:JSONDecode(str) end)
return ok and r or nil
end
local function jsonEncodeSafe(tbl)
local ok, r = pcall(function() return HttpService:JSONEncode(tbl) end)
return ok and r or nil
end
local function httpRequest(method, url, bodyTable)
local body = bodyTable and jsonEncodeSafe(bodyTable) or nil
if typeof(request) == "function" then
local ok, res = pcall(function()
return request({
Url = url, Method = method,
Headers = body and { ["Content-Type"] = "application/json" } or {},
Comments
0Log in to join the conversation. Login
No comments yet. Be the first!







