rcdebug 1.0.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,505 @@
1
+ """
2
+ Generates the 100% client-sided, universal-game Luau diagnostic & runtime telemetry
3
+ snippet for Roblox Client, Studio Client Command Bar, LocalScript, or Developer Console.
4
+
5
+ Supports all Roblox game genres (Simulators, Tycoons, FPS/Combat, RPG, Horror, Obby,
6
+ Roleplay, Racing/Vehicle, Gacha/Trading) with chunked scanning to prevent client freezes
7
+ on large 30k-100k+ instance maps.
8
+ """
9
+
10
+ from __future__ import annotations
11
+
12
+
13
+ def build_luau_bridge_script(host: str = "127.0.0.1", port: int = 8765, snapshot_interval: int = 10) -> str:
14
+ report_url = f"http://{host}:{port}/report"
15
+ telemetry_url = f"http://{host}:{port}/telemetry"
16
+
17
+ return f"""-- [rcdebug v1.0] 100% Client-Sided Universal Roblox Game Auditor & Telemetry Bridge
18
+ -- Compatible with all Roblox game genres; zero server-only APIs; chunked for large maps.
19
+ local HttpService = game:GetService("HttpService")
20
+ local ReplicatedStorage = game:GetService("ReplicatedStorage")
21
+ local ReplicatedFirst = game:GetService("ReplicatedFirst")
22
+ local Players = game:GetService("Players")
23
+ local Workspace = game:GetService("Workspace")
24
+ local Lighting = game:GetService("Lighting")
25
+ local SoundService = game:GetService("SoundService")
26
+ local Teams = game:GetService("Teams")
27
+ local StarterGui = game:GetService("StarterGui")
28
+ local StarterPack = game:GetService("StarterPack")
29
+ local Stats = game:GetService("Stats")
30
+ local RunService = game:GetService("RunService")
31
+
32
+ local LocalPlayer = Players.LocalPlayer or Players.PlayerAdded:Wait()
33
+
34
+ local REPORT_ENDPOINT = "{report_url}"
35
+ local TELEMETRY_ENDPOINT = "{telemetry_url}"
36
+ local SNAPSHOT_INTERVAL = {snapshot_interval}
37
+ local SCAN_CHUNK_SIZE = 1500
38
+
39
+ local httpAllowed = true
40
+ local bridgeNoticed = false
41
+
42
+ local function emitWire(wireKind, encoded)
43
+ print("[rcdebug-wire:" .. wireKind .. "] " .. encoded)
44
+ end
45
+
46
+ local function postJSON(url, wireKind, payload)
47
+ local encoded = HttpService:JSONEncode(payload)
48
+ if not httpAllowed then
49
+ emitWire(wireKind, encoded)
50
+ return
51
+ end
52
+ task.spawn(function()
53
+ local ok = pcall(function()
54
+ HttpService:PostAsync(url, encoded, Enum.HttpContentType.ApplicationJson)
55
+ end)
56
+ if not ok then
57
+ httpAllowed = false
58
+ if not bridgeNoticed then
59
+ bridgeNoticed = true
60
+ print("[rcdebug] Client HttpService restricted; streaming full JSON telemetry via Roblox Log Bridge -> rcdebug terminal.")
61
+ end
62
+ emitWire(wireKind, encoded)
63
+ end
64
+ end)
65
+ end
66
+
67
+ local function sendFinding(severity, category, title, path, flaw, abuse, fix, codeExample)
68
+ postJSON(REPORT_ENDPOINT, "report", {{
69
+ severity = severity,
70
+ category = category,
71
+ title = title,
72
+ path = path,
73
+ flaw = flaw,
74
+ abuse = abuse,
75
+ fix = fix,
76
+ code_example = codeExample or ""
77
+ }})
78
+ end
79
+
80
+ -- ============================================================================
81
+ -- 1. Universal Keyword Tables (All Game Genres)
82
+ -- ============================================================================
83
+ local CRITICAL_REMOTE_KEYWORDS = {{
84
+ "cash", "money", "coin", "gem", "gold", "diamond", "buck", "credit", "token", "currency",
85
+ "give", "award", "reward", "payout", "rebirth", "prestige", "admin", "mod", "staff",
86
+ "ban", "kick", "unban", "rank", "sudo", "damage", "dmg", "kill", "execute", "heal",
87
+ "revive", "buy", "purchase", "sell", "trade", "gift", "duel", "hatch", "roll", "spin",
88
+ "gacha", "craft", "upgrade", "enchant", "equip", "drop", "redeem", "promocode"
89
+ }}
90
+
91
+ local WARN_REMOTE_KEYWORDS = {{
92
+ "stamina", "mana", "energy", "hunger", "xp", "exp", "level", "quest", "mission",
93
+ "claim", "collect", "pickup", "loot", "chest", "crate", "build", "place", "delete",
94
+ "destroy", "tycoon", "dropper", "teleport", "tp", "warp", "dash", "speed", "vehicle",
95
+ "spawn", "team", "vote", "ready", "hit", "hitbox", "shoot", "fire", "parry"
96
+ }}
97
+
98
+ local SENSITIVE_VALUE_KEYWORDS = {{
99
+ "stamina", "cash", "money", "coin", "gem", "gold", "currency", "credit", "token",
100
+ "health", "hp", "mana", "energy", "hunger", "thirst", "oxygen", "sanity",
101
+ "xp", "exp", "level", "admin", "rank", "vip", "damage", "dmg", "speed",
102
+ "walkspeed", "jumppower", "ammo", "cooldown", "shield", "armor", "rebirth", "multiplier"
103
+ }}
104
+
105
+ local function matchKeywordList(name, keywords)
106
+ local lower = name:lower()
107
+ for _, kw in ipairs(keywords) do
108
+ if lower:find(kw, 1, true) then
109
+ return true, kw
110
+ end
111
+ end
112
+ return false, nil
113
+ end
114
+
115
+ -- ============================================================================
116
+ -- 2. Universal Remote Audit & OnClientEvent Replication Profiler
117
+ -- ============================================================================
118
+ local remoteCounts = {{}}
119
+ local remoteTypes = {{}}
120
+ local trackedRemotes = {{}}
121
+
122
+ local function inspectClientRemote(obj, containerName)
123
+ if not (obj:IsA("RemoteEvent") or obj:IsA("RemoteFunction") or obj:IsA("UnreliableRemoteEvent")) then
124
+ return
125
+ end
126
+ local fullPath = obj:GetFullName()
127
+ if trackedRemotes[fullPath] then
128
+ return
129
+ end
130
+ trackedRemotes[fullPath] = true
131
+
132
+ local isCrit, critKw = matchKeywordList(obj.Name, CRITICAL_REMOTE_KEYWORDS)
133
+ local isWarn, warnKw = matchKeywordList(obj.Name, WARN_REMOTE_KEYWORDS)
134
+ local inWorkspace = (containerName == "Workspace")
135
+
136
+ local sev = "INFO"
137
+ local title = "Client-Visible Remote: " .. obj.Name
138
+ local flaw = "Client-accessible " .. obj.ClassName .. " replicated inside " .. containerName .. "."
139
+
140
+ if isCrit then
141
+ sev = "WARN"
142
+ title = "High-Risk Client-Visible Remote: " .. obj.Name .. " ('" .. tostring(critKw) .. "')"
143
+ flaw = "Remote endpoint name matches critical gameplay/economy keyword '" .. tostring(critKw) .. "' accessible to all clients."
144
+ elseif isWarn then
145
+ sev = "WARN"
146
+ title = "Gameplay State Remote: " .. obj.Name .. " ('" .. tostring(warnKw) .. "')"
147
+ flaw = "Remote endpoint name matches gameplay state keyword '" .. tostring(warnKw) .. "' in " .. containerName .. "."
148
+ elseif inWorkspace then
149
+ sev = "WARN"
150
+ title = "Workspace-Parented Remote: " .. obj.Name
151
+ flaw = "Remote endpoint is parented inside Workspace rather than a centralized ReplicatedStorage network folder."
152
+ end
153
+
154
+ sendFinding(
155
+ sev,
156
+ "RemoteSecurity",
157
+ title,
158
+ fullPath,
159
+ flaw,
160
+ "Clients can fire or invoke this endpoint with spoofed types, negative numbers, NaN, nil, or oversized tables at high frequency.",
161
+ "Validate typeof() and finite bounds on the server, enforce per-player cooldowns, and keep rewards/prices server-authoritative.",
162
+ "remote.OnServerEvent:Connect(function(plr, amt)\\n if typeof(amt) ~= \\"number\\" or amt ~= amt or amt <= 0 then return end\\nend)"
163
+ )
164
+
165
+ if obj:IsA("RemoteEvent") or obj:IsA("UnreliableRemoteEvent") then
166
+ remoteCounts[fullPath] = 0
167
+ remoteTypes[fullPath] = obj.ClassName
168
+ obj.OnClientEvent:Connect(function(...)
169
+ remoteCounts[fullPath] = (remoteCounts[fullPath] or 0) + 1
170
+ end)
171
+ end
172
+ end
173
+
174
+ local function scanRemotesInContainer(container, label)
175
+ if not container then return end
176
+ local ok, descendants = pcall(function() return container:GetDescendants() end)
177
+ if not ok then return end
178
+ for i, obj in ipairs(descendants) do
179
+ inspectClientRemote(obj, label)
180
+ if i % SCAN_CHUNK_SIZE == 0 then
181
+ task.wait()
182
+ end
183
+ end
184
+ container.DescendantAdded:Connect(function(obj)
185
+ inspectClientRemote(obj, label)
186
+ end)
187
+ end
188
+
189
+ -- ============================================================================
190
+ -- 3. Client-Side ValueBase & Attribute Audit (LocalPlayer, Character, Shared)
191
+ -- ============================================================================
192
+ local reportedValues = {{}}
193
+
194
+ local function scanContainerForValues(rootInstance, label)
195
+ if not rootInstance then return end
196
+ local ok, descendants = pcall(function() return rootInstance:GetDescendants() end)
197
+ if not ok then return end
198
+ for i, desc in ipairs(descendants) do
199
+ if desc:IsA("ValueBase") then
200
+ local fullPath = desc:GetFullName()
201
+ if not reportedValues[fullPath] then
202
+ local sensitive, kw = matchKeywordList(desc.Name, SENSITIVE_VALUE_KEYWORDS)
203
+ if sensitive then
204
+ reportedValues[fullPath] = true
205
+ local inChar = (label == "Character")
206
+ local sev = inChar and "CRITICAL" or "WARN"
207
+ sendFinding(
208
+ sev,
209
+ "StateReplication",
210
+ "Client-Accessible " .. desc.ClassName .. " in " .. label .. ": " .. desc.Name,
211
+ fullPath,
212
+ "Gameplay state ('" .. tostring(kw) .. "') is stored in a " .. desc.ClassName .. " inside " .. label .. ".",
213
+ "Client-accessible ValueBase objects can be modified locally; any script trusting them without server authority causes state desync or spoofing.",
214
+ "Store authoritative state in ServerScriptService tables and replicate read-only Attributes to clients.",
215
+ "player:SetAttribute(\\"Cash\\", authoritativeCash)"
216
+ )
217
+ end
218
+ end
219
+ end
220
+ if i % SCAN_CHUNK_SIZE == 0 then
221
+ task.wait()
222
+ end
223
+ end
224
+ end
225
+
226
+ local function scanAttributesOn(instance, label)
227
+ if not instance then return end
228
+ for attrName, _ in pairs(instance:GetAttributes()) do
229
+ local sensitive, kw = matchKeywordList(attrName, SENSITIVE_VALUE_KEYWORDS)
230
+ if sensitive then
231
+ sendFinding(
232
+ "INFO",
233
+ "StateReplication",
234
+ "Client-Readable " .. label .. " Attribute: " .. attrName,
235
+ instance:GetFullName() .. " [Attribute:" .. attrName .. "]",
236
+ "Attribute '" .. attrName .. "' ('" .. tostring(kw) .. "') is replicated to the client on " .. label .. ".",
237
+ "Verify no LocalScript trusts client-mutated local attributes to gate remote arguments or gameplay checks.",
238
+ "Keep Attributes strictly for read-only UI display and enforce all gameplay validation server-side."
239
+ )
240
+ end
241
+ end
242
+ end
243
+
244
+ -- ============================================================================
245
+ -- 4. Tool & Humanoid Exposure Audit (Combat / Obby / RPG / Simulator)
246
+ -- ============================================================================
247
+ local function auditTool(tool)
248
+ if not tool:IsA("Tool") then return end
249
+ local hasTouch = tool:FindFirstChildWhichIsA("TouchTransmitter", true) ~= nil
250
+ local hasRemote = tool:FindFirstChildWhichIsA("RemoteEvent", true) ~= nil or tool:FindFirstChildWhichIsA("RemoteFunction", true) ~= nil
251
+ if hasTouch or hasRemote then
252
+ sendFinding(
253
+ "INFO",
254
+ "InventorySecurity",
255
+ "Tool Replication Surface: " .. tool.Name,
256
+ tool:GetFullName(),
257
+ "Tool contains client-accessible " .. (hasTouch and "TouchTransmitter " or "") .. (hasRemote and "RemoteEndpoint" or "") .. ".",
258
+ "Client-owned character Tools with TouchTransmitters or unvalidated remotes are common targets for hitbox reach or remote-damage spoofing.",
259
+ "Validate tool ownership, equip state, cooldowns, and raycast/magnitude distance on the server before applying tool effects."
260
+ )
261
+ end
262
+ end
263
+
264
+ local function auditCharacter(char)
265
+ if not char then return end
266
+ scanContainerForValues(char, "Character")
267
+ scanAttributesOn(char, "Character")
268
+ for _, child in ipairs(char:GetChildren()) do
269
+ if child:IsA("Tool") then
270
+ auditTool(child)
271
+ elseif child:IsA("Humanoid") then
272
+ if child.WalkSpeed > 24 or child.JumpPower > 65 then
273
+ sendFinding(
274
+ "INFO",
275
+ "PhysicsSecurity",
276
+ "Elevated Humanoid Movement Baseline (" .. child.Name .. ")",
277
+ child:GetFullName(),
278
+ string.format("Character Humanoid baseline WalkSpeed=%.1f, JumpPower=%.1f.", child.WalkSpeed, child.JumpPower),
279
+ "Because clients own their character physics, server anti-cheat thresholds must match game-specific speed/jump abilities.",
280
+ "Track authoritative movement speed boosts server-side and enforce server displacement/velocity sanity checks."
281
+ )
282
+ end
283
+ end
284
+ end
285
+ end
286
+
287
+ -- ============================================================================
288
+ -- 5. Chunked Universal Workspace Scan (Physics, Prompts, ClickDetectors, Seats)
289
+ -- ============================================================================
290
+ local unanchoredCount = 0
291
+ local reportedPhysicsModels = {{}}
292
+ local physicsReportedCount = 0
293
+ local promptReportedCount = 0
294
+ local clickReportedCount = 0
295
+
296
+ local function isPlayerCharacterPart(part)
297
+ local model = part:FindFirstAncestorOfClass("Model")
298
+ return model ~= nil and Players:GetPlayerFromCharacter(model) ~= nil
299
+ end
300
+
301
+ task.spawn(function()
302
+ -- Scan all client-visible services for Remotes
303
+ local remoteContainers = {{
304
+ {{ ReplicatedStorage, "ReplicatedStorage" }},
305
+ {{ ReplicatedFirst, "ReplicatedFirst" }},
306
+ {{ Workspace, "Workspace" }},
307
+ {{ LocalPlayer, "LocalPlayer" }},
308
+ {{ StarterGui, "StarterGui" }},
309
+ {{ StarterPack, "StarterPack" }},
310
+ {{ Lighting, "Lighting" }},
311
+ {{ SoundService, "SoundService" }},
312
+ {{ Teams, "Teams" }},
313
+ }}
314
+ for _, pair in ipairs(remoteContainers) do
315
+ scanRemotesInContainer(pair[1], pair[2])
316
+ end
317
+
318
+ -- Scan LocalPlayer, Backpack, Character, and Shared ValueBases
319
+ scanContainerForValues(LocalPlayer, "LocalPlayer")
320
+ scanAttributesOn(LocalPlayer, "LocalPlayer")
321
+ scanContainerForValues(ReplicatedStorage, "ReplicatedStorage")
322
+ if LocalPlayer.Character then
323
+ auditCharacter(LocalPlayer.Character)
324
+ end
325
+ LocalPlayer.CharacterAdded:Connect(function(char)
326
+ task.wait(0.25)
327
+ auditCharacter(char)
328
+ end)
329
+
330
+ local backpack = LocalPlayer:FindFirstChildOfClass("Backpack")
331
+ if backpack then
332
+ for _, item in ipairs(backpack:GetChildren()) do
333
+ auditTool(item)
334
+ end
335
+ backpack.ChildAdded:Connect(auditTool)
336
+ end
337
+
338
+ -- Chunked scan of Workspace for physics, ProximityPrompts, ClickDetectors, and VehicleSeats
339
+ local wsDescendants = Workspace:GetDescendants()
340
+ for i, obj in ipairs(wsDescendants) do
341
+ if obj:IsA("BasePart") and not obj.Anchored and not obj:IsDescendantOf(Workspace.CurrentCamera) then
342
+ if not isPlayerCharacterPart(obj) then
343
+ unanchoredCount += 1
344
+ local hasTouch = obj:FindFirstChildOfClass("TouchTransmitter") ~= nil
345
+ local clientSimulated = false
346
+ pcall(function()
347
+ clientSimulated = (obj.ReceiveAge == 0)
348
+ end)
349
+
350
+ if (clientSimulated or hasTouch) and physicsReportedCount < 12 then
351
+ local ownerModel = obj:FindFirstAncestorOfClass("Model")
352
+ local groupKey = ownerModel and ownerModel:GetFullName() or obj:GetFullName()
353
+ if not reportedPhysicsModels[groupKey] then
354
+ reportedPhysicsModels[groupKey] = true
355
+ physicsReportedCount += 1
356
+ local detail = clientSimulated and "simulated by this client (ReceiveAge == 0)" or "contains TouchTransmitter while unanchored"
357
+ sendFinding(
358
+ "WARN",
359
+ "NetworkOwnership",
360
+ "Client-Exposed Unanchored Part/Model: " .. (ownerModel and ownerModel.Name or obj.Name),
361
+ groupKey,
362
+ "Unanchored non-character BasePart (" .. obj.Name .. ") is " .. detail .. ".",
363
+ "Clients with physics ownership over unanchored parts control their CFrame/velocity and can trigger TouchInterests remotely.",
364
+ "Anchor static/menu models in Studio, or call part:SetNetworkOwner(nil) server-side and validate Touched events.",
365
+ "part:SetNetworkOwner(nil)"
366
+ )
367
+ end
368
+ end
369
+ end
370
+ elseif obj:IsA("ProximityPrompt") and promptReportedCount < 6 then
371
+ promptReportedCount += 1
372
+ if obj.MaxActivationDistance > 20 or not obj.RequiresLineOfSight then
373
+ sendFinding(
374
+ "INFO",
375
+ "PromptSecurity",
376
+ "Permissive ProximityPrompt Configuration: " .. obj.Name,
377
+ obj:GetFullName(),
378
+ string.format("ProximityPrompt has MaxActivationDistance=%.1f, RequiresLineOfSight=%s.", obj.MaxActivationDistance, tostring(obj.RequiresLineOfSight)),
379
+ "Server Triggered handlers without explicit magnitude checks allow clients to interact from extended range or through walls.",
380
+ "Validate (player.Character.PrimaryPart.Position - promptPart.Position).Magnitude <= MaxActivationDistance + 4 on the server."
381
+ )
382
+ end
383
+ elseif obj:IsA("ClickDetector") and clickReportedCount < 4 then
384
+ clickReportedCount += 1
385
+ if obj.MaxActivationDistance > 40 then
386
+ sendFinding(
387
+ "INFO",
388
+ "PromptSecurity",
389
+ "Long-Range ClickDetector: " .. obj.Name,
390
+ obj:GetFullName(),
391
+ string.format("ClickDetector allows activation up to %.1f studs.", obj.MaxActivationDistance),
392
+ "Ensure MouseClick server listeners verify player character proximity and ownership before mutating state.",
393
+ "Check character distance and per-player cooldown inside ClickDetector.MouseClick on the server."
394
+ )
395
+ end
396
+ elseif obj:IsA("VehicleSeat") then
397
+ sendFinding(
398
+ "INFO",
399
+ "PhysicsSecurity",
400
+ "VehicleSeat Network Surface: " .. obj.Name,
401
+ obj:GetFullName(),
402
+ "VehicleSeat grants network ownership to the seated occupant during driving.",
403
+ "Without server velocity/bounds checks, seated clients can manipulate vehicle speed or teleport vehicle assemblies.",
404
+ "Validate seat occupancy server-side and clamp abnormal vehicle velocity/teleport deltas on the server."
405
+ )
406
+ end
407
+
408
+ if i % SCAN_CHUNK_SIZE == 0 then
409
+ task.wait()
410
+ end
411
+ end
412
+
413
+ if unanchoredCount > 100 then
414
+ sendFinding(
415
+ "WARN",
416
+ "Performance",
417
+ "Excessive Unanchored Parts Visible to Client (" .. tostring(unanchoredCount) .. " parts)",
418
+ "Workspace",
419
+ "Client observes " .. tostring(unanchoredCount) .. " unanchored non-character BaseParts in Workspace.",
420
+ "Large numbers of unanchored parts increase physics simulation overhead, replication bandwidth, and network ownership surface.",
421
+ "Anchor decorative geometry in Studio and disable CanCollide/CanTouch on non-interactive detail parts."
422
+ )
423
+ end
424
+
425
+ print("[rcdebug] Universal 100% client-sided scan complete across all containers & live telemetry active (10s interval).")
426
+ end)
427
+
428
+ -- ============================================================================
429
+ -- 6. Continuous Client Telemetry Loop (OnClientEvent Rates, FPS & 10s Memory Diffs)
430
+ -- ============================================================================
431
+ local RUN_TOKEN = HttpService:GenerateGUID(false)
432
+ LocalPlayer:SetAttribute("__rcdebug_run_token", RUN_TOKEN)
433
+
434
+ local frameCount = 0
435
+ local heartbeatConn
436
+ heartbeatConn = RunService.Heartbeat:Connect(function()
437
+ if LocalPlayer:GetAttribute("__rcdebug_run_token") ~= RUN_TOKEN then
438
+ if heartbeatConn then heartbeatConn:Disconnect() end
439
+ return
440
+ end
441
+ frameCount += 1
442
+ end)
443
+
444
+ task.spawn(function()
445
+ local startTime = os.clock()
446
+ local lastCheck = os.clock()
447
+ local lastRemoteTotals = {{}}
448
+
449
+ while LocalPlayer:GetAttribute("__rcdebug_run_token") == RUN_TOKEN do
450
+ task.wait(SNAPSHOT_INTERVAL)
451
+ if LocalPlayer:GetAttribute("__rcdebug_run_token") ~= RUN_TOKEN then
452
+ break
453
+ end
454
+
455
+ local now = os.clock()
456
+ local dt = math.max(0.1, now - lastCheck)
457
+ lastCheck = now
458
+ local fps = math.floor((frameCount / dt) * 10) / 10
459
+ frameCount = 0
460
+
461
+ local remoteRates = {{}}
462
+ for path, total in pairs(remoteCounts) do
463
+ local prev = lastRemoteTotals[path] or 0
464
+ local delta = total - prev
465
+ lastRemoteTotals[path] = total
466
+ local rate = delta / dt
467
+ if total > 0 then
468
+ table.insert(remoteRates, {{
469
+ remote_path = path,
470
+ remote_type = remoteTypes[path] or "RemoteEvent",
471
+ total_calls = total,
472
+ rate_per_sec = math.floor(rate * 10) / 10
473
+ }})
474
+ end
475
+ if rate >= 20 then
476
+ sendFinding(
477
+ "CRITICAL",
478
+ "RemoteTraffic",
479
+ "High-Frequency Server->Client Remote Replication: " .. path,
480
+ path,
481
+ string.format("OnClientEvent received %.1f calls/sec over the last %.0fs window (Client FPS: %.1f).", rate, dt, fps),
482
+ "Excessive FireClient/FireAllClients replication saturates client bandwidth, increases ping, and causes frame drops.",
483
+ "Batch updates into snapshots (10-20 Hz) or use UnreliableRemoteEvent for high-frequency visual updates."
484
+ )
485
+ end
486
+ end
487
+
488
+ local wsCount = #Workspace:GetDescendants()
489
+ local plrCount = #LocalPlayer:GetDescendants()
490
+ local memMb = 0
491
+ pcall(function()
492
+ memMb = Stats:GetTotalMemoryUsageMb()
493
+ end)
494
+
495
+ postJSON(TELEMETRY_ENDPOINT, "telemetry", {{
496
+ elapsed_sec = math.floor((now - startTime) * 10) / 10,
497
+ workspace_instances = wsCount,
498
+ player_instances = plrCount,
499
+ total_memory_mb = math.floor(memMb * 100) / 100,
500
+ client_fps = fps,
501
+ remotes = remoteRates
502
+ }})
503
+ end
504
+ end)
505
+ """