coroutine.resume(coroutine.create(function()
		if Flying then
			repeat
				wait(0.1)
				Fuel = Fuel - 1
				fgui.GUI.Size = UDim2.new(0.3 * (Fuel/MaxFuel), 0, 0.02, 0)
			until Fuel <= 0
			fgui.GUI.Size = UDim2.new(0, 0, 0.02, 0)
		else
			if Fuel <= 0 then
				c.Torso.BodyGyro.D = 100
				c.Torso.BodyGyro.MaxTorque = Vector3.new(5000, 5000, 5000)
				c.Torso.BodyGyro.P = 100
				c.Torso.BodyVelocity.MaxForce = Vector3.new(0, 100000, 0)
				c.Torso.BodyVelocity.P = 100
				c.Torso.BodyVelocity.Velocity = Vector3.new(0, -3, 0)
			end
		end
	end))

8 comments

0

Use code block please, Click the blue button above the text box that says "Lua" .

0

?

0

did it

0

BTW This is under a UserInputService function

0

Not home right now, but instead of typing else, and then if, merge it into elseif this way it will fall to that if the first function doesn't work.

0

No I have to still press the button again to go the second function

0

Your title doesn't make any sense, so we definitely need an explanation. You generally should >always< have an explanation when either asking or answering. https://scriptinghelpers.org/help/how-post-good-questions-answers

0

No it does make sense first function is the repeat and second function is when the variable is <= 0