Plane gui system [w.i.p]

THIS MODULE WILL BE FREE

So I’ve been working on an plane UI system that turned out decent ig.
I’d like some feedback about what i could improve or add.

Generally i wanted the same functionality like on RFS which worked,
And is amazing however i do still think i can improve it.

VOLUME WARNING!

robloxapp-20230820-0958038.wmv (966.5 KB)

Little Peaks into the Code:

--// Slider Button 20, 50, Maximum Throttle Sound Effect Handler:

sliderbtn:GetPropertyChangedSignal('Text'):Connect(function()
	if sliderbtn.Text == "PWR \n20%" then
		local s = Instance.new('Sound', script)
		s.SoundId = "rbxassetid://14467225467"
		s:Play()
		spawn(function()
			wait(5)
			s:Destroy()
		end)
	elseif sliderbtn.Text == "PWR \n50%" then
		local s = Instance.new('Sound', script)
		s.SoundId = "rbxassetid://14467249891"
		s:Play()
		spawn(function()
			wait(5)
			s:Destroy()
		end)
	elseif sliderbtn.Text == "PWR \n100%" then
		local s = Instance.new('Sound', script)
		s.SoundId = "rbxassetid://14467256516"
		s:Play()
		spawn(function()
			wait(5)
			s:Destroy()
		end)
	end
end)

--// Little Part of the Engine Sound Handle:

game:GetService('TweenService'):Create(EngineSound, TweenInfo.new(3), {Volume = invertedSliderPercentage}):Play()
game:GetService('TweenService'):Create(EngineSound, TweenInfo.new(7), {Pitch = invertedSliderPercentage + 0.7}):Play()

The Engine Volume and pitch is based of the invertedSliderPercentage Value.
However on the pitch it will allways add the invertedSliderPercentage + 0.7
For a better sound quality, If that wouldn’t be there it would have a low pitch.

And the volume is suppose to be faster than the pitch so it feels like it is really
starting/preparing the engine and not just instantly get super loud.


Slider Handling Process:

--// I Really Couldn't find a better solution for this so if anyone has any ideas
--// Please let me know

spawn(function()
	RuS.RenderStepped:Connect(function(dt)
		if held then
			local MousePos = UIS:GetMouseLocation()
			local Pos = MousePos - rudBrakeSliderSizer.AbsolutePosition
			local BtnPos = rudBrakeSliderBtn.Parent.Position
			--rudBrakeSliderBtn.Parent.Position = UDim2.new(0, math.clamp(Pos.X, 0, rudBrakeSliderSizer.AbsoluteSize.X), BtnPos.Y.Scale, BtnPos.Y.Offset)
			game:GetService('TweenService'):Create(rudBrakeSliderBtn.Parent, TweenInfo.new(0.3), {Position = UDim2.new(0, math.clamp(Pos.X, 0, rudBrakeSliderSizer.AbsoluteSize.X), BtnPos.Y.Scale, BtnPos.Y.Offset)}):Play()
		end
	end)
end)

So far that’s all it, But here is a screenshot of the organization of the Gui:
image I Think this kind of organization is good enough.


I’m also thinking to add Tower commands as you saw in the video
and thought maybe smth like this:

twr connect (4 first digits of client’s user id)

So Basically it will connect you to the ATC.
and than maybe something like disconnect from the atc:

twr disconnect request (4 first digits of client’s user id)

The 4 digits of the clien’ts user id WILL ALLWAYS be their “Atc Callsign”
and if the user’s 4 digits of their user id is the same as someone elses than
their callsign will have their first letter at the last digit. basically for me it would be:

3516-i

And if it’s STILL THE SAME it’ll add the first and seccond and so on.
I doubt this method would fail and in worst senario just gennerate a random nummber
using math.random().

1 Like

Should use a function here as you reuse the same 7 lines with only the soundid changing.