Advertisement
yamanohera155233

Untitled

Jun 27th, 2016
146
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 55.87 KB | None | 0 0
  1. local asin = math.asin;
  2.  
  3. local atan2 = math.atan2;
  4.  
  5. local rad = math.rad;
  6.  
  7. local sin = math.sin;
  8.  
  9. local abs = math.abs;
  10.  
  11. local ceil = math.ceil;
  12.  
  13. local pi = math.pi;
  14.  
  15. local swing=1;
  16.  
  17. local hitdeb=false;
  18.  
  19. local deb=false;
  20.  
  21. local player = game.Players.LocalPlayer;
  22.  
  23. local pchar = player.Character;
  24.  
  25. local mouse = player:GetMouse();
  26.  
  27. local torso=pchar.Torso;
  28.  
  29. local skate=false;
  30.  
  31. local legs=true;
  32.  
  33. local anim=true;
  34.  
  35. local tsp=0;
  36.  
  37. local csp=0;
  38.  
  39. local hover=false;
  40.  
  41. local dmgs={};
  42.  
  43. local sworddmg={};
  44.  
  45. local anim2=false;
  46.  
  47. local SAmmo=7;
  48.  
  49. local anglespeed = 1;
  50.  
  51. local mode='';
  52.  
  53. local angle = 0;
  54.  
  55. local animationprts={};
  56.  
  57. local spawn={};
  58.  
  59. local cf,ca,v3=CFrame.new,CFrame.Angles,Vector3.new
  60.  
  61. local tol=Instance.new("HopperBin",player.Backpack)
  62.  
  63. tol.Name="1069x"
  64.  
  65. Part = function(x,y,z,color,tr,cc,an,parent)
  66. local p = Instance.new('Part',parent or Weapon)
  67. p.formFactor = 'Custom'
  68. p.Size = Vector3.new(x,y,z)
  69. p.BrickColor = BrickColor.new(color)
  70. p.CanCollide = cc
  71. p.Transparency = tr
  72. p.Anchored = an
  73. p.TopSurface,p.BottomSurface = 0,0
  74. p:BreakJoints()
  75. return p
  76. end
  77. --brb
  78. wPart = function(x,y,z,color,tr,cc,an,parent)
  79. local wp = Instance.new('WedgePart',parent or Weapon)
  80. wp.formFactor = 'Custom'
  81. wp.Size = Vector3.new(x,y,z)
  82. wp.BrickColor = BrickColor.new(color)
  83. wp.CanCollide = cc
  84. wp.Transparency = tr
  85. wp.Anchored = an
  86. wp.TopSurface,wp.BottomSurface = 0,0
  87. return wp
  88. end
  89. TrailOn = false
  90.  
  91. local function CFrameFromTopBack(at, top, back)
  92. local right = top:Cross(back)
  93. return CFrame.new(at.x, at.y, at.z,
  94. right.x, top.x, back.x,
  95. right.y, top.y, back.y,
  96. right.z, top.z, back.z)
  97. end
  98.  
  99. function Triangle(a, b, c)
  100. local edg1 = (c-a):Dot((b-a).unit)
  101. local edg2 = (a-b):Dot((c-b).unit)
  102. local edg3 = (b-c):Dot((a-c).unit)
  103. if edg1 <= (b-a).magnitude and edg1 >= 0 then
  104. a, b, c = a, b, c
  105. elseif edg2 <= (c-b).magnitude and edg2 >= 0 then
  106. a, b, c = b, c, a
  107. elseif edg3 <= (a-c).magnitude and edg3 >= 0 then
  108. a, b, c = c, a, b
  109. else
  110. print("unreachable")
  111. end
  112. local len1 = (c-a):Dot((b-a).unit)
  113. local len2 = (b-a).magnitude - len1
  114. local width = (a + (b-a).unit*len1 - c).magnitude
  115. local maincf = CFrameFromTopBack(a, (b-a):Cross(c-b).unit, -(b-a).unit)
  116. local list = {}
  117. if len1 > 0.01 then
  118. local w1 = wPart(0,0,0,'Really black',0.5,false,true,pchar)
  119. local sz = v3(0.2, width, len1)
  120. w1.Size = sz
  121. local sp = Mesh(w1,2,0,0,0)
  122. sp.MeshType='Wedge'
  123. sp.Scale=v3(0,1,1)*sz/w1.Size
  124. w1:BreakJoints()
  125. w1.Anchored = true
  126. w1.Transparency = 0.7
  127. Spawn(function()
  128. for i=0,1,0.1 do
  129. wait()
  130. w1.Transparency=w1.Transparency+0.03
  131. end
  132. end)
  133. w1.CFrame = maincf*ca(math.pi,0,math.pi/2)*cf(0,width/2,len1/2)
  134. table.insert(list,w1)
  135. end
  136. if len2 > 0.01 then
  137. local w2 = wPart(0,0,0,'Really black',0.5,false,true,pchar)
  138. local sz = v3(0.2, width, len2)
  139. w2.Size = sz
  140. local sp = Mesh(w2,2,0,0,0)
  141. sp.MeshType='Wedge'
  142. sp.Scale=v3(0,1,1)*sz/w2.Size
  143. w2:BreakJoints()
  144. w2.Anchored = true
  145. w2.Transparency = 0.7
  146. Spawn(function()
  147. for i=0,1,0.1 do
  148. wait()
  149. w2.Transparency=w2.Transparency+0.03
  150. end
  151. end)
  152. w2.CFrame = maincf*ca(math.pi,math.pi,-math.pi/2)*cf(0,width/2,-len1 - len2/2)
  153. table.insert(list,w2)
  154. end
  155. return unpack(list)
  156. end
  157.  
  158. Weld = function(p0,p1,x,y,z,rx,ry,rz,par)
  159. local w = Instance.new('Motor',par or p0)
  160. w.Part0 = p0
  161. w.Part1 = p1
  162. w.C1 = CFrame.new(x,y,z)*CFrame.Angles(rx,ry,rz)
  163. return w
  164. end
  165.  
  166. TWeld = function(p0,p1,x,y,z,rx,ry,rz,par)
  167. local w = Weld(p0,p1,0,0,0,0,0,0,par)
  168. table.insert(spawn,w)
  169. Tween(w,cf(x,y,z)*ca(rx,ry,rz),.05)
  170. return w
  171. end
  172.  
  173. Mesh = function(par,num,x,y,z)
  174. local msh = nil
  175. if num == 1 then
  176. msh = Instance.new("CylinderMesh",par)
  177. elseif num == 2 then
  178. msh = Instance.new("SpecialMesh",par)
  179. msh.MeshType = 3
  180. elseif num == 3 then
  181. msh = Instance.new("BlockMesh",par)
  182. elseif type(num) == 'string' then
  183. msh = Instance.new("SpecialMesh",par)
  184. msh.MeshId = num
  185. end
  186. msh.Scale = Vector3.new(x,y,z)
  187. return msh
  188. end
  189.  
  190. function explosion(col1,col2,cfr,sz,rng,dmg)
  191. local a= Part(1,1,1,col1,.5,false,true,pchar)
  192. local a2= Part(1,1,1,col2,.5,false,true,pchar)
  193. local a3= Part(1,1,1,col2,.5,false,true,pchar)
  194. local v1,v2,v3=sz.x,sz.y,sz.z
  195. local m= Mesh(a,'http://www.roblox.com/asset/?id=1185246',v1,v2,v3)
  196. local m2= Mesh(a2,3,v1/3,v2/3,v3/3)
  197. local m3= Mesh(a3,3,v1/3,v2/3,v3/3)
  198. a.CFrame=cfr
  199. a2.CFrame=cfr*ca(math.random(),math.random(),math.random())
  200. a3.CFrame=cfr*ca(math.random(),math.random(),math.random())
  201. for i,v in pairs(workspace:children()) do
  202. if v:IsA("Model") and v:findFirstChild("Humanoid") then
  203. if v:findFirstChild("Head") and v:findFirstChild("Torso") then
  204. if (v:findFirstChild("Torso").Position - a.Position).magnitude < rng and v.Name ~= pchar.Name then
  205. v.Humanoid.Health=v.Humanoid.Health-dmg
  206. end
  207. end
  208. end
  209. end
  210. Spawn(function()
  211. while wait() do
  212. if a.Transparency >= 1 then a:Destroy() a2:Destroy() a3:Destroy() break end
  213. m.Scale=m.Scale+Vector3.new(0.1,0.1,0.1)
  214. m2.Scale=m2.Scale+Vector3.new(0.1,0.1,0.1)
  215. m3.Scale=m3.Scale+Vector3.new(0.1,0.1,0.1)
  216. a.Transparency=a.Transparency+0.05
  217. a2.Transparency=a2.Transparency+0.05
  218. a3.Transparency=a3.Transparency+0.05
  219. end
  220. end)
  221. end
  222.  
  223. so = function(id,par,lo,pi)
  224. s = Instance.new("Sound",par) s.Looped=lo s.Pitch=pi
  225. s.SoundId = "http://roblox.com/asset/?id=223131308"..id s:play()
  226. return s
  227. end
  228.  
  229. Lightning = function(Start,End,Times,Offset,Color,Thickness,Transparency)
  230. local magz = (Start - End).magnitude local curpos = Start local trz = {-Offset,Offset}
  231. for i=1,Times do
  232. local li = Instance.new("Part",workspace)
  233. li.TopSurface =0
  234. li.BottomSurface = 0
  235. li.Anchored = true
  236. li.Transparency = Transparency or 0.4
  237. li.BrickColor = BrickColor.new(Color)
  238. li.formFactor = "Custom"
  239. li.CanCollide = false
  240. li.Size = Vector3.new(Thickness,Thickness,magz/Times)
  241. local ofz = Vector3.new(trz[math.random(1,2)],trz[math.random(1,2)],trz[math.random(1,2)])
  242. local trolpos = CFrame.new(curpos,End)*CFrame.new(0,0,magz/Times).p+ofz
  243. if Times == i then
  244. local magz2 = (curpos - End).magnitude li.Size = Vector3.new(Thickness,Thickness,magz2)
  245. li.CFrame = CFrame.new(curpos,End)*CFrame.new(0,0,-magz2/2)
  246. else
  247. li.CFrame = CFrame.new(curpos,trolpos)*CFrame.new(0,0,magz/Times/2)
  248. end
  249. curpos = li.CFrame*CFrame.new(0,0,magz/Times/2).p game.Debris:AddItem(li,0.01)
  250. end
  251. end
  252.  
  253. function connectsworddmg()
  254. for i=1,#sworddmg do
  255. dodmg=sworddmg[i].Touched:connect(function(hit)
  256. if hit.Parent:findFirstChild("Humanoid") ~= nil and hit.Parent.Name ~= pchar.Name and hitdeb==false then
  257. hitdeb=true
  258. hit.Parent.Humanoid.Health=hit.Parent.Humanoid.Health-10
  259. wait(.1)
  260. hitdeb=false
  261. end
  262. end)
  263. table.insert(dmgs,dodmg)
  264. end
  265. end
  266.  
  267. function disconnectsworddmg()
  268. for i=1,#dmgs do
  269. dmgs[i]:disconnect()
  270. end
  271. dmgs={}
  272. end
  273.  
  274.  
  275. Tween = function(Weld, Stop, Step,a)
  276. ypcall(function()
  277. local func = function()
  278. local Start = Weld.C1
  279. local X1, Y1, Z1 = Start:toEulerAnglesXYZ()
  280. local Stop = Stop
  281. local X2, Y2, Z2 = Stop:toEulerAnglesXYZ()
  282. Spawn(function()
  283. for i = 0, 1, Step or .1 do
  284. wait()
  285. Weld.C1 = cf( (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)) * ca((X1 * (1 - i)) + (X2 * i), (Y1 * (1 - i)) + (Y2 * i),(Z1 * (1 - i)) + (Z2 * i) )
  286. end
  287. Weld.C1 = Stop
  288. end)
  289. end
  290. if a then
  291. coroutine.wrap(func)()
  292. else
  293. func()
  294. end
  295. end)
  296. end
  297.  
  298. local function getAngles(cf)
  299. local sx,sy,sz,m00,m01,m02,m10,m11,m12,m20,m21,m22 = cf:components()
  300. return atan2(-m12,m22),asin(m02),atan2(-m01,m00)
  301. end
  302.  
  303. Lerp = {
  304. Number = function(C1,C2,inc)
  305. return C1 + (C2 - C1) * inc
  306. end;
  307. CFrame = function(a,b,m)
  308. local c,d={a:components()},{b:components()}
  309. table.foreach(c,function(a,b)c[a]=c[a]+(d[a]-c[a])*m end)
  310. return CFrame.new(unpack(c))
  311. end;
  312. }
  313.  
  314. local function genWeld(a,b)
  315. local w = Instance.new("Weld",a)
  316. w.Part0 = a
  317. w.Part1 = b
  318. return w
  319. end
  320.  
  321. local Neck = genWeld(pchar.Torso,pchar.Head)
  322.  
  323. local LeftShoulder = genWeld(pchar.Torso,pchar['Left Arm'])
  324.  
  325. local RightShoulder = genWeld(pchar.Torso,pchar['Right Arm'])
  326.  
  327. local LeftHip = genWeld(pchar.Torso,pchar['Left Leg'])
  328.  
  329. local RightHip = genWeld(pchar.Torso,pchar['Right Leg'])
  330.  
  331. local RootJoint = genWeld(pchar.HumanoidRootPart,pchar.Torso)
  332.  
  333. Neck.C0 = CFrame.new(0,1,0)
  334.  
  335. Neck.C1 = CFrame.new(0,-0.5,0)
  336.  
  337. LeftShoulder.C0 = CFrame.new(-1,0.5,0)
  338.  
  339. LeftShoulder.C1 = CFrame.new(0.5,0.5,0)
  340.  
  341. RightShoulder.C0 = CFrame.new(1,0.5,0)
  342.  
  343. RightShoulder.C1 = CFrame.new(-0.5,0.5,0)
  344.  
  345. LeftHip.C0 = CFrame.new(-1,-1,0)
  346.  
  347. LeftHip.C1 = CFrame.new(-0.5,1,0)
  348.  
  349. RightHip.C0 = CFrame.new(1,-1,0)
  350.  
  351. RightHip.C1 = CFrame.new(0.5,1,0)
  352.  
  353. RootJoint.C0 = CFrame.new(0,0,0) * CFrame.Angles(-math.pi/2,0,math.pi)
  354.  
  355. RootJoint.C1 = CFrame.new(0,0,0) * CFrame.Angles(-math.pi/2,0,math.pi)
  356.  
  357. local mo=Instance.new("Model",pchar)
  358.  
  359. local mpa1= Part(1.1,.3,1.1,'Really black',0,false,false,mo)
  360.  
  361. Mesh(mpa1,'rbxasset://fonts/torso.mesh',.55,.05,1.1)
  362.  
  363. local mwl1= Weld(mpa1,pchar['Right Arm'],0,-.75,0,0,0,0,mo)
  364.  
  365. local pa= Part(1.1,.3,1.1,'',0,false,false,mo)
  366.  
  367. Mesh(pa,'rbxasset://fonts/torso.mesh',.55,.05,1.1)
  368.  
  369. Weld(pa,mpa1,0,.75,0,0,0,0,mo)
  370.  
  371. local pa= Part(1.1,.3,1.1,'',0,false,false,mo)
  372.  
  373. Mesh(pa,'rbxasset://fonts/torso.mesh',.55,.05,1.2)
  374.  
  375. Weld(pa,mpa1,0,.375,0,rad(30),0,0,mo)
  376.  
  377. local pa= Part(1.1,.3,1.1,'',0,false,false,mo)
  378.  
  379. Mesh(pa,'rbxasset://fonts/torso.mesh',.55,.05,1.2)
  380.  
  381. Weld(pa,mpa1,0,.375,0,-rad(30),0,0,mo)
  382.  
  383. local pa= Part(1.1,.3,1.1,'',0,false,false,mo)
  384.  
  385. Mesh(pa,'rbxasset://fonts/torso.mesh',.6,.05,1.1)
  386.  
  387. Weld(pa,mpa1,0,.375,0,0,0,rad(30),mo)
  388.  
  389. local pa= Part(1.1,.3,1.1,'',0,false,false,mo)
  390.  
  391. Mesh(pa,'rbxasset://fonts/torso.mesh',.6,.05,1.1)
  392.  
  393. Weld(pa,mpa1,0,.375,0,0,0,-rad(30),mo)
  394.  
  395. local pa= Part(1,1,1,'',0,false,false,mo)
  396.  
  397. Mesh(pa,1,.4,.5,.4)
  398.  
  399. Weld(pa,mpa1,0,.375,-.31,rad(90),0,0,mo)
  400.  
  401. local pa= Part(1,1,1,'',0,false,false,mo)
  402.  
  403. Mesh(pa,'http://www.roblox.com/asset/?id=3270017',.4,.4,.4)
  404.  
  405. Weld(pa,mpa1,0,.375,-.55,0,0,0,mo)
  406.  
  407. local ball= Part(1,1,1,'Really black',0,false,false,mo)
  408.  
  409. Mesh(ball,'http://www.roblox.com/asset/?id=1185246',.5,.5,.5)
  410.  
  411. local ballweld= Weld(ball,mpa1,0,.375,-.55,0,0,0,mo)
  412.  
  413. for i=1,5 do
  414.  
  415. local spk= Part(1,1,1,'Really black',0,false,false,mo)
  416.  
  417. Mesh(spk,'http://www.roblox.com/asset/?id=1778999',.2,.25,.2)
  418.  
  419. local spkw= Weld(spk,ball,0,0,0.25,rad(90),0,0,mo)
  420.  
  421. table.insert(animationprts,spkw)
  422.  
  423. end
  424.  
  425.  
  426. local function newLerpTo(weld)
  427. return {
  428. Weld = weld;
  429. To = weld.C0;
  430. Cache = weld.C0;
  431. Speed = 0.2;
  432. }
  433. end
  434.  
  435. local function opnbl(v)
  436. if v=='t' then
  437. Tween(ballweld,cf(0,.375,-1.2),.1)
  438. for i=1,#animationprts do
  439. if i==1 then
  440. Tween(animationprts[i],cf(0,0,.25)*ca(rad(90),0,0),.1)
  441. elseif i==2 then
  442. Tween(animationprts[i],cf(0,.25,0)*ca(0,0,0),.1)
  443. elseif i==3 then
  444. Tween(animationprts[i],cf(0,-.25,0)*ca(-rad(180),0,0),.1)
  445. elseif i==4 then
  446. Tween(animationprts[i],cf(.25,0,0)*ca(0,0,-rad(90)),.1)
  447. elseif i==5 then
  448. Tween(animationprts[i],cf(-.25,0,0)*ca(0,0,rad(90)),.1)
  449. end
  450. end
  451. elseif v=='f' then
  452. anim2=false
  453. LerpTo.LeftArm.To = LerpTo.LeftArm.Cache * CFrame.Angles(rad(120),0,rad(50)) * CFrame.new(.2,-.5,0)
  454. wait(.25)
  455. Spawn(function()
  456. for i = 0,1,0.1 do wait()
  457. so('28445431',torso,false,20)
  458. ballweld.C1=ballweld.C1 *CFrame.Angles(0,0,i*2-0.0005)
  459. end
  460. end)
  461. LerpTo.LeftArm.To = LerpTo.LeftArm.Cache * CFrame.Angles(rad(90),0,rad(40)) * CFrame.new(.2,-.5,0)
  462. wait(.25)
  463. anim2=true
  464. wait(.25)
  465. Tween(ballweld,cf(0,.375,-.55),.1)
  466. for i=1,#animationprts do
  467. Tween(animationprts[i],cf(0,0,.25)*ca(rad(90),0,0),.1)
  468. end
  469. end
  470. end
  471.  
  472. local function build(what)
  473. if what=='Sniper' then
  474. wep=Instance.new('Model',mo)
  475. wep.Name='Sniper'
  476. mpa1= Part(1,.3,.3,'Really black',0,false,false,wep)
  477. mwl1= TWeld(mpa1,pchar['Right Arm'],0,-2,-.4,0,-pi/2,pi/2,wep)
  478. pa= Part(1,.4,.2,'Really black',0,false,false,wep)
  479. TWeld(pa,mpa1,0,-0.35,0,0,0,0,wep)
  480. pa= Part(.2,.75,.2,'',0,false,false,wep)
  481. Mesh(pa,1,1,1,1)
  482. TWeld(pa,mpa1,-.75,-0.4,0,0,0,rad(90),wep)
  483. pa= Part(.2,.75,.2,'',0,false,false,wep)
  484. Mesh(pa,1,1,1,1)
  485. TWeld(pa,mpa1,-1.3,-.15,0,0,0,rad(40),wep)
  486. pa= Part(2,.3,.3,'Really black',0,false,false,wep)
  487. TWeld(pa,mpa1,-.5,0.2,0,0,0,0,wep)
  488. pa= Part(.3,1.2,.3,'',0,false,false,wep)
  489. Mesh(pa,1,1,1,1)
  490. TWeld(pa,mpa1,-1.1,0.2,0,0,0,rad(90),wep)
  491. pa= Part(.1,2,.1,'',0,false,false,wep)
  492. Mesh(pa,1,1,1,1)
  493. TWeld(pa,mpa1,-2.6,0.2,0,0,0,rad(90),wep)
  494. brl= Part(.3,.2,.3,'',0,false,false,wep)
  495. Mesh(brl,1,1,.5,1)
  496. TWeld(brl,mpa1,-3.25,0.2,0,0,0,rad(90),wep)
  497. pa= Part(1.2,.2,.2,'Really black',0,false,false,wep)
  498. TWeld(pa,mpa1,-0.2,0.3,0,0,0,0,wep)
  499. pa= Part(1,1,1,'',0,false,false,wep)
  500. Mesh(pa,1,.1,.2,.1)
  501. TWeld(pa,mpa1,0,0.45,0,0,0,0,wep)
  502. pa= Part(1,1,1,'',0,false,false,wep)
  503. Mesh(pa,1,.1,.2,.1)
  504. TWeld(pa,mpa1,-.4,0.45,0,0,0,0,wep)
  505. pa= Part(1,1,1,'',0,false,false,wep)
  506. Mesh(pa,1,.2,.75,.2)
  507. TWeld(pa,mpa1,-.2,0.625,0,0,0,rad(90),wep)
  508. pa= Part(1,1,1,'',0,false,false,wep)
  509. Mesh(pa,1,.3,.2,.3)
  510. TWeld(pa,mpa1,.25,0.625,0,0,0,rad(90),wep)
  511. pa= Part(1,1,1,'',0,false,false,wep)
  512. Mesh(pa,1,.35,.2,.35)
  513. TWeld(pa,mpa1,-.8,0.625,0,0,0,rad(90),wep)
  514. pa= Part(1,1,1,'',0,false,false,wep)
  515. Mesh(pa,'http://www.roblox.com/asset/?id=1778999',.26,.2,.26)
  516. TWeld(pa,mpa1,-.55,0.625,0,0,0,-rad(90),wep)
  517. pa= Part(1,1,1,'',0,false,false,wep)
  518. Mesh(pa,3,.075,.2,.075)
  519. TWeld(pa,mpa1,-.875,0.8,0,0,0,0,wep)
  520. pa= Part(1,1,1,'',0,false,false,wep)
  521. Mesh(pa,3,.075,.2,.075)
  522. TWeld(pa,mpa1,.325,0.775,0,0,0,0,wep)
  523. pa= Part(1,1,1,'',0,false,false,wep)
  524. Mesh(pa,1,.35,.05,.35)
  525. TWeld(pa,mpa1,-.92,0.9,0,0,0,rad(90),wep)
  526. pa= Part(1,1,1,'',0,false,false,wep)
  527. Mesh(pa,1,.3,.05,.3)
  528. TWeld(pa,mpa1,.36,0.85,0,0,0,rad(90),wep)
  529. sld= Part(.1,.5,.1,'',0,false,false,wep)
  530. Mesh(sld,1,1,1,1)
  531. slider=TWeld(sld,mpa1,.4,0.2,0,0,0,rad(90),wep)
  532. pa= Part(1,1,1,'',0,false,false,wep)
  533. Mesh(pa,1,.1,.3,.1)
  534. TWeld(pa,sld,0,-0.18,0.15,rad(90),0,0,wep)
  535. bulleth= Part(.5,.2,.2,'',0,false,false,wep)
  536. TWeld(bulleth,mpa1,0,0.2,-.1,0,0,0,wep)
  537. pa= Part(1.5,.2,.3,'Really black',0,false,false,wep)
  538. TWeld(pa,mpa1,1.2,0,0,0,0,0,wep)
  539. pa= Part(1,.2,.2,'Really black',0,false,false,wep)
  540. TWeld(pa,mpa1,0.65,-.45,0,0,0,0,wep)
  541. pa= Part(.85,.2,.3,'Really black',0,false,false,wep)
  542. TWeld(pa,mpa1,1.04,-0.34,0,0,0,-rad(60),wep)
  543. pa= Part(.3,.2,.2,'',0,false,false,wep)
  544. Mesh(pa,3,1,.5,.5)
  545. TWeld(pa,mpa1,.8,-.2,0,0,0,rad(60),wep)
  546. pa= Part(.75,.2,.3,'Really black',0,false,false,wep)
  547. TWeld(pa,mpa1,1.55,-.7,0,0,0,0,wep)
  548. pa= Part(.2,.9,.3,'Really black',0,false,false,wep)
  549. TWeld(pa,mpa1,2,-.35,0,0,0,0,wep)
  550. clip= Part(.5,.5,.2,'',0,false,false,wep)
  551. Mesh(clip,3,1,1,.5)
  552. TWeld(clip,mpa1,0,-0.5,0,0,0,0,wep)
  553. byp= Part(.2,.4,.2,'',0,false,false,wep)
  554. Mesh(byp,1,.5,1,.5)
  555. TWeld(byp,mpa1,-1.5,0,0,rad(90),0,0,wep)
  556. pa= Part(.2,.2,.2,'',0,false,false,wep)
  557. Mesh(pa,1,1,.5,1)
  558. TWeld(pa,byp,0,0.15,0,0,0,0,wep)
  559. pa= Part(.2,.2,.2,'',0,false,false,wep)
  560. Mesh(pa,1,1,.5,1)
  561. TWeld(pa,byp,0,-0.15,0,0,0,0,wep)
  562. mv1= Part(.2,1,.2,'',0,false,false,wep)
  563. Mesh(mv1,1,.5,1,.5)
  564. TWeld(mv1,byp,-.55,-0.15,0.1,-rad(50),0,rad(100),wep)
  565. mv2= Part(.2,1,.2,'',0,false,false,wep)
  566. Mesh(mv2,1,.5,1,.5)
  567. TWeld(mv2,byp,-.55,0.15,0.1,rad(50),0,-rad(100),wep)
  568. pa= Part(.2,.2,.2,'',0,false,false,wep)
  569. Mesh(pa,1,.75,.4,.75)
  570. TWeld(pa,mv1,0,-0.1,0,0,0,0,wep)
  571. pa= Part(.2,.2,.2,'',0,false,false,wep)
  572. Mesh(pa,1,.75,.75,.75)
  573. TWeld(pa,mv1,0,0.1,0,0,0,0,wep)
  574. pa= Part(.2,.2,.2,'',0,false,false,wep)
  575. Mesh(pa,1,.9,.5,.9)
  576. TWeld(pa,mv1,0,0.5,0,0,0,0,wep)
  577. pa= Part(.2,.2,.2,'',0,false,false,wep)
  578. Mesh(pa,1,.75,.4,.75)
  579. TWeld(pa,mv2,0,0.1,0,0,0,0,wep)
  580. pa= Part(.2,.2,.2,'',0,false,false,wep)
  581. Mesh(pa,1,.75,.75,.75)
  582. TWeld(pa,mv2,0,-0.1,0,0,0,0,wep)
  583. pa= Part(.2,.2,.2,'',0,false,false,wep)
  584. Mesh(pa,1,.9,.5,.9)
  585. TWeld(pa,mv2,0,-0.5,0,0,0,0,wep)
  586. elseif what=='Sword' then
  587. wep=Instance.new('Model',mo)
  588. wep.Name='Sword'
  589. mpa1= Part(.25,1.2,.25,'Really black',0,false,false,wep)
  590. Mesh(mpa1,1,1,1,1)
  591. mwl1= TWeld(mpa1,pchar['Right Arm'],0,-1.2,-0.2,-pi/2,rad(53),0,wep)
  592. pa= Part(1,.4,.2,'',0,false,false,wep)
  593. Mesh(pa,'http://www.roblox.com/asset/?id=3270017',.6,.3,.4)
  594. TWeld(pa,mpa1,0,-0.27,0,rad(90),rad(70),0,wep)
  595. pa= Part(1,.4,.2,'',0,false,false,wep)
  596. Mesh(pa,'http://www.roblox.com/asset/?id=3270017',.6,.3,.4)
  597. TWeld(pa,mpa1,0,-0.27,0,rad(90),-rad(70),0,wep)
  598. pa= Part(1,.4,.2,'',0,false,false,wep)
  599. Mesh(pa,'http://www.roblox.com/asset/?id=3270017',.3,.6,.4)
  600. TWeld(pa,mpa1,0,-0.27,0,rad(30),0,0,wep)
  601. pa= Part(1,.4,.2,'',0,false,false,wep)
  602. Mesh(pa,'http://www.roblox.com/asset/?id=3270017',.3,.6,.4)
  603. TWeld(pa,mpa1,0,-0.27,0,-rad(30),0,0,wep)
  604. pa= Part(1,.4,.2,'',0,false,false,wep)
  605. Mesh(pa,'http://www.roblox.com/asset/?id=3270017',.6,.3,.4)
  606. TWeld(pa,mpa1,0,0.27,0,rad(90),rad(70),0,wep)
  607. pa= Part(1,.4,.2,'',0,false,false,wep)
  608. Mesh(pa,'http://www.roblox.com/asset/?id=3270017',.6,.3,.4)
  609. TWeld(pa,mpa1,0,0.27,0,rad(90),-rad(70),0,wep)
  610. pa= Part(1,.4,.2,'',0,false,false,wep)
  611. Mesh(pa,'http://www.roblox.com/asset/?id=3270017',.3,.6,.4)
  612. TWeld(pa,mpa1,0,0.27,0,rad(30),0,0,wep)
  613. pa= Part(1,.4,.2,'',0,false,false,wep)
  614. Mesh(pa,'http://www.roblox.com/asset/?id=3270017',.3,.6,.4)
  615. TWeld(pa,mpa1,0,0.27,0,-rad(30),0,0,wep)
  616. blade1= Part(.5,1.75,.2,'Really black',0,false,false,wep)
  617. Mesh(blade1,3,1,1,.5)
  618. TWeld(blade1,mpa1,0,1.5,0,0,0,0,wep)
  619. blade2= Part(.3,.75,.2,'Really black',0,false,false,wep)
  620. Mesh(blade2,3,1,1,.5)
  621. TWeld(blade2,mpa1,0,2.75,0,0,0,0,wep)
  622. blade3= Part(.435,.75,.2,'Really black',0,false,false,wep)
  623. Mesh(blade3,3,1,1,.5)
  624. TWeld(blade3,mpa1,0,3.5,0,0,0,0,wep)
  625. table.insert(sworddmg,blade1)
  626. table.insert(sworddmg,blade2)
  627. table.insert(sworddmg,blade3)
  628. pa= Part(.2,1.75,.2,'',0,false,false,wep)
  629. Mesh(pa,3,.5,1,.5)
  630. TWeld(pa,mpa1,.25,1.5,0,0,rad(45),0,wep)
  631. pa= Part(.2,1.75,.2,'',0,false,false,wep)
  632. Mesh(pa,3,.5,1,.5)
  633. TWeld(pa,mpa1,-.25,1.5,0,0,-rad(45),0,wep)
  634. pa= Part(.2,.75,.2,'',0,false,false,wep)
  635. Mesh(pa,3,.5,1,.5)
  636. TWeld(pa,mpa1,.15,2.75,0,0,rad(45),0,wep)
  637. pa= Part(.2,.75,.2,'',0,false,false,wep)
  638. Mesh(pa,3,.5,1,.5)
  639. TWeld(pa,mpa1,-.15,2.75,0,0,-rad(45),0,wep)
  640. pa= Part(.2,.75,.2,'',0,false,false,wep)
  641. Mesh(pa,3,.5,1,.5)
  642. TWeld(pa,mpa1,0.2175,3.5,0,0,rad(45),0,wep)
  643. pa= Part(.2,.75,.2,'',0,false,false,wep)
  644. Mesh(pa,3,.5,1,.5)
  645. TWeld(pa,mpa1,-0.2175,3.5,0,0,-rad(45),0,wep)
  646. pa= Part(.2,.75,.2,'',0,false,false,wep)
  647. Mesh(pa,3,1,1,1)
  648. TWeld(pa,mpa1,.2,.75,.1,0,rad(45),-rad(30),wep)
  649. pa= Part(.2,.75,.2,'',0,false,false,wep)
  650. Mesh(pa,3,1,1,1)
  651. TWeld(pa,mpa1,.2,.75,-.1,0,-rad(45),-rad(30),wep)
  652. pa= Part(.2,.75,.2,'',0,false,false,wep)
  653. Mesh(pa,3,1,1,1)
  654. TWeld(pa,mpa1,-.2,.75,.1,0,-rad(45),rad(30),wep)
  655. pa= Part(.2,.75,.2,'',0,false,false,wep)
  656. Mesh(pa,3,1,1,1)
  657. TWeld(pa,mpa1,-.2,.75,-.1,0,rad(45),rad(30),wep)
  658. pa= Part(.2,.75,.2,'',0,false,false,wep)
  659. Mesh(pa,'http://www.roblox.com/Asset/?id=9756362',.4,1,.15)
  660. TWeld(pa,mpa1,0,3.85,0,0,0,0,wep)
  661. elseif what=='HBoard' then
  662. wep=Instance.new('Model',mo)
  663. wep.Name='Sword'
  664. mpa1= Part(.25,1.2,.25,'',0,false,false,wep)
  665. Mesh(mpa1,1,1,1,1)
  666. mwl1= TWeld(mpa1,pchar['Right Arm'],0,-1,0,pi/2,0,0,wep)
  667. pa= Part(.25,1.2,.6,'Really black',0,false,false,wep)
  668. TWeld(pa,mpa1,0,1,0,0,0,0,wep)
  669. pa= Part(.25,1.2,.6,'Really black',0,false,false,wep)
  670. TWeld(pa,mpa1,0,-1,0,0,0,0,wep)
  671. pa= wPart(.25,1.2,.3,'Really black',0,false,false,wep)
  672. TWeld(pa,mpa1,0,-1,-.45,0,0,0,wep)
  673. pa= wPart(.25,1.2,.3,'Really black',0,false,false,wep)
  674. TWeld(pa,mpa1,0,-1,.45,0,pi,0,wep)
  675. pa= wPart(.25,1.2,.3,'Really black',0,false,false,wep)
  676. TWeld(pa,mpa1,0,1,-.45,0,0,pi,wep)
  677. pa= wPart(.25,1.2,.3,'Really black',0,false,false,wep)
  678. TWeld(pa,mpa1,0,1,.45,0,pi,pi,wep)
  679. pa= Part(.25,.8,.2,'Really black',0,false,false,wep)
  680. TWeld(pa,mpa1,0,2,.5,0,0,0,wep)
  681. pa= Part(.25,.8,.2,'Really black',0,false,false,wep)
  682. TWeld(pa,mpa1,0,2,-.5,0,0,0,wep)
  683. pa= Part(.25,.8,.2,'Really black',0,false,false,wep)
  684. TWeld(pa,mpa1,0,-2,.5,0,0,0,wep)
  685. pa= Part(.25,.8,.2,'Really black',0,false,false,wep)
  686. TWeld(pa,mpa1,0,-2,-.5,0,0,0,wep)
  687. pa= wPart(.25,.6,.2,'Really black',0,false,false,wep)
  688. TWeld(pa,mpa1,0,2.5,.3,pi/2,0,0,wep)
  689. pa= wPart(.25,.6,.2,'Really black',0,false,false,wep)
  690. TWeld(pa,mpa1,0,2.5,-.3,-pi/2,pi,0,wep)
  691. pa= wPart(.25,.6,.2,'Really black',0,false,false,wep)
  692. TWeld(pa,mpa1,0,-2.5,.3,pi/2,pi,0,wep)
  693. pa= wPart(.25,.6,.2,'Really black',0,false,false,wep)
  694. TWeld(pa,mpa1,0,-2.5,-.3,-pi/2,0,0,wep)
  695. pa= wPart(.2,1.18,.3,'',0,false,false,wep)
  696. TWeld(pa,mpa1,0,-1,-.46,0,0,0,wep)
  697. pa= wPart(.2,1.18,.3,'',0,false,false,wep)
  698. TWeld(pa,mpa1,0,-1,.46,0,pi,0,wep)
  699. pa= wPart(.2,1.18,.3,'',0,false,false,wep)
  700. TWeld(pa,mpa1,0,1,-.46,0,0,pi,wep)
  701. pa= wPart(.2,1.18,.3,'',0,false,false,wep)
  702. TWeld(pa,mpa1,0,1,.46,0,pi,pi,wep)
  703. pa= Part(.2,1.2,.6,'',0,false,false,wep)
  704. TWeld(pa,mpa1,0,.99,0,0,0,0,wep)
  705. pa= Part(.2,1.2,.6,'',0,false,false,wep)
  706. TWeld(pa,mpa1,0,-.99,0,0,0,0,wep)
  707. pa= Part(.2,.8,.2,'',0,false,false,wep)
  708. TWeld(pa,mpa1,0,2,.51,0,0,0,wep)
  709. pa= Part(.2,.8,.2,'',0,false,false,wep)
  710. TWeld(pa,mpa1,0,2,-.51,0,0,0,wep)
  711. pa= Part(.2,.8,.2,'',0,false,false,wep)
  712. TWeld(pa,mpa1,0,-2,.51,0,0,0,wep)
  713. pa= Part(.2,.8,.2,'',0,false,false,wep)
  714. TWeld(pa,mpa1,0,-2,-.51,0,0,0,wep)
  715. pa= wPart(.2,.6,.2,'',0,false,false,wep)
  716. TWeld(pa,mpa1,0,2.51,.3,pi/2,0,0,wep)
  717. pa= wPart(.2,.6,.2,'',0,false,false,wep)
  718. TWeld(pa,mpa1,0,2.51,-.3,-pi/2,pi,0,wep)
  719. pa= wPart(.2,.6,.2,'',0,false,false,wep)
  720. TWeld(pa,mpa1,0,-2.51,.3,pi/2,pi,0,wep)
  721. pa= wPart(.2,.6,.2,'',0,false,false,wep)
  722. TWeld(pa,mpa1,0,-2.51,-.3,-pi/2,0,0,wep)
  723. whel1= Part(.2,.7,.2,'Really black',0,false,false,wep)
  724. Mesh(whel1,3,.5,1,.5)
  725. whel1w=TWeld(whel1,mpa1,0,-2,0,0,0,0,wep)
  726. whel2= Part(.2,.7,.2,'Really black',0,false,false,wep)
  727. Mesh(whel2,3,.5,1,.5)
  728. whel2w=TWeld(whel2,mpa1,0,2,0,0,0,0,wep)
  729. pa= Part(.2,.2,.2,'',0,false,false,wep)
  730. Mesh(pa,'http://www.roblox.com/asset/?id=3270017',.75,.75,1)
  731. TWeld(pa,whel1,0,0,0,0,pi/2,0,wep)
  732. pa= Part(.2,.2,.2,'',0,false,false,wep)
  733. Mesh(pa,'http://www.roblox.com/asset/?id=3270017',.75,.75,1)
  734. TWeld(pa,whel2,0,0,0,0,pi/2,0,wep)
  735. end
  736. end
  737.  
  738. LerpTo = {
  739. Neck = newLerpTo(Neck);
  740. LeftArm = newLerpTo(LeftShoulder);
  741. RightArm = newLerpTo(RightShoulder);
  742. LeftLeg = newLerpTo(LeftHip);
  743. RightLeg = newLerpTo(RightHip);
  744. RootJoint = newLerpTo(RootJoint);
  745. }
  746. function onKeyDown(key)
  747. key = key:lower()
  748. if deb==true then return end
  749. if key == "z" then
  750. z= not z
  751. if z then
  752. mode='Sniper'
  753. opnbl('f')
  754. build('Sniper')
  755. anim2=false
  756. wait(.3)
  757. LerpTo.Neck.To = LerpTo.Neck.Cache * CFrame.Angles(-rad(30),rad(60),0)
  758. LerpTo.RootJoint.To = LerpTo.RootJoint.Cache * CFrame.Angles(0,0,-rad(90))
  759. LerpTo.LeftArm.To = LerpTo.LeftArm.Cache * CFrame.Angles(rad(90),0,-rad(50)) * CFrame.new(.2,-.5,0)
  760. LerpTo.RightArm.To = LerpTo.RightArm.Cache * CFrame.Angles(rad(90),0,-rad(80)) * CFrame.new(.2,-.5,0)
  761. else
  762. mode=''
  763. LerpTo.RootJoint.To = LerpTo.RootJoint.Cache * CFrame.Angles(0,0,0)
  764. LerpTo.Neck.To = LerpTo.Neck.Cache * CFrame.Angles(0,0,0)
  765. anim2=true
  766. for i=1,#spawn do
  767. Tween(spawn[i],cf(0,0,0),.05)
  768. end
  769. wait(.8)
  770. spawn={}
  771. wep:Destroy()
  772. opnbl('t')
  773. end
  774. elseif key == "x" then
  775. x= not x
  776. if x then
  777. mode='Sword'
  778. opnbl('f')
  779. build('Sword')
  780. anim2=false
  781. wait(.3)
  782. anim3=true
  783. else
  784. mode=''
  785. anim3=false
  786. anim2=true
  787. sworddmg={}
  788. for i=1,#spawn do
  789. Tween(spawn[i],cf(0,0,0),.05)
  790. end
  791. wait(.8)
  792. spawn={}
  793. wep:Destroy()
  794. opnbl('t')
  795. end
  796. elseif key == "c" then
  797. c= not c
  798. if c then
  799. mode='HBoard'
  800. opnbl('f')
  801. build('HBoard')
  802. anim2=true
  803. else
  804. mode=''
  805. --anim3=false
  806. anim2=true
  807. sworddmg={}
  808. for i=1,#spawn do
  809. Tween(spawn[i],cf(0,0,0),.05)
  810. end
  811. wait(.8)
  812. spawn={}
  813. wep:Destroy()
  814. opnbl('t')
  815. end
  816. elseif key == "r" then
  817. if mode=='Sniper' then
  818. if SAmmo==0 then
  819. deb=true
  820. LerpTo.Neck.To = LerpTo.Neck.Cache * CFrame.Angles(0,rad(30),0)
  821. LerpTo.RootJoint.To = LerpTo.RootJoint.Cache * CFrame.Angles(0,0,-rad(90))
  822. LerpTo.LeftArm.To = LerpTo.LeftArm.Cache * CFrame.Angles(rad(90),0,0) * CFrame.new(.2,-.5,0)
  823. LerpTo.RightArm.To = LerpTo.RightArm.Cache * CFrame.Angles(rad(90),0,-rad(50)) * CFrame.new(.2,-.5,0)
  824. wait(.3)
  825. so('2697295',torso,false,.4)
  826. newc=clip:Clone()
  827. newc.Parent=workspace
  828. newc.CFrame=clip.CFrame
  829. newc:BreakJoints()
  830. newc.CanCollide=true
  831. game.Debris:AddItem(newc,math.random(7,15))
  832. clip.Transparency=1
  833. LerpTo.LeftArm.To = LerpTo.LeftArm.Cache * CFrame.Angles(rad(60),0,0) * CFrame.new(.2,-.5,0)
  834. wait(.2)
  835. LerpTo.LeftArm.To = LerpTo.LeftArm.Cache * CFrame.Angles(-rad(20),0,rad(20)) * CFrame.new(.2,-.5,0)
  836. wait(.1)
  837. newc= Part(.5,.5,.2,'',0,false,false,mo)
  838. Mesh(newc,3,1,1,.5)
  839. Weld(newc,pchar['Left Arm'],0,-1,-0.5,rad(90),0,0,mo)
  840. wait(.1)
  841. LerpTo.LeftArm.To = LerpTo.LeftArm.Cache * CFrame.Angles(rad(60),0,0) * CFrame.new(.2,-.5,0)
  842. wait(.2)
  843. LerpTo.LeftArm.To = LerpTo.LeftArm.Cache * CFrame.Angles(rad(90),0,0) * CFrame.new(.2,-.5,0)
  844. wait(.05)
  845. so('2697295',torso,false,.5)
  846. newc:Destroy()
  847. clip.Transparency=0
  848. wait(.2)
  849. LerpTo.Neck.To = LerpTo.Neck.Cache * CFrame.Angles(-rad(30),rad(60),0)
  850. LerpTo.RootJoint.To = LerpTo.RootJoint.Cache * CFrame.Angles(0,0,-rad(90))
  851. LerpTo.LeftArm.To = LerpTo.LeftArm.Cache * CFrame.Angles(rad(90),0,-rad(50)) * CFrame.new(.2,-.5,0)
  852. LerpTo.RightArm.To = LerpTo.RightArm.Cache * CFrame.Angles(rad(90),0,-rad(80)) * CFrame.new(.2,-.5,0)
  853. SAmmo=7
  854. wait(.4)
  855. deb=false
  856. end
  857. elseif mode=='Sword' then
  858. connectsworddmg()
  859. deb=true
  860. anim3=false
  861. spn=0
  862. Tween(mwl1,cf(0,-1.2,-0.2)*ca(0,0,rad(220)),.2)
  863. LerpTo.RightArm.To = LerpTo.RightArm.Cache * CFrame.Angles(rad(90),0,-rad(40))* CFrame.new(-.2,-.25,0)
  864. LerpTo.LeftArm.To = LerpTo.LeftArm.Cache * CFrame.Angles(rad(90),0,rad(40))* CFrame.new(.2,-.25,0)
  865. wait(.2)
  866. Spawn(function()
  867. for i=1,3 do
  868. so('161006212',torso,false,1)
  869. wait(.5)
  870. end
  871. end)
  872. TrailOn=true
  873. for i=1,36 do
  874. spn=spn+30
  875. wait()
  876. LerpTo.RootJoint.To = LerpTo.RootJoint.Cache * CFrame.Angles(0,0,rad(spn))
  877. end
  878. TrailOn=false
  879. legs=false
  880. LerpTo.LeftLeg.To = LerpTo.LeftLeg.Cache * CFrame.Angles(0,0,-rad(10)) * CFrame.new(0,.5,0)
  881. LerpTo.RightLeg.To = LerpTo.RightLeg.Cache * CFrame.Angles(0,0,rad(10)) * CFrame.new(0,.5,0)
  882. LerpTo.RootJoint.To = LerpTo.RootJoint.Cache * CFrame.Angles(0,0,0) * CFrame.new(0,0,-.5)
  883. so('10209645',torso,false,.3)
  884. wait(.2)
  885. Tween(mwl1,cf(0,-1.2,-0.2)*ca(-pi/2,-rad(35),0),1)
  886. LerpTo.RightArm.To = LerpTo.RightArm.Cache * CFrame.Angles(rad(120),0,-rad(40))* CFrame.new(-.2,-.25,0)
  887. LerpTo.LeftArm.To = LerpTo.LeftArm.Cache * CFrame.Angles(rad(120),0,rad(40))* CFrame.new(.2,-.25,0)
  888. LerpTo.LeftLeg.To = LerpTo.LeftLeg.Cache * CFrame.Angles(0,0,-rad(30))
  889. LerpTo.RightLeg.To = LerpTo.RightLeg.Cache * CFrame.Angles(0,0,rad(30))
  890. LerpTo.RootJoint.To = LerpTo.RootJoint.Cache * CFrame.Angles(0,0,0) * CFrame.new(0,0,7)
  891. wait(.4)
  892. Tween(mwl1,cf(0,-1.2,-0.2)*ca(-pi/2-rad(180),-rad(35),0),1)
  893. wait(.1)
  894. LerpTo.RightArm.To = LerpTo.RightArm.Cache * CFrame.Angles(rad(90),0,-rad(40))* CFrame.new(-.2,-.25,0)
  895. LerpTo.LeftArm.To = LerpTo.LeftArm.Cache * CFrame.Angles(rad(90),0,rad(40))* CFrame.new(.2,-.25,0)
  896. LerpTo.RootJoint.To = LerpTo.RootJoint.Cache * CFrame.Angles(0,0,0) * CFrame.new(0,0,-1)
  897. LerpTo.LeftLeg.To = LerpTo.LeftLeg.Cache * CFrame.Angles(0,0,0) * CFrame.new(0,1,-1)
  898. LerpTo.RightLeg.To = LerpTo.RightLeg.Cache * CFrame.Angles(-rad(50),0,0) * CFrame.new(0,0.5,0)
  899. wait(.2)
  900. so('138210320',torso,false,1)
  901. explosion('','White',torso.CFrame,v3(20,20,20),10,30)
  902. wait(.4)
  903. Tween(mwl1,cf(0,-1.2,-0.2)*ca(-pi/2,rad(53),0),.2)
  904. LerpTo.RootJoint.To = LerpTo.RootJoint.Cache * CFrame.Angles(0,0,0) * CFrame.new(0,0,0)
  905. disconnectsworddmg()
  906. TrailOn=false
  907. anim3=true
  908. legs=true
  909. deb=false
  910. elseif mode == 'HBoard' then
  911. if skate == true then
  912. end
  913. end
  914. elseif key == 'w' then
  915. if skate then
  916. foward=true
  917. Spawn(function()repeat wait()csp = math.min(50,csp+(10*(1/30)))until foward==false end)
  918. end
  919. elseif key == 'a' then
  920. if skate then
  921. LerpTo.RootJoint.To = LerpTo.RootJoint.Cache * CFrame.Angles(0,rad(10),-rad(90))*cf(0,0,.3)
  922. LerpTo.Neck.To = LerpTo.Neck.Cache * CFrame.Angles(0,rad(90),rad(10))
  923. left=true
  924. Spawn(function()repeat wait()tsp= math.min(8,tsp+(.5)) until left==false end)
  925. end
  926. elseif key == 's' then
  927. if skate then
  928. back=true
  929. Spawn(function()repeat wait()csp = math.max(-50,csp-(10*(1/30)))until back==false end)
  930. end
  931. elseif key == 'd' then
  932. if skate then
  933. LerpTo.RootJoint.To = LerpTo.RootJoint.Cache * CFrame.Angles(0,-rad(10),-rad(90))*cf(0,0,.3)
  934. LerpTo.Neck.To = LerpTo.Neck.Cache * CFrame.Angles(0,rad(90),-rad(10))
  935. right=true
  936. Spawn(function()repeat wait()tsp= math.max(-8,tsp-(.5)) until right==false end)
  937. end
  938. elseif key == "f" then
  939. if mode=='Sword' then
  940. connectsworddmg()
  941. deb=true
  942. anim3=false
  943. Tween(mwl1,cf(0,-1.2,-0.2)*ca(rad(90),-rad(13),rad(90)),.2)
  944. LerpTo.RightArm.To = LerpTo.RightArm.Cache * CFrame.Angles(rad(90),0,rad(20))* CFrame.new(0,0,0)
  945. LerpTo.LeftArm.To = LerpTo.LeftArm.Cache * CFrame.Angles(rad(90),0,rad(40))* CFrame.new(0,0,0)
  946. LerpTo.RootJoint.To = LerpTo.RootJoint.Cache * CFrame.Angles(0,0,-rad(90))
  947. LerpTo.Neck.To = LerpTo.Neck.Cache * CFrame.Angles(0,rad(60),0)
  948. wait(.4)
  949. Tween(mwl1,cf(0,-1.2,-0.2)*ca(rad(90),rad(50),rad(90)),.75)
  950. so('160069154',torso,false,1)
  951. wait(.05)
  952. LerpTo.RightArm.To = LerpTo.RightArm.Cache * CFrame.Angles(rad(90),0,-rad(50))* CFrame.new(0,0,0)
  953. LerpTo.LeftArm.To = LerpTo.LeftArm.Cache * CFrame.Angles(rad(90),0,-rad(20))* CFrame.new(0,0,0)
  954. LerpTo.RootJoint.To = LerpTo.RootJoint.Cache * CFrame.Angles(0,0,-rad(90))
  955. LerpTo.Neck.To = LerpTo.Neck.Cache * CFrame.Angles(0,rad(60),0)
  956. wait()
  957. Spawn(function()
  958. for i=1,3 do
  959. local efx= Part(1,1,1,'',.5,false,true,wep)
  960. local m= Mesh(efx,'http://www.roblox.com/asset/?id=20329976',3,1,3)
  961. efx.CFrame=torso.CFrame*ca(pi/2,0,-pi/2)
  962. Spawn(function()
  963. for i=1,7 do wait()
  964. m.Scale=m.Scale+Vector3.new(1,.1,1)
  965. end
  966. efx:Destroy()
  967. end)
  968. wait(.1)
  969. end
  970. end)
  971. cfm=torso.CFrame*ca(0,pi/2,0)
  972. goto=cfm.lookVector*60
  973. local v = Instance.new("BodyVelocity",torso)
  974. v.maxForce = Vector3.new(1,1,1)*9e9
  975. v.P = 2000
  976. v.velocity = goto
  977. wait(.25)
  978. v:Destroy()
  979. --LerpTo.RootJoint.To = LerpTo.RootJoint.Cache * CFrame.Angles(0,0,rad(90))
  980. LerpTo.RightArm.To = LerpTo.RightArm.Cache * CFrame.Angles(rad(40),0,rad(50))* CFrame.new(0,0,0)
  981. Tween(mwl1,cf(0,-1.2,-0.2)*ca(pi/1,0,0),.3)
  982. wait(.2)
  983. so('161006212',torso,false,.5)
  984. TrailOn=true
  985. LerpTo.RightArm.To = LerpTo.RightArm.Cache * CFrame.Angles(rad(90),0,rad(90))* CFrame.new(-0.5,-0.5,0)
  986. LerpTo.Neck.To = LerpTo.Neck.Cache * CFrame.Angles(0,-rad(80),0)
  987. LerpTo.RootJoint.To = LerpTo.RootJoint.Cache * CFrame.Angles(0,0,rad(80))
  988. LerpTo.LeftArm.To = LerpTo.LeftArm.Cache * CFrame.Angles(0,0,-rad(30))
  989. wait(.3)
  990. TrailOn=false
  991. legs=false
  992. Tween(mwl1,cf(0,-1.2,-0.2)*ca(pi/1,rad(90),0),.3)
  993. LerpTo.RightArm.To = LerpTo.RightArm.Cache * CFrame.Angles(rad(90),-rad(30),rad(90))* CFrame.new(-0.5,-0.5,0)
  994. LerpTo.RootJoint.To = LerpTo.RootJoint.Cache * CFrame.Angles(0,0,rad(80)) * CFrame.new(0,0,-1)
  995. LerpTo.LeftLeg.To = LerpTo.LeftLeg.Cache * CFrame.Angles(0,0,0) * CFrame.new(0,1,-1)
  996. LerpTo.RightLeg.To = LerpTo.RightLeg.Cache * CFrame.Angles(-rad(50),0,0) * CFrame.new(0,0.5,0)
  997. wait(.2)
  998. LerpTo.RightArm.To = LerpTo.RightArm.Cache * CFrame.Angles(rad(90),rad(30),rad(90))* CFrame.new(-0.5,-0.5,0)
  999. for i=1,4 do wait()
  1000. so('182765513',torso,false,1.2)
  1001. local bm= Part(1,1,1,'',0.2,false,true,pchar)
  1002. local bmm=Mesh(bm,'http://www.roblox.com/asset/?id=1778999',0,0,0)
  1003. bm.CFrame=torso.CFrame*cf(3+i*8,0,0)*ca(math.random(-50,50)/100,0,math.random(-50,50)/100)
  1004. for i,v in pairs(workspace:children()) do
  1005. if v:IsA("Model") and v:findFirstChild("Humanoid") then
  1006. if v:findFirstChild("Head") and v:findFirstChild("Torso") then
  1007. if (v:findFirstChild("Torso").Position - bm.Position).magnitude < 10 and v.Name ~= pchar.Name then
  1008. Spawn(function()
  1009. v.Humanoid:TakeDamage(40)
  1010. local cur= v.Torso
  1011. cur.Anchored=true
  1012. for i=1,4 do
  1013. local new= Part(1,1,1,'',0.2,false,true,mo)
  1014. local newm=Mesh(new,'http://www.roblox.com/asset/?id=1778999',1,3,1)
  1015. new.CFrame=cur.CFrame*CFrame.new(0,-2.5,0)*CFrame.Angles(math.random(-100,100)/100,0,math.random(-100,100)/100)
  1016. game.Debris:AddItem(new,3)
  1017. end
  1018. wait(3)
  1019. so('87015121',cur,false,1)
  1020. cur.Anchored=false
  1021. end)
  1022. end
  1023. end
  1024. end
  1025. end
  1026. Spawn(function()
  1027. for i=1,10 do wait()bmm.Scale=bmm.Scale+Vector3.new(.5,1,.5) end
  1028. wait(.5)
  1029. for i=1,10 do wait()bmm.Scale=bmm.Scale-Vector3.new(.5,1,.5) end
  1030. bm:Destroy()
  1031. end)
  1032. end
  1033. wait(.2)
  1034. Tween(mwl1,cf(0,-1.2,-0.2)*ca(-pi/2,rad(53),0),.2)
  1035. LerpTo.Neck.To = LerpTo.Neck.Cache * CFrame.Angles(0,0,0)
  1036. LerpTo.RootJoint.To = LerpTo.RootJoint.Cache * CFrame.Angles(0,0,0) * CFrame.new(0,0,0)
  1037. disconnectsworddmg()
  1038. TrailOn=false
  1039. anim3=true
  1040. legs=true
  1041. deb=false
  1042. elseif mode == 'HBoard' then
  1043. f= not f
  1044. if f then
  1045. legs=false
  1046. anim2=false
  1047. LerpTo.RightArm.To = LerpTo.RightArm.Cache * CFrame.Angles(rad(90),0,-rad(40))* CFrame.new(-.2,-.25,0)
  1048. LerpTo.LeftArm.To = LerpTo.LeftArm.Cache * CFrame.Angles(rad(90),0,rad(40))* CFrame.new(.2,-.25,0)
  1049. LerpTo.RootJoint.To = LerpTo.RootJoint.Cache * CFrame.Angles(0,0,0) * CFrame.new(0,0,-1)
  1050. LerpTo.LeftLeg.To = LerpTo.LeftLeg.Cache * CFrame.Angles(0,0,0) * CFrame.new(0,1,-1)
  1051. LerpTo.RightLeg.To = LerpTo.RightLeg.Cache * CFrame.Angles(-rad(50),0,0) * CFrame.new(0,0.5,0)
  1052. wait(.3)
  1053. LerpTo.LeftLeg.To = LerpTo.LeftLeg.Cache * CFrame.Angles(0,0,-rad(10))
  1054. LerpTo.RightLeg.To = LerpTo.RightLeg.Cache * CFrame.Angles(0,0,rad(10))
  1055. LerpTo.RootJoint.To = LerpTo.RootJoint.Cache * CFrame.Angles(0,0,-rad(90))*cf(0,0,1)
  1056. LerpTo.Neck.To = LerpTo.Neck.Cache * CFrame.Angles(0,-rad(90),0)
  1057. LerpTo.LeftArm.To = LerpTo.LeftArm.Cache * CFrame.Angles(0,0,-rad(20))
  1058. LerpTo.RightArm.To = LerpTo.RightArm.Cache * CFrame.Angles(rad(90),-rad(30),rad(90))* CFrame.new(-0.5,-0.5,0)
  1059. wait(.1)
  1060. Tween(mwl1,cf(0,-1,2)*ca(0,pi/2,pi/2),.5)
  1061. Tween(whel1w,cf(0,-2,0)*ca(0,pi/2,0),.5)
  1062. Tween(whel2w,cf(0,2,0)*ca(0,pi/2,0),.5)
  1063. LerpTo.RightArm.To = LerpTo.RightArm.Cache * CFrame.Angles(rad(90),-rad(70),rad(90))* CFrame.new(-0.5,-1,0)
  1064. wait(.12)
  1065. mwl1.Part1=torso
  1066. mwl1.C1=cf(0,-3,0)*ca(0,0,pi/2)
  1067. LerpTo.RootJoint.To = LerpTo.RootJoint.Cache * CFrame.Angles(0,0,-rad(90))*cf(0,0,.3)
  1068. LerpTo.Neck.To = LerpTo.Neck.Cache * CFrame.Angles(0,rad(90),0)
  1069. LerpTo.RightArm.To = LerpTo.RightArm.Cache * CFrame.Angles(0,0,rad(20))
  1070. ROF=Instance.new('BodyAngularVelocity',torso)
  1071. ROF.maxTorque = v3(0, math.huge, 0)
  1072. ROF.angularvelocity = v3(0, 0, 0)
  1073. BV=Instance.new('BodyVelocity',torso)
  1074. BV.maxForce = v3(math.huge,0,math.huge)
  1075. BV.velocity = v3(0,0,0)
  1076. skateso=so('22917014',torso,true,0)
  1077. skateso.Volume=100
  1078. skate=true
  1079. pchar.Humanoid.WalkSpeed=0
  1080. else
  1081. skate=false
  1082. csp=0
  1083. tsp=0
  1084. LerpTo.RootJoint.To = LerpTo.RootJoint.Cache * CFrame.Angles(0,0,0)
  1085. LerpTo.Neck.To = LerpTo.Neck.Cache * CFrame.Angles(0,0,0)
  1086. skateso:Destroy()
  1087. BV:Destroy()
  1088. ROF:Destroy()
  1089. pchar.Humanoid.WalkSpeed=16
  1090. mwl1.Part1=pchar['Right Arm']
  1091. Tween(whel1w,cf(0,-2,0)*ca(0,0,0),.5)
  1092. Tween(whel2w,cf(0,2,0)*ca(0,0,0),.5)
  1093. Tween(mwl1,cf(0,-1,0)*ca(pi/2,0,0),.5)
  1094. anim2=true
  1095. legs=true
  1096. end
  1097. end
  1098. end
  1099. end
  1100.  
  1101. function onKeyUp(key)
  1102. key = key:lower()
  1103. if key == 'w' then
  1104. if skate then
  1105. foward=false
  1106. end
  1107. elseif key == 'a' then
  1108. if skate then
  1109. left=false
  1110. if skate then
  1111. LerpTo.RootJoint.To = LerpTo.RootJoint.Cache * CFrame.Angles(0,0,-rad(90))*cf(0,0,.3)
  1112. else
  1113. LerpTo.RootJoint.To = LerpTo.RootJoint.Cache * CFrame.Angles(0,0,-rad(90))*cf(0,0,2)
  1114. end
  1115. LerpTo.Neck.To = LerpTo.Neck.Cache * CFrame.Angles(0,rad(90),0)
  1116. wait()
  1117. tsp=0
  1118. end
  1119. elseif key == 's' then
  1120. if skate then
  1121. back=false
  1122. end
  1123. elseif key == 'd' then
  1124. if skate then
  1125. if skate then
  1126. LerpTo.RootJoint.To = LerpTo.RootJoint.Cache * CFrame.Angles(0,0,-rad(90))*cf(0,0,.3)
  1127. else
  1128. LerpTo.RootJoint.To = LerpTo.RootJoint.Cache * CFrame.Angles(0,0,-rad(90))*cf(0,0,2)
  1129. end
  1130. LerpTo.Neck.To = LerpTo.Neck.Cache * CFrame.Angles(0,rad(90),0)
  1131. right=false
  1132. wait()
  1133. tsp=0
  1134. end
  1135. end
  1136. end
  1137.  
  1138. function onClicked(mouse)
  1139. if deb==true then return end
  1140. if mode=='Sniper' then
  1141. if SAmmo > 0 then
  1142. deb=true
  1143. SAmmo=SAmmo-1
  1144. so('10209859',torso,false,.5)
  1145. local ray = Ray.new(brl.CFrame.p,(mouse.hit.p - brl.CFrame.p).unit*1200)
  1146. local hit,position = game.Workspace:FindPartOnRay(ray,pchar)
  1147. local humanoid = hit and hit.Parent and hit.Parent:findFirstChild("Humanoid")
  1148. function part(par,colr)
  1149. local prt=Instance.new("Part",par)
  1150. prt.FormFactor=3
  1151. prt.TopSurface=0
  1152. prt.BottomSurface=0
  1153. prt.Transparency=1
  1154. prt.CanCollide=false
  1155. local item=Instance.new('BillboardGui',prt)
  1156. item.Adornee=prt
  1157. item.Size=UDim2.new(math.random(5,10)/10, 0, math.random(5,10)/10, 0)
  1158. local frm=Instance.new('Frame',item)
  1159. frm.Size=UDim2.new(1,0,1,0)
  1160. frm.BorderSizePixel=0
  1161. frm.BackgroundTransparency=math.random(2,6)/10
  1162. if colr then
  1163. frm.BackgroundColor3=BrickColor.new(colr).Color
  1164. end
  1165. return prt
  1166. end
  1167. ypcall(function()
  1168. if not humanoid then
  1169. if hit.Name=='Handle' then
  1170. hit:BreakJoints()
  1171. hit.Velocity=Vector3.new(math.random(-20,20),math.random(30,60),math.random(-20,20))
  1172. end
  1173. else
  1174. if humanoid.Parent.Name ~= pchar.Name then
  1175. if hit.Name=='Head' then
  1176. humanoid.Health=0
  1177. for i=1,10 do
  1178. local noob1=part(workspace,'Bright red')
  1179. noob1.CFrame=humanoid.Torso.CFrame*CFrame.new(math.random(-3.5,3.5),0,math.random(-3.5,3.5))
  1180. noob1.Velocity=Vector3.new(math.random(-20,20),math.random(20,40),math.random(-20,20))
  1181. end
  1182. else
  1183. humanoid.Health=humanoid.Health-30
  1184. for i=1,10 do
  1185. local noob1=part(workspace,'Bright red')
  1186. noob1.CFrame=humanoid.Torso.CFrame*CFrame.new(math.random(-3.5,3.5),0,math.random(-3.5,3.5))
  1187. noob1.Velocity=Vector3.new(math.random(-20,20),math.random(20,40),math.random(-20,20))
  1188. end
  1189. end
  1190. end
  1191. end
  1192. end)
  1193. local distance = (position - brl.CFrame.p).magnitude
  1194. local ray= Part(1,1,1,'White',0,false,true,mo)
  1195. local raym=Mesh(ray,1,.2,distance,.2)
  1196. ray.CFrame = cf(position, brl.CFrame.p) *cf(0,0,-distance/2)*ca(rad(90),0,0)
  1197. local bult= Part(.2,.5,.2,'Bright yellow',0,true,false,mo)
  1198. Mesh(bult,1,1,1,1)
  1199. bult.CFrame=bulleth.CFrame*ca(0,0,rad(90))
  1200. bult.Velocity=bult.CFrame.lookVector*20
  1201. game.Debris:AddItem(bult,math.random(7,15))
  1202. local cols={'Bright orange','Bright red'}
  1203. local dcf=brl.CFrame*ca(pi/2,0,0)
  1204. local goto=dcf.lookVector*.5
  1205. Spawn(function()
  1206. for i=1,math.random(3,6) do wait()
  1207. local a= Part(1,1,1,cols[math.random(1,2)],0,false,true,mo)
  1208. local m= Mesh(a,3,1,1,1)
  1209. a.CFrame=dcf*ca(math.random(),math.random(),math.random())
  1210. Spawn(function()
  1211. while wait() do
  1212. if a.Transparency >= 1 then a:Destroy() break end
  1213. m.Scale=m.Scale-Vector3.new(0.1,0.1,0.1)
  1214. a.CFrame=a.CFrame+goto
  1215. a.Transparency=a.Transparency+0.05
  1216. end
  1217. end)
  1218. end
  1219. end)
  1220. Spawn(function()
  1221. repeat wait() raym.Scale=raym.Scale-Vector3.new(0.01,0,0.01) until raym.Scale.x < 0
  1222. end)
  1223. LerpTo.Neck.To = LerpTo.Neck.Cache * CFrame.Angles(0,rad(60),0)
  1224. LerpTo.LeftArm.To = LerpTo.LeftArm.Cache * CFrame.Angles(rad(120),-rad(30),-rad(50)) * CFrame.new(.2,-.5,0)
  1225. LerpTo.RightArm.To = LerpTo.RightArm.Cache * CFrame.Angles(rad(100),-rad(30),-rad(80)) * CFrame.new(.2,-.5,0)
  1226. Tween(slider,cf(.6,0.2,0)*ca(0,0,rad(90)),.5)
  1227. wait(.15)
  1228. Tween(slider,cf(.4,0.2,0)*ca(0,0,rad(90)),.05)
  1229. LerpTo.Neck.To = LerpTo.Neck.Cache * CFrame.Angles(-rad(30),rad(60),0)
  1230. LerpTo.LeftArm.To = LerpTo.LeftArm.Cache * CFrame.Angles(rad(90),0,-rad(50)) * CFrame.new(.2,-.5,0)
  1231. LerpTo.RightArm.To = LerpTo.RightArm.Cache * CFrame.Angles(rad(90),0,-rad(80)) * CFrame.new(.2,-.5,0)
  1232. wait(.6)
  1233. deb=false
  1234. end
  1235. elseif mode=='Sword' then
  1236. anim3=false
  1237. deb=true
  1238. if swing==1 then
  1239. so('161006212',torso,false,math.random(5,11)/10)
  1240. connectsworddmg()
  1241. Tween(mwl1,cf(0,-1.2,-0.2)*ca(0,0,rad(220)),.2)
  1242. LerpTo.RightArm.To = LerpTo.RightArm.Cache * CFrame.Angles(rad(90),0,-rad(40))* CFrame.new(-.2,-.25,0)
  1243. LerpTo.LeftArm.To = LerpTo.LeftArm.Cache * CFrame.Angles(rad(90),0,rad(40))* CFrame.new(.2,-.25,0)
  1244. wait(.15)
  1245. LerpTo.RootJoint.To = LerpTo.RootJoint.Cache * CFrame.Angles(0,0,rad(60))
  1246. TrailOn=true
  1247. wait(.3)
  1248. Tween(mwl1,cf(0,-1.2,-0.2)*ca(-pi/2,rad(53),0),.2)
  1249. LerpTo.RootJoint.To = LerpTo.RootJoint.Cache * CFrame.Angles(0,0,0)
  1250. disconnectsworddmg()
  1251. TrailOn=false
  1252. anim3=true
  1253. swing=2
  1254. wait(.4)
  1255. deb=false
  1256. return
  1257. elseif swing==2 then
  1258. so('161006212',torso,false,math.random(5,11)/10)
  1259. connectsworddmg()
  1260. Tween(mwl1,cf(0,-1.2,-0.2)*ca(0,rad(180),rad(150)),.2)
  1261. LerpTo.RightArm.To = LerpTo.RightArm.Cache * CFrame.Angles(rad(90),0,-rad(40))* CFrame.new(-.2,-.25,0)
  1262. LerpTo.LeftArm.To = LerpTo.LeftArm.Cache * CFrame.Angles(rad(90),0,rad(40))* CFrame.new(.2,-.25,0)
  1263. wait(.15)
  1264. TrailOn=true
  1265. LerpTo.RootJoint.To = LerpTo.RootJoint.Cache * CFrame.Angles(0,0,-rad(60))
  1266. wait(.3)
  1267. Tween(mwl1,cf(0,-1.2,-0.2)*ca(-pi/2,rad(53),0),.2)
  1268. LerpTo.RootJoint.To = LerpTo.RootJoint.Cache * CFrame.Angles(0,0,0)
  1269. disconnectsworddmg()
  1270. TrailOn=false
  1271. anim3=true
  1272. swing=3
  1273. wait(.4)
  1274. deb=false
  1275. return
  1276. elseif swing==3 then
  1277. connectsworddmg()
  1278. Tween(mwl1,cf(0,-1.2,-0.2)*ca(-pi/2-rad(20),rad(55),-rad(50)),.2)
  1279. LerpTo.RightArm.To = LerpTo.RightArm.Cache * CFrame.Angles(rad(120),0,-rad(40))* CFrame.new(-.2,-.25,0)
  1280. LerpTo.LeftArm.To = LerpTo.LeftArm.Cache * CFrame.Angles(rad(120),0,rad(40))* CFrame.new(.2,-.25,0)
  1281. wait(.4)
  1282. so('161006212',torso,false,math.random(5,11)/10)
  1283. TrailOn=true
  1284. Tween(mwl1,cf(0,-1.2,-0.2)*ca(-pi/2-rad(45),rad(55),-rad(60)),.2)
  1285. LerpTo.RightArm.To = LerpTo.RightArm.Cache * CFrame.Angles(rad(50),0,-rad(40))* CFrame.new(-.2,-.25,0)
  1286. LerpTo.LeftArm.To = LerpTo.LeftArm.Cache * CFrame.Angles(rad(50),0,rad(40))* CFrame.new(.2,-.25,0)
  1287. wait(.4)
  1288. Tween(mwl1,cf(0,-1.2,-0.2)*ca(-pi/2,rad(53),0),.2)
  1289. disconnectsworddmg()
  1290. TrailOn=false
  1291. anim3=true
  1292. swing=1
  1293. wait(.4)
  1294. deb=false
  1295. return
  1296. end
  1297. end
  1298. end
  1299.  
  1300. tol.Selected:connect(function(mouse)
  1301. mouse.Button1Down:connect(function() onClicked(mouse) end)
  1302. mouse.KeyDown:connect(onKeyDown)
  1303. mouse.KeyUp:connect(onKeyUp)
  1304. anim=false
  1305. anim2=true
  1306. wait(.2)
  1307. opnbl('t')
  1308. end)
  1309.  
  1310. tol.Deselected:connect(function(mouse)
  1311. anim2=false
  1312. anim=true
  1313. Tween(ballweld,cf(0,.375,-.55),.1)
  1314. for i=1,#animationprts do
  1315. Tween(animationprts[i],cf(0,0,.25)*ca(rad(90),0,0),.1)
  1316. end
  1317. end)
  1318.  
  1319.  
  1320.  
  1321.  
  1322. local function updateanims()
  1323. if Vector3.new(torso.Velocity.x, 0, torso.Velocity.z).magnitude < 2 then
  1324. anglespeed = 1/2
  1325. if anim==true then
  1326. LerpTo.Neck.To = LerpTo.Neck.Cache * CFrame.Angles(sin(angle)*0.05,0,0)
  1327. LerpTo.RightArm.To = LerpTo.RightArm.Cache * CFrame.Angles(sin(angle)*0.1,0,0)
  1328. LerpTo.LeftArm.To = LerpTo.LeftArm.Cache * CFrame.Angles(sin(angle)*0.1,0,0)
  1329. end
  1330. if legs==true then
  1331. LerpTo.RightLeg.To = LerpTo.RightLeg.Cache * CFrame.Angles(0,0,abs(sin(angle))*0.1)
  1332. LerpTo.LeftLeg.To = LerpTo.LeftLeg.Cache * CFrame.Angles(0,0,-abs(sin(angle))*0.1)
  1333. end
  1334. end
  1335. if Vector3.new(torso.Velocity.x, 0, torso.Velocity.z).magnitude > 2 then
  1336. anglespeed = 4
  1337. if anim==true then
  1338. LerpTo.Neck.To = LerpTo.Neck.Cache * CFrame.Angles(0,0,math.sin(angle)*0.05)
  1339. LerpTo.RightArm.To = LerpTo.RightArm.Cache * CFrame.Angles(-sin(angle)*.8,0,rad(10))
  1340. LerpTo.LeftArm.To = LerpTo.LeftArm.Cache * CFrame.Angles(sin(angle)*.8,0,-rad(10))
  1341. end
  1342. if legs==true then
  1343. LerpTo.RightLeg.To = LerpTo.RightLeg.Cache * CFrame.Angles(sin(angle)*.8,0,0)
  1344. LerpTo.LeftLeg.To = LerpTo.LeftLeg.Cache * CFrame.Angles(-sin(angle)*.8,0,0)
  1345. end
  1346. end
  1347. if anim2==true then
  1348. if Vector3.new(torso.Velocity.x, 0, torso.Velocity.z).magnitude < 2 then
  1349. LerpTo.RightArm.To = LerpTo.RightArm.Cache * CFrame.Angles(rad(60),0,-rad(20))
  1350. LerpTo.LeftArm.To = LerpTo.LeftArm.Cache * CFrame.Angles(sin(angle)*0.1,0,0)
  1351. end
  1352. if Vector3.new(torso.Velocity.x, 0, torso.Velocity.z).magnitude > 2 then
  1353. LerpTo.RightArm.To = LerpTo.RightArm.Cache * CFrame.Angles(rad(60),rad(20),-rad(50))
  1354. LerpTo.LeftArm.To = LerpTo.LeftArm.Cache * CFrame.Angles(sin(angle)*.8,0,-rad(10))
  1355. end
  1356. end
  1357. if anim3==true then
  1358. if Vector3.new(torso.Velocity.x, 0, torso.Velocity.z).magnitude < 2 then
  1359. LerpTo.RightArm.To = LerpTo.RightArm.Cache * CFrame.Angles(rad(60)+sin(angle)*.05,0,-rad(40))* CFrame.new(-.2,-.25,0)
  1360. LerpTo.LeftArm.To = LerpTo.LeftArm.Cache * CFrame.Angles(rad(60)+sin(angle)*.05,0,rad(40))* CFrame.new(.2,-.25,0)
  1361. end
  1362. if Vector3.new(torso.Velocity.x, 0, torso.Velocity.z).magnitude > 2 then
  1363. LerpTo.RightArm.To = LerpTo.RightArm.Cache * CFrame.Angles(rad(60)+sin(angle)*.1,0,-rad(40))* CFrame.new(-.2,-.25,0)
  1364. LerpTo.LeftArm.To = LerpTo.LeftArm.Cache * CFrame.Angles(rad(60)+sin(angle)*.1,0,rad(40))* CFrame.new(.2,-.25,0)
  1365. end
  1366. end
  1367. end
  1368.  
  1369. Spawn(function()
  1370. while wait()do
  1371. angle = (angle % 100) + anglespeed/10 -- no matter whut it has to be in a loop or its on exticy
  1372. end
  1373. end)
  1374. game:service'RunService'.RenderStepped:connect(function()
  1375. if skate then
  1376. if csp < 0 then
  1377. it = tonumber(tostring(csp):sub(2))
  1378. skateso.Pitch=it/20
  1379. else
  1380. skateso.Pitch=csp/20
  1381. end
  1382. ROF.angularvelocity = Vector3.new(0, tsp, 0)
  1383. local direction = torso.CFrame * ca(0,pi/2,-pi/2)
  1384. direction = direction.lookVector
  1385. direction = Vector3.new(direction.x,0,direction.z).unit
  1386. BV.velocity = direction*(csp)
  1387. whel1w.C1=whel1w.C1*ca(-csp/90,0,0)
  1388. whel2w.C1=whel2w.C1*ca(-csp/90,0,0)
  1389. end
  1390. pchar.Humanoid.CameraOffset = (pchar.HumanoidRootPart.CFrame:toObjectSpace(pchar.Head.CFrame)).p - Vector3.new(0, 1.25, 0)
  1391. if blade2 then
  1392. local blcf = blade2.CFrame*cf(0,-.5,0)
  1393. if TrailOn then
  1394. if scfr and (blade2.Position-scfr.p).magnitude > .1 then
  1395. local h = 3.8
  1396. local a,b = Triangle((scfr*cf(0,h/2,0)).p,(scfr*cf(0,-h/2,0)).p,(blcf*cf(0,h/2,0)).p)
  1397. if a then game.Debris:AddItem(a,1) end
  1398. if b then game.Debris:AddItem(b,1) end
  1399. local a,b = Triangle((blcf*cf(0,h/2,0)).p,(blcf*cf(0,-h/2,0)).p,(scfr*cf(0,-h/2,0)).p)
  1400. if a then game.Debris:AddItem(a,1) end
  1401. if b then game.Debris:AddItem(b,1) end
  1402. scfr = blcf
  1403. elseif not scfr then
  1404. scfr = blcf
  1405. end
  1406. elseif not TrailsOn then
  1407. scfr = nil
  1408. end
  1409. end
  1410. for _,v in pairs(LerpTo) do
  1411. v.Weld.C0 = Lerp.CFrame(v.Weld.C0,v.To,v.Speed)
  1412. end
  1413. updateanims()
  1414. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement