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")
- LocalScript3 = Instance.new("LocalScript")
- Script4 = Instance.new("Script")
- LocalScript5 = Instance.new("LocalScript")
- IntValue6 = Instance.new("IntValue")
- Tool0.Name = "RemoteDetonator"
- Tool0.Parent = mas
- Tool0.TextureId = "http://www.roblox.com/asset/?id=74322561"
- Tool0.GripForward = Vector3.new(-0, -1, 0)
- Tool0.GripPos = Vector3.new(0, 0.100000001, 0)
- Tool0.GripRight = Vector3.new(-1, 0, 0)
- Tool0.GripUp = Vector3.new(0, 0, 1)
- Part1.Name = "Handle"
- Part1.Parent = Tool0
- Part1.Rotation = Vector3.new(-84.0299988, 0.0399999991, 179.119995)
- Part1.RotVelocity = Vector3.new(1, 1, 1)
- Part1.Locked = true
- Part1.FormFactor = Enum.FormFactor.Custom
- Part1.Size = Vector3.new(0.399997801, 0.389998913, 1.9799993)
- Part1.CFrame = CFrame.new(-49977.3867, -49982.8906, -50039.5547, -0.999882221, -0.0153170722, 0.000773677719, 0.0023618862, -0.10394416, 0.994580269, -0.0151536465, 0.994465113, 0.103968121)
- Part1.Position = Vector3.new(-49977.3867, -49982.8906, -50039.5547)
- Part1.Orientation = Vector3.new(-84.0299988, 0.429999977, 178.699997)
- SpecialMesh2.Parent = Part1
- SpecialMesh2.MeshId = "http://www.roblox.com/asset/?id=74322546"
- SpecialMesh2.Scale = Vector3.new(1.5, 1.5, 1.5)
- SpecialMesh2.TextureId = "http://www.roblox.com/asset/?id=74322558"
- SpecialMesh2.MeshType = Enum.MeshType.FileMesh
- SpecialMesh2.Scale = Vector3.new(1.5, 1.5, 1.5)
- LocalScript3.Name = "Local Gui"
- LocalScript3.Parent = Tool0
- table.insert(cors,sandbox(LocalScript3,function()
- Tool = script.Parent
- local stillEquipped = false
- function onEquippedLocal(mouse)
- stillEquipped = true
- if mouse == nil then
- print("Mouse not found")
- return
- end
- while stillEquipped do
- print("Setting Mouse to go")
- mouse.Icon = "rbxasset://textures\\GunCursor.png"
- while Tool.Enabled and stillEquipped do
- wait(0.01)
- end
- print("Setting Mouse to wait")
- mouse.Icon = "rbxasset://textures\\GunWaitCursor.png"
- while not Tool.Enabled and stillEquipped do
- wait(0.01)
- end
- end
- end
- function onUnequippedLocal()
- stillEquipped = false
- end
- Tool.Equipped:connect(onEquippedLocal)
- Tool.Unequipped:connect(onUnequippedLocal)
- end))
- Script4.Name = "BombScript"
- Script4.Parent = Tool0
- table.insert(cors,sandbox(Script4,function()
- local Tool = script.Parent
- local Remote = Tool.Handle
- local vCharacter
- local myTorso
- local myHumanoid
- Tool.Enabled = true
- local c4Clone
- local exploded
- local debris = game:GetService("Debris")
- function onActivated()
- if Tool.Enabled == false then
- return
- end
- if myTorso == nil or myHumanoid == nil then
- return
- end
- Tool.Enabled = false
- if not c4Clone or not c4Clone.Parent or exploded then
- exploded = false
- local target = myHumanoid.TargetPoint
- local lookAt = (target - Remote.Position).unit
- local findPart = game.Workspace:FindPartOnRay(Ray.new(Remote.Position, lookAt * 8.0), vCharacter)
- if findPart then
- c4Clone = Remote:Clone()
- c4Clone.CFrame = Remote.CFrame
- c4Clone.Velocity = lookAt * 9.0
- c4Clone.Parent = game.Workspace
- c4Clone.CanCollide = true
- c4Clone.Touched:connect(function(part)
- if part and part.Parent and part.Parent ~= vCharacter and part.Parent ~= Tool then
- local c4Weld = Instance.new("Weld")
- c4Weld.Part0 = part
- c4Weld.Part1 = c4Clone
- c4Weld.Name = "C4Weld"
- c4Weld.Parent = c4Clone
- c4Weld.C1 = part.CFrame * c4Clone.CFrame:inverse()
- end
- end)
- if Remote:FindFirstChild("Mesh") then
- Remote.Mesh.MeshId = "http://www.roblox.com/asset/?id=74322546"
- Remote.Mesh.TextureId = "http://www.roblox.com/asset/?id=74322558"
- end
- if Tool:FindFirstChild("TooFar") then Tool.TooFar.Value = 2 end
- else
- if Tool:FindFirstChild("TooFar") then
- Tool.TooFar.Value = 1
- end
- end
- elseif c4Clone and c4Clone.Parent then
- local explosion = Instance.new("Explosion")
- explosion.BlastRadius = 15.0
- explosion.BlastPressure = 9999999
- explosion.Position = c4Clone.Position
- explosion.Hit:connect(function(hit)
- if hit and hit.Parent then
- local humanoid = hit.Parent:FindFirstChild("Humanoid")
- if humanoid and humanoid ~= myHumanoid then
- local creatorTag = Instance.new("ObjectValue")
- creatorTag.Name = "creator"
- creatorTag.Value = vPlayer
- creatorTag.Parent = humanoid
- debris:AddItem(creatorTag, 1.0)
- end
- end
- end)
- explosion.Parent = game.Workspace
- exploded = true
- if Remote:FindFirstChild("Mesh") then
- Remote.Mesh.MeshId = "http://www.roblox.com/asset/?id=74322628"
- Remote.Mesh.TextureId = "http://www.roblox.com/asset/?id=74322630"
- end
- if Tool:FindFirstChild("TooFar") then Tool.TooFar.Value = 0 end
- end
- wait(2.0)
- Tool.Enabled = true
- end
- function onEquipped()
- vCharacter = Tool.Parent
- myTorso = vCharacter:FindFirstChild("Torso")
- myHumanoid = vCharacter:FindFirstChild("Humanoid")
- vPlayer = game.Players:GetPlayerFromCharacter(vCharacter)
- if (not c4Clone or not c4Clone.Parent) and Remote:FindFirstChild("Mesh") then
- Remote.Mesh.MeshId = "http://www.roblox.com/asset/?id=74322628"
- Remote.Mesh.TextureId = "http://www.roblox.com/asset/?id=74322630"
- end
- end
- function onUnequipped()
- if Remote:FindFirstChild("Mesh") then
- Remote.Mesh.MeshId = "http://www.roblox.com/asset/?id=74322546"
- Remote.Mesh.TextureId = "http://www.roblox.com/asset/?id=74322558"
- end
- end
- Tool.Activated:connect(onActivated)
- Tool.Equipped:connect(onEquipped)
- Tool.Unequipped:connect(onUnequipped)
- end))
- LocalScript5.Name = "GuiScript"
- LocalScript5.Parent = Tool0
- table.insert(cors,sandbox(LocalScript5,function()
- local Tool = script.Parent
- local Lantern = Tool.Handle
- local vCharacter
- local vPlayer
- local sg
- local frame
- local genericTextLabel
- function onEquipped()
- vCharacter = Tool.Parent
- vPlayer = game.Players:GetPlayerFromCharacter(vCharacter)
- if vPlayer then
- local playerGui = vPlayer:FindFirstChild("PlayerGui")
- if playerGui and playerGui:FindFirstChild("LanternGui") == nil then
- sg = Instance.new("ScreenGui")
- sg.Name = "LanternGui"
- sg.Parent = playerGui
- frame = Instance.new("Frame")
- frame.Parent = sg
- frame.Size = UDim2.new(0, 200, 0, 30)
- frame.Position = UDim2.new(0.5, -100, 1, -130)
- frame.Style = Enum.FrameStyle.RobloxRound
- genericTextLabel = Instance.new("TextLabel")
- genericTextLabel.BackgroundTransparency = 1.0
- genericTextLabel.Size = UDim2.new(1, 0, 1, 0)
- genericTextLabel.Visible = true
- genericTextLabel.ZIndex = 10
- genericTextLabel.FontSize = Enum.FontSize.Size10
- genericTextLabel.Font = Enum.Font.Legacy
- genericTextLabel.TextColor3 = Color3.new(1, 127/255, 0)
- genericTextLabel.TextXAlignment = Enum.TextXAlignment.Center
- genericTextLabel.TextYAlignment = Enum.TextYAlignment.Top
- genericTextLabel.Parent = frame
- genericTextLabel.Text = "Plant the bomb!"
- end
- end
- end
- function onUnequipped()
- if sg then sg:Remove() end
- end
- Tool.Equipped:connect(onEquipped)
- Tool.Unequipped:connect(onUnequipped)
- local tooFar
- while Tool:FindFirstChild("TooFar") == nil do
- wait()
- end
- tooFar = Tool.TooFar
- tooFar.Changed:connect(function()
- if tooFar and genericTextLabel then
- if tooFar.Value == 1 then
- genericTextLabel.Text = "Target too far away"
- wait(2.0)
- genericTextLabel.Text = "Plant the bomb"
- elseif tooFar.Value == 0 then
- genericTextLabel.Text = "Plant the bomb"
- else
- genericTextLabel.Text = "Time to detonate"
- end
- end
- end)
- end))
- IntValue6.Name = "TooFar"
- IntValue6.Parent = Tool0
- 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