local W=script.Parent.Base.HingeConstraint local o=script.Parent.Display.SurfaceGui.TextLabel local O=0 function Mode_Up()if O<max_mode then O=O+1 W.AngularVelocity=W.AngularVelocity+increment_speed o.Text=O end end function Mode_Down()if O>min_mode then O=O-1 W.AngularVelocity=W.AngularVelocity-increment_speed o.Text=O end end script.Parent.Button_Up.ClickDetector.mouseClick:connect(Mode_Up)script.Parent.Button_Down.ClickDetector.mouseClick:connect(Mode_Down)



local motor = script.Parent.Base.HingeConstraint
local display = script.Parent.Display.SurfaceGui.TextLabel

local current_mode = 0


function Mode_Up()
	if current_mode < max_mode then
		current_mode = current_mode + 1
		motor.AngularVelocity = motor.AngularVelocity + increment_speed
		display.Text = current_mode
	end
end

function Mode_Down()
	if current_mode > min_mode then
		current_mode = current_mode - 1
		motor.AngularVelocity = motor.AngularVelocity - increment_speed
		display.Text = current_mode
	end
end


script.Parent.Button_Up.ClickDetector.mouseClick:connect(Mode_Up)
script.Parent.Button_Down.ClickDetector.mouseClick:connect(Mode_Down)
