local Coin1 = script.Parent.Coin1 local Coin2 = script.Parent.Coin2 local Coin3 = script.Parent.Coin3 game.Players.PlayerAdded:Connect(function(player) local leaderstats = Instance.new("Folder") leaderstats.Name = "leaderstats" leaderstats.Parent = player local Coins = Instance.new("IntValue") Coins.Name = "Coins" Coins.Parent = leaderstats Coins.Value = 0 local Debounce = false Coin1.Touched:Connect(function(hit) if Debounce then return end if hit.Parent:FindFirstChild("Humanoid") then if hit.Parent.Name == player.Name then Debounce = true Coins.Value = Coins.Value + 1 Coin1.Transparency = 0.5 Coin1.CanCollide = false task.wait(3) Coin1.Transparency = 0 Coin1.CanCollide = true Debounce = false end end end) Coin2.Touched:Connect(function(hit1) if Debounce then return end if hit1.Parent:FindFirstChild("Humanoid") then if hit1.Parent.Name == player.Name then Debounce = true Coins.Value = Coins.Value + 25 Coin2.Transparency = 0.5 Coin2.CanCollide = false task.wait(3) Coin2.Transparency = 0 Coin2.CanCollide = true Debounce = false end end end) Coin3.Touched:Connect(function(hit2) if Debounce then return end if hit2.Parent:FindFirstChild("Humanoid") then if hit2.Parent.Name == player.Name then Debounce = true Coins.Value = Coins.Value + 100 Coin3.Transparency = 0.5 Coin3.CanCollide = false task.wait(3) Coin3.Transparency = 0 Coin3.CanCollide = true Debounce = false end end end) end)