I know, there’s a tutorial for it, but the method requires the Http-Service which I don’t want to use. Thanks for help!
What do you mean exactly by Server-Synced? Same items? If so, math.randomseed instantly solve your problem.
Could you elaborate? How would randomly setting a seed help syncronise items?
Would randomseed return the same value if the parameters were the same?
Setting the seed of the random generator ensures the same sequence is generated everywhere.
math.randomseed(1)
print(math.random()) --> 0.94843442061922
print(math.random()) -- > 0.061285879733742
Your best bet would be to use a datastore with a table. The table should contain a table of the items, and the current tick(). The server should check the datastore every 15 or so minutes, and regenerate and save the datastore if (tick()-datastoretick) >= 60*60*24 (if my math is even correct) is true. Otherwise, update the item list.
Your DS should look something like this:
{LastUpdated = tick(), Items = {"items","that","are","randomly","generated","go","here"}}
Keep in mind that certain countries have policies meaning you should check those on a player before letting them use your shop.
If I am correct, all you need is a loop to constantly check the time give by calling os.date("*t"), and compare it with the previous value. If the day changed, use it again to get a number (likely some formula to generate a seed off the month and day). Then use that to seed the generator.
You’d need to save that seed in a datastore, by the way. The randomseed function isn’t server-wide.
Edit: nevermind, your approach could actually work without a datastore if done properly.