0% found this document useful (0 votes)
11 views3 pages

Message

- The document contains code for a menu script that allows players to access settings and credits screens through buttons on the menu. It includes functions for opening and closing these screens with animations and adjusting settings like enabling shadows. - When certain buttons are clicked, it plays tween animations to move the screens and buttons while also adding a blur effect. Exit buttons return everything to the original positions. - The play button destroys the menu buttons and switches the camera before unblurring to start the game.

Uploaded by

rosa191245
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views3 pages

Message

- The document contains code for a menu script that allows players to access settings and credits screens through buttons on the menu. It includes functions for opening and closing these screens with animations and adjusting settings like enabling shadows. - When certain buttons are clicked, it plays tween animations to move the screens and buttons while also adding a blur effect. Exit buttons return everything to the original positions. - The play button destroys the menu buttons and switches the camera before unblurring to start the game.

Uploaded by

rosa191245
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 3

--[[ Hecho por 283283Lol]]

------------------------------------ Ajustes
local SettingsEnabled = true
local CreditsEnabled = true
local DayClockTime = 14
local NightClockTime = 18
------------------------------------ Ajustes

local Player = game.Players.LocalPlayer


local tweenService = game:GetService("TweenService")
local Char = Player.Character
local Camera = game.Workspace.CurrentCamera
local MenuCam = game.Workspace:WaitForChild("MenuCam")
local Process = false

wait(game:IsLoaded())
MenuCam.Transparency = 1
Camera.CameraType = Enum.CameraType.Scriptable
Camera.CFrame = MenuCam.CFrame
local BlurEffect = Instance.new("BlurEffect")
BlurEffect.Size = 0
BlurEffect.Parent = game.Lighting

local Black =
tweenService:Create(script.Parent:WaitForChild("Black") ,TweenInfo.new(2,
Enum.EasingStyle.Linear,
Enum.EasingDirection.Out),
{Transparency = 0})
local UnBlack =
tweenService:Create(script.Parent:WaitForChild("Black") ,TweenInfo.new(2,
Enum.EasingStyle.Linear,
Enum.EasingDirection.Out),
{Transparency = 1})
local Blur = tweenService:Create(BlurEffect ,TweenInfo.new(2,
Enum.EasingStyle.Linear,
Enum.EasingDirection.Out),
{Size = 20})
local UnBlur = tweenService:Create(BlurEffect ,TweenInfo.new(1,
Enum.EasingStyle.Linear,
Enum.EasingDirection.Out),
{Size = 0})

if SettingsEnabled == false then


script.Parent.SettingsButton.Visible = false
end
if CreditsEnabled == false then
script.Parent.CreditsButton.Visible = false
else
if
script.Parent:WaitForChild("CreditsFrame"):WaitForChild("Frame"):FindFirstChild("Te
xtLabel") then
if
script.Parent:WaitForChild("CreditsFrame"):WaitForChild("Frame"):WaitForChild("Text
Label").Text == "Scripter -" then
script.Parent.CreditsFrame.Frame.TextLabel.Text = "Scripter -
"..Player.Name
end
end
end
script.Parent:WaitForChild("GameMusic").Playing = true

script.Parent.SettingsButton.MouseButton1Click:Connect(function()
if Process == true then return end
Process = true
if script.Parent.SettingsFrame.Position == UDim2.new(0.5, 0,-0.4, 0) then
script.Parent.SettingsFrame:TweenPosition(UDim2.new(0.5, 0,0.5, 0),
"Out", "Quad", 1)
script.Parent.PlayButton:TweenPosition(UDim2.new(-0.3, 0,0.353, 0),
"Out", "Quad", 0.5)
script.Parent.SettingsButton:TweenPosition(UDim2.new(-0.3, 0,0.508, 0),
"Out", "Quad", 0.5)
script.Parent.CreditsButton:TweenPosition(UDim2.new(-0.3, 0,0.636, 0),
"Out", "Quad", 0.5)
Blur:Play()
else
script.Parent.SettingsFrame:TweenPosition(UDim2.new(0.5, 0,-0.4, 0),
"Out", "Quad", 1)
script.Parent.PlayButton:TweenPosition(UDim2.new(0.005, 0,0.353, 0),
"Out", "Quad", 0.5)
script.Parent.SettingsButton:TweenPosition(UDim2.new(0.005, 0,0.508,
0), "Out", "Quad", 0.5)
script.Parent.CreditsButton:TweenPosition(UDim2.new(0.005, 0,0.636, 0),
"Out", "Quad", 0.5)
UnBlur:Play()
end
wait(2)
Process = false
end)

script.Parent.CreditsButton.MouseButton1Click:Connect(function()
if Process == true then return end
Process = true
if script.Parent.CreditsFrame.Position == UDim2.new(0.5, 0,-0.4, 0) then
script.Parent.CreditsFrame:TweenPosition(UDim2.new(0.5, 0,0.5, 0),
"Out", "Quad", 1)
script.Parent.PlayButton:TweenPosition(UDim2.new(-0.3, 0,0.353, 0),
"Out", "Quad", 0.5)
script.Parent.SettingsButton:TweenPosition(UDim2.new(-0.3, 0,0.508, 0),
"Out", "Quad", 0.5)
script.Parent.CreditsButton:TweenPosition(UDim2.new(-0.3, 0,0.636, 0),
"Out", "Quad", 0.5)
Blur:Play()
else
script.Parent.CreditsFrame:TweenPosition(UDim2.new(0.5, 0,-0.4, 0),
"Out", "Quad", 1)
script.Parent.PlayButton:TweenPosition(UDim2.new(0.005, 0,0.353, 0),
"Out", "Quad", 0.5)
script.Parent.SettingsButton:TweenPosition(UDim2.new(0.005, 0,0.508,
0), "Out", "Quad", 0.5)
script.Parent.CreditsButton:TweenPosition(UDim2.new(0.005, 0,0.636, 0),
"Out", "Quad", 0.5)
UnBlur:Play()
end
wait(2)
Process = false
end)

script.Parent.CreditsFrame.ExitButton.MouseButton1Click:Connect(function()
if Process == true then return end
Process = true
script.Parent.CreditsFrame:TweenPosition(UDim2.new(0.5, 0,-0.4, 0), "Out",
"Quad", 1)
script.Parent.PlayButton:TweenPosition(UDim2.new(0.005, 0,0.353, 0), "Out",
"Quad", 0.5)
script.Parent.SettingsButton:TweenPosition(UDim2.new(0.005, 0,0.508, 0),
"Out", "Quad", 0.5)
script.Parent.CreditsButton:TweenPosition(UDim2.new(0.005, 0,0.636, 0),
"Out", "Quad", 0.5)
UnBlur:Play()
wait(2)
Process = false
end)

script.Parent.SettingsFrame.ExitButton.MouseButton1Click:Connect(function()
if Process == true then return end
Process = true
script.Parent.SettingsFrame:TweenPosition(UDim2.new(0.5, 0,-0.4, 0), "Out",
"Quad", 1)
script.Parent.PlayButton:TweenPosition(UDim2.new(0.005, 0,0.353, 0), "Out",
"Quad", 0.5)
script.Parent.SettingsButton:TweenPosition(UDim2.new(0.005, 0,0.508, 0),
"Out", "Quad", 0.5)
script.Parent.CreditsButton:TweenPosition(UDim2.new(0.005, 0,0.636, 0),
"Out", "Quad", 0.5)
UnBlur:Play()
wait(2)
Process = false
end)

if script.Parent.SettingsFrame.Frame:FindFirstChild("Shadows") then

script.Parent.SettingsFrame.Frame.Shadows.MouseButton1Click:Connect(function()
if script.Parent.SettingsFrame.Frame.Shadows.Text == "X" then
script.Parent.SettingsFrame.Frame.Shadows.Text = ""
game.Lighting.GlobalShadows = false
else
script.Parent.SettingsFrame.Frame.Shadows.Text = "X"
game.Lighting.GlobalShadows = true
end
end)
end
script.Parent.PlayButton.MouseButton1Click:Connect(function()
if Process == true then return end
Process = true
Black:Play()
wait(3)
Camera.CameraType = Enum.CameraType.Custom
script.Parent.PlayButton:Destroy()
script.Parent.SettingsButton:Destroy()
script.Parent.CreditsButton:Destroy()
UnBlack:Play()
end)

You might also like