Coin System for my game

So this is going to be complicated but I’ll try to make it as simple as possible by dividing it into sections.

so to start I’m trying to make a coin system and here is how I want it to be

  1. I want collectible coins around the map(and I want those to be local to each player)

  2. I want a daily reward system

  3. I want a shop where you can buy stuff(and that stuff like a backpack which I want to automatically be equipped but not everything like flashlights would go in your backpack)

  4. I also want to automatically give x amount of coins after bending in the game for y amount of time

  5. I want tradable items (the trades would be a combination of other items and coins)

so does anybody know in the right ballpark of where I should start? YT tutorials would be preferred but I’m good with any help you’ve got.

1 Like
  1. You’ll want to start learning about Remote Events and client-sided rendering. If this is murder-mystery style, you’d replicate all the coins and wait for the client to say they’ve been collected (sanity-check this else a player can exploit the event to auto-collect). If it’s a one-time coin collection you’ll need to setup a datastore to house a table of all the coins the player has/has not collected, so on subsequent joins the server knows which to replicate to the client.

  2. You’ll need to learn how to use the OS library, os.time() specifically, to house in a datastore the last point at which a player played, if you want it based on 24-hrs since they last received reward, or alternatively have the server keep track of its own time if you want it on a global 24-hr reset (in which a player would receive two daily rewards should they be on during the reset).

  3. More datastores would be necessary to hold the players’ inventory, and the server will replicate what all they own to their backpack similarly like the coins, but now learning GUI will be necessary (+ more remote events to buy things). Careful data management will be necessary to avoid frustrating the players/having security risks. Never have the client handle the price of anything – do it on the server always.

  4. Fire a remote event to the server when the player begins bending and when they stop. Log the os.time() of each and compare once they’ve finished bending. You’ll want to be continuously sanity-checking the player in-between these events as it would be easy to exploit.

  5. More complex GUI work would be necessary, with the server handling both players’ inventories delicately. A secure system would have the players fire to the server the items they offer in trade, confirm said item exists, and fire back to both parties the updated trade. Don’t let the player handle any instancing/references to the item themselves or between the two trading parties.

4 Likes

It’s fine, atleast you know now.

1 Like

is there a place for future reference where you can ask for full systems?

1 Like

I don’t really think so, Coding is about learning, if you copy, you don’t learn anything.

1 Like

Free models would be your go to.

not copy and past just learning how to make a specific system like in my post by figuring out the different parts.

No, not anywhere inside this forum. If you want a full system, u would be better of hiring someone on the discord server hidden devs. Its a place where you can hire people to make full systems

You cannot expect to learn coding by asking people to code “full systems”.
But you can hire people in order for them to code you full systems, and that would require payment.
You can look at Roblox Talent Hub,even though I do not know what requirements are needed to hire scripters there, or ask people in discord servers etc about whether they will be willing to work.

that’s not what I’m asking for all I want to know is what I need to learn to build the system Not just tell me the code I need for sed task.

Hmm I see.
And following this statement and a previous one -

I assumed I can help you by making just a simple coin collection system from which you will get an idea of how it is done, note that the file I am providing does not have trading system encoded but if you want I can help you by providing the idea and some of the code about that as well.
Hope it helps -
Coin Collection System.rbxl (35.3 KB)
Here is an example video -
https://gyazo.com/3b3eaf1d03d9b6a6457d288f51540fd6

you’re technically not supposed to share scripts but thanks anyways