Its a System where when you have a pet or Multiple Pets equipped you get a multiplier from each pet and combine those multipliers to add more points / currency to the player when player does something where he gets Currency.
(Folder inside Player, contains all of the player’s owned pets.)
Script inside ClickDetector that gives Money when clicked ( for example )
local ClickDetector = script.parent
function getMultiplier(Player, Multiplier1)
local Multi = 1
for i,v in pairs(Player.Pets:GetChildren()) do
if v.Equipped.Value == true then
Multi = Multi + v[Multiplier1].Value
end
end
return Multi
end
function onMouseClick(Player)
-- Here should be the rest of the script , but it has nothing to do with this topic.
-------------------------
local Multiplier1 = getMultiplier(Player)
local pointsamount = game.ServerStorage.Points.Value * Multiplier1
Player.leaderstats.Points.Value = Player.leaderstats.Points.Value + pointsamount
end
clickDetector.MouseClick:Connect(onMouseClick)
Multiplier1 is supposed to be the final multiplier amount , it should get the multiplier from the “getMultiplier” function.
getMultiplier is supposed to search all of the players “pets” if they are equipped, then it should get all of the equipped ones and get their multipliers (a value called Multiplier1) values, and finally have an amount combined from all of the multiplier values.
Then what it does in the end is it multipliesthe money/points your supposed to recieve from this MouseClick with the final multiplier value.
(Sorry if terrible explanation)
The full script is not in there, but thats just for example like some color changing on the block the clickdetector is inside of. Nothing to do with these Multipliers and points