local I=script.Parent local B=I:WaitForChild("\072\117\109\097\110\111\105\100\082\111\111\116\080\097\114\116")local E=I:WaitForChild("\072\117\109\097\110\111\105\100")local i=4 local D=game.Workspace.Village.Radius.Value while true do wait(1)if B.Position.Magnitude<D/2 and E.Health>0 then E.Health=E.Health-math.floor((i/100)*E.MaxHealth+1)tmp=Instance.new("\070\105\114\101")tmp.Color=Color3.fromRGB(236,139,70)tmp.Heat=1 tmp.Size=10 tmp.Parent=B wait(2)tmp:Destroy()end end

local Figure = script.Parent
local Head = Figure:WaitForChild("HumanoidRootPart")
local Humanoid = Figure:WaitForChild("Humanoid")
local regening = 4
local radius=game.Workspace.Village.Radius.Value

while true do
	wait(1)
	-- print( Head.Position.Magnitude)
	if Head.Position.Magnitude < radius/2 and Humanoid.Health > 0 then
		-- print("Пришёл")
		Humanoid.Health = Humanoid.Health - math.floor( regening/100*Humanoid.MaxHealth + 1 )
		-- добавляем эффект огня
		tmp = Instance.new("Fire")
		tmp.Color=Color3.fromRGB(236,139,70)
		tmp.Heat=1
		tmp.Size=10
		tmp.Parent=Head
		wait(2) -- самоуничтожение через 2 секунды
		tmp:Destroy()
	end	
end
