Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local player = game:GetService("Players").LocalPlayer
- local chatted_bindable = Instance.new("BindableEvent");
- local chatted_event = chatted_bindable.Event;
- chatted_bindable.Name = player.Name .. "_Chatted_Event";
- local old_namecall;
- old_namecall = hookmetamethod(game, "__namecall", function(self, ...)
- if self.Name == "MessagePosted" and not checkcaller() and getnamecallmethod() == "Fire" then
- return old_namecall(chatted_bindable, ...);
- end;
- return old_namecall(self, ...);
- end);
- local old_index;
- old_index = hookmetamethod(game, "__index", function(self, index)
- if self == player and index == "Chatted" and not checkcaller() then
- return chatted_event;
- end;
- return old_index(self, index);
- end);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement