UniverseEvent - Easy to use cross-server events

This is a simple wrapper for the new MessagingService that allows you to make cross-server events with minimal boilerplate code.

Simple example:

local Manager = require(script.UniverseEvent)
local UEvent = Manager.new("ChannelName") --this has to be the same for both events.

UEvent.Event:Connect(function(...)
    print(...) --works as you expect.
end)

UEvent:Fire("oof", 123, 456, false, true) --also fires as you expect.

It also includes replay protection, anti-feedback-loop protection (so you don’t get the event on the same server you sent it on), and only uses 1 of your MessagingService subscription slots.

Link to module. Enjoy!

72 Likes

I’d suggest you add a JobId parameter so you can “dm” a server.

7 Likes

Well, you beat me to this! I was just thinking about developing a wrapper for Messaging Service then I see this! I will need to try this for sure.

1 Like

The simple script, in which script I put: Localscript, modulescript or Script

You would put this in a normal Script.