Tool.Equipped:connect(function()local I,B=GetCharacter(Tool)if I then GravityMaid.DescendantAddedConnection=I.DescendantAdded:connect(function()UpdateGravityEffect(I)end)GravityMaid.DecendantRemovingConnection=I.DescendantRemoving:connect(function()UpdateGravityEffect(I)end)UpdateGravityEffect(I)AntiGravityForce.Parent=Handle else warn("\091\071\114\097\118\105\116\121\067\111\105\108\093 - \083\111\109\101\104\111\119 \105\110\101\120\112\108\105\099\105\116\121 \102\097\105\108\101\100 \116\111 \114\101\116\114\105\101\118\101 \099\104\097\114\097\099\116\101\114")end end)Tool.Unequipped:connect(function()AntiGravityForce.Parent=nil GravityMaid:DoCleaning()end)

Tool.Equipped:connect(function()
	local Character, Player = GetCharacter(Tool)

	if Character then
		-- Connect events to recalculate gravity when hats are added or removed. Of course, this is not a perfect solution,
		-- as connected parts are not necessarily part of the character, but ROBLOX has no API to handle the changing of joints, and
		-- scanning the whole game for potential joints is really not worth the efficiency cost. 
		GravityMaid.DescendantAddedConnection = Character.DescendantAdded:connect(function()
			UpdateGravityEffect(Character)
		end)

		GravityMaid.DecendantRemovingConnection = Character.DescendantRemoving:connect(function()
			UpdateGravityEffect(Character)
		end)

		UpdateGravityEffect(Character)
		-- Add in the force
		AntiGravityForce.Parent = Handle
	else
		warn("[GravityCoil] - Somehow inexplicity failed to retrieve character")
	end
end)

Tool.Unequipped:connect(function()
	-- Remove force and clean up events
	AntiGravityForce.Parent = nil
	GravityMaid:DoCleaning()
end)
