if workspace.Values.VEIL_LDOOR.Value == true then
-- Create and store the tween for the breathing sound volume increase
VeilBreathingTween = TweenService:Create(DoorHighlight.Parent.EntitySoundPart.VeilBreathing, TweenInfo.new(5, Enum.EasingStyle.Quint, Enum.EasingDirection.Out), {Volume = 0.04})
VeilBreathingTween:Play()
DoorHighlight.Parent.EntitySoundPart.VeilBreathing:Play()
end
-- Other Hover Enter logic...
HoverShake()
UI.Hover:Play()
UI.HoverOut:Stop()
UI.MovementIn:Play()
UI.Movement:Play()
-- Toggle Scripts
UI.Front.Disabled = true
UI.LeftDoor.Disabled = false
UI.RightDoor.Disabled = true
UI.CenterDoor.Disabled = true
-- UI Tweens
local fadeIn = TweenInfo.new(1, Enum.EasingStyle.Quint, Enum.EasingDirection.Out)
TweenService:Create(BottomGrad, fadeIn, { ImageTransparency = 0 }):Play()
TweenService:Create(FxGradient, fadeIn, { ImageTransparency = 0 }):Play()
TweenService:Create(ActionKey, fadeIn, { ImageTransparency = 0.6 }):Play()
TweenService:Create(LeftDoorAction, fadeIn, { TextTransparency = 0.3, TextStrokeTransparency = 0.3 }):Play()
-- Camera & Highlight Tweens
TweenService:Create(CurrentCamera, TweenInfo.new(1.3, Enum.EasingStyle.Quint, Enum.EasingDirection.Out), { FieldOfView = 76 }):Play()
TweenService:Create(DoorHighlight, fadeIn, { OutlineTransparency = 0.5, FillTransparency = 0.9 }):Play()
-- Light Tweens
LightLeft.Parent.Base.LightBuzz.PlaybackSpeed = 0
LightLeft.Parent.Base.LightBuzz.Volume = 0
LightLeft.Parent.Base.LightOn:Play()
LightLeft.Parent.Base.LightBuzz:Play()
TweenService:Create(Light.Parent.Parent.Base.LightBuzz, TweenInfo.new(2, Enum.EasingStyle.Quint, Enum.EasingDirection.Out), {Volume = 0.2}):Play()
TweenService:Create(Light.Parent.Parent.Base.LightBuzz, TweenInfo.new(2, Enum.EasingStyle.Quint, Enum.EasingDirection.Out), {PlaybackSpeed = 1.3}):Play()
TweenService:Create(LightLeft, fadeIn, { Color = Color3.fromRGB(255, 255, 255) }):Play()
TweenService:Create(Light, fadeIn, { Brightness = 2.56 }):Play()
TweenService:Create(LightCenter, fadeIn, { Color = Color3.fromRGB(0, 0, 0) }):Play()
TweenService:Create(LightRight, fadeIn, { Color = Color3.fromRGB(0, 0, 0) }):Play()
TweenService:Create(SpotLightCenter, fadeIn, { Brightness = 0 }):Play()
TweenService:Create(SpotLightRight, fadeIn, { Brightness = 0 }):Play()
end)
-- Mouse Hover Leave
Hitbox.MouseHoverLeave:Connect(function()
-- If the VeilBreathing tween is still playing, stop and cancel it
if VeilBreathingTween then
VeilBreathingTween:Cancel()
end
-- Fade out the VeilBreathing sound smoothly
local VeilBreathingFadeOutTween = TweenService:Create(DoorHighlight.Parent.EntitySoundPart.VeilBreathing, TweenInfo.new(0.5, Enum.EasingStyle.Quint, Enum.EasingDirection.Out), {Volume = 0})
VeilBreathingFadeOutTween:Play()
-- Other Mouse Hover Leave logic...
UI.Movement:Play()
UI.MovementOut:Play()
HoverShake()
local fadeIn = TweenInfo.new(1, Enum.EasingStyle.Quint, Enum.EasingDirection.Out)
-- Light Tweens
LightLeft.Parent.Base.LightBuzz.PlaybackSpeed = 0
LightLeft.Parent.Base.LightOn:Stop()
LightLeft.Parent.Base.LightBuzz.Volume = 0
LightLeft.Parent.Base.Off:Play()
LightLeft.Parent.Base.LightBuzz:Stop()
TweenService:Create(Light, fadeIn, { Brightness = 0 }):Play()
TweenService:Create(LightCenter, fadeIn, { Color = Color3.fromRGB(0, 0, 0) }):Play()
TweenService:Create(LightRight, fadeIn, { Color = Color3.fromRGB(0, 0, 0) }):Play()
TweenService:Create(LightLeft, fadeIn, { Color = Color3.fromRGB(0, 0, 0) }):Play()
TweenService:Create(SpotLightCenter, fadeIn, { Brightness = 0 }):Play()
TweenService:Create(SpotLightRight, fadeIn, { Brightness = 0 }):Play()
UI.HoverOut:Play()
UI.Hover:Stop()
-- Toggle Scripts
UI.Front.Disabled = false
UI.LeftDoor.Disabled = true
UI.RightDoor.Disabled = true
UI.CenterDoor.Disabled = true
-- UI Tweens
local fadeOut = TweenInfo.new(1, Enum.EasingStyle.Quint, Enum.EasingDirection.Out)
TweenService:Create(BottomGrad, fadeOut, { ImageTransparency = 1 }):Play()
TweenService:Create(FxGradient, fadeOut, { ImageTransparency = 1 }):Play()
TweenService:Create(ActionKey, fadeOut, { ImageTransparency = 1 }):Play()
TweenService:Create(LeftDoorAction, fadeOut, { TextTransparency = 1, TextStrokeTransparency = 1 }):Play()
-- Camera & Highlight Tweens
TweenService:Create(CurrentCamera, TweenInfo.new(2, Enum.EasingStyle.Quint, Enum.EasingDirection.Out), { FieldOfView = 90 }):Play()
TweenService:Create(DoorHighlight, fadeOut, { OutlineTransparency = 1, FillTransparency = 1 }):Play()
Hitbox.MaxActivationDistance = 0
wait(0.5)
Hitbox.MaxActivationDistance = 500
end) ```
interaction system