
1.6k Views
236 Executions
BEST NAME PROTECT | OPEN SRC | FOR VIDEO
Universal Script π
bettusanFirst script
10 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
A Name Protect script hides the local playerβs real username on the screen by replacing it with a fake name for example, to create a video. It works client-side only, changing UI text like name tags or labels. The server and other players still see the real username. ChatGPT solution
local CONFIG = {
FakeName = "PROTECTED", -- What to replace the username with
FakeDisplay = "PROTECTED", -- What to replace the DisplayName with
MatchColor = true -- Try to preserve formatting (useful for chat)
}
local Players = game:GetService("Players")
local LocalPlayer = Players.LocalPlayer
local RunService = game:GetService("RunService")
-- Cache real names to avoid fetching them constantly
local RealName = LocalPlayer.Name
local RealDisplay = LocalPlayer.DisplayName
-- Function that instantly replaces text
local function SpoofText(obj)
-- Check if the text actually contains the name to reduce load
if not obj.Text:find(RealName) and not obj.Text:find(RealDisplay) then return end
-- Temporarily disable the listener to avoid recursion (infinite loop)
local originalText = obj.Text
local newText = originalText:gsub(RealName, CONFIG.FakeName)
newText = newText:gsub(RealDisplay, CONFIG.FakeDisplay)
if originalText ~= newText then
obj.Text = newText
end
end
-- Function to process an object (attach "eyes" to it)
local function MonitorObject(obj)
-- Work only with text elements
if obj:IsA("TextLabel") or obj:IsA("TextButton") or obj:IsA("TextBox") then
-- 1. Replace text immediately
SpoofText(obj)
-- 2. Attach an event: if the game tries to change the text back, replace it again
obj:GetPropertyChangedSignal("Text"):Connect(function()
Comments
0Log in to join the conversation. Login
No comments yet. Be the first!







