Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- BladePart=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0.20000000298023,0,"Lime green","BladePart",Vector3.new(0.200000003, 0.220000014, 0.800000072))
- BladePartweld=weld(m,BladeHandle,BladePart,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0.399986267, -5.7220459e-006, 1.70002365, 1.42108547e-014, -0.999998808, -1.77635684e-015, -1, 2.13162821e-014, -2.98022744e-008, 2.98023828e-008, -3.55271368e-015, -0.999998808))
- mesh("CylinderMesh",BladePart,"","",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1))
- BladePart=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0.20000000298023,0,"Lime green","BladePart",Vector3.new(0.200000003, 0.220000014, 0.800000072))
- BladePartweld=weld(m,BladeHandle,BladePart,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.400005341, -5.7220459e-006, 1.70001566, 4.33431069e-013, -0.999998093, 1.63424829e-013, -1, -9.23705556e-014, -2.98015639e-008, 2.98019547e-008, 2.14939178e-013, -0.999998093))
- mesh("CylinderMesh",BladePart,"","",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1))
- BladePart=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0.20000000298023,0,"Lime green","BladePart",Vector3.new(0.220000014, 0.200000003, 0.399999976))
- BladePartweld=weld(m,BladeHandle,BladePart,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0.00168228149, -0.399024963, 1.89990211, 0.999998748, -2.1309047e-006, 0.000802797964, 2.13086582e-006, 0.999997854, 3.29315458e-006, -0.000802962575, -3.21859238e-006, 0.999998093))
- mesh("SpecialMesh",BladePart,Enum.MeshType.Wedge,"",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1))
- BladePart=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0.20000000298023,0,"Lime green","BladePart",Vector3.new(0.220000014, 0.200000003, 3.4000001))
- BladePartweld=weld(m,BladeHandle,BladePart,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0.00168037415, -0.399391174, -0.000123500824, 0.999998748, -2.1309047e-006, 0.000802797964, 2.13086582e-006, 0.999997854, 3.29315458e-006, -0.000802962575, -3.21859238e-006, 0.999998093))
- BladePart=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0.20000000298023,0,"Lime green","BladePart",Vector3.new(0.220000014, 0.200000003, 0.399999976))
- BladePartweld=weld(m,BladeHandle,BladePart,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.00135612488, -0.39358139, 1.89990449, -0.999998927, 2.05645279e-006, 0.000802798022, -2.0555824e-006, -0.999997914, 3.17394552e-006, 0.000802962692, 3.11428425e-006, 0.999998093))
- mesh("SpecialMesh",BladePart,Enum.MeshType.Wedge,"",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1))
- BladePart=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0.20000000298023,0,"Really black","BladePart",Vector3.new(0.200000003, 0.520000041, 1.39999998))
- BladePartweld=weld(m,BladeHandle,BladePart,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0.00136566162, -0.239994049, 2.3998909, 0.999999166, -1.95434222e-006, -0.000799282745, 1.92285847e-006, 0.999998212, -1.86264401e-006, 0.000799447356, 2.07120365e-006, 0.999998033))
- mesh("SpecialMesh",BladePart,Enum.MeshType.Wedge,"",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1))
- BladePart=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0.20000000298023,0,"Really black","BladePart",Vector3.new(1.00000012, 0.200000003, 1.00000012))
- BladePartweld=weld(m,BladeHandle,BladePart,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-7.62939453e-006, -5.7220459e-006, 1.60001981, 3.26849658e-013, -0.999999404, -3.01980663e-014, -1, -3.05533376e-013, -2.98017593e-008, 2.98018055e-008, 2.84217094e-014, -0.999999404))
- mesh("CylinderMesh",BladePart,"","",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1))
- BladePart=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0.20000000298023,0,"Really black","BladePart",Vector3.new(0.200000003, 0.479999989, 1.39999998))
- BladePartweld=weld(m,BladeHandle,BladePart,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.00135612488, -0.260002136, 2.39991736, -0.999998927, 2.05645279e-006, 0.000802798022, -2.0555824e-006, -0.999997914, 3.17394552e-006, 0.000802962692, 3.11428425e-006, 0.999998093))
- mesh("SpecialMesh",BladePart,Enum.MeshType.Wedge,"",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1))
- function effect(Color,Ref,LP,P1,returnn)
- if LP==nil or P1==nil then return end
- local effectsmsh=Instance.new("CylinderMesh")
- effectsmsh.Scale=Vector3.new(0.2,1,0.2)
- effectsmsh.Name="Mesh"
- local effectsg=Instance.new("Part")
- NoOutline(effectsg)
- effectsg.formFactor=3
- effectsg.CanCollide=false
- effectsg.Name="Eff"
- effectsg.Locked=true
- effectsg.Anchored=true
- effectsg.Size=Vector3.new(0.5,1,0.5)
- effectsg.Parent=workspace
- effectsmsh.Parent=effectsg
- effectsg.BrickColor=BrickColor.new(Color)
- effectsg.Reflectance=Ref
- local point1=P1
- local mg=(LP.p - point1.p).magnitude
- effectsg.Size=Vector3.new(0.5,mg,0.5)
- effectsg.CFrame=cf((LP.p+point1.p)/2,point1.p) * CFrame.Angles(math.rad(90),0,0)
- effectsmsh.Scale=Vector3.new(0.2,1,0.2)
- game:GetService("Debris"):AddItem(effectsg,2)
- if returnn then return effectsg end
- if not returnn then
- table.insert(Effects,{effectsg,"Cylinder",0.2,0.01,0,0.01,effectsmsh})
- end
- end
- function MagicCircle(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay)
- local prt=part(3,workspace,"SmoothPlastic",0,0,brickcolor,"Effect",vt())
- prt.Anchored=true
- prt.CFrame=cframe
- local msh=mesh("SpecialMesh",prt,"Sphere","",vt(0,0,0),vt(x1,y1,z1))
- game:GetService("Debris"):AddItem(prt,2)
- table.insert(Effects,{prt,"Cylinder",delay,x3,y3,z3,msh})
- end
- function MagicCylinder(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay)
- local prt=part(3,workspace,"SmoothPlastic",0,0,brickcolor,"Effect",vt())
- prt.Anchored=true
- prt.CFrame=cframe
- local msh=mesh("CylinderMesh",prt,"","",vt(0,0,0),vt(x1,y1,z1))
- game:GetService("Debris"):AddItem(prt,2)
- table.insert(Effects,{prt,"Cylinder",delay,x3,y3,z3,msh})
- end
- function MagicHead(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay)
- local prt=part(3,workspace,"SmoothPlastic",0,0,brickcolor,"Effect",vt())
- prt.Anchored=true
- prt.CFrame=cframe
- local msh=mesh("SpecialMesh",prt,"Head","",vt(0,0,0),vt(x1,y1,z1))
- game:GetService("Debris"):AddItem(prt,2)
- table.insert(Effects,{prt,"Cylinder",delay,x3,y3,z3,msh})
- end
- function Shootcombo()
- attack = true
- for i = 0,1,0.1 do
- swait()
- RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(0),math.rad(0),math.rad(50)),.3)
- Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(5),math.rad(0),math.rad(-50)),.3)
- RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(90), math.rad(0), math.rad(50)), 0.3)
- LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(0), math.rad(0), math.rad(-10)), 0.3)
- RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(0),math.rad(50),math.rad(0)),.3)
- LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-120),math.rad(10)),.3)
- end
- so("http://www.roblox.com/asset/?id=169445602",BarrelA,.7,1.5)
- so("http://www.roblox.com/asset/?id=169445602",BarrelB,.7,1.5)
- so("http://www.roblox.com/asset/?id=169380505",BarrelA,.7,1.1)
- so("http://www.roblox.com/asset/?id=169380505",BarrelB,.7,1.1)
- table.insert(Effects,{BarrelA.CFrame.lookVector,"Shoot",10,BarrelA.Position,5,10,0,1})
- table.insert(Effects,{BarrelB.CFrame.lookVector,"Shoot",10,BarrelB.Position,5,10,0,1})
- for i = 0,1,0.2 do
- swait()
- RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(0),math.rad(0),math.rad(50)),.3)
- Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(-5),math.rad(5),math.rad(-50)),.3)
- RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(130), math.rad(30), math.rad(50)), 0.3)
- LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(-20), math.rad(0), math.rad(-10)), 0.3)
- RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(0),math.rad(50),math.rad(0)),.3)
- LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-120),math.rad(10)),.3)
- end
- attack = false
- end
- function BladeAttackOne()
- attack = true
- local con=Hitbox.Touched:connect(function(hit) Damagefunc(Hitbox,hit,20,30,math.random(5,5),"Normal",RootPart,.2,1) end)
- for i = 0,1,0.1 do
- swait()
- RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(0),math.rad(0),math.rad(-70)),0.4)
- Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(0),math.rad(0),math.rad(70)),0.4)
- RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(0), math.rad(30), math.rad(100)),0.4)
- LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(0), math.rad(0), math.rad(-80)),0.4)
- RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(0),math.rad(120),math.rad(0)),0.4)
- LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-50),math.rad(0)),0.4)
- end
- --so("http://roblox.com/asset/?id=206083107",handle,1,1)
- so("http://www.roblox.com/asset/?id=200633148",handle,1,.9)
- for i = 0,1,0.1 do
- swait()
- local blcf = Hitbox.CFrame*CFrame.new(0,.5,0)
- if scfr and (Hitbox.Position-scfr.p).magnitude > .1 then
- local h = 5
- local a,b = Triangle((scfr*CFrame.new(0,h/2,0)).p,(scfr*CFrame.new(0,-h/2,0)).p,(blcf*CFrame.new(0,h/2,0)).p)
- if a then game.Debris:AddItem(a,1) end if b then game.Debris:AddItem(b,1) end
- local a,b = Triangle((blcf*CFrame.new(0,h/2,0)).p,(blcf*CFrame.new(0,-h/2,0)).p,(scfr*CFrame.new(0,-h/2,0)).p)
- if a then game.Debris:AddItem(a,1) end if b then game.Debris:AddItem(b,1) end
- scfr = blcf
- elseif not scfr then
- scfr = blcf
- end
- RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(0),math.rad(0),math.rad(80)),0.4)
- Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(10),math.rad(-10),math.rad(-80)),0.4)
- RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(0), math.rad(120), math.rad(90)),0.4)
- LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(0), math.rad(0), math.rad(-30)),0.4)
- RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(0),math.rad(50),math.rad(0)),0.4)
- LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-120),math.rad(-10)),0.4)
- end
- attack = false
- con:disconnect()
- end
- function BladeAttackTwo()
- attack = true
- local con=Hitbox.Touched:connect(function(hit) Damagefunc(Hitbox,hit,20,30,math.random(5,5),"Normal",RootPart,.2,1) end)
- for i = 0,1,0.1 do
- swait()
- RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(0),math.rad(0),math.rad(70)),0.4)
- Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(10),math.rad(-10),math.rad(-70)),0.4)
- RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(0), math.rad(120), math.rad(90)),0.4)
- LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(0), math.rad(0), math.rad(-30)),0.4)
- RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(0),math.rad(40),math.rad(0)),0.4)
- LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-140),math.rad(-10)),0.4)
- end
- --so("http://roblox.com/asset/?id=206083107",handle,1,.9)
- so("http://www.roblox.com/asset/?id=200633196",handle,1,1)
- for i = 0,1,0.1 do
- swait()
- local blcf = Hitbox.CFrame*CFrame.new(0,.5,0)
- if scfr and (Hitbox.Position-scfr.p).magnitude > .1 then
- local h = 5
- local a,b = Triangle((scfr*CFrame.new(0,h/2,0)).p,(scfr*CFrame.new(0,-h/2,0)).p,(blcf*CFrame.new(0,h/2,0)).p)
- if a then game.Debris:AddItem(a,1) end if b then game.Debris:AddItem(b,1) end
- local a,b = Triangle((blcf*CFrame.new(0,h/2,0)).p,(blcf*CFrame.new(0,-h/2,0)).p,(scfr*CFrame.new(0,-h/2,0)).p)
- if a then game.Debris:AddItem(a,1) end if b then game.Debris:AddItem(b,1) end
- scfr = blcf
- elseif not scfr then
- scfr = blcf
- end
- RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(0),math.rad(0),math.rad(-80)),0.4)
- Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(10),math.rad(0),math.rad(80)),0.4)
- RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(0), math.rad(10), math.rad(90)),0.4)
- LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(0), math.rad(0), math.rad(-90)),0.4)
- RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(0),math.rad(140),math.rad(0)),0.4)
- LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-40),math.rad(-10)),0.4)
- end
- attack = false
- con:disconnect()
- end
- function BladeAttackThree()
- attack = true
- local con=Hitbox.Touched:connect(function(hit) Damagefunc(Hitbox,hit,20,30,math.random(5,5),"Normal",RootPart,.2,1) end)
- for i = 0,1,0.1 do
- swait()
- RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(0),math.rad(0),math.rad(20)),0.4)
- Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(0),math.rad(0),math.rad(-20)),.3)
- RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(170), math.rad(0), math.rad(20)),0.4)
- LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(0), math.rad(0), math.rad(-30)),0.4)
- RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(0),math.rad(90),math.rad(0)),0.4)
- LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-90),math.rad(-10)),0.4)
- end
- --so("http://roblox.com/asset/?id=206083107",handle,1,1.1)
- so("http://www.roblox.com/asset/?id=200633196",handle,1,.9)
- for i = 0,1,0.1 do
- swait()
- local blcf = Hitbox.CFrame*CFrame.new(0,.5,0)
- if scfr and (Hitbox.Position-scfr.p).magnitude > .1 then
- local h = 5
- local a,b = Triangle((scfr*CFrame.new(0,h/2,0)).p,(scfr*CFrame.new(0,-h/2,0)).p,(blcf*CFrame.new(0,h/2,0)).p)
- if a then game.Debris:AddItem(a,1) end if b then game.Debris:AddItem(b,1) end
- local a,b = Triangle((blcf*CFrame.new(0,h/2,0)).p,(blcf*CFrame.new(0,-h/2,0)).p,(scfr*CFrame.new(0,-h/2,0)).p)
- if a then game.Debris:AddItem(a,1) end if b then game.Debris:AddItem(b,1) end
- scfr = blcf
- elseif not scfr then
- scfr = blcf
- end
- RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(0),math.rad(0),math.rad(40)),0.4)
- Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(10),math.rad(0),math.rad(-40)),.3)
- RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(10), math.rad(0), math.rad(-10)),0.4)
- LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(0), math.rad(0), math.rad(-10)),0.4)
- RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(0),math.rad(90),math.rad(0)),0.4)
- LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-90),math.rad(-10)),0.4)
- end
- attack = false
- con:disconnect()
- end
- function BladeAttackFour()
- attack = true
- local con=Hitbox.Touched:connect(function(hit) Damagefunc(Hitbox,hit,20,30,math.random(5,5),"Normal",RootPart,.2,1) end)
- for i = 0,1,0.1 do
- swait()
- RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(0),math.rad(0),math.rad(70)),0.4)
- Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(0),math.rad(0),math.rad(-70)),.4)
- RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(0), math.rad(120), math.rad(90)),0.4)
- LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(0), math.rad(0), math.rad(-30)),0.4)
- RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(0),math.rad(90),math.rad(0)),0.4)
- LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-90),math.rad(-10)),0.4)
- end
- so("http://www.roblox.com/asset/?id=200633148",handle,1,.8)
- Torso.Velocity=Head.CFrame.lookVector*100
- for i = 0,1,0.05 do
- swait()
- local blcf = Hitbox.CFrame*CFrame.new(0,.5,0)
- if scfr and (Hitbox.Position-scfr.p).magnitude > .1 then
- local h = 5
- local a,b = Triangle((scfr*CFrame.new(0,h/2,0)).p,(scfr*CFrame.new(0,-h/2,0)).p,(blcf*CFrame.new(0,h/2,0)).p)
- if a then game.Debris:AddItem(a,1) end if b then game.Debris:AddItem(b,1) end
- local a,b = Triangle((blcf*CFrame.new(0,h/2,0)).p,(blcf*CFrame.new(0,-h/2,0)).p,(scfr*CFrame.new(0,-h/2,0)).p)
- if a then game.Debris:AddItem(a,1) end if b then game.Debris:AddItem(b,1) end
- scfr = blcf
- elseif not scfr then
- scfr = blcf
- end
- RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,-1)* angles(math.rad(40),math.rad(0),math.rad(-70)),0.3)
- Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(-20),math.rad(-30),math.rad(70)),.3)
- RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(0), math.rad(20), math.rad(90)),0.3)
- LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(30), math.rad(0), math.rad(-60)),0.3)
- RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(0),math.rad(60),math.rad(-30)),0.3)
- LH.C0=clerp(LH.C0,cf(-1,.2,0)*angles(math.rad(0),math.rad(-40),math.rad(-60)),0.3)
- end
- con:disconnect()
- attack = false
- end
- function ElecEffect(cff,x,y,z)
- local prt=part(3,workspace,"SmoothPlastic",0,0,BrickColor.new("Lime green"),"Part",vt(1,1,1))
- prt.Anchored=true
- prt.CFrame=cff*cf(math.random(-x,x),math.random(-y,y),math.random(-z,z))
- prt.CFrame=cf(prt.Position)
- --prt.CFrame=cf(cff)*cf(math.random(-x,x),math.random(-y,y),math.random(-z,z))
- game:GetService("Debris"):AddItem(prt,2)
- xval=math.random()/2
- yval=math.random()/2
- zval=math.random()/2
- msh=mesh("BlockMesh",prt,"","",vt(0,0,0),vt(xval,yval,zval))
- Effects[#Effects+1]={prt,"Elec",0.1,x,y,z,xval,yval,zval} --part, type, delay
- end
- function Test()
- ElecEffect(Hitbox.CFrame,2,4,2)
- end
- attacktype1 = 1
- mouse.Button1Down:connect(function()
- if Mode == "Gun" then
- if attack==false then
- if attacktype1==1 then
- attack=true
- attacktype1=1
- Shootcombo()
- end
- end
- end
- if Mode == "Blade" then
- if attack==false then
- if attacktype==1 then
- attack=true
- attacktype=2
- BladeAttackOne()
- elseif attacktype==2 then
- attack=true
- attacktype=3
- BladeAttackTwo()
- elseif attacktype==3 then
- attack=true
- attacktype=4
- BladeAttackThree()
- elseif attacktype==4 then
- attack=true
- attacktype=1
- BladeAttackFour()
- end
- end
- end
- end)
- mouse.KeyDown:connect(function(k)
- k=k:lower()
- if k=='f' then
- if Mode == "Gun" then
- Mode = "Blade"
- so("http://www.roblox.com/asset/?id=152052659",handle,1,1)
- elseif Mode == "Blade" then
- Mode = "Gun"
- so("http://www.roblox.com/asset/?id=211134014",handle,1,1)
- end
- elseif k=='q' then
- Test()
- end
- end)
- local sine = 0
- local change = 1
- local val = 0
- while true do
- swait()
- sine = sine + change
- local torvel=(RootPart.Velocity*Vector3.new(1,0,1)).magnitude
- local velderp=RootPart.Velocity.y
- hitfloor,posfloor=rayCast(RootPart.Position,(CFrame.new(RootPart.Position,RootPart.Position - Vector3.new(0,1,0))).lookVector,4,Character)
- if equipped==true or equipped==false then
- if attack==false then
- idle=idle+1
- else
- idle=0
- end
- if idle>=500 then
- if attack==false then
- --Sheath()
- end
- end
- if RootPart.Velocity.y > 1 and hitfloor==nil then
- Anim="Jump"
- if attack==false and Mode == "Gun" then
- change=3
- RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(0),math.rad(0),math.rad(0)),.3)
- Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(-10),math.rad(0),math.rad(0)),.3)
- RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(50), math.rad(0), math.rad(20)), 0.3)
- LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(-10), math.rad(0), math.rad(-10)), 0.3)
- RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(0),math.rad(90),math.rad(-10)),.3)
- LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-90),math.rad(20)),.3)
- BladeHandleweld.C0=clerp(BladeHandleweld.C0, CFrame.new(0, 0, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), 0.3)
- end
- if attack==false and Mode == "Blade" then
- change=3
- RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(0),math.rad(0),math.rad(0)),.3)
- Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(-10),math.rad(0),math.rad(0)),.3)
- RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(50), math.rad(0), math.rad(20)), 0.3)
- LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(-10), math.rad(0), math.rad(-10)), 0.3)
- RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(0),math.rad(90),math.rad(-10)),.3)
- LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-90),math.rad(20)),.3)
- BladeHandleweld.C0=clerp(BladeHandleweld.C0, CFrame.new(0, -3, 1.2) * angles(math.rad(180), math.rad(0), math.rad(0)), 0.3)
- end
- elseif RootPart.Velocity.y < -1 and hitfloor==nil then
- Anim="Fall"
- if attack==false and Mode == "Gun" then
- change=3
- RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(0),math.rad(0),math.rad(0)),.3)
- Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(10),math.rad(0),math.rad(0)),.3)
- RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(50), math.rad(0), math.rad(20)), 0.3)
- LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(-10), math.rad(0), math.rad(-30)), 0.3)
- RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(0),math.rad(90),math.rad(10)),.3)
- LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-90),math.rad(-20)),.3)
- BladeHandleweld.C0=clerp(BladeHandleweld.C0, CFrame.new(0, 0, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), 0.3)
- end
- if attack==false and Mode == "Blade" then
- change=3
- RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(0),math.rad(0),math.rad(0)),.3)
- Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(10),math.rad(0),math.rad(0)),.3)
- RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(50), math.rad(0), math.rad(20)), 0.3)
- LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(-10), math.rad(0), math.rad(-30)), 0.3)
- RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(0),math.rad(90),math.rad(10)),.3)
- LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-90),math.rad(-20)),.3)
- BladeHandleweld.C0=clerp(BladeHandleweld.C0, CFrame.new(0, -3, 1.2) * angles(math.rad(180), math.rad(0), math.rad(0)), 0.3)
- end
- elseif torvel<1 and hitfloor~=nil then
- Anim="Idle"
- if attack==false and Mode == "Gun" then
- change=3
- RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(0),math.rad(0),math.rad(20)),.3)
- Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(5),math.rad(0),math.rad(-20)),.3)
- RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(50), math.rad(0), math.rad(20)), 0.3)
- LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(-10), math.rad(0), math.rad(-10)), 0.3)
- RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(0),math.rad(70),math.rad(0)),.3)
- LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-80),math.rad(10)),.3)
- BladeHandleweld.C0=clerp(BladeHandleweld.C0, CFrame.new(0, 0, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), 0.3)
- end
- if attack==false and Mode == "Blade" then
- change=3
- RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(0),math.rad(0),math.rad(-40)),.3)
- Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(5),math.rad(0),math.rad(40)),.3)
- RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(60), math.rad(0), math.rad(20)), 0.3)
- LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(20), math.rad(0), math.rad(-30)), 0.3)
- RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(0),math.rad(80),math.rad(0)),.3)
- LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-60),math.rad(-5)),.3)
- BladeHandleweld.C0=clerp(BladeHandleweld.C0, CFrame.new(0, -3, 1.2) * angles(math.rad(180), math.rad(0), math.rad(0)), 0.3)
- end
- elseif torvel>2 and hitfloor~=nil then
- Anim="Walk"
- if attack==false and Mode == "Gun" then
- change=3
- RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(20),math.rad(0),math.rad(0)),.3)
- Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(-10),math.rad(0),math.rad(-0)),.3)
- RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(40), math.rad(0), math.rad(20)), 0.3)
- LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(-20), math.rad(0), math.rad(-10)), 0.3)
- RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(0),math.rad(90),math.rad(10)),.3)
- LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-90),math.rad(10)),.3)
- BladeHandleweld.C0=clerp(BladeHandleweld.C0, CFrame.new(0, 0, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), 0.3)
- end
- if attack==false and Mode == "Blade" then
- change=3
- RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(20),math.rad(0),math.rad(10)),.3)
- Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(-20),math.rad(1),math.rad(-10)),.3)
- RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(80), math.rad(5), math.rad(20)), 0.3)
- LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(10), math.rad(0), math.rad(-20)), 0.3)
- RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(0),math.rad(90),math.rad(0)),.3)
- LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-90),math.rad(0)),.3)
- BladeHandleweld.C0=clerp(BladeHandleweld.C0, CFrame.new(0, -3, 1.2) * angles(math.rad(180), math.rad(0), math.rad(0)), 0.3)
- end
- end
- end
- if #Effects>0 then
- --table.insert(Effects,{prt,"Block1",delay})
- for e=1,#Effects do
- if Effects[e]~=nil then
- --for j=1,#Effects[e] do
- local Thing=Effects[e]
- if Thing~=nil then
- local Part=Thing[1]
- local Mode=Thing[2]
- local Delay=Thing[3]
- local IncX=Thing[4]
- local IncY=Thing[5]
- local IncZ=Thing[6]
- if Thing[2]=="DecreaseStat" then
- Thing[5]=Thing[5]-1
- if Thing[5]<=0 then
- if Thing[1]:findFirstChild("Stats")~=nil then
- Thing[1].Stats[Thing[3]].Value=Thing[1].Stats[Thing[3]].Value+Thing[4]
- end
- table.remove(Effects,e)
- end
- end
- if Thing[2]=="Shoot" then
- local Look=Thing[1]
- local hit,pos = rayCast(Thing[4],Look,20,m)
- local mag=(Thing[4]-pos).magnitude
- MagicHead(BrickColor.new("Lime green"),CFrame.new((Thing[4]+pos)/2,pos)*angles(1.57,0,0),1,mag*5,1,.5,0,.5,0.1)
- Thing[4]=Thing[4]+(Look*20)
- Thing[3]=Thing[3]-1
- if hit~=nil then
- Thing[3]=0
- if Thing[8]==1 then
- Damagefunc(Hitbox,hit,Thing[5],Thing[6],Thing[7],"Normal",RootPart,0,2,math.random(1,5),nil,nil,true)
- elseif Thing[8]==2 then
- Damagefunc(Hitbox,hit,Thing[5],Thing[6],Thing[7],"NormalDecreaseMvmt1",RootPart,0,2,math.random(1,5),nil,nil,true)
- end
- ref=part(3,workspace,"SmoothPlastic",0,1,BrickColor.new("Lime green"),"Reference",vt())
- ref.Anchored=true
- ref.CFrame=cf(pos)
- MagicCircle(BrickColor.new("Lime green"),cf(pos),5,5,5,1,1,1,0.03)
- game:GetService("Debris"):AddItem(ref,1)
- end
- if Thing[3]<=0 then
- table.remove(Effects,e)
- end
- end
- if Thing[2]=="CylinderClang" then
- if Thing[3]<=1 then
- Thing[1].CFrame=Thing[1].CFrame*CFrame.new(0,2.5*Thing[5],0)*CFrame.fromEulerAnglesXYZ(Thing[6],0,0)
- Thing[7]=Thing[1].CFrame
- effect("New Yeller",0,Thing[8],Thing[7])
- Thing[8]=Thing[7]
- Thing[3]=Thing[3]+Thing[4]
- else
- Part.Parent=nil
- table.remove(Effects,e)
- end
- --[[Mesh=Thing[7]
- Mesh.Scale=Mesh.Scale+vt(Thing[4],Thing[5],Thing[6])
- Thing[1].Transparency=Thing[1].Transparency+Thing[3]]
- end
- if Thing[2]~="Shoot" and Thing[2]~="DecreaseStat" then
- if Thing[1].Transparency<=1 then
- if Thing[2]=="Block1" then
- Thing[1].CFrame=Thing[1].CFrame*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50))
- Mesh=Thing[7]
- Mesh.Scale=Mesh.Scale+vt(Thing[4],Thing[5],Thing[6])
- Thing[1].Transparency=Thing[1].Transparency+Thing[3]
- elseif Thing[2]=="Block2" then
- Thing[1].CFrame=Thing[1].CFrame
- Mesh=Thing[7]
- Mesh.Scale=Mesh.Scale+vt(Thing[4],Thing[5],Thing[6])
- Thing[1].Transparency=Thing[1].Transparency+Thing[3]
- elseif Thing[2]=="Cylinder" then
- Mesh=Thing[7]
- Mesh.Scale=Mesh.Scale+vt(Thing[4],Thing[5],Thing[6])
- Thing[1].Transparency=Thing[1].Transparency+Thing[3]
- elseif Thing[2]=="Blood" then
- Mesh=Thing[7]
- Thing[1].CFrame=Thing[1].CFrame*cf(0,.5,0)
- Mesh.Scale=Mesh.Scale+vt(Thing[4],Thing[5],Thing[6])
- Thing[1].Transparency=Thing[1].Transparency+Thing[3]
- elseif Thing[2]=="Elec" then
- Mesh=Thing[1].Mesh
- Mesh.Scale=Mesh.Scale+vt(Thing[7],Thing[8],Thing[9])
- Thing[1].Transparency=Thing[1].Transparency+Thing[3]
- elseif Thing[2]=="Disappear" then
- Thing[1].Transparency=Thing[1].Transparency+Thing[3]
- end
- else
- Part.Parent=nil
- table.remove(Effects,e)
- end
- end
- end
- --end
- end
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement