I have a game with my friends and we are trying to do a tool that do coins x2 and we need to double boost values. e.g. get 1 coin per click and that x2
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") 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 gui:WaitForChild("Load"):TweenSize(UDim2.new(0.241, 0,0.1, 0), "Out" , "Linear", 0.5,false,function() 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)