Run it
Copy the script and paste it into your executor.
Players = :()
RunService = :()
UIS = :()
TweenS = :()
Player = Players.LocalPlayer
PlayerGui = Player:()
_, name ({,})
PlayerGui:(name) PlayerGui[name]:()
Airports = {
{ name=, runways={
{ name=, threshold=.(-,,), heading= },
{ name=, threshold=.(-,,), heading= },
}},
{ name=, runways={
{ name=, threshold=.(,,-), heading= },
{ name=, threshold=.(,,-), heading= },
}},
{ name=, runways={
{ name=, threshold=.(-,,-),heading= },
{ name=, threshold=.(-,,-),heading= },
}},
}
AP = {
active = ,
phase = ,
depRunway = ,
arrRunway = ,
aircraft = ,
rootPart = ,
CRUISE_ALT = ,
CRUISE_SPD = ,
TAKEOFF_SPD = ,
LANDING_SPD = ,
CLIMB_PITCH = ,
}
waypoints, wpIndex = {},
bvel, bgyro = ,
spd =
hbConn =
(deg)
r = .(deg)
.(.(r), , .(r))
(a, b)
.(a.X-b.X, , a.Z-b.Z).Magnitude
(key)
(()
VIM = :()
VIM:(, .KeyCode[key], , )
.()
VIM:(, .KeyCode[key], , )
)
(vel, lookDir)
bvel bvel.Parent bvel.Velocity = vel
bgyro bgyro.Parent
lookDir.Magnitude >
bgyro.CFrame = .(.(), lookDir.Unit)
() AP.rootPart AP.rootPart.Position.Y
()
waypoints = {}
wpIndex =
dep = AP.depRunway
arr = AP.arrRunway
alt = AP.CRUISE_ALT
depDir = (dep.heading)
arrDir = (arr.heading)
climbOut = dep.threshold + depDir *
climbOut = .(climbOut.X, alt, climbOut.Z)
finalLeg = arr.threshold - arrDir *
finalLeg = .(finalLeg.X, alt, finalLeg.Z)
descentStart= arr.threshold - arrDir *
descentStart = .(descentStart.X, alt, descentStart.Z)
.(waypoints, { pos=climbOut, onArrive=() spd=AP.CRUISE_SPD })
.(waypoints, { pos=finalLeg, onArrive=() })
.(waypoints, { pos=descentStart, onArrive=()
AP.phase = ; spd = AP.LANDING_SPD
.(() (); .(); () )
})
(reason)
AP.active = ; AP.phase =
hbConn hbConn:(); hbConn =
bvel bvel.Parent bvel:(); bvel =
bgyro bgyro.Parent bgyro:(); bgyro =
( .. (reason ))
()
spd = ; wpIndex =
hbConn hbConn:()
hbConn = RunService.Heartbeat:((dt)
AP.active hbConn:(); hbConn = ;
AP.rootPart AP.rootPart.Parent
char = Player.Character
char
hum = char:()
hum hum.SeatPart
AP.aircraft = hum.SeatPart.Parent
AP.rootPart = AP.aircraft:()
AP.aircraft:()
AP.aircraft:()
hum.SeatPart
bvel bvel.Parent
(()
bvel = .()
bvel.MaxForce = .(,,)
bvel.Velocity = .(,,)
bvel.P =
bvel.Parent = AP.rootPart
);
bgyro bgyro.Parent
(()
bgyro = .()
bgyro.MaxTorque = .(,,)
bgyro.P = ; bgyro.D =
bgyro.CFrame = AP.rootPart.CFrame
bgyro.Parent = AP.rootPart
);
pos = AP.rootPart.Position
alt = ()
arrThr = AP.arrRunway.threshold
arrDir = (AP.arrRunway.heading)
depDir = (AP.depRunway.heading)
AP.phase ==
spd = .(spd + .(AP.TAKEOFF_SPD*,)*dt, AP.TAKEOFF_SPD)
pitchY = .(.(AP.CLIMB_PITCH))
moveDir = (depDir + .(,pitchY,)).Unit
(moveDir*spd, moveDir)
alt >= AP.CRUISE_ALT
AP.phase = ; spd = AP.CRUISE_SPD
.(() () )
AP.phase ==
wpIndex > #waypoints AP.phase=; spd=AP.LANDING_SPD;
wp = waypoints[wpIndex]
d2D = (pos, wp.pos)
toTarget = .(wp.pos.X-pos.X, , wp.pos.Z-pos.Z)
hDir = d2D > toTarget.Unit arrDir
altErr = wp.pos.Y - alt
yComp = .(altErr*, -, )
((hDir + .(,yComp,)).Unit * AP.CRUISE_SPD, hDir)
d2D <
wp.(); wpIndex = wpIndex +
AP.phase ==
spd = AP.LANDING_SPD
toThr = .(arrThr.X-pos.X, , arrThr.Z-pos.Z)
hDir = toThr.Magnitude > toThr.Unit arrDir
heightAbove = alt - arrThr.Y
dThresh = (pos, arrThr)
sinkY = dThresh > -.(heightAbove/dThresh, , )
heightAbove < sinkY = .(sinkY,-)
heightAbove < sinkY = .(sinkY,-)
heightAbove < sinkY = .(sinkY,-)
heightAbove < sinkY =
((hDir + .(,sinkY,)).Unit * spd, hDir)
heightAbove <= (dThresh < heightAbove < )
AP.phase =
.(() () )
AP.phase ==
toThr = .(arrThr.X-pos.X, , arrThr.Z-pos.Z)
hDir = toThr.Magnitude > toThr.Unit arrDir
spd = .(spd - .(AP.LANDING_SPD*,)*dt, )
(hDir*spd, hDir)
spd <=
(.(,,), hDir)
.(() (); .(); () )
()
)
()
AP.active ,
AP.depRunway ,
AP.arrRunway ,
char = Player.Character
char ,
hum = char:()
hum hum.SeatPart ,
ac = hum.SeatPart.Parent
root = ac:() ac:()
ac:() hum.SeatPart
AP.aircraft = ac; AP.rootPart = root
AP.active = ; AP.phase =
bvel bvel.Parent bvel:()
bgyro bgyro.Parent bgyro:()
bvel = .()
bvel.MaxForce = .(,,); bvel.Velocity = .(,,); bvel.P =
bvel.Parent = root
bgyro = .()
bgyro.MaxTorque = .(,,); bgyro.P = ; bgyro.D =
bgyro.CFrame = root.CFrame; bgyro.Parent = root
depDir = (AP.depRunway.heading)
spawnPos = AP.depRunway.threshold - depDir *
spawnPos = .(spawnPos.X, AP.depRunway.threshold.Y+, spawnPos.Z)
ok = (() ac:(.(spawnPos, spawnPos+depDir)) )
ok
offset = spawnPos - root.Position
_, p (ac:())
p:() p.CFrame = p.CFrame + offset
()
.()
.(() (); .(); () )
.()
()
,
Player.CharacterAdded:(()
AP.active ()
)
C = {
bg = .(, , ),
panel = .(, , ),
panelB = .(, , ),
border = .(, , ),
borderHi = .(, , ),
green = .(, , ),
greenD = .(, , ),
cyan = .(, , ),
cyanD = .(, , ),
amber = .(, , ),
amberD = .(, , ),
red = .(, , ),
redD = .(, , ),
white = .(, , ),
dim = .(, , ),
sky = .(, , ),
skyHi = .(, , ),
ground = .(, , ),
groundHi = .(, , ),
magenta = .(, , ),
}
(parent, sx, sy, ox, oy, px, py, popx, popy, col, transp, zi)
f = .()
f.Size = .(sx , ox , sy , oy )
f.Position = .(px , popx , py , popy )
(col) ==
f.BackgroundColor3 = col
f.BackgroundColor3 = C.panel
f.BackgroundTransparency = ((transp) == ) transp
f.BorderSizePixel =
f.ZIndex = ((zi) == ) zi
f.Parent = parent
f
(parent, text, ts, col, font, xa, sx, sy, ox, oy, px, py, popx, popy, zi)
l = .()
l.Text = text
l.TextSize = ts
l.TextColor3 = col C.white
l.Font = font .Font.Code
l.BackgroundTransparency =
l.TextXAlignment = xa .TextXAlignment.Center
l.Size = .(sx , ox , sy , oy )
l.Position = .(px , popx , py , popy )
l.ZIndex = zi
l.Parent = parent
l
(parent, text, ts, col, bgcol, sx, sy, ox, oy, px, py, popx, popy, zi)
b = .()
b.Text = text
b.TextSize = ts
b.TextColor3 = col C.white
b.Font = .Font.GothamBold
b.BackgroundColor3 = bgcol C.panel
b.BorderSizePixel =
b.AutoButtonColor =
b.Size = .(sx , ox , sy , oy )
b.Position = .(px , popx , py , popy )
b.ZIndex = zi
b.Parent = parent
b
(inst, r)
c = .()
c.CornerRadius = .(, r )
c.Parent = inst
(inst, col, thick)
s = .()
s.Color = col C.border
s.Thickness = thick
s.Parent = inst
(handle, target)
drag, ds, sp = , ,
handle.InputBegan:((i)
i.UserInputType == .UserInputType.MouseButton1
drag=; ds=i.Position; sp=target.Position
)
handle.InputEnded:((i)
i.UserInputType == .UserInputType.MouseButton1 drag=
)
UIS.InputChanged:((i)
drag i.UserInputType == .UserInputType.MouseMovement
d = i.Position - ds
target.Position = .(sp.X.Scale, sp.X.Offset+d.X, sp.Y.Scale, sp.Y.Offset+d.Y)
)
sg = .()
sg.Name =
sg.ResetOnSpawn =
sg.ZIndexBehavior = .ZIndexBehavior.Sibling
sg.DisplayOrder =
sg.Parent = PlayerGui
HW, HH = ,
TH =
SPD_W =
ALT_W =
PFD_W = HW - SPD_W - ALT_W -
PFD_H = HH - TH -
ND_W =
AI_W = PFD_W - ND_W -
hud = (sg, , , HW, HH, , , -HW/, -HH-, C.bg, , )
(hud, )
(hud, C.borderHi, )
hudTitle = (hud, , , , TH, , , , , .(,,), , )
(hudTitle, )
(hudTitle, , , C.cyan, .Font.GothamBold)
hudClose = (hud, , , C.white, C.redD, , , , , , , -, , )
(hudClose, )
(hudClose, C.red, )
hudC = (hud, , , -, -(TH+), , , , TH+, .(,,), , )
spdPanel = (hudC, , , SPD_W, , , , , , .(,,), , )
(spdPanel, )
(spdPanel, .(,,), )
(spdPanel, , , C.greenD, .Font.GothamBold, , , , , , , , , , )
(spdPanel, , , C.greenD, .Font.GothamBold, , , , , , , , , -, )
spdBox = (spdPanel, , , -, , , , , , .(,,), , )
spdBox.Position = .(, , , -)
(spdBox, )
(spdBox, C.green, )
spdVal = (spdBox, , , C.green, .Font.Code, , , , , , , , , , )
spdTickContainer = (spdPanel, , , , -, , , , , .(,,), , )
spdTickContainer.ClipsDescendants =
i = ,
v = i *
yPct = - (v / )
major = v % ==
= (spdTickContainer, , , major , ,
, , -(major ), ,
, yPct, , -,
major .(,,) .(,,), , )
major
(spdTickContainer, (v), , .(,,), .Font.Code,
.TextXAlignment.Right,
, , SPD_W-, , , yPct, , -, )
spdPtr = (spdPanel, , , -, , , , , -, C.green, , )
altPanel = (hudC, , , ALT_W, , , , -ALT_W, , .(,,), , )
(altPanel, )
(altPanel, .(,,), )
(altPanel, , , C.cyanD, .Font.GothamBold, , , , , , , , , , )
(altPanel, , , C.cyanD, .Font.GothamBold, , , , , , , , , -, )
altBox = (altPanel, , , -, , , , , , .(,,), , )
altBox.Position = .(, , , -)
(altBox, )
(altBox, C.cyan, )
altVal = (altBox, , , C.cyan, .Font.Code, , , , , , , , , , )
altTickContainer = (altPanel, , , , -, , , , , .(,,), , )
altTickContainer.ClipsDescendants =
i = ,
v = i *
yPct = - (v / )
major =
(altTickContainer, , , , , , yPct, , -, .(,,), , )
(altTickContainer, (v), , .(,,), .Font.Code,
.TextXAlignment.Left,
, , ALT_W-, , , yPct, , -, )
altPtr = (altPanel, , , -, , , , , -, C.cyan, , )
pfdArea = (hudC, , , PFD_W, , , , SPD_W+, , .(,,), , )
aiW = AI_W
ai = (pfdArea, , , aiW, , , , , , C.sky, , )
(ai, )
ai.ClipsDescendants =
skyTop = (ai, , , , , , , , , .(, , ), , )
skyBot = (ai, , , , , , , , , .(, , ), , )
gndTop = (ai, , , , , , , , , .(, , ), , )
gndBot = (ai, , , , , , , , , .(, , ), , )
gndBot.AnchorPoint = .(, )
horizLine = (ai, , , , , , , , -, C.amber, , )
_, deg ({-,-,-,,,})
yBase = - (deg * )
w = .(deg) >=
pl = (ai, w, , , , (-w)/, yBase, , , .(,,), , )
(ai, .(,deg), , .(,,), .Font.Code,
.TextXAlignment.Right,
, , (-w)/*aiW - , ,
, yBase, , -, )
(ai, .(,deg), , .(,,), .Font.Code,
.TextXAlignment.Left,
, , (-w)/*aiW - , ,
(+w)/, yBase, , -, )
wL = (ai, , , , , , , -, -, .(,,), , )
wR = (ai, , , , , , , , -, .(,,), , )
wDot = (ai, , , , , , , -, -, .(,,), , )
(wDot, )
wTail = (ai, , , , , , , -, -, .(,,), , )
fpvFrame = (ai, , , , , , , -, -, .(,,), , )
fpvCircle = (fpvFrame, , , , , , , , , .(,,), , )
(fpvCircle, C.green, )
(fpvCircle, )
(fpvFrame, , , , , , , , , .(,,), , )
(fpvFrame, , , , , , , -, , .(,,), , )
(fpvFrame, , , , , , , , -, .(,,), , )
hdgStripH =
hdgStrip = (pfdArea, , , aiW, hdgStripH, , , , -hdgStripH, .(,,), , )
(hdgStrip, C.border, )
(hdgStrip, )
i = ,
deg = i *
xPct = deg /
major = deg % ==
(hdgStrip, , , , major ,
xPct, , , ,
major .(,,) .(,,), , )
major
dirs = {[]=,[]=,[]=,[]=}
txt = dirs[deg] (deg)
(hdgStrip, txt, , .(,,), .Font.Code,
, , , , , xPct, , -, , )
hdgPtr = (hdgStrip, , , , , , , -, , C.cyan, , )
hdgReadBox = (hdgStrip, , , , -, , , -, , .(,,), , )
(hdgReadBox, )
(hdgReadBox, C.cyan, )
hdgRead = (hdgReadBox, , , C.cyan, .Font.Code, , , , , , , , , , )
topStrip = (pfdArea, , , aiW, , , , , , .(,,), , )
(topStrip, )
pitchRead = (topStrip, , , C.amber, .Font.Code,
.TextXAlignment.Left, , , , , , , , , )
vsRead = (topStrip, , , C.green, .Font.Code,
.TextXAlignment.Right, , , , , , , -, , )
ndX = aiW +
nd = (pfdArea, , , ND_W, , , , ndX, , .(,,), , )
(nd, )
(nd, C.border, )
(nd, , , C.cyan, .Font.GothamBold, , , , , , , , , , )
compassR =
compassCX = ND_W /
compassCY = + compassR +
compassBG = (nd, , , compassR*, compassR*, , , -compassR, , .(,,), , )
(compassBG, compassR)
(compassBG, .(,,), )
compassGlow = (nd, , , compassR*+, compassR*+, , , -compassR-, , .(,,), , )
(compassGlow, compassR+)
(compassGlow, .(,,), )
cardinals = {
{t=, a=, c=C.cyan},
{t=, a=, c=C.white},
{t=, a=, c=C.white},
{t=, a=, c=C.white},
}
_, cd (cardinals)
r2 = .(cd.a)
cx = .(r2) * (compassR-)
cy = -.(r2) * (compassR-)
(compassBG, cd.t, , cd.c, .Font.GothamBold,
, , , , ,
, , cx-, cy-, )
i = ,
deg2 = i *
r2 = .(deg2)
major2 = deg2 % ==
r_in = compassR - (major2 )
r_out = compassR -
tx = .(r2) * (r_in + (r_out-r_in)/)
ty = -.(r2) * (r_in + (r_out-r_in)/)
tickDot = (compassBG, , , major2 , major2 ,
, , tx-, ty-,
major2 .(,,) .(,,), , )
planeIcon = (compassBG, , , C.white, .Font.GothamBold,
, , , , , , , -, -, )
needleFrame = (compassBG, , , , , , , , , .(,,), , )
needle = (needleFrame, , , , compassR-, , , -, -(compassR-), C.cyan, , )
ndHdgLbl = (nd, , , C.cyan, .Font.Code,
, , , , , , , , compassR*+, )
ndDestLbl = (nd, , , C.green, .Font.Code,
, , , , , , , , compassR*+, )
ndWPLbl = (nd, , , C.amber, .Font.Code,
, , , , , , , , compassR*+, )
ndPhaseLbl = (nd, , , C.red, .Font.GothamBold,
, , , , , , , , compassR*+, )
barH =
bar = (hud, , , , barH, , , , -barH-, .(,,), , )
(bar, )
(bar, C.border, )
barCells = {
{k=, l=, c=C.green},
{k=, l=, c=C.cyan},
{k=, l=, c=C.amber},
{k=, l=, c=.(,,)},
{k=, l=, c=C.magenta},
{k=, l=, c=C.dim},
{k=, l=, c=C.dim},
}
barVals = {}
cw = HW / #barCells
i, cell (barCells)
cx = (i-)*cw
bg = (bar, , , cw-, -, , , cx+, , .(,,), , )
(bg, )
(bg, cell.l, , C.dim, .Font.GothamBold, , , , , , , , , , )
barVals[cell.k] = (bg, , , cell.c, .Font.Code,
, , , , , , , , , )
i < #barCells
(bar, , , , -, , , cx+cw, , C.border, , )
hudClose.MouseButton1Click:(() hud.Visible = )
(hudTitle, hud)
MENU_W =
menuVisible =
menuPanel = (sg, , , MENU_W, , , , , -, C.bg, , )
menuPanel.Visible =
(menuPanel, )
(menuPanel, C.borderHi, )
menuTitle = (menuPanel, , , , , , , , , .(,,), , )
(menuTitle, )
(menuTitle, , , C.cyan, .Font.GothamBold, , , , , , , , , , )
(menuTitle, menuPanel)
menuClose = (menuPanel, , , C.white, C.redD, , , , , , , -, , )
(menuClose, )
tabs = {,,,}
tabBtns = {}
tabContents = {}
activeTab =
tabBar = (menuPanel, , , , , , , , , .(,,), , )
tabContentArea = (menuPanel, , , , -, , , , , .(,,), , )
i, name (tabs)
tw = MENU_W / #tabs
tbtn = (tabBar, name, , C.dim, .(,,),
, , tw-, , , , (i-)*tw+, , )
(tbtn, )
.(tabBtns, tbtn)
tc = (tabContentArea, , , , , , , , , .(,,), , )
tc.Visible = (i == )
.(tabContents, tc)
tbtn.MouseButton1Click:(()
j, tb (tabBtns)
tb.BackgroundColor3 = (j==i) .(,,) .(,,)
tb.TextColor3 = (j==i) C.cyan C.dim
tabContents[j].Visible = (j==i)
activeTab = i
)
tabBtns[].BackgroundColor3 = .(,,)
tabBtns[].TextColor3 = C.cyan
(parent, yOff)
sf = .()
sf.Size = .(, -, , -(yOff ))
sf.Position = .(, , , yOff )
sf.BackgroundTransparency =
sf.BorderSizePixel =
sf.ScrollBarThickness =
sf.ScrollBarImageColor3 = C.cyanD
sf.CanvasSize = .(,,,)
sf.AutomaticCanvasSize = .AutomaticSize.Y
sf.Parent = parent
layout = .()
layout.SortOrder = .SortOrder.LayoutOrder
layout.Padding = .(, )
layout.Parent = sf
sf
(parent, initText, col)
f = (parent, , , -, , , , , , .(,,), , )
(f, )
(f, C.border, )
l = (f, initText, , col C.dim, .Font.Code, .TextXAlignment.Left,
, , -, , , , , , )
f.Parent = parent
l, f
(parent, apName, rwy, isArr)
btnF = (parent, , , -, , , , , , .(,,), , )
(btnF, )
(btnF, C.border, )
lbl = .(, rwy.name, rwy.heading)
lb = (btnF, lbl, , C.white, .Font.Code, .TextXAlignment.Left,
, , -, , , , , , )
clickBtn = (btnF, , , C.white, .(,,),
, , , , , , , , )
clickBtn.BackgroundTransparency =
clickBtn.MouseButton1Click:(()
isArr
AP.arrRunway = rwy
AP.depRunway = rwy
origCol = btnF.BackgroundColor3
TweenS:(btnF, TweenInfo.(), {BackgroundColor3 = isArr C.cyanD C.greenD}):()
.(, ()
TweenS:(btnF, TweenInfo.(), {BackgroundColor3 = origCol}):()
)
)
btnF
depScroll = (tabContents[])
depSelLabel
hdr = (depScroll, , , , , , , , , .(,,), , )
(hdr, )
(hdr, , , C.dim, .Font.GothamBold)
_, f2 = (depScroll, , C.amber)
depSelLabel = (f2, , , C.amber, .Font.Code, .TextXAlignment.Left,
, , -, , , , , , )
_, ap (Airports)
secHdr = (depScroll, , , , , , , , , .(,,), , )
(secHdr, )
(secHdr, .. ap.name, , C.cyan, .Font.GothamBold, .TextXAlignment.Left,
, , -, , , , , , )
_, rwy (ap.runways)
bf = (depScroll, ap.name, rwy, )
bf:().MouseButton1Click:(()
depSelLabel.Text = .. ap.name .. .. rwy.name
depSelLabel.TextColor3 = C.green
)
arrScroll = (tabContents[])
arrSelLabel
hdr = (arrScroll, , , , , , , , , .(,,), , )
(hdr, )
(hdr, , , C.dim, .Font.GothamBold)
_, f2 = (arrScroll, , C.amber)
arrSelLabel = (f2, , , C.amber, .Font.Code, .TextXAlignment.Left,
, , -, , , , , , )
_, ap (Airports)
secHdr = (arrScroll, , , , , , , , , .(,,), , )
(secHdr, )
(secHdr, .. ap.name, , C.cyan, .Font.GothamBold, .TextXAlignment.Left,
, , -, , , , , , )
_, rwy (ap.runways)
bf = (arrScroll, ap.name, rwy, )
bf:().MouseButton1Click:(()
arrSelLabel.Text = .. ap.name .. .. rwy.name
arrSelLabel.TextColor3 = C.cyan
)
scroll = (tabContents[])
(parent, label, min, max, default, suffix, callback)
grp = (parent, , , , , , , , , .(,,), , )
(grp, )
(grp, C.border, )
(grp, label, , C.dim, .Font.GothamBold, .TextXAlignment.Left,
, , -, , , , , , )
valLbl = (grp, (default)..suffix, , C.cyan, .Font.Code,
.TextXAlignment.Right, , , , , , , -, , )
track = (grp, , , -, , , , , , .(,,), , )
(track, )
fill = (track, , , , , , , , , C.cyanD, , )
(fill, )
thumb = (track, , , , , , , -, -, C.cyan, , )
(thumb, )
(v)
v = .(.(v), min, max)
pct = (v-min)/(max-min)
fill.Size = .(pct, , , )
thumb.Position = .(pct, -, , -)
valLbl.Text = (v)..suffix
callback (v)
(default)
draggingSlider =
thumb.InputBegan:((i)
i.UserInputType == .UserInputType.MouseButton1
draggingSlider =
)
UIS.InputEnded:((i)
i.UserInputType == .UserInputType.MouseButton1
draggingSlider =
)
UIS.InputChanged:((i)
draggingSlider i.UserInputType == .UserInputType.MouseMovement
rect = track.AbsolutePosition
w = track.AbsoluteSize.X
pct = .((i.Position.X - rect.X) / w, , )
(min + pct*(max-min))
)
track.InputBegan:((i)
i.UserInputType == .UserInputType.MouseButton1
w = track.AbsoluteSize.X
pct = .((i.Position.X - track.AbsolutePosition.X) / w, , )
(min + pct*(max-min))
)
grp
(scroll, , , , , , (v) AP.TAKEOFF_SPD=v )
(scroll, , , , , , (v) AP.CRUISE_SPD=v )
(scroll, , , , , , (v) AP.LANDING_SPD=v )
(scroll, , , , , , (v) AP.CRUISE_ALT=v )
(scroll, , , , , , (v) AP.CLIMB_PITCH=v )
scroll = (tabContents[])
(parent, placeholder, callback)
box = .()
box.Size = .(, -, , )
box.Position = .(, , , )
box.PlaceholderText = placeholder
box.Text =
box.TextSize =
box.Font = .Font.Code
box.TextColor3 = C.white
box.PlaceholderColor3 = C.dim
box.BackgroundColor3 = .(,,)
box.BorderSizePixel =
box.ClearTextOnFocus =
box.ZIndex =
box.Parent = parent
(box, )
(box, C.border, )
box.FocusLost:(() callback (box.Text) )
box
recApName, recRwyName = ,
livePosLbl, lastSaveLbl
hdr1 = (scroll, , , , , , , , , .(,,), , )
(hdr1, )
(hdr1, , , C.dim, .Font.GothamBold)
(scroll, , (t) t~= recApName=t )
(scroll, , (t) t~= recRwyName=t )
posF = (scroll, , , , , , , , , .(,,), , )
(posF, )
livePosLbl = (posF, , , C.dim, .Font.Code, .TextXAlignment.Left,
, , -, , , , , , )
saveBtn = (scroll, , , C.green, .(,,),
, , -, , , , , , )
(saveBtn, )
(saveBtn, C.green, )
lastF = (scroll, , , , , , , , , .(,,), , )
(lastF, )
lastSaveLbl = (lastF, , , C.dim, .Font.Code, .TextXAlignment.Left,
, , -, , , , , , )
saveBtn.MouseButton1Click:(()
(()
char = Player.Character
char
hrp = char:()
hrp
cam = :().CurrentCamera
flat = .(cam.CFrame.LookVector.X, , cam.CFrame.LookVector.Z).Unit
hdg = .(.(flat.X, flat.Z))
hdg < hdg = hdg +
pos = hrp.Position
thr = .(.(pos.X*)/, .(pos.Y*)/, .(pos.Z*)/)
newRwy = { name=recRwyName, threshold=thr, heading=.(hdg*)/ }
oppHdg = (hdg+)%
rwyNum = (recRwyName:())
oppNum = rwyNum ((rwyNum+)%+)
oppName = oppNum .(,oppNum) (recRwyName..)
oppRwy = { name=oppName, threshold=thr, heading=.(oppHdg*)/ }
apFound
_, ap (Airports)
ap.name==recApName apFound=ap;
apFound
apFound = { name=recApName, runways={} }
.(Airports, apFound)
.(apFound.runways, newRwy)
.(apFound.runways, oppRwy)
_, isArr ({, })
scr = isArr arrScroll depScroll
secHdr = (scr, , , , , , , , , .(,,), , )
(secHdr, )
(secHdr, ..recApName, , C.cyan, .Font.GothamBold, .TextXAlignment.Left,
, , -, , , , , , )
_, rwy2 ({newRwy, oppRwy})
(scr, recApName, rwy2, isArr)
lastSaveLbl.Text = .(,
recApName, recRwyName, oppName, hdg, oppHdg)
lastSaveLbl.TextColor3 = C.green
)
)
.(()
.()
(()
char = Player.Character
char
hrp = char:()
hrp
cam = :().CurrentCamera
flat = .(cam.CFrame.LookVector.X, , cam.CFrame.LookVector.Z).Unit
hdg = .(.(flat.X, flat.Z))
hdg < hdg = hdg +
p = hrp.Position
livePosLbl.Text = .(, p.X, p.Y, p.Z, hdg)
)
)
AP_W, AP_H = ,
apMenu = (sg, , , AP_W, AP_H, , , , -AP_H/, C.bg, , )
apMenu.Visible =
(apMenu, )
(apMenu, C.borderHi, )
apMenuTitle = (apMenu, , , , , , , , , .(,,), , )
(apMenuTitle, )
(apMenuTitle, , , C.cyan, .Font.GothamBold)
(apMenuTitle, apMenu)
apMenuClose = (apMenu, , , C.white, C.redD, , , , , , , -, , )
(apMenuClose, )
apMenuClose.MouseButton1Click:(() apMenu.Visible = )
apStatF = (apMenu, , , -, , , , , , .(,,), , )
(apStatF, )
(apStatF, C.greenD, )
apStatLbl = (apStatF, , , C.red, .Font.GothamBold, , , , , , , , , , )
routeF = (apMenu, , , -, , , , , , .(,,), , )
(routeF, )
routeLbl = (routeF, , , C.dim, .Font.Code,
.TextXAlignment.Left, , , -, , , , , , )
wpF = (apMenu, , , -, , , , , , .(,,), , )
(wpF, )
wpLbl = (wpF, , , C.amber, .Font.Code,
.TextXAlignment.Left, , , -, , , , , , )
startBtn = (apMenu, , , C.green, .(,,),
, , -, , , , , , )
(startBtn, )
(startBtn, C.green, )
startBtn.MouseButton1Click:(()
ok, msg = ()
startBtn.Text = ok .. msg .. msg
.(, () startBtn.Text = )
)
stopBtn = (apMenu, , , C.red, .(,,),
, , -, , , , , , )
(stopBtn, )
(stopBtn, C.red, )
stopBtn.MouseButton1Click:(()
()
)
.(()
.()
(()
AP.active
apStatLbl.Text = .. AP.phase
apStatLbl.TextColor3 = C.green
apStatF.BackgroundColor3 = .(,,)
apStatLbl.Text =
apStatLbl.TextColor3 = C.red
apStatF.BackgroundColor3 = .(,,)
dep = AP.depRunway AP.depRunway.name
arr = AP.arrRunway AP.arrRunway.name
routeLbl.Text = .. dep .. .. arr
wpLbl.Text = .(,
AP.phase, (wpIndex), (#waypoints))
)
)
dockW =
dock = (sg, , , dockW, , , , -dockW-, -, .(,,), , )
(dock, )
(dock, C.border, )
dockTitle = (dock, , , , , , , , , .(,,), , )
(dockTitle, )
(dockTitle, , , C.cyan, .Font.GothamBold)
(y, txt, bg, brd, callback)
b = (dock, txt, , C.white, bg,
, , -, , , , , y, )
(b, )
(b, brd, )
b.MouseButton1Click:(callback)
b
(, , .(,,), C.borderHi, ()
menuVisible = menuVisible
menuPanel.Visible = menuVisible
menuVisible
menuPanel.Position = .(, -dockW--MENU_W-, , -)
)
apDockBtn = (, , .(,,), C.green, ()
apMenu.Visible = apMenu.Visible
apMenu.Visible
apMenu.Position = .(, -dockW--AP_W-, , -AP_H/)
)
(apDockBtn, C.green, )
(, , .(,,), C.borderHi, ()
hud.Visible = hud.Visible
)
dockAPF = (dock, , , -, , , , , , .(,,), , )
(dockAPF, )
dockAPLbl = (dockAPF, , , C.red, .Font.GothamBold, , , , , , , , , , )
.(()
.() (()
dockAPLbl.Text = AP.active (..AP.phase)
dockAPLbl.TextColor3 = AP.active C.green C.red
dockAPF.BackgroundColor3 = AP.active .(,,) .(,,)
apDockBtn.BackgroundColor3 = AP.active .(,,) .(,,)
)
)
prevAlt =
RunService.Heartbeat:(()
hud.Visible
(()
char = Player.Character
char
hrp = char:()
hrp
vel = hrp.AssemblyLinearVelocity
gs = .(vel.Magnitude)
alt = .(hrp.Position.Y)
look = hrp.CFrame.LookVector
hdg = .(.(look.X, look.Z))
hdg < hdg = hdg +
pitch =
vel.Magnitude >
pitch = .(.(.(vel.Y/vel.Magnitude, -, )))
vs = .(vel.Y * )
spdVal.Text = (gs)
spdPanelH = spdTickContainer.AbsoluteSize.Y
totalH =
pxPerUnit = spdPanelH / totalH *
offset = .((gs/) * spdPanelH, , spdPanelH)
speedColor
gs < speedColor = C.red
gs < speedColor = C.amber
speedColor = C.green
spdVal.TextColor3 = speedColor
altVal.Text = (alt)
altColor
alt < altColor = C.amber
alt < altColor = C.white
altColor = C.cyan
altVal.TextColor3 = altColor
aiH = ai.AbsoluteSize.Y
pxPitch = .(pitch * (aiH * ), -(aiH*), aiH*)
skyRatio = .( + pxPitch/aiH, , )
skyTop.Size = .(, , skyRatio, )
skyBot.Size = .(, , skyRatio, )
gndTop.Position = .(, , skyRatio, )
gndTop.Size = .(, , -skyRatio, )
gndBot.Position = .(, , , )
gndBot.Size = .(, , -skyRatio, )
horizLine.Position = .(, , skyRatio, -)
vel.Magnitude >
fpvPitch = .(.(.(vel.Y/vel.Magnitude,-,)))
fpvYawOff =
fpvYPx = -fpvPitch * (aiH * )
fpvFrame.Position = .(, -, , fpvYPx - )
fpvFrame.Visible =
fpvFrame.Visible =
hdgFrac = hdg /
hdgPtr.Position = .(hdgFrac, -, , )
hdgRead.Text = .(, hdg)
ndHdgLbl.Text = .(, hdg)
pitchRead.Text = .(, pitch)
vsRead.Text = .(, vs)
barVals.gs.Text = (gs) ..
barVals.vs.Text = (vs >= ) .. (vs) ..
barVals.phase.Text = AP.phase
dist =
AP.arrRunway
dist = (.((hrp.Position, AP.arrRunway.threshold))) ..
barVals.dist.Text = dist
barVals.wp.Text = AP.active ((wpIndex)....(#waypoints))
barVals.dep.Text = AP.depRunway AP.depRunway.name
barVals.arr.Text = AP.arrRunway AP.arrRunway.name
dStr = AP.arrRunway
(.((hrp.Position, AP.arrRunway.threshold)))
ndDestLbl.Text = .. dStr ..
ndWPLbl.Text = .. (AP.active ((wpIndex)....(#waypoints)) )
phColor = AP.active C.green C.red
ndPhaseLbl.Text = AP.phase
ndPhaseLbl.TextColor3 = phColor
prevAlt = alt
)
)
()
()çok havlı

Universal