-- https://www.roblox.com/games/5140123832/Aircraft-Carrier-BETA ------------------------------------- -- Global ESP Toggle Settings ------------------------------------- local RocketESPEnabled = false local AircraftESPEnabled = false ------------------------------------- -- (Optional) Extend Camera Far Clipping Distance ------------------------------------- -- Uncomment the following lines if you want the rocket trail to be visible beyond 5000 studs. -- WARNING: Setting the camera to Scriptable and increasing the FarPlane may affect camera controls and game performance. -- local cam = Workspace.CurrentCamera -- cam.CameraType = Enum.CameraType.Scriptable -- cam.FarPlane = 25000 ------------------------------------- -- Create the GUI ------------------------------------- local Players = game:GetService("Players") local LocalPlayer = Players.LocalPlayer local PlayerGui = LocalPlayer:WaitForChild("PlayerGui") -- Create a ScreenGui local screenGui = Instance.new("ScreenGui") screenGui.Name = "ESPControlGui" screenGui.ResetOnSpawn = false -- Prevent the GUI from being removed on character respawn screenGui.Parent = PlayerGui -- Create the main frame (draggable) local mainFrame = Instance.new("Frame") mainFrame.Name = "MainFrame" mainFrame.Size = UDim2.new(0, 200, 0, 100) mainFrame.Position = UDim2.new(0.5, -100, 0.5, -50) mainFrame.BackgroundColor3 = Color3.fromRGB(30, 30, 30) mainFrame.BorderSizePixel = 0 mainFrame.Active = true mainFrame.Draggable = true mainFrame.Parent = screenGui -- Title Label local title = Instance.new("TextLabel") title.Name = "Title" title.Size = UDim2.new(1, 0, 0, 20) title.BackgroundTransparency = 1 title.Text = "ESP Controls" title.TextColor3 = Color3.new(1, 1, 1) title.Font = Enum.Font.GothamBold title.TextSize = 18 title.Parent = mainFrame -- Rocket ESP Toggle Button local rocketToggle = Instance.new("TextButton") rocketToggle.Name = "RocketToggle" rocketToggle.Size = UDim2.new(0, 180, 0, 30) rocketToggle.Position = UDim2.new(0, 10, 0, 30) rocketToggle.Text = "Rocket ESP: OFF" rocketToggle.BackgroundColor3 = Color3.fromRGB(50, 50, 50) rocketToggle.TextColor3 = Color3.new(1,1,1) rocketToggle.Font = Enum.Font.GothamBold rocketToggle.TextSize = 16 rocketToggle.Parent = mainFrame -- Aircraft ESP Toggle Button local aircraftToggle = Instance.new("TextButton") aircraftToggle.Name = "AircraftToggle" aircraftToggle.Size = UDim2.new(0, 180, 0, 30) aircraftToggle.Position = UDim2.new(0, 10, 0, 70) aircraftToggle.Text = "Aircraft ESP: OFF" aircraftToggle.BackgroundColor3 = Color3.fromRGB(50, 50, 50) aircraftToggle.TextColor3 = Color3.new(1,1,1) aircraftToggle.Font = Enum.Font.GothamBold aircraftToggle.TextSize = 16 aircraftToggle.Parent = mainFrame -- Toggle Button Handlers rocketToggle.MouseButton1Click:Connect(function() RocketESPEnabled = not RocketESPEnabled rocketToggle.Text = RocketESPEnabled and "Rocket ESP: ON" or "Rocket ESP: OFF" end) aircraftToggle.MouseButton1Click:Connect(function() AircraftESPEnabled = not AircraftESPEnabled aircraftToggle.Text = AircraftESPEnabled and "Aircraft ESP: ON" or "Aircraft ESP: OFF" end) ------------------------------------- -- ESP for Objects (Rockets and Aircraft) ------------------------------------- local Workspace = game:GetService("Workspace") local Camera = Workspace.CurrentCamera local RunService = game:GetService("RunService") -- List of Rocket Names local rocketNames = { "AIM-120", "R-27R", "R-73E", "Jdam", "AIM-9B", "AIM-54" } -- Function to Create ESP for a Model (Rocket or Aircraft) local function createESP(object) if not object or not object:IsA("Model") then return end -- Skip if ESP already exists if object:FindFirstChild("ESPBillboard") then return end -- Ensure the model has a PrimaryPart if not object.PrimaryPart then local firstPart = object:FindFirstChildWhichIsA("BasePart") if firstPart then object.PrimaryPart = firstPart else return end end -- Determine the object type and assign colors local objectType = "" local markerColor = Color3.fromRGB(255, 255, 255) local textColor = Color3.fromRGB(255, 255, 255) if table.find(rocketNames, object.Name) then objectType = "Rocket" markerColor = Color3.fromRGB(255, 0, 0) -- red for rockets textColor = Color3.fromRGB(255, 0, 0) if not object:GetAttribute("CreationTime") then object:SetAttribute("CreationTime", tick()) end elseif object.Parent and object.Parent.Name == "Aircrafts" then objectType = "Aircraft" markerColor = Color3.fromRGB(255, 165, 0) -- orange for aircraft textColor = Color3.fromRGB(255, 165, 0) else objectType = object.Name end -- Create a BillboardGui for the ESP text local billboard = Instance.new("BillboardGui") billboard.Name = "ESPBillboard" billboard.Adornee = object.PrimaryPart billboard.Size = UDim2.new(0, 70, 0, 20) billboard.StudsOffset = Vector3.new(0, 2, 0) billboard.AlwaysOnTop = true billboard.Parent = object local label = Instance.new("TextLabel") label.Size = UDim2.new(1, 0, 1, 0) label.BackgroundTransparency = 1 label.TextColor3 = textColor label.TextStrokeTransparency = 0.3 label.TextStrokeColor3 = Color3.new(0, 0, 0) label.Font = Enum.Font.GothamBold label.TextScaled = false label.TextSize = 10 label.Parent = billboard -- Create a decorative marker (a ball) local marker = Instance.new("Part") marker.Name = "ESPMarker" marker.Size = Vector3.new(3, 3, 3) marker.Shape = Enum.PartType.Ball marker.Color = markerColor marker.Transparency = 0.5 marker.Anchored = true marker.CanCollide = false marker.Parent = object -- If this is a Rocket, add a large, long-lasting trail effect if objectType == "Rocket" then local primaryPart = object.PrimaryPart if primaryPart then -- Create two attachments on the primary part for the trail if not primaryPart:FindFirstChild("TrailAttachment0") then local attachment0 = Instance.new("Attachment") attachment0.Name = "TrailAttachment0" attachment0.Parent = primaryPart attachment0.Position = Vector3.new(0, 0, 0) end if not primaryPart:FindFirstChild("TrailAttachment1") then local attachment1 = Instance.new("Attachment") attachment1.Name = "TrailAttachment1" attachment1.Parent = primaryPart attachment1.Position = Vector3.new(0, -5, 0) end -- Create the Trail instance if it doesn't exist if not primaryPart:FindFirstChild("RocketTrail") then local trail = Instance.new("Trail") trail.Name = "RocketTrail" trail.Attachment0 = primaryPart:FindFirstChild("TrailAttachment0") trail.Attachment1 = primaryPart:FindFirstChild("TrailAttachment1") trail.Lifetime = 30 -- long lifetime so the trail lingers trail.MinLength = 0 -- draw continuously regardless of speed trail.WidthScale = NumberSequence.new({ NumberSequenceKeypoint.new(0, 6), NumberSequenceKeypoint.new(1, 6) }) trail.Color = ColorSequence.new(markerColor) trail.Transparency = NumberSequence.new({ NumberSequenceKeypoint.new(0, 0.2), NumberSequenceKeypoint.new(1, 1) }) trail.Parent = primaryPart end end end -- Update the ESP on every frame RunService.Heartbeat:Connect(function() if object and object.PrimaryPart then local pos = object.PrimaryPart.Position marker.Position = pos local dist = (Camera.CFrame.Position - pos).Magnitude label.Text = string.format("%s: %s\n%d studs", objectType, object.Name, math.floor(dist)) local _, onScreen = Camera:WorldToScreenPoint(pos) local shouldEnable = false if onScreen then if objectType == "Rocket" and RocketESPEnabled then shouldEnable = true elseif objectType == "Aircraft" and AircraftESPEnabled then shouldEnable = true end end if shouldEnable then marker.Transparency = 0.5 billboard.Enabled = true else marker.Transparency = 1 billboard.Enabled = false end end end) end -- Function to initialize ESP for existing objects local function addESPForObjects() for _, obj in ipairs(Workspace:GetChildren()) do if obj:IsA("Model") then if table.find(rocketNames, obj.Name) then createESP(obj) end end end local aircraftsFolder = Workspace:FindFirstChild("Aircrafts") if aircraftsFolder then for _, aircraft in ipairs(aircraftsFolder:GetChildren()) do if aircraft:IsA("Model") then createESP(aircraft) end end end end -- Handle new objects added to the Workspace Workspace.ChildAdded:Connect(function(child) if child:IsA("Model") then if table.find(rocketNames, child.Name) then createESP(child) end end if child.Name == "Aircrafts" and child:IsA("Folder") then child.ChildAdded:Connect(function(aircraft) if aircraft:IsA("Model") then createESP(aircraft) end end) end end) local aircraftsFolder = Workspace:FindFirstChild("Aircrafts") if aircraftsFolder then aircraftsFolder.ChildAdded:Connect(function(aircraft) if aircraft:IsA("Model") then createESP(aircraft) end end) end -- Initial setup for existing objects addESPForObjects() -- Constantly check the Aircrafts folder (in case aircraft reappear) spawn(function() while wait(1) do local aircraftsFolder = Workspace:FindFirstChild("Aircrafts") if aircraftsFolder then for _, aircraft in ipairs(aircraftsFolder:GetChildren()) do if aircraft:IsA("Model") and not aircraft:FindFirstChild("ESPBillboard") then createESP(aircraft) end end end end end) -- Constantly check the Workspace for rockets (even if repeated) spawn(function() while wait(1) do for _, obj in ipairs(Workspace:GetChildren()) do if obj:IsA("Model") and table.find(rocketNames, obj.Name) then if not obj:FindFirstChild("ESPBillboard") then createESP(obj) end end end end end) -- Track rockets: if a rocket model exists for more than 120 seconds, delete it spawn(function() while wait(1) do for _, obj in ipairs(Workspace:GetChildren()) do if obj:IsA("Model") and table.find(rocketNames, obj.Name) then local creationTime = obj:GetAttribute("CreationTime") if not creationTime then obj:SetAttribute("CreationTime", tick()) elseif tick() - creationTime >= 120 then obj:Destroy() end end end end end)