function CreateMotor()PARENTMODEL.Motors.MotorBlock1.Anchored=false local s=Instance.new("\077\111\116\111\114")s.Parent=PARENTMODEL.Motors s.Part0,s.Part1,s.MaxVelocity=PARENTMODEL.Motors.MotorBlock0,PARENTMODEL.Motors.MotorBlock1,.01 end function WeldToObject(s,W)for s,c in pairs(s)do local E=Instance.new("\087\101\108\100\067\111\110\115\116\114\097\105\110\116")E.Parent,E.Name=c,"\087\101\108\100"E.Part0,E.Part1=c,W c.Anchored=false end end function MoveGate()if OPEN==false then PARENTMODEL.Motors.Motor.DesiredAngle,OPEN=math.rad(-OPENINGANGLE),true else PARENTMODEL.Motors.Motor.DesiredAngle,OPEN=0,false end end


function CreateMotor()
	PARENTMODEL.Motors.MotorBlock1.Anchored = false
	
	local motor = Instance.new("Motor")
	motor.Parent = PARENTMODEL.Motors
	motor.Part0, motor.Part1, motor.MaxVelocity = PARENTMODEL.Motors.MotorBlock0, PARENTMODEL.Motors.MotorBlock1, 0.01
end


function WeldToObject(group, obj)
	for _, v in pairs(group) do
		local weld = Instance.new("WeldConstraint")
		weld.Parent, weld.Name = v, "Weld"
		weld.Part0, weld.Part1 = v, obj
		v.Anchored = false
	end
end

function MoveGate()
	if OPEN == false then
		PARENTMODEL.Motors.Motor.DesiredAngle, OPEN = math.rad(-OPENINGANGLE), true
		
	else
		PARENTMODEL.Motors.Motor.DesiredAngle, OPEN = 0, false
	end

end

