local Players = game:GetService("Players")
Players.PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function(character)
local humanoid = character:WaitForChild("Humanoid")
humanoid.Health = 50
end)
end)humanoid.Health = humanoid.Health - 10humanoid:TakeDamage(20)humanoid.Health = humanoid.Health + 20humanoid.MaxHealth = 200
humanoid.Health = 200script.Parent.Touched:Connect(function(hit)
local player = game.Players:GetPlayerFromCharacter(hit.Parent)
if player then
local humanoid = hit.Parent:FindFirstChild("Humanoid")
if humanoid then
humanoid.Health = humanoid.Health + 10
end
end
end)script.Parent.Touched:Connect(function(hit)
local player = game.Players:GetPlayerFromCharacter(hit.Parent)
if player then
local humanoid = hit.Parent:FindFirstChild("Humanoid")
if humanoid then
humanoid:TakeDamage(15)
end
end
end)