Can you put the code here instead of a screenshot?
1 Like
local TweenService = game:GetService("TweenService")
local UIS = game:GetService("UserInputService")
game:GetService("Players").LocalPlayer.PlayerGui.Main.PauseMenu.BackgroundTransparency = 1
game:GetService("Players").LocalPlayer.PlayerGui.Main.PauseMenu.MainMenuButton.BackgroundTransparency = 1
game:GetService("Players").LocalPlayer.PlayerGui.Main.PauseMenu.QuitButton.BackgroundTransparency = 1
game:GetService("Players").LocalPlayer.PlayerGui.Main.PauseMenu.SettingsButton.BackgroundTransparency = 1
local gui = false
UIS.InputBegan:Connect(function(input)
if (UIS:GetFocusedTextBox()) then
return;
end
if input.KeyCode == Enum.KeyCode.Q then
if gui == false then
game:GetService("Players").LocalPlayer.PlayerGui.Main.PauseMenu.Visible = true
TweenService:Create(game:GetService("Players").LocalPlayer.PlayerGui.Main.PauseMenu, TweenInfo.new(0.5), {BackgroundTransparency= 0.5}):Play()
TweenService:Create(game:GetService("Players").LocalPlayer.PlayerGui.Main.PauseMenu.MainMenuButton, TweenInfo.new(0.5), {BackgroundTransparency= 0.5}, {TextTransparency= 0}):Play()
TweenService:Create(game:GetService("Players").LocalPlayer.PlayerGui.Main.PauseMenu.QuitButton, TweenInfo.new(0.5), {BackgroundTransparency= 0.5}, {TextTransparency= 0}):Play()
TweenService:Create(game:GetService("Players").LocalPlayer.PlayerGui.Main.PauseMenu.SettingsButton, TweenInfo.new(0.5), {BackgroundTransparency= 0.5}, {TextTransparency= 0}):Play()
gui = true
elseif gui == true then
TweenService:Create(game:GetService("Players").LocalPlayer.PlayerGui.Main.PauseMenu, TweenInfo.new(0.5), {BackgroundTransparency= 1}):Play()
TweenService:Create(game:GetService("Players").LocalPlayer.PlayerGui.Main.PauseMenu.MainMenuButton, TweenInfo.new(0.5), {BackgroundTransparency= 1}, {TextTransparency= 1}):Play()
TweenService:Create(game:GetService("Players").LocalPlayer.PlayerGui.Main.PauseMenu.QuitButton, TweenInfo.new(0.5), {BackgroundTransparency= 1}, {TextTransparency= 1}):Play()
TweenService:Create(game:GetService("Players").LocalPlayer.PlayerGui.Main.PauseMenu.SettingsButton, TweenInfo.new(0.5), {BackgroundTransparency= 1}, {TextTransparency= 1}):Play()
wait(0.5)
game:GetService("Players").LocalPlayer.PlayerGui.Main.PauseMenu.Visible = false
gui = false
end
end
end)
Combine the two tables with Text and BackgroundTransparency. All properties should be in one table.
e.g:
{BackgroundTransparency = 1,
TextTransparency = 1}