coolgoldboy166

windows horn

Nov 17th, 2017
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.57 KB | None | 0 0
  1.  
  2. --Converted with ttyyuu12345's model to script plugin v4
  3. function sandbox(var,func)
  4. local env = getfenv(func)
  5. local newenv = setmetatable({},{
  6. __index = function(self,k)
  7. if k=="script" then
  8. return var
  9. else
  10. return env[k]
  11. end
  12. end,
  13. })
  14. setfenv(func,newenv)
  15. return func
  16. end
  17. cors = {}
  18. mas = Instance.new("Model",game:GetService("Lighting"))
  19. Tool0 = Instance.new("Tool")
  20. Part1 = Instance.new("Part")
  21. SpecialMesh2 = Instance.new("SpecialMesh")
  22. Sound3 = Instance.new("Sound")
  23. Decal4 = Instance.new("Decal")
  24. Animation5 = Instance.new("Animation")
  25. LocalScript6 = Instance.new("LocalScript")
  26. Tool0.Name = "WindowsVuvuzela"
  27. Tool0.Parent = mas
  28. Tool0.TextureId = "rbxassetid://467529252"
  29. Part1.Name = "Handle"
  30. Part1.Parent = Tool0
  31. Part1.BrickColor = BrickColor.new("Institutional white")
  32. Part1.Size = Vector3.new(1, 3.60000014, 1)
  33. Part1.CFrame = CFrame.new(-8.5, 1.80003595, -63, 1, -1.04046094e-07, -8.94069672e-08, 1.04046094e-07, 1, -1.13686838e-13, 8.94069672e-08, 1.13686838e-13, 1)
  34. Part1.Color = Color3.new(0.972549, 0.972549, 0.972549)
  35. Part1.Position = Vector3.new(-8.5, 1.80003595, -63)
  36. Part1.Color = Color3.new(0.972549, 0.972549, 0.972549)
  37. SpecialMesh2.Parent = Part1
  38. SpecialMesh2.MeshId = "http://www.roblox.com/asset/?id=29086478"
  39. SpecialMesh2.TextureId = "http://www.roblox.com/asset/?id=29086192"
  40. SpecialMesh2.MeshType = Enum.MeshType.FileMesh
  41. Sound3.Name = "Startup"
  42. Sound3.Parent = Part1
  43. Sound3.SoundId = "rbxassetid://1107208252"
  44. Decal4.Parent = Part1
  45. Decal4.Texture = "http://www.roblox.com/asset/?id=25268714"
  46. Decal4.Face = Enum.NormalId.Back
  47. Animation5.Name = "hornblow"
  48. Animation5.Parent = Tool0
  49. Animation5.AnimationId = "http://www.roblox.com/Asset?ID=29095462"
  50. LocalScript6.Parent = Tool0
  51. table.insert(cors,sandbox(LocalScript6,function()
  52. local Tool = script.Parent
  53. local blow = nil
  54.  
  55. local sounds = {}
  56. for i,v in pairs(Tool.Handle:GetChildren()) do
  57. if v:IsA("Sound") then
  58. table.insert(sounds,v)
  59. end
  60. end
  61.  
  62.  
  63.  
  64.  
  65. function onEquipped()
  66. blow = Tool.Parent:FindFirstChild("Humanoid"):LoadAnimation(Tool.hornblow)
  67. end
  68.  
  69. local enabled = false
  70.  
  71. function onActivated()
  72.  
  73. if enabled then
  74. return
  75. end
  76.  
  77. enabled = true
  78. local sound = sounds[math.random(1,#sounds)]
  79. sound.Volume = 10
  80. sound:Play()
  81. blow:Play()
  82.  
  83. wait(1)
  84.  
  85. enabled = false
  86.  
  87. end
  88.  
  89. Tool.Activated:connect(onActivated)
  90. Tool.Equipped:connect(onEquipped)
  91.  
  92.  
  93.  
  94. end))
  95. for i,v in pairs(mas:GetChildren()) do
  96. v.Parent = workspace
  97. pcall(function() v:MakeJoints() end)
  98. end
  99. mas:Destroy()
  100. for i,v in pairs(cors) do
  101. spawn(function()
  102. pcall(v)
  103. end)
  104. end
Add Comment
Please, Sign In to add comment