How to Make Server-Synced Daily Shops

How would I go about making a GUI for this?

More specifically, when the script generates the items, how would I go about getting each individual item it chooses, finding a matching tool in a folder with the same name as the chosen item, to then use its values for a shop GUI?

Edit: Figured it out

On a different note, how would you want it so the script updates without having to join a new server?

Which would then in turn, update the GUI

Edit: Found out how to

So, I don’t want the item to be picked randomly, I want a certain item to always be on the shop on one day, then I want another certain item to be on the shop on the second day. How would i Make that?
Ex: day 1:orange - day 2:apple - day 3: grape - day 4: orange - day 5: apple…(and it keeps repeating).

Then just do days mod amount of items and the remainder is the item you pick

This system is awesome! I have a question though. How would I apply this to a sort of category system? I’m making a game that revolves around 4 weapon types. In the shop I want there to be 4 slots, in those slots will be skins for each weapon type. So slot 1 = weapontype1, slot 2 = weapontype2, etc. And in these slots it does the same exact system of rotating daily however only skins for that weapon type will appear in their respective slot. For example only skins for weapontype1 will appear in slot one. I think I may have an idea on how to do this, pretty much just using the normal system but making it separate for every weapon type. Is there a better way to do this by chance?

I love this system! However I have a question. I’m making a module script that has a dictionary of every cosmetic in the game. This dictionary stores the info such as name, model, rarity, price, and imageid. In the tutorial you say make tables for all the items of certain rarities. Would it be possible to just use the module script dictionary instead since it stores the rarity of every cosmetic within it? If so how would I properly implement this way of rarity storing into the function?

This is exactly what I was looking for! My game has something like this too and I’ve been absolutely stumped on how to do this

I got to say, this is an absolutely fantastic tutorial. Great job!

how do i change the item amount of the daily shop? i tried to change to amount but it keeps saying respinning

currentShopItems = getAvailableItems(day, 7)

Change the second number to however many items you want.

uhhh how are you meant to make a daily shop with this since it doesnt explain how do you use it for guis

1 Like

I understand that for accurate time synchronization from Google to Roblox, you need to account for network latency by adding a response delay variable that calculates the round-trip time and use half of it to adjust the time. But you should be adding the responseDelay variable to the originTime, not subtracting it.

return originTime + tick()-responseTime + responseDelay

Roblox does this with ‘GetServerTimeNow’.

is there anyway to forcefully reset the time? because i need it for testing purposes.

Thank you so much! I created a weekly shop system using this. :3

Thanks for creating this guide.

image

“Make sure that http requests are enabled!”

It is already enabled and it’s still not working. :man_facepalming:

can someone help me ? how can the shop be the same in every server, i dont understand im sorry :frowning: