i'm not a good scripter, could someone teach me how to combine these two scripts without breaking them?
function onClick()
script.Parent.Parent.Parent.Parent.Parent.leaderstats.Deaths.Value = 0
script.Parent.Parent.Parent.Parent.Parent.Character.Humanoid.Health = 0
script.Players.LocalPlayer.TeamColor = BrickColor.new("Institutional white")
end
script.Parent.MouseButton1Click:connect(onClick)
-----
disabled = false
script.Parent.MouseButton1Click:connect(function()
if disabled == false then
disabled = true
script.Parent.BackgroundColor3 = Color3.new(217, 0, 0)
game.Workspace.Teleport.RemoteFunction:InvokeServer()
wait(3)
script.Parent.BackgroundColor3 = Color3.new(0, 154, 0)
disabled = false
end
end)
Thanks guys

1 comment
just change script.Parent to keep the same referenced object