local function onPlayerJoin(player)    local leaderstats = Instance.new("Folder")    leaderstats.Name = "leaderstats"    leaderstats.Parent = player     local coins = Instance.new("IntValue")    coins.Name = "Coins"    coins.Value = 0    coins.Parent = leaderstatsend game.Players.PlayerAdded:Connect(onPlayerJoin)local part = script.Parentlocal function collect(otherPart)    local player = game.Players:FindFirstChild(otherPart.Parent.Name)    if player then        player.leaderstats.Coins.Value = player.leaderstats.Coins.Value + 1         part:Destroy()    endendpart.Touched:Connect(collect)local part = script.Parentlocal function collect(otherPart)    local player = game.Players:FindFirstChild(otherPart.Parent.Name)    if player then        player.leaderstats.Coins.Value = player.leaderstats.Coins.Value + math.random(1,100)        part:Destroy()     end endpart.Touched:Connect(collect)local part = script.Parentlocal addPoint = truelocal function collect(otherPart)    local player = game.Players:FindFirstChild(otherPart.Parent.Name)    if player then        if addPoint then            addPoint = false            player.leaderstats.Coins.Value = player.leaderstats.Coins.Value + 1         end        part.Position = Vector3.new(math.random(-100,100),part.Position.Y, math.random(-100,100))        part.BrickColor = BrickColor.new('Really red')        wait(1)        addPoint = true      endendpart.Touched:Connect(collect)local part = script.Parentlocal function collect(otherPart)    local player = game.Players:FindFirstChild(otherPart.Parent.Name)    if player then        local playerModel = game.Workspace:FindFirstChild(player.Name)        local tool = playerModel:FindFirstChild('Tool')        if tool then            tool:Destroy()            player.leaderstats.Coins.Value = player.leaderstats.Coins.Value + 1         end    endendpart.Touched:Connect(collect)local part = script.Parentlocal function collect(otherPart)    local player = game.Players:FindFirstChild(otherPart.Parent.Name)    if player then        local playerModel = game.Workspace:FindFirstChild(player.Name)        local tool = playerModel:FindFirstChild('Tool')        if tool then            tool.Parent = game.Workspace            tool.Handle.Position = Vector3.new(math.random(-50,50),0.5,math.random(-50,50))            player.leaderstats.Coins.Value = player.leaderstats.Coins.Value + 1          end    endendpart.Touched:Connect(collect)