Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- the head basher sword
- function rand(a)return (math.random()-.5)*2*a end
- function q(f,arg)return coroutine.resume(coroutine.create(f),unpack(arg or {}))end
- function fade(p,s)q(function(part,start)for i=start,1,.05 do part.Transparency = part.Transparency+0.05 wait(1/30)end end,{p,s})end
- function appear(p,s)q(function(part,start)for i=start,0,-.05 do part.Transparency = part.Transparency-0.05 wait(1/30)end end,{p,s})end
- function Part(Name,Parent,Size,CFrame,Color,Trans,Anch,Can,Mat,Ref)
- local p = Instance.new("Part",Parent)p.Name = Name
- p.FormFactor = "Custom"p.Size = Size
- p.Anchored = Anch p.CFrame = CFrame
- p.BrickColor = BrickColor.new(Color)p.Transparency = Trans
- p.TopSurface = 0 p.CanCollide = Can
- p.BottomSurface = 0 p.Material = Mat
- p.Reflectance = Ref or 0;p:BreakJoints()
- p.Locked = true;return p
- end
- function WedgePart(Name,Parent,Size,CFrame,Color,Trans,Anch,Can,Mat,Ref)
- local p = Instance.new("WedgePart",Parent)p.Name = Name
- p.FormFactor = "Custom"p.Size = Size
- p.Anchored = Anch p.CFrame = CFrame
- p.BrickColor = BrickColor.new(Color)p.Transparency = Trans
- p.TopSurface = 0 p.CanCollide = Can
- p.BottomSurface = 0 p.Material = Mat
- p.Reflectance = Ref or 0;p:BreakJoints()
- p.Locked = true;return p
- end
- function CornerWedgePart(Name,Parent,Size,CFrame,Color,Trans,Anch,Can,Mat,Ref)
- local p = Instance.new("CornerWedgePart",Parent)p.Name = Name;p.Size = Size
- p.Anchored = Anch p.CFrame = CFrame
- p.BrickColor = BrickColor.new(Color)p.Transparency = Trans
- p.TopSurface = 0 p.CanCollide = Can
- p.BottomSurface = 0 p.Material = Mat
- p.Reflectance = Ref or 0;p:BreakJoints()
- p.Locked = true;return p
- end
- function Mesh(Parent,Type,Scale,ID,TID)
- local m = Instance.new("SpecialMesh",Parent)m.MeshType = Type
- m.Scale = Scale or Vector3.new(1,1,1)
- if ID then m.MeshId = ID end if TID then m.TextureId = TID end
- return m
- end
- function Weld(p1,p2,c0,c1)
- local w = Instance.new("Weld",p1)w.Part0 = p1;w.Part1 = p2
- w.C0,w.C1 = c0 or CFrame.new(),c1 or CFrame.new()
- return w
- end
- function cslerp(c1,c2,t)
- local function s(a,b,c)return (1-c)*a+(c*b)end
- local com1 = {c1.X,c1.Y,c1.Z,c1:toEulerAnglesXYZ()}
- local com2 = {c2.X,c2.Y,c2.Z,c2:toEulerAnglesXYZ()}
- for i,v in pairs(com1)do com1[i] = s(v,com2[i],t)end
- return CFrame.new(com1[1],com1[2],com1[3])*CFrame.Angles(select(4,unpack(com1)))
- end
- ---------------------------------------------
- player = game:service("Players").LocalPlayer
- local char
- repeat wait() char = player.Character until char
- root = char:WaitForChild("HumanoidRootPart")
- torso = char:WaitForChild("Torso")
- humanoid = char:WaitForChild("Humanoid")
- mouse = player:GetMouse()
- step = game:service("RunService").Stepped
- asset = "http://www.roblox.com/asset/?id="
- meshes = {["blast"] = 20329976,["ring"] = 3270017,["spike"] = 1033714,["cone"] = 1082802,["crown"] = 20329976,["cloud"] = 1095708,["diamond"] = 9756362}
- sounds = {}
- Mode = ""
- c0 = {
- ls = CFrame.new(-1,0.5,0),
- rs = CFrame.new(1,0.5,0),
- lh = CFrame.new(-1,-1,0),
- rh = CFrame.new(1,-1,0),
- nk = CFrame.new(0,1,0),
- tw = CFrame.new(0,0,0),
- }
- c1 = {
- ls = CFrame.new(0.5,0.5,0),
- rs = CFrame.new(-0.5,0.5,0),
- lh = CFrame.new(-.5,1,0),
- rh = CFrame.new(.5,1,0),
- nk = CFrame.new(0,-.5,0),
- tw = CFrame.new(0,0,0),
- }
- rh = Weld(torso,char:WaitForChild("Right Leg"),c0.rh,c1.rh)
- rs = Weld(torso,char:WaitForChild("Right Arm"),c0.rs,c1.rs)
- lh = Weld(torso,char:WaitForChild("Left Leg"),c0.lh,c1.lh)
- ls = Weld(torso,char:WaitForChild("Left Arm"),c0.ls,c1.ls)
- ne = Weld(torso,char:WaitForChild("Head"),c0.nk,c1.nk)
- rw = Weld(root,torso,c0.tw,c1.tw)
- cWalkS = 20
- lastpulse = tick()
- pulsetime = 2.25
- Attacking = false
- colour = {"Black","Bright yellow"}
- Idles = {"FAB"}
- lastIdle = tick()
- curIdle = ""
- isIdlePosing = false
- startedIdle = 0
- bIdleTime = 10
- ---------------------------------------------
- function Smoke(origin,color)
- local p = Part("Effect",workspace,Vector3.new(2,2,2),origin*CFrame.new(rand(5),-1,rand(5)),color or "Black",.1,false,false,"SmoothPlastic")
- local m = Mesh(p,"Sphere",Vector3.new(1.25,1.25,1.25))
- local bp = Instance.new("BodyPosition",p)bp.D = 100 bp.P = 100 bp.position = p.Position+Vector3.new(0,7,0)
- q(function(pa,me)
- fade(pa,.1)
- for i=25,100 do
- me.Scale = me.Scale+Vector3.new(0.15,0.1,0.15)
- wait(1/30)
- end
- pa:Destroy()
- end,{p,m})
- end
- function brickMagic(origin,color,size)
- local p = Part("Effect",workspace,Vector3.new(size,size,size),origin*CFrame.Angles(rand(5),rand(5),rand(5)),color,.2,true,false,"SmoothPlastic")
- local m = Mesh(p,"Brick")
- q(function(pa,me)
- fade(pa,.2)
- for i=20,100 do
- me.Scale = me.Scale-Vector3.new(0.05,0.05,0.05)
- wait(1/30)
- end
- pa:Destroy()
- end,{p,m})
- end
- function spikeMagic(origin,size,color)
- local p = Part("Effect",workspace,Vector3.new(1,1,1),origin*CFrame.new(0,-size,0),color,1,true,false,"SmoothPlastic")
- local m = Mesh(p,"FileMesh",Vector3.new(size/2,size*2,size/2),asset..meshes["spike"])
- q(function(pa,me)
- appear(pa,1)
- for i=1,size,.5 do
- wait(1/30)
- pa.CFrame = pa.CFrame*CFrame.new(0,.5,0)
- end
- wait(math.random(2,3))fade(pa,0)
- Delay(3,function()pa:Destroy()end)
- end,{p,m})
- end
- function placePart(origin,size,color,material)
- local p = Part("Effect",workspace,Vector3.new(size,size,size),origin*CFrame.Angles(rand(5),rand(5),rand(5)),color,0,true,true,material)
- local m = Mesh(p,"Brick")
- q(function(pa,me)
- wait(5)
- fade(pa,0)
- Delay(1.25,function()pa:Destroy()end)
- end,{p,m})
- end
- function crater(origin,dist)
- local b = workspace.Base
- local bc = b and tostring(b.BrickColor) or "Bright green"
- local m = b and b.Material or "Grass"
- for i=0,360,30 do
- local cf = origin*CFrame.Angles(0,math.rad(i),0)*CFrame.new(0,0,dist)*CFrame.Angles(math.rad(i/30),0,rand(5))
- placePart(cf,math.random(10,12),bc,m)
- end
- end
- function cylinderExplode(origin,color,size,ysize)
- local p = Part("Effect",workspace,Vector3.new(size,ysize or size,size),origin,color,.2,true,false,"SmoothPlastic")
- local m = Instance.new("CylinderMesh",p)
- q(function(pa,me)
- for i=.2,1,.0075 do
- me.Scale = me.Scale+Vector3.new(.1,0,.1)
- pa.Transparency = i
- wait(1/30)
- end
- pa:Destroy()
- end,{p,m})
- end
- function ringExplode(origin,color,size)
- local p = Part("Effect",workspace,Vector3.new(size,size,1),origin,color,.2,true,false,"SmoothPlastic")
- local m = Mesh(p,"FileMesh",Vector3.new(),asset..meshes["ring"])
- q(function(pa,me)
- for i=.2,1,.0075 do
- me.Scale = me.Scale-Vector3.new(0.5,0.5,0)
- pa.Transparency = i
- wait(1/30)
- end
- pa:Destroy()
- end,{p,m})
- end
- function crownExplode(origin,color,size)
- local p = Part("Effect",workspace,Vector3.new(size,size,size),origin,color,.2,true,false,"SmoothPlastic")
- local m = Mesh(p,"FileMesh",Vector3.new(size/2,size/2,size/2),asset..meshes["crown"])
- q(function(pa,me)
- for i=.2,1,.025 do
- me.Scale = me.Scale+Vector3.new(0.75,0.75,0.75)
- pa.Transparency = i
- wait(1/30)
- end
- pa:Destroy()
- end,{p,m})
- end
- function glitter(origin,color)
- local p = Part("Effect",workspace,Vector3.new(0.75,0.75,0.75),origin*CFrame.new(rand(5),rand(5),rand(5))*CFrame.Angles(rand(5),rand(5),rand(5)),color,0,true,false,"SmoothPlastic")
- local m = Mesh(p,"Brick",Vector3.new(1,1,1))
- q(function(pa,me)
- fade(pa,0)
- for i=0,1,.05 do
- me.Scale = me.Scale-Vector3.new(0.05,0.05,0.05)
- wait(1/30)
- end
- pa:Destroy()
- end,{p,m})
- end
- function quickSound(id,v)
- local s = Instance.new("Sound",workspace)
- s.SoundId = id
- s.PlayOnRemove = true
- s.Volume = v or 1
- delay(0.025,function()s:remove()end)
- end
- function checkDmgArea(origin,dmg,d)
- for i,v in pairs(workspace:children())do
- if v~=char and v:FindFirstChild("Torso") then
- local h;
- for _,k in pairs(v:children())do if k:IsA("Humanoid") then h = k end end
- local dist = (origin.p - v:FindFirstChild("Torso").CFrame.p).magnitude
- if dist < d and h~=nil then
- h.Health = h.Health - dmg
- end
- end
- end
- end
- function findClosestPlayer(origin,d)
- local bdist,plr = d,nil
- for i,v in pairs(workspace:children())do
- if v~=char and v:FindFirstChild("Torso") then
- local h;
- for _,k in pairs(v:children())do if k:IsA("Humanoid") then h = k end end
- local dist = (origin.p - v:FindFirstChild("Torso").CFrame.p).magnitude
- if dist < bdist and h~=nil and h.Health~=0 then
- bdist,plr = dist,v
- end
- end
- end
- return bdist,plr
- end
- function Shoot(start)
- ringExplode(CFrame.new(start.p,start.p-(start.lookVector*-4)),colour[2],.25)
- local vel = start.lookVector
- local p = Part("Bullet",workspace,Vector3.new(1,1,5),start,colour[2],0.4,true,false,"SmoothPlastic")
- local m = Mesh(p,"Sphere")
- local num = 0
- local ign = sword:children()
- local connect
- connect = step:connect(function()
- num = num + 1
- local pp = p.Position
- local h,po
- repeat
- local r = Ray.new(pp,vel.unit*math.min(999.5,vel.magnitude/30+9))
- h,po = workspace:FindPartOnRayWithIgnoreList(r,ign)
- if h then
- if h.CanCollide then
- break
- else
- table.insert(ign,h)
- h = nil
- end
- else
- break
- end
- until false
- p.CFrame = CFrame.new(po,po+vel)
- if h or num > 300 then
- local cf = p.CFrame
- q(function(cfz)
- for i=1,math.random(1,3)do
- Smoke(cfz,colour[2])
- end
- if h~=nil then
- local obj = h.CFrame:pointToObjectSpace(po)
- local siz = h.Size/2
- local svec = obj/siz
- svec = Vector3.new(math.floor(math.abs(svec.X)+.01)*svec.X/math.abs(svec.X),
- math.floor(math.abs(svec.Y))*svec.Y/math.abs(svec.Y) ,
- math.floor(math.abs(svec.Z))*svec.Z/math.abs(svec.Z))
- if svec.magnitude ~= 1 then return end
- local dir = h.CFrame:vectorToWorldSpace(svec)
- end
- end,{cf})
- if h and h.Parent~=char then
- local hum;
- for i,v in pairs(h.Parent:children())do if v:IsA("Humanoid")then hum = v end end
- if hum then hum:TakeDamage(25)end
- end
- p:Destroy()
- connect:disconnect()
- end
- end)
- end
- function headSmash(victim)
- if victim==nil then return end
- Attacking = true
- Mode = "Custom"
- cWalkS = 0
- r,e = pcall(function()
- local t = victim:FindFirstChild("Torso")
- local tcf = t.CFrame
- local bg = Instance.new("BodyGyro",torso)
- bg.maxTorque = Vector3.new(4e5,4e5,4e5)*20e45
- bg.cframe = CFrame.new(root.CFrame.p,CFrame.new(tcf.p.x,root.CFrame.p.y,tcf.p.z).p)
- local bp = Instance.new("BodyPosition",t)
- bp.maxForce = Vector3.new(4e5,4e5,4e5)*20e45
- bp.position = tcf.p
- for i=1,3 do
- local cf = CFrame.new(t.CFrame.x+rand(5),t.CFrame.y,t.CFrame.z+rand(5))
- spikeMagic(cf,4,colour[2])
- end
- for i=1,50 do
- wait(1/30)
- local speed = i/50
- local mpos = torso.CFrame * CFrame.new(1.5,0.5,0)
- local cf = CFrame.new(mpos.p,t.CFrame.p) * CFrame.Angles(math.pi/2,0,0)
- local x,y,z = torso.CFrame:toObjectSpace(cf):toEulerAnglesXYZ()
- rs.C0 = cslerp(rs.C0,c0.rs*CFrame.Angles(x,y,z),speed)
- ls.C0 = cslerp(ls.C0,c0.ls*CFrame.Angles(0,0,-math.pi/4),speed)
- handlew.C0 = cslerp(handlew.C0,ohw*CFrame.Angles(0,0,math.pi/2),speed)
- rh.C0 = cslerp(rh.C0,c0.rh*CFrame.Angles(0,0,0),speed)
- lh.C0 = cslerp(lh.C0,c0.lh*CFrame.Angles(0,0,0),speed)
- ne.C0 = cslerp(ne.C0,c0.nk*CFrame.Angles(-y,0,0),speed)
- rw.C0 = cslerp(rw.C0,c0.tw*CFrame.Angles(0,math.pi/4,0),speed)
- bp.position = bp.position + Vector3.new(0,1,0)
- end
- Shoot(blade.CFrame*CFrame.Angles(math.pi/2,0,0))
- victim:BreakJoints()
- bg:Destroy()
- end)if not r then print(e) end
- Attacking = false
- Mode = ""
- cWalkS = 20
- end
- function Swing1()
- Attacking = true
- Mode = "Custom"
- r,e = pcall(function()
- --[[for i=1,25 do
- wait(1/30)
- local speed = i/25
- rs.C0 = cslerp(rs.C0,c0.rs*CFrame.Angles(x,y,z),speed)
- ls.C0 = cslerp(ls.C0,c0.ls*CFrame.Angles(0,0,-math.pi/4),speed)
- handlew.C0 = cslerp(handlew.C0,ohw*CFrame.Angles(0,0,math.pi/2),speed)
- rh.C0 = cslerp(rh.C0,c0.rh*CFrame.Angles(0,0,0),speed)
- lh.C0 = cslerp(lh.C0,c0.lh*CFrame.Angles(0,0,0),speed)
- ne.C0 = cslerp(ne.C0,c0.nk*CFrame.Angles(-y,0,0),speed)
- rw.C0 = cslerp(rw.C0,c0.tw*CFrame.Angles(0,math.pi/4,0),speed)
- end]]
- end)if not r then print(e) end
- Attacking = false
- Mode = ""
- cWalkS = 20
- end
- function charge()
- Attacking = true
- Mode = "Custom"
- cWalkS = 0
- r,e = pcall(function()
- for i=1,75 do
- wait(1/30)
- glitter(torso.CFrame,colour[2])
- local speed = i/100
- rs.C0 = cslerp(rs.C0,c0.rs*CFrame.Angles(math.pi/1.75,0,-math.pi/8),speed)
- ls.C0 = cslerp(ls.C0,c0.ls*CFrame.Angles(math.pi/8,0,math.pi/4),speed)
- handlew.C0 = cslerp(handlew.C0,ohw*CFrame.Angles(0,0,math.pi*2.5),speed)
- rh.C0 = cslerp(rh.C0,c0.rh*CFrame.new(0,1,-.5)*CFrame.Angles(-math.pi/8,0,0),speed)
- lh.C0 = cslerp(lh.C0,c0.lh*CFrame.new(0,0,-.5)*CFrame.Angles(-math.pi/2,0,0),speed)
- ne.C0 = cslerp(ne.C0,c0.nk*CFrame.Angles(-math.pi/6,0,0),speed)
- rw.C0 = cslerp(rw.C0,c0.tw*CFrame.new(0,-1.5,0)*CFrame.Angles(0,0,0),speed)
- end
- end)if not r then print(e)end
- Attacking = false
- Mode = ""
- cWalkS = 20
- end
- ---------------------------------------------
- pcall(function()char:FindFirstChild("Sword"):Destroy()end)
- sword = Instance.new("Model",char)
- sword.Name = "Sword"
- handle = Part("Handle",sword,Vector3.new(.25,2,.25),torso.CFrame,colour[1],0,false,false,"SmoothPlastic")
- handlew = Weld(char:WaitForChild("Right Arm"),handle,CFrame.new(0,-1.1,0)*CFrame.Angles(-math.pi/2,-math.pi/2,0))
- p1 = WedgePart("P",sword,Vector3.new(.25,.75,.25),torso.CFrame,colour[1],0,false,false,"SmoothPlastic")
- p1w = Weld(handle,p1,CFrame.new(0.25,-.625,0)*CFrame.Angles(0,-math.pi/2,0))
- p2 = WedgePart("P",sword,Vector3.new(.25,.75,.25),torso.CFrame,colour[1],0,false,false,"SmoothPlastic")
- p2w = Weld(handle,p2,CFrame.new(-0.25,-.625,0)*CFrame.Angles(0,math.pi/2,0))
- p3 = Part("P",sword,Vector3.new(.25,.5,.25),torso.CFrame,colour[1],0,false,false,"SmoothPlastic")
- p3w = Weld(handle,p3,CFrame.new(.25,.75,0))
- p4 = Part("P",sword,Vector3.new(.25,.5,.25),torso.CFrame,colour[1],0,false,false,"SmoothPlastic")
- p4w = Weld(handle,p4,CFrame.new(-.25,.75,0))
- p5 = WedgePart("P",sword,Vector3.new(.25,.5,.25),torso.CFrame,colour[1],0,false,false,"SmoothPlastic")
- p5w = Weld(p3,p5,CFrame.new(0.25,0,0)*CFrame.Angles(math.pi,-math.pi/2,0))
- p6 = WedgePart("P",sword,Vector3.new(.25,.5,.25),torso.CFrame,colour[1],0,false,false,"SmoothPlastic")
- p6w = Weld(p4,p6,CFrame.new(-0.25,0,0)*CFrame.Angles(math.pi,math.pi/2,0))
- p7 = CornerWedgePart("P",sword,Vector3.new(.25,.5,.25),torso.CFrame,colour[1],0,false,false,"SmoothPlastic")
- p7m = Mesh(p7,"FileMesh",Vector3.new(.5,1,.4),"http://www.roblox.com/asset/?id=11294911")
- p7w = Weld(p5,p7,CFrame.new(-.225,0,0)*CFrame.Angles(0,-math.pi/2,0))
- p8 = WedgePart("P",sword,Vector3.new(.75,.5,0),torso.CFrame,colour[1],0,false,false,"SmoothPlastic")
- p8w = Weld(handle,p8,CFrame.new(0,.75,.225)*CFrame.Angles(math.pi,0,0))
- p9 = CornerWedgePart("P",sword,Vector3.new(.25,.5,.25),torso.CFrame,colour[1],0,false,false,"SmoothPlastic")
- p9m = Mesh(p9,"FileMesh",Vector3.new(.4,1,.5),"http://www.roblox.com/asset/?id=11294911")
- p9w = Weld(p5,p9,CFrame.new(.225,0,0)*CFrame.Angles(0,-math.pi,0))
- p10 = CornerWedgePart("P",sword,Vector3.new(.25,.5,.25),torso.CFrame,colour[1],0,false,false,"SmoothPlastic")
- p10m = Mesh(p10,"FileMesh",Vector3.new(.4,1,.5),"http://www.roblox.com/asset/?id=11294911")
- p10w = Weld(p6,p10,CFrame.new(.225,0,0)*CFrame.Angles(0,-math.pi,0))
- p11 = CornerWedgePart("P",sword,Vector3.new(.25,.5,.25),torso.CFrame,colour[1],0,false,false,"SmoothPlastic")
- p11m = Mesh(p11,"FileMesh",Vector3.new(.5,1,.4),"http://www.roblox.com/asset/?id=11294911")
- p11w = Weld(p6,p11,CFrame.new(-.225,0,0)*CFrame.Angles(0,-math.pi/2,0))
- p12 = WedgePart("P",sword,Vector3.new(.75,.5,0),torso.CFrame,colour[1],0,false,false,"SmoothPlastic")
- p12w = Weld(handle,p12,CFrame.new(0,.75,-.225)*CFrame.Angles(-math.pi*2,0,math.pi))
- blade = Part("Blade",sword,Vector3.new(.75,7.5,.25),torso.CFrame,colour[1],0,false,false,"SmoothPlastic")
- bladew = Weld(handle,blade,CFrame.new(0,7.5/2+1,0))
- p13 = WedgePart("P",sword,Vector3.new(.25,7.5,.25),torso.CFrame,colour[1],0,false,false,"SmoothPlastic")
- p13w = Weld(blade,p13,CFrame.new(-.5,0,0)*CFrame.Angles(math.pi,math.pi/2,0))
- p14 = WedgePart("P",sword,Vector3.new(.25,7.5,.25),torso.CFrame,colour[1],0,false,false,"SmoothPlastic")
- p14w = Weld(blade,p14,CFrame.new(.5,0,0)*CFrame.Angles(math.pi,-math.pi/2,0))
- p15 = WedgePart("P",sword,Vector3.new(.25,1.5,1.25),torso.CFrame,colour[1],0,false,false,"SmoothPlastic")
- p15w = Weld(blade,p15,CFrame.new(0,7.5/2+.75,0)*CFrame.Angles(0,math.pi/2,0))
- p16 = WedgePart("P",sword,Vector3.new(.75,7.5,.25),torso.CFrame,colour[1],0,false,false,"SmoothPlastic")
- p16w = Weld(blade,p16,CFrame.new(0,0,-.25)*CFrame.Angles(math.pi,math.pi,0))
- p17 = CornerWedgePart("P",sword,Vector3.new(.25,7.5,.25),torso.CFrame,colour[1],0,false,false,"SmoothPlastic")
- p17m = Mesh(p17,"FileMesh",Vector3.new(.5,7.5*2,.5),"http://www.roblox.com/asset/?id=11294911")
- p17w = Weld(p16,p17,CFrame.new(-.5,0,0)*CFrame.Angles(0,-math.pi/2,0))
- p18 = CornerWedgePart("P",sword,Vector3.new(.25,7.5,.25),torso.CFrame,colour[1],0,false,false,"SmoothPlastic")
- p18m = Mesh(p18,"FileMesh",Vector3.new(.5,7.5*2,.5),"http://www.roblox.com/asset/?id=11294911")
- p18w = Weld(p16,p18,CFrame.new(.5,0,0)*CFrame.Angles(0,math.pi,0))
- p19 = CornerWedgePart("P",sword,Vector3.new(.25,1.5,1.25),torso.CFrame,colour[1],0,false,false,"SmoothPlastic")
- p19m = Mesh(p19,"FileMesh",Vector3.new(.5,1.5*2,1.25*2),"http://www.roblox.com/asset/?id=11294911")
- p19w = Weld(p15,p19,CFrame.new(0.25,0,0)*CFrame.Angles(0,math.pi,0))
- p20 = WedgePart("P",sword,Vector3.new(.75,7.5,.25),torso.CFrame,colour[1],0,false,false,"SmoothPlastic")
- p20w = Weld(blade,p20,CFrame.new(0,0,.25)*CFrame.Angles(math.pi,math.pi*2,0))
- p21 = CornerWedgePart("P",sword,Vector3.new(.25,7.5,.25),torso.CFrame,colour[1],0,false,false,"SmoothPlastic")
- p21m = Mesh(p21,"FileMesh",Vector3.new(.5,7.5*2,.5),"http://www.roblox.com/asset/?id=11294911")
- p21w = Weld(p20,p21,CFrame.new(-.5,0,0)*CFrame.Angles(0,-math.pi/2,0))
- p22 = CornerWedgePart("P",sword,Vector3.new(.25,7.5,.25),torso.CFrame,colour[1],0,false,false,"SmoothPlastic")
- p22m = Mesh(p22,"FileMesh",Vector3.new(.5,7.5*2,.5),"http://www.roblox.com/asset/?id=11294911")
- p22w = Weld(p20,p22,CFrame.new(.5,0,0)*CFrame.Angles(0,math.pi,0))
- p23 = CornerWedgePart("P",sword,Vector3.new(1.25,1.5,.25),torso.CFrame,colour[1],0,false,false,"SmoothPlastic")
- p23m = Mesh(p23,"FileMesh",Vector3.new(1.25*2,1.5*2,.5),"http://www.roblox.com/asset/?id=11294911")
- p23w = Weld(p15,p23,CFrame.new(-.25,0,0)*CFrame.Angles(0,-math.pi/2,0))
- p24 = Part("P",sword,Vector3.new(1.25,1,.75),torso.CFrame,colour[1],0,false,false,"SmoothPlastic")
- p24m = Mesh(p24,"Torso",Vector3.new(1,1,.875))
- p24w = Weld(handle,p24,CFrame.new(0,1.5,0))
- ------ effect
- parts = {}
- for i=1,6 do
- local p = Part(tostring(i),sword,Vector3.new(.25,.25,.25),torso.CFrame,colour[2],1,false,false,"SmoothPlastic")
- local pm = Mesh(p,"FileMesh",Vector3.new(.5+i/25,1,.375+i/25),asset..meshes.diamond)
- local pw = Weld(blade,p,CFrame.new(0,-4+i+1,0))
- table.insert(parts,p)
- end
- ---------------------------------------------
- ohw = handlew.C0
- ---------------------------------------------
- mouse.Button1Down:connect(function()
- end)
- mouse.KeyDown:connect(function(key)
- key:lower()
- local d,p = findClosestPlayer(torso.CFrame,5)
- if key=="q" and not Attacking then headSmash(p)
- elseif key=="e" and not Attacking then charge()end
- end)
- mouse.KeyUp:connect(function(key)
- end)
- ---------------------------------------------
- count = 0
- angle = 0
- counttime = 70
- countspeed = 1
- speed = .3
- perc = 0
- increment = 1/#parts
- step:connect(function()
- count = (count%counttime)+countspeed
- angle = math.pi*math.sin((math.pi*2)/counttime*count)
- perc = (perc%1)+0.02
- rootVel = Vector3.new(root.Velocity.x,0,root.Velocity.z)
- -----------------------------
- for i,v in pairs(parts)do v.Transparency = math.sin(math.pi*((perc+increment*i)%1))end
- humanoid.WalkSpeed = cWalkS
- if (tick()-lastpulse) > pulsetime then
- lastpulse = tick()
- ringExplode(CFrame.new(torso.CFrame.x,1,torso.CFrame.z)*CFrame.Angles(math.pi/2,0,0),colour[1],4)
- end
- -----------------------------
- if Mode=="Custom"or rootVel.magnitude > 2 then
- --- debug
- isIdlePosing,curIdle,lastIdle = false,"",tick()
- --- end debug
- end
- if rootVel.magnitude < 2 and Mode~="Custom" then
- counttime = 50
- countspeed = .5
- speed = .1
- if (tick()-lastIdle) > bIdleTime and not isIdlePosing then curIdle = Idles[math.random(1,#Idles)] startedIdle = tick() isIdlePosing = true end
- if isIdlePosing and (tick()-startedIdle) > bIdleTime/2 then isIdlePosing = false curIdle = "" lastIdle = tick() end
- if curIdle=="" then
- rs.C0 = cslerp(rs.C0,c0.rs*CFrame.Angles(math.pi/3+angle*speed*.1,0,-.1),speed)
- ls.C0 = cslerp(ls.C0,c0.ls*CFrame.Angles(-angle*speed*.2,0,0),speed)
- handlew.C0 = cslerp(handlew.C0,ohw*CFrame.new(1,.6,0.3)*CFrame.Angles(0,-math.pi/9,-math.pi/2),speed)
- rh.C0 = cslerp(rh.C0,c0.rh*CFrame.Angles(-angle*speed*.2,0,0),speed)
- lh.C0 = cslerp(lh.C0,c0.lh*CFrame.Angles(angle*speed*.2,0,0),speed)
- ne.C0 = cslerp(ne.C0,c0.nk,speed)
- rw.C0 = cslerp(rw.C0,c0.tw,speed)
- elseif curIdle=="FAB" then
- rs.C0 = cslerp(rs.C0,c0.rs*CFrame.new(0,.5,0)*CFrame.Angles(-math.pi,0,math.pi/6),speed)
- ls.C0 = cslerp(ls.C0,c0.ls*CFrame.Angles(0,0,-math.pi/8),speed)
- handlew.C0 = cslerp(handlew.C0,ohw*CFrame.Angles(0,0,math.pi*2.5),speed)
- rh.C0 = cslerp(rh.C0,c0.rh*CFrame.Angles(0,0,math.pi/10),speed)
- lh.C0 = cslerp(lh.C0,c0.lh*CFrame.Angles(0,0,-math.pi/10),speed)
- ne.C0 = cslerp(ne.C0,c0.nk*CFrame.Angles(math.pi/6,-math.pi/4,0),speed)
- rw.C0 = cslerp(rw.C0,c0.tw,speed)
- end
- elseif rootVel.magnitude > 2 and Mode~="Custom" then
- counttime = 25
- countspeed = 1.5
- speed = .4
- rs.C0 = cslerp(rs.C0,c0.rs*CFrame.Angles(math.pi/3+angle*speed*.1,0,-.1),speed)
- ls.C0 = cslerp(ls.C0,c0.ls*CFrame.Angles(math.pi/8+angle*speed,0,math.pi/8*angle*speed),speed)
- handlew.C0 = cslerp(handlew.C0,ohw*CFrame.new(1,.6,0.3)*CFrame.Angles(0,-math.pi/9,-math.pi/2),speed)
- lh.C0 = cslerp(lh.C0,c0.lh*CFrame.new(0,-angle*speed*.3,0)*CFrame.Angles(-angle*speed*.75,0,-angle*speed*.1),speed)
- rh.C0 = cslerp(rh.C0,c0.rh*CFrame.new(0,angle*speed*.3,0)*CFrame.Angles(angle*speed*.75,0,-angle*speed*.1),speed)
- ne.C0 = cslerp(ne.C0,c0.nk*CFrame.Angles(math.pi/17,angle*speed*.025,0),speed)
- rw.C0 = cslerp(rw.C0,c0.tw*CFrame.Angles(-math.pi/20,angle*speed*.05,0),speed)
- end
- end)
Add Comment
Please, Sign In to add comment