Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local CloneFunction = clonefunction
- local CheckCaller = CloneFunction(checkcaller)
- local HookFunction = CloneFunction(hookfunction)
- local LocalPlayer = game.Players.PlayerAdded:wait()
- local PostMessage = require(LocalPlayer:WaitForChild("PlayerScripts", 1/0):WaitForChild("ChatScript", 1/0):WaitForChild("ChatMain", 1/0)).MessagePosted
- getgenv().MessageEvent = Instance.new("BindableEvent")
- local OldFunctionHook
- local PostMessageHook = function(self, msg)
- if not CheckCaller() and self == PostMessage then
- MessageEvent:Fire(msg)
- return
- end
- return OldFunctionHook(self, msg)
- end
- OldFunctionHook = HookFunction(PostMessage.fire, PostMessageHook)
Add Comment
Please, Sign In to add comment