Esc Menu Effect [Blackout]

Hey, I think this is my 4th time posting something in this category that isn’t a reply, I come in peace, providing all Roblox developers with a simple effective resource.


I present to you:

The Esc menu Blackout


This model provides a simple effect for you to use in your games if you wish to. It’s nothing super huge or cool.
Well, it is cool, it’s just not super huge

Everything is handled by one script, even the script creates the lighting effects like colour correction and blur, the audio already has the EQ, and the script handles that too. All you really need to do is put everything where it’s supposed to go, change the Audio ID and you are good to go.

This wasn’t made to be compatible with multiple audios, you can change that if you’d like. Or if your game changes audio IDs dynamically, then I guess it should work as intended, as long as the EQ is present.


Setup

When you insert the model into your workspace, you will be greeted with a folder

image

Inside, there are 2 things:

  • The audio
  • The GUI
    image

The GUI goes in, well, StarterGUI

image

The audio is supposed to go in the workspace, as the script locates it there on line 28 of the script

image

Code
local Music = workspace.Music

There are more details in the script itself, which are comments on some lines that can tell you what you can and can’t change easily


Here is the toolbox link, I had a testing place ready but forgot to save it before I closed it (oops)

might make one later… no promises though

I don’t have a place for donations so… uh, if you wanna support me with money then you can ask I guess.


Thank you for checking this out.


Something extra.

If you’re THAT interested in what I do, my commissions for development are open, you can see my portfolio here:

https://foxxive-portfolio.carrd.co/

Talent hub sucks, and I’m pretty sure putting my Discord tag on here can get me a punishment so just take that as is.

38 Likes

Pretty interesting, although I do have to ask why you did this after already creating blurs?:

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

it’s a weird alternative to :WaitForChild() I had to do, it’s to avoid loading issues and some weird bugs that happened when I did use :WaitForChild() (which I have no idea why they happened, they shouldn’t have)

I probably could have handled that a lot better, but there’s your answer

1 Like

I think the code is not only this???

1 Like

and you’d be correct, I’m only labelling line 28 because I explicitly mentioned:

2 Likes

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
...