Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local Player = game:GetService("Players"):FindFirstChild(script.Name)
- script.Name = "Flamethrower"
- wait(0.25)
- if Player == nil then script:Destroy() return end
- repeat wait() until Player.Character
- local Character = Player.Character
- local Tool = Instance.new("Tool",Player.Backpack)
- local TweenService = game:GetService("TweenService")
- local Damage = 2
- local AfterburnDamage = 4
- local SpecialDamage = 5
- local SpecialAfterburnDamage = 8
- local Colors = {
- Color3.fromRGB(255,0,0),
- Color3.fromRGB(0,255,0),
- Color3.fromRGB(0,0,255)
- }
- local Intt = 0
- local CanHit = false
- local SuperValue = 0
- local Super = false
- 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,1))
- FlameParticle1.LightInfluence = 0
- FlameParticle1.LightEmission = 0.5
- FlameParticle1.Texture = "rbxassetid://2070896802"
- FlameParticle1.RotSpeed = NumberRange.new(360)
- 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(244,255,19))
- FlameParticle2.LightInfluence = 0
- FlameParticle2.LightEmission = 0.5
- FlameParticle2.Texture = "rbxassetid://2070896802"
- FlameParticle2.RotSpeed = NumberRange.new(360)
- FlameParticle2.EmissionDirection = Enum.NormalId.Right
- FlameParticle2.Speed = NumberRange.new(30)
- FlameParticle2.Lifetime = NumberRange.new(0.25)
- FlameParticle2.Rate = 120
- FlameParticle2.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 Connection = Hitbox.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
- end)
- Tool.Deactivated:Connect(function()
- FlameParticle1.Enabled = false
- FlameParticle2.Enabled = false
- Flamethrower.BrickColor = BrickColor.new("CGA brown")
- Flamethrower.Sound:Destroy()
- CanHit = false
- end)
- function Burn(Target)
- Target.Humanoid:TakeDamage(Damage)
- if not Target.HumanoidRootPart:FindFirstChild("Burning") 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 = Target.HumanoidRootPart
- 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",Target.HumanoidRootPart)
- Sound.Looped = true
- Sound.SoundId = "rbxassetid://1301200629"
- Sound:Play()
- game.Debris:AddItem(Sound,7)
- while Target.HumanoidRootPart:FindFirstChild("Burning") do
- wait(.5)
- Target.Humanoid:TakeDamage(AfterburnDamage)
- end
- end
- end
- spawn(function()
- while wait(.1) do
- if CanHit then
- for i,v in pairs(Hitbox:GetTouchingParts()) do
- if v.Parent and v.Parent:FindFirstChild("Humanoid") and v.Parent.Name ~= Player.Name then
- spawn(function()
- Burn(v.Parent)
- end)
- end
- end
- end
- end
- end)
- spawn(function()
- while wait(1) do
- if CanHit then
- SuperValue = SuperValue+1
- if SuperValue == 5 then
- Super = true
- end
- else
- SuperValue = 0
- end
- end
- end)
- spawn(function()
- while wait(0.5) do
- if Intt == #Colors then
- Intt = 0
- end
- Intt = Intt+1
- TweenService:Create(FlameParticle1,TweenInfo.new(1),{Color = Colors[Intt]}):Play()
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement