Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Player = game:GetService("Players").LocalPlayer
- Character = Player.Character
- PlayerGui = Player.PlayerGui
- Backpack = Player.Backpack
- Torso = Character.Torso
- Head = Character.Head
- Humanoid = Character.Humanoid
- LeftArm = Character["Left Arm"]
- LeftLeg = Character["Left Leg"]
- RightArm = Character["Right Arm"]
- RightLeg = Character["Right Leg"]
- LS = Torso["Left Shoulder"]
- LH = Torso["Left Hip"]
- RS = Torso["Right Shoulder"]
- RH = Torso["Right Hip"]
- Neck = Torso.Neck
- it=Instance.new
- vt=Vector3.new
- cf=CFrame.new
- euler=CFrame.fromEulerAnglesXYZ
- angles=CFrame.Angles
- necko=cf(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
- necko2=cf(0, -0.5, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
- attack = false
- attacktype = 1
- damage = 99999999
- oridamage = 99999999
- BladeNumb=0.8
- GyroNumb=0
- attackdebounce = false
- ssdebounce=false
- MMouse=nil
- Mode="Sword"
- cannonmode=false
- combo=0
- spinning=false
- shootmode=true
- --player
- player = nil
- --save shoulders
- RSH, LSH = nil, nil
- --welds
- RW, LW = Instance.new("Weld"), Instance.new("Weld")
- RW.Name="Right Shoulder" LW.Name="Left Shoulder"
- if Character:findFirstChild("Blast Blade",true) ~= nil then
- Character:findFirstChild("Blast Blade",true).Parent = nil
- end
- if Character:findFirstChild("Block",true) ~= nil then
- Character:findFirstChild("Block",true).Parent = nil
- end
- function part(formfactor,parent,reflectance,transparency,brickcolor,name,size)
- local fp = it("Part")
- fp.formFactor = formfactor
- fp.Parent = parent
- fp.Reflectance = reflectance
- fp.Transparency = transparency
- fp.CanCollide = false
- fp.Locked=true
- fp.BrickColor = brickcolor
- fp.Name = name
- fp.Size = size
- fp.Position = Torso.Position
- fp.BottomSurface="Smooth"
- fp.TopSurface="Smooth"
- fp:BreakJoints()
- return fp
- end
- function mesh(Mesh,part,meshtype,meshid,offset,scale)
- local mesh = it(Mesh)
- mesh.Parent = part
- if Mesh=="SpecialMesh" then
- mesh.MeshType = meshtype
- mesh.MeshId = meshid
- end
- mesh.Offset=offset
- mesh.Scale=scale
- return mesh
- end
- function weld(parent,part0,part1,c0)
- local weld = it("Weld")
- weld.Parent = parent
- weld.Part0 = part0
- weld.Part1 = part1
- weld.C0 = c0
- return weld
- end
- local modelzorz = Instance.new("Model")
- modelzorz.Parent = Character
- modelzorz.Name = "Blast Blade"
- local prt1=part(3,modelzorz,0,0,Torso.BrickColor,"Part1",vt(1,1,1))
- local prt2=part(3,modelzorz,0,0,BrickColor.new("Black"),"Part2",vt(1,1,1))
- local prt3=part(3,modelzorz,0,0,BrickColor.new("Dark stone grey"),"Part3",vt(0.8,0.5,0.8))
- local prt5=part(3,modelzorz,0,0,BrickColor.new("Dark stone grey"),"Part5",vt(1,1,1))
- local prt6=part(3,modelzorz,0,0,BrickColor.new("Dark stone grey"),"Part6",vt(1,1,1))
- local prt7=part(3,modelzorz,0,0,BrickColor.new("Bright red"),"Part7",vt(1,1,1))
- local prt8=part(3,modelzorz,0,0,BrickColor.new("Bright red"),"Part8",vt(1,1,1))
- local hitbox=part(3,modelzorz,0,1,BrickColor.new("Black"),"Hitbox",vt(1,5,3))
- local msh1=mesh("CylinderMesh",prt1,"","",vt(0,0,0),vt(0.45,1,0.45))
- local msh2=mesh("CylinderMesh",prt2,"","",vt(0,0,0),vt(0.4,2,0.4))
- local msh3=mesh("SpecialMesh",prt3,"Head","",vt(0,0,0),vt(1,1,1))
- local msh5=mesh("SpecialMesh",prt5,"Head","",vt(0,0,0),vt(0.8,0.5,0.8))
- local msh6=mesh("BlockMesh",prt6,"","",vt(0,0,0),vt(0.5,0.5,1.3))
- local msh7=mesh("SpecialMesh",prt7,"Sphere","",vt(0,0,0),vt(1.4,1.4,1.4))
- local msh8=mesh("SpecialMesh",prt8,"FileMesh","http://www.roblox.com/asset/?id=3270017",vt(0,0,0),vt(1.5,1.5,1.5))
- local wld1=weld(prt1,prt1,Torso,euler(-2.5,1.57,0)*cf(-2,-3,-0.6))
- local wld2=weld(prt2,prt2,prt1,euler(0,0,0)*cf(0,0,0))
- local wld3=weld(prt3,prt3,prt2,euler(0,0,0)*cf(0,1.2,0))
- local wld5=weld(prt5,prt5,prt2,euler(0,0,0)*cf(0,-1,0))
- local wld6=weld(prt6,prt6,prt5,euler(0,0,0)*cf(0,-0.2,0))
- local wld7=weld(prt7,prt7,prt6,euler(0,0,0)*cf(0,-1,0))
- local wld8=weld(prt8,prt8,prt7,euler(0,1.57,0)*cf(0,0,0))
- local hitboxwld=weld(hitbox,hitbox,prt7,euler(0,0,0)*cf(0,-1.5,0))
- numb=0
- for i=1,8 do
- local prt4=part(3,modelzorz,0.2,0,BrickColor.new("Medium stone grey"),"Part4",vt(1,1,1))
- local msh4=mesh("SpecialMesh",prt4,"FileMesh","http://www.roblox.com/asset/?id=1778999",vt(0,0,0),vt(0.3,0.2,0.3))
- local wld4=weld(prt4,prt4,prt3,cf(0,-0.4,0)*euler(1.57,numb,0))
- numb=numb+0.785
- end
- numb=0
- for i=1,4 do
- local prt9=part(3,modelzorz,0,0,BrickColor.new("Bright red"),"Part9",vt(1,1,1))
- local msh9=mesh("CylinderMesh",prt9,"","",vt(0,0,0),vt(0.2,2,0.2))
- local wld9=weld(prt9,prt9,prt8,cf(0,0,0)*euler(0,0,numb))
- numb=numb+0.785
- end
- numb=0
- numb2=0
- numb3=0
- for i=1,8 do
- local prt10=part(3,modelzorz,0.4,0,BrickColor.new("White"),"Part10",vt(1,1,1))
- local msh10=mesh("SpecialMesh",prt10,"Wedge","",vt(0,0,0),vt(0.3-numb2,1.5+numb3,1.5-numb3))
- local wld10=weld(prt10,prt10,prt6,euler(0,3.14,0)*cf(0,-0.6-numb,-0.8))
- coroutine.resume(coroutine.create(function(Weld,Number,Number3)
- while true do
- wait(0)
- wld10.C0=euler(0,3.14,0)*cf(0,-0.6-Number,-BladeNumb+(Number3/2))
- end
- end),wld10,numb,numb3)
- local prt11=part(3,modelzorz,0.4,0,BrickColor.new("White"),"Part11",vt(1,1,1))
- local msh11=mesh("SpecialMesh",prt11,"Wedge","",vt(0,0,0),vt(0.3-numb2,1.5+numb3,1.5-numb3))
- local wld11=weld(prt11,prt11,prt6,cf(0,-0.6-numb,0.8))
- coroutine.resume(coroutine.create(function(Weld,Number,Number3)
- while true do
- wait(0)
- wld11.C0=cf(0,-0.6-Number,BladeNumb-(Number3/2))
- end
- end),wld11,numb,numb3)
- numb=numb+0.6
- numb2=numb2+0.01
- numb3=numb3-0.1
- end
- if (script.Parent.className ~= "HopperBin") then
- Tool = Instance.new("HopperBin")
- Tool.Parent = Backpack
- Tool.Name = "Blast Blade"
- script.Parent = Tool
- end
- Bin = script.Parent
- local bg = it("BodyGyro")
- bg.maxTorque = Vector3.new(4e+005,4e+005,4e+005)*math.huge
- bg.P = 20e+003
- bg.Parent = nil
- so = function(id,par,vol,pit)
- coroutine.resume(coroutine.create(function()
- local sou = Instance.new("Sound",par or workspace)
- sou.Volume=vol
- sou.Pitch=pit or 1
- sou.SoundId=id
- wait()
- sou:play()
- wait(6)
- sou:Remove()
- end))
- end
- function unequipweld()
- wld1.Part1=Torso
- wld1.C0=euler(-2.5,1.57,0)*cf(-2,-3,-0.6)
- wld1.C1=cf(0,0,0)
- end
- function equipweld()
- wld1.Part1=RightArm
- wld1.C0=euler(1.57+0.4,0,0)*cf(0,1,0)
- end
- function hideanim()
- equipped=false
- wait(0.1)
- bg.Parent=nil
- Neck.C0=necko
- unequipweld()
- end
- function equipanim()
- equipped=true
- wait(0.1)
- equipweld()
- if Mode=="Sword" then
- Neck.C0=necko
- RW.C0=cf(0.5, 0.5, -0.5) * euler(1,0,0)
- RW.C1=cf(0, 0.5, 0) * euler(0,-1.5,0.4)
- LW.C0=cf(-1, 0.5, -0.5) * euler(1,0,0)
- LW.C1=cf(0, 0.5, 0) * euler(0,0,0)
- elseif Mode=="Cannon" then
- coroutine.resume(coroutine.create(function()
- bg.maxTorque = vt(math.huge,math.huge,math.huge)
- bg.P = 9000
- bg.Parent = Torso
- --wld1.C0 = euler(0,0,0) * cf(0,0,0)
- while cannonmode==true do
- wait()
- local pos4 = vt(workspace.CurrentCamera.CoordinateFrame.X,Head.Position.Y,workspace.CurrentCamera.CoordinateFrame.Z)
- bg.cframe = cf(Head.Position,pos4) * euler(0,3.14+GyroNumb,0) * cf(0,0,0) --cf(Torso.Position,MMouse.Hit.p) *
- bg.Parent = Head
- local pos5 = Vector3.new(MMouse.Hit.p.x,Head.Position.Y,MMouse.Hit.p.z)
- offset=(Torso.Position.y-MMouse.Hit.p.y)/60
- mag=(Torso.Position-MMouse.Hit.p).magnitude/80
- offset=offset/mag
- end
- for i=0,1,0.1 do
- wait()
- bg.Parent=nil
- end
- end))
- Neck.C0=necko*euler(0,0,1)
- wld1.C0=euler(1.57,0,0)*cf(0,1,0)
- RW.C0=cf(1.5, 0.5, 0) * euler(0,1,0)
- RW.C1=cf(0, 0.5, 0) * euler(0,0,0)
- LW.C0=cf(-1.5, 0.5, -0.5) * euler(1,1,0)
- LW.C1=cf(0, 0.5, 0) * euler(0,0,0)
- end
- end
- function rayCast(Pos, Dir, Max, Ignore) -- Origin Position , Direction, MaxDistance , IgnoreDescendants
- return game.Workspace:FindPartOnRay(Ray.new(Pos, Dir.unit * (Max or 999.999)), Ignore)
- end
- spread=0
- range=100
- rangepower=25
- function shoottrail(mouse,baseprt)
- coroutine.resume(coroutine.create(function(v)
- local spreadvector = (Vector3.new(math.random(-spread,spread),math.random(-spread,spread),math.random(-spread,spread))) * (baseprt.Position-MMouse.Hit.p).magnitude/100
- local dir = CFrame.new((baseprt.Position+MMouse.Hit.p)/2,MMouse.Hit.p+spreadvector)
- local hit,pos = rayCast(baseprt.Position,dir.lookVector,10,Character)
- local rangepos = range
- local function drawtrail(From,To)
- local effectsmsh = Instance.new("CylinderMesh")
- effectsmsh.Scale = Vector3.new(1,1,1)
- effectsmsh.Name = "Mesh"
- local effectsg = Instance.new("Part")
- effectsg.formFactor = 3
- effectsg.CanCollide = false
- effectsg.Name = "Eff"
- effectsg.Locked = true
- effectsg.Anchored = true
- effectsg.Size = Vector3.new(0.2,0.2,0.2)
- effectsg.Parent = workspace
- effectsmsh.Parent = effectsg
- effectsg.BrickColor = BrickColor.new("Bright red")
- effectsg.Reflectance = 0.25
- local LP = From
- local point1 = To
- local mg = (LP - point1).magnitude
- effectsmsh.Scale = Vector3.new(5,mg*5,5)
- if shootmode==true then
- Lightning(LP,point1,5,1,"Bright red",0.3,0.1)
- end
- effectsg.CFrame = CFrame.new((LP+point1)/2,point1) * CFrame.Angles(math.rad(90),0,0)
- coroutine.resume(coroutine.create(function()
- for i = 0 , 1 , 0.2 do
- wait()
- effectsg.Transparency = 1*i
- effectsmsh.Scale = Vector3.new(3-3*i,mg*5,3-3*i)
- end
- effectsg.Parent = nil
- end))
- end
- local newpos = baseprt.Position
- local inc = rangepower
- repeat
- wait()
- rangepos = rangepos - 10
- --dir = dir * CFrame.Angles(math.rad(-1),0,0)
- hit,pos = rayCast(newpos,dir.lookVector,inc,Character)
- drawtrail(newpos,pos)
- newpos = newpos + (dir.lookVector * inc)
- if hit ~= nil then
- if hit.Parent:FindFirstChild("Humanoid") ~= nil then
- hum = hit.Parent.Humanoid
- tTorso=hit.Parent.Torso
- Damagefunc1(hit,10,30)
- attackdebounce=false
- --ADmg(hum,hit)
- elseif hit.Parent.Parent ~= nil and hit.Parent.Parent:FindFirstChild("Humanoid") ~= nil then
- hum = hit.Parent.Parent.Humanoid
- tTorso=hit.Parent.Parent.Torso
- Damagefunc1(hit.Parent.Parent.Torso,10,30)
- attackdebounce=false
- --ADmg(hum,hit)
- end
- MagicCircle(BrickColor.new("Bright red"),CFrame.new(newpos),2,2,2,3,3,3)
- MagicBlock(BrickColor.new("Bright red"),CFrame.new(newpos),2,2,2,2,2,2)
- end
- until rangepos <= 0
- end))
- end
- function shoottrail2(mouse,baseprt)
- coroutine.resume(coroutine.create(function(v)
- local spreadvector = (Vector3.new(math.random(-spread,spread),math.random(-spread,spread),math.random(-spread,spread))) * (baseprt.Position-MMouse.Hit.p).magnitude/100
- local dir = CFrame.new((baseprt.Position+MMouse.Hit.p)/2,MMouse.Hit.p+spreadvector)
- local hit,pos = rayCast(baseprt.Position,dir.lookVector,10,Character)
- local rangepos = range*5
- local function drawtrail(From,To)
- local effectsmsh = Instance.new("SpecialMesh")
- effectsmsh.Scale = Vector3.new(1,1,1)
- effectsmsh.Name = "Mesh"
- effectsmsh.MeshType = "Sphere"
- local effectsg = Instance.new("Part")
- effectsg.formFactor = 3
- effectsg.CanCollide = false
- effectsg.Name = "Eff"
- effectsg.Locked = true
- effectsg.Anchored = true
- effectsg.Size = Vector3.new(0.2,0.2,0.2)
- effectsg.Parent = workspace
- effectsmsh.Parent = effectsg
- effectsg.BrickColor = BrickColor.new("Bright red")
- effectsg.Reflectance = 0.25
- local LP = From
- local point1 = To
- local mg = (LP - point1).magnitude
- effectsmsh.Scale = Vector3.new(7,7,7)
- --for i=1,3 do
- Lightning(LP,point1,5,1,"Bright red",0.3,0.1)
- --end
- effectsg.CFrame = CFrame.new((LP+point1)/2,point1) * CFrame.Angles(math.rad(90),0,0)
- coroutine.resume(coroutine.create(function()
- for i = 0 , 1 , 0.1 do
- wait()
- effectsg.Transparency = 1*i
- effectsmsh.Scale = Vector3.new(10-10*i,mg*5,10-10*i)
- end
- effectsg.Parent = nil
- end))
- end
- local newpos = baseprt.Position
- local inc = rangepower/5
- repeat
- --wait()
- rangepos = rangepos - 10
- --dir = dir * CFrame.Angles(math.rad(-1),0,0)
- hit,pos = rayCast(newpos,dir.lookVector,inc,Character)
- drawtrail(newpos,pos)
- newpos = newpos + (dir.lookVector * inc)
- if hit ~= nil then
- if hit.Parent:FindFirstChild("Humanoid") ~= nil then
- hum = hit.Parent.Humanoid
- tTorso=hit.Parent.Torso
- Damagefunc1(hit,20,40)
- attackdebounce=false
- --ADmg(hum,hit)
- elseif hit.Parent.Parent ~= nil and hit.Parent.Parent:FindFirstChild("Humanoid") ~= nil then
- hum = hit.Parent.Parent.Humanoid
- tTorso=hit.Parent.Parent.Torso
- Damagefunc1(hit.Parent.Parent.Torso,20,40)
- attackdebounce=false
- --ADmg(hum,hit)
- end
- MagicCircle(BrickColor.new("Bright red"),CFrame.new(newpos),2,2,2,3,3,3)
- MagicBlock(BrickColor.new("Bright red"),CFrame.new(newpos),2,2,2,2,2,2)
- end
- until rangepos <= 0
- end))
- end
- function shoottrail3(mouse,baseprt)
- coroutine.resume(coroutine.create(function(v)
- local spreadvector = (Vector3.new(math.random(-spread,spread),math.random(-spread,spread),math.random(-spread,spread))) * (baseprt.Position-MMouse.Hit.p).magnitude/100
- local dir = CFrame.new((baseprt.Position+MMouse.Hit.p)/2,MMouse.Hit.p+spreadvector)
- local hit,pos = rayCast(baseprt.Position,dir.lookVector,10,Character)
- local rangepos = range*50
- local function drawtrail(From,To)
- local effectsmsh = Instance.new("SpecialMesh")
- effectsmsh.Scale = Vector3.new(1,1,1)
- effectsmsh.Name = "Mesh"
- effectsmsh.MeshType = "FileMesh"
- effectsmsh.MeshId = "http://www.roblox.com/asset/?id=3270017"
- local effectsg = Instance.new("Part")
- effectsg.formFactor = 3
- effectsg.CanCollide = false
- effectsg.Name = "Eff"
- effectsg.Locked = true
- effectsg.Anchored = true
- effectsg.Size = Vector3.new(0.2,0.2,0.2)
- effectsg.Parent = workspace
- effectsmsh.Parent = effectsg
- effectsg.BrickColor = BrickColor.new("Bright red")
- effectsg.Reflectance = 0.25
- local LP = From
- local point1 = To
- local mg = (LP - point1).magnitude
- effectsmsh.Scale = Vector3.new(2,2,4)
- effectsg.CFrame = CFrame.new((LP+point1)/2,point1) * CFrame.Angles(math.rad(90),0,0)
- coroutine.resume(coroutine.create(function()
- wait()
- effectsg.Parent = nil
- end))
- end
- local newpos = baseprt.Position
- local inc = rangepower/10
- repeat
- wait()
- rangepos = rangepos - 10
- --dir = dir * CFrame.Angles(math.rad(-1),0,0)
- hit,pos = rayCast(newpos,dir.lookVector,inc,Character)
- drawtrail(newpos,pos)
- local list = game.Workspace:children()
- local torso = nil
- local dist = 100
- local temp = nil
- local human = nil
- local temp2 = nil
- for x = 1, #list do
- temp2 = list[x]
- if (temp2.className == "Model") and (temp2.Name~=Character.Name) then
- temp = temp2:findFirstChild("Torso")
- human = temp2:findFirstChild("Humanoid")
- if (temp ~= nil) and (human ~= nil) and (human.Health > 0) then
- if (temp.Position - pos).magnitude < dist then
- torso = temp
- dist = (temp.Position - pos).magnitude
- end
- end
- end
- end
- if torso~=nil then
- dir=CFrame.new(pos,torso.Position)
- end
- newpos = newpos + (dir.lookVector * inc)
- if hit ~= nil then
- rangepos = 0
- if hit.Parent:FindFirstChild("Humanoid") ~= nil then
- hum = hit.Parent.Humanoid
- tTorso=hit.Parent.Torso
- Damagefunc1(hit,20,30)
- attackdebounce=false
- --ADmg(hum,hit)
- elseif hit.Parent.Parent ~= nil and hit.Parent.Parent:FindFirstChild("Humanoid") ~= nil then
- hum = hit.Parent.Parent.Humanoid
- tTorso=hit.Parent.Parent.Torso
- Damagefunc1(hit.Parent.Parent.Torso,20,30)
- attackdebounce=false
- --ADmg(hum,hit)
- end
- for i=1,math.random(3,6) do
- BreakEffect(BrickColor.new("Bright red"),CFrame.new(newpos),0.5,math.random(5,20),0.5)
- end
- so("http://roblox.com/asset/?id=3264793",hit,1,math.random()+math.random()+1)
- MagicCircle(BrickColor.new("Bright red"),CFrame.new(newpos),2,2,2,3,3,3)
- MagicBlock(BrickColor.new("Bright red"),CFrame.new(newpos),2,2,2,2,2,2)
- end
- until rangepos <= 0
- end))
- end
- function MagicBlock(brickcolor,cframe,x1,y1,z1,x3,y3,z3)
- local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5))
- prt.Anchored=true
- prt.CFrame=cframe
- local msh=mesh("BlockMesh",prt,"","",vt(0,0,0),vt(x1,y1,z1))
- coroutine.resume(coroutine.create(function()
- for i=0,1,0.1 do
- wait()
- prt.CFrame=prt.CFrame*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50))
- prt.Transparency=i
- msh.Scale=msh.Scale+vt(x3,y3,z3)
- end
- prt.Parent=nil
- end))
- end
- function MagicCircle(brickcolor,cframe,x1,y1,z1,x3,y3,z3)
- local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5))
- prt.Anchored=true
- prt.CFrame=cframe
- local msh=mesh("SpecialMesh",prt,"Sphere","",vt(0,0,0),vt(x1,y1,z1))
- coroutine.resume(coroutine.create(function()
- for i=0,1,0.1 do
- wait()
- prt.CFrame=prt.CFrame
- prt.Transparency=i
- msh.Scale=msh.Scale+vt(x3,y3,z3)
- end
- prt.Parent=nil
- end))
- end
- function BlastEffect(brickcolor,cframe,x1,y1,z1,x2,y2,z2)
- local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5))
- prt.Anchored=true
- prt.CFrame=cframe
- local msh=mesh("SpecialMesh",prt,"FileMesh","http://www.roblox.com/asset/?id=20329976",vt(0,0,0),vt(x1,y1,z1))
- coroutine.resume(coroutine.create(function()
- for i=0,1,0.05 do
- wait()
- prt.Transparency=i
- msh.Scale=msh.Scale+vt(x2,y2,z2)
- end
- prt.Parent=nil
- end))
- end
- function BreakEffect(brickcolor,cframe,x1,y1,z1)
- local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5))
- prt.Anchored=true
- prt.CFrame=cframe*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50))
- local msh=mesh("SpecialMesh",prt,"Sphere","",vt(0,0,0),vt(x1,y1,z1))
- coroutine.resume(coroutine.create(function(Part,CF,Numbb,randnumb)
- CF=Part.CFrame
- Numbb=0
- randnumb=math.random()-math.random()
- for i=0,1,0.05 do
- wait()
- CF=CF*cf(0,1,0)
- --Part.CFrame=Part.CFrame*euler(0.5,0,0)*cf(0,1,0)
- Part.CFrame=CF*euler(Numbb,0,0)
- Part.Transparency=i
- Numbb=Numbb+randnumb
- end
- Part.Parent=nil
- end),prt,CF,Numbb,randnumb)
- end
- function SpecialEffect()
- local prt=part(3,workspace,1,0,BrickColor.new("White"),"Part",vt(1,1,1))
- prt.Anchored=true
- prt.CFrame=Torso.CFrame
- local msh=mesh("SpecialMesh",prt,"Sphere","",vt(0,0,0),vt(0.5,0.5,0.5))
- coroutine.resume(coroutine.create(function(Part,Mesh)
- for i=0,1,0.2 do
- wait(0)
- Part.Transparency=i
- Mesh.Scale=Mesh.Scale+vt(10,10,10)
- end
- prt.Parent=nil
- end),prt,msh)
- end
- function Lightning(p0,p1,tym,ofs,col,th,tra)
- local magz = (p0 - p1).magnitude local curpos = p0 local trz = {-ofs,ofs}
- for i=1,tym do
- local li = Instance.new("Part",workspace) li.TopSurface =0 li.BottomSurface = 0 li.Anchored = true li.Transparency = tra or 0.4 li.BrickColor = BrickColor.new(col)
- li.formFactor = "Custom" li.CanCollide = false li.Size = Vector3.new(th,th,magz/tym) local ofz = Vector3.new(trz[math.random(1,2)],trz[math.random(1,2)],trz[math.random(1,2)])
- local trolpos = CFrame.new(curpos,p1)*CFrame.new(0,0,magz/tym).p+ofz
- if tym == i then
- local magz2 = (curpos - p1).magnitude li.Size = Vector3.new(th,th,magz2)
- li.CFrame = CFrame.new(curpos,p1)*CFrame.new(0,0,-magz2/2)
- else
- li.CFrame = CFrame.new(curpos,trolpos)*CFrame.new(0,0,magz/tym/2)
- end
- curpos = li.CFrame*CFrame.new(0,0,magz/tym/2).p game.Debris:AddItem(li,.5)
- end
- end
- function effect(Color,Ref,LP,P1,returnn)
- local effectsmsh = Instance.new("BlockMesh")
- effectsmsh.Scale = Vector3.new(0.4,1,0.4)
- effectsmsh.Name = "Mesh"
- local effectsg = Instance.new("Part")
- effectsg.formFactor = 3
- effectsg.CanCollide = false
- effectsg.Name = "Eff"
- effectsg.Locked = true
- effectsg.Anchored = true
- effectsg.Size = Vector3.new(0.2,1,0.2)
- 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.4,mg,0.4)
- effectsg.CFrame = CFrame.new((LP.p+point1.p)/2,point1.p) * CFrame.Angles(math.rad(90),0,0)
- if returnn then return effectsg end
- coroutine.resume(coroutine.create(function()
- if not returnn then
- for i = 0 , 1 , 0.2 do
- wait()
- effectsg.Transparency = 1*i
- effectsmsh.Scale = Vector3.new(0.4-0.4*i,1,0.4-0.4*i)
- end
- wait()
- effectsg.Parent = nil
- end
- end))
- end
- Damagefunc1=function(hit,Damage,Knockback)
- if hit.Parent==nil then
- return
- end
- CPlayer=Bin
- h=hit.Parent:FindFirstChild("Humanoid")
- if h~=nil and hit.Parent.Name~=Character.Name and hit.Parent:FindFirstChild("Torso")~=nil then
- if attackdebounce == false then
- attackdebounce = true
- coroutine.resume(coroutine.create(function()
- wait(0.2)
- attackdebounce = false
- end))
- Damage=Damage
- --[[ if game.Players:GetPlayerFromCharacter(hit.Parent)~=nil then
- return
- end]]
- -- hs(hit,1.2)
- c=Instance.new("ObjectValue")
- c.Name="creator"
- c.Value=game.Players.LocalPlayer
- c.Parent=h
- game:GetService("Debris"):AddItem(c,.5)
- Damage=Damage+math.random(0,10)
- -- h:TakeDamage(Damage)
- blocked=false
- block=hit.Parent:findFirstChild("Block")
- if block~=nil then
- print("herp")
- if block.Value>0 then
- blocked=true
- block.Value=block.Value-1
- print(block.Value)
- end
- end
- if blocked==false then
- -- h:TakeDamage(Damage)
- h.Health=h.Health-Damage
- showDamage(hit.Parent,Damage,.5)
- else
- h:TakeDamage(1)
- showDamage(hit.Parent,1,.5)
- end
- vp=Instance.new("BodyVelocity")
- vp.P=500
- vp.maxForce=Vector3.new(math.huge,0,math.huge)
- -- vp.velocity=Character.Torso.CFrame.lookVector*Knockback
- vp.velocity=Head.CFrame.lookVector*Knockback+Head.Velocity/1.05
- if Knockback>0 then
- vp.Parent=hit.Parent.Torso
- end
- game:GetService("Debris"):AddItem(vp,.25)
- game:GetService("Debris"):AddItem(r,.5)
- c=Instance.new("ObjectValue")
- c.Name="creator"
- c.Value=Player
- c.Parent=h
- game:GetService("Debris"):AddItem(c,.5)
- CRIT=false
- hitDeb=true
- AttackPos=6
- end
- end
- end
- Damagefuncbr=function(hit,Damage,Knockback)
- if hit.Parent==nil then
- return
- end
- CPlayer=Bin
- h=hit.Parent:FindFirstChild("Humanoid")
- if h~=nil and hit.Parent.Name~=Character.Name and hit.Parent:FindFirstChild("Torso")~=nil then
- if attackdebounce == false then
- attackdebounce = true
- coroutine.resume(coroutine.create(function()
- wait(0.2)
- attackdebounce = false
- end))
- Damage=Damage
- for i=1,math.random(3,6) do
- BreakEffect(BrickColor.new("Bright red"),hit.Parent.Torso.CFrame,0.5,math.random(5,20),0.5)
- end
- coroutine.resume(coroutine.create(function(Part)
- for i=1,5 do
- wait()
- Part.CFrame=Head.CFrame*cf(0,0,-3)
- MagicBlock(BrickColor.new("Bright red"),Part.CFrame*cf(0,0,0),1,1,1,1,1,1)
- end
- end),hit.Parent.Torso)
- so("http://roblox.com/asset/?id=3264793",hit.Parent.Torso,1,math.random()+math.random()+1)
- --[[ if game.Players:GetPlayerFromCharacter(hit.Parent)~=nil then
- return
- end]]
- -- hs(hit,1.2)
- c=Instance.new("ObjectValue")
- c.Name="creator"
- c.Value=game.Players.LocalPlayer
- c.Parent=h
- game:GetService("Debris"):AddItem(c,.5)
- Damage=Damage+math.random(0,10)
- -- h:TakeDamage(Damage)
- blocked=false
- block=hit.Parent:findFirstChild("Block")
- if block~=nil then
- print("herp")
- if block.Value>0 then
- blocked=true
- block.Value=block.Value-1
- print(block.Value)
- end
- end
- if blocked==false then
- -- h:TakeDamage(Damage)
- h.Health=h.Health-Damage
- showDamage(hit.Parent,Damage,.5)
- else
- h:TakeDamage(1)
- showDamage(hit.Parent,1,.5)
- end
- vp=Instance.new("BodyVelocity")
- vp.P=500
- vp.maxForce=Vector3.new(math.huge,0,math.huge)
- -- vp.velocity=Character.Torso.CFrame.lookVector*Knockback
- vp.velocity=Head.CFrame.lookVector*Knockback
- vp.Parent=hit.Parent.Torso
- game:GetService("Debris"):AddItem(vp,1)
- c=Instance.new("ObjectValue")
- c.Name="creator"
- c.Value=Player
- c.Parent=h
- game:GetService("Debris"):AddItem(c,.5)
- CRIT=false
- hitDeb=true
- AttackPos=6
- end
- end
- end
- Damagefunc2=function(hit,Damage,Knockback)
- if attackdebounce == false then
- --
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement