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
- function swait(num)
- if num==0 or num==nil then
- game:service'RunService'.RenderStepped:wait()
- else
- for i=0,num do
- game:service'RunService'.RenderStepped:wait()
- end
- end
- end
- if Character:findFirstChild("SwordBall",true) ~= nil then
- Character:findFirstChild("SwordBall",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
- showDamage=function(Char,Dealt,du,Color)
- m=Instance.new("Model")
- m.Name=tostring(Dealt)
- h=Instance.new("Humanoid")
- h.Health=0
- h.MaxHealth=0
- h.Parent=m
- c=Instance.new("Part")
- c.Transparency=0
- c.BrickColor=Color
- c.Name="Head"
- c.TopSurface=0
- c.BottomSurface=0
- c.formFactor="Plate"
- c.Size=Vector3.new(1,.4,1)
- ms=Instance.new("CylinderMesh")
- ms.Scale=Vector3.new(.8,.8,.8)
- if CRIT==true then
- ms.Scale=Vector3.new(1,1.25,1)
- end
- ms.Parent=c
- c.Reflectance=0
- Instance.new("BodyGyro").Parent=c
- c.Parent=m
- c.CFrame=CFrame.new(Char["Head"].CFrame.p+Vector3.new(0,1.5,0))
- f=Instance.new("BodyPosition")
- f.P=2000
- f.D=100
- f.maxForce=Vector3.new(math.huge,math.huge,math.huge)
- f.position=c.Position+Vector3.new(0,3,0)
- f.Parent=c
- game:GetService("Debris"):AddItem(m,.5+du)
- c.CanCollide=false
- m.Parent=workspace
- c.CanCollide=false
- end
- local swordball=Instance.new("Model")
- swordball.Parent=Character
- swordball.Name="SwordBall"
- local proppart=part(1,swordball,0,1,BrickColor.new("Black"),"Derp",vt(1,1,1))
- local sou=Instance.new("Sound")
- sou.Parent=proppart
- sou.Volume=1
- sou.Pitch=1
- sou.SoundId="http://www.roblox.com/asset/?id=168589016"
- sou.Looped=true
- --sou:play()
- local propwld=weld(proppart,proppart,Torso,euler(0,0,0)*cf(0,-9,0))
- local prt1=part(3,swordball,0,1,BrickColor:Random(),"BallRef",vt(2,2,2))
- local prt2=part(3,swordball,0,0,BrickColor:Random(),"Ball",vt(1,1,1))
- local msh2=mesh("SpecialMesh",prt2,"Sphere","",vt(0,0,0),vt(3,3,3))
- local wld2=weld(prt2,prt2,prt1,cf(0,0,0)*euler(0,0,0))
- coroutine.resume(coroutine.create(function(Weld,Part)
- derp=0
- while Part.Parent~=nil do
- swait()
- wld2.C0=euler(0,derp,0)
- derp=derp+0.1
- end
- end),wld2,prt2)
- numb=0
- numb2=0
- for i=1,8 do
- for i=1,8 do
- local prt3=part(3,swordball,0,0,BrickColor:Random(),"Sword",vt(1,1,1))
- local msh3=mesh("SpecialMesh",prt3,"FileMesh","http://www.roblox.com/asset/?id=1029523",vt(0,0,0),vt(0.05,0.05,0.05))
- --http://www.roblox.com/asset/?id=1029523
- local wld3=weld(prt3,prt3,prt2,cf(0,0,2.5)*euler(numb,numb2,numb2))
- numb=numb+0.785
- end
- numb2=numb2+0.785
- end
- prop=Instance.new("RocketPropulsion")
- prop.MaxSpeed=5000
- prop.CartoonFactor=0
- prop.MaxThrust=100000
- prop.Parent=prt2
- prop.Target=proppart
- prop.ThrustD=1.5
- prop.TurnD=0
- prop.TurnP=0
- prop:Fire()
- --[[velp=Instance.new("BodyGyro")
- velp.Parent=prt1
- velp.maxTorque=Vector3.new(4e+005,4e+005,4e+005)*math.huge
- velp.P=20e+003
- velp.cframe=cf(0,0,0)
- coroutine.resume(coroutine.create(function(Velo,Part)
- while Part.Parent~=nil do
- for i=0,1,0.1 do
- swait()
- Velo.cframe=Velo.cframe*euler(0,3.14*i,0)
- end
- end
- end),velp,sprt)]]
- --[[wait(5)
- local sou=Instance.new("Sound")
- sou.Parent=prt1
- sou.Volume=1
- sou.Pitch=1
- sou.SoundId="rbxasset://sounds\\unsheath.wav"
- sou.Looped=true
- wait()
- sou:play() ]]
- while true do
- swait(200)
- for d=1,1 do
- for _,c in pairs(workspace:children()) do
- local hum=c:findFirstChild("Humanoid")
- if hum~=nil then
- local head=c:findFirstChild("Torso")
- if head~=nil then
- local targ=head.Position-prt1.Position
- local mag=targ.magnitude
- if mag<=10000 and c.Name~=Player.Name then
- local sprt=part(3,workspace,0,1,BrickColor:Random(),"Sword",vt(6,6,6))
- local sprt2=part(3,workspace,0,0,BrickColor:Random(),"Sword",vt(1,1,1))
- local smsh=mesh("SpecialMesh",sprt2,"FileMesh","http://www.roblox.com/asset/?id=1029523",vt(0,0,0),vt(0.1,0.1,0.1))
- local swld=weld(sprt2,sprt2,sprt,euler(0,0,0))
- local teh=0
- game:GetService("Debris"):AddItem(sprt,20)
- game:GetService("Debris"):AddItem(sprt2,20)
- coroutine.resume(coroutine.create(function(Weld,Part)
- numb1=0
- while Part.Parent~=nil do
- swait()
- Part.BrickColor=BrickColor:Random()
- Weld.C0=Weld.C0*angles(0,numb1,0)
- numb1=math.pi/math.random(10,20)
- end
- end),swld,sprt2)
- sprt.CFrame=prt1.CFrame
- sprt.Velocity=vt(-math.random(20,50),math.random(20,50),-math.random(20,50))
- --[[if d==1 then
- sprt.Velocity=vt(math.random(50,200),math.random(20,50),0)
- elseif d==2 then
- sprt.Velocity=vt(-math.random(50,200),math.random(20,50),0)
- elseif d==3 then
- sprt.Velocity=vt(0,math.random(20,50),math.random(50,200))
- elseif d==4 then
- sprt.Velocity=vt(0,math.random(20,50),-math.random(50,200))
- end]]
- local sou=Instance.new("Sound")
- sou.Parent=sprt
- sou.Volume=1
- sou.Pitch=1
- --sou.SoundId="http://www.roblox.com/asset/?id=166545328"
- sou.SoundId="http://www.roblox.com/asset/?id=168589016"
- sou.SoundId="http://www.roblox.com/asset/?id=163306929" --swahmp
- sou.SoundId="http://www.roblox.com/asset/?id=138109980" --DON'T LOSE YOUR WAAAAAAAAAY
- coroutine.resume(coroutine.create(function(Thing,dur)
- while true do
- wait()
- if math.random(1,2)==1 then
- dur=math.random()/math.random(10,20)
- else
- dur=-math.random()/math.random(10,20)
- end
- if Thing.Pitch>1.5 then
- dur=-math.random()/math.random(25,50)
- elseif Thing.Pitch<0.1 then
- dur=math.random()/math.random(25,50)
- end
- for i=0,1,0.1 do
- wait()
- Thing.Pitch=Thing.Pitch+dur
- end
- end
- end),sou,1)
- sou.Looped=true
- sou:play()
- prop=Instance.new("RocketPropulsion")
- prop.MaxSpeed=50000
- prop.CartoonFactor=0
- prop.MaxThrust=100000
- prop.Parent=sprt
- prop.Target=head
- --[[prop.TurnD=0
- prop.TurnP=100]]
- prop:Fire()
- con1=sprt.Touched:connect(function(hit)
- if hit.Parent==nil then
- return
- end
- h=hit.Parent:FindFirstChild("Humanoid")
- for _,v in pairs(hit.Parent:children()) do
- if v:IsA("Humanoid") then
- h=v
- end
- end
- if h~=nil and hit.Parent.Name~=Character.Name and hit.Parent:FindFirstChild("Torso")~=nil then
- if h.Health~=0 then
- sprt.Parent=nil
- sprt2.Parent=nil
- --[[damage=math.random(999999,99999999)
- h:TakeDamage(damage)
- hit:BreakJoints()
- hit.Anchored=false
- hit.Velocity=Vector3.new(math.random(-100,100),math.random(-100,100),math.random(-100,100))
- showDamage(h.Parent,damage,1,BrickColor.new("Bright red"))]]
- --[[local sou=Instance.new("Sound")
- sou.Parent=hit
- sou.Volume=1
- sou.Pitch=1
- sou.SoundId="http://www.roblox.com/asset/?id=168009623"
- sou.Looped=false
- sou:play() ]]
- end
- elseif --[[hit.Name~="Base" and]] hit.Parent~=swordball and hit.Parent.Name~=Character.Name and hit.Name~="Sword" then
- --hit:BreakJoints()
- --hit.Velocity=Vector3.new(math.random(-100,100),math.random(-100,100),math.random(-100,100))
- --hit.Anchored=false
- hit.BrickColor=BrickColor.new(Color3.new(math.random(),math.random(),math.random()))
- end
- end)
- end
- end
- end
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement