Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[ Player Functions ]]--
- plr = game.Players:WaitForChild(_G.target)
- char = plr.Character
- --[[ Color Functions ]]--
- local h = math.random(0, 100)
- local color = Color3.fromHSV(h / 100, 1, 0.9)
- local lastbeat = 0
- local lastloud = 0
- local PlaybackSound = 0
- --[[ Create Part ]]--
- local Create = LoadLibrary("RbxUtility").Create
- Create = function(Parent, Material, Reflectance, Transparency, Col, Name, Size)
- local Part = Create("Part")
- {
- Parent = Parent,
- Reflectance = Reflectance,
- Transparency = Transparency,
- CanCollide = false,
- Locked = true,
- BrickColor = BrickColor.new(tostring(Col)),
- Name = Name,
- Size = Size,
- Material = Material,
- }
- end
- function CreatePart(parent, transparency, reflectance, material, brickcolor)
- local p = Instance.new("Part")
- p.TopSurface = 0
- p.BottomSurface = 0
- p.Parent = parent
- p.Size = Vector3.new(0.1,0.1,0.1)
- p.Transparency = transparency
- p.Reflectance = reflectance
- p.CanCollide = false
- p.Locked = true
- p.BrickColor = BrickColor.new(tostring(brickcolor))
- p.Material = material
- return p
- end
- --[[ Folder ]]--
- local visuals = Instance.new("Folder")
- visuals.Parent = char
- --[[ Cube ]]--
- local cube = CreatePart(visuals, 0, 0, "Neon")
- cube.Anchored = true
- cube.CanCollide = false
- cube.Locked = true
- cube.CFrame = char.HumanoidRootPart.CFrame
- --[[ Particles ]]--
- local partic = Instance.new("ParticleEmitter")
- partic.Acceleration = Vector3.new(0, 5, 0)
- partic.Speed = NumberRange.new(250)
- partic.Lifetime = NumberRange.new(3)
- partic.Enabled = false
- partic.Rate = 25
- partic.Texture = "rbxassetid://380602004" --243664672
- partic.LightEmission = 5
- partic.LightInfluence = 1
- partic.Transparency = NumberSequence.new({NumberSequenceKeypoint.new(0, 0), NumberSequenceKeypoint.new(1, 1)})
- partic.Size = NumberSequence.new({NumberSequenceKeypoint.new(0, 1), NumberSequenceKeypoint.new(1, 0)})
- partic.Drag = 15
- partic.Parent = cube
- --[[ Sound ]]--
- local sound = Instance.new("Sound")
- sound.SoundId = "rbxassetid://2862170886"
- sound.Parent = char["HumanoidRootPart"]
- sound.Volume = 3
- sound.Name = "Music"
- sound.Looped = true
- sound:Play()
- plr.Chatted:connect(function(msg)
- if msg:sub(1, 7):lower()=='/e play' then
- local val = Instance.new("NumberValue", char)
- val.Value = tonumber(msg:sub(8))
- local id = val.Value
- sound:Stop()
- sound.SoundId = 'rbxassetid://'..id
- sound:Play()
- sound.Looped = true
- elseif msg:sub(1, 8):lower()=='/e pitch' then
- local val2 = Instance.new("NumberValue", char)
- val2.Value = tonumber(msg:sub(9))
- local Pitch = val2.Value
- sound.Pitch = Pitch
- elseif msg:sub(1, 6):lower()=='/e vol' then
- local val3 = Instance.new("NumberValue", char)
- val3.Value = tonumber(msg:sub(7))
- local Volume = val3.Value
- sound.Volume = Volume
- elseif msg:sub(1, 7):lower()=='/e stop' then
- sound:Stop()
- end
- end)
- --[[ Remote ]]--
- local Remote = Instance.new("RemoteEvent", char)
- Remote.Name = "Event"
- --[[ Visual ]]--
- local speed = 3
- local num = 0
- local change = 2 / speed
- local Y = 0
- local X = 0
- local Z = 0
- Remote.OnServerEvent:connect(function(plr, Playback)
- local beat = math.abs(PlaybackSound - lastloud)
- if beat > lastbeat then
- lastbeat = beat
- else
- lastbeat = lastbeat - 10
- if lastbeat < 0 then
- lastbeat = 0
- end
- end
- h = (h + beat / 250) % 100
- lastloud = PlaybackSound
- num = num + change
- Y = Y + 0.5 + Playback/2500
- X = X + 0.5 + Playback/250
- Z = Z + 0.5 + Playback/25
- cube.CFrame = cube.CFrame:lerp(char["HumanoidRootPart"].CFrame * CFrame.new(0, 8 + math.cos(num / 5), 0) * CFrame.fromEulerAnglesXYZ(math.rad(X), math.rad(Y), math.rad(Z)), 0.25)
- cube.Color = cube.Color:lerp(Color3.fromHSV(h / 100, 1, 1), 1)
- cube.Size = cube.Size:lerp(Vector3.new(2 + Playback/500, 2 + Playback/500, 2 + Playback/500), 0.25)
- if Playback >= 425 then
- partic.Speed = NumberRange.new(5 + Playback/1000)
- partic.Enabled = true
- partic.Rate = 25 + Playback/1000
- partic.Lifetime = NumberRange.new(1 + Playback/1000)
- partic.Drag = 5 - Playback/100
- partic.Acceleration = Vector3.new(0, -5 / Playback/-250, 0)
- partic.Size = NumberSequence.new({NumberSequenceKeypoint.new(0, 0 + Playback/1000), NumberSequenceKeypoint.new(1, 0.25 + Playback/1000)})
- partic.Color = ColorSequence.new(Color3.fromHSV(h / 100, 1, 1), Color3.fromHSV(h / 100, 1, 1))
- partic.RotSpeed = NumberRange.new(0 - sound.PlaybackLoudness/-250, 0 + sound.PlaybackLoudness/250)
- partic.SpreadAngle = Vector2.new(-25 - sound.PlaybackLoudness/-25, 25 + sound.PlaybackLoudness/25)
- partic.Rotation = NumberRange.new(-25 - Playback, 10 + Playback)
- partic.RotSpeed = NumberRange.new(-25 - Playback, 10 + Playback)
- for i = 0.5, 1 do
- local part1 = CreatePart(visuals, 1, 1, "Neon")
- part1.Anchored = false
- part1.Material = Enum.Material.Neon
- part1.CanCollide = false
- part1.Locked = true
- local weld1 = Instance.new("Weld")
- weld1.Part0 = part1
- weld1.Part1 = cube
- weld1.Parent = part1
- local part2 = CreatePart(visuals, 1, 1, "Neon")
- part2.Anchored = false
- part2.Material = Enum.Material.Neon
- part2.Size = Vector3.new(0.25, 1.5, 0.25)
- part2.CanCollide = false
- part2.Locked = true
- local partm2 = Instance.new("SpecialMesh")
- partm2.MeshType = Enum.MeshType.Sphere
- partm2.Scale = Vector3.new(1, 1, 1)
- partm2.Parent = part2
- local weld2 = Instance.new("Weld")
- weld2.Part0 = part2
- weld2.Part1 = cube
- weld2.Parent = part2
- weld1.C1 = weld1.C1:lerp(CFrame.fromEulerAnglesXYZ(math.rad(X), math.rad(Y), math.rad(Z)), 0.25)
- weld2.C1 = weld2.C1:lerp(CFrame.fromEulerAnglesXYZ(math.rad(5 * X), math.rad(5 * Y), math.rad(5 * Z)), 0.25)
- part1.Color = part1.Color:lerp(Color3.fromHSV(h / 100, 0.5, 0.5), 1)
- part2.Color = part2.Color:lerp(Color3.fromHSV(h / 100, 0.5, 0.5), 1)
- pcall(function()
- if Playback >= 100 then
- for i = 1, 15 do
- part1.Size = part1.Size:lerp(Vector3.new(cube.Size.X + Playback/150, cube.Size.Y + Playback/150, cube.Size.Z + Playback/150), 0.05 + Playback/5000)
- part1.Transparency = i / 15
- partm2.Scale = partm2.Scale:lerp(Vector3.new(cube.Size.X + Playback/100, cube.Size.Y + Playback/100, cube.Size.Z + Playback/100), 0.02 + Playback/5000)
- part2.Transparency = i / 15
- wait()
- end
- part1:Destroy()
- part2:Destroy()
- end
- end)
- end
- else
- partic.Enabled = false
- end
- PlaybackSound = Playback
- end)
- --[[ Debounce ]]--
- function debounce(func)
- local isRunning = false
- return function(...)
- if not isRunning then
- isRunning = true
- func(...)
- isRunning = false
- end
- end
- end
Add Comment
Please, Sign In to add comment