Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local plr = owner
- repeat wait() until plr.Character
- local char = plr.Character
- local tors = char:FindFirstChild("Torso") or char:FindFirstChild("UpperTorso")
- local remote = Instance.new("RemoteEvent",script)
- remote.Name = "Remote"
- script.Parent = char
- script.Name = "coolvis"
- --script.Parent = game:GetService("ServerScriptService")
- --------- SazEreno's Artificial HB --------------
- ArtificialHB = Instance.new("BindableEvent", script)
- ArtificialHB.Name = "ArtificialHB"
- script:WaitForChild("ArtificialHB")
- Frame_Speed = 1 / 60
- frame = Frame_Speed
- tf = 0
- allowframeloss = false
- tossremainder = false
- lastframe = tick()
- script.ArtificialHB:Fire()
- game:GetService("RunService").Heartbeat:connect(function(s, p)
- tf = tf + s
- if tf >= frame then
- if allowframeloss then
- script.ArtificialHB:Fire()
- lastframe = tick()
- else
- for i = 1, math.floor(tf / frame) do
- script.ArtificialHB:Fire()
- end
- lastframe = tick()
- end
- if tossremainder then
- tf = 0
- else
- tf = tf - frame * math.floor(tf / frame)
- end
- end
- end)
- ------------------
- function swait(num)
- if num == 0 or num == nil then
- ArtificialHB.Event:wait()
- else
- for i = 1, num do
- ArtificialHB.Event:wait()
- end
- end
- end
- local cube = Instance.new("Part",char)
- cube.Size = Vector3.new(3,3,3)
- cube.Anchored = true
- cube.CanCollide = false
- cube.Material = Enum.Material.Neon
- local cube2 = Instance.new("Part",char)
- cube2.Size = Vector3.new(3,3,3)
- cube2.Anchored = true
- cube2.CanCollide = false
- cube2.Material = Enum.Material.Neon
- local cube3 = Instance.new("Part",char)
- cube3.Size = Vector3.new(3,3,3)
- cube3.Anchored = true
- cube3.CanCollide = false
- cube3.Material = Enum.Material.Neon
- local cube4 = Instance.new("Part",char)
- cube4.Size = Vector3.new(3,3,3)
- cube4.Anchored = true
- cube4.CanCollide = false
- cube4.Material = Enum.Material.Neon
- --cube.Shape = Enum.PartType.Ball
- local song = Instance.new("Sound",tors)
- song.Name = "KrY's Vis"
- --song.SoundId = "rbxassetid://"
- song.EmitterSize = 10
- song.Volume = 10
- song.Looped = true
- --[[workspace.DescendantRemoving:Connect(function(obj)
- if obj.name == plr.Name then
- song.Parent = game:GetService("Workspace")
- cube.Parent = game:GetService("Workspace")
- cube2.Parent = game:GetService("Workspace")
- cube3.Parent = game:GetService("Workspace")
- cube4.Parent = game:GetService("Workspace")
- spawn(function()
- repeat wait() until plr.Character
- char = plr.Character
- tors = char:FindFirstChild("Torso") or char:FindFirstChild("UpperTorso")
- song.Parent = tors
- cube.Parent = char
- cube2.Parent = char
- cube3.Parent = char
- cube4.Parent = char
- end)
- end
- end)]]
- --song:Play()
- --[[local w1 = Instance.new("Weld")
- w1.Parent = tors
- w1.Part0 = tors
- w1.Part1 = cube
- w1.C0 = CFrame.new(-5,0,0)*CFrame.Angles(math.rad(0),math.rad(0),math.rad(0))]]
- sizing = false
- sizing2 = false
- sizing3 = false
- sizing4 = false
- originalrad = 0
- originalspot = 0
- loudness = 0
- speedness = 0
- mode = 5
- prefix = "/"
- remote.OnServerEvent:Connect(function(plr,loud,speed)
- loudness = loud
- speedness = speed
- end)
- codestuffs = [[
- local plr = owner
- repeat wait() until plr.Character
- local char = plr.Character
- script.Parent = char:FindFirstChild("coolvis")
- local tors = char:FindFirstChild("Torso") or char:FindFirstChild("UpperTorso")
- local rem = script.Parent:WaitForChild("Remote")
- local song = tors:WaitForChild("KrY's Vis")
- spawn(function()
- game:GetService("RunService").RenderStepped:Connect(function()
- wait(.1)
- rem:FireServer(song.PlaybackLoudness,song.PlaybackSpeed)
- end)
- end)
- ]]
- NLS(codestuffs,script)
- function resize(p,s,owo)
- if owo == 1 then
- spawn(function()
- if sizing == false then
- sizing = true
- p.Size = p.Size + Vector3.new(loudness/500,loudness/500,loudness/500)
- wait()
- p.Size = Vector3.new(s,s,s)
- sizing = false
- end
- end)
- elseif owo == 2 then
- spawn(function()
- if sizing2 == false then
- sizing2 = true
- p.Size = p.Size + Vector3.new(loudness/500,loudness/500,loudness/500)
- wait()
- p.Size = Vector3.new(s,s,s)
- sizing2 = false
- end
- end)
- elseif owo == 3 then
- spawn(function()
- if sizing3 == false then
- sizing3 = true
- p.Size = p.Size + Vector3.new(loudness/500,loudness/500,loudness/500)
- wait()
- p.Size = Vector3.new(s,s,s)
- sizing3 = false
- end
- end)
- elseif owo == 4 then
- spawn(function()
- if sizing4 == false then
- sizing4 = true
- p.Size = p.Size + Vector3.new(loudness/500,loudness/500,loudness/500)
- wait()
- p.Size = Vector3.new(s,s,s)
- sizing4 = false
- end
- end)
- else return end
- end
- mrd1 = math.random(300,400)
- mrd2 = math.random(600,700)
- mrd3 = math.random(400,600)
- function other(p)
- p.Color = Color3.new(loudness / mrd1,loudness / mrd2,loudness / mrd3)
- end
- --[[spawn(function()
- while swait() do
- originalrad = originalrad + 1
- cube.CFrame = cube.CFrame*CFrame.Angles(originalrad,originalrad,originalrad)
- end
- end)]]
- function repos(p,t,s1,s2,s3)
- originalrad = originalrad + ((speedness / 100) * (loudness / 100))
- p.CFrame = t.CFrame + Vector3.new(s1,s2,s3)
- if mode == 1 then
- p.CFrame = p.CFrame*CFrame.Angles(originalrad,0,originalrad)
- elseif mode == 2 then
- p.CFrame = p.CFrame*CFrame.Angles(originalrad,originalrad,originalrad)
- elseif mode == 3 then
- p.CFrame = p.CFrame*CFrame.Angles(originalrad,originalrad,0)
- elseif mode == 4 then
- p.CFrame = p.CFrame*CFrame.Angles(0,originalrad,originalrad)
- elseif mode == 5 then
- p.CFrame = p.CFrame*CFrame.Angles(0,originalrad,0)
- elseif mode == 6 then
- p.CFrame = p.CFrame*CFrame.Angles(0,0,originalrad)
- elseif mode == 6 then
- p.CFrame = p.CFrame*CFrame.Angles(originalrad,0,0)
- end
- p.CFrame = p.CFrame*CFrame.new(0,.75,0)
- end
- --[[spawn(function()
- while wait(.1) do
- print((speedness / 100) * (loudness / 100))
- end
- end)
- spawn(function()
- while wait(.1) do
- print(loudness)
- end
- end)]]
- spawn(function()
- while true do
- swait()
- if song.IsPlaying == true and loudness > 10 then
- spawn(function()
- resize(cube,3,1)
- other(cube)
- end)
- spawn(function()
- resize(cube2,3,2)
- other(cube2)
- end)
- spawn(function()
- resize(cube3,3,3)
- other(cube3)
- end)
- spawn(function()
- resize(cube4,3,4)
- other(cube4)
- end)
- end
- if song.IsPlaying == false or loudness < 10 then
- cube.Size = Vector3.new(3,3,3)
- cube2.Size = Vector3.new(3,3,3)
- cube3.Size = Vector3.new(3,3,3)
- cube4.Size = Vector3.new(3,3,3)
- cube.CFrame = CFrame.Angles(0,0,0)
- cube2.CFrame = CFrame.Angles(0,0,0)
- cube3.CFrame = CFrame.Angles(0,0,0)
- cube4.CFrame = CFrame.Angles(0,0,0)
- end
- repos(cube,tors,5,0,0)
- repos(cube2,tors,0,0,-5)
- repos(cube3,tors,-5,0,0)
- repos(cube4,tors,0,0,5)
- end
- end)
- plr.Chatted:Connect(function(msg)
- --
- if msg:lower():sub(1,4) == "vol" ..prefix then
- local choice = msg:sub(5)
- if tonumber(choice) then
- song.Volume = choice
- end
- end
- --
- if msg:lower():sub(1,7) == "/e vol" ..prefix then
- local choice = msg:sub(8)
- if tonumber(choice) then
- song.Volume = choice
- end
- end
- --
- if msg:lower():sub(1,5) == "loop" ..prefix then
- local choice = msg:sub(6)
- if choice == "false" then
- song.Looped = false
- elseif choice == "true" then
- song.Looped = true
- end
- end
- --
- if msg:lower():sub(1,8) == "/e loop" ..prefix then
- local choice = msg:sub(9)
- if choice == "false" then
- song.Looped = false
- elseif choice == "true" then
- song.Looped = true
- end
- end
- --
- if msg:lower():sub(1,5) == "play" ..prefix then
- local songidthing = msg:sub(6)
- if tonumber(songidthing) then
- song.SoundId = "rbxassetid://" ..songidthing
- song.TimePosition = 0
- song:Play()
- end
- end
- --
- if msg:lower():sub(1,8) == "/e play" ..prefix then
- local songidthing = msg:sub(9)
- if tonumber(songidthing) then
- song.SoundId = "rbxassetid://" ..songidthing
- song.TimePosition = 0
- song:Play()
- end
- end
- --
- if msg:lower():sub(1,5) == "stop" ..prefix then
- song:Stop()
- wait()
- cube.Size = Vector3.new(3,3,3)
- cube2.Size = Vector3.new(3,3,3)
- cube3.Size = Vector3.new(3,3,3)
- cube4.Size = Vector3.new(3,3,3)
- cube.CFrame = CFrame.Angles(0,0,0)
- cube2.CFrame = CFrame.Angles(0,0,0)
- cube3.CFrame = CFrame.Angles(0,0,0)
- cube4.CFrame = CFrame.Angles(0,0,0)
- end
- --
- if msg:lower():sub(1,8) == "/e stop" ..prefix then
- song:Stop()
- wait()
- cube.Size = Vector3.new(3,3,3)
- cube2.Size = Vector3.new(3,3,3)
- cube3.Size = Vector3.new(3,3,3)
- cube4.Size = Vector3.new(3,3,3)
- cube.CFrame = CFrame.Angles(0,0,0)
- cube2.CFrame = CFrame.Angles(0,0,0)
- cube3.CFrame = CFrame.Angles(0,0,0)
- cube4.CFrame = CFrame.Angles(0,0,0)
- end
- --
- if msg:lower():sub(1,6) == "pause" ..prefix then
- song:Pause()
- wait()
- cube.Size = Vector3.new(3,3,3)
- cube2.Size = Vector3.new(3,3,3)
- cube3.Size = Vector3.new(3,3,3)
- cube4.Size = Vector3.new(3,3,3)
- end
- --
- if msg:lower():sub(1,9) == "/e pause" ..prefix then
- song:Pause()
- wait()
- cube.Size = Vector3.new(3,3,3)
- cube2.Size = Vector3.new(3,3,3)
- cube3.Size = Vector3.new(3,3,3)
- cube4.Size = Vector3.new(3,3,3)
- end
- --
- if msg:lower():sub(1,7) == "resume" ..prefix then
- song:Resume()
- end
- --
- if msg:lower():sub(1,10) == "/e resume" ..prefix then
- song:Resume()
- end
- --
- if msg:lower():sub(1,6) == "speed" ..prefix then
- local choice = msg:lower():sub(7)
- if tonumber(choice) then
- song.PlaybackSpeed = tonumber(choice)
- end
- end
- --
- if msg:lower():sub(1,9) == "/e speed" ..prefix then
- local choice = msg:lower():sub(10)
- if tonumber(choice) then
- song.PlaybackSpeed = tonumber(choice)
- end
- end
- --
- if msg:lower():sub(1,6) == "style" ..prefix then
- local choice = msg:lower():sub(7)
- if --[[tonumber(choice) and]] (choice == "1" or choice == "2" or choice == "3" or choice == "4" or choice == "5" or choice == "6") then
- mode = tonumber(choice)
- end
- end
- --
- if msg:lower():sub(1,9) == "/e style" ..prefix then
- local choice = msg:lower():sub(10)
- if --[[tonumber(choice) and]] (choice == "1" or choice == "2" or choice == "3" or choice == "4" or choice == "5" or choice == "6") then
- mode = tonumber(choice)
- end
- end
- --
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement