local N=script.Parent.Main.Base.HingeConstraint local C=script.Parent.Display.SurfaceGui.TextLabel local D=0 function Mode_Up()if D<max_mode then D=D+1 N.AngularVelocity=N.AngularVelocity+increment_speed C.Text=D end end function Mode_Down()if D>min_mode then D=D-1 N.AngularVelocity=N.AngularVelocity-increment_speed C.Text=D end end script.Parent.Button_Up.ClickDetector.mouseClick:connect(Mode_Up)script.Parent.Button_Down.ClickDetector.mouseClick:connect(Mode_Down)
--WARNING!
--DO NOT MODIFY THE CODE BELOW! (Unless you know what you're doing, in that case: Go nuts!)

local motor = script.Parent.Main.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)
