Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- me=game.Players.localPlayer;
- ms=me:getMouse'';
- cf,ca,r,mr,i,v3,bc,sin,cos,pi=CFrame.new,CFrame.Angles,math.rad,math.random,Instance.new,Vector3.new,BrickColor.new,math.sin,math.cos,math.pi;
- anim='Idle';
- Parts={};
- local char=me.Character;
- --char.Archivable=true;
- local lam=char['Left Arm'];
- local ram=char['Right Arm'];
- local llg=char['Left Leg'];
- local rlg=char['Right Leg'];
- local hed=char.Head;
- local tor=char.Torso;
- local hrp=char.HumanoidRootPart;
- local hum=char.Humanoid;
- cp=(function(par,size,mat,color,t)
- p=i('Part',par);
- p.formFactor=3;
- p.Size=size;
- p.Material=mat;
- p.CanCollide=false;
- p.TopSurface=0;
- p.BottomSurface=0;
- p.Transparency=t;
- p.BrickColor=bc(color);
- table.insert(Parts,p);
- return(p);
- end);
- cm=(function(par,type,scale)
- m=i('SpecialMesh',par);
- m.MeshType=type;
- m.Scale=scale;
- return(m);
- end);
- bm=(function(par,size)
- b=i('BlockMesh',par);
- b.Scale=size;
- return(b);
- end);
- weld=(function(par,p1,cf)
- w=i('Weld',par);
- w.Part0=par;
- w.Part1=p1;
- w.C0=cf or cf();
- return(w);
- end);
- sn=function(id,p,pi)
- s=Instance.new('Sound',p);
- s.SoundId='rbxassetid://'..id;
- s.Volume=5
- game:service'ContentProvider':preload(s.SoundId);
- s.Pitch=pi;
- s:play();
- end;
- function cycle(num)
- local section = num % 1 * 3;
- local secondary = 0.5 * math.pi * (section % 1);
- if section < 1 then
- return 1, 1 - math.cos(secondary), 1 - math.sin(secondary);
- elseif section < 2 then
- return 1 - math.sin(secondary), 1, 1 - math.cos(secondary);
- else
- return 1 - math.cos(secondary), 1 - math.sin(secondary), 1;
- end
- end
- --[[
- spawn(function()
- while(coroutine.yield())do
- game.Lighting.TimeOfDay=17;
- game.Lighting.FogEnd=9999;
- game.Lighting.Outlines=true;
- game.Lighting.Ambient=Color3.new(0,0,0);
- game.Lighting.Brightness=5;
- end;
- end);
- ]]
- tab={};
- function TweenCFrame(part,cframe,speed)
- local c0=part.CFrame
- Spawn(function()
- for i=-90,90,speed do
- local r=((math.sin(math.rad(i))+1)/2)
- local a=Vector3.new(getangles(c0)):lerp(Vector3.new(getangles(cframe)),r)
- part.CFrame=CFrame.new(c0.p:lerp(cframe.p,r))*CFrame.Angles(a.x,a.y,a.z)
- wait()
- end
- end)
- end;
- function getangles(cframe)
- local x,y,z,m00,m01,m02,m40,m11,m12,m20,m21,m22=cframe:components()
- local X=math.atan2(-m12,m22)
- local Y=math.asin(m02)
- local Z=math.atan2(-m01,m00) return X,Y,Z
- end;
- function changet(part)
- for t=0,1,.05 do
- part.Transparency=NumberSequence.new(t);
- wait();
- --print(t);
- end;
- for t=.9,1,.1 do
- part.Transparency=NumberSequence.new(t);
- end;
- end;
- function tsize(pt)
- for t=1,5,.1 do
- wait(.1);
- pt.Size=NumberSequence.new(t);
- end;
- end;
- xplode=function(p)
- main=cp(p,v3(10,.1,10),'Metal','White');
- main.CanCollide=false;
- main.Position=p.Position;
- end;
- function rayCast(par,startpos, Speed, Dmg)
- local rayPart = Instance.new("Part")
- rayPart.Name = "RayPart"
- rayPart.Anchored = true
- rayPart.Material='Neon';
- rayPart.CanCollide = false
- rayPart.Locked = true
- rayPart.FormFactor = 3;
- rayPart.BrickColor=BrickColor.new'Tr. Flu. Blue';
- rayPart.TopSurface = Enum.SurfaceType.Smooth
- rayPart.BottomSurface = Enum.SurfaceType.Smooth
- rayPart.Size = Vector3.new(2,2,2);
- rayPart.Shape='Ball';
- fr=i'Fire';
- fr.Parent=rayPart;
- fr.Size=1;
- fr.Heat=1000;
- fr.SecondaryColor=bc'Light green (Mint)'.Color;
- fr.Color=bc'Tr. Flu. Blue'.Color;
- pt=Instance.new('ParticleEmitter',rayPart);
- pt.EmissionDirection='Top';
- pt.LightEmission=1;
- pt.Color=ColorSequence.new(Color3.new(1,1,1));
- pt.Size=NumberSequence.new(1,1);
- pt.Lifetime=NumberRange.new(20,20);
- pt.Rate=1000;
- pt.Speed=NumberRange.new(6,6)
- pt.VelocitySpread=10;
- pt.Texture='rbxassetid://175622422';
- pt.Rate=10000;
- coroutine.wrap(changet)(pt);
- coroutine.wrap(tsize)(pt);
- spawn(function()
- while(wait())do
- for e=2,.5,-.1 do
- wait();
- rayPart.Size=v3(e,e,e);
- end;
- for e=.5,2,.1 do
- wait();
- rayPart.Size=v3(e,e,e);
- end;
- end;
- end);
- local bulletposition = startpos.Position;
- rayPart.CFrame = startpos.CFrame
- local bulletvelocity = (Vector3.new(0,0,0))+( ms.Hit.p - bulletposition).unit*Speed
- local bulletlastposition = bulletposition
- coroutine.resume(coroutine.create(function()
- while true do
- local dt = wait(1/60);
- bulletlastposition = bulletposition
- bulletvelocity = bulletvelocity + (Vector3.new(0, -3.81, 0)*dt)
- bulletposition = bulletposition + (bulletvelocity*dt)
- local ray = Ray.new(bulletlastposition, (bulletposition - bulletlastposition))
- local hit, hitposition = workspace:FindPartOnRayWithIgnoreList( ray, { char, rayPart, workspace.currentCamera} )
- if (tor.Position - rayPart.Position).magnitude > 640.999 then
- spawn(function()
- for t=1,10 do wait();
- rayPart.Transparency=rayPart.Transparency+.25;
- end;
- rayPart:destroy();
- end);
- --//rayPart:Destroy();
- break
- end
- parts={};
- if hit then
- local damage = math.random(Dmg, Dmg+16);
- if hit.Parent:findFirstChild("Humanoid") ~= nil then
- hit.Parent.Humanoid.WalkSpeed=6;
- hit.Parent.Humanoid.Health = hit.Parent.Humanoid.Health - damage;
- end;
- if(hit:isA'BasePart'and hit~='Base'and hit.Name~='Base'and hit.Name~='Baseplate')then
- table.insert(parts,hit);
- wait();
- coroutine.wrap(function()
- for i,v in pairs(parts)do
- TweenCFrame(v,v.CFrame*CFrame.new(math.random(-40,40),math.random(-40,40),math.random(-40,40))
- *CFrame.Angles(math.random(-40,40),math.random(-40,40),math.random(-40,40)),.4);
- end;
- end)();
- end;
- bulletposition = hitposition
- rayPart.CFrame = CFrame.new(bulletposition, bulletposition+bulletvelocity) * CFrame.Angles(math.pi/2, 0, 0)
- rayPart:Destroy()
- break
- end
- rayPart.CFrame = CFrame.new(bulletposition, bulletposition+bulletvelocity) * CFrame.Angles(math.pi/2, 0, 0);
- rayPart.Parent = par;
- end
- end))
- end;
- function cycle(num)
- local section = num % 1 * 3;
- local secondary = 0.5 * math.pi * (section % 1);
- if section < 1 then
- return 1, 1 - math.cos(secondary), 1 - math.sin(secondary);
- elseif section < 2 then
- return 1 - math.sin(secondary), 1, 1 - math.cos(secondary);
- else
- return 1 - math.cos(secondary), 1 - math.sin(secondary), 1;
- end
- end
- ---------------------------------------------------
- ypcall(function()char.Model:remove'';end);
- mdl=Instance.new('Model',char);
- mdl.Name='kek';
- local staff=cp(char,v3(.1,.1,.1),'Metal','Light green (Mint)');
- cm(staff,'Cylinder',v3(20,1,1));
- weld(tor,staff,cf(0,.2,3)*ca(0,0,r(90)));
- cap1=cp(staff,v3(.1,.1,.1),'SmoothPlastic','Really black');
- cm(cap1,'Cylinder',v3(.2,1.1,1.1));
- weld(staff,cap1,cf(.8,0,0));
- cap2=cap1:clone'';
- cap2.Parent=staff;
- weld(staff,cap2,cf(.6,0,0));
- cap3=cap2:clone'';
- cap3.Parent=staff;
- weld(staff,cap3,cf(.2,0,0));
- for i=1,5 do
- cap4=cp(staff,v3(.1,.1,.1),'Metal','Light green (Mint)');
- cm(cap4,'Cylinder',v3(.35,1.2,1.2));
- weld(staff,cap4,cf(.8+i/7,0,0));
- end;
- ele1=cp(staff,v3(.1,.1,.1),'Neon','Tr. Flu. Blue');
- cm(ele1,'Cylinder',v3(3,1.12,1.12));
- weld(staff,ele1,cf(1.23,0,0));
- cap5=cp(staff,v3(.1,.1,.1),'Metal','Dark stone grey');
- cm(cap5,'Cylinder',v3(.6,1.55,1.55));
- weld(staff,cap5,cf(1.95,0,0));
- cap6=cap3:clone'';
- cap6.Parent=staff;
- cap6.Mesh.Scale=v3(.15,1.1,1.1);
- weld(staff,cap6,cf(1.6,0,0));
- cap7=cap6:clone'';
- cap7.Parent=staff;
- weld(staff,cap7,cf(1.67,0,0));
- rotat=cp(staff,v3(.1,.1,.1),'Plastic','',1);
- rtw=weld(staff,rotat,cf()*ca(math.rad(90),0,math.rad(90)));
- bm(c1,v3(.5,.599,.7));
- for i=1,360,72 do
- p=cp(rotat,v3(.1,.1,.1),'Metal','Dark stone grey');
- bm(p,v3(.5,.599,.7));
- weld(rotat,p,cf(0,-1.95,0)*ca(0,math.rad(i),0)*cf(0,0,.12));
- end;
- for i=1,360,72 do
- p=cp(rotat,v3(.1,.1,.1),'Neon','Tr. Flu. Blue');
- cm(p,'Cylinder',v3(.4,.5,.15));
- weld(rotat,p,cf(0,-1.929,0)*ca(0,math.rad(i),0)*cf(0,0,.14)*ca(math.rad(90),math.rad(90),0));
- end;
- for i=1,360,72 do
- p=cp(rotat,v3(.1,.1,.1),'Metal','Dark stone grey');
- cm(p,'Wedge',v3(.5,.1,.599));
- weld(rotat,p,cf(0,-1.95,0)*ca(0,math.rad(i),0)*cf(0,0,.2)*ca(math.rad(90),math.rad(0),math.rad(0)));
- end;
- cap8=cap5:clone'';
- cap8.Parent=staff;
- cap8.BrickColor=bc'Light green (Mint)';
- cap8.Mesh.Scale=v3(.4,1.4,1.4);
- weld(staff,cap8,cf(2.02,0,0));
- for i=1,360,90 do
- p=cp(rotat,v3(.1,.1,.1),'Metal','Light stone grey');
- cm(p,'Cylinder',v3(2.4,.1,.1));
- weld(rotat,p,cf(0,-2.3,0)*ca(0,math.rad(i),0)*cf(0,0,.12)*ca(math.rad(90),math.rad(90),0));
- end;
- for i=1,360,30 do
- p2=cp(rotat,v3(.1,.1,.1),'Metal','Light stone grey');
- cm(p2,'Cylinder',v3(.338,.1,.1));
- weld(rotat,p2,cf(0,-2.1,0)*ca(0,math.rad(i),0)*cf(0,0,.12));
- p3=p2:clone'';
- p3.Parent=rotat;
- weld(rotat,p3,cf(0,-2.4,0)*ca(0,math.rad(i),0)*cf(0,0,.12));
- end;
- for i=1,9 do
- c=cp(staff,v3(.1,.1,.1),'Metal','Really black');
- cm(c,'Cylinder',v3(.1,.9,.9));
- weld(staff,c,cf(2+i/30,0,0));
- end;
- cap9=cp(staff,v3(.1,.1,.1),'Neon','Tr. Flu. Blue');
- cm(cap9,'Cylinder',v3(1.2,.82,.82));
- weld(staff,cap9,cf(2.18,0,0));
- for i=1,360,22.5 do
- p=cp(rotat,v3(.1,.1,.1),'Metal','Light green (Mint)');
- bm(p,v3(.2,1.4,.1));
- weld(rotat,p,cf(0,-2.4,0)*ca(0,math.rad(i),0)*cf(0,0,.085)*ca(math.rad(-2),0,0));
- end;
- cap10=cp(staff,v3(.1,.1,.1),'Metal','Light green (Mint)');
- cm(cap10,'Cylinder',v3(.12,1.3,1.3));
- weld(staff,cap10,cf(2.55,0,0));
- for i=1,360,18 do
- p=cp(rotat,v3(.1,.1,.1),'Metal','Light green (Mint)');
- bm(p,v3(.22,.6,.1));
- weld(rotat,p,cf(0,-2.6,0)*ca(0,math.rad(i),0)*cf(0,0,.123)*ca(math.rad(-8),0,0));
- end;
- cap11=cap10:clone'';
- cap11.Parent=staff;
- cap11.Mesh.Scale=v3(.14,1.48,1.48);
- weld(staff,cap11,cf(2.65,0,0));
- cap12=cp(staff,v3(.1,.1,.1),'Metal','Light green (Mint)');
- cm(cap12,'Cylinder',v3(2,1,1));
- weld(staff,cap12,cf(2.8,0,0));
- cap13=cap12:clone'';
- cap13.Parent=staff;
- cap13.Mesh.Scale=v3(.3,1.5,1.5);
- weld(staff,cap13,cf(2.75,0,0));
- cap14=cap13:clone'';
- cap14.Parent=staff;
- cap14.Mesh.Scale=v3(.5,1.65,1.65);
- weld(staff,cap14,cf(2.84,0,0));
- cap15=cap14:clone'';
- cap15.Parent=staff;
- cap15.Mesh.Scale=v3(.6,1.72,1.72);
- weld(staff,cap15,cf(2.965,0,0));
- cap16=cp(staff,v3(.1,.1,.1),'Metal','Dark stone grey');
- cm(cap16,'Cylinder',v3(.65,1.9,1.9));
- weld(staff,cap16,cf(3.05,0,0));
- for i=1,360,72 do
- p=cp(rotat,v3(.1,.1,.1),'Metal','Light yellow');
- cm(p,'Cylinder',v3(2,.1,.1));
- weld(rotat,p,cf(0,-3.06,0)*ca(0,math.rad(i),0)*cf(0,0,.11)*ca(0,math.rad(90),0));
- p2=cp(rotat,v3(.1,.1,.1),'Metal','Light yellow');
- cm(p2,'Sphere',v3(.25,.25,.25));
- weld(rotat,p2,cf(0,-3.06,0)*ca(0,math.rad(i),0)*cf(0,0,.29));
- p3=cp(rotat,v3(.1,.1,.1),'Metal','Black');
- cm(p3,'Cylinder',v3(.1,.64,.64));
- weld(rotat,p3,cf(0,-3.05,0)*ca(0,math.rad(i),0)*cf(0,0,.198)*ca(0,math.rad(90),0));
- p4=p3:clone'';
- p4.Parent=rotat;
- p4.Mesh.Scale=v3(.1,.57,.57);
- weld(rotat,p4,cf(0,-3.05,0)*ca(0,math.rad(i),0)*cf(0,0,.22)*ca(0,math.rad(90),0));
- p5=p4:clone'';
- p5.Parent=rotat;
- p5.Mesh.Scale=v3(.1,.5,.5);
- weld(rotat,p5,cf(0,-3.05,0)*ca(0,math.rad(i),0)*cf(0,0,.24)*ca(0,math.rad(90),0));
- p6=cp(rotat,v3(.1,.1,.1),'Metal','Dark stone grey');
- cm(p6,'Wedge',v3(.14,.08,.05));
- weld(rotat,p6,cf(0,-3.07,0)*ca(0,math.rad(i),0)*cf(0,0,.3)*ca(0,0,0));
- end;
- cap17=cp(staff,v3(.1,.1,.1),'Metal','Dark stone grey');
- cm(cap17,'Cylinder',v3(.23,1.6,1.6));
- weld(staff,cap17,cf(3.14,0,0));
- cap18=cp(staff,v3(.1,.1,.1),'Metal','Light green (Mint)');
- cm(cap18,'Cylinder',v3(.75,2,2));
- weld(staff,cap18,cf(3.24,0,0));
- cast=cp(staff,v3(.1,.1,.1),'Neon','Tr. Flu. Blue');
- c=cm(cast,'FileMesh',v3(.4,.17,.17));
- c.MeshId='rbxassetid://1290033';
- --c.TextureId='rbxassetid://6680839';
- weld(staff,cast,cf(3.5,0,0));
- p7=cp(staff,v3(.1,.1,.1),'Metal','Light green (Mint)');
- stb1=cp(staff,v3(.1,.1,.1),'Metal','Light green (Mint)',1)
- weld(staff,stb1,cf());
- stb2=stb1:clone'';
- stb2.Parent=stb1;
- stb2.Transparency=0;
- bm(stb2,v3(.3,2.3,.16));
- weld(stb1,stb2,cf(-2,.14,0)*ca(0,0,r(67)));
- stb3=stb2:clone'';
- stb3.Parent=stb1;
- stb3.Mesh.Scale=v3(.3,.7,.16);
- weld(stb2,stb3,cf(-.026,.29,0)*ca(0,0,r(20)));
- stb4=cp(stb1,v3(.1,.1,.1),'Metal','Light green (Mint)');
- cm(stb4,'Wedge',v3(.16,.3,1.6));
- weld(stb3,stb4,cf(-.05,.21,0)*ca(r(90),0,r(-90))*ca(r(-20),0,0));
- stb5=stb1:clone'';
- stb5.Parent=staff;
- weld(staff,stb5,cf()*ca(r(180),0,0));
- stb6=stb1:clone'';
- stb6.Parent=staff;
- weld(staff,stb6,cf()*ca(r(180),0,0)*ca(r(90),0,0));
- stb7=stb1:clone'';
- stb7.Parent=staff;
- weld(staff,stb7,cf()*ca(r(180),0,0)*ca(r(-90),0,0));
- et=cp(staff,v3(.1,.1,.1),'Plastic','',1);
- weld(staff,et,cf()*ca(0,0,r(90)));
- for i=1,360,20 do
- p=cp(et,v3(.1,.1,.1),'Metal','Light green (Mint)');
- cm(p,'Cylinder',v3(.33,.2,.6));
- weld(et,p,cf(0,2.15,0)*ca(0,math.rad(i),0)*cf(0,0,.17));
- p2=p:clone'';
- p2.Parent=et;
- p2.Mesh.Scale=v3(.37,.2,.6);
- weld(et,p2,cf(0,2.33,0)*ca(0,math.rad(i),0)*cf(0,0,.19));
- p3=p2:clone'';
- p3.Parent=et;
- p3.Mesh.Scale=v3(.198,.2,.25);
- weld(et,p3,cf(0,2,0)*ca(0,math.rad(i),0)*cf(0,0,.1));
- p4=cp(et,v3(.1,.1,.1),'Metal','Light green (Mint)');
- bm(p4,v3(.3,2,.1));
- weld(et,p4,cf(0,2.18,0)*ca(0,math.rad(i),0)*cf(0,0,.015)*ca(math.rad(-26),0,0));
- end;
- cap19=cp(staff,v3(.1,.1,.1),'Metal','Black');
- cm(cap19,'Cylinder',v3(3,1.1,1.1));
- weld(staff,cap19,cf(-1.35,0,0));
- hL1=cp(staff,v3(.1,.1,.1),'Metal','Light green (Mint)');
- bm(hL1,v3(.6,.8,.5));
- weld(staff,hL1,cf(3.244,.15,0)*ca(0,0,r(-10)));
- h1=hL1:clone'';
- h1.Parent=hL1;
- h1.Mesh.Scale=v3(.1,.5,.5);
- weld(hL1,h1,cf(.05,.13,0));
- h2=h1:clone'';
- h2.Parent=h1;
- weld(hL1,h2,cf(-.025,.13,0));
- h3=cp(hL1,v3(.1,.1,.1),'Metal','Light green (Mint)');
- cm(h3,'Wedge',v3(.5,.5,.12));
- weld(hL1,h3,cf(-.045,.13,0)*ca(0,r(90),0));
- h4=cp(hL1,v3(.1,.1,.1),'Metal','Light green (Mint)');
- cm(h4,'Cylinder',v3(.515,.45,.45));
- weld(hL1,h4,cf(0,.2,0)*ca(r(90),0,r(90)));
- h5=cp(hL1,v3(.1,.1,.1),'Metal','Light green (Mint)');
- bm(h5,v3(.2,.1,.5));
- weld(hL1,h5,cf(.04,.19,0));
- h6=h4:clone'';
- h6.Parent=h5;
- h6.Material='Neon';
- h6.BrickColor=bc'Institutional white';
- h6.mesh.Scale=v3(.516,.1,.2);
- weld(h5,h6,cf(-.055,0,0)*ca(0,r(90),0));
- h7=h6:clone'';
- h7.Parent=h5;
- weld(h5,h7,cf(-.02,.02,0)*ca(0,r(90),0));
- h8=cp(hL1,v3(.1,.1,.1),'Neon','Institutional white');
- bm(h8,v3(.03,.15,.516));
- weld(hL1,h8,cf(0,.2,0)*ca(0,0,r(-75)));
- h9=cp(hL1,v3(.1,.1,.1),'Metal','Light green (Mint)');
- bm(h9,v3(.1,.2,.5));
- weld(hL1,h9,cf(.05,.25,0)*ca(0,0,r(10)));
- hL2=hL1:clone'';
- hL2.Parent=staff;
- weld(staff,hL2,cf(3.244,-.15,0)*ca(r(180),0,r(-10)));
- hL3=hL2:clone'';
- hL3.Parent=staff;
- weld(staff,hL3,cf(3.244,0,.15)*ca(r(90),0,r(-10)));
- hL4=hL3:clone'';
- hL4.Parent=staff;
- weld(staff,hL4,cf(3.244,0,-.15)*ca(r(-90),0,r(-10)));
- pch=1;
- nums={0.374,0.408,0.442,0.476,0.51,0.544,0.578,0.612,0.646,0.68,0.714,0.748,0.782,0.816,0.85,0.884,0.918,0.952,0.986};
- spawn(function()
- while(wait(.88))do
- pch=nums[math.random(1,#nums)];
- end;
- end);
- raty=.25;
- spawn(function()
- while(wait())do
- for i=.25,.85,.025 do
- raty=raty+i;
- wait(.5);
- end;
- for i=.85,.25,-0.25 do
- raty=raty-1;
- wait(.5);
- end;
- end;
- end);
- --[[
- spawn(function()
- while(wait())do
- for i=1,90,90 do wait();
- rtw.C0=rtw.C0*ca(0,math.rad(i+raty),0);
- end;end;
- end);
- ]]
- ms.button1Down:connect(function()
- --[[
- spawn(function()
- for i=1,90,90 do wait(.125);
- rtw.C0=rtw.C0*ca(0,math.rad(i+20),0);
- end;
- end);
- ]]
- spd=145;
- grv=4;
- sn(283428477,cast,1.1);
- sn(186550561,cast,1.1);
- rayCast(workspace,cast,300,9999999);
- end);
- print'hi';--[[
- ms.button2Down:connect(function()
- char.Torso.Weld:remove'';
- coroutine.wrap(function()
- for i,v in pairs(Parts)do v:breakJoints();
- TweenCFrame(v,v.CFrame*CFrame.new(math.random(-40,40),math.random(-40,40),math.random(-40,40))
- *CFrame.Angles(math.random(-40,40),math.random(-40,40),math.random(-40,40)),.4);
- end;
- end)();
- end);]]
Add Comment
Please, Sign In to add comment