DrakerMaker

Pumpkin Visualizer WIP

Oct 24th, 2019
136
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.49 KB | None | 0 0
  1. script.Parent = owner.Character
  2. local Remote = Instance.new("RemoteEvent", owner.Character)
  3. Remote.Name = "LEVENT"
  4. local Part = Instance.new("Part", owner.Character)
  5. Part.Name = "Pumpkin"
  6. Part.Anchored = true
  7. Part.CFrame = owner.Character.Torso.CFrame *CFrame.new(0, 2, 4) *CFrame.new(0, 4, 0)
  8. Part.CanCollide = false
  9. local Mesh = Instance.new("SpecialMesh", Part)
  10. Mesh.MeshId = "http://www.roblox.com/asset/?id=16973748"
  11. Mesh.TextureId = "http://www.roblox.com/asset/?id=16973739"
  12. local Song = Instance.new("Sound", Part)
  13. Song.SoundId = "rbxassetid://1473560932"
  14. Song.Volume = 2
  15. Song.Looped = true
  16. Song:Play()
  17. local Spin = 0.1
  18. local pbl = 0
  19. NLS([[
  20. game:GetService("RunService").RenderStepped:connect(function()
  21. owner.Character.LEVENT:FireServer(owner.Character.Pumpkin.Sound.PlaybackLoudness)
  22. end)
  23. ]], owner.Character)
  24. move = coroutine.wrap(function()
  25. while game:GetService("RunService").Stepped:wait() do
  26. Spin = Spin +0.1
  27. Part.CFrame = Part.CFrame:lerp(owner.Character.Torso.CFrame *CFrame.new(1.5, 2, 1.5) *CFrame.Angles(math.sin(Spin) *1, math.cos(Spin) *1, math.sin(Spin) *1), 0.1)
  28. Mesh.Scale = Vector3.new(0.05+pbl/300,0.05+pbl/300,0.05+pbl/300)
  29. end
  30. end)move()
  31. Remote.OnServerEvent:connect(function(x, l)
  32. pbl = l
  33. end)
  34. owner.Chatted:connect(function(msg)
  35. if msg:sub(1,5) == ";play" then
  36. Song:Stop()
  37. Song.SoundId = msg:sub(7)
  38. Song:Play()
  39. end
  40. if msg:sub(1,4) == ";vol" then
  41. Song.Volume = msg:sub(6)
  42. end
  43. if msg:sub(1,6) == ";pitch" then
  44. Song.PlaybackSpeed = msg:sub(8)
  45. end
  46. end)
Add Comment
Please, Sign In to add comment