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



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)
