Advertisement
Guest User

fasflgateg

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