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 = "Incendiary Grenade"
- Tool0.Parent = plr:FindFirstChild("Backpack")
- Part1.Name = "Handle"
- Part1.Parent = Tool0
- Part1.Size = Vector3.new(0.579, 1.402, 0.627)
- 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://454822101"
- SpecialMesh2.Scale = Vector3.new(0.003, 0.003, 0.003)
- SpecialMesh2.TextureId = "rbxassetid://454822102"
- SpecialMesh2.MeshType = Enum.MeshType.FileMesh
- local tool = Tool0
- local handle = Part1
- local id = math.random(-999999,999999)
- 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
- local hitsound2 = Instance.new("Sound")
- hitsound2.SoundId = 'rbxassetid://3362346832'
- hitsound2.Volume = 1
- hitsound2.Parent = handle
- function effect(par,tarhum,weld,cid)
- if not par:FindFirstChild(plr.Name .. 'fire dmg' .. cid) then
- local fireconfirm = Instance.new("IntValue",par)
- fireconfirm.Name = (plr.Name .. 'fire dmg' .. cid)
- fireconfirm.Parent = par
- debris:AddItem(fireconfirm,0.2)
- for i,v in pairs(par:GetChildren()) do
- if (v:IsA("Part") or v:IsA("WedgePart") or v:IsA("BasePart") or v:IsA("MeshPart") or v:IsA("UnionOperation")) and v.Name ~= "effects" then
- local fire = Instance.new("Fire")
- fire.Parent = v
- debris:AddItem(fire,0.2)
- end
- end
- local clonehit = hitsound2:Clone()
- clonehit.Parent = weld
- clonehit:Play()
- tarhum:TakeDamage(8)
- if 0 >= tarhum.Health and not tarhum:FindFirstChild("killer") then
- local tempkillval = Instance.new("ObjectValue",tarhum)
- tempkillval.Name = "killer"
- tempkillval.Value = plr
- end
- end
- end
- function boom(par,pos,cid)
- local Part0 = Instance.new("Part")
- local ParticleEmitter1 = Instance.new("ParticleEmitter")
- local ParticleEmitter2 = Instance.new("ParticleEmitter")
- Part0.Name = "Fire"
- 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
- ParticleEmitter1.Parent = Part0
- ParticleEmitter1.Speed = NumberRange.new(5, 7)
- ParticleEmitter1.Rotation = NumberRange.new(4, 9)
- ParticleEmitter1.Color = ColorSequence.new(Color3.new(1, 0.333333, 0),Color3.new(0.364706, 0, 0))
- ParticleEmitter1.LightEmission = 0.86000001430511
- ParticleEmitter1.Texture = "http://www.roblox.com/asset/?id=248625108"
- ParticleEmitter1.Transparency = NumberSequence.new(0,0.54374998807907,0.73749995231628,0,0.72500002384186,0.45625001192093,0.63749998807907,0,0.52499997615814,0)
- ParticleEmitter1.Size = NumberSequence.new(0.30000001192093,0.30000001192093)
- ParticleEmitter1.Lifetime = NumberRange.new(50, 50)
- ParticleEmitter1.LockedToPart = true
- ParticleEmitter1.Rate = 70
- ParticleEmitter1.RotSpeed = NumberRange.new(5, 9)
- ParticleEmitter1.SpreadAngle = Vector2.new(28, 28)
- ParticleEmitter1.VelocitySpread = 28
- ParticleEmitter2.Parent = Part0
- ParticleEmitter2.Speed = NumberRange.new(5, 7)
- ParticleEmitter2.Rotation = NumberRange.new(4, 9)
- ParticleEmitter2.Color = ColorSequence.new(Color3.new(1, 0.333333, 0),Color3.new(0.364706, 0, 0))
- ParticleEmitter2.LightEmission = 0.86000001430511
- ParticleEmitter2.Texture = "http://www.roblox.com/asset/?id=248625108"
- ParticleEmitter2.Transparency = NumberSequence.new(0,0.54374998807907,0.73749995231628,0,0.72500002384186,0.45625001192093,0.63749998807907,0,0.52499997615814,0)
- ParticleEmitter2.Size = NumberSequence.new(3.3125,2.8125,2.6875,2.5624995231628,2.3125,2.1875,1.7500001192093,0.43749988079071,0.12499988079071)
- ParticleEmitter2.Lifetime = NumberRange.new(2, 2)
- ParticleEmitter2.LockedToPart = true
- ParticleEmitter2.Rate = 70
- ParticleEmitter2.RotSpeed = NumberRange.new(5, 9)
- ParticleEmitter2.SpreadAngle = Vector2.new(28, 28)
- ParticleEmitter2.VelocitySpread = 28
- play(explosions[math.random(1,#explosions)],Part0,1)
- local fire = play('269252174',Part0,2,1,true)
- debris:AddItem(fire,8)
- local hitbox = Instance.new("Part",Part0)
- hitbox.Name = "fire hit"
- 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()
- ParticleEmitter1.Enabled = true
- ParticleEmitter2.Enabled = true
- wait(7.5)
- ParticleEmitter1.Enabled = false
- ParticleEmitter2.Enabled = false
- debris:AddItem(Part0,8)
- 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
- local targchar,tarhum,targtorso
- pcall(function()
- targchar = obj.Parent
- end)
- pcall(function()
- tarhum = targchar:FindFirstChildOfClass("Humanoid")
- end)
- pcall(function()
- targtorso = targchar:FindFirstChild("HumanoidRootPart") or targchar:FindFirstChild("Torso")
- end)
- if targchar and tarhum and tarhum.Parent and targtorso and targtorso.Parent then
- if not targchar:FindFirstChild(plr.Name .. 'fire dmg' .. cid) and obj.Parent:IsA("Model") then
- effect(targchar,tarhum,obj.Parent.PrimaryPart,cid)
- end
- end
- end
- wait(0.2)
- end
- end)
- end
- function throw(mpos)
- id = id + 1
- local cid = id
- 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('2555281965',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)
- boom(junk,fake.Position,cid)
- 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