Run it
Copy the script and paste it into your executor.
F = {}
()
F.Players = :()
F.UIS = :()
F.ContextActionService = :()
F.RunService = :()
F.Lighting = :()
F.TweenService = :()
F.Debris = :()
F.SoundService = :()
_, oldMusic (F.SoundService:())
oldMusic.Name ==
(() oldMusic:(); oldMusic:() )
F.Player = F.Players.LocalPlayer
F.PlayerGui = F.Player:()
F.Camera = .CurrentCamera
F.CameraBindName = .. (F.Player.UserId)
F.AccelActionName = .. (F.Player.UserId)
F.BrakeActionName = .. (F.Player.UserId)
.WallySpeedForceCleanup
(.WallySpeedForceCleanup)
F.Camera = .CurrentCamera
F.OriginalCameraFOV = (F.Camera F.Camera.FieldOfView)
_, name ({
,
,
,
,
,
,
,
,
,
,
})
item = F.PlayerGui:(name) F.Lighting:(name)
item
item:()
_, folderName ({, })
oldVFX = :(folderName)
oldVFX oldVFX:()
legacyEffectNames = {
BarryCinematicShockwave = ,
BarrySonicCondensationFlash = ,
BarrySonicPressureFront = ,
BarrySonicMachConeAnchor = ,
BarrySonicCondensationPuff = ,
BarrySonicChargeLight = ,
BarrySonicChargeSparkAttachment = ,
BarrySonicPressureSparks = ,
BarrySonicChargeA0 = ,
BarrySonicChargeA1 = ,
BarrySpeedHaloArc = ,
}
_, rootToScan ({F.Player.Character})
rootToScan
_, object (rootToScan:())
name = object.Name
legacyEffectNames[name]
.(name, )
.(name, )
.(name, )
.(name, )
name ==
(() object:() )
F.Running =
F.Connections = {}
F.Cleanup =
F.Character =
F.Humanoid =
F.Root =
F.Connect = (signal, callback)
connection = signal:(callback)
.(F.Connections, connection)
connection
F.RED = .(, , )
F.BRIGHT_RED = .(, , )
F.DARK_RED = .(, , )
F.YELLOW = .(, , )
F.GOLD = .(, , )
F.WHITE = .(, , )
F.BLACK = .(, , )
F.DARK = .(, , )
F.GREY = .(, , )
F.Speed =
F.MaxSpeed = .huge
F.Acceleration =
F.Deceleration =
F.HoldingE =
F.HoldingQ =
F.HoldingW =
F.HoldingA =
F.HoldingS =
F.HoldingD =
F.WasCinematicSpeed =
F.HUDVisible =
F.RUN_MUSIC_ASSET_ID =
F.RUN_MUSIC_TARGET_VOLUME =
F.RUN_MUSIC_FADE_IN =
F.RUN_MUSIC_FADE_OUT =
F.RUN_MUSIC_MIN_SPEED =
F.RunMusic = .()
F.RunMusic.Name =
F.RunMusic.SoundId = F.RUN_MUSIC_ASSET_ID
F.RunMusic.Looped =
F.RunMusic.Volume =
F.RunMusic.PlaybackSpeed =
F.RunMusic.Parent = F.SoundService
F.RunMusicLastPlayAttempt =
F.UpdateRunMusic = (deltaTime, moving)
F.RunMusic F.RunMusic.Parent
shouldPlay = moving F.Speed >= F.RUN_MUSIC_MIN_SPEED
shouldPlay
F.RunMusic.IsPlaying (.() - F.RunMusicLastPlayAttempt) >
F.RunMusicLastPlayAttempt = .()
(() F.RunMusic:() )
blend = - .(-deltaTime * F.RUN_MUSIC_FADE_IN)
F.RunMusic.Volume = F.RunMusic.Volume + (F.RUN_MUSIC_TARGET_VOLUME - F.RunMusic.Volume) * blend
F.RunMusic.Volume = .(, F.RunMusic.Volume - deltaTime * F.RUN_MUSIC_FADE_OUT)
F.RunMusic.Volume <= F.RunMusic.IsPlaying
(() F.RunMusic:() )
F.SPEED_BEAM_START_SPEED =
F.SPEED_BEAM_FULL_DENSITY_SPEED =
F.CINEMATIC_THRESHOLD =
F.REALITY_WARP_THRESHOLD =
F.TIME_RIFT_THRESHOLD =
F.LIGHTNING_REFRESH =
F.REALITY_WARP_BEAM_COUNT =
F.TIME_RIFT_STREAK_COUNT =
F.TIME_RIFT_RING_COUNT =
F.TIME_RIFT_RING_SEGMENTS =
F.VFXFolder = .()
F.VFXFolder.Name =
F.VFXFolder.Parent =
F.AddCorner = (parent, radius)
corner = .()
corner.CornerRadius = .(, radius)
corner.Parent = parent
corner
F.AddStroke = (parent, color, thickness)
stroke = .()
stroke.Color = color
stroke.Thickness = thickness
stroke.Parent = parent
stroke
F.MakeLabel = (parent, name, size, position, text, color, font, textSize, zIndex)
label = .()
label.Name = name
label.Size = size
label.Position = position
label.BackgroundTransparency =
label.Text = text
label.TextColor3 = color
label.Font = font
label.TextSize = textSize
label.ZIndex = zIndex
label.Parent = parent
label
F.GUI = .()
F.GUI.Name =
F.GUI.ResetOnSpawn =
F.GUI.IgnoreGuiInset =
F.GUI.DisplayOrder =
F.GUI.Parent = F.PlayerGui
F.Shadow = .()
F.Shadow.Name =
F.Shadow.Size = .(, , , )
F.Shadow.Position = .(, -, , )
F.Shadow.BackgroundColor3 = .(, , )
F.Shadow.BackgroundTransparency =
F.Shadow.BorderSizePixel =
F.Shadow.ZIndex =
F.Shadow.Parent = F.GUI
F.(F.Shadow, )
F.Main = .()
F.Main.Name =
F.Main.Size = .(, , , )
F.Main.Position = .(, -, , )
F.Main.BackgroundColor3 = F.BLACK
F.Main.BackgroundTransparency =
F.Main.BorderSizePixel =
F.Main.Active =
F.Main.ZIndex =
F.Main.Parent = F.GUI
F.(F.Main, )
F.MainStroke = F.(F.Main, F.RED, )
F.MainStroke.Transparency =
F.MainGradient = .()
F.MainGradient.Rotation =
F.MainGradient.Color = ColorSequence.({
ColorSequenceKeypoint.(, .(, , )),
ColorSequenceKeypoint.(, .(, , )),
ColorSequenceKeypoint.(, .(, , )),
})
F.MainGradient.Parent = F.Main
F.TelemetryPanel = .()
F.TelemetryPanel.Name =
F.TelemetryPanel.Position = .(, )
F.TelemetryPanel.Size = .(, )
F.TelemetryPanel.BackgroundColor3 = .(, , )
F.TelemetryPanel.BackgroundTransparency =
F.TelemetryPanel.BorderSizePixel =
F.TelemetryPanel.ZIndex =
F.TelemetryPanel.Parent = F.Main
F.(F.TelemetryPanel, )
F.TelemetryPanelStroke = F.(F.TelemetryPanel, .(, , ), )
F.TelemetryPanelStroke.Transparency =
F.ControlPanel = .()
F.ControlPanel.Name =
F.ControlPanel.Position = .(, )
F.ControlPanel.Size = .(, )
F.ControlPanel.BackgroundColor3 = .(, , )
F.ControlPanel.BackgroundTransparency =
F.ControlPanel.BorderSizePixel =
F.ControlPanel.ZIndex =
F.ControlPanel.Parent = F.Main
F.(F.ControlPanel, )
F.ControlPanelStroke = F.(F.ControlPanel, .(, , ), )
F.ControlPanelStroke.Transparency =
F.HeaderDivider = .()
F.HeaderDivider.Name =
F.HeaderDivider.Position = .(, )
F.HeaderDivider.Size = .(, -, , )
F.HeaderDivider.BackgroundColor3 = .(, , )
F.HeaderDivider.BackgroundTransparency =
F.HeaderDivider.BorderSizePixel =
F.HeaderDivider.ZIndex =
F.HeaderDivider.Parent = F.Main
F.LeftEdgeAccent = .()
F.LeftEdgeAccent.Name =
F.LeftEdgeAccent.Position = .(, )
F.LeftEdgeAccent.Size = .(, , , -)
F.LeftEdgeAccent.BackgroundColor3 = F.RED
F.LeftEdgeAccent.BorderSizePixel =
F.LeftEdgeAccent.ZIndex =
F.LeftEdgeAccent.Parent = F.Main
F.(F.LeftEdgeAccent, )
edgeGradient = .()
edgeGradient.Color = ColorSequence.({
ColorSequenceKeypoint.(, F.RED),
ColorSequenceKeypoint.(, F.YELLOW),
ColorSequenceKeypoint.(, F.RED),
})
edgeGradient.Rotation =
edgeGradient.Parent = F.LeftEdgeAccent
.(()
F.Main.Parent
camera = .CurrentCamera F.Camera
camera
viewport = camera.ViewportSize
x = viewport.X * F.Main.Position.X.Scale + F.Main.Position.X.Offset
y = viewport.Y * F.Main.Position.Y.Scale + F.Main.Position.Y.Offset
x = .(x, , .(, viewport.X - F.Main.AbsoluteSize.X))
y = .(y, , .(, viewport.Y - F.Main.AbsoluteSize.Y))
F.Main.Position = .(x, y)
F.Shadow.Position = .(
.(x + , , .(, viewport.X - F.Shadow.AbsoluteSize.X)),
.(y + , , .(, viewport.Y - F.Shadow.AbsoluteSize.Y))
)
)
F.TopLine = .()
F.TopLine.Name =
F.TopLine.Size = .(, , , )
F.TopLine.BackgroundColor3 = F.RED
F.TopLine.BorderSizePixel =
F.TopLine.ZIndex =
F.TopLine.Parent = F.Main
F.(F.TopLine, )
F.TopGradient = .()
F.TopGradient.Color = ColorSequence.({
ColorSequenceKeypoint.(, F.RED),
ColorSequenceKeypoint.(, F.BRIGHT_RED),
ColorSequenceKeypoint.(, F.YELLOW),
ColorSequenceKeypoint.(, F.WHITE),
ColorSequenceKeypoint.(, F.RED),
})
F.TopGradient.Parent = F.TopLine
F.Header = .()
F.Header.Name =
F.Header.Size = .(, -, , )
F.Header.Position = .(, , , )
F.Header.BackgroundTransparency =
F.Header.Active =
F.Header.ZIndex =
F.Header.Parent = F.Main
F.(F.Header, , .(, , , ), .(, , , ), , F.YELLOW, .Font.GothamBlack, , )
F.Title = F.(F.Header, , .(, , , ), .(, , , ), , F.WHITE, .Font.GothamBlack, , )
F.Title.TextXAlignment = .TextXAlignment.Left
F.Subtitle = F.(F.Header, , .(, , , ), .(, , , ), , F.GREY, .Font.Code, , )
F.Subtitle.TextXAlignment = .TextXAlignment.Left
F.Status = .()
F.Status.Name =
F.Status.Size = .(, , , )
F.Status.Position = .(, -, , )
F.Status.BackgroundColor3 = F.DARK_RED
F.Status.Text =
F.Status.TextColor3 = F.GREY
F.Status.Font = .Font.GothamBold
F.Status.TextSize =
F.Status.BorderSizePixel =
F.Status.ZIndex =
F.Status.Parent = F.Main
F.(F.Status, )
F.(F.Status, F.RED, )
F.HideButton = .()
F.HideButton.Name =
F.HideButton.Size = .(, , , )
F.HideButton.Position = .(, -, , )
F.HideButton.BackgroundColor3 = F.DARK
F.HideButton.Text =
F.HideButton.TextColor3 = F.YELLOW
F.HideButton.Font = .Font.GothamBold
F.HideButton.TextSize =
F.HideButton.BorderSizePixel =
F.HideButton.ZIndex =
F.HideButton.Parent = F.Main
F.(F.HideButton, )
F.(F.HideButton, F.YELLOW, )
F.CloseButton = .()
F.CloseButton.Name =
F.CloseButton.Size = .(, , , )
F.CloseButton.Position = .(, -, , )
F.CloseButton.BackgroundColor3 = .(, , )
F.CloseButton.Text =
F.CloseButton.TextColor3 = F.BRIGHT_RED
F.CloseButton.Font = .Font.GothamBold
F.CloseButton.TextSize =
F.CloseButton.BorderSizePixel =
F.CloseButton.ZIndex =
F.CloseButton.Active =
F.CloseButton.Selectable =
F.CloseButton.AutoButtonColor =
F.CloseButton.Parent = F.Main
F.(F.CloseButton, )
F.(F.CloseButton, F.RED, )
F.(F.CloseButton.Activated, ()
F.Cleanup
(F.Cleanup)
F.Running =
_, connection (F.Connections)
(() connection:() )
.(F.Connections)
(() F.RunService:(F.CameraBindName) )
F.VFXFolder F.VFXFolder.Parent (() F.VFXFolder:() )
F.GUI F.GUI.Parent (() F.GUI:() )
)
F.TelemetryTag = F.(F.Main, , .(, ), .(, ), , F.GREY, .Font.Code, , )
F.TelemetryTag.TextXAlignment = .TextXAlignment.Left
F.ControlTag = F.(F.Main, , .(, ), .(, ), , F.YELLOW, .Font.Code, , )
F.ControlTag.TextXAlignment = .TextXAlignment.Left
F.ControlHint = F.(F.Main, , .(, ), .(, ), , F.GREY, .Font.Code, , )
F.ControlHint.TextXAlignment = .TextXAlignment.Left
F.SpeedNumber = F.(F.Main, , .(, , , ), .(, , , ), , F.GREY, .Font.GothamBlack, , )
F.SpeedNumber.TextXAlignment = .TextXAlignment.Left
F.SpeedStroke = F.(F.SpeedNumber, F.RED, )
F.SpeedStroke.Transparency =
F.Units = F.(F.Main, , .(, , , ), .(, , , ), , F.GREY, .Font.Code, , )
F.Units.TextXAlignment = .TextXAlignment.Left
F.VelocityLabel = F.(F.Main, , .(, , , ), .(, , , ), , F.YELLOW, .Font.Code, , )
F.VelocityLabel.TextXAlignment = .TextXAlignment.Left
F.BarBack = .()
F.BarBack.Name =
F.BarBack.Size = .(, , , )
F.BarBack.Position = .(, , , )
F.BarBack.BackgroundColor3 = .(, , )
F.BarBack.BorderSizePixel =
F.BarBack.ZIndex =
F.BarBack.Parent = F.Main
F.(F.BarBack, )
F.BarGlow = .()
F.BarGlow.Name =
F.BarGlow.Size = .(, , , )
F.BarGlow.BackgroundColor3 = F.RED
F.BarGlow.BackgroundTransparency =
F.BarGlow.BorderSizePixel =
F.BarGlow.ZIndex =
F.BarGlow.Parent = F.BarBack
F.(F.BarGlow, )
F.Fill = .()
F.Fill.Name =
F.Fill.Size = .(, , , )
F.Fill.BackgroundColor3 = F.RED
F.Fill.BorderSizePixel =
F.Fill.ZIndex =
F.Fill.Parent = F.BarBack
F.(F.Fill, )
F.FillGradient = .()
F.FillGradient.Color = ColorSequence.({
ColorSequenceKeypoint.(, F.RED),
ColorSequenceKeypoint.(, F.BRIGHT_RED),
ColorSequenceKeypoint.(, F.YELLOW),
ColorSequenceKeypoint.(, F.WHITE),
})
F.FillGradient.Parent = F.Fill
F.CreateKeyButton = (letter, label, position, color)
button = .()
button.Name = letter ..
button.Size = .(, , , )
button.Position = position
button.BackgroundColor3 = F.DARK
button.Text =
button.BorderSizePixel =
button.ZIndex =
button.Parent = F.Main
F.(button, )
stroke = F.(button, color, )
F.(button, , .(, , , ), .(, , , ), letter, color, .Font.GothamBlack, , )
F.(button, , .(, , , ), .(, , , ), label, F.WHITE, .Font.Code, , )
button, stroke
F.EButton, F.EStroke = F.(, , .(, -, , ), F.YELLOW)
F.QButton, F.QStroke = F.(, , .(, -, , ), F.BRIGHT_RED)
F.MobileHoldingE =
F.MobileHoldingQ =
F.ActiveEButtonInput =
F.ActiveQButtonInput =
F.IsHoldPointer = (input)
input.UserInputType == .UserInputType.MouseButton1
input.UserInputType == .UserInputType.Touch
F.(F.EButton.InputBegan, (input)
F.(input)
F.ActiveEButtonInput = input
F.MobileHoldingE =
F.EStroke.Thickness =
)
F.(F.QButton.InputBegan, (input)
F.(input)
F.ActiveQButtonInput = input
F.MobileHoldingQ =
F.QStroke.Thickness =
)
F.(F.EButton.InputEnded, (input)
F.(input)
F.MobileHoldingE =
F.ActiveEButtonInput =
F.EStroke.Thickness =
)
F.(F.QButton.InputEnded, (input)
F.(input)
F.MobileHoldingQ =
F.ActiveQButtonInput =
F.QStroke.Thickness =
)
F.Footer = F.(F.Main, , .(, , , ), .(, , , -), , F.GREY, .Font.Code, , )
F.Footer.TextXAlignment = .TextXAlignment.Left
F.Footer.TextSize =
F.Footer.TextTransparency =
F.Dragging =
F.DragStart =
F.StartPos =
F.DragInput =
F.(F.Header.InputBegan, (input)
input.UserInputType == .UserInputType.MouseButton1
input.UserInputType == .UserInputType.Touch
F.Dragging =
F.DragStart = input.Position
F.StartPos = F.Main.Position
)
F.(F.UIS.InputEnded, (input)
input.UserInputType == .UserInputType.MouseButton1
input.UserInputType == .UserInputType.Touch
F.Dragging =
)
F.(F.Header.InputChanged, (input)
input.UserInputType == .UserInputType.MouseMovement
input.UserInputType == .UserInputType.Touch
F.DragInput = input
)
F.(F.UIS.InputChanged, (input)
F.Dragging input == F.DragInput
delta = input.Position - F.DragStart
newPosition = .(
F.StartPos.X.Scale,
F.StartPos.X.Offset + delta.X,
F.StartPos.Y.Scale,
F.StartPos.Y.Offset + delta.Y
)
camera = .CurrentCamera F.Camera
viewport = camera camera.ViewportSize .(, )
pixelX = viewport.X * newPosition.X.Scale + newPosition.X.Offset
pixelY = viewport.Y * newPosition.Y.Scale + newPosition.Y.Offset
maxX = .(, viewport.X - F.Main.AbsoluteSize.X)
maxY = .(, viewport.Y - F.Main.AbsoluteSize.Y)
pixelX = .(pixelX, , maxX)
pixelY = .(pixelY, , maxY)
newPosition = .(pixelX, pixelY)
F.Main.Position = newPosition
F.Shadow.Position = .(
.(pixelX + , , maxX),
.(pixelY + , , maxY)
)
)
F.SetHUDVisible = (visible)
F.HUDVisible = visible
_, object ({
F.SpeedNumber, F.Units, F.VelocityLabel, F.BarBack,
F.EButton, F.QButton, F.Footer, F.TelemetryPanel, F.ControlPanel,
F.TelemetryTag, F.ControlTag, F.ControlHint,
})
object.Visible = visible
visible
F.Main.Size = .(, , , )
F.Shadow.Size = .(, , , )
F.HideButton.Text =
F.Main.Size = .(, , , )
F.Shadow.Size = .(, , , )
F.HideButton.Text =
F.(F.HideButton.MouseButton1Click, ()
F.( F.HUDVisible)
)
F.CinematicGrade = .()
F.CinematicGrade.Name =
F.CinematicGrade.Enabled =
F.CinematicGrade.Brightness =
F.CinematicGrade.Contrast =
F.CinematicGrade.Saturation =
F.CinematicGrade.TintColor = F.WHITE
F.CinematicGrade.Parent = F.Lighting
F.CinematicBloom = .()
F.CinematicBloom.Name =
F.CinematicBloom.Enabled =
F.CinematicBloom.Intensity =
F.CinematicBloom.Size =
F.CinematicBloom.Threshold =
F.CinematicBloom.Parent = F.Lighting
F.TimeRiftGrade = .()
F.TimeRiftGrade.Name =
F.TimeRiftGrade.Enabled =
F.TimeRiftGrade.Brightness =
F.TimeRiftGrade.Contrast =
F.TimeRiftGrade.Saturation =
F.TimeRiftGrade.TintColor = F.WHITE
F.TimeRiftGrade.Parent = F.Lighting
F.TimeRiftBloom = .()
F.TimeRiftBloom.Name =
F.TimeRiftBloom.Enabled =
F.TimeRiftBloom.Intensity =
F.TimeRiftBloom.Size =
F.TimeRiftBloom.Threshold =
F.TimeRiftBloom.Parent = F.Lighting
F.CinematicHighlight =
F.CinematicLight =
F.CinematicSpark =
F.CinematicSparkAttachment =
F.CinematicBeams = {}
F.CinematicArcs = {}
F.CinematicWakeBolts = {}
F.CinematicAttachments = {}
F.CinematicWakeTrails = {}
F.CinematicLimbTrails = {}
F.CinematicBlurStreaks = {}
F.TRAIL_SEGMENTS =
F.TRAIL_SEGMENT_LENGTH =
F.TRAIL_CURVE_LAG =
F.TRAIL_TURN_RATE =
F.TrailHeading =
F.TrailHistory = {}
F.TrailSpine = {}
F.TrailHeadings = {}
F.CinematicGroundHaze =
F.CinematicGroundAttachment =
F.RealityWarpBeams = {}
F.RealityWarpAttachments = {}
F.RealityWarpDistance =
F.RealityWarpActiveBeamCount =
F.RealityWarpSpawnCredit =
F.RealityWarpQualityScale =
F.RealityWarpQualityTimer =
F.RealityWarpQualityFrameTotal =
F.RealityWarpQualityFrameSamples =
F.TimeRiftBeams = {}
F.TimeRiftRingBeams = {}
F.TimeRiftAttachments = {}
F.TimeRiftDistance =
F.TimeRiftRotation =
F.BodyRootMotor =
F.BodyPartBaseline = {}
F.LastBodyOffset =
F.LastBodyBaseTransform =
F.LastBodyAppliedTransform =
F.BodyWasPhasing =
F.WorldSlowMotionTracks = {}
F.WorldSlowMotionTimer =
F.WORLD_SLOW_RADIUS =
F.WORLD_SLOW_THRESHOLD =
F.IsVisualObject = (object)
object:()
object:()
object:()
object:()
F.RemoveNonVisualChildren = (part)
_, child (part:())
F.(child)
(() child:() )
F.SetupTrail = (char)
torso = char:()
char:()
char:()
torso
_, object (char:())
object:() (.(object.Name, )
.(object.Name, )
.(object.Name, )
.(object.Name, )
.(object.Name, )
.(object.Name, )
.(object.Name, ))
object:()
.(object.Name, ) object.Name ==
object:()
light = .()
light.Name =
light.Color = F.YELLOW
light.Range =
light.Brightness =
light.Shadows =
light.Parent = torso
F.SetupSmoke = (char)
root = char:()
root
old = root:()
old old:()
attachment = .()
attachment.Name =
attachment.Position = .(, -, )
attachment.Parent = root
dust = .()
dust.Name =
dust.Texture =
dust.Color = ColorSequence.({
ColorSequenceKeypoint.(, .(, , )),
ColorSequenceKeypoint.(, .(, , )),
ColorSequenceKeypoint.(, .(, , )),
})
dust.Size = NumberSequence.({
NumberSequenceKeypoint.(, ),
NumberSequenceKeypoint.(, ),
NumberSequenceKeypoint.(, ),
NumberSequenceKeypoint.(, ),
})
dust.Transparency = NumberSequence.({
NumberSequenceKeypoint.(, ),
NumberSequenceKeypoint.(, ),
NumberSequenceKeypoint.(, ),
})
dust.Lifetime = NumberRange.(, )
dust.Speed = NumberRange.(, )
dust.SpreadAngle = .(, )
dust.Rotation = NumberRange.(-, )
dust.RotSpeed = NumberRange.(-, )
dust.Drag =
dust.Rate =
dust.Parent = attachment
fastDust = .()
fastDust.Name =
fastDust.Texture =
fastDust.Color = ColorSequence.({
ColorSequenceKeypoint.(, F.WHITE),
ColorSequenceKeypoint.(, F.YELLOW),
ColorSequenceKeypoint.(, F.GOLD),
})
fastDust.Size = NumberSequence.({
NumberSequenceKeypoint.(, ),
NumberSequenceKeypoint.(, ),
NumberSequenceKeypoint.(, ),
})
fastDust.Transparency = NumberSequence.({
NumberSequenceKeypoint.(, ),
NumberSequenceKeypoint.(, ),
})
fastDust.Lifetime = NumberRange.(, )
fastDust.Speed = NumberRange.(, )
fastDust.SpreadAngle = .(, )
fastDust.Drag =
fastDust.LightEmission =
fastDust.Rate =
fastDust.Parent = attachment
energy = .()
energy.Name =
energy.Texture =
energy.Color = ColorSequence.({
ColorSequenceKeypoint.(, F.YELLOW),
ColorSequenceKeypoint.(, F.GOLD),
ColorSequenceKeypoint.(, F.RED),
})
energy.Size = NumberSequence.({
NumberSequenceKeypoint.(, ),
NumberSequenceKeypoint.(, ),
NumberSequenceKeypoint.(, ),
})
energy.Transparency = NumberSequence.({
NumberSequenceKeypoint.(, ),
NumberSequenceKeypoint.(, ),
})
energy.Lifetime = NumberRange.(, )
energy.Speed = NumberRange.(, )
energy.SpreadAngle = .(, )
energy.Drag =
energy.LightEmission =
energy.Rate =
energy.Parent = attachment
F.SetupEnergy = (char)
torso = char:()
char:()
char:()
torso
old = torso:()
old old:()
attachment = .()
attachment.Name =
attachment.Parent = torso
particle = .()
particle.Name =
particle.Texture =
particle.Color = ColorSequence.({
ColorSequenceKeypoint.(, F.WHITE),
ColorSequenceKeypoint.(, F.YELLOW),
ColorSequenceKeypoint.(, F.GOLD),
})
particle.Size = NumberSequence.({
NumberSequenceKeypoint.(, ),
NumberSequenceKeypoint.(, ),
})
particle.Transparency = NumberSequence.({
NumberSequenceKeypoint.(, ),
NumberSequenceKeypoint.(, ),
})
particle.Lifetime = NumberRange.(, )
particle.Speed = NumberRange.(, )
particle.Rotation = NumberRange.(-, )
particle.Rate =
particle.LightEmission =
particle.Parent = attachment
F.DestroyCinematicCharacterEffects = ()
_, trail (F.CinematicWakeTrails)
(() trail:() )
.(F.CinematicWakeTrails)
_, entry (F.CinematicLimbTrails)
trail = entry.Trail entry
trail (() trail:() )
.(F.CinematicLimbTrails)
_, beam (F.CinematicBeams)
(() beam:() )
.(F.CinematicBeams)
_, bolt (F.CinematicWakeBolts)
_, beam (bolt.Beams {})
(() beam:() )
.(F.CinematicWakeBolts)
.(F.CinematicArcs)
.(F.CinematicBlurStreaks)
F.CinematicGroundHaze =
F.CinematicGroundAttachment =
_, attachment (F.CinematicAttachments)
(() attachment:() )
.(F.CinematicAttachments)
F.CinematicHighlight
F.CinematicHighlight:()
F.CinematicHighlight =
F.CinematicLight
F.CinematicLight:()
F.CinematicLight =
F.CinematicSparkAttachment
F.CinematicSparkAttachment:()
F.CinematicSparkAttachment =
F.CinematicSpark =
F.SetupCinematicCharacter = (char)
F.()
torso = char:()
char:()
char:()
root = char:()
torso root
(name)
part = char:(name)
part part:() part
F.CinematicHighlight = .()
F.CinematicHighlight.Name =
F.CinematicHighlight.Adornee = char
F.CinematicHighlight.FillColor = F.GOLD
F.CinematicHighlight.OutlineColor = F.YELLOW
F.CinematicHighlight.FillTransparency =
F.CinematicHighlight.OutlineTransparency =
F.CinematicHighlight.DepthMode = .HighlightDepthMode.Occluded
F.CinematicHighlight.Enabled =
F.CinematicHighlight.Parent = F.VFXFolder
F.CinematicLight = .()
F.CinematicLight.Name =
F.CinematicLight.Color = .(, , )
F.CinematicLight.Brightness =
F.CinematicLight.Range =
F.CinematicLight.Shadows =
F.CinematicLight.Parent = torso
F.CinematicSparkAttachment = .()
F.CinematicSparkAttachment.Name =
F.CinematicSparkAttachment.Position = .(, -, )
F.CinematicSparkAttachment.Parent = root
F.CinematicSpark = .()
F.CinematicSpark.Name =
F.CinematicSpark.Texture =
F.CinematicSpark.Color = ColorSequence.({
ColorSequenceKeypoint.(, F.WHITE),
ColorSequenceKeypoint.(, F.YELLOW),
ColorSequenceKeypoint.(, F.GOLD),
})
F.CinematicSpark.Size = NumberSequence.({
NumberSequenceKeypoint.(, ),
NumberSequenceKeypoint.(, ),
NumberSequenceKeypoint.(, ),
})
F.CinematicSpark.Transparency = NumberSequence.({
NumberSequenceKeypoint.(, ),
NumberSequenceKeypoint.(, ),
})
F.CinematicSpark.Lifetime = NumberRange.(, )
F.CinematicSpark.Speed = NumberRange.(, )
F.CinematicSpark.SpreadAngle = .(, )
F.CinematicSpark.EmissionDirection = .NormalId.Front
F.CinematicSpark.Orientation = .ParticleOrientation.VelocityParallel
F.CinematicSpark.LightEmission =
F.CinematicSpark.Rate =
F.CinematicSpark.Parent = F.CinematicSparkAttachment
WAKE_POINTS =
WAKE_LENGTH =
(names)
_, n (names)
candidate = (n)
candidate candidate
torso
anchorParts = {
head = ({}),
chest = ({, }),
waist = ({, }),
lhand = ({, }),
rhand = ({, }),
lknee = ({, }),
rknee = ({, }),
lfoot = ({, }),
rfoot = ({, }),
}
wakeBoltDefinitions = {
{, , , , , },
{, -, , , , },
{, , , , , },
{, , , , , },
{, -,-, , , },
{, , , , , },
{, -, , , , },
{, , , , , },
{, -, , , , },
{, , , , , },
{, -, , , , },
{, , , , , },
}
boltIndex, def (wakeBoltDefinitions)
attachments, basePoints, beams = {}, {}, {}
p = , WAKE_POINTS
t = (p - ) / (WAKE_POINTS - )
point = .(def[], def[], .(t, ) * WAKE_LENGTH * def[])
attachment = .()
attachment.Name = .. def[] .. .. p
attachment.Position = point
attachment.Parent = root
.(F.CinematicAttachments, attachment)
.(attachments, attachment)
.(basePoints, point)
s = , WAKE_POINTS -
t = (s - ) / (WAKE_POINTS - )
beam = .()
beam.Name =
beam.Attachment0 = attachments[s]
beam.Attachment1 = attachments[s + ]
beam.Color = ColorSequence.({
ColorSequenceKeypoint.(, .(, , )),
ColorSequenceKeypoint.(, .(, , )),
ColorSequenceKeypoint.(, F.GOLD),
})
beam.Transparency = NumberSequence.(.( + t * , , ))
beam.Width0 =
beam.Width1 =
beam.Segments =
beam.FaceCamera =
beam.LightEmission =
beam.LightInfluence =
beam.Enabled =
beam.Parent = F.VFXFolder
.(beams, beam)
.(F.CinematicWakeBolts, {
Name = def[], Attachments = attachments, BasePoints = basePoints, Beams = beams,
Spread = def[], Phase = .() * .pi * , LastRefresh = , Index = boltIndex,
Anchor = anchorParts[def[]] torso, Jitter = {},
})
(stops, t, lerpFn)
i = , #stops -
lo, hi = stops[i], stops[i + ]
t <= hi[]
(lo[], hi[], (t - lo[]) / (hi[] - lo[]))
stops[#stops][]
blurColorStops = {
{, .(, , )},
{, .(, , )},
{, .(, , )},
{, .(, , )},
}
blurAlphaStops = {{, }, {, }, {, }, {, }}
(t)
(blurColorStops, t, (x, y, f) x:(y, f) )
(t)
(blurAlphaStops, t, (x, y, f) x + (y - x) * f )
BLUR_SEGMENTS =
blurDefinitions = {
{, , , , , },
{, , , -, , },
{, , , , , },
{, , , -, , },
{, , , , , },
{, , , -, , },
{, , , , , },
{, , , , , },
{, , , , , },
{, , , , , },
{, , , , , },
{, , , , , },
{, , -, -, , },
{, , , -, , },
}
_, def (blurDefinitions)
attachments, beams = {}, {}
seg = , BLUR_SEGMENTS
attachment = .()
attachment.Name = .. seg .. .. def[]
attachment.Parent = root
.(F.CinematicAttachments, attachment)
.(attachments, attachment)
seg = , BLUR_SEGMENTS
t0, t1 = (seg - ) / BLUR_SEGMENTS, seg / BLUR_SEGMENTS
beam = .()
beam.Name =
beam.Attachment0 = attachments[seg]
beam.Attachment1 = attachments[seg + ]
beam.Color = ColorSequence.({
ColorSequenceKeypoint.(, (t0)),
ColorSequenceKeypoint.(, (t1)),
})
beam.Transparency = NumberSequence.({
NumberSequenceKeypoint.(, (t0)),
NumberSequenceKeypoint.(, (t1)),
})
beam.Width0 = def[]
beam.Width1 = def[]
beam.Segments =
beam.FaceCamera =
beam.LightEmission =
beam.LightInfluence =
beam.Enabled =
beam.Parent = F.VFXFolder
.(F.CinematicBeams, beam)
.(beams, beam)
.(F.CinematicBlurStreaks, {
Beams = beams, Attachments = attachments, Anchor = anchorParts[def[]] torso,
X = def[], Y = def[], Width = def[], Length = def[],
Phase = .() * .pi * ,
})
groundAttachment = .()
groundAttachment.Name =
groundAttachment.Position = .(, -, )
groundAttachment.Parent = root
F.CinematicGroundAttachment = groundAttachment
.(F.CinematicAttachments, groundAttachment)
F.CinematicGroundHaze = .()
F.CinematicGroundHaze.Name =
F.CinematicGroundHaze.Texture =
F.CinematicGroundHaze.Color = ColorSequence.({
ColorSequenceKeypoint.(, .(, , )),
ColorSequenceKeypoint.(, F.YELLOW),
ColorSequenceKeypoint.(, F.GOLD),
ColorSequenceKeypoint.(, F.BRIGHT_RED),
})
F.CinematicGroundHaze.Size = NumberSequence.({
NumberSequenceKeypoint.(, ),
NumberSequenceKeypoint.(, ),
NumberSequenceKeypoint.(, ),
})
F.CinematicGroundHaze.Transparency = NumberSequence.({
NumberSequenceKeypoint.(, ),
NumberSequenceKeypoint.(, ),
NumberSequenceKeypoint.(, ),
})
F.CinematicGroundHaze.Lifetime = NumberRange.(, )
F.CinematicGroundHaze.Speed = NumberRange.(, )
F.CinematicGroundHaze.SpreadAngle = .(, )
F.CinematicGroundHaze.EmissionDirection = .NormalId.Front
F.CinematicGroundHaze.Drag =
F.CinematicGroundHaze.LightEmission =
F.CinematicGroundHaze.Rate =
F.CinematicGroundHaze.Parent = groundAttachment
(part0, pos0, part1, pos1, arcName)
part0 part1
endpointA = .()
endpointA.Name = .. arcName
endpointA.Position = pos0
endpointA.Parent = part0
.(F.CinematicAttachments, endpointA)
endpointB = .()
endpointB.Name = .. arcName
endpointB.Position = pos1
endpointB.Parent = part1
.(F.CinematicAttachments, endpointB)
bendA = .()
bendA.Name = .. arcName
bendA.Parent = root
.(F.CinematicAttachments, bendA)
bendB = .()
bendB.Name = .. arcName
bendB.Parent = root
.(F.CinematicAttachments, bendB)
segmentPairs = {
{endpointA, bendA},
{bendA, bendB},
{bendB, endpointB},
}
segments = {}
index, pair (segmentPairs)
beam = .()
beam.Name =
beam.Attachment0 = pair[]
beam.Attachment1 = pair[]
beam.Color = ColorSequence.({
ColorSequenceKeypoint.(, F.WHITE),
ColorSequenceKeypoint.(, .(, , )),
ColorSequenceKeypoint.(, F.YELLOW),
ColorSequenceKeypoint.(, F.GOLD),
})
beam.Transparency = NumberSequence.({
NumberSequenceKeypoint.(, ),
NumberSequenceKeypoint.(, ),
})
beam.Width0 = index ==
beam.Width1 =
beam.Segments =
beam.FaceCamera =
beam.LightEmission =
beam.LightInfluence =
beam.Enabled =
beam.Parent = F.VFXFolder
.(F.CinematicBeams, beam)
.(segments, beam)
.(F.CinematicArcs, {
Name = arcName,
A = endpointA,
B = endpointB,
BendA = bendA,
BendB = bendB,
Segments = segments,
Phase = .() * .pi * ,
LastRefresh = ,
})
upperTorso = ()
lowerTorso = ()
torsoPart = ()
head = ()
upperTorso lowerTorso
(upperTorso, .(, -upperTorso.Size.Y * , ),
lowerTorso, .(, lowerTorso.Size.Y * , ), )
head upperTorso
(head, .(, -head.Size.Y * , ),
upperTorso, .(, upperTorso.Size.Y * , ), )
limbLinks = {
{, , },
{, , },
{, , },
{, , },
{, , },
{, , },
}
_, link (limbLinks)
upper = (link[])
lower = (link[])
upper lower
(
upper,
.(, -upper.Size.Y * , ),
lower,
.(, lower.Size.Y * , ),
link[]
)
torsoPart
_, side ({
{Sign = -, Arm = , Leg = , Tag = },
{Sign = , Arm = , Leg = , Tag = },
})
arm = (side.Arm)
arm
(torsoPart,
.(side.Sign * torsoPart.Size.X * , torsoPart.Size.Y * , ),
arm, .(, arm.Size.Y * , ), side.Tag .. )
leg = (side.Leg)
leg
(torsoPart,
.(side.Sign * torsoPart.Size.X * , -torsoPart.Size.Y * , ),
leg, .(, leg.Size.Y * , ), side.Tag .. )
F.ClearRealityWarpBeams = ()
_, entry (F.RealityWarpBeams)
entry.Beam
(() entry.Beam:() )
.(F.RealityWarpBeams)
_, attachment (F.RealityWarpAttachments)
attachment
(() attachment:() )
.(F.RealityWarpAttachments)
F.RealityWarpDistance =
F.RealityWarpActiveBeamCount =
F.RealityWarpSpawnCredit =
F.RealityWarpQualityTimer =
F.RealityWarpQualityFrameTotal =
F.RealityWarpQualityFrameSamples =
F.RealityWarpQualityScale =
F.GetSpeedBeamProgress = ()
F.Speed < F.SPEED_BEAM_START_SPEED
F.Speed == .huge F.Speed >= F.SPEED_BEAM_FULL_DENSITY_SPEED
normalized = .(F.Speed / F.SPEED_BEAM_START_SPEED)
/ .(F.SPEED_BEAM_FULL_DENSITY_SPEED / F.SPEED_BEAM_START_SPEED)
.(normalized, , )
F.GetTargetSpeedBeamCount = (progress)
minimumCount =
visibleCeiling = .(F.REALITY_WARP_BEAM_COUNT * )
scaled = .(.(progress, , ), )
desired = minimumCount
+ .(scaled * (visibleCeiling - minimumCount))
F.RealityWarpQualityScale <
desired = .(minimumCount, .(desired * F.RealityWarpQualityScale))
.(desired, minimumCount, .(F.REALITY_WARP_BEAM_COUNT * ))
F.SetupRealityWarpBeams = (char)
F.()
root = char char:()
root
goldenAngle = .pi * ( - .())
i = , F.REALITY_WARP_BEAM_COUNT
a0 = .()
a0.Name = .. i
a0.Parent = root
.(F.RealityWarpAttachments, a0)
a1 = .()
a1.Name = .. i
a1.Parent = root
.(F.RealityWarpAttachments, a1)
beam = .()
beam.Name =
beam.Attachment0 = a0
beam.Attachment1 = a1
beam.Segments =
beam.FaceCamera =
beam.LightEmission =
beam.LightInfluence =
beam.Width0 =
beam.Width1 =
beam.Transparency = NumberSequence.({
NumberSequenceKeypoint.(, ),
NumberSequenceKeypoint.(, ),
NumberSequenceKeypoint.(, ),
NumberSequenceKeypoint.(, ),
})
beam.Enabled =
beam.Parent = F.VFXFolder
isWhiteHot = (i % == ) (i % == )
isAmber = (i % == )
baseWidth
radius
length
layer
lane = ((i - ) % ) +
lane <=
layer =
radius = .(, ) /
length = .(, ) /
baseWidth = .(, ) /
lane <=
layer =
radius = .(, ) /
length = .(, ) /
baseWidth = .(, ) /
layer =
radius = .(, ) /
length = .(, ) /
baseWidth = .(, ) /
isWhiteHot
beam.Color = ColorSequence.({
ColorSequenceKeypoint.(, F.WHITE),
ColorSequenceKeypoint.(, .(, , )),
ColorSequenceKeypoint.(, F.YELLOW),
ColorSequenceKeypoint.(, .(, , )),
})
beam.Transparency = NumberSequence.({
NumberSequenceKeypoint.(, ),
NumberSequenceKeypoint.(, ),
NumberSequenceKeypoint.(, ),
NumberSequenceKeypoint.(, ),
})
isAmber
beam.Color = ColorSequence.({
ColorSequenceKeypoint.(, F.YELLOW),
ColorSequenceKeypoint.(, F.GOLD),
ColorSequenceKeypoint.(, .(, , )),
})
beam.Transparency = NumberSequence.({
NumberSequenceKeypoint.(, ),
NumberSequenceKeypoint.(, ),
NumberSequenceKeypoint.(, ),
NumberSequenceKeypoint.(, ),
})
beam.Color = ColorSequence.({
ColorSequenceKeypoint.(, .(, , )),
ColorSequenceKeypoint.(, F.YELLOW),
ColorSequenceKeypoint.(, F.GOLD),
ColorSequenceKeypoint.(, .(, , )),
})
angle = (i - ) * goldenAngle
+ (.() - ) *
phase = ((i - ) / F.REALITY_WARP_BEAM_COUNT) *
+ .() *
drift = (.() - ) *
pulsePhase = .() * .pi *
pulseRate = .(, ) /
flow = .(, ) /
verticalBias = (.() - ) *
.(F.RealityWarpBeams, {
Beam = beam,
A0 = a0,
A1 = a1,
Angle = angle,
Radius = radius,
Phase = phase,
Length = length,
Drift = drift,
Index = i,
Layer = layer,
BaseWidth = baseWidth,
IsWhiteHot = isWhiteHot,
IsAmber = isAmber,
Ahead = (lane == lane == lane == ),
SideLane = (lane == lane == lane == lane == ),
SideSign = (i % == ) - ,
PulsePhase = pulsePhase,
PulseRate = pulseRate,
Flow = flow,
VerticalBias = verticalBias,
})
F.UpdateRealityWarpBeams = (deltaTime, isMoving)
active = F.Speed >= F.SPEED_BEAM_START_SPEED
isMoving
F.Root ~=
F.Root.Parent ~=
active
_, entry (F.RealityWarpBeams)
entry.Beam entry.Beam.Enabled
entry.Beam.Enabled =
F.RealityWarpActiveBeamCount =
F.RealityWarpSpawnCredit =
progress = F.()
targetCount = F.(progress)
F.Speed >= F.TIME_RIFT_THRESHOLD
riftIntensity
F.Speed == .huge
riftIntensity =
ratio = .(F.Speed / F.TIME_RIFT_THRESHOLD, )
riftIntensity = + .(.(ratio) / .(), , ) *
handoff = + * riftIntensity
targetCount = .(, .(targetCount * ( - handoff)))
clock = .()
sideAxis, upAxis, travelAxis = F.()
F.RealityWarpActiveBeamCount <
F.RealityWarpActiveBeamCount =
F.RealityWarpActiveBeamCount < targetCount
spawnRate = + .(progress, ) *
F.RealityWarpSpawnCredit += deltaTime * spawnRate
ready = .(F.RealityWarpSpawnCredit)
addCount = .(ready, targetCount - .(F.RealityWarpActiveBeamCount), )
addCount >
F.RealityWarpActiveBeamCount += addCount
F.RealityWarpSpawnCredit -= addCount
F.RealityWarpActiveBeamCount > targetCount
F.RealityWarpActiveBeamCount = .(
targetCount,
F.RealityWarpActiveBeamCount - deltaTime *
)
F.RealityWarpSpawnCredit =
F.RealityWarpSpawnCredit = .(F.RealityWarpSpawnCredit, )
activeCount = .(
.(F.RealityWarpActiveBeamCount),
,
F.REALITY_WARP_BEAM_COUNT
)
intensity = .(progress, )
flowRate = + .(progress, ) *
F.Speed >= F.TIME_RIFT_THRESHOLD
riftProgress
F.Speed == .huge
riftProgress =
riftProgress = .(
.(.(F.Speed / F.TIME_RIFT_THRESHOLD, )) / .(),
,
)
riftIntensity = + riftProgress *
flowRate = - riftIntensity *
F.RealityWarpDistance = (F.RealityWarpDistance + flowRate * deltaTime) %
pulseFrequency = + intensity *
flickerCutoff = + intensity *
_, entry (F.RealityWarpBeams)
beam = entry.Beam
spawned = entry.Index <= activeCount
spawned
beam.Enabled =
entry.A0.Parent entry.A1.Parent
phaseDistance = (entry.Phase + F.RealityWarpDistance * entry.Flow) %
z
entry.Ahead
leadPhase = (entry.Phase + F.RealityWarpDistance * entry.Flow * ) %
z = - + leadPhase
z = + phaseDistance
pulse = + * .(
clock * pulseFrequency * entry.PulseRate + entry.PulsePhase
)
flutter = .(
clock * ( + intensity * ) + entry.PulsePhase *
)
angle = entry.Angle + flutter * ( + intensity * )
radialGrowth = + intensity * (entry.Layer == )
radius = entry.Radius * radialGrowth
lengthMultiplier = + intensity *
entry.Layer ==
lengthMultiplier *= + intensity *
entry.Layer ==
lengthMultiplier *= + intensity *
streakLength = entry.Length * lengthMultiplier
p0, p1
x0, y0
entry.SideLane
sideLimit = entry.Layer ==
(entry.Layer == )
sideMinimum = entry.Layer ==
sideOffset = .(entry.Radius * , sideMinimum, sideLimit)
sideWobble = .(clock * ( + entry.Flow * ) + entry.PulsePhase)
* ( + intensity * )
x0 = entry.SideSign * (sideOffset + sideWobble)
y0 = .(angle) * .(radius * , )
+ entry.VerticalBias * ( + intensity * )
x0 = .(angle) * radius
y0 = .(angle) * radius + entry.VerticalBias * ( + intensity * )
endZ
entry.Ahead
endZ = .(z + streakLength, -)
endZ = z + streakLength
p0 = sideAxis * x0 + upAxis * y0 + travelAxis * z
p1 = sideAxis * x0 + upAxis * y0 + travelAxis * endZ
entry.A0.Position = p0
entry.A1.Position = p1
beam.Enabled = pulse > flickerCutoff progress <
widthPulse = + pulse *
distanceScale = (entry.Layer == )
((entry.Layer == ) )
beam.Width0 = entry.BaseWidth
* ( + intensity * )
* widthPulse * distanceScale
beam.Width1 = .(, beam.Width0 * ( + intensity * ))
beam.LightEmission = + pulse *
F.UpdateRealityWarpQuality = (frameDeltaTime)
F.RealityWarpQualityTimer += frameDeltaTime
F.RealityWarpQualityFrameTotal += frameDeltaTime
F.RealityWarpQualityFrameSamples +=
F.RealityWarpQualityTimer >=
averageFrameTime = F.RealityWarpQualityFrameTotal
/ .(F.RealityWarpQualityFrameSamples, )
averageFrameTime >
F.RealityWarpQualityScale = math.max(0.68, F.RealityWarpQualityScale - 0.08)
elseif averageFrameTime < 0.019 then
F.RealityWarpQualityScale = math.min(1, F.RealityWarpQualityScale + 0.04)
end
F.RealityWarpQualityTimer = 0
F.RealityWarpQualityFrameTotal = 0
F.RealityWarpQualityFrameSamples = 0
end
end
--==================================================
-- TIME RIFT (UNCHANGED)
--==================================================
F.ClearTimeRiftEffects = function()
for _, entry in ipairs(F.TimeRiftBeams) do
if entry.Beam then pcall(function() entry.Beam:Destroy() end) end
end
for _, entry in ipairs(F.TimeRiftRingBeams) do
if entry.Beam then pcall(function() entry.Beam:Destroy() end) end
end
for _, attachment in ipairs(F.TimeRiftAttachments) do
if attachment then pcall(function() attachment:Destroy() end) end
end
table.clear(F.TimeRiftBeams)
table.clear(F.TimeRiftRingBeams)
table.clear(F.TimeRiftAttachments)
F.TimeRiftDistance = 0
F.TimeRiftRotation = 0
end
F.GetTimeRiftIntensity = function()
if F.Speed < F.TIME_RIFT_THRESHOLD then return 0 end
if F.Speed == math.huge then return 1 end
local ratio = math.max(F.Speed / F.TIME_RIFT_THRESHOLD, 1)
local progress = math.clamp(math.log(ratio) / math.log(50), 0, 1)
return 0.04 + progress * 0.96
end
F.SetupTimeRiftEffects = function(char)
F.ClearTimeRiftEffects()
local root = char and char:FindFirstChild("HumanoidRootPart")
if not root then return end
for i = 1, F.TIME_RIFT_STREAK_COUNT do
local a0 = Instance.new("Attachment")
a0.Name = "BarryTimeRiftStreakA0_" .. i
a0.Parent = root
table.insert(F.TimeRiftAttachments, a0)
local a1 = Instance.new("Attachment")
a1.Name = "BarryTimeRiftStreakA1_" .. i
a1.Parent = root
table.insert(F.TimeRiftAttachments, a1)
local beam = Instance.new("Beam")
beam.Name = "BarryTimeRiftGoldLightStreak"
beam.Attachment0 = a0
beam.Attachment1 = a1
beam.Segments = 1
beam.FaceCamera = true
beam.LightEmission = 1
beam.LightInfluence = 0
beam.Width0 = 0.038
beam.Width1 = 0.009
beam.Transparency = NumberSequence.new(0.14)
beam.Enabled = false
beam.Parent = F.VFXFolder
if i % 7 == 0 then
beam.Color = ColorSequence.new({
ColorSequenceKeypoint.new(0, F.WHITE),
ColorSequenceKeypoint.new(0.38, Color3.fromRGB(255, 250, 226)),
ColorSequenceKeypoint.new(1, Color3.fromRGB(255, 190, 80)),
})
elseif i % 4 == 0 then
beam.Color = ColorSequence.new({
ColorSequenceKeypoint.new(0, Color3.fromRGB(255, 246, 205)),
ColorSequenceKeypoint.new(0.52, F.YELLOW),
ColorSequenceKeypoint.new(1, Color3.fromRGB(255, 116, 28)),
})
else
beam.Color = ColorSequence.new({
ColorSequenceKeypoint.new(0, F.WHITE),
ColorSequenceKeypoint.new(0.42, Color3.fromRGB(255, 225, 132)),
ColorSequenceKeypoint.new(1, F.GOLD),
})
end
table.insert(F.TimeRiftBeams, {
Beam = beam,
A0 = a0,
A1 = a1,
Index = i,
Angle = (i / F.TIME_RIFT_STREAK_COUNT) * math.pi * 2 + (math.random() - 0.5) * 0.2,
InnerRadius = math.random(42, 78) / 10,
Radius = math.random(100, 340) / 10,
Phase = math.random() * 330,
Length = math.random(260, 880) / 10,
Drift = (math.random() - 0.5) * 1.5,
Flow = math.random(82, 122) / 100,
Ahead = (i % 4 == 3),
SideLane = (i % 4 == 1 or i % 4 == 2),
SideSign = (i % 2 == 0) and -1 or 1,
Pulse = math.random() * math.pi * 2,
})
end
local planes = {
CFrame.new(),
CFrame.Angles(math.rad(76), math.rad(22), math.rad(14)),
CFrame.Angles(math.rad(27), math.rad(-38), math.rad(48)),
}
local radii = {3.6, 5.7, 8.1}
for ringIndex = 1, F.TIME_RIFT_RING_COUNT do
for segment = 1, F.TIME_RIFT_RING_SEGMENTS do
local a0 = Instance.new("Attachment")
a0.Name = "BarryTimelineRingA0_" .. ringIndex .. "_" .. segment
a0.Parent = root
table.insert(F.TimeRiftAttachments, a0)
local a1 = Instance.new("Attachment")
a1.Name = "BarryTimelineRingA1_" .. ringIndex .. "_" .. segment
a1.Parent = root
table.insert(F.TimeRiftAttachments, a1)
local beam = Instance.new("Beam")
beam.Name = "BarryTimelineGoldFracture"
beam.Attachment0 = a0
beam.Attachment1 = a1
beam.Segments = 2
beam.FaceCamera = true
beam.LightEmission = 1
beam.LightInfluence = 0
beam.Width0 = (ringIndex == 1 and 0.13) or (ringIndex == 2 and 0.095) or 0.075
beam.Width1 = 0.028
beam.Transparency = NumberSequence.new(0.16)
beam.Enabled = false
beam.Parent = F.VFXFolder
if ringIndex == 1 then
beam.Color = ColorSequence.new({
ColorSequenceKeypoint.new(0, F.WHITE),
ColorSequenceKeypoint.new(0.52, F.YELLOW),
ColorSequenceKeypoint.new(1, F.GOLD),
})
else
beam.Color = ColorSequence.new({
ColorSequenceKeypoint.new(0, F.GOLD),
ColorSequenceKeypoint.new(0.5, Color3.fromRGB(255, 235, 170)),
ColorSequenceKeypoint.new(1, F.WHITE),
})
end
table.insert(F.TimeRiftRingBeams, {
Beam = beam,
A0 = a0,
A1 = a1,
Ring = ringIndex,
Segment = segment,
Segments = F.TIME_RIFT_RING_SEGMENTS,
Plane = planes[ringIndex],
BaseRadius = radii[ringIndex],
Phase = ringIndex * 0.37,
})
end
end
end
F.UpdateTimeRiftEffects = function(deltaTime, isMoving)
local active = F.Speed >= F.TIME_RIFT_THRESHOLD and F.Root and F.Root.Parent
local intensity = F.GetTimeRiftIntensity()
local sideAxis, upAxis, travelAxis = F.GetBeamBasisLocal()
F.TimeRiftGrade.Enabled = active and true or false
F.TimeRiftBloom.Enabled = active and true or false
if not active then
for _, entry in ipairs(F.TimeRiftBeams) do
if entry.Beam then entry.Beam.Enabled = false end
end
for _, entry in ipairs(F.TimeRiftRingBeams) do
if entry.Beam then entry.Beam.Enabled = false end
end
return
end
F.TimeRiftGrade.Brightness = -0.015 - intensity * 0.285
F.TimeRiftGrade.Contrast = 0.08 + intensity * 0.62
F.TimeRiftGrade.Saturation = 0.03 - intensity * 0.78
F.TimeRiftGrade.TintColor = F.WHITE:Lerp(Color3.fromRGB(255, 211, 158), intensity * 0.38)
F.TimeRiftBloom.Intensity = 0.22 + intensity * 1.08
F.TimeRiftBloom.Size = 26 + intensity * 38
F.TimeRiftBloom.Threshold = 1.28 - intensity * 0.58
local flowRate = 900 - intensity * 440
if isMoving then
F.TimeRiftDistance = F.TimeRiftDistance + flowRate * deltaTime
if F.TimeRiftDistance > 1e12 then F.TimeRiftDistance = F.TimeRiftDistance % 330 end
end
local ringSpinRate = isMoving and (0.42 + intensity * 1.35) or 0.10
F.TimeRiftRotation = F.TimeRiftRotation - deltaTime * ringSpinRate
local qualityLimit = math.max(6, math.floor(F.TIME_RIFT_STREAK_COUNT * F.RealityWarpQualityScale))
local startingCount = math.min(6, qualityLimit)
local activeCount = math.clamp(
startingCount + math.floor(intensity * (qualityLimit - startingCount)),
startingCount,
qualityLimit
)
for _, entry in ipairs(F.TimeRiftBeams) do
local beam = entry.Beam
local enabled = isMoving and entry.Index <= activeCount
beam.Enabled = enabled
if enabled and entry.A0.Parent and entry.A1.Parent then
local phaseDistance = entry.Phase + F.TimeRiftDistance * entry.Flow
local z
if entry.Ahead then
z = -280 + (phaseDistance % 255)
else
z = 3.25 + (phaseDistance % 330)
end
local pulse = math.sin(os.clock() * (1.6 + intensity * 2.4) + entry.Pulse)
local angle = entry.Angle + math.sin(os.clock() * (1.1 + intensity * 1.5) + entry.Index) * (0.025 + intensity * 0.07)
local innerRadius = entry.InnerRadius + pulse * (0.08 + intensity * 0.22)
local streakLength = entry.Length * (0.68 + intensity * 0.72)
local p0, p1
local x0, y0
if entry.SideLane then
local sideOffset = math.clamp(entry.Radius * 0.70, 4.0, 29)
local sideWobble = math.sin(os.clock() * (0.38 + entry.Flow * 0.14) + entry.Pulse)
* (0.25 + intensity * 0.65)
x0 = entry.SideSign * (sideOffset + sideWobble)
y0 = math.sin(angle) * math.min(entry.Radius * 0.22, 10)
else
x0 = math.cos(angle) * innerRadius
y0 = math.sin(angle) * innerRadius
end
local endZ = entry.Ahead and math.min(z + streakLength, -2.8) or (z + streakLength)
p0 = sideAxis * x0 + upAxis * y0 + travelAxis * z
p1 = sideAxis * x0 + upAxis * y0 + travelAxis * endZ
entry.A0.Position = p0
entry.A1.Position = p1
beam.Width0 = 0.032 + intensity * 0.048
beam.Width1 = 0.007 + intensity * 0.017
beam.Transparency = NumberSequence.new(0.16 - intensity * 0.095)
end
end
for _, entry in ipairs(F.TimeRiftRingBeams) do
local beam = entry.Beam
beam.Enabled = true
local spinSign = (entry.Ring % 2 == 0) and 1 or -1
local spin = F.TimeRiftRotation * spinSign + entry.Phase
local pulse = 1 + math.sin(os.clock() * (1.8 + intensity * 0.55) + entry.Ring * 1.7) * (0.008 + intensity * 0.014)
local radius = entry.BaseRadius * pulse * (1 + intensity * 0.12)
local fullStep = math.pi * 2 / entry.Segments
local a0 = ((entry.Segment - 1) / entry.Segments) * math.pi * 2 + spin
local a1 = a0 + fullStep * 0.97
local p0 = entry.Plane:VectorToWorldSpace(Vector3.new(math.cos(a0) * radius, math.sin(a0) * radius, 0))
local p1 = entry.Plane:VectorToWorldSpace(Vector3.new(math.cos(a1) * radius, math.sin(a1) * radius, 0))
entry.A0.Position = p0
entry.A1.Position = p1
local ringCore = (entry.Ring == 1 and 0.085) or (entry.Ring == 2 and 0.068) or 0.052
local ringBoost = (entry.Ring == 1 and 0.115) or (entry.Ring == 2 and 0.092) or 0.075
local segmentPulse = 0.88 + 0.12 * math.max(0, math.sin(os.clock() * (2.1 + intensity * 1.2) + entry.Segment * 0.16 + entry.Phase))
beam.Transparency = NumberSequence.new(0.12 + (1 - segmentPulse) * 0.20 - intensity * 0.055)
beam.Width0 = (ringCore + intensity * ringBoost) * pulse * segmentPulse
beam.Width1 = 0.010 + intensity * 0.045 * segmentPulse
beam.LightEmission = 0.9 + segmentPulse * 0.1
end
end
--==================================================
-- POSE AFTERIMAGE SYSTEM
--==================================================
F.Echoes = {}
F.PoseHistory = {}
F.SourceParts = {}
F.SourceIndex = {}
F.MAX_ECHOES = 2
F.HISTORY_SIZE = 8
F.ClearEchoes = function()
for _, echo in ipairs(F.Echoes) do
if echo.Model then
pcall(function() echo.Model:Destroy() end)
end
end
table.clear(F.Echoes)
table.clear(F.PoseHistory)
end
F.RefreshSourceParts = function()
table.clear(F.SourceParts)
table.clear(F.SourceIndex)
if not F.Character then return end
for _, object in ipairs(F.Character:GetDescendants()) do
if object:IsA("BasePart")
and object.Name ~= "HumanoidRootPart"
and object.Transparency < 1 then
table.insert(F.SourceParts, object)
F.SourceIndex[object] = #F.SourceParts
end
end
end
F.BuildEcho = function(char)
local echoModel = Instance.new("Model")
echoModel.Name = "WallyRealityEcho"
echoModel.Parent = F.VFXFolder
local echoParts = {}
for _, original in ipairs(F.SourceParts) do
local clone
local ok = pcall(function()
clone = original:Clone()
end)
if ok and clone and clone:IsA("BasePart") then
F.RemoveNonVisualChildren(clone)
clone.Anchored = true
clone.CanCollide = false
clone.CanTouch = false
clone.CanQuery = false
clone.CastShadow = false
clone.Massless = true
clone.Transparency = 1
clone.Parent = echoModel
table.insert(echoParts, {
Original = original,
Clone = clone,
SourceIndex = F.SourceIndex[original],
BaseColor = clone.Color,
BaseTransparency = original.Transparency,
})
end
end
local highlight = Instance.new("Highlight")
highlight.Name = "RealityWarpHighlight"
highlight.Adornee = echoModel
highlight.FillColor = F.YELLOW
highlight.OutlineColor = F.WHITE
highlight.FillTransparency = 0.75
highlight.OutlineTransparency = 0.2
highlight.DepthMode = Enum.HighlightDepthMode.AlwaysOnTop
highlight.Enabled = false
highlight.Parent = echoModel
local data = {Model = echoModel, Parts = echoParts, Highlight = highlight}
table.insert(F.Echoes, data)
return data
end
F.BuildAllEchoes = function(char)
F.ClearEchoes()
F.RefreshSourceParts()
for _ = 1, F.MAX_ECHOES do
F.BuildEcho(char)
end
end
F.CapturePose = function()
if not F.Character or not F.Root or not F.Root.Parent then return end
local pivot = F.Character:GetPivot()
local pose = table.create(#F.SourceParts)
for index, part in ipairs(F.SourceParts) do
if part and part.Parent then
pose[index] = pivot:ToObjectSpace(part.CFrame)
end
end
table.insert(F.PoseHistory, 1, {Pivot = pivot, Pose = pose})
while #F.PoseHistory > F.HISTORY_SIZE do
table.remove(F.PoseHistory)
end
end
F.GetCurrentSnapshot = function()
if not F.Character or not F.Root or not F.Root.Parent then return nil end
local pivot = F.Character:GetPivot()
local pose = table.create(#F.SourceParts)
for index, part in ipairs(F.SourceParts) do
if part and part.Parent then
pose[index] = pivot:ToObjectSpace(part.CFrame)
end
end
return {Pivot = pivot, Pose = pose}
end
F.ApplyPose = function(echo, snapshot, extraOffset, transparency, tint, lateralOffset)
if not snapshot then return end
local poseRoot = snapshot.Pivot * CFrame.new(lateralOffset or 0, 0, extraOffset or 0)
for _, partInfo in ipairs(echo.Parts) do
local clone = partInfo.Clone
local index = partInfo.SourceIndex
local localCF = index and snapshot.Pose[index]
if clone and clone.Parent and localCF then
clone.CFrame = poseRoot * localCF
clone.Transparency = math.clamp(
transparency + (partInfo.BaseTransparency * 0.25),
0, 1
)
clone.Color = partInfo.BaseColor:Lerp(tint, 0.68)
end
end
if echo.Highlight then
echo.Highlight.Enabled = transparency < 0.95
echo.Highlight.FillColor = tint
echo.Highlight.FillTransparency = math.clamp(transparency + 0.05, 0.5, 1)
end
end
F.HideEcho = function(echo)
if echo.Highlight then echo.Highlight.Enabled = false end
for _, info in ipairs(echo.Parts) do
if info.Clone then info.Clone.Transparency = 1 end
end
end
F.UpdateIdlePhasing = function()
if #F.Echoes < 2 then return end
local snapshot = F.GetCurrentSnapshot()
if not snapshot then return end
local t = os.clock()
local phaseIntensity = 0
if F.Speed > F.CINEMATIC_THRESHOLD then
local ratio = F.Speed / F.CINEMATIC_THRESHOLD
phaseIntensity = (ratio >= 120) and 1 or math.clamp(math.log(ratio) / math.log(120), 0, 1)
end
local frequency = 10 + phaseIntensity * 32
local sideShift = math.sin(t * frequency * math.pi * 2) * (0.025 + phaseIntensity * 0.34)
local ghostFade = phaseIntensity * 0.14
F.ApplyPose(F.Echoes[1], snapshot, 0, math.clamp(0.79 + ghostFade + math.sin(t * (frequency + 3)) * 0.025, 0, 0.99), F.GOLD, sideShift)
F.ApplyPose(F.Echoes[2], snapshot, 0.015, math.clamp(0.84 + ghostFade + math.sin(t * (frequency + 7) + 1) * 0.03, 0, 0.995), F.YELLOW, -sideShift * 0.82)
for i = 3, #F.Echoes do F.HideEcho(F.Echoes[i]) end
end
F.UpdateMovingEchoes = function()
if #F.Echoes == 0 or #F.PoseHistory < 2 then return end
local maxEcho = math.min(3, #F.Echoes)
for i = 1, maxEcho do
local historyIndex = ({3, 6, 9})[i]
historyIndex = math.clamp(historyIndex, 1, #F.PoseHistory)
local snapshot = F.PoseHistory[historyIndex]
local transparency = 0.58 + ((i - 1) * 0.09)
local tint = (i % 2 == 1) and F.GOLD or F.YELLOW
F.ApplyPose(F.Echoes[i], snapshot, 0.2 + ((i - 1) * 0.12), transparency, tint)
end
if F.Echoes[4] then F.HideEcho(F.Echoes[4]) end
end
F.HideAllEchoes = function()
for _, echo in ipairs(F.Echoes) do F.HideEcho(echo) end
end
--==================================================
-- MOVEMENT DIRECTION
--==================================================
F.GetDirection = function()
if F.UIS:GetFocusedTextBox() then
return Vector3.zero
end
local forward = 0
local right = 0
local w = F.HoldingW or F.UIS:IsKeyDown(Enum.KeyCode.W)
local a = F.HoldingA or F.UIS:IsKeyDown(Enum.KeyCode.A)
local s = F.HoldingS or F.UIS:IsKeyDown(Enum.KeyCode.S)
local d = F.HoldingD or F.UIS:IsKeyDown(Enum.KeyCode.D)
if w then forward += 1 end
if s then forward -= 1 end
if d then right += 1 end
if a then right -= 1 end
if forward == 0 and right == 0 then
if F.Humanoid and F.Humanoid.MoveDirection.Magnitude > 0 then
return F.Humanoid.MoveDirection.Unit
end
return Vector3.zero
end
local camera = workspace.CurrentCamera or F.Camera
if not camera then return Vector3.zero end
local look = camera.CFrame.LookVector
local cameraRight = camera.CFrame.RightVector
look = Vector3.new(look.X, 0, look.Z)
cameraRight = Vector3.new(cameraRight.X, 0, cameraRight.Z)
if look.Magnitude > 0 then look = look.Unit end
if cameraRight.Magnitude > 0 then cameraRight = cameraRight.Unit end
local direction = (look * forward) + (cameraRight * right)
if direction.Magnitude > 0 then return direction.Unit end
return Vector3.zero
end
-- Travel-aligned basis in HumanoidRootPart local space: side, up, backward (+Z = behind).
F.GetBeamBasisLocal = function()
local root = F.Root
if not root or not root.Parent then
return Vector3.xAxis, Vector3.yAxis, Vector3.zAxis
end
local direction = F.GetDirection and F.GetDirection() or Vector3.zero
if direction.Magnitude < 0.05 and F.Humanoid and F.Humanoid.Parent then
direction = F.Humanoid.MoveDirection
end
direction = Vector3.new(direction.X, 0, direction.Z)
if direction.Magnitude < 0.05 then
local look = root.CFrame.LookVector
direction = Vector3.new(look.X, 0, look.Z)
end
if direction.Magnitude < 0.05 then
direction = Vector3.new(0, 0, -1)
else
direction = direction.Unit
end
local sideWorld = direction:Cross(Vector3.yAxis)
if sideWorld.Magnitude < 0.05 then
sideWorld = root.CFrame.RightVector
else
sideWorld = sideWorld.Unit
end
local upWorld = Vector3.yAxis
local axisWorld = -direction
return root.CFrame:VectorToObjectSpace(sideWorld),
root.CFrame:VectorToObjectSpace(upWorld),
root.CFrame:VectorToObjectSpace(axisWorld)
end
--==================================================
-- VFX UPDATE FUNCTIONS
--==================================================
F.UpdateLightningArcs = function(active, strength, now, forceRefresh)
for _, arc in ipairs(F.CinematicArcs) do
local visible = active and (math.sin(now * 37 + arc.Phase) > -0.72)
for _, segment in ipairs(arc.Segments) do
segment.Enabled = visible
segment.Width0 = 0.045 + strength * 0.075
segment.Width1 = 0.018 + strength * 0.025
end
local refreshInterval = F.LIGHTNING_REFRESH / (1 + strength * 0.42)
if active and (forceRefresh or now - arc.LastRefresh >= refreshInterval) then
arc.LastRefresh = now
local pointA = arc.A.WorldPosition
local pointB = arc.B.WorldPosition
local line = pointB - pointA
local length = line.Magnitude
if length > 0.025 and F.Root and F.Root.Parent then
local axis = line.Unit
local side = axis:Cross(Vector3.new(0, 1, 0))
if side.Magnitude < 0.08 then
side = axis:Cross(Vector3.new(1, 0, 0))
end
side = side.Unit
local depth = axis:Cross(side).Unit
local amplitude = 0.10 + strength * 0.30
local n1 = side * ((math.random() * 2 - 1) * amplitude)
+ depth * ((math.random() * 2 - 1) * amplitude * 0.72)
local n2 = side * ((math.random() * 2 - 1) * amplitude)
+ depth * ((math.random() * 2 - 1) * amplitude * 0.72)
local worldA = pointA + line * 0.34 + n1
local worldB = pointA + line * 0.69 + n2
arc.BendA.Position = F.Root.CFrame:PointToObjectSpace(worldA)
arc.BendB.Position = F.Root.CFrame:PointToObjectSpace(worldB)
end
end
end
end
-- Build the curved spine behind the character (world-space points, [0] = root).
-- Segment j uses the (smoothed) heading from j/N * TRAIL_CURVE_LAG seconds ago.
F.UpdateTrailSpine = function(deltaTime, direction, active)
local root = F.Root
if not root or not root.Parent then return end
local now = os.clock()
local target = Vector3.new(direction.X, 0, direction.Z)
if target.Magnitude < 0.05 then
local look = root.CFrame.LookVector
target = Vector3.new(look.X, 0, look.Z)
if target.Magnitude < 0.05 then target = Vector3.new(0, 0, -1) end
end
target = target.Unit
if not F.TrailHeading or not active then
-- Snap while idle so every new run starts with a straight trail.
F.TrailHeading = target
table.clear(F.TrailHistory)
return
end
local blend = 1 - math.exp(-F.TRAIL_TURN_RATE * deltaTime)
local heading = F.TrailHeading:Lerp(target, blend)
if heading.Magnitude < 0.05 then heading = target end
F.TrailHeading = heading.Unit
local history = F.TrailHistory
table.insert(history, 1, {t = now, dir = F.TrailHeading})
while #history > 2 and now - history[#history].t > F.TRAIL_CURVE_LAG + 0.15 do
table.remove(history)
end
local spine, headings = F.TrailSpine, F.TrailHeadings
local position = root.Position
spine[0] = position
local index = 1
for j = 1, F.TRAIL_SEGMENTS do
local lagTime = now - (j / F.TRAIL_SEGMENTS) * F.TRAIL_CURVE_LAG
while index < #history and history[index].t > lagTime do
index += 1
end
local h = history[index].dir
headings[j] = h
position = position - h * F.TRAIL_SEGMENT_LENGTH
spine[j] = position
end
end
-- Position + forward heading on the spine at "distance" studs behind the root.
F.SampleTrail = function(distance)
local segmentLength = F.TRAIL_SEGMENT_LENGTH
local count = F.TRAIL_SEGMENTS
local spine, headings = F.TrailSpine, F.TrailHeadings
distance = math.max(distance, 0)
local scaled = distance / segmentLength
local k = math.floor(scaled)
if k >= count then
local h = headings[count]
return spine[count] - h * (distance - count * segmentLength), h
end
return spine[k]:Lerp(spine[k + 1], scaled - k), headings[k + 1]
end
-- Offset (from the root) of the back edge of a body part along the travel direction.
-- Measured from the part's real size and current rotation every frame, so the trail starts
-- exactly at the back of the head/torso/limbs whatever animation is playing.
F.GetTrailingEdgeOffset = function(part, rootPosition)
local heading = F.TrailHeadings[1] or Vector3.new(0, 0, -1)
local cf = part.CFrame
local size = part.Size
local extent = 0.5 * (
math.abs(heading:Dot(cf.RightVector)) * size.X
+ math.abs(heading:Dot(cf.UpVector)) * size.Y
+ math.abs(heading:Dot(cf.LookVector)) * size.Z
)
return part.Position - heading * (extent - 0.15) - rootPosition
end
-- A point on the curved trail, converted to HumanoidRootPart local space.
F.TrailPoint = function(rootCF, distance, x, y, anchorOffset)
local position, heading = F.SampleTrail(distance)
local side = heading:Cross(Vector3.yAxis)
if side.Magnitude > 0.05 then side = side.Unit else side = Vector3.xAxis end
local world = position + anchorOffset + side * x + Vector3.yAxis * y
return rootCF:PointToObjectSpace(world)
end
-- Comic-style wake on the curved spine. Every bolt starts on an animated body part
-- (torso/feet/hands), so forward-leaning animations never leave a gap.
F.UpdateWakeLightning = function(active, strength, now)
strength = math.clamp(strength, 0, 1)
if not active or not F.Root or not F.Root.Parent or not F.TrailSpine[F.TRAIL_SEGMENTS] then
for _, bolt in ipairs(F.CinematicWakeBolts) do
for _, beam in ipairs(bolt.Beams) do beam.Enabled = false end
end
return
end
local refreshEvery = 0.07 - strength * 0.025
local rootCF = F.Root.CFrame
local rootPosition = rootCF.Position
for _, bolt in ipairs(F.CinematicWakeBolts) do
local visible = math.sin(now * 14 + bolt.Phase) > -0.8
local count = #bolt.Attachments
local refresh = now - bolt.LastRefresh >= refreshEvery
if refresh then bolt.LastRefresh = now end
local anchorOffset = Vector3.zero
if bolt.Anchor and bolt.Anchor.Parent then
anchorOffset = F.GetTrailingEdgeOffset(bolt.Anchor, rootPosition)
end
for i, attachment in ipairs(bolt.Attachments) do
local jitter = bolt.Jitter[i]
if refresh or not jitter then
local t = (i - 1) / (count - 1)
local amp = (i == 1) and 0.05 or ((0.15 + t * (1.6 + strength * 1.8)) * bolt.Spread)
local zig = (i % 2 == 0) and 1 or -1
jitter = Vector3.new(
(zig * 0.6 + (math.random() * 2 - 1) * 0.7) * amp,
(math.random() * 2 - 1) * amp * 0.7,
(math.random() * 2 - 1) * 0.6 * t
)
bolt.Jitter[i] = jitter
end
local base = bolt.BasePoints[i]
attachment.Position = F.TrailPoint(
rootCF, base.Z + jitter.Z, base.X + jitter.X, base.Y + jitter.Y, anchorOffset
)
end
for segmentIndex, beam in ipairs(bolt.Beams) do
beam.Enabled = visible
local taper = 1 - (segmentIndex - 1) / #bolt.Beams * 0.6
beam.Width0 = (0.045 + strength * 0.03) * taper
beam.Width1 = math.max(0.012, beam.Width0 * 0.55)
end
end
end
-- Soft red/orange motion-blur bands that bend with the curved trail.
F.UpdateSpeedBlur = function(active, strength, now)
strength = math.clamp(strength, 0, 1)
if not active or not F.Root or not F.Root.Parent or not F.TrailSpine[F.TRAIL_SEGMENTS] then
for _, streak in ipairs(F.CinematicBlurStreaks) do
for _, beam in ipairs(streak.Beams) do beam.Enabled = false end
end
return
end
local rootCF = F.Root.CFrame
local rootPosition = rootCF.Position
for _, streak in ipairs(F.CinematicBlurStreaks) do
local anchorOffset = Vector3.zero
if streak.Anchor and streak.Anchor.Parent then
anchorOffset = F.GetTrailingEdgeOffset(streak.Anchor, rootPosition)
end
local flicker = 0.88 + 0.12 * math.sin(now * 11 + streak.Phase)
local totalLength = streak.Length * (0.55 + strength * 0.6)
local width = streak.Width * (0.8 + strength * 0.5) * flicker
local segmentCount = #streak.Beams
for seg = 0, segmentCount do
streak.Attachments[seg + 1].Position = F.TrailPoint(
rootCF, totalLength * (seg / segmentCount), streak.X, streak.Y, anchorOffset
)
end
for seg, beam in ipairs(streak.Beams) do
beam.Width0 = width * (1 - 0.88 * ((seg - 1) / segmentCount))
beam.Width1 = width * (1 - 0.88 * (seg / segmentCount))
beam.Enabled = true
end
end
end
F.UpdateCinematicMode = function(isMoving, moveDirection)
local active = F.Speed >= F.CINEMATIC_THRESHOLD
local runningWake = F.Speed >= F.SPEED_BEAM_START_SPEED and isMoving
local strength = 0
local now = os.clock()
if active then
strength = 0.35 + 0.65 * math.clamp(
(F.Speed - F.CINEMATIC_THRESHOLD) / 2600,
0, 1
)
end
if F.CinematicHighlight then
F.CinematicHighlight.Enabled = active
if F.Speed >= F.TIME_RIFT_THRESHOLD then
local riftIntensity = F.GetTimeRiftIntensity()
F.CinematicHighlight.FillColor = Color3.fromRGB(255, 180, 75)
F.CinematicHighlight.OutlineColor = Color3.fromRGB(255, 248, 220)
F.CinematicHighlight.FillTransparency = 0.76 - riftIntensity * 0.20
F.CinematicHighlight.OutlineTransparency = 0.04 - riftIntensity * 0.025
F.CinematicHighlight.DepthMode = Enum.HighlightDepthMode.AlwaysOnTop
else
F.CinematicHighlight.FillColor = F.GOLD
F.CinematicHighlight.OutlineColor = F.YELLOW
F.CinematicHighlight.FillTransparency = active and (0.94 - strength * 0.08) or 1
F.CinematicHighlight.OutlineTransparency = active and (0.30 - strength * 0.18) or 1
F.CinematicHighlight.DepthMode = Enum.HighlightDepthMode.Occluded
end
end
if F.CinematicLight then
local flicker = (math.sin(now * 34) > 0.25) and 0.45 or 0
F.CinematicLight.Brightness = active and (0.75 + strength * 2.7 + flicker) or 0
F.CinematicLight.Range = 14 + strength * 14
end
F.UpdateLightningArcs(active, strength, now, false)
local wakeStrength = 0.16 + F.GetSpeedBeamProgress() * 0.84
-- (wake + blur now update every frame from Heartbeat so the curve stays smooth)
if F.CinematicGroundAttachment and F.Root and F.Root.Parent and moveDirection and moveDirection.Magnitude > 0.05 then
local backward = -moveDirection.Unit
local worldPosition = F.Root.Position - Vector3.new(0, 1.95, 0)
local desiredWorld = CFrame.lookAt(worldPosition, worldPosition + backward)
F.CinematicGroundAttachment.CFrame = F.Root.CFrame:ToObjectSpace(desiredWorld)
end
if F.CinematicGroundHaze then
F.CinematicGroundHaze.Rate = 0 -- puffs read as separate balls at high speed; a continuous ground streak replaces them
end
local warmGradeActive = active and F.Speed < F.TIME_RIFT_THRESHOLD
F.CinematicGrade.Enabled = warmGradeActive
F.CinematicBloom.Enabled = warmGradeActive
F.CinematicGrade.TintColor = F.WHITE:Lerp(Color3.fromRGB(255, 178, 104), strength * 0.23)
F.CinematicGrade.Brightness = strength * 0.006
F.CinematicGrade.Contrast = strength * 0.11
F.CinematicGrade.Saturation = strength * 0.10
F.CinematicBloom.Intensity = 0.12 + strength * 0.42
F.CinematicBloom.Threshold = 1.55 - strength * 0.25
if F.CinematicSparkAttachment and F.Root and F.Root.Parent and moveDirection and moveDirection.Magnitude > 0.05 then
local sparkPosition = F.Root.Position - Vector3.new(0, 0.45, 0) - moveDirection.Unit * 0.65
local sparkWorld = CFrame.lookAt(sparkPosition, sparkPosition - moveDirection.Unit)
F.CinematicSparkAttachment.CFrame = F.Root.CFrame:ToObjectSpace(sparkWorld)
end
if F.CinematicSpark then
F.CinematicSpark.Rate = runningWake and (5 + math.floor(wakeStrength * 18)) or 0
end
end
F.UpdateTrailAndParticles = function(isMoving)
if not F.Character or not F.Root then return end
local torso = F.Character:FindFirstChild("UpperTorso") or F.Character:FindFirstChild("Torso") or F.Root
if torso then
local light = torso:FindFirstChild("WallySpeedLight")
local energyAttachment = torso:FindFirstChild("WallyEnergyAttachment")
local energy = energyAttachment and energyAttachment:FindFirstChild("WallyEnergy")
local lowSpeedRunning = F.Speed > 5 and isMoving and F.Speed < F.SPEED_BEAM_START_SPEED
local intensity = math.clamp(F.Speed / 700, 0, 1)
if light then
light.Brightness = lowSpeedRunning and (0.35 + intensity * 1.3) or 0
light.Range = 10 + intensity * 5
end
if energy then
energy.Rate = lowSpeedRunning and (4 + math.floor(intensity * 12)) or 0
end
end
local smokeAttachment = F.Root:FindFirstChild("WallySmokeWake")
if smokeAttachment then
local dust = smokeAttachment:FindFirstChild("Dust")
local fastDust = smokeAttachment:FindFirstChild("FastDust")
local energyDust = smokeAttachment:FindFirstChild("EnergyDust")
if F.Speed > 30 and isMoving then
local power = math.clamp(F.Speed / 1500, 0, 1)
local cinematicRunning = F.Speed >= F.SPEED_BEAM_START_SPEED
if dust then
dust.Rate = cinematicRunning and 0 or math.clamp(F.Speed * 0.07, 12, 100)
dust.Size = NumberSequence.new({
NumberSequenceKeypoint.new(0, 2 + power),
NumberSequenceKeypoint.new(0.4, 4 + power * 3),
NumberSequenceKeypoint.new(1, 8 + power * 5),
})
end
if fastDust then
fastDust.Rate = cinematicRunning and 0 or math.clamp(F.Speed * 0.025, 4, 40)
end
if energyDust then
energyDust.Rate = cinematicRunning and 0 or math.clamp(F.Speed * 0.018, 3, 30)
end
else
if dust then dust.Rate = 0 end
if fastDust then fastDust.Rate = 0 end
if energyDust then energyDust.Rate = 0 end
end
end
end
--==================================================
-- LIMB OVERSPEED: SMOOTH RUN CYCLE
--==================================================
F.LimbOverspeedMotors = {}
F.LimbRunPhase = 0
F.LimbOverlayIntensity = 0
F.LimbCurrentFrequency = 1.6
F.LIMB_OVERLAY_FADE_RATE = 9.0
F.LIMB_MIN_FREQUENCY = 1.6
F.LIMB_MAX_FREQUENCY = 6.8
F.RestoreLimbSpeedOverlay = function()
for _, entry in ipairs(F.LimbOverspeedMotors) do
local motor = entry.Motor
if motor and motor.Parent and entry.LastApplied and motor.Transform == entry.LastApplied then
pcall(function()
motor.Transform = entry.LastBase or CFrame.new()
end)
end
entry.LastApplied = nil
entry.LastBase = nil
end
end
F.SetupLimbSpeedOverlay = function(char)
F.RestoreLimbSpeedOverlay()
table.clear(F.LimbOverspeedMotors)
F.LimbRunPhase = 0
F.LimbOverlayIntensity = 0
F.LimbCurrentFrequency = F.LIMB_MIN_FREQUENCY
if not char then return end
for _, object in ipairs(char:GetDescendants()) do
if object:IsA("Motor6D") and object.Part1 then
local jointName = string.lower(object.Name)
local partName = string.lower(object.Part1.Name)
local isArmJoint = string.find(jointName, "shoulder", 1, true)
or string.find(jointName, "elbow", 1, true)
or string.find(jointName, "wrist", 1, true)
or string.find(partName, "arm", 1, true)
or string.find(partName, "hand", 1, true)
local isLegJoint = string.find(jointName, "hip", 1, true)
or string.find(jointName, "knee", 1, true)
or string.find(jointName, "ankle", 1, true)
or string.find(partName, "leg", 1, true)
or string.find(partName, "foot", 1, true)
if isArmJoint or isLegJoint then
local kind = isArmJoint and "arm" or "leg"
local isRight = string.find(jointName, "right", 1, true)
or string.find(partName, "right", 1, true)
local sidePhase = isRight and math.pi or 0
local kindPhase = (kind == "arm") and math.pi or 0
local jointType = "upper"
if string.find(jointName, "shoulder", 1, true) then
jointType = "shoulder"
elseif string.find(jointName, "elbow", 1, true) then
jointType = "elbow"
elseif string.find(jointName, "wrist", 1, true) then
jointType = "wrist"
elseif string.find(jointName, "hip", 1, true) then
jointType = "hip"
elseif string.find(jointName, "knee", 1, true) then
jointType = "knee"
elseif string.find(jointName, "ankle", 1, true) then
jointType = "ankle"
elseif string.find(partName, "lowerarm", 1, true)
or string.find(partName, "forearm", 1, true) then
jointType = "elbow"
elseif string.find(partName, "lowerleg", 1, true) then
jointType = "knee"
elseif string.find(partName, "foot", 1, true) then
jointType = "ankle"
end
local jointPhase = 0
if jointType == "elbow" or jointType == "knee" then
jointPhase = 0.72
elseif jointType == "wrist" or jointType == "ankle" then
jointPhase = 1.12
end
local weight = 1
if jointType == "elbow" or jointType == "knee" then
weight = 0.62
elseif jointType == "wrist" or jointType == "ankle" then
weight = 0.28
end
table.insert(F.LimbOverspeedMotors, {
Motor = object,
Kind = kind,
JointType = jointType,
Weight = weight,
Phase = sidePhase + kindPhase + jointPhase,
LastBase = nil,
LastApplied = nil,
})
end
end
end
end
F.UpdateLimbSpeedOverlay = function(deltaTime)
if not F.Running or not F.Character or not F.Character.Parent or not F.Root or not F.Root.Parent then
F.RestoreLimbSpeedOverlay()
F.LimbOverlayIntensity = 0
return
end
local direction = F.GetDirection()
local moving = direction.Magnitude > 0.05 and F.Speed >= F.SPEED_BEAM_START_SPEED
if not moving then
F.RestoreLimbSpeedOverlay()
F.LimbOverlayIntensity = 0
F.LimbCurrentFrequency = F.LIMB_MIN_FREQUENCY
return
end
local targetIntensity = F.GetSpeedBeamProgress()
local dt = math.clamp(tonumber(deltaTime) or 1 / 60, 1 / 240, 1 / 20)
local blend = 1 - math.exp(-F.LIMB_OVERLAY_FADE_RATE * dt)
F.LimbOverlayIntensity += (targetIntensity - F.LimbOverlayIntensity) * blend
if F.LimbOverlayIntensity <= 0.006 then
F.RestoreLimbSpeedOverlay()
return
end
local desiredFrequency = F.LIMB_MIN_FREQUENCY
+ (F.LIMB_MAX_FREQUENCY - F.LIMB_MIN_FREQUENCY) * F.LimbOverlayIntensity
F.LimbCurrentFrequency += (desiredFrequency - F.LimbCurrentFrequency)
* (1 - math.exp(-5.5 * dt))
F.LimbRunPhase = (F.LimbRunPhase + dt * F.LimbCurrentFrequency * math.pi * 2) % (math.pi * 2)
for _, entry in ipairs(F.LimbOverspeedMotors) do
local motor = entry.Motor
if motor and motor.Parent then
if entry.LastApplied and motor.Transform == entry.LastApplied then
motor.Transform = entry.LastBase or CFrame.new()
end
entry.LastApplied = nil
entry.LastBase = nil
local gait = F.LimbRunPhase + entry.Phase
local stride = math.sin(gait)
local recovery = math.max(0, math.sin(gait + 0.9))
local baseSwing = math.rad(7 + 20 * F.LimbOverlayIntensity) * entry.Weight
local x, y, z = 0, 0, 0
if entry.JointType == "shoulder" then
x = stride * baseSwing * 1.0
z = math.sin(gait + 0.35) * math.rad(1.5 + 3.0 * F.LimbOverlayIntensity)
* entry.Weight
elseif entry.JointType == "hip" then
x = stride * baseSwing * 1.05
z = math.sin(gait + 0.25) * math.rad(0.8 + 1.6 * F.LimbOverlayIntensity)
* entry.Weight
elseif entry.JointType == "elbow" then
x = (recovery - 0.34) * math.rad(5 + 13 * F.LimbOverlayIntensity)
* entry.Weight
elseif entry.JointType == "knee" then
x = recovery * math.rad(6 + 19 * F.LimbOverlayIntensity) * entry.Weight
elseif entry.JointType == "wrist" then
x = math.sin(gait + 0.65) * math.rad(1.5 + 4 * F.LimbOverlayIntensity)
* entry.Weight
elseif entry.JointType == "ankle" then
x = -recovery * math.rad(2 + 6 * F.LimbOverlayIntensity) * entry.Weight
else
x = stride * baseSwing * 0.55
end
local base = motor.Transform
local applied = base * CFrame.Angles(x, y, z)
entry.LastBase = base
entry.LastApplied = applied
motor.Transform = applied
end
end
end
F.Connect(F.RunService.PreSimulation, F.UpdateLimbSpeedOverlay)
--==================================================
-- HIGH-SPEED BODY PHASING + LOCAL SLOW-MOTION ILLUSION
--==================================================
F.GetSpeedIntensity = function(referenceSpeed, ratioToFull)
if F.Speed <= referenceSpeed then return 0 end
if F.Speed == math.huge or F.Speed >= referenceSpeed * ratioToFull then return 1 end
return math.clamp(math.log(F.Speed / referenceSpeed) / math.log(ratioToFull), 0, 1)
end
F.UndoBodyTransform = function()
if F.BodyRootMotor and F.BodyRootMotor.Parent and F.LastBodyAppliedTransform
and F.BodyRootMotor.Transform == F.LastBodyAppliedTransform then
pcall(function()
F.BodyRootMotor.Transform = F.LastBodyBaseTransform or CFrame.new()
end)
end
F.LastBodyOffset = 0
F.LastBodyBaseTransform = nil
F.LastBodyAppliedTransform = nil
end
F.RestoreBodyPhasing = function()
F.UndoBodyTransform()
for part, original in pairs(F.BodyPartBaseline) do
if part and part.Parent then
pcall(function() part.LocalTransparencyModifier = original end)
end
end
table.clear(F.BodyPartBaseline)
F.BodyRootMotor = nil
F.BodyWasPhasing = false
end
F.SetupBodyPhasing = function(char)
F.RestoreBodyPhasing()
if not char then return end
local root = char:FindFirstChild("HumanoidRootPart")
for _, object in ipairs(char:GetDescendants()) do
if object:IsA("BasePart") then
F.BodyPartBaseline[object] = object.LocalTransparencyModifier
elseif root and object:IsA("Motor6D") and object.Part0 == root and object.Part1 then
F.BodyRootMotor = object
end
end
end
F.RestoreBodyVisibilityOnly = function()
for part, original in pairs(F.BodyPartBaseline) do
if part and part.Parent then
pcall(function() part.LocalTransparencyModifier = original end)
end
end
F.BodyWasPhasing = false
end
F.UpdateBodyPhasing = function()
F.UndoBodyTransform()
if not F.Running or not F.Root or not F.Root.Parent or not F.Humanoid or not F.Humanoid.Parent then
if F.BodyWasPhasing then F.RestoreBodyVisibilityOnly() end
return
end
local direction = F.GetDirection()
local isStandingStill = direction.Magnitude < 0.05 and F.Humanoid.MoveDirection.Magnitude < 0.05
if F.Speed < F.CINEMATIC_THRESHOLD or not isStandingStill then
if F.BodyWasPhasing then F.RestoreBodyVisibilityOnly() end
return
end
local intensity = F.GetSpeedIntensity(F.CINEMATIC_THRESHOLD, 120)
local now = os.clock()
local frequency = 8 + intensity * 27
local amplitude = 0.025 + intensity * 0.25
local offset = math.sin(now * frequency * math.pi * 2) * amplitude
if F.BodyRootMotor and F.BodyRootMotor.Parent then
F.LastBodyBaseTransform = F.BodyRootMotor.Transform
F.BodyRootMotor.Transform = CFrame.new(offset, 0, 0) * F.LastBodyBaseTransform
F.LastBodyAppliedTransform = F.BodyRootMotor.Transform
F.LastBodyOffset = offset
end
local alpha = 0.025 + intensity * 0.955
local vanishPulse = math.sin(now * (22 + intensity * 92)) > 0.52
if intensity > 0.82 and vanishPulse then alpha = 1 end
alpha = math.clamp(alpha, 0, 1)
if F.CinematicHighlight then
F.CinematicHighlight.FillTransparency = math.clamp(0.94 + intensity * 0.055, 0.94, 0.995)
F.CinematicHighlight.OutlineTransparency = math.clamp(0.30 + intensity * 0.66, 0.30, 0.99)
if intensity > 0.82 and vanishPulse then
F.CinematicHighlight.OutlineTransparency = 1
end
end
for part, original in pairs(F.BodyPartBaseline) do
if part and part.Parent then
part.LocalTransparencyModifier = original + (1 - original) * alpha
end
end
F.BodyWasPhasing = true
end
F.RestoreWorldSlowMotion = function()
for track, originalSpeed in pairs(F.WorldSlowMotionTracks) do
pcall(function()
if track and track.IsPlaying then
track:AdjustSpeed(originalSpeed)
end
end)
F.WorldSlowMotionTracks[track] = nil
end
end
F.UpdateWorldSlowMotion = function()
if F.Speed < F.WORLD_SLOW_THRESHOLD or not F.Root or not F.Root.Parent then
F.RestoreWorldSlowMotion()
return
end
local intensity = F.GetSpeedIntensity(F.WORLD_SLOW_THRESHOLD, 100)
local slowFactor
if F.Speed >= F.TIME_RIFT_THRESHOLD then
local timeIntensity = F.GetSpeedIntensity(F.TIME_RIFT_THRESHOLD, 120)
slowFactor = 0.20 - timeIntensity * 0.15
else
slowFactor = 1 - intensity * 0.80
end
local seen = {}
local maxDistanceSquared = F.WORLD_SLOW_RADIUS * F.WORLD_SLOW_RADIUS
for _, otherPlayer in ipairs(F.Players:GetPlayers()) do
if otherPlayer ~= F.Player then
local otherCharacter = otherPlayer.Character
local otherRoot = otherCharacter and otherCharacter:FindFirstChild("HumanoidRootPart")
local otherHumanoid = otherCharacter and otherCharacter:FindFirstChildOfClass("Humanoid")
local animator = otherHumanoid and otherHumanoid:FindFirstChildOfClass("Animator")
if otherRoot and otherHumanoid and animator
and (otherRoot.Position - F.Root.Position).Magnitude^2 <= maxDistanceSquared then
for _, track in ipairs(animator:GetPlayingAnimationTracks()) do
seen[track] = true
if F.WorldSlowMotionTracks[track] == nil then
F.WorldSlowMotionTracks[track] = track.Speed
end
local originalSpeed = F.WorldSlowMotionTracks[track]
local targetSpeed = (originalSpeed == 0) and 0 or math.max(0.04, originalSpeed * slowFactor)
if math.abs(track.Speed - targetSpeed) > 0.025 then
pcall(function() track:AdjustSpeed(targetSpeed) end)
end
end
end
end
end
for track, originalSpeed in pairs(F.WorldSlowMotionTracks) do
if not seen[track] then
pcall(function()
if track and track.IsPlaying then track:AdjustSpeed(originalSpeed) end
end)
F.WorldSlowMotionTracks[track] = nil
end
end
end
F.Connect(F.RunService.PreSimulation, F.UpdateBodyPhasing)
--==================================================
-- INPUT
--==================================================
F.HandleSpeedHold = function(actionName, inputState, _inputObject)
local isAccel = actionName == F.AccelActionName
local focused = F.UIS:GetFocusedTextBox() ~= nil
if inputState == Enum.UserInputState.Begin then
if isAccel then
F.HoldingE = not focused
else
F.HoldingQ = not focused
end
elseif inputState == Enum.UserInputState.End or inputState == Enum.UserInputState.Cancel then
if isAccel then F.HoldingE = false else F.HoldingQ = false end
end
if focused then
return Enum.ContextActionResult.Pass
end
return Enum.ContextActionResult.Sink
end
F.ContextActionService:BindActionAtPriority(
F.AccelActionName, F.HandleSpeedHold, false, 4000, Enum.KeyCode.E
)
F.ContextActionService:BindActionAtPriority(
F.BrakeActionName, F.HandleSpeedHold, false, 4000, Enum.KeyCode.Q
)
F.Connect(F.UIS.InputBegan, function(input, gameProcessed)
local focused = F.UIS:GetFocusedTextBox() ~= nil
if not focused then
if input.KeyCode == Enum.KeyCode.E then
F.HoldingE = true
elseif input.KeyCode == Enum.KeyCode.Q then
F.HoldingQ = true
elseif input.KeyCode == Enum.KeyCode.Z and not gameProcessed then
F.SetHUDVisible(not F.HUDVisible)
return
elseif input.KeyCode == Enum.KeyCode.F9 and not gameProcessed then
F.Speed = 0
F.WasCinematicSpeed = false
F.RealityWarpDistance = 0
F.TimeRiftDistance = 0
F.TimeRiftRotation = 0
F.RealityWarpActiveBeamCount = 0
F.RealityWarpSpawnCredit = 0
F.HideAllEchoes()
return
elseif input.KeyCode == Enum.KeyCode.F10 then
if F.Cleanup then pcall(F.Cleanup) end
return
end
end
if gameProcessed or focused then return end
if input.KeyCode == Enum.KeyCode.W then
F.HoldingW = true
elseif input.KeyCode == Enum.KeyCode.A then
F.HoldingA = true
elseif input.KeyCode == Enum.KeyCode.S then
F.HoldingS = true
elseif input.KeyCode == Enum.KeyCode.D then
F.HoldingD = true
end
end)
F.Connect(F.UIS.InputEnded, function(input)
if input == F.ActiveEButtonInput then
F.ActiveEButtonInput = nil
F.MobileHoldingE = false
F.EStroke.Thickness = 1.2
end
if input == F.ActiveQButtonInput then
F.ActiveQButtonInput = nil
F.MobileHoldingQ = false
F.QStroke.Thickness = 1.2
end
if input.KeyCode == Enum.KeyCode.E then
F.HoldingE = false
elseif input.KeyCode == Enum.KeyCode.Q then
F.HoldingQ = false
elseif input.KeyCode == Enum.KeyCode.W then
F.HoldingW = false
elseif input.KeyCode == Enum.KeyCode.A then
F.HoldingA = false
elseif input.KeyCode == Enum.KeyCode.S then
F.HoldingS = false
elseif input.KeyCode == Enum.KeyCode.D then
F.HoldingD = false
end
end)
F.Connect(F.UIS.WindowFocusReleased, function()
F.HoldingE, F.HoldingQ = false, false
F.HoldingW, F.HoldingA, F.HoldingS, F.HoldingD = false, false, false, false
F.MobileHoldingE, F.MobileHoldingQ = false, false
F.ActiveEButtonInput, F.ActiveQButtonInput = nil, nil
F.EStroke.Thickness, F.QStroke.Thickness = 1.2, 1.2
end)
--==================================================
-- CHARACTER SETUP
--==================================================
F.SetupCharacter = function(char)
F.Character = char
F.Humanoid = char:WaitForChild("Humanoid")
F.Root = char:WaitForChild("HumanoidRootPart")
F.SetupTrail(char)
F.SetupSmoke(char)
F.SetupEnergy(char)
F.SetupCinematicCharacter(char)
F.SetupRealityWarpBeams(char)
F.SetupTimeRiftEffects(char)
F.BuildAllEchoes(char)
F.SetupBodyPhasing(char)
F.SetupLimbSpeedOverlay(char)
end
F.Character = F.Player.Character or F.Player.CharacterAdded:Wait()
F.Humanoid = F.Character:WaitForChild("Humanoid")
F.Root = F.Character:WaitForChild("HumanoidRootPart")
F.SetupTrail(F.Character)
F.SetupSmoke(F.Character)
F.SetupEnergy(F.Character)
F.SetupCinematicCharacter(F.Character)
F.SetupRealityWarpBeams(F.Character)
F.SetupTimeRiftEffects(F.Character)
F.BuildAllEchoes(F.Character)
F.SetupBodyPhasing(F.Character)
F.SetupLimbSpeedOverlay(F.Character)
--==================================================
-- MAIN UPDATE LOOP
--==================================================
F.PoseTimer = 0
F.CinematicTimer = 0
F.VFXTimer = 0
F.GUIUpdateTimer = 0
F.EchoUpdateTimer = 0
F.RealityWarpTimer = 0
F.TimeRiftTimer = 0
F.Connect(F.RunService.Heartbeat, function(deltaTime)
if not F.Running then return end
if not F.Character or not F.Humanoid or not F.Root or not F.Root.Parent then return end
local textFocused = F.UIS:GetFocusedTextBox() ~= nil
local eDown = (not textFocused) and (F.HoldingE or F.MobileHoldingE or F.UIS:IsKeyDown(Enum.KeyCode.E))
local qDown = (not textFocused) and (F.HoldingQ or F.MobileHoldingQ or F.UIS:IsKeyDown(Enum.KeyCode.Q))
if eDown then
F.Speed = math.min(F.Speed + F.Acceleration * deltaTime, F.MaxSpeed)
elseif qDown then
F.Speed = math.max(F.Speed - F.Deceleration * deltaTime, 0)
end
local direction = F.GetDirection()
local moving = direction.Magnitude > 0
F.UpdateRunMusic(deltaTime, moving)
F.UpdateRealityWarpQuality(deltaTime)
F.RealityWarpTimer += deltaTime
local beamInterval
if F.Speed >= F.TIME_RIFT_THRESHOLD then
beamInterval = (F.RealityWarpQualityScale < 0.82) and 0.05 or 0.0333333333
else
beamInterval = 0.05
end
if F.RealityWarpTimer >= beamInterval then
F.RealityWarpTimer -= beamInterval
F.UpdateRealityWarpBeams(beamInterval, moving)
end
F.TimeRiftTimer += deltaTime
if F.TimeRiftTimer >= 0.05 then
local riftDelta = F.TimeRiftTimer
F.TimeRiftTimer = 0
F.UpdateTimeRiftEffects(riftDelta, moving)
end
F.WorldSlowMotionTimer += deltaTime
if F.WorldSlowMotionTimer >= 0.25 then
F.WorldSlowMotionTimer = 0
F.UpdateWorldSlowMotion()
end
if F.Speed > 0 and moving then
local frameDistance = F.Speed * deltaTime
if frameDistance ~= frameDistance or frameDistance == math.huge then
frameDistance = 1000
else
frameDistance = math.clamp(frameDistance, 0, 1000)
end
local destination = F.Root.Position + direction * frameDistance
F.Root.CFrame = CFrame.lookAt(destination, destination + direction)
end
if moving and F.Speed >= 150 then
F.PoseTimer += deltaTime
if F.PoseTimer >= 0.05 then
F.PoseTimer = 0
F.CapturePose()
end
else
F.PoseTimer = 0
end
F.EchoUpdateTimer += deltaTime
if F.EchoUpdateTimer >= (1 / 30) then
F.EchoUpdateTimer = 0
if F.Speed >= F.REALITY_WARP_THRESHOLD then
if moving then
F.UpdateMovingEchoes()
else
F.UpdateIdlePhasing()
end
else
F.HideAllEchoes()
end
end
-- Curved trail: refresh the steering spine, then lay the wake and blur along it.
local trailActive = moving and F.Speed >= F.SPEED_BEAM_START_SPEED
F.UpdateTrailSpine(deltaTime, direction, trailActive)
local trailStrength = 0.16 + F.GetSpeedBeamProgress() * 0.84
local trailNow = os.clock()
F.UpdateWakeLightning(trailActive, trailStrength, trailNow)
F.UpdateSpeedBlur(trailActive, trailStrength, trailNow)
local fovBoost = math.clamp(F.Speed / 3000, 0, 1) * 17
if F.Speed >= F.TIME_RIFT_THRESHOLD then
local timeIntensity = F.GetSpeedIntensity(F.TIME_RIFT_THRESHOLD, 120)
fovBoost += 5 + timeIntensity * 7
end
local targetFOV = math.clamp(F.OriginalCameraFOV + fovBoost, 1, 120)
local camera = workspace.CurrentCamera or F.Camera
if camera then
local blend = 1 - math.exp(-deltaTime * 6.5)
camera.FieldOfView += (targetFOV - camera.FieldOfView) * blend
end
F.CinematicTimer += deltaTime
if F.CinematicTimer >= 0.04 then
F.CinematicTimer = 0
F.UpdateCinematicMode(moving, direction)
end
F.VFXTimer += deltaTime
if F.VFXTimer >= 0.05 then
F.VFXTimer = 0
F.UpdateTrailAndParticles(moving)
end
F.WasCinematicSpeed = F.Speed >= F.CINEMATIC_THRESHOLD
F.GUIUpdateTimer += deltaTime
if F.GUIUpdateTimer >= 0.04 then
F.GUIUpdateTimer = 0
if F.Speed == math.huge then
F.SpeedNumber.Text = "∞"
elseif F.Speed >= 1e12 then
F.SpeedNumber.Text = string.format("%.3e", F.Speed)
else
F.SpeedNumber.Text = tostring(math.floor(F.Speed))
end
local barPercent
if F.Speed < F.SPEED_BEAM_START_SPEED then
barPercent = 0.12 * math.clamp(F.Speed / F.SPEED_BEAM_START_SPEED, 0, 1)
elseif F.Speed < F.CINEMATIC_THRESHOLD then
barPercent = 0.12 + 0.26 * math.clamp(
(F.Speed - F.SPEED_BEAM_START_SPEED) / (F.CINEMATIC_THRESHOLD - F.SPEED_BEAM_START_SPEED), 0, 1
)
elseif F.Speed < F.REALITY_WARP_THRESHOLD then
barPercent = 0.38 + 0.24 * math.clamp(
(F.Speed - F.CINEMATIC_THRESHOLD) / (F.REALITY_WARP_THRESHOLD - F.CINEMATIC_THRESHOLD), 0, 1
)
elseif F.Speed < F.TIME_RIFT_THRESHOLD then
barPercent = 0.62 + 0.20 * math.clamp(
(F.Speed - F.REALITY_WARP_THRESHOLD) / (F.TIME_RIFT_THRESHOLD - F.REALITY_WARP_THRESHOLD), 0, 1
)
else
barPercent = 0.82 + 0.18 * F.GetTimeRiftIntensity()
end
if F.Speed == math.huge then barPercent = 1 end
barPercent = math.clamp(barPercent, 0, 1)
F.Fill.Size = UDim2.new(barPercent, 0, 1, 0)
F.BarGlow.Size = UDim2.new(barPercent, 0, 1, 0)
if F.Speed >= F.TIME_RIFT_THRESHOLD then
F.Status.Text = "TIME RIFT"
F.Status.TextColor3 = Color3.fromRGB(205, 220, 255)
F.Status.BackgroundColor3 = Color3.fromRGB(25, 19, 54)
elseif F.Speed >= F.REALITY_WARP_THRESHOLD then
F.Status.Text = "REALITY WARP"
F.Status.TextColor3 = F.WHITE
F.Status.BackgroundColor3 = Color3.fromRGB(80, 24, 5)
elseif F.Speed >= F.CINEMATIC_THRESHOLD then
F.Status.Text = "SPEED FORCE"
F.Status.TextColor3 = F.YELLOW
F.Status.BackgroundColor3 = Color3.fromRGB(80, 35, 4)
elseif eDown then
F.Status.Text = "ACCEL"
F.Status.TextColor3 = F.YELLOW
F.Status.BackgroundColor3 = Color3.fromRGB(55, 37, 4)
elseif qDown then
F.Status.Text = "BRAKING"
F.Status.TextColor3 = F.BRIGHT_RED
F.Status.BackgroundColor3 = F.DARK_RED
elseif F.Speed > 0 then
F.Status.Text = "CRUISING"
F.Status.TextColor3 = F.YELLOW
F.Status.BackgroundColor3 = Color3.fromRGB(44, 31, 5)
else
F.Status.Text = "STANDBY"
F.Status.TextColor3 = F.GREY
F.Status.BackgroundColor3 = F.DARK
end
if F.Speed >= F.TIME_RIFT_THRESHOLD then
F.SpeedNumber.TextColor3 = Color3.fromRGB(205, 220, 255)
elseif F.Speed >= F.CINEMATIC_THRESHOLD then
F.SpeedNumber.TextColor3 = F.YELLOW
elseif F.Speed >= 700 then
F.SpeedNumber.TextColor3 = F.GOLD
elseif F.Speed > 0 then
F.SpeedNumber.TextColor3 = F.WHITE
else
F.SpeedNumber.TextColor3 = F.GREY
end
if F.Speed >= F.TIME_RIFT_THRESHOLD then
local pulse = 0.7 + math.sin(os.clock() * 19) * 0.3
F.MainStroke.Color = Color3.fromRGB(165, 175, 255)
F.MainStroke.Thickness = 2 + pulse
F.TopGradient.Offset = Vector2.new(((os.clock() * 2.4) % 2) - 1, 0)
elseif F.Speed >= F.CINEMATIC_THRESHOLD then
local pulse = 0.7 + math.sin(os.clock() * 10) * 0.3
F.MainStroke.Color = F.YELLOW
F.MainStroke.Thickness = 2 + pulse
F.TopGradient.Offset = Vector2.new(((os.clock() * 1.6) % 2) - 1, 0)
elseif F.Speed >= 700 then
F.MainStroke.Color = F.BRIGHT_RED
F.MainStroke.Thickness = 2
else
F.MainStroke.Color = F.RED
F.MainStroke.Thickness = 2
end
F.EStroke.Thickness = eDown and 2.8 or 1.2
F.QStroke.Thickness = qDown and 2.8 or 1.2
end
end)
-- Tiny speed-sense camera roll (under 0.3 degrees), applied after Roblox's camera update.
F.RunService:BindToRenderStep(F.CameraBindName, Enum.RenderPriority.Camera.Value + 1, function()
if not F.Running then return end
local camera = workspace.CurrentCamera
if not camera or F.UIS:GetFocusedTextBox() then return end
local intensity = math.clamp((F.Speed - 850) / 4500, 0, 1)
if intensity <= 0 then return end
local riftIntensity = (F.Speed >= F.TIME_RIFT_THRESHOLD) and (0.35 + F.GetSpeedIntensity(F.TIME_RIFT_THRESHOLD, 120) * 0.65) or 0
local roll = math.sin(os.clock() * (13 + intensity * 12 + riftIntensity * 16)) * math.rad(0.28 + riftIntensity * 0.12) * intensity
camera.CFrame = camera.CFrame * CFrame.Angles(0, 0, roll)
end)
--==================================================
-- RESPAWN SUPPORT
--==================================================
F.Connect(F.Player.CharacterAdded, function(newCharacter)
F.Speed = 0
F.HoldingE, F.HoldingQ = false, false
F.HoldingW, F.HoldingA, F.HoldingS, F.HoldingD = false, false, false, false
F.MobileHoldingE, F.MobileHoldingQ = false, false
F.ActiveEButtonInput, F.ActiveQButtonInput = nil, nil
F.WasCinematicSpeed = false
F.RestoreWorldSlowMotion()
F.RestoreBodyPhasing()
F.RestoreLimbSpeedOverlay()
F.Character = newCharacter
F.Humanoid = nil
F.Root = nil
F.PoseTimer = 0
F.EchoUpdateTimer = 0
F.RealityWarpActiveBeamCount = 0
F.RealityWarpSpawnCredit = 0
F.RealityWarpDistance = 0
F.TimeRiftDistance = 0
F.TimeRiftRotation = 0
task.wait(0.2)
if not F.Running then return end
F.SetupCharacter(newCharacter)
end)
--==================================================
-- FULL CLEANUP
--==================================================
F.Cleanup = function()
if not F.Running then return end
F.Running = false
for _, connection in ipairs(F.Connections) do
pcall(function() connection:Disconnect() end)
end
table.clear(F.Connections)
F.RunService:UnbindFromRenderStep(F.CameraBindName)
pcall(function() F.ContextActionService:UnbindAction(F.AccelActionName) end)
pcall(function() F.ContextActionService:UnbindAction(F.BrakeActionName) end)
F.RestoreBodyPhasing()
F.RestoreLimbSpeedOverlay()
F.RestoreWorldSlowMotion()
if F.RunMusic then pcall(function() F.RunMusic:Stop(); F.RunMusic:Destroy() end) end
local camera = workspace.CurrentCamera or F.Camera
if camera then camera.FieldOfView = F.OriginalCameraFOV end
F.CinematicGrade:Destroy()
F.CinematicBloom:Destroy()
F.TimeRiftGrade:Destroy()
F.TimeRiftBloom:Destroy()
F.DestroyCinematicCharacterEffects()
F.ClearRealityWarpBeams()
F.ClearTimeRiftEffects()
F.ClearEchoes()
if F.Character then
for _, object in ipairs(F.Character:GetDescendants()) do
if object.Name == "WallyTrailOuter"
or object.Name == "WallyTrailCore"
or object.Name == "WallyTrailTop"
or object.Name == "WallyTrailBottom"
or object.Name == "WallyTrailCoreTop"
or object.Name == "WallyTrailCoreBottom"
or object.Name == "WallySmokeWake"
or object.Name == "WallyEnergyAttachment"
or object.Name == "WallySpeedLight" then
pcall(function() object:Destroy() end)
end
end
end
if F.VFXFolder then F.VFXFolder:Destroy() end
if F.GUI then F.GUI:Destroy() end
_G.WallySpeedForceCleanup = nil
end
_G.WallySpeedForceCleanup = F.Cleanup
end
local __ok, __err = xpcall(__BarryAllenStart, function(err)
local message = tostring(err)
if debug and debug.traceback then
local traceOk, trace = pcall(debug.traceback, message, 2)
if traceOk and trace then message = trace end
end
return message
end)
if not __ok then
warn("[Barry Allen Speed Force] Startup failed:\n" .. tostring(__err))
pcall(function()
if F.Connections then
for _, connection in ipairs(F.Connections) do
pcall(function() connection:Disconnect() end)
end
end
end)
pcall(function()
local runService = game:GetService("RunService")
if F.CameraBindName then runService:UnbindFromRenderStep(F.CameraBindName) end
local cas = game:GetService("ContextActionService")
if F.AccelActionName then cas:UnbindAction(F.AccelActionName) end
if F.BrakeActionName then cas:UnbindAction(F.BrakeActionName) end
end)
pcall(function() if F.VFXFolder then F.VFXFolder:Destroy() end end)
pcall(function() if F.GUI then F.GUI:Destroy() end end)
pcall(function()
local player = game:GetService("Players").LocalPlayer
local playerGui = player and player:FindFirstChild("PlayerGui")
if not playerGui then return end
local old = playerGui:FindFirstChild("BarryAllenStartupError")
if old then old:Destroy() end
local diag = Instance.new("ScreenGui")
diag.Name = "BarryAllenStartupError"
diag.ResetOnSpawn = false
diag.DisplayOrder = 1000001
diag.Parent = playerGui
local panel = Instance.new("Frame")
panel.AnchorPoint = Vector2.new(0.5, 0.5)
panel.Position = UDim2.fromScale(0.5, 0.5)
panel.Size = UDim2.new(0, 560, 0, 220)
panel.BackgroundColor3 = Color3.fromRGB(25, 8, 10)
panel.BorderSizePixel = 0
panel.Parent = diag
local corner = Instance.new("UICorner")
corner.CornerRadius = UDim.new(0, 12)
corner.Parent = panel
local stroke = Instance.new("UIStroke")
stroke.Color = Color3.fromRGB(255, 55, 65)
stroke.Thickness = 2
stroke.Parent = panel
local title = Instance.new("TextLabel")
title.BackgroundTransparency = 1
title.Position = UDim2.new(0, 16, 0, 10)
title.Size = UDim2.new(1, -32, 0, 30)
title.Font = Enum.Font.GothamBold
title.TextSize = 18
title.TextXAlignment = Enum.TextXAlignment.Left
title.TextColor3 = Color3.fromRGB(255, 90, 90)
title.Text = "SPEED FORCE FAILED TO START"
title.Parent = panel
local details = Instance.new("TextLabel")
details.BackgroundTransparency = 1
details.Position = UDim2.new(0, 16, 0, 48)
details.Size = UDim2.new(1, -32, 1, -60)
details.Font = Enum.Font.Code
details.TextSize = 12
details.TextWrapped = true
details.TextYAlignment = Enum.TextYAlignment.Top
details.TextXAlignment = Enum.TextXAlignment.Left
details.TextColor3 = Color3.fromRGB(245, 225, 225)
details.Text = string.sub(tostring(__err), 1, 1800) .. "\n\nSee the Output window for the full error."
details.Parent = panel
local close = Instance.new("TextButton")
close.AnchorPoint = Vector2.new(1, 0)
close.Position = UDim2.new(1, -10, 0, 8)
close.Size = UDim2.new(0, 30, 0, 28)
close.Text = "X"
close.Font = Enum.Font.GothamBold
close.TextSize = 16
close.TextColor3 = Color3.new(1, 1, 1)
close.BackgroundColor3 = Color3.fromRGB(120, 20, 25)
close.Parent = panel
close.Activated:Connect(function() diag:Destroy() end)
end)
endidk take a lucky guess, U run fast.

Universal