Advertisement
rrixh

name spoof

Sep 18th, 2023 (edited)
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.96 KB | None | 0 0
  1. getgenv().name = "lollypop"
  2.  
  3.  
  4. local Plr = game.Players.LocalPlayer
  5. for Index, Value in next, game:GetDescendants() do
  6.     if Value.ClassName == "TextLabel" then
  7.         local has = string.find(Value.Text,Plr.Name)
  8.         if has then
  9.             local str = Value.Text:gsub(Plr.Name,name)
  10.             Value.Text = str
  11.         end
  12.         Value:GetPropertyChangedSignal("Text"):Connect(function()
  13.             local str = Value.Text:gsub(Plr.Name,name)
  14.             Value.Text = str
  15.         end)
  16.     end
  17. end
  18.  
  19. game.DescendantAdded:Connect(function(Value)
  20.     if Value.ClassName == "TextLabel" then
  21.         local has = string.find(Value.Text,Plr.Name)
  22.         Value:GetPropertyChangedSignal("Text"):Connect(function()
  23.             local str = Value.Text:gsub(Plr.Name,name)
  24.             Value.Text = str
  25.         end)
  26.         if has then
  27.             local str = Value.Text:gsub(Plr.Name,name)
  28.             Value.Text = str
  29.         end
  30.        
  31.     end
  32. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement