-- GTA-Inspired Cinematic Death & Visual Effects -- Roblox Studio / LocalScript -- Place in: StarterPlayer > StarterPlayerScripts -- -- This script is inspired by cinematic open-world death/loading presentations, -- but does not reproduce GTA V's original copyrighted assets or UI. -- It creates: -- • Cinematic death overlay -- • Ragdoll on death -- • Slow-motion death moment -- • Blur / bloom / color effects -- • Water transparency and improved water visuals -- • Minimal open-world HUD -- • Cinematic loading screen local Players = game:GetService("Players") local Lighting = game:GetService("Lighting") local TweenService = game:GetService("TweenService") local RunService = game:GetService("RunService") local SoundService = game:GetService("SoundService") local player = Players.LocalPlayer local playerGui = player:WaitForChild("PlayerGui") --------------------------------------------------------------------- -- CONFIG --------------------------------------------------------------------- local CONFIG = { DeathSlowMotionSeconds = 2.5, DeathScreenSeconds = 4.5, RagdollDuration = 8, LoadingSeconds = 3, WaterTransparency = 0.18, -- Cinematic death camera CameraPullBackDistance = 18, CameraHeight = 7, CameraMoveSeconds = 2.2, } --------------------------------------------------------------------- -- LIGHTING / HD-STYLE VISUALS --------------------------------------------------------------------- local function createEffect(className, name) local existing = Lighting:FindFirstChild(name) if existing then return existing end local effect = Instance.new(className) effect.Name = name effect.Parent = Lighting return effect end local colorCorrection = createEffect("ColorCorrectionEffect", "CinematicColorCorrection") colorCorrection.Brightness = 0.02 colorCorrection.Contrast = 0.18 colorCorrection.Saturation = -0.05 colorCorrection.TintColor = Color3.fromRGB(255, 245, 235) local bloom = createEffect("BloomEffect", "CinematicBloom") bloom.Intensity = 0.35 bloom.Size = 24 bloom.Threshold = 1.2 local sunRays = createEffect("SunRaysEffect", "CinematicSunRays") sunRays.Intensity = 0.08 sunRays.Spread = 0.75 local atmosphere = Lighting:FindFirstChildOfClass("Atmosphere") if not atmosphere then atmosphere = Instance.new("Atmosphere") atmosphere.Name = "CinematicAtmosphere" atmosphere.Parent = Lighting end atmosphere.Density = math.clamp(atmosphere.Density, 0.25, 0.45) atmosphere.Haze = math.max(atmosphere.Haze, 1) atmosphere.Glare = math.max(atmosphere.Glare, 0.15) Lighting.Technology = Enum.Technology.Future --------------------------------------------------------------------- -- WATER VISUALS --------------------------------------------------------------------- local terrain = workspace:FindFirstChildOfClass("Terrain") if terrain then terrain.WaterTransparency = CONFIG.WaterTransparency terrain.WaterReflectance = 0.65 terrain.WaterWaveSize = 0.18 terrain.WaterWaveSpeed = 10 terrain.WaterColor = Color3.fromRGB(45, 120, 145) end --------------------------------------------------------------------- -- GUI HELPERS --------------------------------------------------------------------- local gui = Instance.new("ScreenGui") gui.Name = "CinematicOpenWorldGUI" gui.ResetOnSpawn = false gui.IgnoreGuiInset = true gui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling gui.Parent = playerGui local function makeFrame(parent, name, position, size, color, transparency) local frame = Instance.new("Frame") frame.Name = name frame.Position = position frame.Size = size frame.BackgroundColor3 = color frame.BackgroundTransparency = transparency or 0 frame.BorderSizePixel = 0 frame.Parent = parent return frame end local function makeText(parent, name, text, position, size, font, textSize) local label = Instance.new("TextLabel") label.Name = name label.Text = text label.Position = position label.Size = size label.BackgroundTransparency = 1 label.Font = font label.TextSize = textSize label.TextColor3 = Color3.new(1, 1, 1) label.TextTransparency = 0 label.Parent = parent return label end --------------------------------------------------------------------- -- LOADING SCREEN --------------------------------------------------------------------- local loading = makeFrame(gui, "LoadingScreen", UDim2.fromScale(0, 0), UDim2.fromScale(1, 1), Color3.new(0, 0, 0), 0) local loadingTitle = makeText( loading, "LoadingTitle", "LOADING", UDim2.fromScale(0.1, 0.38), UDim2.fromScale(0.8, 0.12), Enum.Font.GothamBlack, 42 ) loadingTitle.TextTransparency = 0.1 local subtitle = makeText( loading, "Subtitle", "Preparing the world...", UDim2.fromScale(0.1, 0.51), UDim2.fromScale(0.8, 0.06), Enum.Font.Gotham, 18 ) subtitle.TextTransparency = 0.3 local barBackground = makeFrame( loading, "BarBackground", UDim2.fromScale(0.25, 0.62), UDim2.fromScale(0.5, 0.015), Color3.fromRGB(55, 55, 55), 0 ) local bar = makeFrame( barBackground, "Progress", UDim2.fromScale(0, 0), UDim2.fromScale(0, 1), Color3.fromRGB(235, 235, 235), 0 ) TweenService:Create( bar, TweenInfo.new(CONFIG.LoadingSeconds, Enum.EasingStyle.Linear), {Size = UDim2.fromScale(1, 1)} ):Play() task.wait(CONFIG.LoadingSeconds) TweenService:Create( loading, TweenInfo.new(0.8, Enum.EasingStyle.Quad), {BackgroundTransparency = 1} ):Play() for _, object in ipairs(loading:GetDescendants()) do if object:IsA("TextLabel") then TweenService:Create(object, TweenInfo.new(0.6), {TextTransparency = 1}):Play() elseif object:IsA("Frame") then TweenService:Create(object, TweenInfo.new(0.6), {BackgroundTransparency = 1}):Play() end end task.wait(0.9) loading.Visible = false --------------------------------------------------------------------- -- MINIMAL OPEN-WORLD HUD --------------------------------------------------------------------- local hud = Instance.new("Frame") hud.Name = "OpenWorldHUD" hud.AnchorPoint = Vector2.new(1, 1) hud.Position = UDim2.fromScale(0.98, 0.96) hud.Size = UDim2.fromOffset(210, 54) hud.BackgroundTransparency = 1 hud.Parent = gui local healthBack = makeFrame(hud, "HealthBack", UDim2.fromScale(0.25, 0.05), UDim2.fromScale(0.7, 0.2), Color3.fromRGB(20, 20, 20), 0.25) local healthBar = makeFrame(healthBack, "Health", UDim2.fromScale(0, 0), UDim2.fromScale(1, 1), Color3.fromRGB(235, 235, 235), 0) local function updateHUD(humanoid) local ratio = math.clamp(humanoid.Health / humanoid.MaxHealth, 0, 1) TweenService:Create( healthBar, TweenInfo.new(0.15), {Size = UDim2.fromScale(ratio, 1)} ):Play() end --------------------------------------------------------------------- -- DEATH SCREEN --------------------------------------------------------------------- local deathGui = makeFrame(gui, "DeathScreen", UDim2.fromScale(0, 0), UDim2.fromScale(1, 1), Color3.new(0, 0, 0), 1) deathGui.Visible = false local deathText = makeText( deathGui, "DeathText", "WASTED", UDim2.fromScale(0.05, 0.39), UDim2.fromScale(0.9, 0.18), Enum.Font.GothamBlack, 64 ) deathText.TextColor3 = Color3.fromRGB(210, 35, 35) deathText.TextTransparency = 1 local deathSubText = makeText( deathGui, "DeathSubText", "You died", UDim2.fromScale(0.1, 0.55), UDim2.fromScale(0.8, 0.06), Enum.Font.Gotham, 20 ) deathSubText.TextTransparency = 1 local deathBlur = Instance.new("BlurEffect") deathBlur.Name = "DeathBlur" deathBlur.Size = 0 deathBlur.Enabled = false deathBlur.Parent = Lighting --------------------------------------------------------------------- -- RAGDOLL --------------------------------------------------------------------- local function ragdollCharacter(character) local humanoid = character:FindFirstChildOfClass("Humanoid") if not humanoid then return end humanoid.BreakJointsOnDeath = false humanoid.RequiresNeck = false humanoid:ChangeState(Enum.HumanoidStateType.Physics) for _, motor in ipairs(character:GetDescendants()) do if motor:IsA("Motor6D") then local part0 = motor.Part0 local part1 = motor.Part1 if part0 and part1 then local attachment0 = Instance.new("Attachment") attachment0.CFrame = motor.C0 attachment0.Parent = part0 local attachment1 = Instance.new("Attachment") attachment1.CFrame = motor.C1 attachment1.Parent = part1 local socket = Instance.new("BallSocketConstraint") socket.Attachment0 = attachment0 socket.Attachment1 = attachment1 socket.LimitsEnabled = true socket.UpperAngle = 45 socket.TwistLimitsEnabled = true socket.TwistLowerAngle = -35 socket.TwistUpperAngle = 35 socket.Parent = part0 motor.Enabled = false end end end for _, part in ipairs(character:GetDescendants()) do if part:IsA("BasePart") then part.CanCollide = true end end end --------------------------------------------------------------------- -- SLOW MOTION (LOCAL VISUAL / ANIMATION EFFECT) --------------------------------------------------------------------- local function cinematicDeath(character) deathGui.Visible = true deathBlur.Enabled = true local camera = workspace.CurrentCamera local oldFov = camera.FieldOfView local oldCameraType = camera.CameraType local oldCameraSubject = camera.CameraSubject -- Switch to a cinematic script-controlled camera. camera.CameraType = Enum.CameraType.Scriptable local root = character and character:FindFirstChild("HumanoidRootPart") local head = character and character:FindFirstChild("Head") if root or head then local focusPart = root or head local startPosition = focusPart.Position + Vector3.new(0, 2.5, 8) local endPosition = focusPart.Position + Vector3.new(0, CONFIG.CameraHeight, CONFIG.CameraPullBackDistance) camera.CFrame = CFrame.lookAt(startPosition, focusPart.Position + Vector3.new(0, 1.5, 0)) -- Camera slowly pulls away from the fallen character. local targetCFrame = CFrame.lookAt( endPosition, focusPart.Position + Vector3.new(0, 1.5, 0) ) TweenService:Create( camera, TweenInfo.new( CONFIG.CameraMoveSeconds, Enum.EasingStyle.Quad, Enum.EasingDirection.Out ), { CFrame = targetCFrame, FieldOfView = math.max(35, oldFov - 18), } ):Play() end TweenService:Create( deathGui, TweenInfo.new(0.35, Enum.EasingStyle.Quad), {BackgroundTransparency = 0.45} ):Play() -- Small delay before the death text, for a cinematic reveal. task.wait(0.9) TweenService:Create( deathText, TweenInfo.new(0.55, Enum.EasingStyle.Back), {TextTransparency = 0} ):Play() TweenService:Create( deathSubText, TweenInfo.new(0.6), {TextTransparency = 0.15} ):Play() TweenService:Create( deathBlur, TweenInfo.new(0.6), {Size = 18} ):Play() task.wait(math.max(0.1, CONFIG.DeathScreenSeconds - 0.9)) TweenService:Create(deathGui, TweenInfo.new(0.7), {BackgroundTransparency = 1}):Play() TweenService:Create(deathText, TweenInfo.new(0.5), {TextTransparency = 1}):Play() TweenService:Create(deathSubText, TweenInfo.new(0.5), {TextTransparency = 1}):Play() TweenService:Create(deathBlur, TweenInfo.new(0.5), {Size = 0}):Play() task.wait(0.8) -- Restore Roblox's normal camera. camera.FieldOfView = oldFov camera.CameraType = oldCameraType if oldCameraSubject then camera.CameraSubject = oldCameraSubject end deathGui.Visible = false deathBlur.Enabled = false end --------------------------------------------------------------------- -- CHARACTER SETUP --------------------------------------------------------------------- local function setupCharacter(character) local humanoid = character:WaitForChild("Humanoid") humanoid.BreakJointsOnDeath = false updateHUD(humanoid) humanoid.HealthChanged:Connect(function() updateHUD(humanoid) end) humanoid.Died:Connect(function() ragdollCharacter(character) task.spawn(cinematicDeath, character) end) end if player.Character then task.spawn(setupCharacter, player.Character) end player.CharacterAdded:Connect(function(character) task.wait(0.5) setupCharacter(character) end)