How to give different points deppending of the tool used

I want to create different tools that each one gives a different number of points, coins… but I dont know how to do it.

Option 1:
Create int values inside of the tools for example one tool might have a multiplier of 2 and another one might have a multiplier of 1000

Then when you are giving coins to player do this inside the script:

-- Code to give coins
-- Example:
player.Coins.Value = player.Coins.Value + pointsAmount * tool.Multiplier.Value

If multiplier is 10 and pointsAmount is 8 they will get +80 coins

Do this for all your currencies

Option 2:
If you want each tool to give a specific amount of coins add a int value inside the tools called PointsToGive

Then do this:

-- Example
player.Coins.Value = player.Coins.Value + tool.PointsToGive.Value
1 Like

Option 3:
You can also use a Module Script.

local toolModule = {
    ["Test Tool"] = {
        Coins = 30;
        Multiplier = 1.5
    };
    ["Test Tool2"] = {
        Coins = 50;
        Multiplier = 1.5
    }
}
return toolModule
1 Like

I think adding values to tools would be better since it would be more easy to customize and change and would require less work

Please mark this post as solved if you think your question was answered!