bhuge

Untitled

Oct 11th, 2017
32
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 24.87 KB | None | 0 0
  1. me=game.Players.localPlayer;
  2. ms=me:getMouse'';
  3. 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;
  4. anim='Idle';
  5. Parts={};
  6. runna=game:findService'RunService';
  7. local char=me.Character;
  8. --char.Archivable=true;
  9. local lam=char['Left Arm'];
  10. local ram=char['Right Arm'];
  11. local llg=char['Left Leg'];
  12. local rlg=char['Right Leg'];
  13. local hed=char.Head;
  14. local tor=char.Torso;
  15. local hrp=char.HumanoidRootPart;
  16. local hum=char.Humanoid;
  17. cp=(function(par,size,mat,color,t)
  18. p=i('Part',par);
  19. p.formFactor=3;
  20. p.Size=size;
  21. p.Material=mat;
  22. p.CanCollide=false;
  23. p.TopSurface=10;
  24. p.BottomSurface=10;
  25. p.Transparency=t;
  26. p.BrickColor=bc(color);
  27. table.insert(Parts,p);
  28. return(p);
  29. end);
  30. cm=(function(par,type,scale)
  31. m=i('SpecialMesh',par);
  32. m.MeshType=type;
  33. m.Scale=scale;
  34. return(m);
  35. end);
  36. bm=(function(par,size)
  37. b=i('BlockMesh',par);
  38. b.Scale=size;
  39. return(b);
  40. end);
  41. weld=(function(par,p1,cf)
  42. w=i('Weld',par);
  43. w.Part0=par;
  44. w.Part1=p1;
  45. w.C0=cf or cf();
  46. return(w);
  47. end);
  48. sn=function(id,p,pi)
  49. s=Instance.new('Sound',p);
  50. s.SoundId='rbxassetid://'..id;
  51. s.Volume=5;
  52. game:service'ContentProvider':preload(s.SoundId);
  53. s.Pitch=pi;
  54. s:play();
  55. end;
  56. function cycle(num)
  57. local section = num % 1 * 3;
  58. local secondary = 0.5 * math.pi * (section % 1);
  59. if section < 1 then
  60. return 1, 1 - math.cos(secondary), 1 - math.sin(secondary);
  61. elseif section < 2 then
  62. return 1 - math.sin(secondary), 1, 1 - math.cos(secondary);
  63. else
  64. return 1 - math.cos(secondary), 1 - math.sin(secondary), 1;
  65. end
  66. end
  67. function Recursive(Model)
  68. local Stuff = {}
  69. local function Recur(Targ)
  70. for i,v in pairs(Targ:getChildren()) do
  71. table.insert(Stuff,v)
  72. Recur(v)
  73. end
  74. end
  75. Recur(Model)
  76. return Stuff
  77. end
  78. function Resize(Character,Scale)
  79. Stuff = Recursive(Character)
  80. Welds = {};
  81. for i,v in pairs(Stuff)do
  82. if v:isA("Motor6D") or v:isA("Weld") then
  83. local C0 = v.C0
  84. local C1 = v.C1
  85. v.C0 = C0+C0.p*Scale-C0.p
  86. v.C1 = C1+C1.p*Scale-C1.p
  87. table.insert(Welds,{v,v.Part1})
  88. v.Part1 = nil
  89. end
  90. if v:isA("SpecialMesh") then
  91. if v.MeshId ~= "" then
  92. v.Scale = v.Scale*Scale
  93. end
  94. end
  95. end
  96. for i,v in pairs(Stuff)do
  97. if v:isA("BasePart") and v.Parent.className ~= "Hat" then
  98. v.formFactor = "Custom"
  99. v.Size = v.Size*Scale
  100. end
  101. end
  102. for i,v in pairs(Welds) do v[1].Part1 = v[2] end
  103. end
  104. --[[
  105. spawn(function()
  106. while(coroutine.yield())do
  107. game.Lighting.TimeOfDay=17;
  108. game.Lighting.FogEnd=9999;
  109. game.Lighting.Outlines=true;
  110. game.Lighting.Ambient=Color3.new(0,0,0);
  111. game.Lighting.Brightness=5;
  112. end;
  113. end);
  114. ]]
  115.  
  116. tab={};
  117. function TweenCFrame(part,cframe,speed)
  118. local c0=part.CFrame
  119. Spawn(function()
  120. for i=-90,90,speed do
  121. local r=((math.sin(math.rad(i))+1)/2)
  122. local a=Vector3.new(getangles(c0)):lerp(Vector3.new(getangles(cframe)),r)
  123. part.CFrame=CFrame.new(c0.p:lerp(cframe.p,r))*CFrame.Angles(a.x,a.y,a.z)
  124. wait()
  125. end
  126. end)
  127. end;
  128. function getangles(cframe)
  129. local x,y,z,m00,m01,m02,m40,m11,m12,m20,m21,m22=cframe:components()
  130. local X=math.atan2(-m12,m22)
  131. local Y=math.asin(m02)
  132. local Z=math.atan2(-m01,m00) return X,Y,Z
  133. end;
  134. --//Resize(workspace[me.Name],2);
  135. function rayCast(par,startpos, Speed, Dmg)
  136. local rayPart = Instance.new("Part")
  137. rayPart.Name = "RayPart"
  138. rayPart.Anchored = true
  139. rayPart.Material='Neon';
  140. rayPart.CanCollide = false
  141. rayPart.Locked = true
  142. rayPart.FormFactor = 3;
  143. rayPart.BrickColor=BrickColor.new'Tr. Flu. Blue';
  144. rayPart.TopSurface = Enum.SurfaceType.Smooth
  145. rayPart.BottomSurface = Enum.SurfaceType.Smooth
  146. rayPart.Size = Vector3.new(6,6,6);
  147. rayPart.Shape='Ball';
  148. fr=i'Fire';
  149. fr.Parent=rayPart;
  150. fr.Size=10;
  151. fr.Heat=1000;
  152. --fr.SecondaryColor=bc'Light green (Mint)'.Color;
  153. fr.Color=bc'Tr. Flu. Blue'.Color;
  154. pl=i('PointLight',rayPart);
  155. pl.Range=20;
  156. pl.Brightness=5;
  157. --pl.Color=bc'Toothpaste'.Color;
  158. --[[pt=Instance.new('ParticleEmitter',rayPart);
  159. pt.EmissionDirection='Top';
  160. pt.LightEmission=1;
  161. pt.Color=ColorSequence.new(Color3.new(1,1,1));
  162. pt.Size=NumberSequence.new(1,1);
  163. pt.Lifetime=NumberRange.new(20,20);
  164. pt.Rate=1000;
  165. pt.Speed=NumberRange.new(6,6)
  166. pt.VelocitySpread=10;
  167. pt.Texture='rbxassetid://175622422';
  168. pt.Rate=10000;
  169. coroutine.wrap(changet)(pt);
  170. coroutine.wrap(tsize)(pt);
  171. ]]
  172. spawn(function()
  173. while(wait())do
  174. for e=6,.5,-.1 do
  175. wait();
  176. rayPart.Size=v3(e,e,e);
  177. end;
  178. for e=.5,6,.1 do
  179. wait();
  180. rayPart.Size=v3(e,e,e);
  181. end;
  182. end;
  183. end);
  184. local bulletposition = startpos.Position;
  185. rayPart.CFrame = startpos.CFrame
  186. local bulletvelocity = (Vector3.new(0,0,0))+( ms.Hit.p - bulletposition).unit*Speed
  187. local bulletlastposition = bulletposition
  188. coroutine.resume(coroutine.create(function()
  189. while true do
  190. local dt = wait(1/60);
  191. bulletlastposition = bulletposition
  192. bulletvelocity = bulletvelocity + (Vector3.new(0, -3.81, 0)*dt)
  193. bulletposition = bulletposition + (bulletvelocity*dt)
  194. local ray = Ray.new(bulletlastposition, (bulletposition - bulletlastposition))
  195. local hit, hitposition = workspace:FindPartOnRayWithIgnoreList( ray, { char, rayPart, workspace.currentCamera} )
  196. if (tor.Position - rayPart.Position).magnitude > 640.999 then
  197. spawn(function()
  198. for t=1,10 do wait();
  199. rayPart.Transparency=rayPart.Transparency+.25;
  200. end;
  201. rayPart:destroy();
  202. end);
  203. --//rayPart:Destroy();
  204. break
  205. end
  206. parts={};
  207. if hit then
  208. local damage = math.random(Dmg, Dmg+16);
  209. if hit.Parent:findFirstChild("Humanoid") ~= nil then
  210. hit.Parent.Humanoid.WalkSpeed=6;
  211. hit.Parent.Humanoid.Health = hit.Parent.Humanoid.Health - damage;
  212.  
  213. end;
  214. if(hit:isA'BasePart'and hit~='Base'and hit.Name~='Base'and hit.Name~='Baseplate')then
  215. table.insert(parts,hit);
  216. wait();
  217. coroutine.wrap(function()
  218. for i,v in pairs(parts)do
  219. TweenCFrame(v,v.CFrame*CFrame.new(math.random(-40,40),math.random(-40,40),math.random(-40,40))
  220. *CFrame.Angles(math.random(-40,40),math.random(-40,40),math.random(-40,40)),.4);
  221. end;
  222. end)();
  223. end;
  224. bulletposition = hitposition
  225. rayPart.CFrame = CFrame.new(bulletposition, bulletposition+bulletvelocity) * CFrame.Angles(math.pi/2, 0, 0)
  226. rayPart:Destroy()
  227. break
  228. end
  229. rayPart.CFrame = CFrame.new(bulletposition, bulletposition+bulletvelocity) * CFrame.Angles(math.pi/2, 0, 0);
  230. rayPart.Parent = par;
  231. end
  232. end))
  233. end;
  234. function cycle(num)
  235. local section = num % 1 * 3;
  236. local secondary = 0.5 * math.pi * (section % 1);
  237. if section < 1 then
  238. return 1, 1 - math.cos(secondary), 1 - math.sin(secondary);
  239. elseif section < 2 then
  240. return 1 - math.sin(secondary), 1, 1 - math.cos(secondary);
  241. else
  242. return 1 - math.cos(secondary), 1 - math.sin(secondary), 1;
  243. end
  244. end
  245. ---------------------------------------------------
  246. ypcall(function()char.kek:remove'';end);
  247. mdl=Instance.new('Model',char);
  248. mdl.Name='kek';
  249. local staff=cp(mdl,v3(.1,.1,.1),'Metal','Light green (Mint)');
  250. staff.Name='sTf';
  251. cm(staff,'Cylinder',v3(20,1,1));
  252. staffweld=weld(ram,staff,cf(-.7,-1.3,-.2)*ca(r(20),r(70),r(-90))*ca(0,r(60),0));
  253. cap1=cp(staff,v3(.1,.1,.1),'SmoothPlastic','Really black');
  254. cm(cap1,'Cylinder',v3(.2,1.1,1.1));
  255. weld(staff,cap1,cf(.8,0,0));
  256. cap2=cap1:clone'';
  257. cap2.Parent=staff;
  258. weld(staff,cap2,cf(.6,0,0));
  259. cap3=cap2:clone'';
  260. cap3.Parent=staff;
  261. weld(staff,cap3,cf(.2,0,0));
  262. for i=1,5 do
  263. cap4=cp(staff,v3(.1,.1,.1),'Metal','Light green (Mint)');
  264. cm(cap4,'Cylinder',v3(.35,1.2,1.2));
  265. weld(staff,cap4,cf(.8+i/7,0,0));
  266. end;
  267. ele1=cp(staff,v3(.1,.1,.1),'Neon','Tr. Flu. Blue');
  268. cm(ele1,'Cylinder',v3(3,1.12,1.12));
  269. weld(staff,ele1,cf(1.23,0,0));
  270. cap5=cp(staff,v3(.1,.1,.1),'Metal','Dark stone grey');
  271. cm(cap5,'Cylinder',v3(.6,1.55,1.55));
  272. weld(staff,cap5,cf(1.95,0,0));
  273. cap6=cap3:clone'';
  274. cap6.Parent=staff;
  275. cap6.Mesh.Scale=v3(.15,1.1,1.1);
  276. weld(staff,cap6,cf(1.6,0,0));
  277. cap7=cap6:clone'';
  278. cap7.Parent=staff;
  279. weld(staff,cap7,cf(1.67,0,0));
  280. rotat=cp(staff,v3(.1,.1,.1),'Plastic','',1);
  281. rtw=weld(staff,rotat,cf()*ca(math.rad(90),0,math.rad(90)));
  282. bm(c1,v3(.5,.599,.7));
  283. for i=1,360,72 do
  284. p=cp(rotat,v3(.1,.1,.1),'Metal','Dark stone grey');
  285. bm(p,v3(.5,.599,.7));
  286. weld(rotat,p,cf(0,-1.95,0)*ca(0,math.rad(i),0)*cf(0,0,.12));
  287. end;
  288. for i=1,360,72 do
  289. p=cp(rotat,v3(.1,.1,.1),'Neon','Tr. Flu. Blue');
  290. cm(p,'Cylinder',v3(.4,.5,.15));
  291. 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));
  292. end;
  293. for i=1,360,72 do
  294. p=cp(rotat,v3(.1,.1,.1),'Metal','Dark stone grey');
  295. cm(p,'Wedge',v3(.5,.1,.599));
  296. 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)));
  297. end;
  298. cap8=cap5:clone'';
  299. cap8.Parent=staff;
  300. cap8.BrickColor=bc'Light green (Mint)';
  301. cap8.Mesh.Scale=v3(.4,1.4,1.4);
  302. weld(staff,cap8,cf(2.02,0,0));
  303. for i=1,360,90 do
  304. p=cp(rotat,v3(.1,.1,.1),'Metal','Light stone grey');
  305. cm(p,'Cylinder',v3(2.4,.1,.1));
  306. 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));
  307. end;
  308. for i=1,360,30 do
  309. p2=cp(rotat,v3(.1,.1,.1),'Metal','Light stone grey');
  310. cm(p2,'Cylinder',v3(.338,.1,.1));
  311. weld(rotat,p2,cf(0,-2.1,0)*ca(0,math.rad(i),0)*cf(0,0,.12));
  312. p3=p2:clone'';
  313. p3.Parent=rotat;
  314. weld(rotat,p3,cf(0,-2.4,0)*ca(0,math.rad(i),0)*cf(0,0,.12));
  315. end;
  316. for i=1,9 do
  317. c=cp(staff,v3(.1,.1,.1),'Metal','Really black');
  318. cm(c,'Cylinder',v3(.1,.9,.9));
  319. weld(staff,c,cf(2+i/30,0,0));
  320. end;
  321. cap9=cp(staff,v3(.1,.1,.1),'Neon','Tr. Flu. Blue');
  322. cm(cap9,'Cylinder',v3(1.2,.82,.82));
  323. weld(staff,cap9,cf(2.18,0,0));
  324. for i=1,360,22.5 do
  325. p=cp(rotat,v3(.1,.1,.1),'Metal','Light green (Mint)');
  326. bm(p,v3(.2,1.4,.1));
  327. weld(rotat,p,cf(0,-2.4,0)*ca(0,math.rad(i),0)*cf(0,0,.085)*ca(math.rad(-2),0,0));
  328. end;
  329. cap10=cp(staff,v3(.1,.1,.1),'Metal','Light green (Mint)');
  330. cm(cap10,'Cylinder',v3(.12,1.3,1.3));
  331. weld(staff,cap10,cf(2.55,0,0));
  332. for i=1,360,18 do
  333. p=cp(rotat,v3(.1,.1,.1),'Metal','Light green (Mint)');
  334. bm(p,v3(.22,.6,.1));
  335. weld(rotat,p,cf(0,-2.6,0)*ca(0,math.rad(i),0)*cf(0,0,.123)*ca(math.rad(-8),0,0));
  336. end;
  337. cap11=cap10:clone'';
  338. cap11.Parent=staff;
  339. cap11.Mesh.Scale=v3(.14,1.48,1.48);
  340. weld(staff,cap11,cf(2.65,0,0));
  341. cap12=cp(staff,v3(.1,.1,.1),'Metal','Light green (Mint)');
  342. cm(cap12,'Cylinder',v3(2,1,1));
  343. weld(staff,cap12,cf(2.8,0,0));
  344. cap13=cap12:clone'';
  345. cap13.Parent=staff;
  346. cap13.Mesh.Scale=v3(.3,1.5,1.5);
  347. weld(staff,cap13,cf(2.75,0,0));
  348. cap14=cap13:clone'';
  349. cap14.Parent=staff;
  350. cap14.Mesh.Scale=v3(.5,1.65,1.65);
  351. weld(staff,cap14,cf(2.84,0,0));
  352. cap15=cap14:clone'';
  353. cap15.Parent=staff;
  354. cap15.Mesh.Scale=v3(.6,1.72,1.72);
  355. weld(staff,cap15,cf(2.965,0,0));
  356. cap16=cp(staff,v3(.1,.1,.1),'Metal','Dark stone grey');
  357. cm(cap16,'Cylinder',v3(.65,1.9,1.9));
  358. weld(staff,cap16,cf(3.05,0,0));
  359. for i=1,360,72 do
  360. p=cp(rotat,v3(.1,.1,.1),'Metal','Light yellow');
  361. cm(p,'Cylinder',v3(2,.1,.1));
  362. weld(rotat,p,cf(0,-3.06,0)*ca(0,math.rad(i),0)*cf(0,0,.11)*ca(0,math.rad(90),0));
  363. p2=cp(rotat,v3(.1,.1,.1),'Metal','Light yellow');
  364. cm(p2,'Sphere',v3(.25,.25,.25));
  365. weld(rotat,p2,cf(0,-3.06,0)*ca(0,math.rad(i),0)*cf(0,0,.29));
  366. p3=cp(rotat,v3(.1,.1,.1),'Metal','Black');
  367. cm(p3,'Cylinder',v3(.1,.64,.64));
  368. weld(rotat,p3,cf(0,-3.05,0)*ca(0,math.rad(i),0)*cf(0,0,.198)*ca(0,math.rad(90),0));
  369. p4=p3:clone'';
  370. p4.Parent=rotat;
  371. p4.Mesh.Scale=v3(.1,.57,.57);
  372. weld(rotat,p4,cf(0,-3.05,0)*ca(0,math.rad(i),0)*cf(0,0,.22)*ca(0,math.rad(90),0));
  373. p5=p4:clone'';
  374. p5.Parent=rotat;
  375. p5.Mesh.Scale=v3(.1,.5,.5);
  376. weld(rotat,p5,cf(0,-3.05,0)*ca(0,math.rad(i),0)*cf(0,0,.24)*ca(0,math.rad(90),0));
  377. p6=cp(rotat,v3(.1,.1,.1),'Metal','Dark stone grey');
  378. cm(p6,'Wedge',v3(.14,.08,.05));
  379. weld(rotat,p6,cf(0,-3.07,0)*ca(0,math.rad(i),0)*cf(0,0,.3)*ca(0,0,0));
  380. end;
  381. cap17=cp(staff,v3(.1,.1,.1),'Metal','Dark stone grey');
  382. cm(cap17,'Cylinder',v3(.23,1.6,1.6));
  383. weld(staff,cap17,cf(3.14,0,0));
  384. cap18=cp(staff,v3(.1,.1,.1),'Metal','Light green (Mint)');
  385. cm(cap18,'Cylinder',v3(.75,2,2));
  386. weld(staff,cap18,cf(3.24,0,0));
  387. cast=cp(staff,v3(.1,.1,.1),'Neon','Tr. Flu. Blue');
  388. c=cm(cast,'FileMesh',v3(.3,.1,.1));
  389. c.MeshId='rbxassetid://1290033';
  390. --c.TextureId='rbxassetid://6680839';
  391. cw=weld(staff,cast,cf(3.5,0,0));
  392. p7=cp(staff,v3(.1,.1,.1),'Metal','Light green (Mint)');
  393. stb1=cp(staff,v3(.1,.1,.1),'Metal','Light green (Mint)',1)
  394. weld(staff,stb1,cf());
  395. stb2=stb1:clone'';
  396. stb2.Parent=stb1;
  397. stb2.Transparency=0;
  398. bm(stb2,v3(.3,2.3,.16));
  399. weld(stb1,stb2,cf(-2,.14,0)*ca(0,0,r(67)));
  400. stb3=stb2:clone'';
  401. stb3.Parent=stb1;
  402. stb3.Mesh.Scale=v3(.3,.7,.16);
  403. weld(stb2,stb3,cf(-.026,.29,0)*ca(0,0,r(20)));
  404. stb4=cp(stb1,v3(.1,.1,.1),'Metal','Light green (Mint)');
  405. cm(stb4,'Wedge',v3(.16,.3,1.6));
  406. weld(stb3,stb4,cf(-.05,.21,0)*ca(r(90),0,r(-90))*ca(r(-20),0,0));
  407. stb5=stb1:clone'';
  408. stb5.Parent=staff;
  409. weld(staff,stb5,cf()*ca(r(180),0,0));
  410. stb6=stb1:clone'';
  411. stb6.Parent=staff;
  412. weld(staff,stb6,cf()*ca(r(180),0,0)*ca(r(90),0,0));
  413. stb7=stb1:clone'';
  414. stb7.Parent=staff;
  415. weld(staff,stb7,cf()*ca(r(180),0,0)*ca(r(-90),0,0));
  416. et=cp(staff,v3(.1,.1,.1),'Plastic','',1);
  417. weld(staff,et,cf()*ca(0,0,r(90)));
  418. for i=1,360,20 do
  419. p=cp(et,v3(.1,.1,.1),'Metal','Light green (Mint)');
  420. cm(p,'Cylinder',v3(.33,.2,.6));
  421. weld(et,p,cf(0,2.15,0)*ca(0,math.rad(i),0)*cf(0,0,.17));
  422. p2=p:clone'';
  423. p2.Parent=et;
  424. p2.Mesh.Scale=v3(.37,.2,.6);
  425. weld(et,p2,cf(0,2.33,0)*ca(0,math.rad(i),0)*cf(0,0,.19));
  426. p3=p2:clone'';
  427. p3.Parent=et;
  428. p3.Mesh.Scale=v3(.198,.2,.25);
  429. weld(et,p3,cf(0,2,0)*ca(0,math.rad(i),0)*cf(0,0,.1));
  430. p4=cp(et,v3(.1,.1,.1),'Metal','Light green (Mint)');
  431. bm(p4,v3(.3,2,.1));
  432. weld(et,p4,cf(0,2.18,0)*ca(0,math.rad(i),0)*cf(0,0,.015)*ca(math.rad(-26),0,0));
  433. end;
  434. cap19=cp(staff,v3(.1,.1,.1),'Metal','Black');
  435. cm(cap19,'Cylinder',v3(3,1.1,1.1));
  436. wa=weld(staff,cap19,cf(-1.35,0,0));
  437.  
  438. hL1=cp(staff,v3(.1,.1,.1),'Metal','Light green (Mint)');
  439. bm(hL1,v3(.6,.8,.5));
  440. weld(staff,hL1,cf(3.244,.15,0)*ca(0,0,r(-14)));
  441. h1=hL1:clone'';
  442. h1.Parent=hL1;
  443. h1.Mesh.Scale=v3(.1,.5,.5);
  444. weld(hL1,h1,cf(.05,.13,0));
  445. h2=h1:clone'';
  446. h2.Parent=h1;
  447. weld(hL1,h2,cf(-.025,.13,0));
  448. h3=cp(hL1,v3(.1,.1,.1),'Metal','Light green (Mint)');
  449. cm(h3,'Wedge',v3(.5,.5,.12));
  450. weld(hL1,h3,cf(-.045,.13,0)*ca(0,r(90),0));
  451. h4=cp(hL1,v3(.1,.1,.1),'Metal','Light green (Mint)');
  452. cm(h4,'Cylinder',v3(.515,.45,.45));
  453. weld(hL1,h4,cf(0,.2,0)*ca(r(90),0,r(90)));
  454. h5=cp(hL1,v3(.1,.1,.1),'Metal','Light green (Mint)');
  455. bm(h5,v3(.2,.1,.5));
  456. weld(hL1,h5,cf(.04,.19,0));
  457. h6=h4:clone'';
  458. h6.Parent=h5;
  459. h6.Material='Neon';
  460. h6.BrickColor=bc'Institutional white';
  461. h6.mesh.Scale=v3(.516,.1,.2);
  462. weld(h5,h6,cf(-.055,0,0)*ca(0,r(90),0));
  463. h7=h6:clone'';
  464. h7.Parent=h5;
  465. weld(h5,h7,cf(-.02,.02,0)*ca(0,r(90),0));
  466. h8=cp(hL1,v3(.1,.1,.1),'Neon','Institutional white');
  467. bm(h8,v3(.03,.15,.516));
  468. weld(hL1,h8,cf(0,.2,0)*ca(0,0,r(-75)));
  469. h9=cp(hL1,v3(.1,.1,.1),'Metal','Light green (Mint)');
  470. bm(h9,v3(.3,.25,.5));
  471. weld(hL1,h9,cf(.024,.22,0)*ca(0,0,r(10)));
  472. h10=cp(hL1,v3(.1,.1,.1),'Metal','Light green (Mint)');
  473. cm(h10,'Wedge',v3(.1,.1,.35));
  474. weld(hL1,h10,cf(.015,.25,.04)*ca(0,r(90),0)*ca(r(-10),0,0));
  475. h11=h10:clone'';
  476. h11.Parent=hL1;
  477. weld(hL1,h11,cf(.015,.25,-.04)*ca(0,r(90),0)*ca(r(-10),0,0));
  478. h12=h9:clone'';
  479. h12.Parent=hL1;
  480. h12.Mesh.Scale=v3(.75,.1,.5);
  481. weld(hL1,h12,cf(.12,.26,0)*ca(0,0,r(4)));
  482. h13=h12:clone'';
  483. h13.Parent=hL1;
  484. weld(hL1,h13,cf(.12,.2,0)*ca(0,0,r(4)));
  485. h14=cp(hL1,v3(.1,.1,.1),'Metal','Light green (Mint)');
  486. cm(h14,'Cylinder',v3(.9,.45,.45));
  487. weld(hL1,h14,cf(.18,.236,0)*ca(r(90),0,r(90)));
  488. h15=h14:clone'';
  489. h15.Parent=h14;
  490. h15.Mesh.Scale=v3(1,.3,.3);
  491. weld(h14,h15,cf());
  492. --//stabb
  493. h16=cp(h14,v3(.1,.1,.1),'Metal','Laurel green');
  494. cm(h16,'Wedge',v3(.13,.5,1.7));
  495. weld(h14,h16,cf(-.058,-.18,-.02)*ca(r(-95),0,0));
  496. h17=cp(h16,v3(.1,.1,.1),'Metal','Laurel green');
  497. cm(h17,'Wedge',v3(.13,.2,1.72));
  498. weld(h16,h17,cf()*ca(r(170),0,0));
  499. h18=cp(h16,v3(.1,.1,.1),'Metal','Laurel green');
  500. cm(h18,'Wedge',v3(.13,.35,.7));
  501. weld(h16,h18,cf(0,-.051,.2)*ca(r(90),r(180),0));
  502. h19=h18:clone'';
  503. h19.Parent=h18;
  504. h19.Mesh.Scale=v3(.13,.16,.3);
  505. weld(h18,h19,cf(0,0,.086)*ca(r(90),0,0));
  506. h20=h19:clone'';
  507. h20.Parent=h18;
  508. h20.Mesh.Scale=v3(.13,.35,1.5);
  509. weld(h16,h20,cf(0,-.082,.015)*ca(0,0,r(180)));
  510. h21=h20:clone'';
  511. h21.Parent=h16;
  512. h21.Mesh.Scale=v3(.13,.2,1.4);
  513. weld(h16,h21,cf(0,-.042,-.3)*ca(r(-6),0,0));
  514. h22=h16:clone'';
  515. h22.Parent=h16;
  516. weld(h16,h22,cf(.12,0,0));
  517.  
  518. --//
  519. for i=1,360,12.857 do
  520. p=cp(et,v3(.1,.1,.1),'Ice','Olivine');
  521. cm(p,'Cylinder',v3(20,.1,1));
  522. weld(et,p,cf()*ca(0,math.rad(i),r(90))*cf(0,0,.097));
  523. end;
  524. for i=1,360,124 do
  525. p=cp(et,v3(.1,.1,.1),'Metal','Light green (Mint)');
  526. cm(p,'Cylinder',v3(1,.4,1));
  527. weld(et,p,cf(0,1.3,0)*ca(0,math.rad(i),r(90))*cf(0,0,.14));
  528. p2=cp(p,v3(.1,.1,.1),'Neon','Cyan',.6);
  529. cm(p2,'Cylinder',v3(1.2,.3,1.2));
  530. weld(et,p2,cf(0,1.3,0)*ca(0,math.rad(i),r(90))*cf(0,0,.14))
  531. p3=cp(et,v3(.1,.1,.1),'Metal','Light green (Mint)');
  532. cm(p3,'Wedge',v3(.1,1,2));
  533. weld(et,p3,cf(0,1.4,0)*ca(r(180),math.rad(i),r(180))*cf(0,0,.1)*ca(r(-65),0,0));
  534. end;
  535. h23=cp(staff,v3(.1,.1,.1),'Metal','Light green (Mint)');
  536. bm(h23,v3(.2,.5,.1));
  537. weld(staff,h23,cf(-1.8,.08,.08));
  538. h24=cp(h23,v3(.1,.1,.1),'Metal','Light green (Mint)');
  539. cm(h24,'Cylinder',v3(.8,.4,.8));
  540. weld(h23,h24,cf(0,.07,0));
  541. h25=h24:clone'';
  542. h25.Parent=h24;
  543. h25.Mesh.Scale=v3(.75,.45,.75);
  544. weld(h24,h25,cf());
  545. h26=h25:clone'';
  546. h26.Parent=h24;
  547. h26.BrickColor=bc'Daisy orange';
  548. h26.Material='Neon';
  549. h26.Mesh.Scale=v3(.4,.45,.1);
  550. weld(h24,h26,cf(.07,0,.02));
  551. h27=h26:clone'';
  552. h27.Parent=h24;
  553. weld(h24,h27,cf(.05,0,-.02));
  554.  
  555. hL2=hL1:clone'';
  556. hL2.Parent=staff;
  557. weld(staff,hL2,cf(3.244,-.15,0)*ca(r(180),0,r(-14)));
  558. hL3=hL2:clone'';
  559. hL3.Parent=staff;
  560. weld(staff,hL3,cf(3.244,0,.15)*ca(r(90),0,r(-14)));
  561. hL4=hL3:clone'';
  562. hL4.Parent=staff;
  563. weld(staff,hL4,cf(3.244,0,-.15)*ca(r(-90),0,r(-14)));
  564. pch=1;
  565. 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};
  566. spawn(function()
  567. while(wait(.88))do
  568. pch=nums[math.random(1,#nums)];
  569. end;
  570. end);
  571. raty=.25;
  572. spawn(function()
  573. while(wait())do
  574. for i=.25,.85,.025 do
  575. raty=raty+i;
  576. wait(.5);
  577. end;
  578. for i=.85,.25,-0.25 do
  579. raty=raty-1;
  580. wait(.5);
  581. end;
  582. end;
  583. end);
  584. ms.button1Down:connect(function()
  585. spd=145;
  586. grv=4;
  587. sn(283428477,cast,1.1);
  588. sn(186550561,cast,1.1);
  589. rayCast(workspace,cast,200,0);
  590. end);
  591. --//Resize(workspace[me.Name],1.7);
  592. --//---------------------------------------------------
  593. function Lerp(a,b,i)
  594. local com1={a.X,a.Y,a.Z,a:toEulerAnglesXYZ()};
  595. local com2={b.X,b.Y,b.Z,b:toEulerAnglesXYZ()};
  596. local calx=com1[1]+(com2[1]-com1[1])*i;
  597. local caly=com1[2]+(com2[2]-com1[2])*i;
  598. local calz=com1[3]+(com2[3]-com1[3])*i;
  599. local cala=com1[4]+(com2[4]-com1[4])*i;
  600. local calb=com1[5]+(com2[5]-com1[5])*i;
  601. local calc=com1[6]+(com2[6]-com1[6])*i;
  602. return CFrame.new(calx,caly,calz)*CFrame.Angles(cala,calb,calc);
  603. end;
  604. newWeld=function(wld,wp0,wp1,wc0x,wc0y,wc0z)
  605. wld=Instance.new('Weld',wp1);
  606. wld.Part0=wp0;
  607. wld.Part1=wp1;
  608. wld.C0=CFrame.new(wc0x,wc0y,wc0z);
  609. end;
  610. newWeld=function(wp0,wp1,wc0x,wc0y,wc0z)
  611. wld=Instance.new('Weld',wp1);
  612. wld.Part0=wp0;
  613. wld.Part1=wp1;
  614. wld.C0=CFrame.new(wc0x,wc0y,wc0z);
  615. return(wld);
  616. end;
  617. local law=newWeld(tor, lam,-1.5,0.5,0);
  618. law.C1=CFrame.new(0,0.5,0);
  619. local raw=newWeld(tor,ram,1.5,0.5,0);
  620. raw.C1=CFrame.new(0,0.5,0);
  621. local hew=newWeld(tor,hed,0,1.5,0);
  622. local llw=newWeld(tor,llg,-0.5,-1,0);
  623. llw.C1=CFrame.new(0,1,0);
  624. local rlw=newWeld(tor,rlg,0.5,-1,0);
  625. rlw.C1=CFrame.new(0,1,0);
  626. local tow=newWeld(hrp,tor,0,-1,0);
  627. tow.C1=CFrame.new(0,-1,0);
  628. local laD=CFrame.new(-1.5, 0.5, 0);
  629. local raD=CFrame.new(1.5, 0.5, 0);
  630. local hD=CFrame.new(0, 1.5, 0);
  631. local tD=CFrame.new(0, -1, 0);
  632. local llD=CFrame.new(-0.5, -1, 0);
  633. local rlD=CFrame.new(0.5, -1, 0);
  634. syne=0;
  635. runna.RenderStepped:connect(function()
  636. syne=syne+1;
  637. if(tor.Velocity*Vector3.new(1,0,1)).magnitude<1 and(tor.Velocity.y<5)and(tor.Velocity.y>-5)then
  638. anim='Idling';
  639. elseif(tor.Velocity.y>5)and(hum.Jump)then
  640. anim='Jumping';
  641. elseif(tor.Velocity.y<-5) and(tor.Velocity.z>0)and(hum.Jump)then
  642. anim='Freefalling';
  643. elseif (hrp.Velocity*Vector3.new(1,0,1)).magnitude>1 and(hrp.Velocity*Vector3.new(1,0,1)).magnitude<25 and(tor.Velocity.y<5)and(tor.Velocity.y>-5)then
  644. anim='Walking'
  645. elseif(hrp.Velocity*Vector3.new(1,0,1)).magnitude>1 and(hrp.Velocity*Vector3.new(1,0,1)).magnitude<32 and(tor.Velocity.y<5)and(tor.Velocity.y>-5)then
  646. anim='Running';
  647. end
  648. if(anim=='Idle')then
  649. end;
  650. --tow.C0=Lerp(tow.C0,tD*CFrame.new(0,2+.45*math.cos(syne/14),0)*CFrame.Angles(-.01+.02*math.cos(syne/8),0,0),.1);
  651. tow.C0=Lerp(tow.C0,tD, 0.2);
  652. hed.Weld.C0=Lerp(hed.Weld.C0,hD*CFrame.Angles(.01+.05*math.sin(syne/12),0,0),.1);
  653. raw.C0=Lerp(raw.C0,raD*CFrame.new(-.5,-.03+.05*math.sin(syne/12),-.2)*CFrame.Angles(r(50),.12-.05*math.cos(syne/8)*-math.sin(syne/22)/1.2,r(-10)),.1);
  654. law.C0=Lerp(law.C0,laD*CFrame.new(.4,-.03+.05*math.sin(syne/12),-.5)*CFrame.Angles(r(50),-.12-.05*math.cos(syne/8)*-math.sin(syne/22)/1.2,r(8)),.1);
  655. --llw.C0=Lerp(llw.C0,llD*CFrame.Angles(r(-7),r(17),0),1);
  656. --rlw.C0=Lerp(rlw.C0,rlD*CFrame.Angles(r(10),0,r(15)),1);
  657. staffweld:remove'';
  658. weld(ram,staff,cf(-.7,-1.3,-.2)*ca(r(20),r(70),r(-90))*ca(0,r(60),0));
  659. --staffweld.C0=staffweld.C0*CFrame.new(-.7,-1.3,-.2)*CFrame.Angles(r(20),r(70),r(-90))*CFrame.Angles(0,r(60),0);
  660. if(anim=='Walking')then
  661. tow.C0=Lerp(tow.C0,CFrame.new(0,-1,0)*CFrame.Angles(-math.rad(hum.WalkSpeed/1.8),math.rad(0-2*math.cos((syne/7/1))),math.rad((hrp.RotVelocity.Y/6)-1*math.cos((syne/7/1)))),1)
  662. --law.C0=Lerp(law.C0,laD*CFrame.Angles(math.rad(2-35*math.cos((syne/7)/1)),math.rad(0),math.rad(-1)),1)
  663. --raw.C0=Lerp(raw.C0,raD*CFrame.Angles(math.rad(2+35*math.cos((syne/7)/1)),math.rad(0),math.rad(1)),1)
  664. hed.Weld.C0=Lerp(hed.Weld.C0,hD*CFrame.new(0,0,0)*CFrame.Angles(math.rad(0-2*math.cos(syne/7)/1),math.rad((hrp.RotVelocity.Y*2)+0.25*math.cos((syne/7/2))),math.rad(0+0.25*math.cos((syne/7/2)))),1)
  665. llw.C0=Lerp(llw.C0,llD*CFrame.Angles(math.rad(2+35*math.cos((syne/3.5)/1)),0,0),1.7)
  666. rlw.C0=Lerp(rlw.C0,rlD*CFrame.Angles(math.rad(2-35*math.cos((syne/3.5)/1)),0,0),1.7)
  667. raw.C0=Lerp(raw.C0,raD*CFrame.new(0,-.5,0)*CFrame.Angles(r(40),0,0),1);
  668. staffweld:remove'';
  669. weld(ram,staff,cf()*ca(r(90),0,0));
  670. end;
  671. if(anim=='Jumping')then
  672. raw.C0=Lerp(raw.C0,raD*CFrame.new(0,.15,0)*CFrame.Angles(math.rad(88),-math.rad(11),0),.5);
  673. law.C0=Lerp(law.C0,laD*CFrame.new(0,.15,0)*CFrame.Angles(-math.rad(88),math.rad(11),0),.5);
  674. hed.Weld.C0=Lerp(hed.Weld.C0,hD*CFrame.new(0,.1,.05)*CFrame.Angles(math.rad(22),0,0),.5);
  675. rlw.C0=Lerp(rlw.C0,rlD*CFrame.Angles(-math.rad(30),0,0),.5);
  676. llw.C0=Lerp(llw.C0,llD*CFrame.Angles(-math.rad(30),0,0),.5);
  677. tow.C0=Lerp(tow.C0,tD*CFrame.Angles(math.rad(-22),0,0),.5);
  678. end;
  679. --[[
  680. if(anim=='Freefalling')then
  681. tow.C0=Lerp(tow.C0,tD*CFrame.Angles(math.rad(-176),0,0),.5);
  682. llw.C0=Lerp(llw.C0,llD*CFrame.Angles(.2+.2*math.cos(syne/16)/2,0,0),.5);
  683. rlw.C0=Lerp(rlw.C0,rlD*CFrame.Angles(.2+.2*-math.cos(syne/16)/2,0,0),.5);
  684. hed.Weld.C0=Lerp(hed.Weld.C0,hD*CFrame.Angles(.2+.12*math.cos(syne/16)/4,0,0),.5);
  685. end;
  686. ]]
  687. if(anim=='Running')then
  688. tow.C0=Lerp(tow.C0,CFrame.new(0,-1,0)*CFrame.Angles(-math.rad(hum.WalkSpeed/4),math.rad(0-1*math.cos(syne/8)),0),1)
  689.  
  690. law.C0=Lerp(law.C0,laD*CFrame.Angles(math.rad(0-60*math.cos(syne/8)/3),0,math.rad(-3)),1)
  691. raw.C0=Lerp(raw.C0,raD*CFrame.Angles(math.rad(0+60*math.cos(syne/8)/3),0,math.rad(3)),1)
  692.  
  693. hed.Weld.C0=Lerp(hed.Weld.C0,CFrame.new(0,1.5,0)*CFrame.Angles(0,math.rad(hrp.RotVelocity.Y*3),0),1)
  694.  
  695. --llw.C0=Lerp(llw.C0,llD*CFrame.Angles(math.rad(10+50*math.cos(syne/8)/3),0,math.rad(-1)),1)
  696. --rlw.C0=Lerp(rlw.C0,rlD*CFrame.Angles(math.rad(10-50*math.cos(syne/8)/3),0,math.rad(1)),1)
  697. llw.C0=Lerp(llw.C0,llD*CFrame.Angles(0,0,0)*CFrame.Angles(math.rad(2+35*math.cos((syne/3.5)/1)),0,0),1.7)
  698. rlw.C0=Lerp(rlw.C0,rlD*CFrame.Angles(0,0,0)*CFrame.Angles(math.rad(2-35*math.cos((syne/3.5)/1)),0,0),1.7)
  699.  
  700. end;
  701. end);
Add Comment
Please, Sign In to add comment