Esc Menu Effect [Blackout]

Ops sorry for me this text dont loaded hahaha

1 Like

Instead of tweening each property individually, you could just tween it in a single tween like this:

TweenService:Create(instance, TweenInfo.new(1), {Property1 = 1, Property2 = 2, Property3 = 3):Play()

image
I also recommend using task.wait() instead of wait() since it is newer and is more reliable.

7 Likes

The effects are cool and the concept is nice, I like this.

Some suggestions

I don’t understand why you create a new tween every time the menu opens/closes, also you shouldn’t raise the LowGain when “muffling” the audio (makes it slightly louder which is a bit odd). And instead of asking the devs to use a given audio, allow them to set the location of the sound they choose and manually create an EQ effect in the script. It’s also easy enough to automatically move the ui to StarterGui from the script instead of asking the dev to do that too.

2 Likes

not sure about the task.wait thing, but i will definitely update the tweens when i am able to, i’m still a little inexperienced. Thank you!

1 Like

the script is already made to handle customised numbers, if someone wanted to not have a certain effect they could remove it altogether or just set it to 0.

The audio’s location is changeable in the script, instead of

workspace.Music

it could be, i dunno:

game:GetService("SoundService"):WaitForChild("Music")

it’s easily changeable, personally i do not see a point in an automatic move script.

I still do greatly appreciate your suggestions though, I may add them if enough people want it

1 Like

You can learn more about the task library by visiting this post: Task Library - Now Available!

2 Likes

Thank you for this, I’ll be sure to read it when I can.

2 Likes

Always wanted to know how to get that blur effect in TTD 3! Thanks alot!

2 Likes

Certified bruh moment imaoo. Doesn’t matter though they made a mistake.

1 Like

You can tween multiple properties in one tween by doing
{Property 1 = blabla, Property 1 = blabla,Property 1 = blabla}
etc

– Code

--[[
 _____               _           
|  ___|____  ____  _(_)_   _____ 
| |_ / _ \ \/ /\ \/ / \ \ / / _ \
|  _| (_) >  <  >  <| |\ V /  __/
|_|  \___/_/\_\/_/\_\_| \_/ \___|                              
]]--

-- vinny#0123

--[[
	LISTEN LISTEN I know my code is painful to look at [especially lines 31-42 and lines 53-59]
	but if it works it works.
	
	Setup tutorial + info Devforum post:
	https://devforum.roblox.com/t/esc-menu-effect-blackout/1980116
]] 

--- Settings --- Change to your liking
local ColorSettings     = {Saturation = -1,Brightness = -0.25,Contrast = 0.1}
local EQSettings        = {HighGain = -80,LowGain = 10,MidGain = -45}
local EQSettings2        = {HighGain = 0,LowGain = 0,MidGain = 0}
local OldCameraSettings = {Saturation = 0,Brightness = 0,Contrast = 0}

-----
-- Real code below :D


local GuiService = game:GetService('GuiService')
repeat wait() until workspace.CurrentCamera
local Camera = workspace.CurrentCamera

local TS = game:GetService('TweenService')

local EscBlur,EscColor = Instance.new('BlurEffect'),Instance.new('ColorCorrectionEffect')
EscBlur.Size = 0 EscBlur.Name = 'ESCB' EscColor.Saturation = 0 EscColor.Name = 'ESCC'

local Blocker = script.Parent:WaitForChild('Frame')
local Music = workspace.Music -- Location can be anywhere, doesn't have to be workspace.
local EQ = Music.EqualizerSoundEffect

local NewBlur,NewColor = EscBlur:Clone(),EscColor:Clone()
NewBlur.Parent,NewColor.Parent = Camera,Camera
EscBlur:Destroy()
EscColor:Destroy()

GuiService.MenuOpened:Connect(function()
	local Size = NewBlur.Size
	local Saturation = NewColor.Saturation
	-- All of these numbers are customisable.
	TS:Create(NewBlur, TweenInfo.new(1), {Size = 12}):Play()
	TS:Create(NewColor, TweenInfo.new(1), ColorSettings):Play()
	TS:Create(Blocker, TweenInfo.new(1), {BackgroundTransparency = 0.5}):Play()
	TS:Create(EQ, TweenInfo.new(1), EQSettings):Play()
end)
GuiService.MenuClosed:Connect(function()
	for i,v in pairs(Camera:GetChildren()) do
		if v.Name == "ESCB" then
			local OldBlur = v
			TS:Create(OldBlur, TweenInfo.new(1), {Size = 0}):Play()
		end
		if v.Name == "ESCC" then
			local OldCamera = v
			-- All of these numbers are customisable.
			TS:Create(OldCamera, TweenInfo.new(1), OldCameraSettings):Play()
			TS:Create(Blocker, TweenInfo.new(1), {BackgroundTransparency = 1}):Play()
			TS:Create(EQ, TweenInfo.new(1), EQSettings2):Play()
		end
	end
end)
2 Likes

How would I be able to muffen multiple sounds?
image

you can add them individually. I would tell you another way if I was more experienced but I’m still not a pro, so this is the only solution I can offer for now

local sound1 = [sound location here]
local sound2 = [sound location here]
...

naw thats fine also your stuff is really good lol

1 Like

it breaks it if i add more sounds

well, you also have to add each individual EQ, assuming you didn’t do that already

local sound1 = [sound location here]
local EQ1 = sound1.EqualizerSoundEffect
local sound2 = [sound location here]
local EQ2 = sound2.EqualizerSoundEffect
...

Here’s a tip:
Place a SoundGroup in SoundService
image

and then set the soundGroup on your audio.
image

You can manage the master volume by the properties of the SoundGroup (and even add sound effects)
image

5 Likes

oh, this is awesome, I never really interacted much with SoundService aside from adding ambient reverb. Thank you for the tip

1 Like

holy sugar muffins thank you man

1 Like

sound is not available
image

please fix it

thank !

well yeah I literally can’t make audios public yet, Roblox still has not added that option
plus, the entire point is to use your OWN sound to muffle out, not one I have set for you