How can I add protection to my RemoteEvents?

I am attempting to make an ordering system (similar to bloxburg’s burger place) for a game that I am working on. An NPC walks up to a cash register, orders a meal etcetc. When a player finishes their shift, I need to use a remote event to give the player their cash.

I am aware that remote viewer (included in most paid exploits) is capable of viewing the arguments of remote events that are fired. How can I successfully fire the shift finished remote event without including the amount of cash a player earns? Is there a way of doing this?

All help is appreciated. :smiley:

1 Like

From what I know (from a trusted source who now develops anti-exploits, after years of exploiting), while exploiters can read Server-Client info, they cannot read Client-Server info. Your best bet is to generate a random key for each remote event on runtime.

If you have one key that’s permanent across your entire game (hard coded in, not generated on runtime), then they can simply download the code, decompile it, and figure out the key incredibly easily. So it has to be randomly generated on runtime.

1 Like

Like generating a code every few minutes that’s used throughout the server?

How can I store that code and make sure scripts can access it? I have an exploiter friend that says values can easily be compromised through a script that lets you “view everything in the game, where it is and what it’s properties are”

Is it possible for you to detect when a player’s shift ends on the server?

The shift ending is fully serverside as I do it via part:Touched. What I’m looking for is a way to grant a player their cash while remaining with a secure remote event.

Ok, I’ve never played bloxburg so there may be some things I’m missing. But if you can detect when a player’s shift ends on the server. Why don’t you award them cash on the server?

The ordering/cashier system is fully localized. (Apart from using remote events for NPCs, which I would also like to secure)

Here’s a screenshot of the cashier post so you can get a better idea of what I’m talking about:
https://gyazo.com/1a788d40760f49a047fb5783fa69d024

Again, why not grant the player their cash on the server? do you only have cash on the client?

No, they can read everything coming in and out of the client. Not sure how credible this source is.

This hasn’t worked and still won’t, because exploiters can still read and emulate this. Whether it’s dynamic or compiled in.

1 Like

How do you think I can add security to my remotes? :upside_down_face:

All the cash variables are stored on the local script. I can’t get them to the server script without a remote event.

The idea is you shouldn’t be adding security to your remotes. You should be thinking offensively, as if you’re someone trying to compromise your game. Set up checks on the server that don’t rely on information the client provides, make sure things the client is asking for make sense, and don’t store anything sensitive on the client.

How can I server-check a local scripted gui?

In your post you mention that players have shifts. Like Xalneth suggested, you can have the server be the one that decides when the player’s shift starts and ends.

Assuming your game is time based, you can just check the time between when the player began and ended their shift, which at this point should already be in the server.

If your game is task based (ex. serve specific orders given by the NPCs) you can have the server send the client the NPC needs as they come in, and the client can send back an action (like picking a specific ingredient). Even here, you inevitably won’t be able to stop people who bot this, but you can diminish the impact by adding things like cooldowns/debounces (ex. a customer must be in the store for at least 20 seconds before leaving and another one coming in).

I have concluded that the ordering system is so easy that I will just have a specific window where the remote event can be fired. I will also put a time limit on the shifts so people can’t afk. Thank you so much for your help, I will be using serversides for NPCs now.

Most exploiters have a wide choice of debug functions they can use to hijack your random key system. Furthermore, there have been numerous examples of seed cracking in other scenarios. This method should never be used as a way of “securing” your RemoteEvent transmissions, along with any other useless attempts to do so.