DISTROYER190

Untitled

Sep 12th, 2018
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.66 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. LocalScript3 = Instance.new("LocalScript")
  23. Animation4 = Instance.new("Animation")
  24. Script5 = Instance.new("Script")
  25. Folder6 = Instance.new("Folder")
  26. RemoteEvent7 = Instance.new("RemoteEvent")
  27. Tool0.Name = "Distroyer Cannon"
  28. Tool0.Parent = mas
  29. Part1.Name = "Handle"
  30. Part1.Parent = Tool0
  31. Part1.CFrame = CFrame.new(3, 2.5, 24, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  32. Part1.Position = Vector3.new(3, 2.5, 24)
  33. Part1.Size = Vector3.new(1, 1, 1)
  34. Part1.BottomSurface = Enum.SurfaceType.Smooth
  35. Part1.TopSurface = Enum.SurfaceType.Smooth
  36. SpecialMesh2.Parent = Part1
  37. SpecialMesh2.MeshId = "http://www.roblox.com/asset/?id=94690054"
  38. SpecialMesh2.Offset = Vector3.new(0, 0.5, 2)
  39. SpecialMesh2.Scale = Vector3.new(2, 2, 2)
  40. SpecialMesh2.TextureId = "rbxassetid://2334529951"
  41. SpecialMesh2.MeshType = Enum.MeshType.FileMesh
  42. LocalScript3.Name = "Client"
  43. LocalScript3.Parent = Tool0
  44. table.insert(cors,sandbox(LocalScript3,function()
  45. local player = game.Players.LocalPlayer
  46. local mouse = player:GetMouse()
  47. local anim1 = script.Parent.Parent.Humanoid:LoadAnimation(script.Hold)
  48.  
  49.  
  50. script.Parent.Equipped:Connect(function()
  51. anim1:Play()
  52. end)
  53.  
  54. script.Parent.Unequipped:Connect(function()
  55. anim1:Stop()
  56. end)
  57. end))
  58. Animation4.Name = "Hold"
  59. Animation4.Parent = LocalScript3
  60. Animation4.AnimationId = "rbxassetid://2161330213"
  61. Script5.Name = "Server"
  62. Script5.Parent = Tool0
  63. table.insert(cors,sandbox(Script5,function()
  64. local handle = script.Parent.Handle
  65. local shooting = false
  66.  
  67.  
  68. local canshoot = true
  69.  
  70. script.Parent.Equipped:Connect(function()
  71. local character = script.Parent.Parent
  72. end)
  73.  
  74. script.Parent.Equipped:Connect(function()
  75. local character = nil
  76. end)
  77.  
  78. script.Parent.Activated:Connect(function()
  79. if canshoot == true then
  80. shooting = true
  81. local missile = game:GetService('ServerStorage'):FindFirstChild('Missile'):Clone()
  82. missile.Parent = workspace
  83. missile.Position = handle.Position
  84. end
  85. end)
  86. end))
  87. Folder6.Name = "Events"
  88. Folder6.Parent = Tool0
  89. RemoteEvent7.Name = "MousePass"
  90. RemoteEvent7.Parent = Folder6
  91. for i,v in pairs(mas:GetChildren()) do
  92. v.Parent = workspace
  93. pcall(function() v:MakeJoints() end)
  94. end
  95. mas:Destroy()
  96. for i,v in pairs(cors) do
  97. spawn(function()
  98. pcall(v)
  99. end)
  100. end
Add Comment
Please, Sign In to add comment