local Character = Player.Character or Player.CharacterAdded:Wait()
local Camera = workspace.Camera
local Logo = script.Parent.LOGO
local Credit = script.Parent.CREDIT
local Seat = game.Workspace.MainSeat.ActualSeat
local userInputService = game:GetService("UserInputService")
local eventActOne = game.ReplicatedStorage.ActOneEvent
-- MAIN MENU
repeat wait()
Camera.CameraType = Enum.CameraType.Scriptable
until Camera.CameraType == Enum.CameraType.Scriptable
Camera.CFrame = workspace.CameraPart.CFrame
local PlayButton = script.Parent.PLAY
local QuitButton = script.Parent.QUIT
local SettingsButton = script.Parent.SETTINGS
PlayButton.MouseButton1Click:Connect(function()
--Camera.CameraType = Enum.CameraType.Custom
--Player.CameraMaxZoomDistance = 0
Seat:Sit(Player.Character.Humanoid)
userInputService.MouseIconEnabled = false
PlayButton:Destroy()
Logo:Destroy()
Credit:Destroy()
QuitButton:Destroy()
SettingsButton:Destroy()
print ("Starting Game!")
local module = require(workspace.CutsceneExecutionModule)
module:PlayFullCutscene()
eventActOne:FireServer(Player)
end)
local QuitButton = script.Parent.QUIT
QuitButton.MouseButton1Click:connect(function()
game.Players.LocalPlayer:Kick("Quit Game!")
end)
-- OPENING/CLOSING SETTINGS
local SettingsButton = script.Parent.SETTINGS
local SettingsFrame = script.Parent.SettingsFrame
SettingsButton.MouseButton1Click:Connect(function()
SettingsFrame.Visible = true
end)
local ExitSettingsButton = script.Parent.SettingsFrame.EXIT
ExitSettingsButton.MouseButton1Click:Connect(function()
SettingsFrame.Visible = false
end)
-- GAME SETTINGS (BLOOM, COLOR CORRECTION, SHADOWS)
local SHADOWS = script.Parent.SettingsFrame.SHADOWS
SHADOWS.MouseButton1Click:Connect(function()
if game.Lighting.GlobalShadows == false then
SHADOWS.Text = 'SHADOWS ON'
game.Lighting.GlobalShadows = not game.Lighting.GlobalShadows
else
SHADOWS.Text = 'SHADOWS OFF'
game.Lighting.GlobalShadows = not game.Lighting.GlobalShadows
end
end)
local COLORC = script.Parent.SettingsFrame.COLORC
COLORC.MouseButton1Click:Connect(function()
if script.Parent.SettingsFrame.COLORC.Text == "COLORC ON" then
script.Parent.SettingsFrame.COLORC.Text = "COLORC OFF"
game.Lighting.ColorCorrection.Enabled = false
elseif script.Parent.SettingsFrame.COLORC.Text == "COLORC OFF" then
script.Parent.SettingsFrame.COLORC.Text = "COLORC ON"
game.Lighting.ColorCorrection.Enabled = true
end
end)
local BLOOM = script.Parent.SettingsFrame.BLOOM
BLOOM.MouseButton1Click:Connect(function()
if script.Parent.SettingsFrame.BLOOM.Text == "BLOOM ON" then
script.Parent.SettingsFrame.BLOOM.Text = "BLOOM OFF"
game.Lighting.Bloom.Enabled = false
elseif script.Parent.SettingsFrame.BLOOM.Text == "BLOOM OFF" then
script.Parent.SettingsFrame.BLOOM.Text = "BLOOM ON"
game.Lighting.Bloom.Enabled = true
end
end)