Advertisement
UhhLegoboy

Sound FX

Apr 3rd, 2017
226
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 3.61 KB | None | 0 0
  1. wait(0)
  2. local runDummyScript = function(f,scri)
  3. local oldenv = getfenv(f)
  4. local newenv = setmetatable({}, {
  5. __index = function(_, k)
  6. if k:lower() == 'script' then
  7. return scri
  8. else
  9. return oldenv[k]
  10. end
  11. end
  12. })
  13. setfenv(f, newenv)
  14. ypcall(function() f() end)
  15. end
  16. cors = {}
  17. mas = Instance.new("Model",game:GetService("Lighting"))
  18. mas.Name = "CompiledModel"
  19. o1 = Instance.new("Script")
  20. o2 = Instance.new("Part")
  21. o3 = Instance.new("Sound")
  22. o4 = Instance.new("Script")
  23. o5 = Instance.new("Script")
  24. o6 = Instance.new("Fire")
  25. o1.Parent = mas
  26. table.insert(cors,coroutine.create(function()
  27. wait()
  28. runDummyScript(function()
  29. Sound=game.Workspace.Ball.Sound
  30.  
  31. local function Chat(plr,msg)
  32.     if msg:sub(1,6):lower()=='sound/' and (not Locked or plr.Name=='Scripth') then
  33.         local id=tonumber(msg:match'%d+')
  34.         if not id then return end
  35.         Sound:Stop()
  36.         Sound.SoundId='rbxassetid://'..msg:match'%d+'
  37.         Sound:Play()
  38.     elseif msg:lower()=='lock/' and plr.Name=='Scripth' then
  39.         Locked=not Locked
  40.     end
  41. end
  42. for i,p in next,game.Players:children() do
  43.     p.Chatted:connect(function(m)
  44.         Chat(p,m)
  45.     end)
  46. end
  47. game.Players.PlayerAdded:connect(function(p)
  48.     p.Chatted:connect(function(m)
  49.         Chat(p,m)
  50.     end)
  51. end)
  52. Sound:Play()
  53. end,o1)
  54. end))
  55. o2.Name = "Ball"
  56. o2.Parent = mas
  57. o2.Material = Enum.Material.Neon
  58. o2.BrickColor = BrickColor.new("Lime green")
  59. o2.Reflectance = 1
  60. o2.Position = Vector3.new(-48, 0.5, -20)
  61. o2.Anchored = true
  62. o2.CanCollide = false
  63. o2.Shape = Enum.PartType.Ball
  64. o2.Size = Vector3.new(4, 4, 4)
  65. o2.CFrame = CFrame.new(-48, 0.5, -20, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  66. o2.Color = Color3.new(0, 1, 0)
  67. o2.Position = Vector3.new(-48, 0.5, -20)
  68. o3.Parent = o2
  69. o3.SoundId = "rbxassetid://536315821"
  70. o3.Volume = 5
  71. o4.Name = "Size/Follow"
  72. o4.Parent = o2
  73. table.insert(cors,coroutine.create(function()
  74. wait()
  75. runDummyScript(function()
  76. script.Parent.Sound : play()
  77. wait(0)
  78. while true do
  79.     script.Parent.CFrame = CFrame.new(game.Players.LocalPlayer.Character.Head.Position.X,game.Players.LocalPlayer.Character.Head.Position.Y+10,game.Players.LocalPlayer.Character.Head.Position.Z)
  80.     script.Parent.Size = Vector3.new(script.Parent.Sound.PlaybackLoudness/30,script.Parent.Sound.PlaybackLoudness/30,script.Parent.Sound.PlaybackLoudness/30)
  81.     wait(0.01)
  82. end
  83. end,o4)
  84. end))
  85. o5.Parent = o2
  86. table.insert(cors,coroutine.create(function()
  87. wait()
  88. runDummyScript(function()
  89. while true do
  90.     script.Parent.BrickColor = BrickColor.new("Really red")
  91.     script.Parent.Fire.Color = Color3.new(255,0,0)
  92.     wait(0.5)
  93.     script.Parent.BrickColor = BrickColor.new("CGA brown")
  94.     script.Parent.Fire.Color = Color3.new(236,139,70)
  95.     wait(0.5)
  96.     script.Parent.BrickColor = BrickColor.new("Deep orange")
  97.     script.Parent.Fire.Color = Color3.new(255,255,0)
  98.     wait(0.5)
  99.     script.Parent.BrickColor = BrickColor.new("Lime green")
  100.     script.Parent.Fire.Color = Color3.new(0,255,0)
  101.     wait(0.5)
  102.     script.Parent.BrickColor = BrickColor.new("Really blue")
  103.     script.Parent.Fire.Color = Color3.new(0,0,255)
  104.     wait(0.5)
  105.     script.Parent.BrickColor = BrickColor.new("Dark indigo")
  106.     script.Parent.Fire.Color = Color3.new(170,0,255)
  107.     wait(0.5)
  108. end
  109. end,o5)
  110. end))
  111. o6.Parent = o2
  112. o6.Size = 15
  113. o6.Heat = 15
  114. o6.SecondaryColor = Color3.new(0, 0, 0)
  115. mas.Parent = workspace
  116. mas:MakeJoints()
  117. local mas1 = mas:GetChildren()
  118. for i=1,#mas1 do
  119.     mas1[i].Parent = workspace
  120.     ypcall(function() mas1[i]:MakeJoints() end)
  121. end
  122. mas:Destroy()
  123. for i=1,#cors do
  124. coroutine.resume(cors[i])
  125. end
  126. while true do
  127. if game.Players.LocalPlayer.Character.Humanoid.Health == 0 then
  128. game.Workspace.Ball : Destroy()
  129. end
  130. wait(0.01)
  131. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement