Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Converted with ttyyuu12345's model to script plugin v4
- function sandbox(var,func)
- local env = getfenv(func)
- local newenv = setmetatable({},{
- __index = function(self,k)
- if k=="script" then
- return var
- else
- return env[k]
- end
- end,
- })
- setfenv(func,newenv)
- return func
- end
- cors = {}
- mas = Instance.new("Model",game:GetService("Lighting"))
- Tool0 = Instance.new("Tool")
- Part1 = Instance.new("Part")
- SpecialMesh2 = Instance.new("SpecialMesh")
- Sound3 = Instance.new("Sound")
- Script4 = Instance.new("Script")
- Script5 = Instance.new("Script")
- Tool0.Name = "RemoteMine"
- Tool0.Parent = mas
- Tool0.TextureId = "http://www.roblox.com/asset/?id=28516273"
- Tool0.GripForward = Vector3.new(1, -0, -0)
- Tool0.GripPos = Vector3.new(-0.100000001, 0, 0)
- Tool0.GripRight = Vector3.new(0, -0, 1)
- Part1.Name = "Handle"
- Part1.Parent = Tool0
- Part1.Locked = true
- Part1.FormFactor = Enum.FormFactor.Symmetric
- Part1.Size = Vector3.new(1, 1, 1)
- Part1.CFrame = CFrame.new(-75.5, 0.900000036, -9.5, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Part1.BottomSurface = Enum.SurfaceType.Smooth
- Part1.TopSurface = Enum.SurfaceType.Smooth
- Part1.Position = Vector3.new(-75.5, 0.900000036, -9.5)
- SpecialMesh2.Parent = Part1
- SpecialMesh2.MeshId = "http://www.roblox.com/asset/?id=28511792"
- SpecialMesh2.TextureId = "http://www.roblox.com/asset/?id=28511890"
- SpecialMesh2.MeshType = Enum.MeshType.FileMesh
- Sound3.Name = "Plant"
- Sound3.Parent = Part1
- Sound3.SoundId = "http://www.roblox.com/asset/?id=28518380"
- Sound3.Volume = 1
- Script4.Name = "PlantBomb"
- Script4.Parent = Tool0
- table.insert(cors,sandbox(Script4,function()
- Tool = script.Parent
- local planting = true
- local bomb = nil
- local sound = Instance.new("Sound")
- sound.SoundId = "http://www.roblox.com/asset/?id=28517063"
- sound.Looped = true
- local explosion = Instance.new("Sound")
- explosion.SoundId = "http://www.roblox.com/asset/?id=28518734"
- explosion.Volume = 0.01
- explosion:Play()
- explosion.Volume = 0.5
- function plant(pos)
- Tool.Handle.Plant:Play()
- local vCharacter = Tool.Parent
- local vPlayer = game.Players:playerFromCharacter(vCharacter)
- local spawnPos = vCharacter.PrimaryPart.Position
- bomb = Instance.new("Part")
- bomb.Locked = true
- bomb.formFactor = 2
- bomb.Size = Vector3.new(1,0.4,1)
- bomb.Name = "Mine"
- bomb.Position = pos
- sound.Parent = bomb
- sound:Play()
- explosion:Stop()
- local mesh = Instance.new("SpecialMesh")
- mesh.MeshId = "http://www.roblox.com/asset/?id=28511843"
- mesh.TextureId = "http://www.roblox.com/asset/?id=28512114"
- mesh.Parent = bomb
- local creator_tag = Instance.new("ObjectValue")
- creator_tag.Value = vPlayer
- creator_tag.Name = "creator"
- creator_tag.Parent = bomb
- local script = Tool.BombBlink:clone()
- script.Parent = bomb
- script.Disabled = false
- bomb.Parent = game.Workspace
- bomb.Touched:connect(function(part)
- if part ~= Tool.Handle and part.Parent:FindFirstChild("Humanoid") == nil then
- bomb.Anchored = true
- bomb.CanCollide = false
- end
- end)
- end
- function blowUp()
- local e = Instance.new("Explosion")
- e.BlastPressure = 50000
- e.BlastRadius = 50
- e.Parent = game.Workspace
- e.Position = bomb.Position
- sound:Stop()
- explosion.Parent = e
- explosion:Play()
- bomb:remove()
- end
- Tool.Enabled = true
- function onActivated()
- if not Tool.Enabled then
- return
- end
- Tool.Enabled = false
- local character = Tool.Parent;
- local humanoid = character.Humanoid
- if humanoid == nil then
- print("Humanoid not found")
- return
- end
- local targetPos = humanoid.TargetPoint
- if planting then
- plant(Tool.Handle.Position)
- planting = false
- else
- blowUp()
- planting = true
- end
- Tool.Enabled = true
- end
- script.Parent.Activated:connect(onActivated)
- end))
- Script5.Name = "BombBlink"
- Script5.Parent = Tool0
- Script5.Disabled = true
- table.insert(cors,sandbox(Script5,function()
- local Mesh = script.Parent.Mesh
- local blink = false
- while true do
- blink = not blink
- if blink then
- Mesh.TextureId = "http://www.roblox.com/asset/?id=28512114"
- else
- Mesh.TextureId = "http://www.roblox.com/asset/?id=33378623"
- end
- wait(2)
- end
- end))
- for i,v in pairs(mas:GetChildren()) do
- v.Parent = game:GetService("Players").LocalPlayer.Backpack
- pcall(function() v:MakeJoints() end)
- end
- mas:Destroy()
- for i,v in pairs(cors) do
- spawn(function()
- pcall(v)
- end)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement