Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --holy sword
- local lp = game.Players.LocalPlayer
- local chr = lp.Character
- local lp = game.Players.LocalPlayer
- local chr = lp.Character
- local mouse = lp:GetMouse()
- local soulsteal = false
- local percent = 0
- local plr=game.Players.LocalPlayer
- local chr=plr.Character
- local asin = math.asin
- local atan2 = math.atan2
- local rad = math.rad
- local sin = math.sin
- local abs = math.abs
- local ceil = math.ceil
- local dmg = 3
- local function getAngles(cf)
- local sx,sy,sz,m00,m01,m02,m10,m11,m12,m20,m21,m22 = cf:components()
- return atan2(-m12,m22),asin(m02),atan2(-m01,m00)
- end
- Lerp = {
- Number = function(C1,C2,inc)
- return C1 + (C2 - C1) * inc
- end;
- CFrame = function(a,b,m)
- local c,d={a:components()},{b:components()}
- table.foreach(c,function(a,b)c[a]=c[a]+(d[a]-c[a])*m end)
- return CFrame.new(unpack(c))
- end;
- }
- local function genWeld(a,b)
- local w = Instance.new("Weld",a)
- w.Part0 = a
- w.Part1 = b
- return w
- end
- anglespeed = 1
- yeet = 0
- count = 0
- angle = 0
- local attacking = false
- speed = 1
- local plr=game.Players.LocalPlayer
- local chr=plr.Character
- local torso=chr.Torso
- local mouse=plr:GetMouse()
- local Neck = genWeld(chr.Torso,chr.Head)
- Neck.C0 = CFrame.new(0,1,0)
- Neck.C1 = CFrame.new(0,-0.5,0)
- local LeftShoulder = genWeld(chr.Torso,chr['Left Arm'])
- LeftShoulder.C0 = CFrame.new(-1,0.5,0)
- LeftShoulder.C1 = CFrame.new(0.5,0.5,0)
- RightShoulder = genWeld(chr.Torso,chr['Right Arm'])
- RightShoulder.C0 = CFrame.new(1,0.5,0)
- RightShoulder.C1 = CFrame.new(-0.5,0.5,0)
- local LeftHip = genWeld(chr.Torso,chr['Left Leg'])
- LeftHip.C0 = CFrame.new(-1,-1,0)
- LeftHip.C1 = CFrame.new(-0.5,1,0)
- local RightHip = genWeld(chr.Torso,chr['Right Leg'])
- RightHip.C0 = CFrame.new(1,-1,0)
- RightHip.C1 = CFrame.new(0.5,1,0)
- local RootJoint = genWeld(chr.HumanoidRootPart,chr.Torso)
- RootJoint.C0 = CFrame.new(0,0,0) * CFrame.Angles(-math.pi/2,0,math.pi)
- RootJoint.C1 = CFrame.new(0,0,0) * CFrame.Angles(-math.pi/2,0,math.pi)
- local function newLerpTo(weld)
- return {
- Weld = weld; -- The weld that will lerp
- To = weld.C0; -- Where it will lerp to; a CFrame
- Cache = weld.C0; -- Cache of original position; it helps when making anim keyframes
- Speed = 0.1; -- Speed of lerp. 0.1 or 0.2 is best
- }
- end
- LerpTo = {
- Neck = newLerpTo(Neck);
- LeftArm = newLerpTo(LeftShoulder);
- RightArm = newLerpTo(RightShoulder);
- LeftLeg = newLerpTo(LeftHip);
- RightLeg = newLerpTo(RightHip);
- RootJoint = newLerpTo(RootJoint);
- }
- local effects = Instance.new("Model",chr)--so we can get rid of effects easily, with for i,v
- local sound = function(id,looped,parent,pitch)--for effects and stuff :)
- local s = Instance.new("Sound",parent)
- s.Volume=math.huge
- s.Looped=looped
- if pitch ~= nil then
- s.Pitch=pitch
- end
- s.SoundId="rbxassetid://"..id
- s:Play()
- return s
- end
- --sound("232544821",true,chr)
- local it = Instance.new
- local bc = BrickColor.new
- local c3 = Color3.new
- local cf = CFrame.new
- local ca = CFrame.Angles
- local rad = math.rad
- local cos = math.cos
- local weld = function(p0,p1,x,y,z,ax,ay,az)
- p0.Position=p1.Position
- local w = it("Motor",p0)
- w.Part0=p0
- w.Part1=p1
- w.C0=cf(x,y,z)*ca(ax,ay,az)
- return w
- end
- local explode = function(player)
- if workspace[player] and workspace[player].Torso then
- local trso = workspace[player].Torso
- local exp = Instance.new("Part",trso.Parent)
- exp.CanCollide=false
- exp.TopSurface='Smooth'
- exp.BottomSurface='Smooth'
- exp.FormFactor='Custom'
- exp.Anchored=true
- exp.Size=Vector3.new(1,1,1)
- exp.BrickColor=bc("Really red")
- exp.CFrame=trso.CFrame*CFrame.Angles(math.random(-50,50),math.random(-50,50),math.random(-50,50))
- print("Hit:"..trso.Parent.Name)
- coroutine.resume(coroutine.create(function()
- for i = 1,10 do
- wait()
- exp.CFrame=exp.CFrame*CFrame.Angles(math.random(-50,50),math.random(-50,50),math.random(-50,50))
- exp.Size=exp.Size+Vector3.new(.5,.5,.5)
- exp.Transparency=exp.Transparency+.1
- end
- exp:Destroy()
- end))
- end
- end
- local sword = it("Model",chr)
- sword.Name="HolySword"
- local p1 = it("Part",sword)
- p1.CanCollide=false
- p1.FormFactor="Custom"
- p1.BrickColor=bc("Institutional white")
- p1.TopSurface="Smooth"
- p1.BottomSurface="Smooth"
- p1.Size=Vector3.new(.2,.2,.2)
- weld(p1,chr['Right Arm'],0,1,0,0,math.pi/2,0)
- local p1m = it("SpecialMesh",p1)
- p1m.MeshType="Cylinder"
- p1m.Scale=Vector3.new(7.5,1,1)
- local p2 = it("Part",sword)
- p2.CanCollide=false
- p2.FormFactor="Custom"
- p2.TopSurface="Smooth"
- p2.BottomSurface="Smooth"
- p2.BrickColor=bc("Bright orange")
- p2.Size=Vector3.new(.2,.75,.75)
- weld(p2,p1,0,0,-1.1,0,math.pi/2,0)
- local p3 = it("Part",sword)
- p3.CanCollide=false
- p3.FormFactor="Custom"
- p3.TopSurface="Smooth"
- p3.BottomSurface="Smooth"
- p3.BrickColor=bc("Dark green")
- p3.Size=Vector3.new(.4,.4,.4)
- p3.Reflectance=.4
- local p3m = it("SpecialMesh",p3)
- p3m.MeshType="Sphere"
- weld(p3,p2,0,0,0,0,0,0)
- local p4 = it("Part",sword)
- p4.CanCollide=false
- p4.FormFactor="Custom"
- p4.TopSurface="Smooth"
- p4.BottomSurface="Smooth"
- p4.BrickColor=bc("Bright orange")
- p4.Reflectance=.25
- p4.Size=Vector3.new(.2,.25,4)
- local p4m = it("SpecialMesh",p4)
- p4m.MeshType="Brick"
- p4m.Scale=Vector3.new(.5,1,1)
- weld(p4,p2,0,0,-2.2,0,0,0)
- local p5 = it("Part",sword)
- p5.CanCollide=false
- p5.FormFactor="Custom"
- p5.TopSurface="Smooth"
- p5.BottomSurface="Smooth"
- p5.BrickColor=bc("Institutional white")
- p5.Reflectance=.25
- p5.Size=Vector3.new(.2,.25,4)
- weld(p5,p4,0,-.25,0,0,0,0)
- local p6 = it("Part",sword)
- p6.CanCollide=false
- p6.FormFactor="Custom"
- p6.TopSurface="Smooth"
- p6.BottomSurface="Smooth"
- p6.BrickColor=bc("Institutional white")
- p6.Reflectance=.25
- p6.Size=Vector3.new(.2,.25,4)
- weld(p6,p4,0,.25,0,0,0,0)
- local p7 = it("WedgePart",sword)
- p7.CanCollide=false
- p7.FormFactor="Custom"
- p7.TopSurface="Smooth"
- p7.BottomSurface="Smooth"
- p7.Size=Vector3.new(.2,.25,.2)
- p7.BrickColor=bc("Bright orange")
- p7.Reflectance = .25
- weld(p7,p4,0,-.0625,2.1,rad(180),0,0)
- local p7m = it("SpecialMesh",p7)
- p7m.MeshType="Wedge"
- p7m.Scale=Vector3.new(.5,.5,1)
- local p8 = it("WedgePart",sword)
- p8.CanCollide=false
- p8.FormFactor="Custom"
- p8.TopSurface="Smooth"
- p8.BottomSurface="Smooth"
- p8.Size=Vector3.new(.2,.25,.2)
- p8.BrickColor=bc("Bright orange")
- p8.Reflectance = .25
- weld(p8,p4,0,-.0625,2.1,rad(180),0,rad(180))
- local p8m = it("SpecialMesh",p8)
- p8m.MeshType="Wedge"
- p8m.Scale=Vector3.new(.5,.5,1)
- local p9 = it("WedgePart",sword)
- p9.CanCollide=false
- p9.FormFactor="Custom"
- p9.BrickColor=bc("Institutional white")
- p9.TopSurface="Smooth"
- p9.BottomSurface="Smooth"
- p9.Size=Vector3.new(.2,.25,.25)
- p9.Reflectance=.25
- weld(p9,p5,0,-2.125,0,-rad(90),0,0)
- local p10 = it("WedgePart",sword)
- p10.CanCollide=false
- p10.FormFactor="Custom"
- p10.BrickColor=bc("Institutional white")
- p10.TopSurface="Smooth"
- p10.BottomSurface="Smooth"
- p10.Size=Vector3.new(.2,.25,.25)
- p10.Reflectance=.25
- weld(p10,p6,0,0,2.125,-rad(180),0,0)
- local p11 = it("WedgePart",sword)
- p11.CanCollide=false
- p11.FormFactor="Custom"
- p11.BrickColor=bc("Institutional white")
- p11.TopSurface="Smooth"
- p11.BottomSurface="Smooth"
- p11.Size=Vector3.new(.2,.25,.25)
- p11.Reflectance=.25
- weld(p11,p9,0,-.25,-.1875,0,0,0)
- local p11m = it("SpecialMesh",p11)
- p11m.MeshType="Wedge"
- p11m.Scale=Vector3.new(1,1,.5)
- local p12 = it("WedgePart",sword)
- p12.CanCollide=false
- p12.FormFactor="Custom"
- p12.BrickColor=bc("Institutional white")
- p12.TopSurface="Smooth"
- p12.BottomSurface="Smooth"
- p12.Size=Vector3.new(.2,.25,.25)
- p12.Reflectance=.25
- weld(p12,p10,0,.1875,.25,0,0,0)
- local p12m = it("SpecialMesh",p12)
- p12m.MeshType="Wedge"
- p12m.Scale=Vector3.new(1,.5,1)
- local p13 = it("WedgePart",sword)
- p13.CanCollide=false
- p13.FormFactor="Custom"
- p13.TopSurface="Smooth"
- p13.BottomSurface="Smooth"
- p13.Size=Vector3.new(.2,.25,.2)
- p13.BrickColor=bc("Institutional white")
- p13.Reflectance = .25
- weld(p13,p7,0,0,0,rad(180),rad(0),rad(0))
- local p13m = it("SpecialMesh",p13)
- p13m.MeshType="Wedge"
- p13m.Scale=Vector3.new(1,.5,1)
- local p14 = it("WedgePart",sword)
- p14.CanCollide=false
- p14.FormFactor="Custom"
- p14.TopSurface="Smooth"
- p14.BottomSurface="Smooth"
- p14.Size=Vector3.new(.2,.25,.2)
- p14.BrickColor=bc("Institutional white")
- p14.Reflectance = .25
- weld(p14,p8,0,0,0,rad(180),rad(0),rad(0))
- local p14m = it("SpecialMesh",p14)
- p14m.MeshType="Wedge"
- p14m.Scale=Vector3.new(1,.5,1)
- local p15 = it("Part",sword)
- p15.CanCollide=false
- p15.FormFactor="Custom"
- p15.TopSurface="Smooth"
- p15.BottomSurface="Smooth"
- p15.Size=Vector3.new(.2,.25,.2)
- p15.Reflectance=.25
- p15.BrickColor=bc("Institutional white")
- weld(p15,p4,0,0,-2.225,0,0,0)
- p15m = it("SpecialMesh",p15)
- p15m.MeshType="Brick"
- p15m.Scale=Vector3.new(1,1,.25)
- local p16 = it("Part",sword)
- p16.CanCollide=false
- p16.FormFactor="Custom"
- p16.TopSurface="Smooth"
- p16.BottomSurface="Smooth"
- p16.Size=Vector3.new(.2,.2,.2)
- weld(p16,p3,-.4,-.2,0,-rad(90),0,rad(90))
- p16m=it("SpecialMesh",p16)
- p16m.MeshId="rbxassetid://111893941"
- p16m.Scale=Vector3.new(.25,.25,.25)
- local p17 = it("Part",sword)
- p17.CanCollide=false
- p17.FormFactor="Custom"
- p17.TopSurface="Smooth"
- p17.BottomSurface="Smooth"
- p17.Size=Vector3.new(.2,.2,.2)
- weld(p17,p3,.4,-.2,0,-rad(90),0,rad(90))
- p17m=it("SpecialMesh",p17)
- p17m.MeshId="rbxassetid://111896510"
- p17m.Scale=Vector3.new(.25,.25,.25)
- local p18 = it("Part",sword)
- p18.CanCollide=false
- p18.FormFactor="Custom"
- p18.TopSurface="Smooth"
- p18.BottomSurface="Smooth"
- p18.Size=Vector3.new(.2,.2,.2)
- weld(p18,p3,-.4,-.2,0,-rad(90),rad(45),rad(90))
- p18m=it("SpecialMesh",p18)
- p18m.MeshId="rbxassetid://111893941"
- p18m.Scale=Vector3.new(.25,.25,.25)
- local p19 = it("Part",sword)
- p19.CanCollide=false
- p19.FormFactor="Custom"
- p19.TopSurface="Smooth"
- p19.BottomSurface="Smooth"
- p19.Size=Vector3.new(.2,.2,.2)
- weld(p19,p3,.4,-.2,0,-rad(90),rad(45),rad(90))
- p19m=it("SpecialMesh",p19)
- p19m.MeshId="rbxassetid://111896510"
- p19m.Scale=Vector3.new(.25,.25,.25)
- local p20 = it("Part",sword)
- p20.CanCollide=false
- p20.FormFactor="Custom"
- p20.TopSurface="Smooth"
- p20.BottomSurface="Smooth"
- p20.Size=Vector3.new(.2,.2,.2)
- weld(p20,p3,-.4,-.2,0,-rad(90),-rad(45),rad(90))
- p20m=it("SpecialMesh",p20)
- p20m.MeshId="rbxassetid://111893941"
- p20m.Scale=Vector3.new(.25,.25,.25)
- local p21 = it("Part",sword)
- p21.CanCollide=false
- p21.FormFactor="Custom"
- p21.TopSurface="Smooth"
- p21.BottomSurface="Smooth"
- p21.Size=Vector3.new(.2,.2,.2)
- weld(p21,p3,.4,-.2,0,-rad(90),-rad(45),rad(90))
- p21m=it("SpecialMesh",p21)
- p21m.MeshId="rbxassetid://111896510"
- p21m.Scale=Vector3.new(.25,.25,.25)
- p16.BrickColor=bc("Institutional white")
- p17.BrickColor=bc("Institutional white")
- p18.BrickColor=bc("Institutional white")
- p19.BrickColor=bc("Institutional white")
- p20.BrickColor=bc("Institutional white")
- p21.BrickColor=bc("Institutional white")
- p16.Reflectance=.25
- p17.Reflectance=.25
- p18.Reflectance=.25
- p19.Reflectance=.25
- p20.Reflectance=.25
- p21.Reflectance=.25
- p2.Transparency=1
- for i,v in pairs(sword:GetChildren()) do
- v.Touched:connect(function(hit)
- if hit.Parent:FindFirstChild("Humanoid") and hit.Parent.Name~=lp.Name and attacking == true then
- hit.Parent.Humanoid:TakeDamage(1)
- end
- end)
- end
- p4.Touched:connect(function(hit)
- if hit.Parent.Name~= lp.Name and hit.Parent:FindFirstChild("Humanoid") and attacking == true then
- explode(hit.Parent.Name)
- end
- end)
- local anim = true
- local equipped = false
- local bin = Instance.new("HopperBin",game.Players.LocalPlayer.Backpack)
- bin.Selected:connect(function()
- equipped = true
- end)
- bin.Deselected:connect(function()
- equipped = false
- end)
- posplus = 0
- local function updateanims()
- if anim==true and equipped == false then
- if Vector3.new(torso.Velocity.x, 0, torso.Velocity.z).magnitude < 2 then
- anglespeed = 1/3
- LerpTo.Neck.To = LerpTo.Neck.Cache * CFrame.Angles(0,0,0)
- LerpTo.RootJoint.To=LerpTo.RootJoint.Cache * CFrame.new(0,0,0)*CFrame.Angles(0,0,0)
- LerpTo.RightArm.To = LerpTo.RightArm.Cache * CFrame.Angles(-rad(155),rad(75),-rad(25))
- LerpTo.LeftArm.To = LerpTo.LeftArm.Cache * CFrame.Angles(-rad(25),0,-rad(15))
- LerpTo.RightLeg.To = LerpTo.RightLeg.Cache * CFrame.Angles(rad(0),0,rad(0))
- LerpTo.LeftLeg.To = LerpTo.LeftLeg.Cache * CFrame.Angles(-rad(0),0,-rad(0))
- end
- if Vector3.new(torso.Velocity.x, 0, torso.Velocity.z).magnitude > 2 then
- anglespeed = 3
- LerpTo.Neck.To = LerpTo.Neck.Cache * CFrame.Angles(-rad(25),0,0)
- LerpTo.RootJoint.To=LerpTo.RootJoint.Cache * CFrame.new(0,0,0)*CFrame.Angles(rad(0),0,sin(angle)*.2)
- LerpTo.RightArm.To = LerpTo.RightArm.Cache * CFrame.Angles(-rad(155),rad(75),-rad(25))
- LerpTo.LeftArm.To = LerpTo.LeftArm.Cache * CFrame.Angles(-rad(25),0,-rad(15))
- LerpTo.RightLeg.To = LerpTo.RightLeg.Cache * CFrame.Angles(-sin(angle)*.8,0,0)
- LerpTo.LeftLeg.To = LerpTo.LeftLeg.Cache * CFrame.Angles(sin(angle)*.8,0,0)
- end
- elseif anim==true and equipped == true then
- if Vector3.new(torso.Velocity.x, 0, torso.Velocity.z).magnitude < 2 then
- anglespeed = 1/3
- LerpTo.Neck.To = LerpTo.Neck.Cache * CFrame.Angles(0,0,0)
- LerpTo.RootJoint.To=LerpTo.RootJoint.Cache * CFrame.new(0,0,0)*CFrame.Angles(0,0,0)
- LerpTo.RightArm.To = LerpTo.RightArm.Cache * CFrame.Angles(rad(75),rad(15),-rad(45))
- LerpTo.LeftArm.To = LerpTo.LeftArm.Cache * CFrame.Angles(rad(75),-rad(15),rad(45))
- LerpTo.RightLeg.To = LerpTo.RightLeg.Cache * CFrame.Angles(rad(5),0,rad(5))
- LerpTo.LeftLeg.To = LerpTo.LeftLeg.Cache * CFrame.Angles(-rad(5),0,-rad(5))
- end
- if Vector3.new(torso.Velocity.x, 0, torso.Velocity.z).magnitude > 2 then
- anglespeed = 3
- LerpTo.Neck.To = LerpTo.Neck.Cache * CFrame.Angles(rad(15),0,0)
- LerpTo.RootJoint.To=LerpTo.RootJoint.Cache * CFrame.new(0,0,0)*CFrame.Angles(rad(15),0,sin(angle)*.2)
- LerpTo.RightArm.To = LerpTo.RightArm.Cache * CFrame.Angles(rad(75),rad(15),-rad(45))
- LerpTo.LeftArm.To = LerpTo.LeftArm.Cache * CFrame.Angles(rad(75),-rad(15),rad(45))
- LerpTo.RightLeg.To = LerpTo.RightLeg.Cache * CFrame.Angles(-sin(angle)*.8,0,0)
- LerpTo.LeftLeg.To = LerpTo.LeftLeg.Cache * CFrame.Angles(sin(angle)*.8,0,0)
- end
- end
- end
- local slash = function()
- anglespeed = 4
- sound("232210079",false,chr,.5)
- LerpTo.Neck.To = LerpTo.Neck.Cache * CFrame.Angles(-rad(25),0,0)
- LerpTo.RootJoint.To=LerpTo.RootJoint.Cache * CFrame.new(0,0,0)*CFrame.Angles(0,0,0)
- LerpTo.RightArm.To = LerpTo.RightArm.Cache * CFrame.Angles(rad(180),0,rad(25))
- LerpTo.LeftArm.To = LerpTo.LeftArm.Cache * CFrame.Angles(0,0,-rad(25))
- LerpTo.RightLeg.To = LerpTo.RightLeg.Cache * CFrame.Angles(sin(angle)*.05,0,0)
- LerpTo.LeftLeg.To = LerpTo.LeftLeg.Cache * CFrame.Angles(-sin(angle)*.05,0,0)
- wait(.15)
- LerpTo.RightArm.To = LerpTo.RightArm.Cache * CFrame.Angles(rad(90),0,-rad(25))
- wait(.15)
- LerpTo.RightArm.To = LerpTo.RightArm.Cache * CFrame.Angles(rad(0),0,-rad(25))
- wait(.15)
- end
- local swipe = function()
- anglespeed = 4
- LerpTo.Neck.To = LerpTo.Neck.Cache * CFrame.Angles(0,0,0)
- LerpTo.RootJoint.To=LerpTo.RootJoint.Cache * CFrame.new(0,0,0)*CFrame.Angles(0,0,0)
- LerpTo.RightArm.To = LerpTo.RightArm.Cache * CFrame.Angles(rad(90),0,rad(0))
- LerpTo.LeftArm.To = LerpTo.LeftArm.Cache * CFrame.Angles(0,0,-rad(25))
- LerpTo.RightLeg.To = LerpTo.RightLeg.Cache * CFrame.Angles(rad(15),0,rad(15))
- LerpTo.LeftLeg.To = LerpTo.LeftLeg.Cache * CFrame.Angles(-rad(15),0,-rad(15))
- wait(.25)
- LerpTo.RightArm.To = LerpTo.RightArm.Cache * CFrame.Angles(rad(0),0,rad(90))
- wait(.25)
- end
- local smash = function()
- anglespeed = 4
- LerpTo.Neck.To = LerpTo.Neck.Cache * CFrame.Angles(0,0,0)
- LerpTo.RootJoint.To=LerpTo.RootJoint.Cache * CFrame.new(0,0,0)*CFrame.Angles(0,0,0)
- LerpTo.RightArm.To = LerpTo.RightArm.Cache * CFrame.Angles(rad(180),0,-rad(55))
- LerpTo.LeftArm.To = LerpTo.LeftArm.Cache * CFrame.Angles(rad(180),0,rad(55))
- LerpTo.RightLeg.To = LerpTo.RightLeg.Cache * CFrame.Angles(rad(15),0,rad(15))
- LerpTo.LeftLeg.To = LerpTo.LeftLeg.Cache * CFrame.Angles(-rad(15),0,-rad(15))
- wait(.15)
- LerpTo.RightArm.To = LerpTo.RightArm.Cache * CFrame.Angles(rad(90),0,-rad(55))
- LerpTo.LeftArm.To = LerpTo.LeftArm.Cache * CFrame.Angles(rad(90),0,rad(55))
- wait(.15)
- LerpTo.RightArm.To = LerpTo.RightArm.Cache * CFrame.Angles(rad(0),0,-rad(55))
- LerpTo.LeftArm.To = LerpTo.LeftArm.Cache * CFrame.Angles(rad(0),0,rad(55))
- wait(.15)
- end
- local spin = function()
- anglespeed = 7
- LerpTo.Neck.To = LerpTo.Neck.Cache * CFrame.Angles(0,0,0)
- LerpTo.RootJoint.To=LerpTo.RootJoint.Cache * CFrame.new(0,0,0)*CFrame.Angles(0,0,0)
- LerpTo.RightArm.To = LerpTo.RightArm.Cache * CFrame.Angles(0,0,rad(90))
- LerpTo.LeftArm.To = LerpTo.LeftArm.Cache * CFrame.Angles(0,0,-rad(90))
- LerpTo.RightLeg.To = LerpTo.RightLeg.Cache * CFrame.Angles(rad(15),0,rad(15))
- LerpTo.LeftLeg.To = LerpTo.LeftLeg.Cache * CFrame.Angles(-rad(15),0,-rad(15))
- for i = 1,10 do
- wait(.15)
- LerpTo.RootJoint.To=LerpTo.RootJoint.Cache * CFrame.new(0,0,0)*CFrame.Angles(0,0,math.cos(1,360)*angle)
- end
- end
- local beam = function()
- LerpTo.Neck.To = LerpTo.Neck.Cache * CFrame.Angles(0,0,0)
- LerpTo.RootJoint.To=LerpTo.RootJoint.Cache * CFrame.new(0,0,0)*CFrame.Angles(0,0,0)
- LerpTo.RightArm.To = LerpTo.RightArm.Cache * CFrame.Angles(0,0,rad(20))
- LerpTo.LeftArm.To = LerpTo.LeftArm.Cache * CFrame.Angles(rad(90),0,0)
- LerpTo.RightLeg.To = LerpTo.RightLeg.Cache * CFrame.Angles(rad(15),0,rad(15))
- LerpTo.LeftLeg.To = LerpTo.LeftLeg.Cache * CFrame.Angles(-rad(15),0,-rad(15))
- wait(.5)
- local bm = it("Part",effects)
- bm.CanCollide=false
- bm.FormFactor="Custom"
- bm.TopSurface="Smooth"
- bm.BottomSurface="Smooth"
- bm.Size=Vector3.new(1000,30,30)
- bm.Reflectance=.5
- bm.Transparency=.5
- bm.BrickColor=bc("Really black")
- local bmm = Instance.new("SpecialMesh",bm)
- bmm.MeshType="Cylinder"
- bm.Anchored = true
- bm.CFrame=chr['Left Arm'].CFrame*CFrame.new(0,-499,0)*CFrame.Angles(0,0,math.pi/2)
- bm.Touched:connect(function(hit)
- if hit.Parent.Name~= lp.Name and hit.Parent:FindFirstChild("Humanoid") then
- hit.Parent:BreakJoints()
- end
- end)
- for i = 1,10 do
- wait()
- bm.Transparency=bm.Transparency+.1
- bmm.Scale=Vector3.new(.5,.5,.5)
- wait()
- bmm.Scale=Vector3.new(1,1,1)
- end
- bm:Destroy()
- end
- mouse.KeyDown:connect(function(key)
- if key == "q" and attacking == false and anim == true and equipped == true then
- anim = false
- attacking = true
- swipe()
- attacking = false
- anim = true
- elseif key == "e" and attacking == false and anim == true and equipped == true then
- anim = false
- attacking = true
- slash()
- attacking = false
- anim = true
- elseif key == "r" and attacking == false and anim == true and equipped == true then
- anim = false
- attacking = true
- smash()
- anim = true
- attacking = false
- elseif key == "t" and attacking == false and anim == true and equipped == true then
- anim = false
- attacking = true
- spin()
- wait()
- attacking = false
- anim = true
- elseif key == "f" and anim == true and attacking == false and equipped == true then
- attacking = true
- anim = false
- beam()
- wait(.5)
- attacking = false
- anim = true
- elseif key == "x" then
- local bp = Instance.new("BodyPosition",chr.Torso)
- bp.position=Vector3.new(0,chr.Torso.Position.y,0)
- bp.maxForce=Vector3.new(0,math.huge,0)
- elseif key == "c" then
- posplus = 2
- elseif key == "v" then
- posplus = -2
- elseif key == "b" then
- if chr.Torso:FindFirstChild("BodyPosition") then
- chr.Torso.BodyPosition:Destroy()
- end
- end
- end)
- mouse.KeyUp:connect(function(key)
- if key == "c" or key == "v" then
- posplus = 0
- end
- end)
- Spawn(function()
- while wait()do
- angle = (angle % 100) + anglespeed/10 -- no matter whut it has to be in a loop or its on exticy
- if chr.Torso:FindFirstChild("BodyPosition") then
- chr.Torso.BodyPosition.position = Vector3.new(0,chr.Torso.Position.y+posplus,0)
- end
- end
- end)
- sdeb=false
- game:service'RunService'.RenderStepped:connect(function()
- if attacking == true then
- local asd = Instance.new("Part",effects)
- asd.CanCollide=false
- asd.FormFactor="Custom"
- asd.TopSurface="Smooth"
- asd.BottomSurface="Smooth"
- asd.Size=Vector3.new(.2,.2,.2)
- asd.BrickColor=BrickColor.new("Really red")
- asd.Anchored=true
- asd.CFrame=p15.CFrame*CFrame.Angles(math.random(-50,50),math.random(-50,50),math.random(-50,50))
- coroutine.resume(coroutine.create(function()
- for i = 1,10 do
- game:GetService("RunService").Stepped:wait()
- asd.Transparency=asd.Transparency+.1
- asd.Size=asd.Size+Vector3.new(.1,.1,.1)
- asd.CFrame=asd.CFrame*CFrame.Angles(math.random(-50,50),math.random(-50,50),math.random(-50,50))
- end
- asd:Destroy()
- end))
- elseif attacking == false and equipped == false then
- local asd = Instance.new("Part",effects)
- asd.CanCollide=false
- asd.FormFactor="Custom"
- asd.TopSurface="Smooth"
- asd.BottomSurface="Smooth"
- asd.Size=Vector3.new(.2,.2,.2)
- asd.BrickColor=BrickColor.new("Really red")
- asd.Anchored=true
- asd.CFrame=chr['Left Arm'].CFrame*CFrame.new(0,-1,0)*CFrame.Angles(math.random(-50,50),math.random(-50,50),math.random(-50,50))
- coroutine.resume(coroutine.create(function()
- for i = 1,10 do
- game:GetService("RunService").Stepped:wait()
- asd.Transparency=asd.Transparency+.1
- asd.Size=asd.Size+Vector3.new(.1,.1,.1)
- asd.CFrame=asd.CFrame*CFrame.Angles(math.random(-50,50),math.random(-50,50),math.random(-50,50))
- end
- asd:Destroy()
- end))
- end
- for _,v in pairs(LerpTo) do
- v.Weld.C0 = Lerp.CFrame(v.Weld.C0,v.To,v.Speed)end
- updateanims()
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement