local c=script:WaitForChild("\099\114\101\097\116\101\084\119\101\101\110\073\110\100\105\099\097\116\111\114")function c.OnServerInvoke(c,f,V)local Y=nil if not f:findFirstChild("\116\119\101\101\110\067\111\100\101")then Y=Instance.new("\073\110\116\086\097\108\117\101")Y.Name="\116\119\101\101\110\067\111\100\101"Y.Value=V Y.Parent=f else Y=f.tweenCode Y.Value=V end return Y end local f=script:WaitForChild("\108\101\114\112\067\070")function f.OnServerInvoke(c,f,V,Y,W,y)spawn(function()f[V]=Y:lerp(W,y)end)end local V=script:WaitForChild("\100\101\108\101\116\101\084\119\101\101\110\073\110\100\105\099\097\116\111\114")function V.OnServerInvoke(c,f,V)if f.Value==V then f:Destroy()end end


local createTweenIndicator = script:WaitForChild("createTweenIndicator")
function createTweenIndicator.OnServerInvoke(_, Joint, newCode)
	local tweenIndicator = nil
	if (not Joint:findFirstChild("tweenCode")) then --If the joint isn't being tweened, then
		tweenIndicator = Instance.new("IntValue")
		tweenIndicator.Name = "tweenCode"
		tweenIndicator.Value = newCode
		tweenIndicator.Parent = Joint
	else
		tweenIndicator = Joint.tweenCode
		tweenIndicator.Value = newCode --If the joint is already being tweened, this will change the code, and the tween loop will stop
	end
	return tweenIndicator
end

local lerpCF = script:WaitForChild("lerpCF")
function lerpCF.OnServerInvoke(_, Joint, Prop, startCF, endCF, Alpha)
	spawn(function()
		Joint[Prop] = startCF:lerp(endCF, Alpha)
	end)
end

local deleteTweenIndicator = script:WaitForChild("deleteTweenIndicator")
function deleteTweenIndicator.OnServerInvoke(_, tweenIndicator, newCode)
	if tweenIndicator.Value == newCode then --If this tween functions was the last one called on a joint then it will remove the code
		tweenIndicator:Destroy()
	end
end
