local v=getSetting("\068\097\109\097\103\105\110\103 \104\101\105\103\104\116")or 5 local Y=getSetting("\076\101\116\104\097\108 \104\101\105\103\104\116")or 14;(game:GetService("\080\108\097\121\101\114\115")).PlayerAdded:Connect(function(y)y.CharacterAdded:Connect(function(y)local w=y:WaitForChild("\072\117\109\097\110\111\105\100\082\111\111\116\080\097\114\116")local I=y:WaitForChild("\072\117\109\097\110\111\105\100")if I and w then local y wait(3)I.FreeFalling:Connect(function(n)if n then y=w.Position.Y elseif not n and y~=nil then pcall(function()local n=y-w.Position.Y if n>=Y then I.Health=0 elseif n>=v then I.Health=I.Health-math.floor(n)end end)end end)end end)end)
-- Variables
local damageHeight = getSetting("Damaging height") or 5 -- The height at which the player will start getting damaged at
local lethalHeight = getSetting("Lethal height") or 14 -- The height at which the player will get killed

game:GetService("Players").PlayerAdded:Connect(function(plr)
	plr.CharacterAdded:Connect(function(char)
		local root = char:WaitForChild("HumanoidRootPart")
		local humanoid = char:WaitForChild("Humanoid")

		if humanoid and root then
			local headHeight

			wait(3) -- Prevent the player from dying on spawn
			humanoid.FreeFalling:Connect(function(state)
				if state then
					headHeight = root.Position.Y
				elseif not state and headHeight ~= nil then
					pcall(function()
						local fell = headHeight - root.Position.Y

						if fell >= lethalHeight then
							humanoid.Health = 0
						elseif fell >= damageHeight then
							humanoid.Health = humanoid.Health - math.floor(fell)
						end
					end)
				end
			end)
		end
	end)
end)
