BetterXScripts

Untitled

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