Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --// WXBZ's Sound Bar
- --// Script could be better but is not that bad.
- --//Variables
- local plrs = game:GetService("Players");
- local plr = plrs.LocalPlayer;
- local char = plr.Character;
- local humroot = char.HumanoidRootPart;
- local p1;
- local p2;
- local snd;
- local paudio = false;
- local colorz = {
- Color3.fromRGB(255, 0, 0),
- Color3.fromRGB(218, 133, 65),
- Color3.fromRGB(255, 255, 0),
- Color3.fromRGB(0, 255, 0),
- Color3.fromRGB(4, 175, 236),
- Color3.fromRGB(255, 0, 91)
- }
- --// Handling
- do
- wait(0.5);
- local function wparts()
- --// Weld Creation
- local w1 = Instance.new("Weld");
- local w2 = Instance.new("Weld");
- --// w1 Configuration
- w1.Part0 = humroot;
- w1.Part1 = p1;
- w1.C0 = humroot.CFrame:inverse();
- w1.C1 = p1.CFrame:inverse();
- --// w2 Configuration
- w2.Part0 = humroot;
- w2.Part1 = p2;
- w2.C0 = humroot.CFrame:inverse();
- w2.C1 = p2.CFrame:inverse();
- --// Parents
- w1.Parent = p1;
- w2.Parent = p2;
- end;
- local function cparts()
- --// Part Creation
- p1 = Instance.new("Part");
- p2 = Instance.new("Part");
- snd = Instance.new("Sound");
- --// p1 Configuration
- p1.BrickColor = BrickColor.new("Really red");
- p1.Material = Enum.Material.Neon;
- p1.Name = "Part1";
- p1.CFrame = humroot.CFrame * CFrame.new(4, 3.5, 0);
- p1.Anchored = true;
- p1.CanCollide = false;
- p1.Size = Vector3.new(1, 1, 1);
- --// p2 Configuration
- p2.BrickColor = BrickColor.new("Really red");
- p2.Material = Enum.Material.Neon;
- p2.Name = "Part2";
- p2.CFrame = humroot.CFrame * CFrame.new(-4, 3.5, 0);
- p2.Anchored = true;
- p2.CanCollide = false;
- p2.Size = Vector3.new(1, 1, 1);
- --// snd
- snd.EmitterSize = 63;
- --// Anchor & Parent
- p1.Parent = workspace;
- p1.Anchored = false;
- p2.Parent = workspace;
- p2.Anchored = false;
- snd.Parent = humroot;
- wparts();
- end;
- local function colors()
- while true do
- for _, c2 in pairs(colorz) do
- for i = 0, 1, 0.01 do
- p1.Color = Color3.new(((p1.Color.r*(1-i))+(c2.r*i)),((p1.Color.g*(1-i))+(c2.g*i)),((p1.Color.b*(1-i))+(c2.b*i)));
- p2.Color = Color3.new(((p1.Color.r*(1-i))+(c2.r*i)),((p1.Color.g*(1-i))+(c2.g*i)),((p1.Color.b*(1-i))+(c2.b*i)));
- wait()
- end;
- end;
- end;
- end;
- local function psize()
- while (paudio) do
- p1.Size = Vector3.new(1, snd.PlaybackLoudness * 0.01, 1);
- p2.Size = Vector3.new(1, snd.PlaybackLoudness * 0.01, 1);
- wparts();
- wait();
- end;
- end;
- local function playaudio(m)
- if (string.sub(m, 1, 6) == "$play ") then
- paudio = false;
- snd.SoundId = "rbxassetid://" .. tostring(string.sub(m, 7));
- snd:Play();
- paudio = true;
- spawn(psize);
- elseif (string.sub(m, 1, 5) == "$loop") then
- snd.Looped = not snd.Looped;
- elseif (string.sub(m, 1, 6) == "$stop") then
- paudio = false;
- snd:Stop();
- p1.Size = Vector3.new(1, 1, 1);
- p2.Size = Vector3.new(1, 1, 1);
- wparts();
- elseif (string.sub(m, 1, 5) == "$vol ") then
- snd.Volume = tonumber(string.sub(m, 6));
- end;
- end;
- cparts(); plr.Chatted:Connect(function(msg) playaudio(msg); end); spawn(colors); --// Function Calling
- end;
Add Comment
Please, Sign In to add comment