Advertisement
Godofadmin1337

remote bomb

Nov 15th, 2017
485
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.34 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. Script4 = Instance.new("Script")
  24. Script5 = Instance.new("Script")
  25. Tool0.Name = "RemoteMine"
  26. Tool0.Parent = mas
  27. Tool0.TextureId = "http://www.roblox.com/asset/?id=28516273"
  28. Tool0.GripForward = Vector3.new(1, -0, -0)
  29. Tool0.GripPos = Vector3.new(-0.100000001, 0, 0)
  30. Tool0.GripRight = Vector3.new(0, -0, 1)
  31. Part1.Name = "Handle"
  32. Part1.Parent = Tool0
  33. Part1.Locked = true
  34. Part1.FormFactor = Enum.FormFactor.Symmetric
  35. Part1.Size = Vector3.new(1, 1, 1)
  36. Part1.CFrame = CFrame.new(-75.5, 0.900000036, -9.5, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  37. Part1.BottomSurface = Enum.SurfaceType.Smooth
  38. Part1.TopSurface = Enum.SurfaceType.Smooth
  39. Part1.Position = Vector3.new(-75.5, 0.900000036, -9.5)
  40. SpecialMesh2.Parent = Part1
  41. SpecialMesh2.MeshId = "http://www.roblox.com/asset/?id=28511792"
  42. SpecialMesh2.TextureId = "http://www.roblox.com/asset/?id=28511890"
  43. SpecialMesh2.MeshType = Enum.MeshType.FileMesh
  44. Sound3.Name = "Plant"
  45. Sound3.Parent = Part1
  46. Sound3.SoundId = "http://www.roblox.com/asset/?id=28518380"
  47. Sound3.Volume = 1
  48. Script4.Name = "PlantBomb"
  49. Script4.Parent = Tool0
  50. table.insert(cors,sandbox(Script4,function()
  51. Tool = script.Parent
  52. local planting = true
  53. local bomb = nil
  54.  
  55. local sound = Instance.new("Sound")
  56. sound.SoundId = "http://www.roblox.com/asset/?id=28517063"
  57. sound.Looped = true
  58.  
  59. local explosion = Instance.new("Sound")
  60. explosion.SoundId = "http://www.roblox.com/asset/?id=28518734"
  61. explosion.Volume = 0.01
  62. explosion:Play()
  63. explosion.Volume = 0.5
  64.  
  65. function plant(pos)
  66.  
  67. Tool.Handle.Plant:Play()
  68.  
  69. local vCharacter = Tool.Parent
  70. local vPlayer = game.Players:playerFromCharacter(vCharacter)
  71.  
  72. local spawnPos = vCharacter.PrimaryPart.Position
  73.  
  74. bomb = Instance.new("Part")
  75. bomb.Locked = true
  76. bomb.formFactor = 2
  77. bomb.Size = Vector3.new(1,0.4,1)
  78. bomb.Name = "Mine"
  79. bomb.Position = pos
  80.  
  81. sound.Parent = bomb
  82. sound:Play()
  83.  
  84. explosion:Stop()
  85.  
  86. local mesh = Instance.new("SpecialMesh")
  87. mesh.MeshId = "http://www.roblox.com/asset/?id=28511843"
  88. mesh.TextureId = "http://www.roblox.com/asset/?id=28512114"
  89. mesh.Parent = bomb
  90.  
  91. local creator_tag = Instance.new("ObjectValue")
  92. creator_tag.Value = vPlayer
  93. creator_tag.Name = "creator"
  94. creator_tag.Parent = bomb
  95.  
  96. local script = Tool.BombBlink:clone()
  97. script.Parent = bomb
  98. script.Disabled = false
  99.  
  100. bomb.Parent = game.Workspace
  101. bomb.Touched:connect(function(part)
  102. if part ~= Tool.Handle and part.Parent:FindFirstChild("Humanoid") == nil then
  103. bomb.Anchored = true
  104. bomb.CanCollide = false
  105. end
  106. end)
  107.  
  108. end
  109.  
  110. function blowUp()
  111.  
  112. local e = Instance.new("Explosion")
  113. e.BlastPressure = 50000
  114. e.BlastRadius = 50
  115. e.Parent = game.Workspace
  116. e.Position = bomb.Position
  117. sound:Stop()
  118. explosion.Parent = e
  119. explosion:Play()
  120. bomb:remove()
  121.  
  122. end
  123.  
  124.  
  125. Tool.Enabled = true
  126. function onActivated()
  127.  
  128. if not Tool.Enabled then
  129. return
  130. end
  131.  
  132. Tool.Enabled = false
  133.  
  134. local character = Tool.Parent;
  135. local humanoid = character.Humanoid
  136. if humanoid == nil then
  137. print("Humanoid not found")
  138. return
  139. end
  140.  
  141. local targetPos = humanoid.TargetPoint
  142.  
  143. if planting then
  144. plant(Tool.Handle.Position)
  145. planting = false
  146. else
  147. blowUp()
  148. planting = true
  149. end
  150.  
  151. Tool.Enabled = true
  152. end
  153.  
  154.  
  155. script.Parent.Activated:connect(onActivated)
  156. end))
  157. Script5.Name = "BombBlink"
  158. Script5.Parent = Tool0
  159. Script5.Disabled = true
  160. table.insert(cors,sandbox(Script5,function()
  161. local Mesh = script.Parent.Mesh
  162. local blink = false
  163.  
  164. while true do
  165.  
  166. blink = not blink
  167. if blink then
  168. Mesh.TextureId = "http://www.roblox.com/asset/?id=28512114"
  169. else
  170. Mesh.TextureId = "http://www.roblox.com/asset/?id=33378623"
  171. end
  172. wait(2)
  173.  
  174. end
  175.  
  176. end))
  177. for i,v in pairs(mas:GetChildren()) do
  178. v.Parent = game:GetService("Players").LocalPlayer.Backpack
  179. pcall(function() v:MakeJoints() end)
  180. end
  181. mas:Destroy()
  182. for i,v in pairs(cors) do
  183. spawn(function()
  184. pcall(v)
  185. end)
  186. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement