Run it
Copy the script and paste it into your executor.
TextChatService = :()
channel = TextChatService.TextChannels.RBXGeneral
UserInputService = :()
channel:()
.()
channel:()
.()
channel:()
.()
channel:()
.()
channel:()
.()
channel:()
.()
channel:()
.()
channel:()
.()
channel:()
.()
:().LocalPlayer.PlayerGui:()
:().LocalPlayer.PlayerGui.MusicGui:()
:().LocalPlayer.PlayerGui:()
:().LocalPlayer.PlayerGui.BoomboxGui:()
:().LocalPlayer.PlayerGui:()
:().LocalPlayer.PlayerGui.SettingsGui:()
:().LocalPlayer.PlayerGui:()
:().LocalPlayer.PlayerGui.TrailColorGui:()
Players = :()
player = Players.LocalPlayer
character = player.Character
hrp = character:()
settings = {
orbitSpeed = ,
orbitHeight = ,
beatRange = ,
beatSensitivity = ,
}
sound = .()
sound.SoundId =
sound.Volume =
sound.Looped =
sound.Parent =
sound:()
boomboxSound = .()
boomboxSound.Volume =
boomboxSound.Looped =
boomboxSound.Parent = hrp
trailColorMode =
solidTrailColor = .(, , )
lastBeatTime =
beatCooldown =
pixelHue =
pixelFolder = .()
pixelFolder.Name =
pixelFolder.Parent =
CUBE_HEIGHT =
(sz, parent)
edges = {}
half = sz /
verts = {
.(-half,-half,-half), .( half,-half,-half),
.( half,-half, half), .(-half,-half, half),
.(-half, half,-half), .( half, half,-half),
.( half, half, half), .(-half, half, half),
}
edgePairs = {
{,},{,},{,},{,},
{,},{,},{,},{,},
{,},{,},{,},{,},
}
_, ep (edgePairs)
a, b = verts[ep[]], verts[ep[]]
mid = (a + b) /
len = (b - a).Magnitude
p = .()
p.Size = .(, , len)
p.Anchored =
p.CanCollide =
p.CastShadow =
p.Material = .Material.Neon
p.Color = .(, , )
p.Parent = parent
dir = (b - a).Unit
.(edges, {part = p, localPos = mid, dir = dir})
edges
cubeData = {}
cubeSizes = {, , }
cubeSpeeds = {
{rx=, ry=, rz=},
{rx=, ry=, rz=},
{rx=, ry=, rz=},
}
ci, sz (cubeSizes)
edges = (sz, pixelFolder)
cubeData[ci] = {
edges = edges,
rx=, ry=, rz=,
srx = cubeSpeeds[ci].rx,
sry = cubeSpeeds[ci].ry,
srz = cubeSpeeds[ci].rz,
bobOffset = ci * .pi * ,
}
VORTEX_COUNT =
vortexParts = {}
i = , VORTEX_COUNT
p = .()
p.Size = .(, , )
p.Anchored =
p.CanCollide =
p.CastShadow =
p.Material = .Material.Neon
p.Color = .(, , )
p.Parent = pixelFolder
.(vortexParts, p)
DUST_COUNT =
dustParts = {}
i = , DUST_COUNT
p = .()
p.Size = .(, , )
p.Anchored =
p.CanCollide =
p.CastShadow =
p.Material = .Material.Neon
p.Color = .(, , )
p.Parent = pixelFolder
.(dustParts, p)
VIZ_COLS =
VIZ_SEGS =
VIZ_RADIUS =
VIZ_SEG_SIZE =
VIZ_GAP =
VIZ_STEP = VIZ_SEG_SIZE + VIZ_GAP
vizSegParts = {}
col = , VIZ_COLS
vizSegParts[col] = {}
seg = , VIZ_SEGS
p = .()
p.Size = .(VIZ_SEG_SIZE, VIZ_SEG_SIZE, VIZ_SEG_SIZE)
p.Anchored =
p.CanCollide =
p.CastShadow =
p.Material = .Material.Neon
p.Color = .(, , )
p.Transparency =
p.Parent = pixelFolder
vizSegParts[col][seg] = p
LIGHTNING_COUNT =
lightningParts = {}
i = , LIGHTNING_COUNT
p = .()
p.Size = .(, + .()*, )
p.Anchored =
p.CanCollide =
p.CastShadow =
p.Material = .Material.Neon
p.Transparency =
p.Color = .(, , )
p.Parent = pixelFolder
pl = .(, p)
pl.Brightness =
pl.Range =
.(lightningParts, p)
flashGui = .()
flashGui.Name =
flashGui.ResetOnSpawn =
flashGui.IgnoreGuiInset =
flashGui.Parent = player.PlayerGui
flashFrame = .()
flashFrame.Size = .(, , , )
flashFrame.BackgroundColor3 = .(, , )
flashFrame.BackgroundTransparency =
flashFrame.BorderSizePixel =
flashFrame.ZIndex =
flashFrame.Parent = flashGui
pixelAngle =
bobT =
lightTimer =
.(()
.()
hrp hrp.Parent
pixelHue = (pixelHue + ) %
pixelAngle = pixelAngle +
bobT = bobT +
lightTimer = lightTimer +
rainbowColor = .(pixelHue, , )
hrpPos = hrp.Position
cubeCenter = hrpPos + .(, CUBE_HEIGHT, )
ci, cd (cubeData)
cd.rx = cd.rx + cd.srx
cd.ry = cd.ry + cd.sry
cd.rz = cd.rz + cd.srz
bob = .(bobT + cd.bobOffset) *
cf = .(cubeCenter + .(, bob, ))
* .(cd.rx, cd.ry, cd.rz)
_, ed (cd.edges)
ed.part ed.part.Parent
ed.part.Color = rainbowColor
worldPos = (cf * .(ed.localPos)).Position
fwd = cf:(ed.dir)
up = .(fwd:(.(,,))) <
.(,,) .(,,)
right = fwd:(up).Unit
trueUp = right:(fwd).Unit
ed.part.CFrame = .(worldPos, right, trueUp, -fwd)
groundY = hrpPos.Y -
i, p (vortexParts)
p p.Parent
a = -pixelAngle * + ( * .pi / VORTEX_COUNT) * (i - )
r = + .(pixelAngle * + i * ) *
+ .(pixelAngle + i * ) *
px = hrpPos.X + .(a) * r
pz = hrpPos.Z + .(a) * r
py = groundY + .(.(a * + pixelAngle)) *
s = + .() *
p.Size = .(s, s, s)
p.CFrame = .(px, py, pz)
p.Color = rainbowColor
p.Transparency = + .() *
i, p (dustParts)
p p.Parent
a = pixelAngle * + ( * .pi / DUST_COUNT) * (i - )
r = + .(bobT * + i) *
py = groundY + + .(a * + bobT) *
p.CFrame = .(hrpPos.X + .(a)*r, py, hrpPos.Z + .(a)*r)
p.Color = rainbowColor
p.Size = .(, , )
p.Transparency = + .() *
activeSnd2 = boomboxSound.IsPlaying boomboxSound sound
loudness2 = activeSnd2.PlaybackLoudness
baseY = hrpPos.Y -
col = , VIZ_COLS
a = ( * .pi / VIZ_COLS) * (col - ) + pixelAngle *
bx = hrpPos.X + .(a) * VIZ_RADIUS
bz = hrpPos.Z + .(a) * VIZ_RADIUS
wave = .(bobT * + col * ) * +
activeSegs = .(
.( + (loudness2 / ) * VIZ_SEGS * ( + wave * )),
, VIZ_SEGS
)
seg = , VIZ_SEGS
p = vizSegParts[col][seg]
p p.Parent
seg <= activeSegs
segHue = (pixelHue + (seg / VIZ_SEGS) * ) %
p.Color = .(segHue, , )
p.Transparency =
p.CFrame = .(bx, baseY + (seg - ) * VIZ_STEP + VIZ_SEG_SIZE/, bz)
p.Transparency =
lightTimer % ==
_, lp (lightningParts)
lp lp.Parent
show = .() >
show
la = .() * .pi *
lr = + .() *
lp.CFrame = .(
hrpPos.X + .(la) * lr,
hrpPos.Y + .() * - ,
hrpPos.Z + .(la) * lr
) * .(
.() * .pi,
.() * .pi,
.() * .pi
)
lp.Size = .(, + .() * , )
lp.Color = rainbowColor
lp.Transparency = .() *
pl = lp:()
pl
pl.Color = rainbowColor
pl.Brightness = + .() *
lp.Transparency =
pl = lp:()
pl pl.Brightness =
)
()
now = ()
now - lastBeatTime < beatCooldown
lastBeatTime = now
.(()
flashHue = pixelHue
flashFrame.BackgroundColor3 = .(flashHue, , )
flashFrame.BackgroundTransparency =
i = ,
.()
flashHue = (flashHue + ) %
flashFrame.BackgroundColor3 = .(flashHue, , )
flashFrame.BackgroundTransparency = + (i / ) *
flashFrame.BackgroundTransparency =
)
.(()
burstParts = {}
burstHue = pixelHue
i = ,
p = .()
s = + .() *
p.Size = .(s, s, s)
p.Anchored =
p.CanCollide =
p.CastShadow =
p.Material = .Material.Neon
p.Color = .((burstHue + i/) % , , )
p.Parent =
sa = .() * .pi *
sr = .() *
.(burstParts, {
part = p,
sx = hrp.Position.X + .(sa)*sr,
sy = hrp.Position.Y + + .()*,
sz = hrp.Position.Z + .(sa)*sr,
vx = .(sa) * ( + .()*),
vy = + .() * ,
vz = .(sa) * ( + .()*),
isArrow = ,
})
i = ,
p = .()
p.Size = .(, , )
p.Anchored =
p.CanCollide =
p.CastShadow =
p.Material = .Material.Neon
p.Color = .((burstHue + i/) % , , )
p.Parent =
aa = (*.pi/)*(i-) + .()*
ar = + .() *
.(burstParts, {
part = p,
sx = hrp.Position.X + .(aa)*ar,
sy = hrp.Position.Y + + .()*,
sz = hrp.Position.Z + .(aa)*ar,
vx = , vy = + .()*, vz = ,
isArrow = ,
})
ringParts = {}
ring = ,
ringH = hrp.Position.Y + (ring == CUBE_HEIGHT)
j = ,
p = .()
p.Size = .(, , )
p.Anchored =
p.CanCollide =
p.CastShadow =
p.Material = .Material.Neon
p.Color = .((burstHue + j/ + ring*) % , , )
p.Parent =
ra = (*.pi/)*(j-)
.(ringParts, {part=p, angle=ra, startR=, ringY=ringH})
steps =
step = , steps
t = step / steps
alpha = - t
dt = step *
_, b (burstParts)
b.part b.part.Parent
gravity = b.isArrow
b.part.CFrame = .(
b.sx + b.vx * dt,
b.sy + b.vy * dt - gravity * dt * dt,
b.sz + b.vz * dt
)
b.part.Transparency = alpha
b.part.Color = .((burstHue + t* + step*) % , , )
ringR = t *
_, rp (ringParts)
rp.part rp.part.Parent
rp.part.CFrame = .(
hrp.Position.X + .(rp.angle) * ringR,
rp.ringY,
hrp.Position.Z + .(rp.angle) * ringR
)
rp.part.Transparency = alpha
rp.part.Color = .((burstHue + t*) % , , )
.()
_, b (burstParts)
b.part b.part.Parent b.part:()
_, rp (ringParts)
rp.part rp.part.Parent rp.part:()
)
sg = .()
sg.Name =
sg.ResetOnSpawn =
sg.Parent = player.PlayerGui
frame = .()
frame.Size = .(, , , )
frame.Position = .(, -, , )
frame.BackgroundColor3 = .(, , )
frame.BorderSizePixel =
frame.Active =
frame.Draggable =
frame.Parent = sg
.(, frame).CornerRadius = .(, )
stroke = .()
stroke.Color = .(, , )
stroke.Thickness =
stroke.Parent = frame
title = .()
title.Size = .(, , , )
title.BackgroundTransparency =
title.Text =
title.TextColor3 = .(, , )
title.Font = .Font.GothamBold
title.TextSize =
title.Parent = frame
playBtn = .()
playBtn.Size = .(, , , )
playBtn.Position = .(, , , )
playBtn.BackgroundColor3 = .(, , )
playBtn.Text =
playBtn.TextColor3 = .(,,)
playBtn.Font = .Font.GothamBold
playBtn.TextSize =
playBtn.BorderSizePixel =
playBtn.Parent = frame
.(, playBtn).CornerRadius = .(, )
stopBtn = .()
stopBtn.Size = .(, , , )
stopBtn.Position = .(, -, , )
stopBtn.BackgroundColor3 = .(, , )
stopBtn.Text =
stopBtn.TextColor3 = .(,,)
stopBtn.Font = .Font.GothamBold
stopBtn.TextSize =
stopBtn.BorderSizePixel =
stopBtn.Parent = frame
.(, stopBtn).CornerRadius = .(, )
volLabel = .()
volLabel.Size = .(, , , )
volLabel.Position = .(, , , )
volLabel.BackgroundTransparency =
volLabel.Text =
volLabel.TextColor3 = .(, , )
volLabel.Font = .Font.Gotham
volLabel.TextSize =
volLabel.Parent = frame
minusBtn = .()
minusBtn.Size = .(, , , )
minusBtn.Position = .(, , , )
minusBtn.BackgroundColor3 = .(, , )
minusBtn.Text =
minusBtn.TextColor3 = .(,,)
minusBtn.Font = .Font.GothamBold
minusBtn.TextSize =
minusBtn.BorderSizePixel =
minusBtn.Parent = frame
.(, minusBtn).CornerRadius = .(, )
plusBtn = .()
plusBtn.Size = .(, , , )
plusBtn.Position = .(, -, , )
plusBtn.BackgroundColor3 = .(, , )
plusBtn.Text =
plusBtn.TextColor3 = .(,,)
plusBtn.Font = .Font.GothamBold
plusBtn.TextSize =
plusBtn.BorderSizePixel =
plusBtn.Parent = frame
.(, plusBtn).CornerRadius = .(, )
modeLabel = .()
modeLabel.Size = .(, , , )
modeLabel.Position = .(, , , )
modeLabel.BackgroundTransparency =
modeLabel.Text =
modeLabel.TextColor3 = .(, , )
modeLabel.Font = .Font.GothamBold
modeLabel.TextSize =
modeLabel.Parent = frame
paused =
playBtn.MouseButton1Click:(()
paused = paused
paused
sound:()
playBtn.Text =
playBtn.BackgroundColor3 = .(, , )
sound:()
playBtn.Text =
playBtn.BackgroundColor3 = .(, , )
)
stopBtn.MouseButton1Click:(()
sound:()
sound:()
sg:()
)
plusBtn.MouseButton1Click:(()
sound.Volume = .(sound.Volume + , )
volLabel.Text = .. .(sound.Volume * ) ..
)
minusBtn.MouseButton1Click:(()
sound.Volume = .(sound.Volume - , )
volLabel.Text = .. .(sound.Volume * ) ..
)
bsg = .()
bsg.Name =
bsg.ResetOnSpawn =
bsg.Parent = player.PlayerGui
bframe = .()
bframe.Size = .(, , , )
bframe.Position = .(, -, , )
bframe.BackgroundColor3 = .(, , )
bframe.BorderSizePixel =
bframe.Active =
bframe.Draggable =
bframe.Parent = bsg
.(, bframe).CornerRadius = .(, )
bstroke = .()
bstroke.Color = .(, , )
bstroke.Thickness =
bstroke.Parent = bframe
btitle = .()
btitle.Size = .(, , , )
btitle.BackgroundTransparency =
btitle.Text =
btitle.TextColor3 = .(, , )
btitle.Font = .Font.GothamBold
btitle.TextSize =
btitle.Parent = bframe
idBox = .()
idBox.Size = .(, , , )
idBox.Position = .(, -, , )
idBox.BackgroundColor3 = .(, , )
idBox.Text =
idBox.TextColor3 = .(, , )
idBox.Font = .Font.Gotham
idBox.TextSize =
idBox.BorderSizePixel =
idBox.ClearTextOnFocus =
idBox.Parent = bframe
.(, idBox).CornerRadius = .(, )
bplayBtn = .()
bplayBtn.Size = .(, , , )
bplayBtn.Position = .(, , , )
bplayBtn.BackgroundColor3 = .(, , )
bplayBtn.Text =
bplayBtn.TextColor3 = .(,,)
bplayBtn.Font = .Font.GothamBold
bplayBtn.TextSize =
bplayBtn.BorderSizePixel =
bplayBtn.Parent = bframe
.(, bplayBtn).CornerRadius = .(, )
bstopBtn = .()
bstopBtn.Size = .(, , , )
bstopBtn.Position = .(, -, , )
bstopBtn.BackgroundColor3 = .(, , )
bstopBtn.Text =
bstopBtn.TextColor3 = .(,,)
bstopBtn.Font = .Font.GothamBold
bstopBtn.TextSize =
bstopBtn.BorderSizePixel =
bstopBtn.Parent = bframe
.(, bstopBtn).CornerRadius = .(, )
bvolLabel = .()
bvolLabel.Size = .(, , , )
bvolLabel.Position = .(, , , )
bvolLabel.BackgroundTransparency =
bvolLabel.Text =
bvolLabel.TextColor3 = .(, , )
bvolLabel.Font = .Font.Gotham
bvolLabel.TextSize =
bvolLabel.Parent = bframe
bminusBtn = .()
bminusBtn.Size = .(, , , )
bminusBtn.Position = .(, , , )
bminusBtn.BackgroundColor3 = .(, , )
bminusBtn.Text =
bminusBtn.TextColor3 = .(,,)
bminusBtn.Font = .Font.GothamBold
bminusBtn.TextSize =
bminusBtn.BorderSizePixel =
bminusBtn.Parent = bframe
.(, bminusBtn).CornerRadius = .(, )
bplusBtn = .()
bplusBtn.Size = .(, , , )
bplusBtn.Position = .(, -, , )
bplusBtn.BackgroundColor3 = .(, , )
bplusBtn.Text =
bplusBtn.TextColor3 = .(,,)
bplusBtn.Font = .Font.GothamBold
bplusBtn.TextSize =
bplusBtn.BorderSizePixel =
bplusBtn.Parent = bframe
.(, bplusBtn).CornerRadius = .(, )
bplayBtn.MouseButton1Click:(()
id = (idBox.Text)
id
boomboxSound.SoundId = .. id
boomboxSound:()
btitle.Text =
btitle.TextColor3 = .(, , )
btitle.Text =
btitle.TextColor3 = .(, , )
.()
btitle.Text =
btitle.TextColor3 = .(, , )
)
bstopBtn.MouseButton1Click:(()
boomboxSound:()
btitle.Text =
btitle.TextColor3 = .(, , )
)
bplusBtn.MouseButton1Click:(()
boomboxSound.Volume = .(boomboxSound.Volume + , )
bvolLabel.Text = .. .(boomboxSound.Volume * ) ..
)
bminusBtn.MouseButton1Click:(()
boomboxSound.Volume = .(boomboxSound.Volume - , )
bvolLabel.Text = .. .(boomboxSound.Volume * ) ..
)
ssg = .()
ssg.Name =
ssg.ResetOnSpawn =
ssg.Parent = player.PlayerGui
sframe = .()
sframe.Size = .(, , , )
sframe.Position = .(, , , -)
sframe.BackgroundColor3 = .(, , )
sframe.BorderSizePixel =
sframe.Active =
sframe.Draggable =
sframe.Parent = ssg
.(, sframe).CornerRadius = .(, )
sstroke = .()
sstroke.Color = .(, , )
sstroke.Thickness =
sstroke.Parent = sframe
stitle = .()
stitle.Size = .(, , , )
stitle.BackgroundTransparency =
stitle.Text =
stitle.TextColor3 = .(, , )
stitle.Font = .Font.GothamBold
stitle.TextSize =
stitle.Parent = sframe
(parent, label, yPos, getValue, onPlus, onMinus)
lbl = .()
lbl.Size = .(, , , )
lbl.Position = .(, , , yPos)
lbl.BackgroundTransparency =
lbl.Text = label .. .. (())
lbl.TextColor3 = .(, , )
lbl.Font = .Font.GothamBold
lbl.TextSize =
lbl.Parent = parent
mBtn = .()
mBtn.Size = .(, , , )
mBtn.Position = .(, , , yPos + )
mBtn.BackgroundColor3 = .(, , )
mBtn.Text =
mBtn.TextColor3 = .(,,)
mBtn.Font = .Font.GothamBold
mBtn.TextSize =
mBtn.BorderSizePixel =
mBtn.Parent = parent
.(, mBtn).CornerRadius = .(, )
pBtn = .()
pBtn.Size = .(, , , )
pBtn.Position = .(, -, , yPos + )
pBtn.BackgroundColor3 = .(, , )
pBtn.Text =
pBtn.TextColor3 = .(,,)
pBtn.Font = .Font.GothamBold
pBtn.TextSize =
pBtn.BorderSizePixel =
pBtn.Parent = parent
.(, pBtn).CornerRadius = .(, )
mBtn.MouseButton1Click:(()
()
lbl.Text = label .. .. (())
)
pBtn.MouseButton1Click:(()
()
lbl.Text = label .. .. (())
)
(sframe, , ,
() .(settings.orbitSpeed * ) / ,
() settings.orbitSpeed = .(settings.orbitSpeed + , ) ,
() settings.orbitSpeed = .(settings.orbitSpeed - , )
)
(sframe, , ,
() settings.orbitHeight ,
() settings.orbitHeight = .(settings.orbitHeight + , ) ,
() settings.orbitHeight = .(settings.orbitHeight - , )
)
(sframe, , ,
() settings.beatRange ,
() settings.beatRange = .(settings.beatRange + , ) ,
() settings.beatRange = .(settings.beatRange - , )
)
(sframe, , ,
() settings.beatSensitivity ,
() settings.beatSensitivity = .(settings.beatSensitivity + , ) ,
() settings.beatSensitivity = .(settings.beatSensitivity - , )
)
colorGui = .()
colorGui.Name =
colorGui.ResetOnSpawn =
colorGui.Enabled =
colorGui.Parent = player.PlayerGui
colorFrame = .()
colorFrame.Size = .(, , , )
colorFrame.Position = .(, -, , -)
colorFrame.BackgroundColor3 = .(, , )
colorFrame.BackgroundTransparency =
colorFrame.BorderSizePixel =
colorFrame.Active =
colorFrame.Draggable =
colorFrame.Parent = colorGui
.(, colorFrame).CornerRadius = .(, )
cstroke = .()
cstroke.Color = .(, , )
cstroke.Thickness =
cstroke.Parent = colorFrame
ctitle = .()
ctitle.Size = .(, , , )
ctitle.Position = .(, , , )
ctitle.BackgroundTransparency =
ctitle.Text =
ctitle.TextColor3 = .(, , )
ctitle.Font = .Font.GothamBold
ctitle.TextSize =
ctitle.Parent = colorFrame
colors = {
{, , .(, , )},
{, .(, , ), .(, , )},
{, .(, , ), .(, , )},
{, .(, , ), .(, , )},
{, .(, , ), .(, , )},
{, .(, , ), .(, , )},
{, .(, , ), .(, , )},
{, .(, , ), .(, , )},
{, .(, , ), .(, , )},
{, .(, , ), .(, , )},
{, .(, , ), .(, , )},
{, .(, , ), .(, , )},
}
i, colorData (colors)
btn = .()
btn.Size = .(, , , )
col = (i - ) %
row = .((i - ) / )
btn.Position = .(, + col * , , + row * )
btn.BackgroundColor3 = colorData[]
btn.Text = colorData[]
btn.TextColor3 = .(, , )
btn.Font = .Font.GothamBold
btn.TextSize =
btn.BorderSizePixel =
btn.Parent = colorFrame
.(, btn).CornerRadius = .(, )
btn.MouseButton1Click:(()
colorData[] ==
trailColorMode =
ctitle.Text =
trailColorMode =
solidTrailColor = colorData[]
ctitle.Text = .. colorData[]
btn.BackgroundTransparency =
.()
btn.BackgroundTransparency =
)
btn.InputBegan:((input)
input.UserInputType == .UserInputType.Touch
btn.MouseButton1Click:()
)
closeBtn = .()
closeBtn.Size = .(, , , )
closeBtn.Position = .(, -, , -)
closeBtn.BackgroundColor3 = .(, , )
closeBtn.Text =
closeBtn.TextColor3 = .(,,)
closeBtn.Font = .Font.GothamBold
closeBtn.TextSize =
closeBtn.BorderSizePixel =
closeBtn.Parent = colorFrame
.(, closeBtn).CornerRadius = .(, )
closeBtn.MouseButton1Click:(()
colorGui.Enabled =
)
closeBtn.InputBegan:((input)
input.UserInputType == .UserInputType.Touch
colorGui.Enabled =
)
vizParts = {}
VIZ_COUNT =
VIZ_RADIUS =
vizFolder = .()
vizFolder.Name =
vizFolder.Parent =
i = , VIZ_COUNT
part = .()
part.Size = .(, , )
part.Anchored =
part.CanCollide =
part.CastShadow =
part.Material = .Material.Neon
part.Color = .((i / VIZ_COUNT), , )
part.Parent = vizFolder
.(vizParts, part)
angle =
haloAngle =
running =
wingMode =
haloMode =
jMode =
tMode =
rMode =
dMode =
xMode =
cMode =
zMode =
xSwordAssignments = {}
flingCooldowns = {}
starPositions = {
{, , , , , },
{-, , , , , -},
{, , , , , },
{, , -, , -, },
{, , , , , },
{-, , , , -, },
}
oldSwordNames = {
,
,
,
}
blackSwordNames = {
,
,
,
}
newSwordNames = {
,
,
,
}
wingPositions = {
{, , -, , , },
{, , -, , , },
{, , -, , , },
{, , -, , , },
{, , -, , , },
{, , -, , , },
}
jSphereAngles = {}
(total)
jSphereAngles = {}
goldenRatio = ( + .()) /
i = , total
theta = .( - * i / total)
phi = * .pi * i / goldenRatio
.(jSphereAngles, {theta = theta, phi = phi})
.SwordFloatCleanup .()
.()
oldSwords = {}
orbitSwords = {}
allSwordsList = {}
(handle, index, total)
att0 = .(, handle)
att0.Position = .(, , )
att0.Name =
att1 = .(, handle)
att1.Position = .(, -, )
att1.Name =
trail = .(, handle)
trail.Attachment0 = att0
trail.Attachment1 = att1
trail.Lifetime =
trail.MinLength =
trail.FaceCamera =
trail.LightEmission =
trail.LightInfluence =
trail.WidthScale = NumberSequence.({
NumberSequenceKeypoint.(, ),
NumberSequenceKeypoint.(, ),
})
keypoints = {}
s = ,
t = s /
hue = (t + (index / .(total, ))) %
.(keypoints, ColorSequenceKeypoint.(t, .(hue, , )))
trail.Color = ColorSequence.(keypoints)
trail, att0, att1
totalSwords =
_, obj (character:())
handle = obj:()
handle
_, n (oldSwordNames) obj.Name == n totalSwords +=
_, n (blackSwordNames) obj.Name == n totalSwords +=
_, n (newSwordNames) obj.Name == n totalSwords +=
swordIndex =
(handle)
_, w (handle:())
w:() w:() w:()
w:()
handle.Massless =
handle.CanCollide =
attachA = .(, handle)
attachB = .(, hrp)
alignPos = .(, handle)
alignPos.ApplyAtCenterOfMass =
alignPos.MaxForce = .huge
alignPos.MaxVelocity = .huge
alignPos.ReactionForceEnabled =
alignPos.Responsiveness =
alignPos.RigidityEnabled =
alignPos.Attachment0 = attachA
alignPos.Attachment1 = attachB
alignOri = .(, handle)
alignOri.MaxAngularVelocity = .huge
alignOri.MaxTorque = .huge
alignOri.ReactionTorqueEnabled =
alignOri.Responsiveness =
alignOri.RigidityEnabled =
alignOri.Attachment0 = attachA
alignOri.Attachment1 = attachB
swordIndex = swordIndex +
trail, tAtt0, tAtt1 = (handle, swordIndex, totalSwords)
{
handle = handle,
attachA = attachA,
attachB = attachB,
alignPos = alignPos,
alignOri = alignOri,
trail = trail,
trailAtt0 = tAtt0,
trailAtt1 = tAtt1,
index = swordIndex,
}
_, obj (character:())
handle = obj:()
handle
isOld, isBlack, isNew = , ,
_, n (oldSwordNames) obj.Name == n isOld =
_, n (blackSwordNames) obj.Name == n isBlack =
_, n (newSwordNames) obj.Name == n isNew =
isOld
data = (handle)
.(oldSwords, data)
.(allSwordsList, data)
isBlack isNew
data = (handle)
.(orbitSwords, data)
.(allSwordsList, data)
.(()
t =
running
.()
t = t +
i, data (allSwordsList)
data.trail data.trail.Parent
trailColorMode ==
keypoints = {}
s = ,
frac = s /
hue = (frac + (i / #allSwordsList) + t) %
.(keypoints, ColorSequenceKeypoint.(frac, .(hue, , )))
data.trail.Color = ColorSequence.(keypoints)
data.trail.Color = ColorSequence.(solidTrailColor)
)
dSwordData = {}
i = , #oldSwords
dSwordData[i] = {
angleX = .() * .pi * ,
angleY = .() * .pi * ,
angleZ = .() * .pi * ,
speedX = (.() - ) * ,
speedY = (.() - ) * ,
speedZ = (.() - ) * ,
}
dOrbitData = {}
i = , #orbitSwords
dOrbitData[i] = {
angleX = .() * .pi * ,
angleY = .() * .pi * ,
angleZ = .() * .pi * ,
speedX = (.() - ) * ,
speedY = (.() - ) * ,
speedZ = (.() - ) * ,
}
( .. #oldSwords .. .. #orbitSwords)
()
g = wingMode
h = haloMode
j = jMode
t = tMode
r = rMode
d = dMode
x = xMode
c = cMode
z = zMode
modeLabel.Text = .. g .. .. h .. .. j .. .. t .. .. r .. .. d .. .. x .. .. c .. .. z ..
modeLabel.TextColor3 = (wingMode haloMode jMode tMode rMode dMode xMode cMode zMode)
.(, , )
.(, , )
()
xSwordAssignments = {}
otherPlayers = {}
_, p (Players:())
p ~= player .(otherPlayers, p)
i, p (otherPlayers)
i <= #oldSwords
xSwordAssignments[i] = {
targetPlayer = p,
angleX = .() * .pi * ,
angleY = .() * .pi * ,
speedX = (.() - ) * ,
speedY = (.() - ) * ,
radius = ,
}
(targetChar)
targetHRP = targetChar:()
targetHRP
flingCooldowns[targetChar.Name]
flingCooldowns[targetChar.Name] =
.(()
att = .(, targetHRP)
vf = .(, targetHRP)
vf.Attachment0 = att
vf.RelativeTo = .ActuatorRelativeTo.World
dir = (targetHRP.Position - hrp.Position).Unit
vf.Force = .(dir.X * , , dir.Z * )
.()
vf:()
att:()
.()
flingCooldowns[targetChar.Name] =
)
UserInputService.InputBegan:((input, gpe)
gpe
input.KeyCode == .KeyCode.G
wingMode = wingMode
wingMode haloMode= jMode= tMode= rMode= dMode= xMode= cMode= zMode=
()
input.KeyCode == .KeyCode.H
haloMode = haloMode
haloMode wingMode= jMode= tMode= rMode= dMode= xMode= cMode= zMode=
()
input.KeyCode == .KeyCode.J
jMode = jMode
jMode
wingMode= haloMode= tMode= rMode= dMode= xMode= cMode= zMode=
(#oldSwords)
()
input.KeyCode == .KeyCode.T
tMode = tMode
tMode wingMode= haloMode= jMode= rMode= dMode= xMode= cMode= zMode=
()
input.KeyCode == .KeyCode.R
rMode = rMode
rMode wingMode= haloMode= jMode= tMode= dMode= xMode= cMode= zMode=
()
input.KeyCode == .KeyCode.D
dMode = dMode
dMode wingMode= haloMode= jMode= tMode= rMode= xMode= cMode= zMode=
()
input.KeyCode == .KeyCode.X
xMode = xMode
xMode
wingMode= haloMode= jMode= tMode= rMode= dMode= cMode= zMode=
()
()
input.KeyCode == .KeyCode.C
cMode = cMode
cMode wingMode= haloMode= jMode= tMode= rMode= dMode= xMode= zMode=
()
input.KeyCode == .KeyCode.Z
zMode = zMode
zMode wingMode= haloMode= jMode= tMode= rMode= dMode= xMode= cMode=
()
input.KeyCode == .KeyCode.L
colorGui.Enabled = colorGui.Enabled
)
.(()
wingSine =
prevLoudness =
beatPulse =
bouncePulse =
running
angle = angle + settings.orbitSpeed
haloAngle = haloAngle + settings.orbitSpeed
wingSine = wingSine +
activeSnd = boomboxSound.IsPlaying boomboxSound sound
rawLoudness = activeSnd.PlaybackLoudness
loudnessDelta = rawLoudness - prevLoudness
isBeat = loudnessDelta >
isBeat
beatPulse = .(loudnessDelta / , )
bouncePulse =
()
beatPulse = beatPulse *
bouncePulse = bouncePulse *
prevLoudness = rawLoudness
loudness = rawLoudness / settings.beatSensitivity
beatRadius = settings.beatRange + loudness + beatPulse + bouncePulse *
beatHeight = settings.orbitHeight + loudness * + beatPulse *
hrpPos = hrp.Position
rayParams = RaycastParams.()
rayParams.FilterDescendantsInstances = {character}
rayParams.FilterType = .RaycastFilterType.Exclude
groundRay = :(hrpPos, .(, -, ), rayParams)
groundY = groundRay groundRay.Position.Y (hrpPos.Y - )
i, part (vizParts)
a = ( * .pi / VIZ_COUNT) * (i - )
wave = .(wingSine * + i * )
barHeight = .( + (rawLoudness / ) * ( + wave * ), , )
x = hrpPos.X + .(a) * VIZ_RADIUS
z = hrpPos.Z + .(a) * VIZ_RADIUS
y = groundY + barHeight /
part.Size = .(, barHeight, )
part.CFrame = .(x, y, z)
part.Color = .(((i / VIZ_COUNT) + wingSine * ) % , , )
orbitTotal = #orbitSwords
i, data (orbitSwords)
data.attachB data.attachB.Parent
dMode
dd = dOrbitData[i]
dd.angleX = dd.angleX + dd.speedX
dd.angleY = dd.angleY + dd.speedY
dd.angleZ = dd.angleZ + dd.speedZ
x = .(dd.angleY) * .(dd.angleX) * beatRadius
y = .(dd.angleX) * beatHeight * + beatHeight
z = .(dd.angleY) * .(dd.angleZ) * beatRadius
data.attachB.Position = .(x, y, z)
data.attachB.Orientation = .(.(dd.angleX), .(dd.angleY), .(dd.angleZ))
a = angle + ( * .pi / orbitTotal) * (i - )
data.attachB.Position = .(
.(a) * beatRadius,
.(angle * + i) * + beatHeight,
.(a) * beatRadius
)
data.attachB.Orientation = .(, .(a), )
oldTotal = #oldSwords
i, data (oldSwords)
data.attachB data.attachB.Parent
wingMode
wp = wingPositions[i] wingPositions[#wingPositions]
flap = .(wingSine / ) *
data.attachB.Position = .(wp[], wp[] + flap, wp[])
data.attachB.Orientation = .(wp[], wp[], wp[] + flap * )
haloMode
a = haloAngle + ( * .pi / oldTotal) * (i - )
data.attachB.Position = .(.(a) * , .(a) * + , )
data.attachB.Orientation = .(, , .(a) + )
jMode
sa = jSphereAngles[i]
sa
rotatedPhi = sa.phi + angle *
x = .(sa.theta) * .(rotatedPhi) * beatRadius
y = .(sa.theta) * beatRadius + beatHeight
z = .(sa.theta) * .(rotatedPhi) * beatRadius
data.attachB.Position = .(x, y, z)
data.attachB.Orientation = .(.(sa.theta), .(rotatedPhi), )
tMode
a = haloAngle + ( * .pi / oldTotal) * (i - )
data.attachB.Position = .(.(a) * , , .(a) * )
data.attachB.Orientation = .(, .(a), )
rMode
sp = starPositions[i] starPositions[#starPositions]
data.attachB.Position = .(sp[], sp[], sp[])
data.attachB.Orientation = .(sp[], sp[], sp[])
dMode
dd = dSwordData[i]
dd.angleX = dd.angleX + dd.speedX
dd.angleY = dd.angleY + dd.speedY
dd.angleZ = dd.angleZ + dd.speedZ
x = .(dd.angleY) * .(dd.angleX) * beatRadius
y = .(dd.angleX) * beatHeight * + beatHeight
z = .(dd.angleY) * .(dd.angleZ) * beatRadius
data.attachB.Position = .(x, y, z)
data.attachB.Orientation = .(.(dd.angleX), .(dd.angleY), .(dd.angleZ))
xMode
assignment = xSwordAssignments[i]
assignment
targetPlayer = assignment.targetPlayer
targetChar = targetPlayer targetPlayer.Character
targetHRP = targetChar targetChar:()
targetHRP
assignment.angleX = assignment.angleX + assignment.speedX
assignment.angleY = assignment.angleY + assignment.speedY
targetPos = targetHRP.Position
rx = .(assignment.angleY) * assignment.radius
ry = .(assignment.angleX) * +
rz = .(assignment.angleY) * assignment.radius
worldPos = targetPos + .(rx, ry, rz)
localPos = hrp.CFrame:(worldPos)
data.attachB.Position = localPos
data.attachB.Orientation = .(.(assignment.angleX), .(assignment.angleY), )
a = angle + ( * .pi / oldTotal) * (i - )
data.attachB.Position = .(
.(a) * beatRadius,
.(angle * + i) * + beatHeight,
.(a) * beatRadius
)
data.attachB.Orientation = .(, .(a), )
cMode
a = angle * + ( * .pi / oldTotal) * (i - )
sx = .(a) * beatRadius
sy = .(a * ) * + beatHeight *
sz = .(a) * beatRadius
data.attachB.Position = .(sx, sy, sz)
data.attachB.Orientation = .(.(a * ), .(a), .(a * ))
swordWorldPos = hrp.CFrame:(.(sx, sy, sz))
_, p (Players:())
p ~= player p.Character
pHRP = p.Character:()
pHRP
dist = (swordWorldPos - pHRP.Position).Magnitude
dist < (p.Character)
zMode
half = .(oldTotal / )
groupAngle = angle + (.pi / half) * (i - )
i <= half
data.attachB.Position = .(
.(groupAngle) * beatRadius,
.(groupAngle) * beatRadius + beatHeight,
)
data.attachB.Orientation = .(, .(groupAngle), .(groupAngle) + )
data.attachB.Position = .(
,
.(groupAngle) * beatRadius + beatHeight,
.(groupAngle) * beatRadius
)
data.attachB.Orientation = .(.(groupAngle) + , , .(groupAngle))
a = angle + ( * .pi / oldTotal) * (i - )
data.attachB.Position = .(
.(a) * beatRadius,
.(angle * + i) * + beatHeight,
.(a) * beatRadius
)
data.attachB.Orientation = .(, .(a), )
.()
)
.SwordFloatCleanup = ()
running =
_, data (allSwordsList)
(()
data.alignPos:()
data.alignOri:()
data.attachA:()
data.attachB:()
data.trail data.trail:()
data.trailAtt0 data.trailAtt0:()
data.trailAtt1 data.trailAtt1:()
)
oldSwords = {}
orbitSwords = {}
allSwordsList = {}
boomboxSound:()
vizFolder:()
pixelFolder:()
(() flashGui:() )
()
()
Universal