lilbakka78

Untitled

May 23rd, 2018
30
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.15 KB | None | 0 0
  1. --from dev to manny xdd
  2. local plr = game.Players.LocalPlayer
  3. repeat
  4. wait()
  5. until plr.Character
  6. local char = plr.Character
  7. local torso = char.Torso
  8. local s = Instance.new("Sound", char)
  9. s.Volume = 5
  10.  
  11. local deb = false
  12. local beat = true
  13. local rainbow = false
  14. local set = false
  15.  
  16. list = {
  17. {
  18. Name = "Play",
  19. Id = 231365203
  20. }
  21. }
  22.  
  23. local part = Instance.new("Part", char)
  24. part.Anchored = true
  25. part.CanCollide = false
  26. part.Name = "Vis"
  27. part.Transparency = 0.5
  28. part.Size = Vector3.new(1, 1, 1)
  29. part.BottomSurface = 0
  30. part.TopSurface = 0
  31. part.Material = "Neon"
  32. part.BrickColor = BrickColor.new("Really black")
  33.  
  34. game:service'RunService'.RenderStepped:connect(function()
  35. spawn(function()
  36. if part ~= nil then
  37. if set == false then
  38. part.CFrame = part.CFrame:lerp(torso.CFrame, 0.1)
  39. elseif set == true then
  40. part.CFrame = part.CFrame:lerp(torso.CFrame * CFrame.new(0, 5, 0), 0.1)
  41. end
  42. end
  43. end)
  44. spawn(function()
  45. if s.IsPlaying == true then
  46. local pbl = math.floor(s.PlaybackLoudness)
  47. part.Size = part.Size:lerp(Vector3.new(pbl / 50, pbl / 50, pbl / 50), 0.1)
  48. if pbl >= 300 and beat == true then
  49. part.Rotation = Vector3.new(math.random(1, 45), math.random(1, 45), math.random(1, 45))
  50. end
  51. if rainbow == true then
  52. part.BrickColor = BrickColor.new(Color3.new(cycle(tick())))
  53. end
  54. end
  55. end)
  56. spawn(function()
  57. if s.IsPaused == true then
  58. s:Stop()
  59. part.BrickColor = BrickColor.new("Really black")
  60. deb = false
  61. end
  62. end)
  63. end)
  64.  
  65. function cycle(num)
  66. local section = num % 1 * 3;
  67. local secondary = 0.5 * math.pi * (section % 1);
  68. if section < 1 then
  69. return 1, 1 - math.cos(secondary), 1 - math.sin(secondary);
  70. elseif section < 2 then
  71. return 1 - math.sin(secondary), 1, 1 - math.cos(secondary);
  72. else
  73. return 1 - math.cos(secondary), 1 - math.sin(secondary), 1;
  74. end
  75. end
  76.  
  77. plr.Chatted:connect(function(m)
  78. for i = 1, #list do
  79. if string.lower(m) == string.lower("!"..list[i].Name) and deb == false then
  80. deb = true
  81. s.SoundId = "rbxassetid://"..list[i].Id
  82. s:Play()
  83. end
  84. end
  85. if string.lower(m) == "!beat" then
  86. if beat == false then
  87. beat = true
  88. end
  89. elseif string.lower(m) == "!rainbow" then
  90. if rainbow == false then
  91. rainbow = true
  92. end
  93. elseif string.lower(m) == "!nobeat" then
  94. if beat == true then
  95. beat = false
  96. part.Rotation = Vector3.new(0, 0, 0)
  97. end
  98. elseif string.lower(m) == "!norainbow" then
  99. if rainbow == true then
  100. rainbow = false
  101. part.BrickColor = BrickColor.new("Really black")
  102. end
  103. elseif string.lower(m) == "!set" then
  104. if set == false then
  105. set = true
  106. end
  107. elseif string.lower(m) == "!stop" then
  108. if s.IsPlaying == true then
  109. s:Stop()
  110. part.Size = Vector3.new(1, 1, 1)
  111. part.BrickColor = BrickColor.new("Really black")
  112. end
  113. elseif string.lower(m) == "!noset" then
  114. if set == true then
  115. set = false
  116. end
  117. elseif string.lower(m:sub(1, 1)) == "!" and deb == false then
  118. deb = true
  119. local numval = Instance.new("NumberValue", workspace)
  120. numval.Value = m:sub(2, #m)
  121. local val = numval.Value
  122. numval:Destroy()
  123. s.SoundId = "rbxassetid://"..val
  124. s:Play()
  125. end
  126. end)
Add Comment
Please, Sign In to add comment