Advertisement
_______homie_______

Untitled

Dec 22nd, 2022 (edited)
88,278
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.74 KB | None | 0 0
  1. local player = game:GetService("Players").LocalPlayer
  2. local chatted_bindable = Instance.new("BindableEvent");
  3. local chatted_event = chatted_bindable.Event;
  4.  
  5. chatted_bindable.Name = player.Name .. "_Chatted_Event";
  6.  
  7. local old_namecall;
  8. old_namecall = hookmetamethod(game, "__namecall", function(self, ...)
  9. if self.Name == "MessagePosted" and not checkcaller() and getnamecallmethod() == "Fire" then
  10. return old_namecall(chatted_bindable, ...);
  11. end;
  12.  
  13. return old_namecall(self, ...);
  14. end);
  15.  
  16. local old_index;
  17. old_index = hookmetamethod(game, "__index", function(self, index)
  18. if self == player and index == "Chatted" and not checkcaller() then
  19. return chatted_event;
  20. end;
  21.  
  22. return old_index(self, index);
  23. end);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement