Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- warn("Made by Subaru112")
- Mouse = game:GetService("Players").Mediakiller7:GetMouse()
- 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
- --Effect Functions--
- Effects = {
- Block = function(cf,partsize,meshstart,meshadd,matr,colour,spin,inverse,factor)
- local p = Instance.new("Part",EffectModel)
- p.BrickColor = BrickColor.new(colour)
- p.Size = partsize
- p.Anchored = true
- p.CanCollide = false
- p.Material = matr
- p.CFrame = cf
- if inverse == true then
- p.Transparency = 1
- else
- p.Transparency = 0
- end
- local m = Instance.new("BlockMesh",p)
- m.Scale = meshstart
- coroutine.wrap(function()
- for i=0,1,factor do
- swait()
- if inverse == true then
- p.Transparency = 1-i
- else
- p.Transparency = i
- end
- m.Scale = m.Scale + meshadd
- if spin == true then
- p.CFrame = p.CFrame * CFrame.Angles(math.random(-50,50),math.random(-50,50),math.random(-50,50))
- end
- end
- p:Destroy()
- end)()
- return p
- end,
- Sphere = function(cf,partsize,meshstart,meshadd,matr,colour,inverse,factor)
- local p = Instance.new("Part",EffectModel)
- p.BrickColor = BrickColor.new(colour)
- p.Size = partsize
- p.Anchored = true
- p.CanCollide = false
- p.Material = matr
- p.CFrame = cf
- if inverse == true then
- p.Transparency = 1
- else
- p.Transparency = 0
- end
- local m = Instance.new("SpecialMesh",p)
- m.MeshType = "Sphere"
- m.Scale = meshstart
- coroutine.wrap(function()
- for i=0,1,factor do
- swait()
- if inverse == true then
- p.Transparency = 1-i
- else
- p.Transparency = i
- end
- m.Scale = m.Scale + meshadd
- end
- p:Destroy()
- end)()
- return p
- end,
- Cylinder = function(cf,partsize,meshstart,meshadd,matr,colour,inverse,factor)
- local p = Instance.new("Part",EffectModel)
- p.BrickColor = BrickColor.new(colour)
- p.Size = partsize
- p.Anchored = true
- p.CanCollide = false
- p.Material = matr
- p.CFrame = cf
- if inverse == true then
- p.Transparency = 1
- else
- p.Transparency = 0
- end
- local m = Instance.new("CylinderMesh",p)
- m.Scale = meshstart
- coroutine.wrap(function()
- for i=0,1,factor do
- swait()
- if inverse == true then
- p.Transparency = 1-i
- else
- p.Transparency = i
- end
- m.Scale = m.Scale + meshadd
- end
- p:Destroy()
- end)()
- return p
- end,
- Wave = function(cf,meshstart,meshadd,colour,spin,inverse,factor)
- local p = Instance.new("Part",EffectModel)
- p.BrickColor = BrickColor.new(colour)
- p.Size = Vector3.new()
- p.Anchored = true
- p.CanCollide = false
- p.CFrame = cf
- if inverse == true then
- p.Transparency = 1
- else
- p.Transparency = 0
- end
- local m = Instance.new("SpecialMesh",p)
- m.MeshId = "rbxassetid://20329976"
- m.Scale = meshstart
- coroutine.wrap(function()
- for i=0,1,factor do
- swait()
- if inverse == true then
- p.Transparency = 1-i
- else
- p.Transparency = i
- end
- m.Scale = m.Scale + meshadd
- p.CFrame = p.CFrame * CFrame.Angles(0,math.rad(spin),0)
- end
- p:Destroy()
- end)()
- return p
- end,
- Ring = function(cf,meshstart,meshadd,colour,inverse,factor)
- local p = Instance.new("Part",EffectModel)
- p.BrickColor = BrickColor.new(colour)
- p.Size = Vector3.new()
- p.Anchored = true
- p.CanCollide = false
- p.CFrame = cf
- if inverse == true then
- p.Transparency = 1
- else
- p.Transparency = 0
- end
- local m = Instance.new("SpecialMesh",p)
- m.MeshId = "rbxassetid://3270017"
- m.Scale = meshstart
- coroutine.wrap(function()
- for i=0,1,factor do
- swait()
- if inverse == true then
- p.Transparency = 1-i
- else
- p.Transparency = i
- end
- m.Scale = m.Scale + meshadd
- end
- p:Destroy()
- end)()
- return p
- end,
- Meshed = function(cf,meshstart,meshadd,colour,meshid,textid,spin,inverse,factor)
- local p = Instance.new("Part",EffectModel)
- p.BrickColor = BrickColor.new(colour)
- p.Size = Vector3.new()
- p.Anchored = true
- p.CanCollide = false
- p.CFrame = cf
- if inverse == true then
- p.Transparency = 1
- else
- p.Transparency = 0
- end
- local m = Instance.new("SpecialMesh",p)
- m.MeshId = meshid
- m.TextureId = textid
- m.Scale = meshstart
- coroutine.wrap(function()
- for i=0,1,factor do
- swait()
- if inverse == true then
- p.Transparency = 1-i
- else
- p.Transparency = i
- end
- m.Scale = m.Scale + meshadd
- p.CFrame = p.CFrame * CFrame.Angles(0,math.rad(spin),0)
- end
- p:Destroy()
- end)()
- return p
- end,
- Explode = function(cf,partsize,meshstart,meshadd,matr,colour,move,inverse,factor)
- local p = Instance.new("Part",EffectModel)
- p.BrickColor = BrickColor.new(colour)
- p.Size = partsize
- p.Anchored = true
- p.CanCollide = false
- p.Material = matr
- p.CFrame = cf * CFrame.Angles(math.rad(math.random(-360,360)),math.rad(math.random(-360,360)),math.rad(math.random(-360,360)))
- if inverse == true then
- p.Transparency = 1
- else
- p.Transparency = 0
- end
- local m = Instance.new("SpecialMesh",p)
- m.MeshType = "Sphere"
- m.Scale = meshstart
- coroutine.wrap(function()
- for i=0,1,factor do
- swait()
- if inverse == true then
- p.Transparency = 1-i
- else
- p.Transparency = i
- end
- m.Scale = m.Scale + meshadd
- p.CFrame = p.CFrame * CFrame.new(0,move,0)
- end
- p:Destroy()
- end)()
- return p
- end,
- }
- 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").Mediakiller7
- 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")
- EffectModel = Create("Model"){
- Parent = chara,
- Name = "Effects",
- }
- function so(id,par,pit,vol)
- if par == chara then
- end
- end
- 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(Torso, 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
- function Dmg(dude)
- if dude and dude ~= chara and dude.Name ~= "CKbackup" then
- coroutine.wrap(function()
- local torsy = GetDudesTorso(dude)
- if torsy then
- coroutine.wrap(function()
- swait(20)
- for i=0,1,.05 do
- swait()
- end
- end)()
- end
- local enemy = dude:FindFirstChildOfClass("Humanoid")
- enemy.Health = enemy.Health - 10
- coroutine.wrap(function()
- swait(40)
- local naeeym2 = Instance.new("BillboardGui")
- naeeym2.Size = UDim2.new(0,100,0,40)
- naeeym2.StudsOffset = Vector3.new(0,3,0)
- naeeym2.Adornee = dude:FindFirstChild("Head")
- naeeym2.Name = "TalkingBillBoard"
- local tecks2 = Instance.new("TextLabel",naeeym2)
- tecks2.BackgroundTransparency = 1
- tecks2.BorderSizePixel = 0
- tecks2.Text = "OOF"
- tecks2.Font = "Cartoon"
- tecks2.TextSize = 24
- tecks2.TextStrokeTransparency = 0
- tecks2.TextColor3 = Color3.new(1,.6,.7)
- tecks2.TextStrokeColor3 = Color3.new(1,1,1)
- tecks2.Size = UDim2.new(1,0,0.5,0)
- swait(10)
- for i = 0,1,.05 do
- swait()
- tecks2.Position = tecks2.Position - UDim2.new(0,0,.005,0)
- tecks2.TextStrokeTransparency = i
- tecks2.TextTransparency = i
- end
- naeeym2:Destroy()
- end)()
- end)()
- end
- end
- function MagnitudeDmg(par,magni)
- for _, c in pairs(workspace:GetDescendants()) do
- local hum = c:FindFirstChildOfClass("Humanoid")
- if hum ~= nil and c:FindFirstChild("IsTeamMateOfCK")==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
- shoot()
- end)
- Mouse.Button1Up:connect(function()
- hold = false
- end)
- function shoot()
- attack = true
- Humanoid.WalkSpeed = 2
- attack = false
- 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,-.05 * math.cos((sine)/5), 0),
- 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,-.05 * math.cos((sine)/5), 0),
- 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)
- 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)
- 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