TheUnknownDiscord

spin

Oct 19th, 2021 (edited)
143
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. part = Instance.new("Part", owner.Character)
  2. part.Massless = true
  3. part.BottomSurface = Enum.SurfaceType.Smooth
  4. part.TopSurface = Enum.SurfaceType.Smooth
  5. part.Size = Vector3.new(3.2,1.6,1.2)
  6. part.Name = "partlolagain"
  7. music = Instance.new("Sound", part)
  8. music.SoundId = "rbxassetid://"
  9. music.Volume = 1
  10. music.Looped = true
  11. music:Play()
  12. music.Name = "Themusic"
  13. eq = Instance.new("EqualizerSoundEffect",music)
  14. Weld4 = Instance.new("Weld", owner.Character.Head)
  15. Weld4.Part0 = part
  16. Weld4.Part1 = owner.Character.Head
  17. Weld4.C0 = CFrame.new(0,0,4.5)
  18. part.CanCollide = false
  19. part:SetNetworkOwner(owner)
  20. part.Material = Enum.Material.Neon
  21. part.Locked = true
  22. wait()
  23. NLS([[
  24. local ReplicatedStorage = game:GetService("ReplicatedStorage")
  25. local sizeevent = ReplicatedStorage:WaitForChild("sizeEvent")
  26. local part = owner.Character:WaitForChild("partlolagain")
  27. local music = part:WaitForChild("Themusic")
  28. while true do
  29. local Amplitude = math.clamp(music.PlaybackLoudness / 125, 0.1, 5)
  30. part.Size = Vector3.new(Amplitude, Amplitude, Amplitude)
  31. part.Color = Color3.fromRGB(255,math.clamp(music.PlaybackLoudness / 1.75,0,255),0)
  32. sizeevent:FireServer(part.Size, part.Color)
  33. wait(0.0825)
  34. end
  35. ]],part)
  36. local ReplicatedStorage = game:GetService("ReplicatedStorage")
  37. local sizeevent = Instance.new("RemoteEvent", ReplicatedStorage)
  38. sizeevent.Name = "sizeEvent"
  39.  
  40. local function sizer(player, size, color)
  41. local tweenService = game:GetService("TweenService")
  42. local timeToFade = 0.0825
  43. local object = part
  44. local tweenInfo = TweenInfo.new(timeToFade)
  45. local goal = {}
  46. goal.Size = size
  47. local shot = tweenService:Create(object, tweenInfo, goal)
  48. local goal2 = {}
  49. goal2.Color = color
  50. local shot2 = tweenService:Create(object, tweenInfo, goal2)
  51. shot:Play()
  52. shot2:Play()
  53. end
  54.  
  55. sizeevent.OnServerEvent:Connect(sizer)
  56.  
  57. owner.Chatted:connect(function(message)
  58. if message:sub(1,6) == "!Play " then
  59. music:Stop()
  60. music.SoundId = "http://www.roblox.com/asset/?id="..message:sub(6)
  61. music:Play()
  62. elseif message:sub(1,7) == "!Speed " then
  63. music.PlaybackSpeed = message:sub(7)
  64. elseif message:sub(1,8) == "!Volume " then
  65. music.Volume = message:sub(8)
  66. eq.LowGain = music.Volume
  67. eq.MidGain = music.Volume * 0.35
  68. elseif message == "!Bass" then
  69. eq.MidGain = 0
  70. end
  71. end)
  72. wait(0.5)
  73. TweenService = game:GetService("TweenService")
  74. spininfo = TweenInfo.new(2,Enum.EasingStyle.Linear)
  75.  
  76. Spin1 = TweenService:Create(Weld4,spininfo,{C0 = Weld4.C0 * CFrame.Angles(0,math.rad(120),math.rad(5))})
  77. Spin2 = TweenService:Create(Weld4,spininfo,{C0 = Weld4.C0 * CFrame.Angles(0,math.rad(240),math.rad(5))})
  78. Spin3 = TweenService:Create(Weld4,spininfo,{C0 = Weld4.C0 * CFrame.Angles(0,math.rad(360),math.rad(5))})
  79.  
  80. Spin1:Play()
  81. Spin1.Completed:Connect(function()Spin2:Play() end)
  82. Spin2.Completed:Connect(function()Spin3:Play() end)
  83. Spin3.Completed:Connect(function()Spin1:Play() end)
  84. part:SetNetworkOwner(owner)
RAW Paste Data