wait()local y=script.Parent._Motors:GetChildren()local P=script.Parent.Status.SurfaceGui.TextLabel for P=1,#y,1 do y[P].Value.HingeConstraint.MotorMaxAcceleration=maxAcceleration end function Increase()if tonumber(P.Text)<maxValue then for P=1,#y,1 do y[P].Value.HingeConstraint.AngularVelocity=y[P].Value.HingeConstraint.AngularVelocity+increment end P.Text=P.Text+1 end end function Decrease()if tonumber(script.Parent.Status.SurfaceGui.TextLabel.Text)>minValue then for P=1,#y,1 do y[P].Value.HingeConstraint.AngularVelocity=y[P].Value.HingeConstraint.AngularVelocity-increment end P.Text=P.Text-1 end end script.Parent.Increase.ClickDetector.MouseClick:Connect(Increase)script.Parent.Decrease.ClickDetector.MouseClick:Connect(Decrease)

wait()

local motors = script.Parent._Motors:GetChildren()
local uiLabel = script.Parent.Status.SurfaceGui.TextLabel

for i=1,#motors do
	motors[i].Value.HingeConstraint.MotorMaxAcceleration = maxAcceleration
end

function Increase()
	if tonumber(uiLabel.Text) < maxValue then
		for i=1, #motors do
			motors[i].Value.HingeConstraint.AngularVelocity = motors[i].Value.HingeConstraint.AngularVelocity + increment
		end
		uiLabel.Text = uiLabel.Text + 1
	end
end

function Decrease()
	if tonumber(script.Parent.Status.SurfaceGui.TextLabel.Text) > minValue then
		for i=1, #motors do
			motors[i].Value.HingeConstraint.AngularVelocity = motors[i].Value.HingeConstraint.AngularVelocity - increment
		end
		uiLabel.Text = uiLabel.Text - 1
	end
end


script.Parent.Increase.ClickDetector.MouseClick:Connect(Increase)
script.Parent.Decrease.ClickDetector.MouseClick:Connect(Decrease)
