Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- script.Parent = owner.PlayerGui
- local plr = owner
- local char = plr.Character
- local plrg = plr.PlayerGui
- local rut = char.HumanoidRootPart
- local h = char.Head
- local id = "rbxassetid://1300680050"
- local vol = .5
- local pitch = 1
- local timepos
- local tweens = game:GetService("TweenService")
- local debrs = game:GetService("Debris")
- local cos = math.cos
- local sin = math.sin
- local change = .05
- local sine = 0
- local rad = math.rad
- local scr = Instance.new("ScreenGui",plrg) scr.Name = "VisGui"
- local song = Instance.new("Sound",char) song.Volume = vol song.Pitch = pitch song.SoundId = id song.Name = "VisSong" song.Looped = true
- local rem = Instance.new("RemoteEvent",plrg) rem.Name = "VisEvent"
- local verifyofexisting = Instance.new("Glue",char) verifyofexisting.Name = "Verified"
- local vispart
- local defcf = rut.CFrame * CFrame.new(2,2,2)
- local tlerp = function(part,tablee,leinght,easingstyle,easingdirec)
- local info = TweenInfo.new(
- leinght,
- easingstyle,
- easingdirec,
- 0,
- false,
- 0
- )
- local lerp = tweens:Create(part,info,tablee)
- lerp:Play()
- end
- function createvpart()
- vispart = Instance.new("Part")
- vispart.Anchored = true
- vispart.CanCollide = false
- vispart.Size = Vector3.new(1,1,1)
- vispart.Material = "Neon"
- vispart.CFrame = defcf
- vispart.Parent = rut
- vispart:BreakJoints()
- end
- local client = NLS([[
- local startertext = "Press Alt to toggle command bar, type 'Help(Might be low case)' to get help and 'Close' to close help window."
- local plr = game:GetService("Players").LocalPlayer
- local char = plr.Character
- local rut = char.HumanoidRootPart
- local plrg = plr.PlayerGui
- local mouse = plr:GetMouse()
- local colour = Color3.new(0,1,0)
- local gui = plrg:WaitForChild("VisGui")
- local rem = plrg:WaitForChild("VisEvent")
- local song = char:WaitForChild("VisSong")
- local help = false
- local using = false
- local reverse = false
- local scaling = 110
- local colorchangespeed = 2
- local tweens = game:GetService("TweenService")
- local tlerp = function(part,tablee,leinght,easingstyle,easingdirec)
- local info = TweenInfo.new(
- leinght,
- easingstyle,
- easingdirec,
- 0,
- false,
- 0
- )
- local lerp = tweens:Create(part,info,tablee)
- lerp:Play()
- end
- local tbox = Instance.new("TextBox",gui)
- tbox.Size = UDim2.new(.2,0,.075,0)
- tbox.BorderSizePixel = 0
- tbox.TextScaled = true
- tbox.BackgroundColor3 = Color3.new(.15,.15,.15)
- tbox.TextColor3 = Color3.new(1,1,1)
- tbox.Position = UDim2.new(.8,0,.925,0)
- tbox.Text = startertext
- local size = 1/9
- local helpframe = Instance.new("Frame",tbox)
- helpframe.Size = UDim2.new(1,0,7,0)
- helpframe.Position = UDim2.new(0,0,1,0)
- helpframe.BorderSizePixel = 0
- helpframe.BackgroundColor3 = Color3.new(.175,.175,.175)
- local labl1 = Instance.new("TextLabel",helpframe)
- labl1.BorderSizePixel = 0
- labl1.BackgroundTransparency = 1
- labl1.TextScaled = true
- labl1.Text = "Play *id* - Plays a song with chosen id."
- labl1.TextColor3 = Color3.new(1,1,1)
- labl1.Size = UDim2.new(1,0,size,0)
- local labl2 = Instance.new("TextLabel",helpframe)
- labl2.BorderSizePixel = 0
- labl2.BackgroundTransparency = 1
- labl2.TextScaled = true
- labl2.Text = "Volume *num* - Sets the volume of the song."
- labl2.TextColor3 = Color3.new(1,1,1)
- labl2.Size = UDim2.new(1,0,size,0)
- labl2.Position = UDim2.new(0,0,size,0)
- local labl3 = Instance.new("TextLabel",helpframe)
- labl3.BorderSizePixel = 0
- labl3.BackgroundTransparency = 1
- labl3.TextScaled = true
- labl3.Text = "Pitch *num* - Sets the pitch of the song."
- labl3.TextColor3 = Color3.new(1,1,1)
- labl3.Size = UDim2.new(1,0,size,0)
- labl3.Position = UDim2.new(0,0,size*2,0)
- local labl4 = Instance.new("TextLabel",helpframe)
- labl4.BorderSizePixel = 0
- labl4.BackgroundTransparency = 1
- labl4.TextScaled = true
- labl4.Text = "Play - Plays the song."
- labl4.TextColor3 = Color3.new(1,1,1)
- labl4.Size = UDim2.new(1,0,size,0)
- labl4.Position = UDim2.new(0,0,size*3,0)
- local labl5 = Instance.new("TextLabel",helpframe)
- labl5.BorderSizePixel = 0
- labl5.BackgroundTransparency = 1
- labl5.TextScaled = true
- labl5.Text = "Stop - Stops the song."
- labl5.TextColor3 = Color3.new(1,1,1)
- labl5.Size = UDim2.new(1,0,size,0)
- labl5.Position = UDim2.new(0,0,size*4,0)
- local labl6 = Instance.new("TextLabel",helpframe)
- labl6.BorderSizePixel = 0
- labl6.BackgroundTransparency = 1
- labl6.TextScaled = true
- labl6.Text = "Pause - Pauses the song."
- labl6.TextColor3 = Color3.new(1,1,1)
- labl6.Size = UDim2.new(1,0,size,0)
- labl6.Position = UDim2.new(0,0,size*5,0)
- local labl7 = Instance.new("TextLabel",helpframe)
- labl7.BorderSizePixel = 0
- labl7.BackgroundTransparency = 1
- labl7.TextScaled = true
- labl7.Text = "Resume - Resumes the song."
- labl7.TextColor3 = Color3.new(1,1,1)
- labl7.Size = UDim2.new(1,0,size,0)
- labl7.Position = UDim2.new(0,0,size*6,0)
- local labl8 = Instance.new("TextLabel",helpframe)
- labl8.BorderSizePixel = 0
- labl8.BackgroundTransparency = 1
- labl8.TextScaled = true
- labl8.Text = "Reverse - Reverses the side of the visualiser."
- labl8.TextColor3 = Color3.new(1,1,1)
- labl8.Size = UDim2.new(1,0,size,0)
- labl8.Position = UDim2.new(0,0,size*7,0)
- local labl9 = Instance.new("TextLabel",helpframe)
- labl9.BorderSizePixel = 0
- labl9.BackgroundTransparency = 1
- labl9.TextScaled = true
- labl9.Text = "Scale *num* - Changes the scaling of the part, lesser - bigger size of the part, standart: "..scaling.."."
- labl9.TextColor3 = Color3.new(1,1,1)
- labl9.Size = UDim2.new(1,0,size,0)
- labl9.Position = UDim2.new(0,0,size*8,0)
- function showhelp()
- help = true
- using = true
- for i = 0,1,.05 do
- tbox.Position = tbox.Position:Lerp(UDim2.new(.8,0,.4,0),i)
- wait()
- end
- using = false
- end
- function closehelp()
- using = true
- for i = 0,1,.05 do
- tbox.Position = tbox.Position:Lerp(UDim2.new(.8,0,.925,0),i)
- wait()
- end
- using = false
- help = false
- end
- tbox.FocusLost:Connect(function()
- if tbox.Text:lower():sub(1,5) == "play " then
- rem:FireServer("id",tbox.Text:lower():sub(6,#tbox.Text))
- end
- if tbox.Text:lower():sub(1,7) == "volume " then
- rem:FireServer("volume",tbox.Text:lower():sub(8,#tbox.Text))
- end
- if tbox.Text:lower():sub(1,6) == "pitch " then
- rem:FireServer("pitch",tbox.Text:lower():sub(7,#tbox.Text))
- end
- if tbox.Text:lower():sub(1,6) == "scale " then
- scaling = tbox.Text:lower():sub(7,#tbox.Text)
- end
- if tbox.Text:lower() == "play" then
- rem:FireServer("play")
- end
- if tbox.Text:lower() == "stop" then
- rem:FireServer("stop")
- end
- if tbox.Text:lower() == "pause" then
- rem:FireServer("pause")
- end
- if tbox.Text:lower() == "resume" then
- rem:FireServer("resume")
- end
- if tbox.Text:lower() == "help" and not using and not help then
- showhelp()
- end
- if tbox.Text:lower() == "close" and not using and help then
- closehelp()
- end
- if tbox.Text:lower() == "reverse" and not reverse then
- reverse = true
- elseif tbox.Text:lower() == "reverse" and reverse then
- reverse = false
- end
- tbox.Text = startertext
- end)
- mouse.KeyDown:Connect(function(key)
- if string.byte(key) == 52 then
- tbox:CaptureFocus()
- end
- end)
- local cc = coroutine.wrap(function()
- while true do
- tlerp(rut,{Color = Color3.new(1,0,0)},colorchangespeed,Enum.EasingStyle.Linear,Enum.EasingDirection.InOut)
- wait(colorchangespeed)
- tlerp(rut,{Color = Color3.new(1,.4,0)},colorchangespeed,Enum.EasingStyle.Linear,Enum.EasingDirection.InOut)
- wait(colorchangespeed)
- tlerp(rut,{Color = Color3.new(1,1,0)},colorchangespeed,Enum.EasingStyle.Linear,Enum.EasingDirection.InOut)
- wait(colorchangespeed)
- tlerp(rut,{Color = Color3.new(0,1,0)},colorchangespeed,Enum.EasingStyle.Linear,Enum.EasingDirection.InOut)
- wait(colorchangespeed)
- tlerp(rut,{Color = Color3.new(0,1,1)},colorchangespeed,Enum.EasingStyle.Linear,Enum.EasingDirection.InOut)
- wait(colorchangespeed)
- tlerp(rut,{Color = Color3.new(0,0,1)},colorchangespeed,Enum.EasingStyle.Linear,Enum.EasingDirection.InOut)
- wait(colorchangespeed)
- tlerp(rut,{Color = Color3.new(1,0,.4)},colorchangespeed,Enum.EasingStyle.Linear,Enum.EasingDirection.InOut)
- wait(colorchangespeed)
- end
- end)
- cc()
- while true do
- --pcall(function()
- if plr.Character ~= nil then
- char = plr.Character
- song = char:FindFirstChild("VisSong")
- if song then
- rem:FireServer("resize",song.PlaybackLoudness/scaling,Color3.fromRGB(rut.Color.r*(song.PlaybackLoudness/5),rut.Color.g*(song.PlaybackLoudness/5),rut.Color.b*(song.PlaybackLoudness/5)),reverse)
- end
- end
- --end)
- wait()
- end
- ]],plrg)
- function wave(pospart)
- local wavetime = math.random(3,6)/10
- local col = pospart.Color
- local endlocalwavesize = Vector3.new(pospart.Size.x/1.5,pospart.Size.y*3.5,pospart.Size.z*3.5)
- local cff = pospart.CFrame
- local eff = Instance.new("Part")
- eff.Size = Vector3.new(pospart.Size.x/10,pospart.Size.y,pospart.Size.z)
- eff.CFrame = cff
- eff.Color = col
- eff.Anchored = true
- eff.CanCollide = false
- eff.Material = "Neon"
- eff.Parent = rut
- local mesh = Instance.new("SpecialMesh",eff)
- mesh.MeshType = "Sphere"
- tlerp(eff,{Size = endlocalwavesize,Transparency = 1, CFrame = cff * CFrame.Angles(rad(math.random(-180,180)),rad(math.random(-180,180)),rad(math.random(-180,180)))},wavetime,Enum.EasingStyle.Linear,Enum.EasingDirection.InOut)
- debrs:AddItem(eff,wavetime)
- end
- createvpart()
- song:Play()
- rem.OnServerEvent:Connect(function(plr,type,num,colour,reversed)
- pcall(function()
- if type == "resize" then
- char = owner.Character
- verifyofexisting = char:FindFirstChild("Verified")
- if not verifyofexisting or not verifyofexisting.Parent then
- defcf = rut.CFrame * CFrame.new(2,2,2)
- char = owner.Character
- rut = char.HumanoidRootPart
- h = char.Head
- verifyofexisting = Instance.new("Glue",char) verifyofexisting.Name = "Verified"
- song = Instance.new("Sound",char) song.Volume = vol song.Pitch = pitch song.SoundId = id song.Name = "VisSong" song.Looped = true
- song.TimePosition = timepos
- song:Play()
- createvpart()
- end
- sine = sine +change
- if not vispart or not vispart.Parent then
- createvpart()
- end
- if num > 5 then
- local rand = math.random(1,2)
- if rand == 1 then
- wave(vispart)
- end
- end
- if not reversed then
- defcf = rut.CFrame * CFrame.new(2,2,2) * CFrame.new(cos(sine/3),-cos(sine/3),sin(sine/3)) * CFrame.new(num/2,num,num/2) * CFrame.Angles(num/1,num/1,-num/1)
- else
- defcf = rut.CFrame * CFrame.new(-2,2,2) * CFrame.new(cos(sine/3),-cos(sine/3),sin(sine/3)) * CFrame.new(-num/2,num,num/2) * CFrame.Angles(num/1,-num/1,num/1)
- end
- if not song or not song.Parent then
- song = Instance.new("Sound",char) song.Volume = vol song.Pitch = pitch song.SoundId = id song.Name = "VisSong" song.Looped = true
- song.TimePosition = timepos
- song:Play()
- end
- timepos = song.TimePosition
- song.Volume = vol
- vispart:ClearAllChildren()
- vispart.Material = "Neon"
- vispart.Transparency = 0
- vispart.Anchored = true
- vispart.CanCollide = false
- vispart.Size = vispart.Size:Lerp(Vector3.new(num,num,num),.35)
- vispart.Color = vispart.Color:Lerp(colour,.35)
- if (rut.Position-vispart.Position).Magnitude >50+num then
- defcf = rut.CFrame * CFrame.new(2,2,2)
- vispart.CFrame = defcf
- end
- vispart.CFrame = vispart.CFrame:Lerp(defcf,.1)
- end
- if type == "id" then
- song.SoundId = "rbxassetid://"..tonumber(num)
- id = "rbxassetid://"..tonumber(num)
- if not song or not song.Parent then
- song = Instance.new("Sound",char) song.Volume = vol song.Pitch = pitch song.SoundId = id song.Name = "VisSong" song.Looped = true
- song:Play() song.TimePosition = timepos
- end
- song:Play()
- end
- if type == "volume" then
- song.Volume = tonumber(num)
- vol = tonumber(num)
- end
- if type == "pitch" then
- song.Pitch = tonumber(num)
- pitch = tonumber(num)
- end
- if type == "play" then
- if not song or not song.Parent then
- song = Instance.new("Sound",char) song.Volume = vol song.Pitch = pitch song.SoundId = id song.Name = "VisSong" song.Looped = true
- song:Play() song.TimePosition = timepos
- end
- song.TimePosition = 0
- song:Play()
- end
- if type == "stop" then
- song:Stop()
- end
- if type == "pause" then
- song:Pause()
- end
- if type == "resume" then
- song:Resume()
- end
- if type == "wave" then
- wave(vispart)
- end
- end)
- end)
- script.Parent = plrg
- script.Name = "VisScript"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement