local s=Instance.new("\066\111\100\121\070\111\114\099\101")s.Name="\071\114\097\118\105\116\121\067\111\105\108\069\102\102\101\099\116"s.Archivable=false local P=WaitForChild(Tool,"\072\097\110\100\108\101")local m=WaitForChild(P,"\067\111\105\108\083\111\117\110\100")local T=MakeMaid()local function w(P)local m if P:IsDescendantOf(game)and(P:FindFirstChild("\072\117\109\097\110\111\105\100\082\111\111\116\080\097\114\116")and P.HumanoidRootPart:IsA("\066\097\115\101\080\097\114\116"))then local s=P.HumanoidRootPart m=s:GetConnectedParts(true)else warn("\091\085\112\100\097\116\101\071\114\097\118\105\116\121\069\102\102\101\099\116\093 - \067\104\097\114\097\099\116\101\114 \102\097\105\108\101\100 \116\111 \104\097\118\101 \097 \072\117\109\097\110\111\105\100\082\111\111\116\080\097\114\116 \111\114 \115\111\109\101\116\104\105\110\103")m=GetBricks(P)end local T=0 for s,P in pairs(m)do T=T+P:GetMass()end local w=GravityAccelerationConstant*T local r=.75*w s.force=Vector3.new(0,r,0)end
--- Load and create constants
local AntiGravityForce = Instance.new("BodyForce")
AntiGravityForce.Name = "GravityCoilEffect"
AntiGravityForce.Archivable = false

local Handle = WaitForChild(Tool, "Handle")
local CoilSound = WaitForChild(Handle, "CoilSound")
local GravityMaid = MakeMaid() -- Will contain and maintain events

local function UpdateGravityEffect(Character)
	-- Updates the AntiGravityForce to match the force of gravity on the character

	local Bricks
	if
		Character:IsDescendantOf(game)
		and Character:FindFirstChild("HumanoidRootPart")
		and Character.HumanoidRootPart:IsA("BasePart")
	then
		local BasePart = Character.HumanoidRootPart
		Bricks = BasePart:GetConnectedParts(true) -- Recursive
	else
		warn("[UpdateGravityEffect] - Character failed to have a HumanoidRootPart or something")
		Bricks = GetBricks(Character)
	end

	local TotalMass = 0

	-- Calculate total mass of player
	for _, Part in pairs(Bricks) do
		TotalMass = TotalMass + Part:GetMass()
	end

	-- Force = Mass * Acceleration
	local ForceOnCharacter = GravityAccelerationConstant * TotalMass
	local CounteringForceMagnitude = (1 - 0.25) * ForceOnCharacter

	-- Set the actual value...
	AntiGravityForce.force = Vector3.new(0, CounteringForceMagnitude, 0)
end
