Advertisement
Guest User

Untitled

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