How would I add new codes without shutting down the game?

I am able to add new codes in within my games however I do not want to constantly want to update and shutdown the game is there any other way to only update a small portion of a script?

1 Like

Not without using loadstring and some messy code loading.

If you are concerned about it runing gameplay, you could implement a scheduled shut down that notifies the players that they have X minutes before the server shuts down.

1 Like

You could make some sort of GUI that you only can view, you could write some code word or anything you want you can also program some items that users could get like amount of cash, amount of items, and the most important thing:

You could create some sort of service that’ll alert all servers when you create the code to update and include that code in the whitelist of codes that’ll give you rewards, i don’t know what service though since i’m not a code programmer.

One way is to use HttpService and pastebin. Thats what I did, you can just use httpservice to get the code. You could also use datastores but its up to you

I wouldnt say thats the only way, you could try to access an externel website such as pastebin?

And how would you interact with instances then? Those scripts can only input and output values. I have yet to see more than 20 scripts that don’t require any direct access to any service. Not to mention the massive server to server delay for each call.

I’m not entirely sure what you mean by this but I’m fairly certain loadstringed scripts can access services. And the delays could be manageable if he’s only loading in server scripts. Any localscripts would have to use a Lua vm which is really slow.

I’m confused with ops question though, because it sounds like he could be talking about like activation codes rather than script code and that could pretty easily be done without any hacks, just httpservice it like @jakebball2019 said

He said that external scripts are another way besides using loadstring.

I thought he meant using external services to run code and return a values. I might be wrong though.

I’d try using HttpService to access a website you’re hosting that has some JSON code data { “code”: “100cash”} or something like that. You can then update the website’s content. I would suggest using something like glitch to host a simple .json file. (Unless I’m missing what you mean by new codes.)

There are a few different methods, some of which I’ve used or heard others use:

  • Store codes in GoogleSheets and access via HttpService
    image
  • Use GameAnalytics RemotConfigs to enable/disable codes, and store code data in the RemoteConfig name.

Simpler options which only use Roblox include using DataStores and just updating the key from Studio, and also using the description of a model.

2 Likes

I like the idea of using GameAnalytics RemotConfigs, how do I access this?

GameAnalytics is a service offered online, just look it up. “GameAnalytics.” It’s going to take some setup to get it working properly, but, it works.

I mean using HttpService to access a pastebin to check the twitter code and compare it. The delay isnt that much too. It might take a couple seconds but it is instantly changed.

HttpService can be used like others said, but what I do is have a simple datastore that stores details of all codes, and when someone redeems codes, my system checks it with the datastore. To update it I just use the Datastore Editor to update that key.

1 Like