deadropz

3dmg

Apr 23rd, 2017
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 23.01 KB | None | 0 0
  1. wait(0.5)
  2. --3D Manuever Gear Script --
  3. -- Based off of Attack on titan c; --
  4. -- Made by Ihatenoch --
  5. -- Local Script --
  6. -- You dont put your name in here-
  7. debounce = false
  8. v3 = Vector3.new
  9. cn = CFrame.new
  10. ca2 = CFrame.Angles
  11. mf = math.floor
  12. mran = math.random
  13. mrad = math.rad
  14. mdeg = math.deg
  15. ca = function(x,y,z) return ca2(mrad(x),mrad(y),mrad(z)) end
  16. v32=function(x,y,z) return v3(mdeg(x),mdeg(y),mdeg(z)) end
  17. mran2 = function(a,b) return mran(a*1000,b*1000)/1000 end
  18. ud=UDim2.new
  19. bn = BrickColor.new
  20. c3 = Color3.new
  21. nov3=v3(0,0,0)
  22. maxv3=v3(1,1,1)/0
  23. -----
  24. Player = game:service'Players'.LocalPlayer
  25. Char = Player.Character
  26. Torso = Char.Torso
  27. Head = Char.Head
  28. Humanoid = Char.Humanoid
  29. Root=Char.HumanoidRootPart.RootJoint
  30.  
  31. LA=Char['Left Arm']
  32. RA=Char['Right Arm']
  33. LL=Char['Left Leg']
  34. RL=Char['Right Leg']
  35. LAM=Torso:findFirstChild'Left Shoulder' or _G.LAM
  36. RAM=Torso:findFirstChild'Right Shoulder' or _G.RAM
  37. LLM=Torso:findFirstChild'Left Hip' or _G.LLM
  38. RLM=Torso:findFirstChild'Right Hip' or _G.RLM
  39. Neck=Torso.Neck
  40. Neck.C0=cn(0,1.5,0)
  41. Neck.C1=cn(0,0,0)
  42. _G.LAM=LAM _G.RAM=RAM _G.LLM=LLM _G.RLM=RLM
  43.  
  44.  
  45. as,so={},{'metal','Block','Slash','Slash2','Hit','Kick'}
  46. as.corner='11294911'
  47. as.cone='1033714'
  48. as.ring="3270017"
  49. as.Chakram='47260990'
  50. as.ring2='18430887'
  51. as.blast='20329976'
  52. as.missile='10207677'
  53. as.fire='2693346'
  54. as.boom='3264793'
  55. as.slash='10209645'
  56. as.abscond='2767090'
  57. as.firelaser='13775494'
  58. as.diamond='9756362'
  59. as.metal='rbxasset://sounds\\unsheath.wav'
  60. as.Block = 'rbxasset://sounds\\metal.ogg'
  61. as.Slash = '10209645'
  62. as.Slash2 = '46760716'
  63. as.Hit='10209583'
  64. as.Kick='46153268'
  65. as.cast='2101137'
  66.  
  67.  
  68. for i,v in pairs(as) do
  69. if type(tonumber(v:sub(1,3)))=="number" then
  70. as[i]="http://www.roblox.com/asset/?id="..v
  71. end
  72. end
  73.  
  74. game:service"ControllerService":ClearAllChildren()
  75. Controls=Instance.new("HumanoidController",game:service"ControllerService")
  76.  
  77.  
  78. LastMade=nil
  79. iNew=function(tab)
  80. local v=Instance.new(tab[1])
  81. for Ind,Val in pairs(tab) do
  82. if Ind~=1 and Ind~=2 then
  83. v[Ind] = Val
  84. end
  85. end
  86. v.Parent=tab[2]==0 and LastMade or tab[2]
  87. LastMade=v
  88. return v
  89. end
  90. iPart=function(tab)
  91. local v=Instance.new(tab.type or 'Part')
  92. if tab.type~='CornerWedgePart' then v.formFactor='Custom' end
  93. v.TopSurface=0 v.BottomSurface=0
  94. if tab.sc then
  95. v.Size=v3(tab[2]*tab.sc,tab[3]*tab.sc,tab[4]*tab.sc)
  96. else
  97. v.Size=v3(tab[2],tab[3],tab[4])
  98. end
  99. if tab.co then v.BrickColor=bn(tab.co) end
  100. if tab.tr then v.Transparency=tab.tr end
  101. if tab.rf then v.Reflectance=tab.rf end
  102. v.CanCollide=false --if tab.can then v.CanCollide=tab.can end
  103. if tab.cf then v.CFrame=tab.cf end
  104. if tab.an then v.Anchored=tab.an end
  105. if tab.na then v.Name=tab.na end
  106. if tab.ma then v.Material=tab.ma end
  107. v.Parent=tab[1]
  108. v:BreakJoints()
  109. LastMade=v
  110. return v
  111. end
  112. ray = function(Pos, Dir,tab,length) -- ray cast
  113. return workspace:FindPartOnRay(Ray.new(Pos, Dir.unit *(length or 999)),tab)
  114. end
  115. function getoutline(x,z,i)
  116. return math.sqrt(x^2+z^2)+(i or 0.05),mdeg(math.atan2(x,z))
  117. end
  118. function v3a(cf)
  119. local x,y,z=cf:toEulerAnglesXYZ()
  120. return v3(mdeg(x),mdeg(y),mdeg(z))
  121. end
  122. function TweenV3(i, loops,origpos,nextpos,smooth)
  123. loops=math.floor(loops)
  124. smooth = smooth or 1
  125. local tox2,toy2,toz2 = 0,0,0
  126. local perc =smooth==1 and math.sin((math.pi/2)/loops*i) or i/loops
  127. tox2= origpos.x > nextpos.x and -math.abs(origpos.x - nextpos.x) *perc or math.abs(origpos.x - nextpos.x) *perc
  128. toy2= origpos.y > nextpos.y and -math.abs(origpos.y - nextpos.y) *perc or math.abs(origpos.y - nextpos.y) *perc
  129. toz2= origpos.z > nextpos.z and -math.abs(origpos.z - nextpos.z) *perc or math.abs(origpos.z - nextpos.z) *perc
  130. return v3(origpos.x + tox2,origpos.y + toy2,origpos.z + toz2)
  131. end
  132. function TweenCF(i, loops,origpos,nextpos,smooth)
  133. loops=math.floor(loops)
  134. smooth = smooth or 1
  135. local x0,y0,z0=origpos:toEulerAnglesXYZ()
  136. local x1,y1,z1=nextpos:toEulerAnglesXYZ()
  137. origangle=v32(x0,y0,z0)
  138. nextangle=v32(x1,y1,z1)
  139. local perc =smooth==1 and math.sin((math.pi/2)/loops*i) or i/loops
  140. local tox,toy,toz = 0,0,0
  141. tox = origangle.x > nextangle.x and -math.abs(origangle.x - nextangle.x) *perc or math.abs(origangle.x - nextangle.x) *perc
  142. toy = origangle.y > nextangle.y and -math.abs(origangle.y - nextangle.y) *perc or math.abs(origangle.y - nextangle.y) *perc
  143. toz = origangle.z > nextangle.z and -math.abs(origangle.z - nextangle.z) *perc or math.abs(origangle.z - nextangle.z) *perc
  144. local tox2,toy2,toz2 = 0,0,0
  145. tox2= origpos.x > nextpos.x and -math.abs(origpos.x - nextpos.x) *perc or math.abs(origpos.x - nextpos.x) *perc
  146. toy2= origpos.y > nextpos.y and -math.abs(origpos.y - nextpos.y) *perc or math.abs(origpos.y - nextpos.y) *perc
  147. toz2= origpos.z > nextpos.z and -math.abs(origpos.z - nextpos.z) *perc or math.abs(origpos.z - nextpos.z) *perc
  148. return cn(origpos.x + tox2,origpos.y + toy2,origpos.z + toz2)*ca(origangle.x + tox,origangle.y + toy,origangle.z + toz)
  149. end
  150. WeldLib={}
  151. function GetWeld(weld,CO)
  152. if not WeldLib[weld] then
  153. local x0,y0,z0=weld.C0:toEulerAnglesXYZ()
  154. local x1,y1,z1=weld.C1:toEulerAnglesXYZ()
  155. WeldLib[weld]={[0]=v3(mdeg(x0),mdeg(y0),mdeg(z0)),[1]=v3(mdeg(x1),mdeg(y1),mdeg(z1))}
  156. end
  157. return weld['C'..CO].p,WeldLib[weld][CO]
  158. end
  159. function ClearWeld(weld)
  160. if WeldLib[weld] then WeldLib[weld]=nil end
  161. end
  162. function SetWeld(weld,CO,i, loops, origpos,origangle, nextpos,nextangle,smooth)
  163. loops=math.floor(loops)
  164. smooth = smooth or 1
  165. if not WeldLib[weld] then
  166. local x0,y0,z0=weld.C0:toEulerAnglesXYZ()
  167. local x1,y1,z1=weld.C1:toEulerAnglesXYZ()
  168. WeldLib[weld]={[0]=v3(mdeg(x0),mdeg(y0),mdeg(z0)),[1]=v3(mdeg(x1),mdeg(y1),mdeg(z1))}
  169. end
  170. local perc =smooth==1 and math.sin((math.pi/2)/loops*i) or i/loops
  171. --print(weld.Part1)
  172. local tox,toy,toz = 0,0,0
  173. tox = origangle.x > nextangle.x and -math.abs(origangle.x - nextangle.x) *perc or math.abs(origangle.x - nextangle.x) *perc
  174. toy = origangle.y > nextangle.y and -math.abs(origangle.y - nextangle.y) *perc or math.abs(origangle.y - nextangle.y) *perc
  175. toz = origangle.z > nextangle.z and -math.abs(origangle.z - nextangle.z) *perc or math.abs(origangle.z - nextangle.z) *perc
  176. local tox2,toy2,toz2 = 0,0,0
  177. tox2= origpos.x > nextpos.x and -math.abs(origpos.x - nextpos.x) *perc or math.abs(origpos.x - nextpos.x) *perc
  178. toy2= origpos.y > nextpos.y and -math.abs(origpos.y - nextpos.y) *perc or math.abs(origpos.y - nextpos.y) *perc
  179. toz2= origpos.z > nextpos.z and -math.abs(origpos.z - nextpos.z) *perc or math.abs(origpos.z - nextpos.z) *perc
  180. WeldLib[weld][CO] = v3(origangle.x + tox,origangle.y + toy,origangle.z + toz)
  181. weld['C'..CO] = cn(origpos.x + tox2,origpos.y + toy2,origpos.z + toz2)*ca(origangle.x + tox,origangle.y + toy,origangle.z + toz)
  182. end
  183. function FindSurface(part, position)
  184. local obj = part.CFrame:pointToObjectSpace(position)
  185. local siz = part.Size/2
  186. for i,v in pairs(Enum.NormalId:GetEnumItems()) do
  187. local vec = Vector3.FromNormalId(v)
  188. local wvec = part.CFrame:vectorToWorldSpace(vec)
  189. local vz = (obj)/(siz*vec)
  190. if (math.abs(vz.X-1) < 0.01 or math.abs(vz.Y-1) < 0.01 or math.abs(vz.Z-1) < 0.01) then
  191. return wvec,vec
  192. end
  193. end
  194. if part.className == "WedgePart" then
  195. return part.CFrame:vectorToWorldSpace(Vector3.new(0,0.707,-0.707)), Vector3.new(0,0.707,-0.707)
  196. end
  197. end
  198. LoopFunctions={}
  199. function DoLoop(times,func)
  200. LoopFunctions[#LoopFunctions+1]={times,0,func}
  201. end
  202. pcall(function() Torso.LAW:Remove() Torso.RAW:Remove() Torso.LLW:Remove() Torso.RLW:Remove() end)
  203. LAW=iNew{'Weld',Torso,Name='LAW',Part0=Torso,C0=cn(-1.5,0.5,0),C1=cn(0,0.5,0)}
  204. RAW=iNew{'Weld',Torso,Name='RAW',Part0=Torso,C0=cn( 1.5,0.5,0),C1=cn(0,0.5,0)}
  205. LLW=iNew{'Weld',Torso,Name='LLW',Part0=Torso,C0=cn(-0.5, -1,0),C1=cn(0, 1,0)}
  206. RLW=iNew{'Weld',Torso,Name='RLW',Part0=Torso,C0=cn( 0.5, -1,0),C1=cn(0, 1,0)}
  207. function Arms(on)
  208. LAM.Parent=Torso LAM.Part0=Torso
  209. RAM.Parent=Torso RAM.Part0=Torso
  210. LAM.Part1=on and nil or LA
  211. RAM.Part1=on and nil or RA
  212. LAW.Part1=on and LA or nil
  213. RAW.Part1=on and RA or nil
  214. end
  215. function Legs(on)
  216. LLM.Part1=on and nil or LL
  217. RLM.Part1=on and nil or RL
  218. LLW.Part1=on and LL or nil
  219. RLW.Part1=on and RL or nil
  220. end
  221.  
  222. _G.MGear=getfenv()
  223. pcall(function() _G.MGearS.Disabled=true end)
  224. _G.MGearS=script
  225.  
  226. pcall(function() Char.Gear:Remove() end)
  227. Gear=iNew{'Model',Char,Name='Gear'}
  228. Gt={[-1]={},[1]={}}
  229. for x=-1,1,2 do
  230. local base=iPart{Gear,0.6,3,0.8} iNew{'Weld',LastMade,Part0=x==-1 and LL or RL,Part1=LastMade,C0=cn(0.8*x,0.05,0.45)*ca(-80,0,6*x)}
  231. local v=iPart{Gear,0.5,2.5,0.5,co='Light stone grey'} iNew{'Weld',v,Part0=base,Part1=v,C0=cn(0,-0.24,0.6)} iNew{'CylinderMesh',v}
  232. local v=iPart{Gear,0.5,0.5,0.5,co='Light stone grey'} iNew{'Weld',v,Part0=base,Part1=v,C0=cn(0,1.01,0.6)} iNew{'SpecialMesh',v,MeshType='Sphere'}
  233. for z=-1.2,0.81,1 do
  234. local v=iPart{Gear,0.65,0.22,1.35,co='Dark stone grey'} iNew{'Weld',v,Part0=base,Part1=v,C0=cn(0,z,0.22)}
  235. end
  236. local v=iPart{Gear,0.25,0.5,0.25,co='Dark stone grey'} iNew{'Weld',v,Part0=base,Part1=v,C0=cn(0,1.25,0.6)*ca(0,0,90)} iNew{'CylinderMesh',v}
  237. local v=iPart{Gear,0.3,0.3,0.3,co='Black'} iNew{'Weld',v,Part0=base,Part1=v,C0=cn(0,1.25,0.6)*ca(0,0,90)} iNew{'CylinderMesh',v}
  238. local st,en=-0.3,0.3 local co=(st*-1+en)/4
  239. for xx=st,en,co do --sheath holes
  240. local v=iPart{Gear,0.2,0.2,0.7,co='Really black'} iNew{'Weld',v,Part0=base,Part1=v,C0=cn(xx+co/2,1.5,0)} iNew{'BlockMesh',v,Scale=v3(0.4,0.1,1)}
  241. end
  242. local v=iPart{Gear,0.75,0.2,0.75} iNew{'Weld',v,Part0=Torso,Part1=v,C0=cn(0.6*x,-0.65,1.1)*ca(45,0,-45*x)} iNew{'CylinderMesh',v}
  243. local v=iPart{Gear,0.6,0.22,0.6,co='Dark stone grey'} iNew{'Weld',v,Part0=Torso,Part1=v,C0=cn(0.6*x,-0.65,1.1)*ca(45,0,-45*x)} iNew{'CylinderMesh',v}
  244. local v2=iPart{Gear,0.2,0.2,0.2} iNew{'Weld',v2,Part0=v,Part1=v2,C0=cn(0,-0.35,0)*ca(180,0,0)} iNew{'SpecialMesh',v2,Scale=v3(0.3,0.65,0.3),MeshId=as.cone}
  245. local v2=iPart{Gear,0.2,0.2,0.3} iNew{'Weld',v2,Part0=v,Part1=v2,C0=ca(0,200*x,0)*cn(0,0,-0.5)}
  246. --sword handle
  247. local h=iPart{Gear,0.3,1.05,0.3} local hw=iNew{'Weld',h,Part0=x==-1 and LA or RA,Part1=h,C0=cn(0,-1,0)*ca(-90,0,0)} iNew{'CylinderMesh',h}
  248. Gt[x].h=hw
  249. local v=iPart{Gear,0.32,0.2,0.32,co='Black'} iNew{'Weld',v,Part0=h,Part1=v,C0=cn(0,-0.35,0)} iNew{'CylinderMesh',v}
  250. local v=iPart{Gear,0.2,0.5,0.25} iNew{'Weld',v,Part0=h,Part1=v,C0=cn(0,0.25,-0.15)}
  251. local v=iPart{Gear,0.21,0.2,0.25,co='Black'} iNew{'Weld',v,Part0=h,Part1=v,C0=cn(0,0.25+0.12,-0.125)}
  252. local v=iPart{Gear,0.21,0.2,0.25,co='Black'} iNew{'Weld',v,Part0=h,Part1=v,C0=cn(0,0.25-0.12,-0.125)}
  253. local v=iPart{Gear,0.3,0.2,0.3} iNew{'Weld',v,Part0=h,Part1=v,C0=cn(0,0.6,0)}
  254. local v=iPart{Gear,0.3,0.2,0.3,type='WedgePart'} iNew{'Weld',v,Part0=h,Part1=v,C0=cn(0,0.6,-0.3)}
  255. local v=iPart{Gear,0.3,0.2,0.3,type='WedgePart'} iNew{'Weld',v,Part0=h,Part1=v,C0=cn(0,0.6, 0.3)*ca(180,0,0)}
  256. local v=iPart{Gear,0.2,0.5,0.2} iNew{'Weld',v,Part0=h,Part1=v,C0=cn(0, 0.3,-0.4)*ca( 14,0,0)} iNew{'CylinderMesh',v,Scale=v3(0.6,1,0.6)}
  257. local v=iPart{Gear,0.2,0.2,0.2} iNew{'Weld',v,Part0=h,Part1=v,C0=cn(0,-0.25,-0.35)*ca(-20+180,0,0)} iNew{'SpecialMesh',v,MeshId=as.cone,Scale=v3(0.06,1,0.06)}
  258. --sword blade
  259. local bladelength=4
  260. local blade=iPart{Gear,0.2,bladelength,0.4} iNew{'Weld',v,Part0=h,Part1=blade,C0=cn(0,0.7+bladelength/2,0.05)} iNew{'BlockMesh',blade,Scale=v3(0.4,1,1)}
  261. local tip=iPart{Gear,0.2,0.5,0.4,type='WedgePart'} iNew{'Weld',v,Part0=blade,Part1=tip,C0=cn(0,bladelength/2+0.25,0)*ca(0,180,0)} iNew{'SpecialMesh',tip,MeshType='Wedge',Scale=v3(0.4,1,1)}
  262. for i=-1.6,1.4,0.6 do
  263. local v=iPart{Gear,0.2,0,0.52,co='White'} iNew{'Weld',v,Part0=blade,Part1=v,C0=cn(0,i+0.1,0)*ca(40,0,0)} iNew{'BlockMesh',v,Scale=v3(0.42,0.3,1)}
  264. end
  265.  
  266. blade.Touched:connect(function(hit)
  267. if debounce == false then
  268. debounce = true
  269. isPlayer = hit.Parent:FindFirstChild("Humanoid")
  270. if isPlayer then
  271. isPlayer:TakeDamage(13333333333333337)
  272. wait(0.5)
  273. end
  274. debounce = false
  275. end
  276. end)
  277.  
  278. end
  279. --Middle
  280. local v=iPart{Gear,0.2,0.2,0.2} iNew{'Weld',v,Part0=Torso,Part1=v,C0=cn(0,-1,1.1)*ca(90,0,0)} iNew{'SpecialMesh',v,Scale=v3(0.4,1.6,0.16),MeshId=as.cone}
  281. Gas=iNew{'Smoke',v,Opacity=0.4,RiseVelocity=25,Size=3,Enabled=false}
  282. local v=iPart{Gear,0.6,0.3,0.6} iNew{'Weld',v,Part0=Torso,Part1=v,C0=cn(0,-0.85,0.8)} iNew{'CylinderMesh',v}
  283. local v=iPart{Gear,0.3,0.3,0.35,co='Dark stone grey',type='WedgePart'} iNew{'Weld',v,Part0=Torso,Part1=v,C0=cn(0,-0.9,1.2)*ca(0,180,0)}
  284. local belt=iPart{Gear,2.01,0.3,1.01,co='Black'} iNew{'Weld',belt,Part0=Torso,Part1=belt,C0=cn(0,-0.7,0)}
  285. for x=-1,1,2 do --continuesides
  286. local of=iPart{Gear,0.3,1.2,0.3} iNew{'Weld',belt,Part0=belt,Part1=of,C0=cn(1.15*x,-0.1,0)*ca(-80,0,0)}
  287. local v=iPart{Gear,0.3,1.2,0.3} iNew{'Weld',v,Part0=of,Part1=v,C0=cn(0,0,0.15)} iNew{'CylinderMesh',v}
  288. local v=iPart{Gear,0.2,0.2,0.2,co='Really black'} iNew{'Weld',v,Part0=of,Part1=v,C0=cn(0,0.51,0.15)} iNew{'CylinderMesh',v}
  289. Gt[x].grap=v
  290.  
  291. end
  292.  
  293. for i,v in pairs(Torso:children()) do
  294. if v:IsA'Sound' then v:Remove() end
  295. end
  296. for i,n in pairs(so) do
  297. if as[n] then
  298. local v=iNew{'Sound',Torso,Volume=0.5,Pitch=1,Looped=false,Name=n,SoundId=as[n]}
  299. so[n]=v
  300. end
  301. end
  302.  
  303.  
  304. key={}
  305.  
  306. print(#Gear:children())
  307. Root.C0=cn(0,0,0)*ca(0,0,0)
  308. Root.C1=cn(0,0,0)*ca(0,0,0)
  309.  
  310. WalkAnim=0
  311. Walking=false
  312. WalkM=8
  313. Humanoid.Running:connect(function(Walk)
  314. Walking=Walk>20 and true or false
  315. end)
  316.  
  317. --LL.Touched:connect(function() if Torso.Velocity.magnitude>30 then Torso.Velocity=nov3 end end)
  318. --RL.Touched:connect(function() if Torso.Velocity.magnitude>30 then Torso.Velocity=nov3 end end)
  319. _G.Torso=Torso
  320.  
  321. wait()
  322. Arms(true)
  323. Legs()
  324. GetCurrent=function()
  325. cLA,cLA2=GetWeld(LAW,0)
  326. cRA,cRA2=GetWeld(RAW,0)
  327. cLL,cLL2=GetWeld(LLW,0)
  328. cRL,cRL2=GetWeld(RLW,0)
  329. cRO,cRO2=GetWeld(Root,0)
  330. cNE,cNE2=GetWeld(Neck,0)
  331. end
  332. ReturnAnim=function()
  333. GetCurrent()
  334. local ogt={[-1]={},[1]={}}
  335. for x=-1,1,2 do ogt[x][1],ogt[x][2]=GetWeld(Gt[x].h,0) end
  336. local walk=WalkAnim~=0
  337. for x=1,ASpeed do
  338. SetWeld(LAW,0,x,ASpeed,cLA,cLA2,OrigLA,walk and Walk1*WAPerc or OrigLA2,1)
  339. SetWeld(RAW,0,x,ASpeed,cRA,cRA2,OrigRA,walk and Walk2*WAPerc or OrigRA2,1)
  340. if Hooks[-1] or Hooks[1] then else
  341. SetWeld(LLW,0,x,ASpeed,cLL,cLL2,OrigLL,OrigLL2,1)
  342. SetWeld(RLW,0,x,ASpeed,cRL,cRL2,OrigRL,OrigRL2,1) end
  343. SetWeld(Root,0,x,ASpeed,cRO,cRO2,OrigRO,walk and Walk3*WAPerc or OrigRO2,1)
  344. SetWeld(Neck,0,x,ASpeed,cNE,cNE2,OrigNE,walk and Walk4*WAPerc or OrigNE2,1)
  345. for h=-1,1,2 do SetWeld(Gt[h].h,0,x,ASpeed,ogt[h][1],ogt[h][2],v3(0,-1,0),v3(-90,0,0),1) end
  346. wait()
  347. end
  348. end
  349.  
  350. SpecialAttack=function(TYPE)
  351. if TYPE==1 then
  352. GetCurrent()
  353. if Controls.Parent then Humanoid.Jump=true end
  354. local legwas=LLW.Part1==LL and true or false
  355. Legs(true)
  356. for x=1,ASpeed/2 do
  357. SetWeld(LAW,0,x,ASpeed/2,cLA,cLA2,OrigLA+v3(0,0.8,-0.2),v3(190,0, 10,1),1)
  358. SetWeld(RAW,0,x,ASpeed/2,cRA,cRA2,OrigRA+v3(0,0.8,-0.2),v3(190,0,-10,1),1)
  359. for h=-1,1,2 do SetWeld(Gt[h].h,0,x,ASpeed/2,v3(0,-1,0),v3(-90,0,0),v3(0,-1.25,0),v3(-135,0,0),1) end
  360. SetWeld(LLW,0,x,ASpeed/2,cLL,cLL2,OrigLL+v3(0,0.6,-0.7),v3(-30,0,-10,1),1)
  361. SetWeld(RLW,0,x,ASpeed/2,cRL,cRL2,OrigRL+v3(0,0.6,-0.7),v3(-30,0,10,1),1)
  362. SetWeld(Root,0,x,ASpeed/2,cRO,cRO2,OrigRO,v3(90,0,0,1),1)
  363. wait()
  364. end
  365. local spin,ii=360,3
  366. for i=0,spin,spin/12 do
  367. ii=ii+1 if ii%4==0 then so.Slash:Play() end
  368. Root.C0=ca(90-i,0,0)
  369. wait()
  370. end
  371. ClearWeld(Root)
  372. ReturnAnim() Legs(legwas)
  373. elseif TYPE==2 then
  374. end
  375. end
  376.  
  377. pcall(function() Torso.BG:Remove() Torso.RP:Remove() end)
  378. BG=iNew{'BodyGyro',Torso,Name='BG',maxTorque=nov3}
  379. BP=iNew{'RocketPropulsion',Torso,Name='RP'}
  380. local rocketprop=iPart{Gear,1,1,1,an=true,cf=cn(0,-100,0),tr=1}
  381. rocketprop.CanCollide=false
  382. BP.Target=rocketprop
  383. BP.ThrustP=5
  384. BP.MaxTorque=nov3 --v3(400000,400000,0)
  385. BP.MaxThrust=4000
  386. BP.MaxSpeed=30
  387. --BP.CartoonFactor=1
  388. BP.TurnP,BP.TurnD=0,0
  389. BP.ThrustD=0.03 --BP.ThrustD*30
  390. BP.ThrustP=BP.ThrustP/1.5
  391. BP.TargetRadius=0
  392.  
  393. pcall(function() workspace.Camera.Inv:Remove() end)
  394. Inv=iNew{'Model',workspace.Camera,Name='Inv'}
  395.  
  396. Hooks={}
  397. HookP={[-1]={},[1]={}}
  398. Hit=nil
  399. Grapple={}
  400. key={}
  401. mouse=Player:GetMouse()
  402. mouse.KeyDown:connect(function(k)
  403. coroutine.resume(coroutine.create(function()
  404. key[k]=true
  405. local gp={['q']=-1,['e']=1}
  406. if k=='2' then
  407. elseif (k==' ') and Controls.Parent==nil then
  408. if WallWalk then WallWalk=false return end
  409. WallWalk=false
  410. Controls.Parent=game:service'ControllerService'
  411. Humanoid.Sit=false
  412. Legs(false)
  413. OrigRO=v3(0,0,0)
  414. Root.C0=cn(OrigRO)
  415. ---
  416. elseif k=='0' and Controls.Parent==nil and not Gas.Enabled and not WallWalking then
  417. local bv=iNew{'BodyVelocity',Torso}
  418. Gas.Enabled=true
  419. repeat
  420. local ss=(Hooks[1] or Hooks[-1]) and 5000 or 2000
  421. bv.maxForce=v3(ss,2000,ss)
  422. bv.velocity=Torso.CFrame.lookVector*125
  423. wait()
  424. until not key[k] or Controls.Parent
  425. Gas.Enabled=false
  426. bv:Remove()
  427. elseif (k=='q' or k=='e') and not Grapple[k] then
  428. so.Slash:Play()
  429. Grapple[k]=true
  430. local x=gp[k]
  431. local ob1=Gt[x].grap
  432. local speed=26
  433. local hook=iPart{Gear,1,1,1,co='Black',an=true,cf=cn(ob1.Position,mouse.Hit.p)*ca(-90,0,0)} iNew{'SpecialMesh',hook,Scale=v3(0.4,2,0.4),MeshId=as.cone}
  434. local rope=iPart{Gear,1,1,1,co='Black',an=true,cf=cf} local ropem=iNew{'CylinderMesh',rope}
  435. hook.CanCollide=false
  436. rope.CanCollide=false
  437. local con=game:GetService'RunService'.RenderStepped:connect(function()
  438. local mag=(ob1.Position-hook.Position).magnitude
  439. ropem.Scale=v3(0.2,mag,0.2)
  440. rope.CFrame=cn(ob1.Position,hook.Position)*cn(0,0,-mag/2)*ca(90,0,0)
  441. if not rope or not rope.Parent then con:disconnect() end
  442. end)
  443. for i=1,200 do
  444. if not key[k] then break end
  445. local hit,pos=ray(hook.Position,hook.Position-hook.CFrame*cn(0,-speed,0).p,Char,speed+1)
  446. if not hit then
  447. hook.CFrame=hook.CFrame*cn(0,speed,0)*ca(-0.1,0,0)
  448. else
  449. hook.CFrame=hook.CFrame*cn(0,(hook.Position-pos).magnitude,0)
  450. end
  451. local mag=(ob1.Position-hook.Position).magnitude
  452. if hit and hit.Transparency<1 and hit.CanCollide then
  453. Hit=hit
  454. HookP[x]={Hit,Hit.CFrame:toObjectSpace(hook.CFrame),pos}
  455. so.Block:Play()
  456. Hooks[x]=hook
  457. Humanoid.Sit=true
  458. Legs(true)
  459. OrigRO=v3(0,1,0)
  460. Root.C0=cn(OrigRO)
  461. Controls.Parent=nil
  462. break
  463. end
  464. wait()
  465. end
  466. ---
  467. if Hit then
  468. --hook.Reflectance=0.1
  469. end
  470. repeat wait()
  471. until not key[k] or Controls.Parent --relase
  472. Hooks[x]=nil
  473. hook:Remove()
  474. rope:Remove()
  475. Grapple[k]=false
  476. elseif k=='f' and LegAnim=='None' and TorsoAnim=='None' and LegAnim=='None' then
  477. ArmAnim,LegAnim,TorsoAnim='','',''
  478. SpecialAttack(1)
  479. ArmAnim,LegAnim,TorsoAnim='None','None','None'
  480. elseif k=='p' then
  481. local mpos=mouse.Hit.p
  482. local wall=iPart{Char,1,1,1,an=true}
  483. repeat
  484. local mag=(mpos-mouse.Hit.p).magnitude
  485. wall.Size=v3(not key.l and 4 or 0.5,200,mag)
  486. wall.CFrame=cn(mpos,mouse.Hit.p)*cn(0,100,-mag/2)
  487. wait() until not key.p
  488. local cf=wall.CFrame wall.Parent=workspace wall.CFrame=cf wall.CanCollide=true
  489. elseif k=='l' then
  490. wotm8=wotm8 and wotm8+150 or 75
  491. iPart{workspace,120,30,120,an=true,cf=cn(0,180,wotm8+100)*ca(0,mran(-40,40),0)}.CanCollide=true
  492. iPart{workspace,146,4,120,an=true,cf=cn(0,1,wotm8+100)}.CanCollide=true
  493. --elseif k=='w' and (not Hooks[-1] and not Hooks[1]) then
  494. --Humanoid.PlatformStand=false
  495. end
  496. end)) end)
  497. mouse.KeyUp:connect(function(k)
  498. coroutine.resume(coroutine.create(function()
  499. key[k]=false
  500.  
  501. end)) end)
  502. mouse.Button1Down:connect(function()
  503. Button1=true
  504. if ArmAnim=='None' then
  505. ArmAnim,TorsoAnim='Attack','Attack'
  506. thesteerclick=thesteerclick==1 and -1 or 1
  507. local y=thesteerclick
  508. GetCurrent()
  509. local ASpeed=ASpeed/1.5
  510. for x=1,ASpeed do
  511. SetWeld(LAW,0,x,ASpeed,cLA,cLA2,OrigLA,v3(0,-135*y,(-90-LookAngle/2)*y),1)
  512. SetWeld(RAW,0,x,ASpeed,cRA,cRA2,OrigRA,v3(0,-135*y,(-90-LookAngle/2)*y),1)
  513. SetWeld(Root,0,x,ASpeed,cRO,cRO2,OrigRO,v3(0,-90*y,0),1)
  514. SetWeld(Neck,0,x,ASpeed,cNE,cNE2,OrigNE,v3(0,90*y/3,0),1)
  515. for h=-1,1,2 do SetWeld(Gt[h].h,0,x,ASpeed,v3(0,-1,0),v3(-90,0,0),v3(0,-1.25,0),v3(-180,0,0),1) end
  516. wait()
  517. end
  518. GetCurrent()
  519. so.Slash:Play()
  520. for x=1,ASpeed do
  521. SetWeld(LAW,0,x,ASpeed,cLA,cLA2,OrigLA+v3(0,0,-0.8),v3(0,-30*y,(-90-LookAngle/2)*y),1)
  522. SetWeld(RAW,0,x,ASpeed,cRA,cRA2,OrigRA+v3(0,0,-0.8),v3(0,-30*y,(-90-LookAngle/2)*y),1)
  523. SetWeld(Root,0,x,ASpeed,cRO,cRO2,OrigRO,v3(0,80*y,0),1)
  524. SetWeld(Neck,0,x,ASpeed,cNE,cNE2,OrigNE,v3(0,-80*y/3,0),1)
  525. wait()
  526. end
  527. ReturnAnim()
  528. ArmAnim,TorsoAnim='None','None'
  529. end
  530. end)
  531. mouse.Button1Up:connect(function()
  532. Button1=false
  533.  
  534. end)
  535.  
  536.  
  537. LegAnim='None'
  538. ArmAnim='None'
  539. TorsoAnim='None'
  540. WalkSpeed={1,1,1,1,1,1,1,1}
  541. ASpeed=8
  542. OrigLA=v3(-1.5,0.5,0) OrigLA2=v3(5,0,-30)
  543. OrigRA=v3( 1.5,0.5,0) OrigRA2=v3(5,0,30)
  544. OrigLL=v3(-0.5,-1,0) OrigLL2=v3(0,0,0)
  545. OrigRL=v3( 0.5,-1,0) OrigRL2=v3(0,0,0)
  546. OrigRO=v3(0,0,0) OrigRO2=v3(0,0,0)
  547. OrigNE=v3(0,1.5,0) OrigNE2=v3(0,0,0)
  548. -----
  549. --c/local x,y,z=workspace.RobroxMasterDX.Torso["Left Hip"].C0:toEulerAnglesXYZ() print(math.deg(y))
  550. rocketfired=false
  551. local spi,spix,span=0,0.5,1
  552. while Gear.Parent do
  553. local headpos,mousepos=Head.Position,mouse.Hit.p
  554. XAngle=math.floor(cn(headpos,mousepos).lookVector.y*180)
  555. LookAngle=XAngle<-20 and -20 or (XAngle>45 and 45 or XAngle)
  556. WalkAnim=WalkAnim+(ArmAnim=='None' and (Walking and 1 or -1) or 0)
  557. if WalkAnim<0 then WalkAnim=0 elseif WalkAnim>WalkM then WalkAnim=WalkM end
  558. WAPerc=WalkAnim/WalkM
  559. spi=spi+spix
  560. local adj=spi*8
  561. if math.abs(spi)>=span then spix=spix*-1 end
  562. Walk1,Walk2,Walk3,Walk4=v3(0,90,-90+25+adj),v3(0,-90,90-25-adj),v3(-18-adj,0,spi*1.5),v3(18+adj,0,-spi*1.5)
  563. if ArmAnim=='None' then
  564. SetWeld(LAW,0,WalkAnim,WalkM,OrigLA,OrigLA2,OrigLA,Walk1,1)
  565. SetWeld(RAW,0,WalkAnim,WalkM,OrigRA,OrigRA2,OrigRA,Walk2,1)
  566. end
  567. if TorsoAnim=='None' then
  568. SetWeld(Root,0,WalkAnim,WalkM,OrigRO,OrigRO2,OrigRO,Walk3,1)
  569. SetWeld(Neck,0,WalkAnim,WalkM,OrigNE,OrigNE2,OrigNE,Walk4,1)
  570. end
  571. local ws=28 for i=1,#WalkSpeed do ws=ws*WalkSpeed[i] end Humanoid.WalkSpeed=ws
  572. --DoLoop Package
  573. for i,v in pairs(LoopFunctions) do
  574. v[2]=v[2]+1
  575. v[3](v[2]/v[1])
  576. if v[1]<=v[2] then LoopFunctions[i]=nil end
  577. end
  578. for x=-1,1,2 do
  579. if Hooks[x] then Hooks[x].CFrame=HookP[x][1].CFrame*HookP[x][2] end
  580. end
  581. if Hooks[-1] or Hooks[1] then
  582. local hook=(Hooks[1] and Hooks[-1]) and 0 or Hooks[1] or Hooks[-1]
  583. HookPos=hook==0 and Hooks[1].Position+(Hooks[-1].Position-Hooks[1].Position)/2 or hook.CFrame.p
  584. BP.MaxTorque=v3(0,0,0) BP.MaxSpeed=200 BP.MaxThrust=10*10000
  585. rocketprop.CFrame=cn(HookPos+v3(0,4,0))
  586. if not rocketfired then BP:Fire() rocketfired=true end
  587. else BP.MaxTorque=nov3
  588. if rocketfired then BP:Abort() rocketfired=false end
  589. end
  590. if Humanoid.Sit and not WallWalking then
  591. SetWeld(LLW,0,1,1,OrigLL,OrigLL2,OrigLL+v3(0,0.6,-0.7),v3(-30,0,-14,1),1)
  592. SetWeld(RLW,0,1,1,OrigRL,OrigRL2,OrigRL+v3(0,0.6,-0.7),v3(-30,0, 14,1),1)
  593. if not WallWalking then BG.cframe=cn(Torso.Position,mouse.Hit.p)*cn(0,0,-1) end --TweenCF(3,9,bg.CFrame,cn(Torso.Position,mouse.Hit.p))*cn(0,0,-1)
  594. BG.maxTorque=maxv3 --workspace.Camera.CoordinateFrame*cn(0,0,-1000).p
  595. else
  596. if not WallWalking then BG.maxTorque=nov3 end
  597. end
  598. wait()
  599. end --TweenV3(0.5,1,Hooks[1].Position,Hooks[-1].Position)
Add Comment
Please, Sign In to add comment