Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- warn("Made by Subaru112")
- Mouse = game:GetService("Players").MrSlakyx:GetMouse()
- local FlameThrower = Instance.new("Model",owner.Character)
- local doomwe = Instance.new("Part",FlameThrower)
- doomwe.Name = "DoomW"
- doomwe.Size = Vector3.new(1.474, 0.309, 0.48)
- ArtificialHB = Instance.new("BindableEvent", script)
- ArtificialHB.Name = "Heartbeat"
- script:WaitForChild("Heartbeat")
- frame = 0.03333333333333
- tf = 0
- allowframeloss = false
- tossremainder = false
- lastframe = tick()
- script.Heartbeat:Fire()
- game:GetService("RunService").Heartbeat:connect(function(s, p)
- tf = tf + s
- if tf >= frame then
- if allowframeloss then
- script.Heartbeat:Fire()
- lastframe = tick()
- else
- for i = 1, math.floor(tf / frame) do
- script.Heartbeat:Fire()
- end
- lastframe = tick()
- end
- if tossremainder then
- tf = 0
- else
- tf = tf - frame * math.floor(tf / frame)
- end
- end
- end)
- function swait(num)
- if num == 0 or num == nil then
- ArtificialHB.Event:wait()
- else
- for i = 0, num do
- ArtificialHB.Event:wait()
- end
- end
- end
- function rayCast(Position, Direction, Range, Ignore)
- return game:service("Workspace"):FindPartOnRay(Ray.new(Position, Direction.unit * (Range or 999.999)), Ignore)
- end
- local sine = 0
- local change = 1
- function GetDudesTorso(c)
- local torsy = (c:findFirstChild("Torso") or c:findFirstChild("UpperTorso"))
- if torsy ~= nil then
- return torsy
- end
- end
- local plr = game:GetService("Players").MrSlakyx
- local char = plr.Character
- local chara = plr.Character
- local RootPart = chara.HumanoidRootPart
- local RootJoint = RootPart.RootJoint
- local Create = LoadLibrary("RbxUtility").Create
- local debby = game:GetService("Debris")
- local Humanoid = char:FindFirstChildOfClass("Humanoid")
- local Torso,Head,LeftArm,RightArm,LeftLeg,RightLeg,Root = char.Torso,char.Head,char["Left Arm"],char["Right Arm"],char["Left Leg"],char["Right Leg"],char.HumanoidRootPart
- local neck,RH,LH,rootj,RS,LS = Torso.Neck,Torso["Right Hip"],Torso["Left Hip"],Root.RootJoint,Torso["Right Shoulder"],Torso["Left Shoulder"]
- local rootjn,neckn,RHn,LHn,LSn,RSn = rootj.C0,neck.C0,RH.C0,LH.C0,LS.C0,RS.C0
- local mus = Instance.new("Sound",char)
- local timepos = nil
- Humanoid.WalkSpeed = 16
- Humanoid.Animator.Parent = nil
- chara.Animate.Parent = nil
- local attack = false
- local Anim = 'Idle'
- local Torsovelocity = (RootPart.Velocity * Vector3.new(1, 0, 1)).magnitude
- local velocity = RootPart.Velocity.y
- local newMotor = function(part0, part1, c0, c1)
- local w = Create('Motor'){
- Parent = part0,
- Part0 = part0,
- Part1 = part1,
- C0 = c0,
- C1 = c1,
- }
- return w
- end
- function clerp(a, b, t)
- return a:lerp(b, t)
- end
- RootCF = CFrame.fromEulerAnglesXYZ(-1.57, 0, 3.14)
- NeckCF = CFrame.new(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
- local RW = newMotor(Torso, RightArm, CFrame.new(1.5, 0, 0), CFrame.new(0, 0, 0))
- local LW = newMotor(Torso, LeftArm, CFrame.new(-1.5, 0, 0), CFrame.new(0, 0, 0))
- local RH = newMotor(Torso, RightLeg, CFrame.new(.5, -2, 0), CFrame.new(0, 0, 0))
- local LH = newMotor(Torso, LeftLeg, CFrame.new(-.5, -2, 0), CFrame.new(0, 0, 0))
- local FT = newMotor(RightArm, FlameThrower.DoomW, CFrame.new(-0.845115662, -1.07144165, -0.53030777, -0.866025388, -0.249999985, 0.433012724, -0.5, 0.433012664, -0.75, 0, -0.866025448, -0.49999997), CFrame.new(0, 0, 0))
- RootJoint.C1 = CFrame.new(0, 0, 0)
- RootJoint.C0 = CFrame.new(0, 0, 0)
- Torso.Neck.C1 = CFrame.new(0, 0, 0)
- Torso.Neck.C0 = CFrame.new(0, 1.5, 0)
- local rarmc1 = RW.C1
- local larmc1 = LW.C1
- local rlegc1 = RH.C1
- local llegc1 = LH.C1
- local resetc1 = false
- function PlayAnimationFromTable(table, speed, bool)
- RootJoint.C0 = clerp(RootJoint.C0, table[1], speed)
- Torso.Neck.C0 = clerp(Torso.Neck.C0, table[2], speed)
- RW.C0 = clerp(RW.C0, table[3], speed)
- LW.C0 = clerp(LW.C0, table[4], speed)
- RH.C0 = clerp(RH.C0, table[5], speed)
- LH.C0 = clerp(LH.C0, table[6], speed)
- FT.C0 = clerp(FT.C0, table[7], speed)
- if bool == true then
- if resetc1 == false then
- resetc1 = true
- RootJoint.C1 = RootJoint.C1
- Torso.Neck.C1 = Torso.Neck.C1
- RW.C1 = rarmc1
- LW.C1 = larmc1
- RH.C1 = rlegc1
- LH.C1 = llegc1
- end
- end
- end
- local debounce = true
- local dmgg = FlameThrower.Damageg
- local dmgt = dmgg.DMG
- function Dmg(dude)
- if dude and dude ~= chara and debounce == true then
- debounce = false
- local enemy = dude:FindFirstChildOfClass("Humanoid")
- local damage = math.random(1,10)
- enemy.Health = enemy.Health - damage
- if dude:FindFirstChild("Head") then
- dmgg.Enabled = true
- dmgg.Adornee = dude:FindFirstChild("Head")
- dmgt.Text = "-"..damage
- end
- local kill = math.random(1,60)
- if kill == 60 then
- if enemy then
- enemy:Destroy()
- end
- end
- if enemy.Health <= 50 then
- for i,v in pairs(dude:GetChildren()) do
- if v.ClassName == "Part" or v.ClassName == "MeshPart" then
- v.BrickColor = BrickColor.new("Really black")
- end
- if v.ClassName == "Shirt" or v.ClassName == "Pants" or v.ClassName == "Accessory" or v.ClassName == "Hat" then
- v:Destroy()
- end
- end
- end
- if enemy.Health <= 10 then
- enemy.JumpPower = 80
- enemy.Jump = true
- end
- wait(0.3)
- debounce = true
- dmgg.Enabled = false
- dmgg.Adornee = nil
- end
- end
- function MagnitudeDmg(par,magni)
- for _, c in pairs(workspace:GetDescendants()) do
- local hum = c:FindFirstChildOfClass("Humanoid")
- if hum ~= nil then
- local head = GetDudesTorso(c)
- if head ~= nil then
- local targ = head.Position - par.Position
- local mag = targ.magnitude
- if magni >= mag and c ~= chara then
- Dmg(c)
- end
- end
- end
- end
- end
- hold = false
- Mouse.Button1Down:connect(function()
- hold = true
- end)
- Mouse.Button1Up:connect(function()
- hold = false
- end)
- function shoot()
- attack = true
- Humanoid.WalkSpeed = 2
- attack = false
- end
- function Flame()
- MagnitudeDmg(FlameThrower.End,3)
- end
- while game:GetService("RunService").Heartbeat:Wait() do
- Torsovelocity = (RootPart.Velocity * Vector3.new(1, 0, 1)).magnitude
- velocity = RootPart.Velocity.y
- sine = sine + change
- local hit, pos = rayCast(RootPart.Position, (CFrame.new(RootPart.Position, RootPart.Position - Vector3.new(0, 1, 0))).lookVector, 4, chara)
- if RootPart.Velocity.y > 1 and hit == nil then
- Anim = "Jump"
- if attack == false then
- PlayAnimationFromTable({
- CFrame.new(0, 0.0382082276, -0.0403150208, 1, 0, 0, 0, 0.984807849, 0.173647985, 0, -0.173647985, 0.984807849),
- CFrame.new(0, 1.46579528, 0.0939689279, 1, 0, 0, 0, 0.939692855, -0.342019796, 0, 0.342019796, 0.939692855),
- CFrame.new(1.20945489, -0.213504896, 3.55388607e-07, 0.939692736, 0.342019916, 1.53461215e-07, -0.342019945, 0.939692736, 1.93715096e-07, -8.56816769e-08, -2.23517418e-07, 1.00000012),
- CFrame.new(-1.20945573, -0.213503733, 5.0439985e-07, 0.939692736, -0.342019916, -1.53461215e-07, 0.342019945, 0.939692736, 1.93715096e-07, 8.56816769e-08, -2.23517418e-07, 1.00000012),
- CFrame.new(0.5, -1.99739456, -0.0180913229, 1, 0, 0, 0, 1.00000012, 0, 0, 0, 1.00000012),
- CFrame.new(-0.5, -1.30000103, -0.39999947, 1, 0, 0, 0, 0.939692676, 0.342020601, 0, -0.342020601, 0.939692676),
- CFrame.new(-0.845115662, -1.07144165, -0.53030777, -0.866025388, -0.249999985, 0.433012724, -0.5, 0.433012664, -0.75, 0, -0.866025448, -0.49999997),
- }, .3, false)
- end
- elseif RootPart.Velocity.y < -1 and hit == nil then
- Anim = "Fall"
- if attack == false then
- PlayAnimationFromTable({
- CFrame.new(0, -0.0646628663, 0.0399149321, 1, 0, 0, 0, 0.984807849, -0.173647985, 0, 0.173647985, 0.984807849),
- CFrame.new(0, 1.4913609, -0.128171027, 1, 0, 0, 0, 0.939692855, 0.342019796, 0, -0.342019796, 0.939692855),
- CFrame.new(1.55285025, 0.466259956, -9.26282269e-08, 0.766043842, -0.642788351, -6.46188241e-08, 0.642788291, 0.766043961, -7.4505806e-08, 1.04308128e-07, 1.49011612e-08, 1.00000012),
- CFrame.new(-1.5605253, 0.475036323, -2.10609159e-07, 0.766043842, 0.642788351, 6.46188241e-08, -0.642788291, 0.766043961, -7.4505806e-08, -1.04308128e-07, 1.49011612e-08, 1.00000012),
- CFrame.new(0.500000954, -1.9973948, -0.0180922765, 1, 0, 0, 0, 1.00000012, 0, 0, 0, 1.00000012),
- CFrame.new(-0.499999046, -1.30000043, -0.400000483, 1, 0, 0, 0, 0.939692855, 0.342019796, 0, -0.342019796, 0.939692855),
- CFrame.new(-0.845115662, -1.07144165, -0.53030777, -0.866025388, -0.249999985, 0.433012724, -0.5, 0.433012664, -0.75, 0, -0.866025448, -0.49999997),
- }, .3, false)
- end
- elseif Torsovelocity < 1 and hit ~= nil then
- Anim = "Idle"
- if attack == false then
- change = 1
- PlayAnimationFromTable({
- CFrame.new(-0.0769465268, -7.7815578e-08, -0.031559173, 0.939695537, 1.01607293e-06, 0.342021346, 7.9855522e-07, 1.00000191, 5.12654879e-07, -0.342019558, 2.16066837e-07, 0.939692855) * CFrame.new(0,.05 * math.cos((sine)/10), 0),
- CFrame.new(0.0615186803, 1.4999913, 0.0559706129, 0.939695537, 7.9855522e-07, -0.342019558, 1.01607293e-06, 1.00000191, 2.16066837e-07, 0.342021346, 5.12654879e-07, 0.939692855),
- CFrame.new(1.2267952, 0.283012867, -0.709815979, 0.866025388, 0.5, 0, -0.249999985, 0.433012664, -0.866025448, -0.433012724, 0.75, 0.49999997) * CFrame.new(0, 0, -.05 * math.cos((sine)/25)),
- CFrame.new(-1.12679291, 0.172679424, -0.727638245, 0.866025388, -0.5, 0, 0.321393758, 0.556670308, -0.766044497, 0.383022249, 0.663414001, 0.642787516) * CFrame.new(0, 0, -.05 * math.cos((sine)/25)),
- CFrame.new(0.5, -2, 0, 0.984807789, 0, -0.17364797, 0, 1, 0, 0.17364797, 0, 0.984807789) * CFrame.new(0,-.05 * math.cos((sine)/10), 0),
- CFrame.new(-0.5, -2, 0, 0.98480773, 0, 0.173648179, 0, 1, 0, -0.173648179, 0, 0.98480773) * CFrame.new(0,-.05 * math.cos((sine)/10), 0),
- CFrame.new(-0.845115662, -1.07144165, -0.53030777, -0.866025388, -0.249999985, 0.433012724, -0.5, 0.433012664, -0.75, 0, -0.866025448, -0.49999997),
- }, .3, false)
- else
- Humanoid.WalkSpeed = 13
- PlayAnimationFromTable({
- CFrame.new(0, 0, 0, 0.342019528, 1.77958145e-06, -0.939692795, 3.40915449e-06, 1.00000191, -6.52960921e-07, 0.93969065, 2.98023178e-06, 0.342019796),
- CFrame.new(0, 1.50000906, 1.14440918e-05, 0.173647419, -2.75033563e-06, 0.984805226, 6.04339357e-06, 1.00000226, 1.03842858e-05, -0.984807909, 2.48085234e-06, 0.173647329),
- CFrame.new(1.00930023, 0.257047653, -0.754802704, 0.642785251, 0.766046405, 7.68762584e-06, -0.383019745, 0.321398407, -0.866024792, -0.663417637, 0.556665003, 0.500001073),
- CFrame.new(-1.0977478, 0.360425472, -0.348266602, 0.984804809, -0.173665076, 2.0735275e-05, 0.111646183, 0.63302201, -0.766040623, 0.133021384, 0.754402816, 0.642792106),
- CFrame.new(0.499977112, -1.96527863, 0.00304412842, -5.06639481e-07, -2.75193088e-06, 0.999997497, 4.16326839e-06, 1.00000226, 1.1278622e-05, -1, 2.49612867e-06, -1.07288361e-06),
- CFrame.new(-0.500015259, -1.96529007, 0.00304031372, -5.36441803e-07, -2.75543152e-06, 0.999997377, 4.16326839e-06, 1.00000226, 1.1278622e-05, -1, 2.49485447e-06, -1.10268593e-06),
- CFrame.new(-0.845115662, -1.07144165, -0.53030777, -0.866025388, -0.249999985, 0.433012724, -0.5, 0.433012664, -0.75, 0, -0.866025448, -0.49999997),
- }, .3, false)
- end
- elseif Torsovelocity > 2 and hit ~= nil then
- Anim = "Walk"
- if attack == false then
- Humanoid.WalkSpeed = 25
- PlayAnimationFromTable({
- CFrame.new(0, 0, 0, 1, 9.17673447e-07, -8.02856235e-08, 8.89790499e-07, 0.984808445, 0.173649818, -2.38418238e-07, -0.173646539, 0.984807014) * CFrame.new(0, 0- .08 * math.cos((sine) / 2.5), 0) * CFrame.Angles(0, 0, 0),
- CFrame.new(0, 1.50000191, 1.52587891e-05, 1, 2.66937332e-06, -7.15249428e-07, 2.75302136e-06, 0.984809875, -0.173643038, -2.40851961e-07, 0.173652872, 0.984805584),
- CFrame.new(1.2267952, 0.283012867, -0.709815979, 0.866025388, 0.5, 0, -0.249999985, 0.433012664, -0.866025448, -0.433012724, 0.75, 0.49999997),
- CFrame.new(-1.12679291, 0.172679424, -0.727638245, 0.866025388, -0.5, 0, 0.321393758, 0.556670308, -0.766044497, 0.383022249, 0.663414001, 0.642787516),
- CFrame.new(0.5, -1.9652729, -0.196968079, 0.99999994, 2.70645933e-06, -5.04924287e-07, 2.75569232e-06, 0.984809816, -0.173643261, -4.67347405e-07, 0.173653096, 0.984805524) * CFrame.new(0, 0, 0+ .5 * math.cos((sine) / 5)) * CFrame.Angles(math.rad(0 - 30 * math.cos((sine) / 5)), 0, 0),
- CFrame.new(-0.5, -1.96527576, -0.196968079, 1, 2.70645933e-06, -5.04924287e-07, 2.75569232e-06, 0.984809816, -0.173643261, -4.67347434e-07, 0.173653096, 0.984805524) * CFrame.new(0, 0, 0- .5 * math.cos((sine) / 5)) * CFrame.Angles(math.rad(0 + 30 * math.cos((sine) / 5)), 0, 0),
- CFrame.new(-0.845115662, -1.07144165, -0.53030777, -0.866025388, -0.249999985, 0.433012724, -0.5, 0.433012664, -0.75, 0, -0.866025448, -0.49999997),
- }, .3, false)
- else
- Humanoid.WalkSpeed = 13
- PlayAnimationFromTable({
- CFrame.new(0, 0, 0, 0.342019528, 1.77958145e-06, -0.939692795, 3.40915449e-06, 1.00000191, -6.52960921e-07, 0.93969065, 2.98023178e-06, 0.342019796),
- CFrame.new(0, 1.50000906, 1.14440918e-05, 0.173647419, -2.75033563e-06, 0.984805226, 6.04339357e-06, 1.00000226, 1.03842858e-05, -0.984807909, 2.48085234e-06, 0.173647329),
- CFrame.new(1.00930023, 0.257047653, -0.754802704, 0.642785251, 0.766046405, 7.68762584e-06, -0.383019745, 0.321398407, -0.866024792, -0.663417637, 0.556665003, 0.500001073),
- CFrame.new(-1.0977478, 0.360425472, -0.348266602, 0.984804809, -0.173665076, 2.0735275e-05, 0.111646183, 0.63302201, -0.766040623, 0.133021384, 0.754402816, 0.642792106),
- CFrame.new(0.499946594, -1.96528363, 0.00305938721, 0.999997497, 5.77095943e-06, -5.96046448e-08, 2.75191974e-06, 1.00000238, -5.7956895e-06, -5.06639481e-07, 4.16327566e-06, 1.00000012) * CFrame.new(0, 0, 0+ .5 * math.cos((sine) / 5)) * CFrame.Angles(math.rad(0 - 30 * math.cos((sine) / 5)), 0, 0),
- CFrame.new(-0.500030518, -1.96530366, 0.00305175781, 0.999997497, 5.76745924e-06, -2.98023224e-08, 2.75541925e-06, 1.00000238, -5.7956895e-06, -5.36441803e-07, 4.16327566e-06, 1.00000012) * CFrame.new(0, 0, 0- .5 * math.cos((sine) / 5)) * CFrame.Angles(math.rad(0 + 30 * math.cos((sine) / 5)), 0, 0),
- CFrame.new(-0.845115662, -1.07144165, -0.53030777, -0.866025388, -0.249999985, 0.433012724, -0.5, 0.433012664, -0.75, 0, -0.866025448, -0.49999997),
- }, .3, false)
- end
- end
- if hold == true then
- for i,v in pairs(FlameThrower.Fire:GetChildren()) do
- if v.Name == "off" then
- v.Enabled = false
- end
- end
- for i,v in pairs(FlameThrower.Fire:GetChildren()) do
- if v.Name == "on" then
- v.Enabled = true
- end
- end
- spawn(Flame)
- attack = true
- else
- attack = false
- for i,v in pairs(FlameThrower.Fire:GetChildren()) do
- if v.Name == "off" then
- v.Enabled = true
- end
- end
- for i,v in pairs(FlameThrower.Fire:GetChildren()) do
- if v.Name == "on" then
- v.Enabled = false
- end
- end
- end
- if mus.Parent == char then
- mus.SoundId = "rbxassetid://153381341"
- mus.Volume = 1
- mus.Pitch = 1
- mus.Playing = true
- mus.Looped = true
- timepos = mus.TimePosition
- else
- mus = Instance.new("Sound",char)
- mus.TimePosition = timepos
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement