I doing a game with my friend and i'm doing a shop with items and pets that gives coins but i will do a item that gives you x2 coins and i don't know how to do it (working with leaderstats)
script from the item:
local Tool = script.Parent local hold = false local deb = false local player = Tool.Parent:IsA("Model") and game.Players:GetPlayerFromCharacter(Tool.Parent) or Tool.Parent.Parent local char = player.Character function Press() if player and player:FindFirstChild("leaderstats") and player.leaderstats:FindFirstChild("Coins") and player:FindFirstChild("CoinBoost") then local stats = player:WaitForChild("leaderstats") local cash = stats:WaitForChild("Coins") --// Example: "Points","Cash" your currency name Here change for your leaderstats! local boost = player:WaitForChild("CoinBoost") --// this is pet boost local pgui = player:WaitForChild("PlayerGui") local gui = pgui:WaitForChild("ToolPopUp") cash.Value = cash.Value + 1 + boost.Value --"1 Coin + the Value boost :)" gui:WaitForChild("Load"):TweenSize(UDim2.new(0.241, 0,0.1, 0), "Out" , "Linear", 0.5,false,function() --// 0.3 is time for animation! gui:WaitForChild("Load").Size = UDim2.new(0.008, 0,0.1, 0) end) end end game.Players.PlayerAdded:Connect(function(player) player.CharacterAdded:Connect(function(char) if player:WaitForChild("PlayerGui"):FindFirstChild("ToolPopUp") then player["PlayerGui"].ToolPopUp:Destroy() hold = false end end) end) script.Parent.Equipped:Connect(function() local char = script.Parent.Parent local plr = game.Players:GetPlayerFromCharacter(char) local gui = script:FindFirstChild("ToolPopUp") if gui then if not plr:WaitForChild("PlayerGui"):FindFirstChild("ToolPopUp") then gui:Clone().Parent = plr:WaitForChild("PlayerGui") end end end) script.Parent.Unequipped:Connect(function() hold = false local plr = script.Parent.Parent.Parent if plr:WaitForChild("PlayerGui"):FindFirstChild("ToolPopUp") then plr:WaitForChild("PlayerGui"):FindFirstChild("ToolPopUp"):Destroy() end end) script.Parent.Deactivated:Connect(function() hold = false end) script.Parent.Activated:Connect(function() if deb == false and hold == false then local character = Tool.Parent; local humanoid = character.Humanoid if humanoid == nil then return end hold = true repeat wait() if deb == false then deb = true Press() wait(0.5) deb = false end until hold == false end end)

4 comments
We need to see the coin giver code to solve this.... Also what variable the item changes
cash.Value = cash.Value + 1 + boost.Value
cash.Value + 1 is for the tool and + boost.Value for the pets i need to x2 that
I suggest posting a more constructive question. For the logic on how to double coins, just set the coins to the value of the coins currently multiplied by 2.