Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local Player = owner
- script.Name = "Flamethrower"
- wait(0.25)
- if Player == nil then script:Destroy() return end
- repeat wait() until Player.Character
- local Character = Player.Character
- local Damage = 1
- local AfterburnDamage = 2
- local LoggedDamage = Damage
- local LoggedAfterburnDamage = AfterburnDamage
- local SuperValue = 0
- local CanHit = false
- local Super = false
- local Tool = Instance.new("Tool",Player.Backpack)
- Tool.Name = "Flamethrower"
- Tool.ToolTip = "Roast those noobs!"
- Tool.TextureId = "rbxasset://textures/particles/explosion01_core_main.dds"
- Tool.Grip = CFrame.new(-0.400000006, -0.400000006, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
- local Flamethrower = Instance.new("Part",Tool)
- Flamethrower.Name = "Handle"
- Flamethrower.BrickColor = BrickColor.new("CGA brown")
- Flamethrower.Material = Enum.Material.Neon
- Flamethrower.Shape = Enum.PartType.Cylinder
- Flamethrower.Size = Vector3.new(3,1,1)
- Flamethrower.CanCollide = false
- Flamethrower.Massless = true
- local FlameParticle1 = Instance.new("ParticleEmitter",Flamethrower)
- local FlameParticle1KeypointsSize = {
- NumberSequenceKeypoint.new(0,0),
- NumberSequenceKeypoint.new(0.8,2.5),
- NumberSequenceKeypoint.new(1,0)
- }
- local FlameParticleKeypointsTransparency = {
- NumberSequenceKeypoint.new(0,0),
- NumberSequenceKeypoint.new(1,1)
- }
- FlameParticle1.Size = NumberSequence.new(FlameParticle1KeypointsSize)
- FlameParticle1.Transparency = NumberSequence.new(FlameParticleKeypointsTransparency)
- FlameParticle1.Color = ColorSequence.new(Color3.fromRGB(255,60,0))
- FlameParticle1.LightInfluence = 0
- FlameParticle1.LightEmission = 0.5
- FlameParticle1.Texture = "rbxassetid://2070896802"
- FlameParticle1.RotSpeed = NumberRange.new(1000)
- FlameParticle1.EmissionDirection = Enum.NormalId.Right
- FlameParticle1.Speed = NumberRange.new(40)
- FlameParticle1.Lifetime = NumberRange.new(0.25)
- FlameParticle1.Rate = 100
- FlameParticle1.Enabled = false
- local FlameParticle2 = Instance.new("ParticleEmitter",Flamethrower)
- local FlameParticle2KeypointsSize = {
- NumberSequenceKeypoint.new(0,0),
- NumberSequenceKeypoint.new(0.85,1),
- NumberSequenceKeypoint.new(1,0)
- }
- FlameParticle2.Size = NumberSequence.new(FlameParticle2KeypointsSize)
- FlameParticle2.Transparency = NumberSequence.new(FlameParticleKeypointsTransparency)
- FlameParticle2.Color = ColorSequence.new(Color3.fromRGB(255,255,0))
- FlameParticle2.LightInfluence = 0
- FlameParticle2.LightEmission = 0.5
- FlameParticle2.Texture = "rbxassetid://2070896802"
- FlameParticle2.RotSpeed = NumberRange.new(1000)
- FlameParticle2.EmissionDirection = Enum.NormalId.Right
- FlameParticle2.Speed = NumberRange.new(30)
- FlameParticle2.Lifetime = NumberRange.new(0.25)
- FlameParticle2.Rate = 120
- FlameParticle2.Enabled = false
- local Sparkles = Instance.new("ParticleEmitter",Flamethrower)
- local SparklesKeypointsSize = {
- NumberSequenceKeypoint.new(0,2),
- NumberSequenceKeypoint.new(1,0)
- }
- Sparkles.Size = NumberSequence.new(SparklesKeypointsSize)
- Sparkles.SpreadAngle = Vector2.new(50000000,5e+07)
- Sparkles.Color = ColorSequence.new(Color3.fromRGB(0,200,0))
- Sparkles.LightEmission = 0.5
- Sparkles.LightInfluence = 0
- Sparkles.Lifetime = NumberRange.new(1)
- Sparkles.Speed = NumberRange.new(10)
- Sparkles.LockedToPart = true
- Sparkles.Enabled = false
- local Hitbox = Instance.new("Part",Flamethrower)
- Hitbox.Transparency = 1
- Hitbox.Size = Vector3.new(2.25,2.25,7.5)
- Hitbox.CanCollide = false
- Hitbox.Massless = true
- local HitboxWeld = Instance.new("Weld",Hitbox)
- HitboxWeld.Part1 = Hitbox
- HitboxWeld.Part0 = Flamethrower
- HitboxWeld.C1 = CFrame.new(0, 0, -5.24999952, 1.66860048e-07, 1, 3.08536414e-08, -2.98023224e-08, -3.08536343e-08, 1, 1, -1.66860048e-07, 2.98023153e-08)
- local SuperHitbox = Instance.new("Part",Flamethrower)
- SuperHitbox.Transparency = 1
- SuperHitbox.Size = Vector3.new(7.5,7.5,18)
- SuperHitbox.CanCollide = false
- SuperHitbox.Massless = true
- local SuperHitboxWeld = Instance.new("Weld",SuperHitbox)
- SuperHitboxWeld.Part1 = SuperHitbox
- SuperHitboxWeld.Part0 = Flamethrower
- SuperHitboxWeld.C1 = CFrame.new(0.25, -0.125, -10.625, 1.66860048e-07, 1, 3.08536414e-08, -2.98023224e-08, -3.08536343e-08, 1, 1, -1.66860048e-07, 2.98023153e-08)
- local Connection = Hitbox.Touched:Connect(function() end)
- local Connection2 = SuperHitbox.Touched:Connect(function() end)
- Tool.Activated:Connect(function()
- FlameParticle1.Enabled = true
- FlameParticle2.Enabled = true
- Flamethrower.BrickColor = BrickColor.new("Neon orange")
- local Sound = Instance.new("Sound",Flamethrower)
- Sound.Looped = true
- Sound.SoundId = "rbxassetid://346067083"
- Sound.Volume = 5
- Sound:Play()
- CanHit = true
- Super = false
- SuperValue = 0
- end)
- Tool.Deactivated:Connect(function()
- FlameParticle1.Enabled = false
- FlameParticle2.Enabled = false
- Flamethrower.BrickColor = BrickColor.new("CGA brown")
- Flamethrower.Sound:Destroy()
- CanHit = false
- Super = false
- SuperValue = 0
- end)
- Tool.Unequipped:Connect(function()
- SuperValue = 0
- for i,v in pairs(Flamethrower:GetChildren()) do
- if v:IsA("Sound") then
- v:Destroy()
- end
- end
- CanHit = false
- Super = false
- SuperValue = 0
- Flamethrower.BrickColor = BrickColor.new("CGA brown")
- FlameParticle1.Enabled = false
- FlameParticle2.Enabled = false
- end)
- function Burn(Target)
- local Torso = Target:FindFirstChild("HumanoidRootPart") or Target:FindFirstChild("Torso") or Target:FindFirstChild("UpperTorso")
- Target:FindFirstChildWhichIsA("Humanoid").Health = Target:FindFirstChildWhichIsA("Humanoid").Health-Damage
- if not Torso:FindFirstChild("Burning") and not Torso:FindFirstChild("SuperBurning") then
- local Burning = FlameParticle1:Clone()
- local BurningKeypointsSize = {
- NumberSequenceKeypoint.new(0,0),
- NumberSequenceKeypoint.new(0.8,0.9),
- NumberSequenceKeypoint.new(1,0)
- }
- Burning.Size = NumberSequence.new(BurningKeypointsSize)
- Burning.Parent = Torso
- Burning.SpreadAngle = Vector2.new(1000,1000)
- Burning.Rate = 200
- Burning.Speed = NumberRange.new(10)
- Burning.Name = "Burning"
- game.Debris:AddItem(Burning,7)
- local Sound = Instance.new("Sound",Torso)
- Sound.Looped = true
- Sound.SoundId = "rbxassetid://1301200629"
- Sound:Play()
- game.Debris:AddItem(Sound,7)
- while Torso:FindFirstChild("Burning") do
- wait(.5)
- Target.Humanoid:TakeDamage(AfterburnDamage)
- end
- end
- end
- function SuperBurn(Target)
- local Torso = Target:FindFirstChild("HumanoidRootPart") or Target:FindFirstChild("Torso") or Target:FindFirstChild("UpperTorso")
- Target:FindFirstChildWhichIsA("Humanoid").Health = Target:FindFirstChildWhichIsA("Humanoid").Health-Damage
- if not Torso:FindFirstChild("SuperBurning") then
- if Torso:FindFirstChild("Burning") then
- Torso.Burning:Destroy()
- end
- local SuperBurning = FlameParticle1:Clone()
- local SuperBurningKeypointsSize = {
- NumberSequenceKeypoint.new(0,0),
- NumberSequenceKeypoint.new(0.8,0.9),
- NumberSequenceKeypoint.new(1,0)
- }
- SuperBurning.Size = NumberSequence.new(SuperBurningKeypointsSize)
- SuperBurning.Parent = Torso
- SuperBurning.SpreadAngle = Vector2.new(1000,1000)
- SuperBurning.Rate = 400
- SuperBurning.Speed = NumberRange.new(10)
- SuperBurning.Name = "SuperBurning"
- SuperBurning.Color = ColorSequence.new(Color3.fromRGB(0,200,0))
- game.Debris:AddItem(SuperBurning,7)
- local Sound = Instance.new("Sound",Torso)
- Sound.Looped = true
- Sound.SoundId = "rbxassetid://1301200629"
- Sound.PlaybackSpeed = 1.25
- Sound:Play()
- game.Debris:AddItem(Sound,7)
- while Torso:FindFirstChild("SuperBurning") do
- wait(.5)
- Target.Humanoid:TakeDamage(AfterburnDamage)
- end
- end
- end
- spawn(function()
- while wait(.1) do
- if CanHit then
- if not Super then
- for i,v in pairs(Hitbox:GetTouchingParts()) do
- if v.Parent and v.Parent:FindFirstChildWhichIsA("Humanoid") and v.Parent.Name ~= Player.Name then
- spawn(function()
- Burn(v.Parent)
- end)
- end
- end
- elseif Super then
- for i,v in pairs(SuperHitbox:GetTouchingParts()) do
- if v.Parent and v.Parent:FindFirstChildWhichIsA("Humanoid") and v.Parent.Name ~= Player.Name then
- spawn(function()
- SuperBurn(v.Parent)
- end)
- end
- end
- end
- end
- end
- end)
- spawn(function()
- while wait(1) do
- if CanHit then
- SuperValue = SuperValue+1
- end
- end
- end)
- game:GetService("RunService").Heartbeat:Connect(function()
- if SuperValue == 5 then
- SuperValue = SuperValue+1
- Super = true
- Sparkles:Emit(500)
- Flamethrower.BrickColor = BrickColor.new("Lime green")
- local Sound = Instance.new("Sound",Tool)
- Sound.SoundId = "rbxasset://sounds/impact_explosion_03.mp3"
- Sound.Volume = 3
- Sound.PlaybackSpeed = 3
- Sound:Play()
- FlameParticle1.Color = ColorSequence.new(Color3.fromRGB(0,200,0))
- FlameParticle1.SpreadAngle = Vector2.new(20,20)
- FlameParticle1.Rate = 10000
- FlameParticle1.Speed = NumberRange.new(100)
- FlameParticle2.SpreadAngle = Vector2.new(10,10)
- FlameParticle2.Rate = 500
- FlameParticle2.Speed = NumberRange.new(75)
- game.Debris:AddItem(Sound,2)
- elseif SuperValue < 5 then
- Super = false
- FlameParticle1.Size = NumberSequence.new(FlameParticle1KeypointsSize)
- FlameParticle1.Transparency = NumberSequence.new(FlameParticleKeypointsTransparency)
- FlameParticle1.Color = ColorSequence.new(Color3.fromRGB(255,60,0))
- FlameParticle1.LightInfluence = 0
- FlameParticle1.LightEmission = 0.5
- FlameParticle1.Texture = "rbxassetid://2070896802"
- FlameParticle1.RotSpeed = NumberRange.new(1000)
- FlameParticle1.EmissionDirection = Enum.NormalId.Right
- FlameParticle1.Speed = NumberRange.new(40)
- FlameParticle1.Lifetime = NumberRange.new(0.25)
- FlameParticle1.Rate = 100
- FlameParticle1.SpreadAngle = Vector2.new(0,0)
- FlameParticle2.Size = NumberSequence.new(FlameParticle2KeypointsSize)
- FlameParticle2.Transparency = NumberSequence.new(FlameParticleKeypointsTransparency)
- FlameParticle2.Color = ColorSequence.new(Color3.fromRGB(255,255,0))
- FlameParticle2.LightInfluence = 0
- FlameParticle2.LightEmission = 0.5
- FlameParticle2.Texture = "rbxassetid://2070896802"
- FlameParticle2.RotSpeed = NumberRange.new(1000)
- FlameParticle2.EmissionDirection = Enum.NormalId.Right
- FlameParticle2.Speed = NumberRange.new(30)
- FlameParticle2.Lifetime = NumberRange.new(0.25)
- FlameParticle2.Rate = 120
- FlameParticle2.SpreadAngle = Vector2.new(0,0)
- end
- end)
- spawn(function()
- while wait(.1) do
- if CanHit then
- if Super then
- Damage = LoggedDamage*2
- AfterburnDamage = LoggedAfterburnDamage*2
- Flamethrower.Sound.PlaybackSpeed = 1.2
- elseif not Super then
- Damage = LoggedDamage
- AfterburnDamage = LoggedAfterburnDamage
- Flamethrower.Sound.PlaybackSpeed = 1
- end
- end
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement