Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- molotov = Instance.new("Tool",game.Players.LocalPlayer.Backpack)
- molotov.GripPos = Vector3.new(0,-0.20000000298023,0)
- molotov.Grip = CFrame.new(0,-0.20000000298023,0) * CFrame.Angles(-0.19739556312561, -1.2431163787842, -0)
- molotov.GripForward = Vector3.new(0.9467915892601,-0.063119441270828,-0.31559720635414)
- molotov.Name = "Molotov"
- molotov.GripRight = Vector3.new(0.32184725999832,0.18568110466003,0.92840552330017)
- molotov.GripUp = Vector3.new(0,0.98058068752289,-0.19611613452435)
- handle = Instance.new("Part",molotov)
- handle.FormFactor = Enum.FormFactor.Symmetric
- handle.TopSurface = Enum.SurfaceType.Smooth
- handle.Size = Vector3.new(1,1,1)
- handle.Name = "Handle"
- handle.CFrame = CFrame.new(18.502923965454,0.48202115297318,-21.500253677368) * CFrame.Angles(1.5719887018204, 1.5650086402893, -1.5725026130676)
- handle.BrickColor = BrickColor.new("Brown")
- handle.Friction = 0.30000001192093
- handle.BottomSurface = Enum.SurfaceType.Smooth
- fire = Instance.new("Sound",handle)
- fire.Name = "Fire"
- fire.SoundId = "rbxasset://sounds//swoosh.wav"
- mesh = Instance.new("SpecialMesh",handle)
- mesh.MeshId = "http://www.roblox.com/asset/?id=29690481"
- mesh.TextureId = "http://www.roblox.com/asset/?id=35971961"
- mesh.MeshType = Enum.MeshType.FileMesh
- fire = Instance.new("Fire",handle)
- fire.Heat = 10
- fire.Color = Color3.new(1, 0.521569, 0)
- fire.SecondaryColor = Color3.new(1, 0, 0)
- fire.Size = 2
- firemesh = Instance.new("SpecialMesh",molotov)
- firemesh.Scale = Vector3.new(0.10000000149012,0.050000000745058,0.10000000149012)
- firemesh.VertexColor = Vector3.new(2,2,2)
- firemesh.Name = "FireMesh"
- firemesh.MeshType = Enum.MeshType.FileMesh
- local prev
- local parts = molotov:GetChildren()
- for i = 1,#parts do
- if (parts[i].className == "Part") then
- if (prev ~= nil)then
- local weld = Instance.new("Weld")
- weld.Part0 = prev
- weld.Part1 = parts[i]
- weld.C0 = prev.CFrame:inverse()
- weld.C1 = parts[i].CFrame:inverse()
- weld.Parent = prev
- end
- prev = parts[i]
- end
- end
- Tool = molotov
- function fire(v)
- Tool.Handle.Fire:play()
- local vCharacter = Tool.Parent
- local vPlayer = game.Players:playerFromCharacter(vCharacter)
- local missile = Instance.new("Part")
- local spawnPos = vCharacter.PrimaryPart.Position
- Tool.GripPos = Vector3.new(0, 0.4, 0.5)
- vCharacter.Torso["Right Shoulder"].CurrentAngle = 3
- spawnPos = spawnPos + (v * 8)
- missile.Position = spawnPos
- missile.Size = Vector3.new(1,1,1)
- missile.Velocity = v * 50
- missile.BrickColor = BrickColor.new("Brown")
- local force = Instance.new("BodyForce")
- force.force = Vector3.new(0,100,0)
- force.Parent = missile
- Tool.Handle.Mesh:clone().Parent = missile
- missile.Parent = game.Workspace
- missile.Touched:connect(function() -- Make a function and call it too.
- ex = Instance.new("Explosion") -- Make explosion.
- ex.Position = missile.Position -- Move it to brick.
- ex.Parent = game.Workspace -- Make sure it's tangible!
- ex.BlastRadius = 4 -- Size of explosion.
- ex.BlastPressure = 5e+005 -- Power of it.
- end)
- 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
- local lookAt = (targetPos - character.Head.Position).unit
- fire(lookAt)
- wait(0.1)
- Tool.Parent = nil
- end
- molotov.Activated:connect(onActivated)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement