-- [[ 配置区 ]] local REAPPLY_ON_RESPAWN = true local message = "-gh 107852478332182 118799338103138 121360936156823 132416515427938 80628080423002 101379144205559 125747082775861" local player = game:GetService("Players").LocalPlayer local runService = game:GetService("RunService") local lastChar = nil -- [[ 发送通知函数 ]] local function sendNotice() game:GetService("StarterGui"):SetCore("SendNotification", { Title = "Giant Rig"; Text = "By Null (@NPC_PlayersNoob)"; Duration = 2; }) end -- [[ 核心注入逻辑 ]] local function runChatInjection() -- 尝试多种路径发送,确保覆盖所有版本的聊天室 local tcs = game:GetService("TextChatService") local rs = game:GetService("ReplicatedStorage") -- 方案 A: 新版 API if tcs.ChatVersion == Enum.ChatVersion.TextChatService then local channel = tcs:FindFirstChild("RBXGeneral", true) or tcs:FindFirstChildOfClass("TextChannel", true) if channel then channel:SendAsync(message) end end -- 方案 B: 旧版/通用远程事件 local legacyEvent = rs:FindFirstChild("SayMessageRequest", true) if legacyEvent then legacyEvent:FireServer(message, "All") end sendNotice() end -- [[ 精准角色检测循环 ]] runService.Heartbeat:Connect(function() if not REAPPLY_ON_RESPAWN then return end local char = player.Character -- 关键:不仅要 Character 存在,还要 HumanoidRootPart 已经加载(这意味着你已经实体化了) if char and char ~= lastChar then local root = char:FindFirstChild("HumanoidRootPart") if root then -- 记录当前角色,防止在同一条命里重复触发 lastChar = char -- 在实体出现的下一帧立即执行,保证服务器能识别到你的身份 task.defer(function() runChatInjection() end) end end end) -- 初始启动 if player.Character and player.Character:FindFirstChild("HumanoidRootPart") then lastChar = player.Character runChatInjection() end