-- This is the fall script, reading this is propably harder then most scripts, dont mess with this if you dont know how it works.
-- (You can edit the damage, but i advice you dont. the current one works the best.)


char = script.Parent
active = false
falld = script.Fall
falld.Parent = char.Torso
function onfall()
active = true
curr = 0
while active == true do
vel = char.Torso.Velocity.y
wait()
if vel > curr then
active = false
if curr < -80 then
char.Humanoid:TakeDamage((curr*curr)*0.004)
char.Torso.Fall:Play()
char.Torso.Velocity = char.Torso.Velocity * 0
end
else
curr = vel
end
end
end

char.Humanoid.FreeFalling:connect(function()
if active == false then
onfall()
end
end)
