Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- divines coded by mugex and TheKorbloxCore, credit pl0x
- ply=game.Players.LocalPlayer
- char=ply.Character
- torso=char.Torso
- rarm,larm=char['Right Arm'],char['Left Arm']
- bcol=BrickColor.new
- cfn,md,mr=CFrame.new,math.rad,math.random
- ang=function(x,y,z)return CFrame.Angles(x or 0,y or 0,z or 0)end
- Debris=game:service'Debris'
- m={}
- m.tau=math.pi*2
- m.floatforce = 196.25
- local mouse=ply:GetMouse()
- function genNew(ClassName, Parent, Properties)
- local nObj = Instance.new(ClassName, Parent)
- if Properties["FormFactor"] then
- nObj["FormFactor"] = Properties["FormFactor"]
- end
- for Prop, Value in pairs(Properties) do
- nObj[Prop] = Value
- end
- return nObj
- end
- udim=function(a,b,c,d)
- if type(a)=='string'then
- x,y=tostring(a):match('(%d*%.*%d*),(%d*%.*%d*)')
- return UDim2.new(x or 0,x2 or 0,y or 0,y2 or 0)
- else
- return UDim2.new(a or 0,c or 0,b or 0,d or 0)
- end end
- rw,rw2,lw,lw2=nil,nil,nil,nil
- function l(a,x,y,z,xx,yy,zz)
- if string.find(tostring(a),',') == nil then
- return (a.CFrame*CFrame.new(x or 0,y or 0,z or 0))*CFrame.Angles(xx or 0,yy or 0, zz or 0)
- else return (a * CFrame.new(x or 0,y or 0,z or 0))*CFrame.Angles(xx or 0,yy or 0,zz or 0)
- end
- end
- local function QuaternionFromCFrame(cf) local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components() local trace = m00 + m11 + m22 if trace > 0 then local s = math.sqrt(1 + trace) local recip = 0.5/s return (m21-m12)*recip, (m02-m20)*recip, (m10-m01)*recip, s*0.5 else local i = 0 if m11 > m00 then i = 1 end if m22 > (i == 0 and m00 or m11) then i = 2 end if i == 0 then local s = math.sqrt(m00-m11-m22+1) local recip = 0.5/s return 0.5*s, (m10+m01)*recip, (m20+m02)*recip, (m21-m12)*recip elseif i == 1 then local s = math.sqrt(m11-m22-m00+1) local recip = 0.5/s return (m01+m10)*recip, 0.5*s, (m21+m12)*recip, (m02-m20)*recip elseif i == 2 then local s = math.sqrt(m22-m00-m11+1) local recip = 0.5/s return (m02+m20)*recip, (m12+m21)*recip, 0.5*s, (m10-m01)*recip end end end
- local function QuaternionToCFrame(px, py, pz, x, y, z, w) local xs, ys, zs = x + x, y + y, z + z local wx, wy, wz = w*xs, w*ys, w*zs local xx = x*xs local xy = x*ys local xz = x*zs local yy = y*ys local yz = y*zs local zz = z*zs return CFrame.new(px, py, pz,1-(yy+zz), xy - wz, xz + wy,xy + wz, 1-(xx+zz), yz - wx, xz - wy, yz + wx, 1-(xx+yy)) end
- local function QuaternionSlerp(a, b, t) local cosTheta = a[1]*b[1] + a[2]*b[2] + a[3]*b[3] + a[4]*b[4] local startInterp, finishInterp; if cosTheta >= 0.0001 then if (1 - cosTheta) > 0.0001 then local theta = math.acos(cosTheta) local invSinTheta = 1/math.sin(theta) startInterp = math.sin((1-t)*theta)*invSinTheta finishInterp = math.sin(t*theta)*invSinTheta else startInterp = 1-t finishInterp = t end else if (1+cosTheta) > 0.0001 then local theta = math.acos(-cosTheta) local invSinTheta = 1/math.sin(theta) startInterp = math.sin((t-1)*theta)*invSinTheta finishInterp = math.sin(t*theta)*invSinTheta else startInterp = t-1 finishInterp = t end end return a[1]*startInterp + b[1]*finishInterp, a[2]*startInterp + b[2]*finishInterp, a[3]*startInterp + b[3]*finishInterp, a[4]*startInterp + b[4]*finishInterp end
- function clerp(a,b,t)
- local qa = {QuaternionFromCFrame(a)}
- local qb = {QuaternionFromCFrame(b)}
- local ax, ay, az = a.x, a.y, a.z
- local bx, by, bz = b.x, b.y, b.z
- local _t = 1-t
- return QuaternionToCFrame(_t*ax + t*bx, _t*ay + t*by, _t*az + t*bz,QuaternionSlerp(qa, qb, t))
- end
- pcall(function() char.Sole3:Destroy() end) --- Destroys Physical Tool
- pcall(function() ply.PlayerGui.mgui:Destroy()end)
- Weapon = Instance.new("Model",char) Weapon.Name = 'Sole3'
- Gui = Instance.new('ScreenGui',ply.PlayerGui)Gui.Name='mgui'
- Weld = function(p0,p1,x,y,z,rx,ry,rz,par)
- p0.Position = p1.Position
- local w = Instance.new('Motor',par or p0)
- w.Part0 = p1
- w.Part1 = p0
- w.C0 = CFrame.new(x or 0,y or 0,z or 0)*CFrame.Angles(rx or 0,ry or 0,rz or 0)
- w.MaxVelocity = .1
- return w
- end
- Cur_Parent=nil
- current_mat=nil
- anchor=false
- Part = function(x,y,z,color,tr,cc,an,parent)
- local p = Instance.new('Part',parent or Cur_Parent or Weapon)
- p.formFactor = 'Custom'
- p.Locked = true
- p.Size = Vector3.new(x,y,z)
- p.BrickColor = BrickColor.new(color or 'White')
- p.CanCollide = cc or false
- p.Anchored = an or anchor or false
- p.Transparency = tr or 0
- p.Material=current_mat or'SmoothPlastic'
- for i,v in pairs{'TopSurface','BottomSurface','FrontSurface','BackSurface','LeftSurface','RightSurface'}do
- p[v]=10
- end
- return p
- end
- function beam(a,b,s,ma)
- local mag = ma or (a-b).magnitude
- local laz = Part(s or .1,mag,s or .1)
- laz.CFrame = (cfn(a,b)*cfn(0,0,-mag/2))*ang(math.pi/2,0,0)
- return laz
- end
- Lock = function(which) --- For using Animation
- local result = {rw=false,lw=false}
- if which == 'R' then
- if not rw then
- rabr = Part(1,1,1,'White',0) rabr.Transparency = 1
- rabr.Position = torso.Position
- rw = Weld(rabr,torso,1.5,.5,0,0,0,0) rw.Parent = Weapon
- w = Instance.new("Weld",Weapon)
- w.Part0,w.Part1 = char['Right Arm'],rabr
- w.C1 = CFrame.new(0,-.5,0)
- else
- rabr:Destroy()
- rw = nil
- end
- elseif which == 'L' then
- if not lw then
- labr = Part(1,1,1,'White',0) labr.Transparency = 1
- labr.Position = torso.Position
- lw = Weld(labr,torso,-1.5,.5,0,0,0,0) lw.Parent = Weapon
- w = Instance.new("Weld",Weapon)
- w.Part0,w.Part1 = char['Left Arm'],labr
- w.C1 = CFrame.new(0,-.5,0)
- else
- labr:Destroy()
- lw = nil
- end
- elseif which == 'RR' then
- if not rw2 then
- rlbr = Part(1,1,1,'White',0) rlbr.Transparency = 1
- rlbr.Position = torso.Position
- rw2 = Weld(rlbr,torso,.5,-1.5,0,0,0,0) rw2.Parent = Weapon rw2.Name = 'rw2'
- w = Instance.new("Weld",Weapon)
- w.Part0,w.Part1 = char['Right Leg'],rlbr
- w.C1 = CFrame.new(0,-.5,0)
- else
- rlbr:Destroy()
- rw2 = _
- end
- elseif which == 'LL' then
- if not lw2 then
- llbr = Part(1,1,1,'White',0) llbr.Transparency = 1
- llbr.Position = torso.Position
- lw2 = Weld(llbr,torso,-.5,-1.5,0,0,0,0) lw2.Parent = Weapon lw2.Name = 'lw2'
- w = Instance.new("Weld",Weapon)
- w.Part0,w.Part1 = char['Left Leg'],llbr
- w.C1 = CFrame.new(0,-.5,0)
- else
- llbr:Destroy()
- lw2 = _
- end
- elseif which == nil then
- if rw then result.rw = true end
- if lw then result.lw = true end
- if rw2 then result.rw = true end
- if lw2 then result.lw = true end
- end
- return result
- end
- Add ={ --- Array for handy functions
- BG = function(parent)
- local bg = Instance.new("BodyGyro",parent)
- bg.P = 20e+003
- bg.maxTorque = Vector3.new(4e+005,4e+005,4e+005)*math.huge
- return bg
- end;
- BP = function(parent,position)
- local bp = Instance.new("BodyPosition",parent)
- bp.maxForce = Vector3.new()*math.huge
- bp.position = position or parent.Position
- return bp
- end;
- BV = function(parent,force)
- local bv = Instance.new("BodyVelocity",parent)
- bv.maxForce = Vector3.new()*math.huge
- bv.velocity = force or Vector3.new(0,0,0)
- return bv
- end;
- Sound = function(id,pitch,loop,parent)
- local tab = {}
- local snd = Instance.new("Sound",parent or char.Head)
- snd.Name = 'MugSound'
- snd.SoundId = id
- snd.Volume = 100
- snd.Pitch = pitch or 1
- snd.Looped=loop and true or false
- tab.Sound = snd
- function tab:Play()self.Sound:Play()end
- function tab:Stop()self.Sound:Stop()end
- function tab:Pitch(a)self.Sound.Pitch = a end
- function tab:Volume(a)self.Sound.Volume = a end
- setmetatable(tab,{
- __call = function(t,param) local cl = t.Sound:Clone() cl.Parent = param return cl end;
- })
- return tab
- end;
- Fire = function(parent,size,heat,color,color2)
- local f = Instance.new("Fire",parent)
- f.Size = size
- f.Heat = heat
- f.Color = BrickColor.new(color).Color
- if color2 then
- f.SecondaryColor = BrickColor.new(color2).Color
- end
- return f
- end;
- }
- tw = function(Weld, Stop, Step,a) --- TweenWeld function
- local func = function(w)
- local Start = w.C1
- local X1, Y1, Z1 = Start:toEulerAnglesXYZ()
- local Stop = Stop
- local X2, Y2, Z2 = Stop:toEulerAnglesXYZ()
- for i = 0, 1, Step or .1 do
- w.C1 = CFrame.new( (Start.p.X * (1 - i)) + (Stop.p.X * i),
- (Start.p.Y * (1 - i)) + (Stop.p.Y * i),
- (Start.p.Z * (1 - i)) + (Stop.p.Z * i)) * CFrame.fromEulerAnglesXYZ(
- (X1 * (1 - i)) + (X2 * i), (Y1 * (1 - i)) + (Y2 * i),
- (Z1 * (1 - i)) + (Z2 * i) )
- wait()
- end
- w.C1 = Stop
- end
- if type(Weld)=='table'then
- for i=1,#Weld do
- if i < #Weld then
- coroutine.wrap(function()func(Weld[i])end)()
- else
- func(Weld[i])
- end
- end
- else
- if a then coroutine.wrap(function() func(Weld) end)() else func(Weld) end
- end
- end
- Meshes = {Diamond='rbxassetid://9756362';Spikeball='rbxassetid://9982590';Table='rbxassetid://111868131';---MeshIds
- Egg='rbxassetid://1527559';Ring='rbxassetid://3270017';Bullet='rbxassetid://2697549';Grass='rbxassetid://1080954';
- Shark='rbxassetid://82821384';Sword='rbxassetid://12221720';Crown='rbxassetid://10688643';Spike='rbxassetid://1033714'}
- Mesh = function(par,num,x,y,z,tex)
- local msh = _
- if num == 1 then msh = Instance.new("CylinderMesh",par)
- elseif num == 2 then msh = Instance.new("SpecialMesh",par) msh.MeshType = 3
- elseif num == 3 then msh = Instance.new("BlockMesh",par)
- elseif num == 4 then msh = Instance.new("SpecialMesh",par) msh.MeshType = 'Wedge'
- elseif type(num) == 'string' then msh = Instance.new("SpecialMesh",par)
- msh.MeshId = string.find(num,'://') == _ and Meshes[num] or num
- msh.TextureId = tex and tex or ''
- end
- msh.Scale = Vector3.new(x or 1,y or 1,z or 1)
- return msh
- end
- -- hdl=Part(.3,1.5,.3)
- -- hw=Weld(hdl,rarm,0,-1,0,-math.pi/2)
- -- blade=Part(.25,.5,.75)
- -- Weld(blade,hdl,0,1)
- -- tip1=Part(.3,2,.3)tip2=Part(.3,2,.3)
- -- Weld(tip1,blade,0,1.25,.75/2-.15)
- -- Weld(tip2,blade,0,1.25,-.75/2+.15)
- -- tip3=Part(.3,.3,.75)Weld(tip3,hdl,0,.9+2)
- -- w_parts={hdl,blade,tip1,tip2,tip3}
- function findHum(pos,rad)
- local hums={}
- function check(a)
- local res=false
- for i,ho in pairs(hums)do
- if a==ho then res=true end
- end
- return res
- end
- for i,v in pairs(Workspace:children())do
- if v:IsA'Model'and v~=char then
- for i,q in pairs(v:children())do
- if q:IsA'Humanoid' and q.Parent:FindFirstChild'Torso'and(q.Torso.Position-pos).magnitude < rad then
- if not check(q)then
- table.insert(hums,q)
- end
- end
- end
- end
- end
- return hums
- end
- smb_sfx=Add.Sound('rbxassetid://184742298',1.75)
- loz_sfx=Add.Sound('rbxassetid://131218412',1)
- boom_sfx=Add.Sound('rbxassetid://142885319',1)
- attacking=false
- Keys={}
- guys={}
- function CreateGuy(color,scale)
- sX=1
- sY=2
- sX=scale and sX*scale or sX
- sY=scale and sY*scale or sY
- local _char=Instance.new('Model',Weapon)
- Cur_Parent=_char
- local _head=Part(sX,sX,sX)
- local arm,arm2=Part(sX,sY,sX),Part(sX,sY,sX)
- local leg,leg2=Part(sX,sY,sX),Part(sX,sY,sX)
- local _torso=Part(sY,sY,sX) _torso.Anchored=true _torso.Position=torso.Position
- -- local _bp=Add.BP(_torso,l(torso,0,10).p)
- -- local _bg=Add.BG(_torso)
- local rabr = Part(sX,sX,sX,'White',0) rabr.Transparency = 1
- rabr.Position = _torso.Position rabr.Name='q'
- local _rw = Weld(rabr,_torso,sY/2+sX/2,sX/2)
- w = Instance.new("Weld",Weapon)
- w.Part0,w.Part1 = arm,rabr
- w.C1 = CFrame.new(0,-sY/4,0)
- local labr = Part(sX,sX,sX,'White',0) labr.Transparency = 1
- labr.Position = _torso.Position labr.Name='q'
- local _lw = Weld(labr,_torso,-sY/2-sX/2,sX/2)
- w = Instance.new("Weld",Weapon)
- w.Part0,w.Part1 = arm2,labr
- w.C1 = CFrame.new(0,-sY/4,0)
- rlbr = Part(sX,sX,sX,'White',0) rlbr.Transparency = 1
- rlbr.Position = _torso.Position rlbr.Name='q'
- _rw2 = Weld(rlbr,_torso,sX/2,-sY+sX/2,0,0,0,0) _rw2.Parent = Weapon _rw2.Name = 'rw2'
- w = Instance.new("Weld",Weapon)
- w.Part0,w.Part1 = leg,rlbr
- w.C1 = CFrame.new(0,-sY/4,0)
- llbr = Part(sX,sX,sX,'White',0) llbr.Transparency = 1
- llbr.Position = _torso.Position llbr.Name='q'
- _lw2 = Weld(llbr,_torso,-sX/2,-sY+sX/2,0,0,0,0) _lw2.Parent = Weapon _lw2.Name = 'lw2'
- w = Instance.new("Weld",Weapon)
- w.Part0,w.Part1 = leg2,llbr
- w.C1 = CFrame.new(0,-sY/4,0)
- Weld(_head,_torso,0,sY/2+sX/2)
- -- _rw=Weld(arm,_torso,-1.5)_lw=Weld(arm2,_torso,1.5)
- Cur_Parent=nil
- for i,v in pairs(_char:children())do
- if v:IsA'Part'then
- v.BrickColor=bcol(color or 'White')
- -- v.Material='Metal'
- v.Reflectance=.1
- if v.Name~='q'then
- v.Transparency=.05
- end
- end
- end
- local sparks=genNew('ParticleEmitter',_torso,{
- Rate=10;
- Lifetime=NumberRange.new(2,2.5);
- Size=NumberSequence.new(.25,1);
- Speed=NumberRange.new(1,2);
- Rotation=NumberRange.new(0,180);
- Acceleration=Vector3.new(0,-20,0);
- Transparency=NumberSequence.new(0,.9);
- VelocitySpread=45;
- RotSpeed=NumberRange.new(40);
- Texture='http://www.roblox.com/asset/?id=242218744';
- Color=ColorSequence.new(bcol'New Yeller'.Color,bcol'Black'.Color);
- })
- local tab={
- char=_char;
- head=_head;
- rarm=arm;
- larm=arm2;
- rleg,lleg=leg,leg2;
- torso=_torso;
- rw=_rw;
- rw2=_rw2;
- lw=_lw;
- lw2=_lw2;
- canfollo=true;
- -- bp=_bp;
- -- bg=_bg;
- position=function() return l(torso,-5,10,0) end;
- gyro=function()return torso.CFrame-torso.Position end;
- }
- return tab
- end
- function breakdance()
- npc.canfollo=false npc2.canfollo=false
- tw(npc.rw,cfn()*ang(md'-60',md'45'),.1,'')tw(npc.lw,cfn()*ang(md'-60',md'-45'),.1,'')
- tw(npc2.rw,cfn()*ang(md'-60',md'45'),.1,'')tw(npc2.lw,cfn()*ang(md'-60',md'-45'),.1,'')
- -- tw(npc.rw2,cfn(0,-.3,0),.1,'')
- local prevp=npc.torso.CFrame local prevp2=npc2.torso.CFrame
- for i=0,10 do
- npc.torso.CFrame=clerp(npc.torso.CFrame,cfn(l(torso,0,0,-10).p,prevp.p)*ang(-math.pi/2,math.pi),.3)
- npc2.torso.CFrame=clerp(npc2.torso.CFrame,cfn(l(torso,0,0,-5).p,prevp2.p)*ang(-math.pi/2,math.pi),.3)
- wait()
- end
- -- tw(npc.rw,cfn()*ang(0,0,md'-25'),.3,'')tw(npc.lw,cfn()*ang(0,0,md'25'),.3,'')
- tw(npc.rw,cfn(),.3,'')tw(npc.lw,cfn(),.3,'')tw(npc.rw2,cfn()*ang(md'-50'),.3,'')
- tw(npc2.rw,cfn(),.3,'')tw(npc2.lw,cfn(),.3,'')tw(npc2.rw2,cfn()*ang(md'-50'),.3,'')
- for i=0,10 do
- npc.torso.CFrame=clerp(npc.torso.CFrame,cfn(l(torso,-5,10).p,l(torso,0,0,-10).p)*ang(-math.pi/2-md'25'),.1)
- npc2.torso.CFrame=clerp(npc2.torso.CFrame,cfn(l(torso,5,10).p,l(torso,0,0,-5).p)*ang(-math.pi/2-md'25'),.1)
- wait()
- end
- tw(npc.rw2,cfn(),.3,'')tw(npc2.rw2,cfn(),.3,'')
- npc.canfollo=true npc2.canfollo=true
- end
- guys.One=CreateGuy()
- guys.Two=CreateGuy('Black')
- npc=guys.One
- npc2=guys.Two
- npc2.position=function()return l(torso,5,10) end
- norm=function(a)
- return function()
- if a=='p'then return l(torso,-5,10)
- elseif a=='p2'then return l(torso,5,10)
- elseif a=='g'then return torso.CFrame-torso.Position
- end
- end
- end
- function Polt()
- loz_sfx:Play()
- --Lock'R'Lock'L'
- --npc2.gyro=cfn(npc2.torso.Position,mouse.hit.p)
- local mcf=mouse.hit
- --bg.cframe=cfn(torso.Position,Vector3.new(mcf.x,torso.Position.y,mcf.z))
- npc2.position=function()return cfn(l(torso,5,10).p,mouse.hit.p)end
- tw(npc2.rw,cfn()*ang(md'-90',md'-45'),.1,'')
- tw(npc2.lw,cfn()*ang(md'-90',md'45'))
- --bg:Destroy()
- --npc2.gyro=norm'g'
- local bullet=Instance.new('Model',Weapon)local snd_cl=boom_sfx(bullet)
- local missile=Part(1,5,1,'Black')
- local tip=Part(1.5,1.5,1.5,'Bright red')Weld(tip,missile,0,-2.5)Mesh(tip,2)
- local pp=Part(2,.5,.5)Weld(pp,missile,0,2.5+.25)
- local pp2=Part(2,.5,.5)Weld(pp2,missile,0,2.5+.25,0,0,md'90')
- for i,v in pairs{missile,tip,pp,pp2}do v.Parent=bullet end
- missile.CFrame=l(cfn(npc2.torso.Position,mouse.hit.p),0,0,-7,math.pi/2)
- Add.BV(missile,l(missile,0,0,0,-math.pi/2).lookVector*40)
- missile.Touched:connect(function(hit)
- if hit.Name=='sss'then return end
- snd_cl:Play()
- e=genNew('Explosion',Workspace,{
- Position=l(missile,0,1).p;
- BlastPressure=0;
- BlastRadius=1;
- DestroyJointRadiusPercent=0;
- })
- e.Hit:connect(function()local list={} --not too much damage plox
- local hum=hit.Parent:FindFirstChild'Humanoid'
- if hum and hit.Parent~=char then
- for i,v in pairs(list)do if hum==v then print'omg' return end end
- hum.Health=hum.Health-15
- table.insert(list,hum)
- end
- end)
- bullet:Destroy()
- end)
- particle=genNew('ParticleEmitter',missile,{
- Texture='rbxassetid://61740850';
- Rate=.25;
- Acceleration=Vector3.new(0,10,0);
- Rotation=NumberRange.new(5,50);
- })
- Spawn(function() --SFX
- while missile.Parent ~= nill do
- local wave=Part(1,1,1,'New Yeller')wave.Anchored=true wave.Name='sss'
- wave.CFrame=l(missile,0,-2.5,0,math.pi/2)
- local msh=Mesh(wave,'Ring')
- Spawn(function()
- for i=0,1,.1 do
- msh.Scale=Vector3.new(i*10,i*10,i*5)
- wave.Transparency=i
- wait()
- end
- wave:Destroy()
- end)
- wait(.1)
- end
- end)
- tw(npc2.rw,cfn(),.1,'')
- tw(npc2.lw,cfn())
- npc2.position=norm'p2'
- Debris:AddItem(bullet,3)
- end
- Spawn(function()
- while wait()do
- for i,guy in pairs(guys)do
- if guy.canfollo then
- if type(guy.position)=='function'then
- -- guy.bp.position=guy.position()
- guy.torso.CFrame=clerp(guy.torso.CFrame,guy.position(),.2)
- else
- guy.torso.CFrame=clerp(guy.torso.CFrame,guy.position,.2)
- end
- end
- end
- end
- end)
- function shoot()
- Lock'R'
- anchor=true
- local li=Instance.new('Model',Weapon)li2=Instance.new('Model',Weapon)
- local mag=(mouse.hit.p-torso.Position).magnitude
- y=2
- if mouse.hit.y > torso.Position.y then y=mouse.hit.y else y=torso.Position.y end
- mpos=Vector3.new(mouse.hit.x,mouse.hit.y,mouse.hit.z)
- --local bg=Add.BG(torso)
- tw(rw,cfn()*ang(md'180'),.1,'')
- tw(npc.rw,cfn(-.15,-.25,0)*ang(o,0,md'-90'),.1,'')
- tw(npc.lw,cfn(-.15,-.25,0)*ang(o,0,md'15'),.1,'')
- tw(npc.lw2,cfn()*ang(0,0,md'45'),.1,'')
- --npc.gyro=cfn(torso.Position,mpos)*ang(0,math.pi/2)
- npc.position=function()return (cfn(l(torso,-5,10).p,mouse.hit.p)*ang(0,math.pi/2))end
- for i=0,1,.1 do wait()end
- -- tw(hw,cfn()*ang(md'90',0,md'90'))
- local sfxp=Part(1,1,1,'White')local sfmsh=Mesh(sfxp,'Ring')sfxp.Anchored=true
- sfxp.CFrame=l(npc.rarm,0,-1,0,math.pi/2)
- Spawn(function()
- for i=0,1,.1 do
- sfxp.Transparency=i
- sfmsh.Scale=Vector3.new(i*10,i*10,i*5)
- wait()
- end sfxp:Destroy() end)
- wait(.1)
- local laz=beam(l(rarm,0,-1).p,l(npc.rarm,0,-1).p)
- laz.Parent=li
- local lazor=beam(l(npc.rarm,0,-1).p,mpos,.1,(mag<40 and mag or 40))
- Mesh(lazor,1)
- lazor.Parent=li
- local ends={l(lazor,0,-lazor.Size.y/2)}
- local function branch(rad,iter)
- len=rad/iter
- for i =1,iter do
- deg=md(22.5+(22.5/i))
- local nlist={}
- local cf=cfn(0,-len/2,0)
- for _,prev in pairs(ends)do
- pos1=l(prev,0,0,0,0,0,deg)*cf
- pos2=l(prev,0,0,0,0,0,-deg)*cf
- p1=beam(l(prev).p,pos1.p)
- p2=beam(l(prev).p,pos2.p)
- pos11=l(prev,0,0,0,deg)*cf
- pos12=l(prev,0,0,0,-deg)*cf
- p11=beam(l(prev).p,pos11.p)
- p12=beam(l(prev).p,pos12.p)
- if i~=iter then --Addition to 1st
- pos3=l(prev,0,0,0)*cf
- p3=beam(l(prev).p,pos3.p)Mesh(p3,1)
- p3.Parent=li
- table.insert(nlist,pos3)
- end
- table.insert(nlist,pos1)table.insert(nlist,pos11)
- table.insert(nlist,pos2)table.insert(nlist,pos12)
- p1.Parent,p2.Parent,p11.Parent,p12.Parent=li,li,li,li
- -- if i==iter then
- -- for _,v in pairs{p1,p2,p11,p12}do
- -- local p=Part(1,1,1,'White',1)p.CFrame=l(v,0,-v.Size.y/2,0)p.Parent=li2
- -- Instance.new('Sparkles',p)
- -- end
- -- end
- for _,v in pairs{p1,p2,p11,p12}do Mesh(v,1)end --Add Meshes
- ends=nlist
- end
- wait()
- end
- end
- local expos=l(lazor,0,-lazor.Size.y/2-10).p
- for i,v in pairs(findHum(expos,10))do
- v:TakeDamage(5)
- v.Jump=true
- local block=Instance.new('Model',Weapon)
- local bl=Part(5,7,5,'Black',.75)bl.Anchored=false bl.Parent=block
- bl.CFrame=v.Torso.CFrame
- Weld(bl,v.Torso)
- Add.BV(bl,cfn(bl.Position,torso.Position).lookVector*20)
- Debris:AddItem(block,3)
- end
- branch(10,3)
- anchor=false
- -- npc.gyro=norm'g'
- npc.position=norm'p'
- tw({npc.rw,rw,npc.lw2,npc.lw},cfn(),.1)Lock'R'
- for i=0,1,.1 do
- for _,v in pairs(li:children())do
- v.Transparency=i
- end
- wait()
- end
- li:Destroy()li2:Destroy()
- end
- function sfx(mouse)
- if (mouse.hit.p-torso.Position).magnitude>40 then return end
- tw(npc.rw,cfn()*ang(md'-90'),.1,'')
- tw(npc.lw2,cfn()*ang(md'75'),.1,'')tw(npc.rw2,cfn()*ang(md'-25'),.1,'')
- npc.position=cfn(mouse.hit.p,npc.torso.Position)*ang(0,math.pi)
- --npc.gyro=cfn(npc.torso.Position,mouse.hit.p)
- while(npc.torso.Position-npc.position.p).magnitude > 3 do wait()end
- if #findHum(l(npc.rarm,0,-1).p,10)>0 then
- for i,v in pairs(findHum(l(npc.rarm,0,-1).p,10))do
- v:TakeDamage(5)
- v.Sit=true
- v.Torso.Velocity=cfn(l(npc.rarm,0,-1).p,v.Torso.Position).lookVector*40+Vector3.new(0,100,0)
- end
- tw(npc.rw,cfn()*ang(md'-140'),.3)
- end
- --npc.gyro=norm'g'
- npc.position=norm'p'
- tw({npc.rw,npc.lw2,npc.rw2},cfn())
- end
- function rotate()
- local function dam(hit)
- local hum=hit.Parent:FindFirstChild'Humanoid'
- if hit.Parent~=char and hum then hum:TakeDamage(5)end
- end
- local sfp=Part(1,1,1,'White',1)
- Weld(sfp,npc2.rarm,0,-1.5,0,math.pi)
- sparkles=genNew('ParticleEmitter',sfp,{
- Acceleration=Vector3.new(0,20,0);
- Texture='http://www.roblox.com/asset/?id=245951454';
- })
- local sfp2=Part(1,1,1,'White',1)
- Weld(sfp2,npc2.larm,0,-1.5,0,math.pi)
- sparkles=genNew('ParticleEmitter',sfp2,{
- Acceleration=Vector3.new(0,20,0);
- Texture='http://www.roblox.com/asset/?id=245951454';
- })
- sfp.Touched:connect(dam)sfp2.Touched:connect(dam)
- tw(npc2.rw,cfn()*ang(0,0,md'-90'),.1,'')tw(npc2.lw,cfn()*ang(0,0,md'90'),.1)
- npc2.canfollo=false
- for i=0,m.tau*3,m.tau/30 do
- npc2.torso.CFrame=clerp(npc2.torso.CFrame,l(torso,math.cos(i)*15,0,math.sin(i)*15,0,i),.1)
- -- npc2.gyro=cfn()*ang(0,i*4)
- wait()
- end
- npc2.position=norm'p2'
- npc2.gyro=norm'g' sfp:Destroy()sfp2:Destroy()
- npc2.canfollo=true
- tw({npc2.rw,npc2.lw},cfn())
- end
- function cloneattack()
- local cnt=0
- local clones={}
- for i=0,m.tau,m.tau/8 do
- cnt=cnt+1
- clones['cl'..cnt]=CreateGuy('New Yeller',1.5)
- guy=clones['cl'..cnt]
- guy.position=function() return cfn(l(torso,math.cos(i)*10,guy.char:GetModelSize().y/2-2,math.sin(i)*10).p,l(torso,0,2).p) end
- tw(guy.rw,cfn()*ang(0,0,md'-90'),.1,'')tw(guy.lw,cfn()*ang(0,0,md'90'),.1,'')
- end
- holding=true
- while holding do
- for i,guy in pairs(clones)do
- if guy.canfollo then
- if type(guy.position)=='function'then
- -- guy.bp.position=guy.position()
- guy.torso.CFrame=clerp(guy.torso.CFrame,guy.position(),.2)
- else
- guy.torso.CFrame=clerp(guy.torso.CFrame,guy.position,.2)
- end
- end
- end
- wait()
- end
- for i,guy in pairs(clones)do
- guy.char:Destroy()
- end
- clones=nil
- end
- curcam=Workspace.CurrentCamera
- disap=false
- box=nil
- ---END PART---
- klist={
- MouseClick=shoot;
- f=Polt;
- e=sfx;
- r=rotate;
- q=breakdance;
- tq=cloneattack;
- }
- function onKey(key)
- if Keys[key]then Keys[key]=nil
- else Keys[key]=1
- end
- end
- m_down=false
- if not Workspace:FindFirstChild'TheGamer101' then
- -- Equip()
- mouse.Button1Down:connect(function()m_down=true if attacking then return end attacking=true klist['MouseClick']() attacking=false end)
- mouse.KeyUp:connect(function(key)onKey(key)for i,v in pairs(klist) do if key == i:sub(1,1) and i:sub(2,2) == 'q' then holding = false end end end)
- mouse.KeyDown:connect(function(key)onKey(key)
- if attacking then return end
- for i,v in pairs(klist) do
- if key == i:sub(1,1) then attacking = true v(mouse) attacking = false
- end
- end
- end)
- mouse.Button1Up:connect(function()m_down=false end)
- -- hop.Deselected:connect(Unequip)
- end
- for i,v in pairs(torso:children()) do if v:IsA'BodyGyro' or v:IsA'BodyPosition' or v:IsA'BodyVelocity' then v:Destroy() end end
Add Comment
Please, Sign In to add comment