Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local plr = owner
- local char = plr.Character
- local hum = char:FindFirstChildOfClass("Humanoid")
- local torso = char:FindFirstChild("Torso") or char:FindFirstChild("HumanoidRootPart")
- wait(0.1)
- Tool0 = Instance.new("Tool")
- Part1 = Instance.new("Part")
- SpecialMesh2 = Instance.new("SpecialMesh")
- Tool0.Name = "Smoke Grenade"
- Tool0.Parent = plr:FindFirstChild("Backpack")
- Part1.Name = "Handle"
- Part1.Parent = Tool0
- Part1.Size = Vector3.new(0.682, 1.65, 0.88)
- Part1.Material = Enum.Material.SmoothPlastic
- Part1.BottomSurface = Enum.SurfaceType.Smooth
- Part1.Anchored = false
- Part1.CanCollide = false
- Part1.TopSurface = Enum.SurfaceType.Smooth
- Part1.CustomPhysicalProperties = PhysicalProperties.new(0.699999988, 1.5, 0.5, 2, 1)
- SpecialMesh2.Parent = Part1
- SpecialMesh2.MeshId = "rbxassetid://437001004"
- SpecialMesh2.Scale = Vector3.new(0.002, 0.002, 0.002)
- SpecialMesh2.TextureId = "rbxassetid://437001024"
- SpecialMesh2.MeshType = Enum.MeshType.FileMesh
- local tool = Tool0
- local handle = Part1
- local debris = game:GetService("Debris")
- local tween = game:GetService("TweenService")
- local using = false
- local equipped = false
- local holding = false
- local amount = 1/0
- local junk = script --workspace.junk
- local hits = {1543854566,1543854764,1543854943,1543855404}
- local explosions = {2814354886,2814355346,2814355743,2814354338}
- function play(id,par,vol,pitch,loop,starting,ending)
- local current = Instance.new("Sound",par)
- current.SoundId = "rbxassetid://" ..id
- current.Parent = par or script
- current.Volume = vol or 1
- current.PlaybackSpeed = pitch or 1
- current.Looped = loop or false
- current:Play()
- current.TimePosition = starting or 0
- spawn(function()
- if ending ~= nil and tonumber(ending) then
- repeat wait() until current.TimePositon >= ending
- current:Stop()
- debris:AddItem(current,1)
- else
- repeat wait() until not current.IsPlaying
- debris:AddItem(current,1)
- end
- end)
- return current
- end
- function smoke(par,pos)
- local Part0 = Instance.new("Part")
- Part0.Parent = par
- Part0.Position = pos
- Part0.Transparency = 1
- Part0.Size = Vector3.new(20, 0.0500000007, 20)
- Part0.Anchored = true
- Part0.BottomSurface = Enum.SurfaceType.Smooth
- Part0.CanCollide = false
- Part0.Material = Enum.Material.Slate
- Part0.TopSurface = Enum.SurfaceType.Smooth
- Part0.FormFactor = Enum.FormFactor.Custom
- Part0.formFactor = Enum.FormFactor.Custom
- local ParticleEmitter0 = Instance.new("ParticleEmitter")
- ParticleEmitter0.Parent = Part0
- ParticleEmitter0.Speed = NumberRange.new(3, 3)
- ParticleEmitter0.Color = ColorSequence.new(Color3.new(0.831373, 0.831373, 0.831373),Color3.new(0.611765, 0.611765, 0.611765))
- ParticleEmitter0.Texture = "http://www.roblox.com/asset/?id=237568993"
- ParticleEmitter0.Size = NumberSequence.new(4,4)
- ParticleEmitter0.Lifetime = NumberRange.new(3, 5)
- ParticleEmitter0.Rate = 100
- ParticleEmitter0.RotSpeed = NumberRange.new(20, 20)
- play('2699499175',Part0,1.5)
- local hitbox = Instance.new("Part",Part0)
- hitbox.Name = "hit box"
- hitbox.Size = Vector3.new(20,10,20)
- hitbox.CanCollide = false
- hitbox.Anchored = true
- hitbox.Transparency = 1
- hitbox.Position = pos + Vector3.new(0,3,0)
- spawn(function()
- ParticleEmitter0.Enabled = true
- wait(14)
- ParticleEmitter0.Enabled = false
- debris:AddItem(Part0,4)
- hitbox:Destroy()
- end)
- spawn(function()
- while hitbox and hitbox.Parent do
- local reg = Region3.new(hitbox.Position-hitbox.Size/2,hitbox.Position+hitbox.Size/2)
- local parts = workspace:FindPartsInRegion3(reg,hitbox,1/0)
- for _,obj in pairs(parts) do
- if obj.Name == 'fire hit' and obj:IsA("BasePart") and obj.Parent.Name == 'Fire' then
- obj.Parent:Destroy()
- play('2699594712',Part0,2)
- end
- end
- wait(0.2)
- end
- end)
- end
- function throw(mpos)
- local pag = Instance.new("Part")
- pag.Parent = junk
- pag.CanCollide = false
- pag.Transparency = 1
- pag.Anchored = true
- pag.CanCollide = false
- pag.CFrame = CFrame.new(handle.Position,mpos)
- --play('2555282633',torso,1)
- play('711753382',handle,1)
- local fake = handle:Clone()
- fake.Parent = junk
- fake.Name = "grenade"
- fake.CanCollide = true
- fake.Velocity = pag.CFrame.lookVector * 130
- local hit = Instance.new("Sound")
- hit.SoundId = "rbxassetid://" .. tostring(hits[math.random(1,#hits)])
- hit.Parent = fake
- hit.Volume = 1
- local bouncing = false
- local activated = false
- fake.Touched:Connect(function(obj)
- if obj and not bouncing then
- bouncing = true
- hit.SoundId = "rbxassetid://" .. tostring(hits[math.random(1,#hits)])
- hit:Play()
- spawn(function()
- wait(.1)
- bouncing = false
- end)
- if not activated then
- activated = true
- spawn(function()
- wait(2)
- smoke(junk,fake.Position)
- fake:Destroy()
- pag:Destroy()
- end)
- end
- end
- end)
- end
- tool.Equipped:Connect(function()
- equipped = true
- end)
- tool.Unequipped:Connect(function()
- equipped = false
- end)
- local remote = script:FindFirstChild('RemoteEvent') or Instance.new("RemoteEvent")
- remote.Parent = plr:FindFirstChildOfClass("Backpack")
- remote.OnServerEvent:Connect(function(lplr,data)
- if plr == lplr and data then else return end
- if equipped and not using then
- using = true
- throw(data)
- amount -= 1
- if 0 >= amount then
- tool:Destroy()
- end
- wait(0.25)
- using = false
- end
- end)
- NLS([[
- local mouse = game:GetService("Players").LocalPlayer:GetMouse()
- local remote = script.Parent
- mouse.Button1Down:Connect(function()
- remote:FireServer(mouse.Hit.p)
- end)
- ]],remote)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement