local GRAVITY = 120 local SPEED = 330 local MAX_RANGE = 2000 local TRAIL_POINTS = 25 local dt = 0.05 local maxT = 30 local params = RaycastParams.new() params.FilterType = Enum.RaycastFilterType.Exclude local marker = Instance.new("Part") marker.Size = Vector3.new(5, 5, 5) marker.Shape = Enum.PartType.Ball marker.Anchored = true marker.CanCollide = false marker.CanQuery = false marker.CanTouch = false marker.Material = Enum.Material.Neon marker.Color = Color3.new(1, 0, 0) marker.Position = Vector3.new(0, 5000, 0) marker.Parent = workspace local hl = Instance.new("Highlight") hl.FillColor = Color3.new(0, 1, 0.866667) hl.OutlineColor = Color3.new(1, 0, 0) hl.FillTransparency = 0.3 hl.Parent = marker local trailFolder = Instance.new("Folder") trailFolder.Name = "TrajectoryTrail" trailFolder.Parent = workspace local trailParts = {} for i = 1, TRAIL_POINTS do local p = Instance.new("Part") p.Size = Vector3.new(2, 2, 2) p.Shape = Enum.PartType.Ball p.Anchored = true p.CanCollide = false p.CanQuery = false p.CanTouch = false p.Material = Enum.Material.Neon p.Transparency = i / TRAIL_POINTS * 0.7 p.Color = Color3.fromHSV(0.5 - (i / TRAIL_POINTS) * 0.5, 1, 1) p.Position = Vector3.new(0, 5000, 0) p.Parent = trailFolder trailParts[i] = p end local player = game:GetService("Players").LocalPlayer local env = getgenv() local function hideTrail() for _, p in trailParts do p.Position = Vector3.new(0, 5000, 0) end end local connection connection = game:GetService("RunService").Heartbeat:Connect(function() if env.stopplease then connection:Disconnect() marker:Destroy() trailFolder:Destroy() env.stopplease = nil return end local character = player.Character if not character then hideTrail() return end local control = character:FindFirstChild("Control") if control then local tank = control.CntrRig.Value if tank.Name == "Sturmtiger" then params.FilterDescendantsInstances = {tank} local barrel = tank.Movable.BarrelEnd local origin = barrel.Position local dir = barrel.CFrame.UpVector local v0 = dir * SPEED local lastPos = origin local impact = nil local impactT = nil for i = 1, maxT / dt do local t = i * dt local pos = Vector3.new( origin.X + v0.X * t, origin.Y + v0.Y * t - 0.5 * GRAVITY * t * t, origin.Z + v0.Z * t ) local dist = (pos - origin).Magnitude if dist > MAX_RANGE then break end local ray = workspace:Raycast(lastPos, pos - lastPos, params) if ray then impact = ray.Position impactT = t break end lastPos = pos end if impact and impactT then for i = 1, TRAIL_POINTS do local t = (i / TRAIL_POINTS) * impactT local pos = Vector3.new( origin.X + v0.X * t, origin.Y + v0.Y * t - 0.5 * GRAVITY * t * t, origin.Z + v0.Z * t ) trailParts[i].Position = pos end marker.Position = impact else hideTrail() marker.Position = Vector3.new(0, 5000, 0) end else hideTrail() marker.Position = Vector3.new(0, 5000, 0) end else hideTrail() marker.Position = Vector3.new(0, 5000, 0) end end)