--!nocheck -- Glass Shatter (lab): mint scanline turns the victim to glass, freeze, crack web, burst into wedge shards. Deterministic _G.LabFX.step(t). local MINT = Color3.fromRGB(35, 232, 162) -- DESIGN.md tokens local CHAR = Color3.fromRGB(27, 25, 24) local PAPER = Color3.fromRGB(250, 246, 237) local GLASS = Color3.fromRGB(205, 250, 232) local OSWALD = Font.new("rbxasset://fonts/families/Oswald.json", Enum.FontWeight.Bold) local root = workspace:FindFirstChild("LabFX") if root then root:Destroy() end root = Instance.new("Folder") root.Name = "LabFX" local function part(props, class) local p = Instance.new(class or "Part") p.Anchored = true p.CanCollide = false p.Material = Enum.Material.SmoothPlastic p.Color = CHAR p.TopSurface = Enum.SurfaceType.Smooth p.BottomSurface = Enum.SurfaceType.Smooth for k, v in pairs(props) do p[k] = v end return p end local function ring(center, radius, thick, height, color, transp, parent) local m = Instance.new("Model") m.Parent = parent for i = 0, 47 do local a = (i / 48) * math.pi * 2 local cf = CFrame.new(center) * CFrame.Angles(0, a, 0) * CFrame.new(radius, 0, 0) * CFrame.Angles(0, math.rad(90), 0) part({ Size = Vector3.new(2 * math.pi * radius / 48 + 0.05, height, thick), CFrame = cf, Material = Enum.Material.Neon, Color = color, Transparency = transp, Parent = m }) end return m end local function stage(origin, parent) part({ Size = Vector3.new(60, 1, 60), CFrame = CFrame.new(origin), Material = Enum.Material.Slate, Color = Color3.fromRGB(34, 32, 30), Parent = parent }) ring(origin + Vector3.new(0, 0.55, 0), 9, 0.2, 0.1, MINT, 0.65, parent) end local function dummy(cf, parent) local m = Instance.new("Model") m.Name = "Victim" m.Parent = parent local function limb(size, off) return part({ Size = size, CFrame = cf * CFrame.new(off), Color = PAPER, Parent = m }) end local parts = { limb(Vector3.new(2, 2, 1), Vector3.new(0, 0, 0)), limb(Vector3.new(1.2, 1.2, 1.2), Vector3.new(0, 1.6, 0)), limb(Vector3.new(1, 2, 1), Vector3.new(-1.5, 0, 0)), limb(Vector3.new(1, 2, 1), Vector3.new(1.5, 0, 0)), limb(Vector3.new(1, 2, 1), Vector3.new(-0.5, -2, 0)), limb(Vector3.new(1, 2, 1), Vector3.new(0.5, -2, 0)), } local face = part({ Size = Vector3.new(0.8, 0.12, 0.05), CFrame = cf * CFrame.new(0, 1.45, -0.6), Color = CHAR, Parent = m }) return m, parts, face end local function overlay() local SG = game:GetService("StarterGui") local old = SG:FindFirstChild("LabFXOverlay") if old then old:Destroy() end local gui = Instance.new("ScreenGui") gui.Name = "LabFXOverlay" gui.IgnoreGuiInset = true gui.Parent = SG local function label(text, size, color, pos) local t = Instance.new("TextLabel") t.BackgroundTransparency = 1 t.Text = text t.FontFace = OSWALD t.TextSize = size t.TextColor3 = color t.AutomaticSize = Enum.AutomaticSize.XY t.Size = UDim2.fromOffset(0, 0) t.Position = pos t.AnchorPoint = Vector2.new(0.5, 0.5) t.TextXAlignment = Enum.TextXAlignment.Center t.Parent = gui return t end for _, c in ipairs({ { 0, 40, 0, 40, 0, 0 }, { 1, -40, 0, 40, 1, 0 }, { 0, 40, 1, -40, 0, 1 }, { 1, -40, 1, -40, 1, 1 } }) do for _, size in ipairs({ UDim2.fromOffset(28, 3), UDim2.fromOffset(3, 28) }) do local f = Instance.new("Frame") f.BackgroundColor3 = PAPER f.BorderSizePixel = 0 f.Size = size f.Position = UDim2.new(c[1], c[2], c[3], c[4]) f.AnchorPoint = Vector2.new(c[5], c[6]) f.Parent = gui end end return gui, label end -- ---- scene ---- local o = Vector3.new(0, 2000, 0) local FLOOR = o.Y + 0.5 local BURST = 0.75 local DURATION = 1.8 stage(o, root) local bodyCF = CFrame.new(o + Vector3.new(0, 4, 0)) local center = bodyCF.Position local victim, body, face = dummy(bodyCF, root) local rims = {} for i, p in ipairs(body) do local h = Instance.new("Highlight") h.Adornee = p h.FillColor = MINT h.FillTransparency = 0.85 h.OutlineColor = MINT h.DepthMode = Enum.HighlightDepthMode.Occluded h.Enabled = false h.Parent = root rims[i] = h end -- scanline: a mint plane slicing up through the body local scan = part({ Size = Vector3.new(5.4, 0.07, 2.4), Material = Enum.Material.Neon, Color = MINT, Parent = root }) local scanLight = Instance.new("PointLight") scanLight.Color, scanLight.Brightness, scanLight.Range = MINT, 1.2, 5 scanLight.Parent = scan -- heart: burst flash ball and the mint light that lights the glass and the shards local heart = part({ Shape = Enum.PartType.Ball, Size = Vector3.one, CFrame = bodyCF * CFrame.new(0.3, 0.25, -0.2), Material = Enum.Material.Neon, Color = PAPER, Parent = root }) local light = Instance.new("PointLight") light.Color, light.Range = MINT, 12 light.Parent = heart local key = Instance.new("PointLight", part({ Size = Vector3.one, Transparency = 1, CFrame = CFrame.new(o + Vector3.new(3, 8, -7)), Parent = root })) key.Color, key.Brightness, key.Range = PAPER, 0.9, 14 -- crack web: paper neon lines radiating from the hit point, clipped to the body silhouette local rng = Random.new(11) local function inside(x, y) return (math.abs(x) <= 1.95 and math.abs(y) <= 0.95) or (math.abs(x) <= 0.95 and y >= -2.95 and y < -0.95) or (math.abs(x) <= 0.55 and y > 1 and y <= 2.15) end local cracks = {} local function crack(sx, sy, ang, len, delay, w) local L = 0 while L < len and inside(sx + math.cos(ang) * (L + 0.1), sy + math.sin(ang) * (L + 0.1)) do L += 0.1 end if L < 0.25 then return nil end local p = part({ Material = Enum.Material.Neon, Color = PAPER, Size = Vector3.new(L, w, 0.03), Transparency = 1, Parent = root }) table.insert(cracks, { p = p, sx = sx, sy = sy, ang = ang, len = L, delay = delay, w = w }) return sx + math.cos(ang) * L, sy + math.sin(ang) * L end local IX, IY = 0.3, 0.25 for i = 1, 10 do local ang = (i / 10) * math.pi * 2 + rng:NextNumber(-0.25, 0.25) local ex, ey = crack(IX, IY, ang, rng:NextNumber(1.4, 3.4), rng:NextNumber(0, 0.04), 0.075) if ex then local f = rng:NextNumber(0.4, 0.65) crack(IX + (ex - IX) * f, IY + (ey - IY) * f, ang + rng:NextNumber(0.5, 1.0) * (rng:NextNumber() < 0.5 and -1 or 1), rng:NextNumber(0.5, 1.3), 0.06, 0.05) end end -- a broken ring around the hit point ties the web together for i = 0, 7 do local a = i / 8 * math.pi * 2 crack(IX + math.cos(a) * 0.55, IY + math.sin(a) * 0.55, a + math.pi / 2 + 0.2, 0.42, 0.05, 0.045) end -- shards: wedges sampled inside the body, glass and paper local G = 34 local shards = {} local weights = { 4, 1.6, 2, 2, 2, 2 } local total = 13.6 -- sum of weights for i = 1, 54 do local r, bi = rng:NextNumber() * total, 1 while r > weights[bi] do r -= weights[bi] bi += 1 end local src = body[bi] local s = src.Size local p0 = (src.CFrame * CFrame.new(rng:NextNumber(-0.45, 0.45) * s.X, rng:NextNumber(-0.45, 0.45) * s.Y, rng:NextNumber(-0.45, 0.45) * s.Z)).Position local isGlass = rng:NextNumber() < 0.6 local w = part({ Size = Vector3.new(0.08, rng:NextNumber(0.35, 0.95), rng:NextNumber(0.35, 0.95)), Material = isGlass and Enum.Material.Glass or (rng:NextNumber() < 0.35 and Enum.Material.Neon or Enum.Material.SmoothPlastic), Color = isGlass and GLASS or PAPER, Transparency = 1, Parent = root, }, "WedgePart") local away = p0 - center local dir = Vector3.new(away.X, 0, away.Z) local a = (dir.Magnitude > 0.15 and math.atan2(dir.Z, dir.X) or rng:NextNumber(0, math.pi * 2)) + rng:NextNumber(-0.5, 0.5) local vU = rng:NextNumber(3, 8) + (bi == 2 and 3 or 0) local y0 = p0.Y local tl = (vU + math.sqrt(vU * vU + 2 * G * (y0 - FLOOR - 0.04))) / G table.insert(shards, { w = w, p0 = p0, dir = Vector3.new(math.cos(a), 0, math.sin(a)), R = rng:NextNumber(2.2, 5.2), vU = vU, y0 = y0, tl = tl, rot0 = CFrame.Angles(rng:NextNumber(0, 6.3), rng:NextNumber(0, 6.3), rng:NextNumber(0, 6.3)), spin = Vector3.new(rng:NextNumber(-14, 14), rng:NextNumber(-14, 14), rng:NextNumber(-14, 14)), yaw = rng:NextNumber(0, 6.3), glass = isGlass, }) end local gui, label = overlay() local banner = label("SHATTERED", 92, PAPER, UDim2.new(0.5, 0, 0.14, 0)) local sub = label("+175", 40, MINT, UDim2.new(0.5, 0, 0.245, 0)) local lens = Instance.new("Frame") lens.BackgroundTransparency = 1 lens.AnchorPoint = Vector2.new(0.5, 0.5) lens.Parent = gui Instance.new("UICorner", lens).CornerRadius = UDim.new(0.5, 0) local stroke = Instance.new("UIStroke", lens) stroke.Color, stroke.Thickness = MINT, 5 root.Parent = workspace local L = game:GetService("Lighting") L.ClockTime = 0 L.Brightness = 1 L.Ambient = Color3.fromRGB(40, 40, 42) L.OutdoorAmbient = Color3.fromRGB(40, 40, 42) for _, n in ipairs({ "LabBloom", "LabCC" }) do local e = L:FindFirstChild(n) if e then e:Destroy() end end local bloom = Instance.new("BloomEffect") bloom.Name, bloom.Intensity, bloom.Size, bloom.Threshold = "LabBloom", 0.6, 30, 0.9 bloom.Parent = L local cc = Instance.new("ColorCorrectionEffect") cc.Name = "LabCC" cc.Parent = L settings().Rendering.QualityLevel = Enum.QualityLevel.Level21 settings().Rendering.EditQualityLevel = Enum.QualityLevel.Level21 local cam = workspace.CurrentCamera local function setCam() cam.CameraType = Enum.CameraType.Scriptable cam.FieldOfView = 50 cam.CFrame = CFrame.lookAt(o + Vector3.new(6, 8.5, -12.5), o + Vector3.new(0, 3.2, 0)) end local function clamp01(x) return math.clamp(x, 0, 1) end _G.LabFX = { duration = DURATION, step = function(t) setCam() local burst = t >= BURST local tb = t - BURST -- beat 1: scanline sweeps up, each part turns to glass as the line passes its centre local scanY = o.Y + 1 + 4.4 * clamp01(t / 0.5) scan.CFrame = CFrame.new(center.X, scanY, center.Z) scan.Transparency = 0.2 + 0.8 * clamp01((t - 0.5) / 0.1) scanLight.Enabled = t < 0.6 for i, p in ipairs(body) do local glass = p.Position.Y < scanY or t >= 0.5 p.Material = (glass and not burst) and Enum.Material.Glass or Enum.Material.SmoothPlastic p.Color = glass and GLASS or PAPER p.Transparency = burst and 1 or (glass and 0.3 or 0) rims[i].Enabled = glass and not burst end face.Transparency = (burst and 1) or (body[2].Position.Y < scanY and 0.5 or 0) -- beat 2: freeze, desaturated with a mint tint; the crack web draws out from the hit point local frozen = t >= 0.5 and not burst cc.Saturation = frozen and -0.35 or 0.05 cc.Contrast = frozen and 0.25 or 0.15 cc.TintColor = frozen and Color3.fromRGB(222, 255, 240) or Color3.new(1, 1, 1) for _, c in ipairs(cracks) do local l = c.len * clamp01((t - 0.52 - c.delay) / 0.14) if burst or l < 0.05 then c.p.Transparency = 1 else c.p.Transparency = 0 c.p.Size = Vector3.new(l, c.w, 0.03) local z = (c.sy > 1.05) and -0.63 or -0.53 c.p.CFrame = bodyCF * CFrame.new(c.sx + math.cos(c.ang) * l / 2, c.sy + math.sin(c.ang) * l / 2, z) * CFrame.Angles(0, 0, c.ang) end end -- beat 3: burst. Flash ball, mint light spike, shards fly out fast, slow, land and tinkle, then hold local f = clamp01(tb / 0.16) heart.Size = Vector3.one * (burst and (0.6 + 4.2 * f) or 0.4) heart.Transparency = burst and (0.05 + 0.95 * f) or 1 light.Brightness = burst and (1.5 + 8 * math.exp(-tb * 5)) or (t >= 0.2 and 3 or 0) for _, s in ipairs(shards) do if not burst then s.w.Transparency = 1 else local air = math.min(tb, s.tl) local k = clamp01(air / 0.6) local pos = s.p0 + s.dir * (s.R * (1 - (1 - k) ^ 3)) local y, rot if tb < s.tl then y = s.y0 + s.vU * tb - 0.5 * G * tb * tb rot = s.rot0 * CFrame.Angles(s.spin.X * tb, s.spin.Y * tb, s.spin.Z * tb) else local a = tb - s.tl y = FLOOR + 0.04 + (a < 0.16 and math.sin(math.pi * a / 0.16) * 0.22 or 0) rot = CFrame.Angles(0, s.yaw, 0) * CFrame.Angles(0, 0, math.pi / 2) end s.w.CFrame = CFrame.new(pos.X, y, pos.Z) * rot s.w.Transparency = s.glass and 0.2 or 0 end end -- overlay: lens ring on the burst, banner punches in, score follows local lk = clamp01(tb / 0.5) local sp = cam:WorldToViewportPoint(center) lens.Position = UDim2.fromOffset(sp.X, sp.Y) local d = 70 + 560 * (1 - (1 - lk) ^ 2) lens.Size = UDim2.fromOffset(d, d) stroke.Transparency = burst and (lk ^ 1.4) or 1 stroke.Thickness = 7 - 5 * lk local pop = clamp01(tb / 0.12) banner.TextSize = 64 + 28 * pop banner.TextTransparency = 1 - pop sub.TextTransparency = 1 - clamp01((tb - 0.12) / 0.1) return math.floor(t * 100) / 100 end, cleanup = function() local r = workspace:FindFirstChild("LabFX") if r then r:Destroy() end local g = game:GetService("StarterGui"):FindFirstChild("LabFXOverlay") if g then g:Destroy() end for _, n in ipairs({ "LabBloom", "LabCC" }) do local e = L:FindFirstChild(n) if e then e:Destroy() end end _G.LabFX = nil end, } _G.LabFX.step(0) return { built = #root:GetDescendants(), viewport = tostring(cam.ViewportSize), duration = DURATION }