Here is the jist of what I have tried.
function duck()
weld=Instance.new("Weld", player.Character.Torso)
weld.Part0=player.Character.Torso
weld.Part1=player.Character.Head
weld.C0=CFrame.new(0,1,0)
weld2=Instance.new("Weld", player.Character.Torso)
weld2.Part0=player.Character.Torso
weld2.Part1=player.Character["Left Leg"]
weld2.C0=CFrame.new(-2,-1,-1)*CFrame.Angles(math.rad(-90),0,0)
weld3=Instance.new("Weld", player.Character.Torso)
weld3.Part0=player.Character.Torso
weld3.Part1=player.Character["Right Leg"]
weld3.C0=CFrame.new(2,-1,-1)*CFrame.Angles(math.rad(-90),0,0)
end
function unDuck()
local intPlayerHealth=player.Character.Humanoid.Health
weld.C0=CFrame.new(0,2,0)
weld2.C0=CFrame.new(-2,-2,0)*CFrame.Angles(math.rad(-90),0,0)
weld3.C0=CFrame.new(2,-2,0)*CFrame.Angles(math.rad(-90),0,0)
for i,v in pairs (player.Character.Torso:GetChildren()) do
if v:IsA("Weld") then v:Destroy() player.Character.Humanoid.Health=intPlayerHealth end
end
player.Character:MakeJoints()
player.Character.Humanoid.Health=intPlayerHealth
end

2 comments
Edit your post to use Lua code formatting (select the entire script and press the Lua button)
Thanks.