Advertisement
Guest User

Untitled

a guest
Jul 21st, 2018
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 61.99 KB | None | 0 0
  1. --[[
  2. TODO:
  3. GUI
  4. MAKE LESS LAGGY
  5. REMOVE UNNEEDED STUFF
  6. IF CLOSE TO TARGET GRAPPLE PLACE THEN LATCH ONTO
  7. MAKE TITANS, TITAN SHIFT, AOT MAP
  8. VELOCITY CHECKS
  9. ]]
  10.  
  11. --- shortcuts
  12. v3 = Vector3.new
  13. cn = CFrame.new
  14. ca2 = CFrame.Angles
  15. mceil = math.ceil mc = mceil
  16. mran = math.random rn=mran
  17. mrad = math.rad rd=mrad
  18. mdeg = math.deg dg=mdeg
  19. mabs = math.abs abs=mabs
  20. ud = UDim2.new
  21. ca = function(x,y,z) return ca2(mrad(x),mrad(y),mrad(z)) end
  22. mran2 = function(a,b) return mran(a*1000,b*1000)/1000 end
  23. bn = BrickColor.new bc=bn
  24. c3 = Color3.new
  25. deb = game:GetService("Debris")
  26. -----
  27. Player = game:service("Players").LocalPlayer
  28. Char = Player.Character
  29. Torso = Char.Torso
  30. Head = Char.Head
  31. Humanoid = Char.Humanoid
  32. RootPart = Char.HumanoidRootPart
  33. Root = RootPart.RootJoint
  34.  
  35. LA=Char["Left Arm"]
  36. RA=Char["Right Arm"]
  37. LL=Char["Left Leg"]
  38. RL=Char["Right Leg"]
  39. LAM=Torso["Left Shoulder"]
  40. RAM=Torso["Right Shoulder"]
  41. LLM=Torso["Left Hip"]
  42. RLM=Torso["Right Hip"]
  43. Neck=Torso.Neck
  44. Neck.C0=cn(0,1.5,0)
  45. Neck.C1=cn(0,0,0)
  46.  
  47. name="3DMG"
  48.  
  49. pcall(function() Char["Pack"]:Destroy() end)
  50. pcall(function() Player.PlayerGui[name]:Destroy() end)
  51. pcall(function() Char[name]:Destroy() end)
  52. pcall(function() Char.Block:Destroy() end)
  53. pcall(function() Char.Animate:Destroy() end)
  54.  
  55. script.Name = name
  56.  
  57. as = {}
  58. so = {"Block","QuickSlash","Slash1","Slash2","Hit","Shoot","Footstep1","Footstep2","Footstep3","Disconnect"}
  59. as.Cone = "1033714"
  60. as.Bevel = "rbxasset://fonts/leftarm.mesh"
  61. as.Block = "rbxasset://sounds\\metal.ogg"
  62. as.QuickSlash = "161006221" -- quick succession
  63. as.Slash1 = "161006195" -- high pitched
  64. as.Slash2 = "161006212" -- low pitched
  65. as.Hit = "10209583"
  66. as.Shoot = "130849509"
  67. as.Footstep1 = "142548001"
  68. as.Footstep2 = "142548009"
  69. as.Footstep3 = "142548015"
  70. as.Disconnect = "10209268"
  71. as.Draw = "130785405"
  72. as.Somersault = "161006221"
  73. as.HealthBar = "35238053" -- decal
  74. as.Wedge = "146643893" -- decal
  75.  
  76. for i,v in pairs(as) do
  77. if type(tonumber(v:sub(1,3)))=="number" then
  78. as[i]="http://www.roblox.com/asset/?id="..v
  79. game:GetService("ContentProvider"):Preload(as[i])
  80. end
  81. end
  82.  
  83. Slashes = {as.Slash1,as.Slash2}
  84.  
  85.  
  86. iNew=function(tab)
  87. local v=Instance.new(tab[1])
  88. for Ind,Val in pairs(tab) do
  89. if Ind~=1 and Ind~=2 then
  90. v[Ind] = Val
  91. end
  92. end
  93. v.Parent=tab[2]==0 and LastMade or tab[2]
  94. LastMade=v
  95. return v
  96. end
  97.  
  98. iPart=function(tab)
  99. local v=Instance.new(tab.type or "Part")
  100. if tab.type~="CornerWedgePart" then v.formFactor="Custom" end
  101. v.CanCollide=false
  102. v.TopSurface=10 v.BottomSurface=10 v.RightSurface=10 v.LeftSurface=10 v.FrontSurface=10 v.BackSurface=10
  103. v.Size=v3(tab[2],tab[3],tab[4])
  104. --v.Material="SmoothPlastic"
  105. if tab.co then v.BrickColor=bn(tab.co) end
  106. if tab.tr then v.Transparency=tab.tr end
  107. if tab.rf then v.Reflectance=tab.rf end
  108. if tab.cf then v.CFrame=tab.cf end
  109. if tab.an then v.Anchored=tab.an end
  110. if tab.mt then v.Material=tab.mt end
  111. if tab.ca then v.CanCollide=tab.ca end
  112. v.Parent=tab[1]
  113. LastMade=v
  114. return v
  115. end
  116.  
  117. function Raycast(Pos,Dir,Dist,tab)
  118. return workspace:FindPartOnRay(Ray.new(Pos, Dir.unit *Dist),tab)
  119. end
  120.  
  121. Block=iNew{"NumberValue",Char,Name="Block",Value=0}
  122.  
  123. Root.C0=cn(0,0,0)
  124. Root.C1=cn(0,0,0)
  125.  
  126. for _,mesh in pairs(Char:GetChildren()) do if mesh:IsA("CharacterMesh") then mesh:Destroy() end end
  127. for _,force in pairs(Torso:GetChildren()) do if force:IsA("BodyForce") or force:IsA("BodyGyro") or force:IsA("RocketPropulsion") then force:Destroy() end end
  128.  
  129. pcall(function() Torso.LAW:Remove() Torso.RAW:Remove() Torso.LLW:Remove() Torso.RLW:Remove() end)
  130. LAW=iNew{"Weld",Torso,Name="LAW",Part0=Torso,C0=cn(-1.5,0.5,0),C1=cn(0,0.5,0)}
  131. RAW=iNew{"Weld",Torso,Name="RAW",Part0=Torso,C0=cn( 1.5,0.5,0),C1=cn(0,0.5,0)}
  132. LLW=iNew{"Weld",Torso,Name="LLW",Part0=Torso,C0=cn(-0.5, -1,0),C1=cn(0, 1,0)}
  133. RLW=iNew{"Weld",Torso,Name="RLW",Part0=Torso,C0=cn( 0.5, -1,0),C1=cn(0, 1,0)}
  134.  
  135. function Arms(on)
  136. LAM.Parent=Torso LAM.Part0=Torso
  137. RAM.Parent=Torso RAM.Part0=Torso
  138. LAM.Part1=on and nil or LA
  139. RAM.Part1=on and nil or RA
  140. LAW.Part1=on and LA or nil
  141. RAW.Part1=on and RA or nil
  142. end
  143.  
  144. function Legs(on)
  145. LLM.Parent=Torso LLM.Part0=Torso
  146. RLM.Parent=Torso RLM.Part0=Torso
  147. LLM.Part1=on and nil or LL
  148. RLM.Part1=on and nil or RL
  149. LLW.Part1=on and LL or nil
  150. RLW.Part1=on and RL or nil
  151. end
  152.  
  153. function GetWeld(weld)
  154. if not weld:FindFirstChild("Angle") then
  155. local a = Instance.new("Vector3Value", weld)
  156. a.Name = "Angle"
  157. local x,y,z=weld.C0:toEulerAnglesXYZ()
  158. a.Value=v3(mdeg(x),mdeg(y),mdeg(z))
  159. end
  160. return weld.C0.p,weld.Angle.Value
  161. end
  162.  
  163. function ClearWeld(weld)
  164. if weld:FindFirstChild"Angle" then
  165. weld.Angle:Remove()
  166. end
  167. end
  168.  
  169. function SetWeld(weld,CC,i, loops, origpos,origangle, nextpos,nextangle,smooth)
  170. local CO="C"..CC
  171. smooth = smooth or 1
  172. if not weld:FindFirstChild("Angle") then
  173. local a = Instance.new("Vector3Value", weld)
  174. a.Name = "Angle"
  175. local x,y,z=weld.C0:toEulerAnglesXYZ()
  176. a.Value=v3(mdeg(x),mdeg(y),mdeg(z))
  177. end
  178.  
  179. local perc
  180. if smooth == 1 then
  181. perc = math.sin((math.pi/2)/loops*i)
  182. else
  183. perc = i/loops
  184. end
  185.  
  186. local tox,toy,toz = 0,0,0
  187. if origangle.x > nextangle.x then
  188. tox = -mabs(origangle.x - nextangle.x) *perc
  189. else
  190. tox = mabs(origangle.x - nextangle.x) *perc
  191. end
  192. if origangle.y > nextangle.y then
  193. toy = -mabs(origangle.y - nextangle.y) *perc
  194. else
  195. toy = mabs(origangle.y - nextangle.y) *perc
  196. end
  197. if origangle.z > nextangle.z then
  198. toz = -mabs(origangle.z - nextangle.z) *perc
  199. else
  200. toz = mabs(origangle.z - nextangle.z) *perc
  201. end
  202.  
  203. local tox2,toy2,toz2 = 0,0,0
  204. if origpos.x > nextpos.x then
  205. tox2 = -mabs(origpos.x - nextpos.x) *perc
  206. else
  207. tox2 = mabs(origpos.x - nextpos.x) *perc
  208. end
  209. if origpos.y > nextpos.y then
  210. toy2 = -mabs(origpos.y - nextpos.y) *perc
  211. else
  212. toy2 = mabs(origpos.y - nextpos.y) *perc
  213. end
  214. if origpos.z > nextpos.z then
  215. toz2 = -mabs(origpos.z - nextpos.z) *perc
  216. else
  217. toz2 = mabs(origpos.z - nextpos.z) *perc
  218. end
  219. weld.Angle.Value = v3(origangle.x + tox,origangle.y + toy,origangle.z + toz)
  220. weld[CO] = cn(origpos.x + tox2,origpos.y + toy2,origpos.z + toz2)*ca(origangle.x + tox,origangle.y + toy,origangle.z + toz)
  221. end
  222.  
  223.  
  224. function PlaySound(sound,pitch,volume,parent)
  225. local newSound = iNew{"Sound",parent or Torso,Pitch=pitch,Volume=volume,Name=sound,SoundId=sound}
  226. newSound:Play()
  227. deb:AddItem(newSound,6)
  228. return newSound
  229. end
  230.  
  231. function MeshEffect(par,cf,x,y,z,inc,col,sha,adj)
  232. local adj = adj or cn(0,0,0)
  233. local mp=iPart{par,1,1,1,co=col,tr=0.3,ca=false,an=true} mp.CFrame=cf mp.Name="unray"
  234. local ms
  235. if sha:sub(1,4)=="http" then
  236. ms=iNew{"SpecialMesh",mp,MeshId=sha}
  237. elseif sha=="Block" then
  238. ms=iNew{"BlockMesh",mp}
  239. elseif sha=="Cylinder" then
  240. ms=iNew{"CylinderMesh",mp}
  241. elseif sha=="Head" or sha=="Sphere" then
  242. ms=iNew{"SpecialMesh",mp,MeshType=sha}
  243. end
  244. deb:AddItem(mp,0.7)
  245. Spawn(function()
  246. for i=0,1,inc do
  247. mp.Transparency=0.3+(1*i)
  248. mp.CFrame=mp.CFrame*adj
  249. ms.Scale=v3(x,y,z)*(0.3+(1*i))
  250. if i>=1 or mp.Transparency >= 1 then mp:Destroy() end
  251. wait(0)
  252. end
  253. end)
  254. end
  255.  
  256.  
  257. Dmg=false
  258. Dmgv={12,18}
  259. HitDebounce={}
  260. Debounce = 0.4
  261. CritChance = 5
  262. Sharpness = 1
  263. Gas = 1
  264. Damage=function(Hum,Mult)
  265. if not Hum.Parent:findFirstChild("Torso") then return end
  266. local HName = Hum.Parent.Name
  267. if HitDebounce[HName] and HitDebounce[HName]>tick() then return end
  268. HitDebounce[HName] = tick()+Debounce
  269. local Dealt = mceil(((mran(Dmgv[1],Dmgv[2])+(Torso.Velocity.magnitude/4))*Sharpness)*Mult)
  270. local col = ""
  271.  
  272. local Crit = false
  273. local RNG = mran(1,100)
  274. if RNG<=CritChance then Crit=true Dealt=Dealt*1.75 end
  275.  
  276. if Hum.Parent:findFirstChild("Block") and Hum.Parent.Block.Value>0 then
  277. Hum.Parent.Block.Value=Hum.Parent.Block.Value-1
  278. col="Bright blue"
  279. PlaySound(as.Block,1,1,Torso)
  280. else
  281.  
  282. Hum:TakeDamage(Dealt)
  283. col=not Crit and "Bright red" or "Really red"
  284. PlaySound(as.Hit,1,1,Torso)
  285. end
  286. Sharpness = Sharpness - 0.02
  287.  
  288. local dmgTxt = iNew{"TextLabel",Gui,Name="dmgText",BackgroundTransparency=1,TextStrokeTransparency=0,Rotation=mran(-35,35)}
  289.  
  290. if col == "Bright blue" then
  291. dmgTxt.Text = "Block!"
  292. elseif col == "Bright red" then
  293. dmgTxt.Text = Dealt.."!"
  294. elseif col == "Really red" then
  295. dmgTxt.Text = Dealt.."!!!"
  296. end
  297. dmgTxt.TextColor3 = bn(col).Color
  298. dmgTxt.TextStrokeColor3 = col == "Really red" and bn("Really red").Color or bn("White").Color
  299. dmgTxt.FontSize = col == "Bright blue" and "Size24" or col == "Bright red" and "Size36" or col == "Really red" and "Size48"
  300. dmgTxt.Position = ud(mran(4,6)/10,0,mran(40,60)/100,0)
  301. dmgTxt:TweenPosition(ud(dmgTxt.Position.X.Scale,0,dmgTxt.Position.Y.Scale,-250),"Out","Quad",1.5,false)
  302. deb:AddItem(dmgTxt,1.5)
  303. end
  304.  
  305.  
  306.  
  307. -- weapon
  308. Pack = iNew{"Model",Char,Name="Pack"}
  309. p=Pack
  310.  
  311.  
  312. -- blade func
  313. function newBlade(part0,c0,wName,half)
  314. local Blade = iPart{p,0.2,3.3,0.2,co="Dark stone grey"} Blade.Name = "Blade"..wName
  315. local wBlade = iNew{"Weld",p,Part0=part0,Part1=Blade,C0=c0,Name = wName}
  316. iNew{"BlockMesh",Blade,Scale=v3(0.25,1,1)}
  317.  
  318. local bpx = iPart{p,0.2,3.5,0.2} bpx.Name = "Blade"..wName
  319. iNew{"Weld",p,Part0=Blade,Part1=bpx,C0=cn(0,0.1,-0.15)}
  320. iNew{"BlockMesh",bpx,Scale=v3(0.25,1,0.5)}
  321.  
  322. if not half then
  323. local bp = iPart{p,0.2,0.2,0.2,co="Dark stone grey"} bp.Name = "Blade"..wName
  324. iNew{"Weld",p,Part0=Blade,Part1=bp,C0=cn(0,3.5/2,0)*ca(0,180,0)}
  325. iNew{"SpecialMesh",bp,MeshType="Wedge",Scale=v3(0.25,1,1)}
  326.  
  327. local tp = iPart{p,0.2,0.2,0.2} bp.Name = "Blade"..wName
  328. iNew{"Weld",p,Part0=bpx,Part1=tp,C0=cn(0,3.6/2,0)*ca(0,180,0)}
  329. iNew{"SpecialMesh",tp,MeshType="Wedge",Scale=v3(0.25,0.5,0.5)}
  330.  
  331. for i=1,5 do
  332. local bp = iPart{p,0.2,1,0.45,co="Really black"} bp.Name = "Blade"..wName
  333. iNew{"Weld",p,Part0=Blade,Part1=bp,C0=cn(0,-3.7/2+0.6*i,-0.05)*ca(45,0,0)}
  334. iNew{"BlockMesh",bp,Scale=v3(0.3,0.02,1)}
  335. end
  336. end
  337.  
  338. for i=-1,1,2 do
  339. local ba = iPart{p,0.2,0.2,0.2,co="Dark stone grey"} ba.Name="Blade"..wName
  340. iNew{"Weld",p,Part0=Blade,Part1=ba,C0=cn(0,-3.5/2,-0.05-0.075*i)}
  341. iNew{"BlockMesh",ba,Scale=v3(0.25,1,0.25)}
  342. end
  343. return Blade,wBlade,tp
  344. end
  345.  
  346. --belt
  347. belt = iPart{p,2.1,0.2,1.05,co="Black"}
  348. iNew{"Weld",p,Part0=Torso,Part1=belt,C0=cn(0,-0.65,0)}
  349. --[[bp = iPart{p,0.4,0.2,1,co="Dark stone grey"} -- idk why i do this with the unneccessary details :Q
  350. iNew{"Weld",p,Part0=belt,Part1=bp,C0=cn(0,0,-1.05/2)}
  351. iNew{"BlockMesh",bp,Scale=v3(1,1,0.01)}
  352. bp = iPart{p,1,1,1,co="Black"}
  353. iNew{"Weld",p,Part0=belt,Part1=bp,C0=cn(0,0,-1.06/2)}
  354. iNew{"BlockMesh",bp,Scale=v3(0.35,0.15,0.01)}
  355. bp = iPart{p,0.2,0.2,1,co="Dark stone grey"}
  356. iNew{"Weld",p,Part0=belt,Part1=bp,C0=cn(0.425,0,-1.05/2)}
  357. iNew{"BlockMesh",bp,Scale=v3(1,1,0.01)}
  358. bp = iPart{p,1,1,1,co="Black"}
  359. iNew{"Weld",p,Part0=belt,Part1=bp,C0=cn(0.425,0,-1.06/2)}
  360. iNew{"BlockMesh",bp,Scale=v3(0.15,0.15,0.01)}
  361. bp = iPart{p,0.2,0.2,1,co="Dark stone grey"}
  362. iNew{"Weld",p,Part0=belt,Part1=bp,C0=cn(-0.425,0,-1.05/2)}
  363. iNew{"BlockMesh",bp,Scale=v3(1,1,0.01)}
  364. bp = iPart{p,1,1,1,co="Black"}
  365. iNew{"Weld",p,Part0=belt,Part1=bp,C0=cn(-0.425,0,-1.06/2)}
  366. iNew{"BlockMesh",bp,Scale=v3(0.15,0.15,0.01)}]]
  367.  
  368. qBarrel = iPart{p,0.3,1.5,0.3}
  369. iNew{"Weld",p,Part0=belt,Part1=qBarrel,C0=cn(-1.15,0.1,0)*ca(100,0,0)}
  370. iNew{"CylinderMesh",qBarrel}
  371. bb = iPart{p,0.3,1.5,0.3}
  372. iNew{"Weld",p,Part0=qBarrel,Part1=bb,C0=cn(0,0,0.15)}
  373. qbb = iPart{p,0.2,1,0.2,co="Really black"}
  374. iNew{"Weld",p,Part0=qBarrel,Part1=qbb,C0=cn(0,-0.75,0)}
  375. iNew{"CylinderMesh",qbb,Scale=v3(1,0.01,1)}
  376.  
  377. eBarrel = iPart{p,0.3,1.5,0.3}
  378. iNew{"Weld",p,Part0=belt,Part1=eBarrel,C0=cn(1.15,0.1,0)*ca(100,0,0)}
  379. iNew{"CylinderMesh",eBarrel}
  380. bb = iPart{p,0.3,1.5,0.3}
  381. iNew{"Weld",p,Part0=eBarrel,Part1=bb,C0=cn(0,0,0.15)}
  382. ebb = iPart{p,0.2,1,0.2,co="Really black"}
  383. iNew{"Weld",p,Part0=eBarrel,Part1=ebb,C0=cn(0,-0.75,0)}
  384. iNew{"CylinderMesh",ebb,Scale=v3(1,0.01,1)}
  385.  
  386. -- leg bandages
  387. for i=0,1 do
  388. lb = iPart{p,1,1,1,co="Black"}
  389. iNew{"Weld",p,Part0=LL,Part1=lb,C0=cn(0,0.5+0.125*i,0)}
  390. iNew{"SpecialMesh",lb,MeshId=as.Bevel,Scale=v3(1.1,0.03,1.1)}
  391. end
  392. for i=0,1 do
  393. lb = iPart{p,1,1,1,co="Black"}
  394. iNew{"Weld",p,Part0=RL,Part1=lb,C0=cn(0,0.5+0.125*i,0)}
  395. iNew{"SpecialMesh",lb,MeshId=as.Bevel,Scale=v3(1.1,0.03,1.1)}
  396. end
  397.  
  398. -- left sheath
  399. qSheath = iPart{p,0,0,0,tr=0}
  400. wqSheath = iNew{"Weld",p,Part0=LL,Part1=qSheath,C0=cn(-0.5,0.4,0)*ca(10,0,0)}
  401. qBody = iPart{p,0.45,0.7,3.5,co="Brown",mt="Wood"}
  402. iNew{"Weld",p,Part0=qSheath,Part1=qBody,C0=cn(-qBody.Size.X/2,0,0.75)}
  403. for i=1,7,2 do
  404. sp = iPart{p,1,0.6,1,co="Really black"}
  405. iNew{"Weld",p,Part0=qBody,Part1=sp,C0=cn(-qBody.Size.X/2+(qBody.Size.X/9)/2+((qBody.Size.X/9)*i),0,-1.75)}
  406. iNew{"BlockMesh",sp,Scale=v3((qBody.Size.X/9),1,0.01)}
  407. newBlade(sp,cn(0,0,1.5)*ca(90,0,0),"LeftBlade"..i,false) -- blade is 1
  408. end
  409. tank = iPart{p,0.4,2.8,0.4}
  410. iNew{"Weld",p,Part0=qBody,Part1=tank,C0=cn(0,0.55,0.15)*ca(-90,0,0)}
  411. iNew{"CylinderMesh",tank}
  412. for i=0,2,1 do
  413. sp = iPart{p,qBody.Size.X*1.1,1.1*1.1,0.3,co="Dark stone grey"}
  414. iNew{"Weld",p,Part0=qBody,Part1=sp,C0=cn(0,0.2,3.5/2-0.5-i)}
  415. end
  416. for i=-1,1,2 do
  417. bl = iPart{p,0.4,0.4,0.4}
  418. iNew{"Weld",p,Part0=tank,Part1=bl,C0=cn(0,1.4*i,0)}
  419. iNew{"SpecialMesh",bl,MeshType="Sphere"}
  420. end
  421. blp = iPart{p,0.2,0.3,0.2}
  422. iNew{"Weld",p,Part0=bl,Part1=blp,C0=cn(0,0.2,0)}
  423. iNew{"CylinderMesh",blp}
  424. blap = iPart{p,0.25,0.5,0.25,co="Black"}
  425. iNew{"Weld",p,Part0=blp,Part1=blap,C0=cn(0,0.2,0)*ca(0,0,90)}
  426. iNew{"CylinderMesh",blap}
  427. blp = iPart{p,0.3,0.2,0.3}
  428. iNew{"Weld",p,Part0=blap,Part1=blp}
  429. iNew{"CylinderMesh",blp}
  430.  
  431. -- right sheath
  432. eSheath = iPart{p,0,0,0,tr=0}
  433. weSheath = iNew{"Weld",p,Part0=RL,Part1=eSheath,C0=cn(0.5,0.4,0)*ca(10,0,0)}
  434. eBody = iPart{p,0.45,0.7,3.5,co="Brown",mt="Wood"}
  435. iNew{"Weld",p,Part0=eSheath,Part1=eBody,C0=cn(eBody.Size.X/2,0,0.75)}
  436. for i=1,7,2 do
  437. sp = iPart{p,1,0.6,1,co="Really black"}
  438. iNew{"Weld",p,Part0=eBody,Part1=sp,C0=cn(-eBody.Size.X/2+(eBody.Size.X/9)/2+((eBody.Size.X/9)*i),0,-1.75)}
  439. iNew{"BlockMesh",sp,Scale=v3((eBody.Size.X/9),1,0.01)}
  440. newBlade(sp,cn(0,0,1.5)*ca(90,0,0),"RightBlade"..i,false) -- blade is 7
  441. end
  442. tank = iPart{p,0.4,2.8,0.4}
  443. iNew{"Weld",p,Part0=eBody,Part1=tank,C0=cn(0,0.55,0.15)*ca(-90,0,0)}
  444. iNew{"CylinderMesh",tank}
  445. for i=0,2,1 do
  446. sp = iPart{p,eBody.Size.X*1.1,1.1*1.1,0.3,co="Dark stone grey"}
  447. iNew{"Weld",p,Part0=eBody,Part1=sp,C0=cn(0,0.2,3.5/2-0.5-i)}
  448. end
  449. for i=-1,1,2 do
  450. bl = iPart{p,0.4,0.4,0.4}
  451. iNew{"Weld",p,Part0=tank,Part1=bl,C0=cn(0,1.4*i,0)}
  452. iNew{"SpecialMesh",bl,MeshType="Sphere"}
  453. end
  454. blp = iPart{p,0.2,0.3,0.2}
  455. iNew{"Weld",p,Part0=bl,Part1=blp,C0=cn(0,0.2,0)}
  456. iNew{"CylinderMesh",blp}
  457. blap = iPart{p,0.25,0.5,0.25,co="Black"}
  458. iNew{"Weld",p,Part0=blp,Part1=blap,C0=cn(0,0.2,0)*ca(0,0,90)}
  459. iNew{"CylinderMesh",blap}
  460. blp = iPart{p,0.3,0.2,0.3}
  461. iNew{"Weld",p,Part0=blap,Part1=blp}
  462. iNew{"CylinderMesh",blp}
  463.  
  464. -- air compression
  465. hpart = iPart{p,0.8,0.4,0.8}
  466. iNew{"Weld",p,Part0=belt,Part1=hpart,C0=cn(0,-0.1,0.9)*ca(15,0,0)}
  467. iNew{"CylinderMesh",hpart}
  468. hp = iPart{p,0.3,0.2,0.4}
  469. iNew{"Weld",p,Part0=hpart,Part1=hp,C0=cn(0,-0.1,0.6)}
  470. for i=-1,1,2 do
  471. wp = iPart{p,0.2,0.2,0.8}
  472. iNew{"Weld",p,Part0=hp,Part1=wp,C0=cn(0.25*i,0,-0.2)*ca(0,180,90*i)}
  473. iNew{"SpecialMesh",wp,MeshType="Wedge"}
  474. end
  475. hp2 = iPart{p,0.3,0.2,0.3}
  476. iNew{"Weld",p,Part0=hpart,Part1=hp2,C0=cn(0,0.1,0.5)}
  477. iNew{"BlockMesh",hp2,Scale=v3(0.5,0.5,1)}
  478. for i=-1,1,2 do
  479. wp = iPart{p,0.2,0.2,0.8}
  480. iNew{"Weld",p,Part0=hp2,Part1=wp,C0=cn(0.175*i,0,-0.25)*ca(0,180,90*i)}
  481. iNew{"SpecialMesh",wp,MeshType="Wedge",Scale=v3(0.5,1,1)}
  482. end
  483. for i=-1,1,2 do
  484. cy = iPart{p,0.2,0.2,0.2}
  485. iNew{"Weld",p,Part0=hpart,Part1=cy,C0=cn(-0.35*i,-0.075,0.175)*ca(0,0,-90*i)*ca(-25,0,-30*i)}
  486. iNew{"CylinderMesh",cy}
  487. spi = iPart{p,0,0,0}
  488. iNew{"Weld",p,Part0=cy,Part1=spi,C0=cn(0,-0.2,0)}
  489. iNew{"SpecialMesh",spi,MeshId=as.Cone,Scale=v3(0.3,0.5,0.3)}
  490. cyl = iPart{p,0.7,0.2,0.7}
  491. iNew{"Weld",p,Part0=spi,Part1=cyl,C0=cn(0,-0.3,0)}
  492. iNew{"CylinderMesh",cyl}
  493. for i=-1,1,2 do
  494. cylp = iPart{p,0.75,1,0.75,co="Dark stone grey"}
  495. iNew{"Weld",p,Part0=cyl,Part1=cylp,C0=cn(0,0.1*i,0)}
  496. iNew{"CylinderMesh",cylp,Scale=v3(1,0.01,1)}
  497. end
  498. for i=360/10,360,360/10 do
  499. cylp = iPart{p,1,0.2,1,co="Dark stone grey"}
  500. iNew{"Weld",p,Part0=cyl,Part1=cylp,C0=ca(0,i,0)*cn(0,0,-0.35)}
  501. iNew{"BlockMesh",cylp,Scale=v3(0.025,1,0.05)}
  502. end
  503. end
  504.  
  505. -- right sword
  506. RSword = iPart{p,0.2,0.5,0.35,co="Dark stone grey"}
  507. wRSword = iNew{"Weld",p,Part0=RA,Part1=RSword,C0=cn(0,-0.95,-0.25)*ca(-90,0,0)}
  508. iNew{"BlockMesh",RSword,Scale=v3(0.5,1,1)}
  509. sp = iPart{p,0.2,0.5,0.35,co="Dark stone grey"}
  510. iNew{"Weld",p,Part0=RSword,Part1=sp,C0=cn(0,-0.25,-0.35/2)*ca(-10,0,0)*cn(0,-0.25,0.35/2)}
  511. iNew{"BlockMesh",sp,Scale=v3(0.5,1,1)}
  512. sp2 = iPart{p,0.2,0.2,0.35,co="Dark stone grey"}
  513. iNew{"Weld",p,Part0=sp,Part1=sp2,C0=cn(0,-0.35,0)}
  514. iNew{"BlockMesh",sp2,Scale=v3(1,1,1)}
  515. sp3 = iPart{p,0.2,0.5,0.3,co="Reddish brown"}
  516. iNew{"Weld",p,Part0=RSword,Part1=sp3,C0=cn(0,0,0)}
  517. iNew{"BlockMesh",sp3,Scale=v3(0.75,1,1)}
  518. sp4 = iPart{p,0.2,0.5,0.3,co="Reddish brown"}
  519. iNew{"Weld",p,Part0=sp,Part1=sp4,C0=cn(0,0,0)}
  520. iNew{"BlockMesh",sp4,Scale=v3(0.75,1,1)}
  521. sp5 = iPart{p,0.2,0.2,0.6,co="Dark stone grey"}
  522. iNew{"Weld",p,Part0=RSword,Part1=sp5,C0=cn(0,0.35,-0.3+0.35/2)}
  523. trg = iPart{p,0.2,1,0.2,co="Dark stone grey"}
  524. iNew{"Weld",p,Part0=RSword,Part1=trg,C0=cn(0,0.05,-0.35/2-0.1)}
  525. iNew{"BlockMesh",trg,Scale=v3(0.5,0.05,1)}
  526. trg2 = iPart{p,0.2,1,0.2,co="Dark stone grey"}
  527. iNew{"Weld",p,Part0=trg,Part1=trg2,C0=cn(0,0.1,-0.1+0.025)*ca(-90,0,0)}
  528. iNew{"BlockMesh",trg2,Scale=v3(0.5,0.05,1)}
  529. trg3 = iPart{p,0.2,1,1,co="Dark stone grey"}
  530. iNew{"Weld",p,Part0=RSword,Part1=trg3,C0=cn(0,-0.15,-0.35/2-0.09)}
  531. iNew{"BlockMesh",trg3,Scale=v3(0.5,0.05,0.18)}
  532. trg4 = iPart{p,0.2,1,0.2,co="Dark stone grey"}
  533. iNew{"Weld",p,Part0=trg3,Part1=trg4,C0=cn(0,0.1,-0.09+0.025)*ca(-90,0,0)}
  534. iNew{"BlockMesh",trg4,Scale=v3(0.5,0.05,1)}
  535. sp6 = iPart{p,0.2,0.3,0.2,co="Dark stone grey"}
  536. iNew{"Weld",p,Part0=sp5,Part1=sp6,C0=cn(0,0,0.45)*ca(90,180,0)}
  537. iNew{"SpecialMesh",sp6,MeshType="Wedge",Scale=v3(1,1,1)}
  538. sp7 = iPart{p,0.2,0.2,0.2,co="Dark stone grey"}
  539. iNew{"Weld",p,Part0=sp5,Part1=sp7,C0=cn(0,0,-0.4)}
  540. iNew{"SpecialMesh",sp7,MeshType="Wedge",Scale=v3(1,1,1)}
  541. sp8 = iPart{p,0.2,0.5,0.2,co="Dark stone grey"}
  542. iNew{"Weld",p,Part0=sp7,Part1=sp8,C0=cn(0,-0.1,-0.1)*ca(-5,0,0)*cn(0,-0.25,0.05)}
  543. iNew{"BlockMesh",sp8,Scale=v3(1,1,0.5)}
  544. sp9 = iPart{p,0.2,0.7,0.2,co="Dark stone grey"}
  545. iNew{"Weld",p,Part0=sp8,Part1=sp9,C0=cn(0,-0.3,-0.1)*ca(-10,0,0)*cn(0,-0.3,0.1)*ca(0,0,180)}
  546. iNew{"SpecialMesh",sp9,MeshType="Wedge",Scale=v3(1,1,0.5)}
  547. RConnect = iPart{p,0.2,0.2,0.3,co="Dark stone grey"} RConnect.Name="RConnect"
  548. iNew{"Weld",p,Part0=sp5,Part1=RConnect,C0=cn(0,0.2,0.1)}
  549. iNew{"BlockMesh",RConnect,Scale=v3(0.75,1,1)}
  550.  
  551. -- left sword
  552. LSword = iPart{p,0.2,0.5,0.35,co="Dark stone grey"}
  553. wLSword = iNew{"Weld",p,Part0=LA,Part1=LSword,C0=cn(0,-0.95,-0.25)*ca(-90,0,0)}
  554. iNew{"BlockMesh",LSword,Scale=v3(0.5,1,1)}
  555. sp = iPart{p,0.2,0.5,0.35,co="Dark stone grey"}
  556. iNew{"Weld",p,Part0=LSword,Part1=sp,C0=cn(0,-0.25,-0.35/2)*ca(-10,0,0)*cn(0,-0.25,0.35/2)}
  557. iNew{"BlockMesh",sp,Scale=v3(0.5,1,1)}
  558. sp2 = iPart{p,0.2,0.2,0.35,co="Dark stone grey"}
  559. iNew{"Weld",p,Part0=sp,Part1=sp2,C0=cn(0,-0.35,0)}
  560. iNew{"BlockMesh",sp2,Scale=v3(1,1,1)}
  561. sp3 = iPart{p,0.2,0.5,0.3,co="Reddish brown"}
  562. iNew{"Weld",p,Part0=LSword,Part1=sp3,C0=cn(0,0,0)}
  563. iNew{"BlockMesh",sp3,Scale=v3(0.75,1,1)}
  564. sp4 = iPart{p,0.2,0.5,0.3,co="Reddish brown"}
  565. iNew{"Weld",p,Part0=sp,Part1=sp4,C0=cn(0,0,0)}
  566. iNew{"BlockMesh",sp4,Scale=v3(0.75,1,1)}
  567. sp5 = iPart{p,0.2,0.2,0.6,co="Dark stone grey"}
  568. iNew{"Weld",p,Part0=LSword,Part1=sp5,C0=cn(0,0.35,-0.3+0.35/2)}
  569. trg = iPart{p,0.2,1,0.2,co="Dark stone grey"}
  570. iNew{"Weld",p,Part0=LSword,Part1=trg,C0=cn(0,0.05,-0.35/2-0.1)}
  571. iNew{"BlockMesh",trg,Scale=v3(0.5,0.05,1)}
  572. trg2 = iPart{p,0.2,1,0.2,co="Dark stone grey"}
  573. iNew{"Weld",p,Part0=trg,Part1=trg2,C0=cn(0,0.1,-0.1+0.025)*ca(-90,0,0)}
  574. iNew{"BlockMesh",trg2,Scale=v3(0.5,0.05,1)}
  575. trg3 = iPart{p,0.2,1,1,co="Dark stone grey"}
  576. iNew{"Weld",p,Part0=LSword,Part1=trg3,C0=cn(0,-0.15,-0.35/2-0.09)}
  577. iNew{"BlockMesh",trg3,Scale=v3(0.5,0.05,0.18)}
  578. trg4 = iPart{p,0.2,1,0.2,co="Dark stone grey"}
  579. iNew{"Weld",p,Part0=trg3,Part1=trg4,C0=cn(0,0.1,-0.09+0.025)*ca(-90,0,0)}
  580. iNew{"BlockMesh",trg4,Scale=v3(0.5,0.05,1)}
  581. sp6 = iPart{p,0.2,0.3,0.2,co="Dark stone grey"}
  582. iNew{"Weld",p,Part0=sp5,Part1=sp6,C0=cn(0,0,0.45)*ca(90,180,0)}
  583. iNew{"SpecialMesh",sp6,MeshType="Wedge",Scale=v3(1,1,1)}
  584. sp7 = iPart{p,0.2,0.2,0.2,co="Dark stone grey"}
  585. iNew{"Weld",p,Part0=sp5,Part1=sp7,C0=cn(0,0,-0.4)}
  586. iNew{"SpecialMesh",sp7,MeshType="Wedge",Scale=v3(1,1,1)}
  587. sp8 = iPart{p,0.2,0.5,0.2,co="Dark stone grey"}
  588. iNew{"Weld",p,Part0=sp7,Part1=sp8,C0=cn(0,-0.1,-0.1)*ca(-5,0,0)*cn(0,-0.25,0.05)}
  589. iNew{"BlockMesh",sp8,Scale=v3(1,1,0.5)}
  590. sp9 = iPart{p,0.2,0.7,0.2,co="Dark stone grey"}
  591. iNew{"Weld",p,Part0=sp8,Part1=sp9,C0=cn(0,-0.3,-0.1)*ca(-10,0,0)*cn(0,-0.3,0.1)*ca(0,0,180)}
  592. iNew{"SpecialMesh",sp9,MeshType="Wedge",Scale=v3(1,1,0.5)}
  593. LConnect = iPart{p,0.2,0.2,0.3,co="Dark stone grey"} LConnect.Name="LConnect"
  594. iNew{"Weld",p,Part0=sp5,Part1=LConnect,C0=cn(0,0.2,0.1)}
  595. iNew{"BlockMesh",LConnect,Scale=v3(0.75,1,1)}
  596.  
  597. -- gui
  598. Gui = iNew{"ScreenGui",Player.PlayerGui,Name=name}
  599. SwordFrame = iNew{"Frame",Gui,BackgroundColor3=bn("Really black").Color,BorderColor3=bn("Really black").Color,Size=ud(0,170,0,18),Position=ud(0.5,85+8,1,-22),ClipsDescendants=true,Name="SwordFrame"}
  600. SwordBar = iNew{"ImageLabel",SwordFrame,Image=as.HealthBar,BackgroundTransparency=1,Size=ud(1,0,1,0),Name="SwordBar"}
  601. SwordLabel = iNew{"TextLabel",SwordFrame,BackgroundTransparency=1,Text="Sharpness ",Size=ud(1,0,1,0),Font="SourceSansBold",FontSize="Size14",TextColor3=bn("White").Color,TextStrokeColor3=bn("Really black").Color,TextStrokeTransparency=0,TextXAlignment="Right",Name="SwordLabel"}
  602.  
  603. GasFrame = iNew{"Frame",Gui,BackgroundColor3=bn("Really black").Color,BorderColor3=bn("Really black").Color,Size=ud(0,170,0,18),Position=ud(0.5,85*3+16,1,-22),ClipsDescendants=true,Name="GasFrame"}
  604. GasBar = iNew{"ImageLabel",GasFrame,Image=as.HealthBar,BackgroundTransparency=1,Size=ud(1,0,1,0),Name="GasBar"}
  605. GasLabel = iNew{"TextLabel",GasFrame,BackgroundTransparency=1,Text="Gas ",Size=ud(1,0,1,0),Font="SourceSansBold",FontSize="Size14",TextColor3=bn("White").Color,TextStrokeColor3=bn("Really black").Color,TextStrokeTransparency=0,TextXAlignment="Right",Name="GasLabel"}
  606.  
  607. function Touched(hit)
  608. if not Dmg then return end
  609. if hit.Parent:IsDescendantOf(Char) then return end
  610. if not hit.Parent then return end
  611. if not hit.Parent:findFirstChild("Torso") then return end
  612. if not CurrentBlades[1] and not CurrentBlades[2] then return end
  613. if hit.Parent:findFirstChild("Humanoid") then
  614. local Hum=hit.Parent.Humanoid
  615. Damage(Hum,1)
  616. local HMT=Hum.Parent:findFirstChild("Torso")
  617. if HMT then
  618. local bodyVelo = iNew{"BodyVelocity",HMT,P=1250,maxForce=v3(1,1,1)/0,velocity=RootPart.CFrame.lookVector*Torso.Velocity.magnitude}
  619. deb:AddItem(bodyVelo,0.15)
  620. end
  621. end
  622. end
  623.  
  624. for i,v in pairs(Pack:GetChildren()) do
  625. if v:IsA("BasePart") and v.Name:find("Blade") then
  626. v.Touched:connect(Touched)
  627. end
  628. end
  629.  
  630. for i,v in pairs(Torso:children()) do
  631. if v:IsA("Sound") then
  632. v:Destroy()
  633. end
  634. end
  635. for i,v in pairs(Head:children()) do
  636. if v:IsA("Sound") then
  637. v:Destroy()
  638. end
  639. end
  640.  
  641.  
  642.  
  643. function ReturnPose(legs)
  644. RePose()
  645. for i=1,ASpeed do
  646. SetWeld(LAW,0,i,ASpeed,wLA,wLA2,PoseLA,PoseLA2,1)
  647. SetWeld(RAW,0,i,ASpeed,wRA,wRA2,PoseRA,PoseRA2,1)
  648. if legs then
  649. SetWeld(LLW,0,i,ASpeed,wLL,wLL2,PoseLL,PoseLL2,1)
  650. SetWeld(RLW,0,i,ASpeed,wRL,wRL2,PoseRL,PoseRL2,1)
  651. end
  652. SetWeld(Root,0,i,ASpeed,wRT,wRT2,PoseRT,PoseRT2,1)
  653. SetWeld(Neck,0,i,ASpeed,wNE,wNE2,PoseNE,PoseNE2,1)
  654. SetWeld(wLSword,0,i,ASpeed,wLS,wLS2,PoseLS,PoseLS2,1)
  655. SetWeld(wRSword,0,i,ASpeed,wRS,wRS2,PoseRS,PoseRS2,1)
  656. wait(0)
  657. end
  658. end
  659.  
  660. function RePose()
  661. local a,b=GetWeld(LAW)
  662. local c,d=GetWeld(RAW)
  663. local e,f=GetWeld(LLW)
  664. local g,h=GetWeld(RLW)
  665. local i,j=GetWeld(Root)
  666. local k,l=GetWeld(Neck)
  667. local m,n=GetWeld(wLSword)
  668. local o,p=GetWeld(wRSword)
  669. wLA=a wLA2=b
  670. wRA=c wRA2=d
  671. wLL=e wLL2=f
  672. wRL=g wRL2=h
  673. wRT=i wRT2=j
  674. wNE=k wNE2=l
  675. wLS=m wLS2=n
  676. wRS=o wRS2=p
  677. end
  678.  
  679.  
  680.  
  681. Force = iNew{"BodyForce",Torso} -- force
  682. keys={}
  683.  
  684. WalkMode = "Walk"
  685.  
  686. CanGrapple = true
  687.  
  688. qProp=nil
  689. qPart=nil
  690. qRope=nil
  691. qOffset=nil
  692. qHit = nil
  693. qLastGrapple = tick()
  694.  
  695. eProp=nil
  696. ePart=nil
  697. eRope=nil
  698. eOffset=nil
  699. eHit=nil
  700. eLastGrapple = tick()
  701.  
  702. qePart=nil
  703. qeProp=nil
  704.  
  705. function GrappleStance()
  706. Humanoid.PlatformStand=true
  707. SetWeld(LLW,0,1,1,v3(0,0,0),v3(0,0,0),v3(-0.5,-1,-1),v3(-25,12,-12),0)
  708. SetWeld(RLW,0,1,1,v3(0,0,0),v3(0,0,0),v3(0.5,-1,-1),v3(-25,-12,12),0)
  709. end
  710.  
  711. MaxSpeed = 300
  712. ThrustP = 5
  713. MaxThrust1 = 16000
  714. MaxThrust2 = 21000
  715. function AddRP(target,name,maxThrust)
  716. local newProp = iNew{"RocketPropulsion",RootPart}
  717. newProp.Name = target.Name:gsub("Part","Prop")
  718. newProp.Target = target
  719. newProp.CartoonFactor = 0.5
  720. newProp.MaxSpeed = MaxSpeed
  721. newProp.MaxThrust = maxThrust
  722. newProp.MaxTorque = v3(1/0,1/0,1/0)
  723. newProp.TurnD = 0
  724. newProp.TurnP = 0
  725. newProp.ThrustD = 0.001
  726. newProp.ThrustP = ThrustP
  727. newProp.TargetRadius = 8
  728. newProp.ReachedTarget:connect(function()
  729. end)
  730. return newProp
  731. end
  732.  
  733. function UpdatePropulsions()
  734. for i,v in pairs(RootPart:GetChildren()) do
  735. if v:IsA("RocketPropulsion") then
  736. v.MaxSpeed = MaxSpeed
  737. v.ThrustP = ThrustP
  738. end
  739. end
  740. end
  741.  
  742. function Grapple(side,to,spd)
  743. if not CanGrapple then return end
  744.  
  745. PlaySound(as.Shoot,mran2(4.5,5.5),1,Torso)
  746. local MouseCF = to
  747. local hit,hitpos
  748. local Drop = 0.1
  749.  
  750. if side == "q" then
  751. if qPart then qPart:Destroy() qPart=nil end
  752. if qProp then qProp:Destroy() qProp=nil end
  753.  
  754. qPart = iPart{Pack,1,2,1,an=true,co="Black",cf=cn(qbb.CFrame.p,MouseCF.p)*ca(-90,0,0)} qPart.Name = "qPart"
  755. iNew{"SpecialMesh",qPart,MeshId=as.Cone,Scale=v3(0.1,0,0.1)}
  756. qRope = iPart{qPart,0.1,1,1,an=true,co="Black"}
  757. iNew{"CylinderMesh",qRope}
  758.  
  759. for i=1,10000 do
  760. if not qPart then return end
  761. hit,hitpos = Raycast(qPart.Position,qPart.Position - (qPart.CFrame *cn(0,-1,0)).p,spd,Char)
  762. qPart.CFrame=qPart.CFrame*cn(0,spd,0)*ca(-Drop,0,0)
  763. if hit and hitpos and hit.Name~="unray" then
  764. PlaySound(as.Block,1,1,Torso)
  765. local pa,pb,pc=qPart.CFrame:toEulerAnglesXYZ()
  766. qPart.CFrame=cn(hitpos)*ca2(pa,pb,pc)
  767. qHit = hit
  768. qOffset = hit.CFrame:toObjectSpace(qPart.CFrame)
  769. if ePart and eHit then
  770. if qePart then qePart:Destroy() qePart=nil end
  771. if eProp then eProp:Destroy() eProp=nil end
  772. if qProp then qProp:Destroy() qProp=nil end
  773. if qeProp then qeProp:Destroy() qeProp=nil end
  774. qePart=iPart{Pack,1,1,1,tr=1,an=true,cf=cn(qPart.CFrame.p:Lerp(ePart.CFrame.p,0.5))}
  775. qeProp = AddRP(qePart,"qeProp",MaxThrust2)
  776. qeProp:Fire()
  777. elseif (ePart or not ePart) and not eHit then -- fixed glitch where trying to grapple and firing one
  778. qProp=AddRP(qPart,"qProp",MaxThrust1)
  779. qProp:Fire()
  780. end
  781. end
  782. if hit and hitpos then break end
  783. wait(0)
  784. end
  785.  
  786. elseif side == "e" then
  787. if ePart then ePart:Destroy() ePart=nil end
  788. if eProp then eProp:Destroy() eProp=nil end
  789.  
  790. ePart = iPart{Pack,1,2,1,an=true,co="Black",cf=cn(ebb.CFrame.p,MouseCF.p)*ca(-90,0,0)} ePart.Name = "ePart"
  791. iNew{"SpecialMesh",ePart,MeshId=as.Cone,Scale=v3(0.1,0,0.1)}
  792. eRope = iPart{ePart,0.1,1,1,an=true,co="Black"}
  793. iNew{"CylinderMesh",eRope}
  794.  
  795. for i=1,10000 do
  796. if not ePart then return end
  797. hit,hitpos = Raycast(ePart.Position,ePart.Position - (ePart.CFrame *cn(0,-1,0)).p,spd,Char)
  798. ePart.CFrame=ePart.CFrame*cn(0,spd,0)*ca(-Drop,0,0)
  799. if hit and hitpos and hit.Name~="unray" then
  800. PlaySound(as.Block,1,1,Torso,Torso)
  801. local pa,pb,pc=ePart.CFrame:toEulerAnglesXYZ()
  802. ePart.CFrame=cn(hitpos)*ca2(pa,pb,pc)
  803. eHit = hit
  804. eOffset = hit.CFrame:toObjectSpace(ePart.CFrame)
  805. if qPart and qHit then
  806. if qePart then qePart:Destroy() qePart=nil end
  807. if eProp then eProp:Destroy() eProp=nil end
  808. if qProp then qProp:Destroy() qProp=nil end
  809. if qeProp then qeProp:Destroy() qeProp=nil end
  810. qePart=iPart{Pack,1,1,1,tr=1,an=true,cf=cn(ePart.CFrame.p:Lerp(qPart.CFrame.p,0.5))}
  811. qeProp = AddRP(qePart,"qeProp",MaxThrust2)
  812. qeProp:Fire()
  813. elseif (qPart or not qPart) and not qHit then
  814. eProp=AddRP(ePart,"eProp",MaxThrust1)
  815. eProp:Fire()
  816. end
  817. end
  818. if hit and hitpos then break end
  819. wait(0)
  820. end
  821. end
  822. Humanoid.Jump=true
  823. Grappling=true
  824. ReturnPose()
  825. GrappleStance()
  826. end
  827.  
  828. function ThrowBlade(index)
  829. local pos = Mouse.Hit.p
  830. local weld = CurrentBlades[index]
  831. local sword = weld.Part1
  832. local hitted = false
  833. local dist = (sword.Position-pos).magnitude
  834. local dir = cn(sword.Position,pos)
  835.  
  836. local hit,hitpos = Raycast(sword.CFrame.p,(pos-sword.CFrame.p),999,Char)
  837. bodyPart = iPart{Pack,1,1,1,tr=1,an=true,ca=false,cf=not hit and dir*cn(0,0,-200) or cn(hitpos)}
  838.  
  839. PlaySound(as.Disconnect,1,0.5,Torso)
  840. PlaySound(as.QuickSlash,1,1,Torso)
  841. sword.CanCollide = true
  842. CurrentBlades[index].Part0 = nil
  843. CurrentBlades[index] = nil
  844.  
  845. local bodyPos = iNew{"BodyPosition",sword,maxForce=v3(1,1,1)/0,D=15*(sword.Position-bodyPart.Position).magnitude,P=3500}
  846. local bodyGyro = iNew{"BodyGyro",sword,cframe=dir*ca(-90,0,0),D=15,maxTorque=v3(1,1,1)/0}
  847. bodyPos.position=bodyPart.CFrame.p
  848.  
  849. sword.Touched:connect(function(hit)
  850. if not hit:IsDescendantOf(Char) and not hitted then
  851. hitted = true
  852. if bodyPos then bodyPos:Destroy() end
  853. if bodyGyro then bodyGyro:Destroy() end
  854. local hum = hit.Parent:FindFirstChild("Humanoid")
  855. if hum then
  856. Damage(hum,2)
  857. end
  858. end
  859. end)
  860. Spawn(function()
  861. times = 0
  862. repeat wait(0) times = times+1 until (sword.Position-Mouse.Hit.p).magnitude<8 or times>=200 or hitted
  863. if bodyPos then bodyPos:Destroy() end
  864. if bodyGyro then bodyGyro:Destroy() end
  865. for i,v in pairs(Pack:GetChildren()) do
  866. if v.Name == "Blade"..weld.Name then
  867. deb:AddItem(v,3)
  868. end
  869. end
  870. end)
  871. end
  872.  
  873.  
  874. do
  875. Mouse=Player:GetMouse()
  876. Mouse.KeyDown:connect(function(key)
  877. keys[key]=true
  878. if Mouse and Mouse.Hit then
  879. -- Grapple
  880. if key == "q" then
  881. if not keys["g"] then
  882. Grapple("q",Mouse.Hit,18)
  883. end
  884. end
  885. if key == "e" then
  886. if not keys["g"] then
  887. Grapple("e",Mouse.Hit,18)
  888. end
  889. end
  890.  
  891. -- Jump
  892. if key == " " then
  893. Humanoid.PlatformStand=false
  894. Grappling=false
  895. if qPart then qPart:Destroy() qPart=nil qRope=nil qHit=nil end
  896. if ePart then ePart:Destroy() ePart=nil eRope=nil eHit=nil end
  897. if qePart then qePart:Destroy() qePart=nil end
  898. if qProp then qProp:Destroy() qProp=nil end
  899. if eProp then eProp:Destroy() eProp=nil end
  900. if qeProp then qeProp:Destroy() qeProp=nil end
  901. end
  902.  
  903. -- Toggle Walk/Run
  904. if key == "0" then
  905. if WalkMode == "Walk" then
  906. WalkMode = "Run"
  907. elseif WalkMode == "Run" then
  908. WalkMode = "Walk"
  909. end
  910. end
  911.  
  912. -- Blade Reload
  913. if key == "r" then
  914. if Anim == "" and not Grappling and not Humanoid.PlatformStand and not Humanoid.Jump and WalkMode == "Walk" then
  915. Anim = "Blade Switch"
  916. CanGrapple = false
  917. Humanoid.WalkSpeed = 0
  918. if not CurrentBlades[1] and not CurrentBlades[2] then
  919. local newRBlade,newLBlade
  920. if Pack["RightBlade1"].Part0 and Pack["LeftBlade7"].Part0 then
  921. newRBlade = Pack["RightBlade1"]
  922. newLBlade = Pack["LeftBlade7"]
  923. elseif Pack["RightBlade3"].Part0 and Pack["LeftBlade5"].Part0 then
  924. newRBlade = Pack["RightBlade3"]
  925. newLBlade = Pack["LeftBlade5"]
  926. elseif Pack["RightBlade5"].Part0 and Pack["LeftBlade3"].Part0 then
  927. newRBlade = Pack["RightBlade5"]
  928. newLBlade = Pack["LeftBlade3"]
  929. elseif Pack["RightBlade7"].Part0 and Pack["LeftBlade1"].Part0 then
  930. newRBlade = Pack["RightBlade7"]
  931. newLBlade = Pack["LeftBlade1"]
  932. else
  933. print("No more Blades in stock")
  934. CanGrapple = true
  935. Anim = ""
  936. return
  937. end
  938. Sharpness = 1
  939. -- anims
  940. local num = 3
  941. RePose()
  942. for i=1,ASpeed*num do
  943. SetWeld(LAW,0,i,ASpeed*num,wLA,wLA2,v3(0,-0.5,-0.8),v3(0,-180,-60),1)
  944. SetWeld(RAW,0,i,ASpeed*num,wRA,wRA2,v3(0,-0.5,-0.8),v3(15,180,60),1)
  945. SetWeld(Neck,0,i,ASpeed*num,wNE,wNE2,v3(0,1.5,-0.2),v3(-30,0,0),1)
  946. SetWeld(Root,0,i,ASpeed*num,wRT,wRT2,v3(0,-0.2,0),v3(-15,0,0),1)
  947. SetWeld(LLW,0,i,ASpeed*num,wLL,wLL2,v3(-0.5,-0.8,0),v3(15,0,-5),1)
  948. SetWeld(RLW,0,i,ASpeed*num,wRL,wRL2,v3(0.5,-0.8,0),v3(15,0,5),1)
  949. SetWeld(wLSword,0,i,ASpeed*num,wLS,wLS2,v3(0,-0.95,0),v3(-90,-60,0),1)
  950. SetWeld(wRSword,0,i,ASpeed*num,wRS,wRS2,v3(0,-0.95,0),v3(-90,60,0),1)
  951. wait(0)
  952. end
  953.  
  954. newRBlade.Part0 = RConnect
  955. newRBlade.C0 = cn(0,3.5/2,0.05)
  956. CurrentBlades[1] = newRBlade
  957.  
  958. newLBlade.Part0 = LConnect
  959. newLBlade.C0 = cn(0,3.5/2,0.05)
  960. CurrentBlades[2] = newLBlade
  961.  
  962. PlaySound(as.Draw,1,1,Torso)
  963. local num = 1.5
  964. RePose()
  965. for i=1,ASpeed*num do
  966. SetWeld(LAW,0,i,ASpeed*num,wLA,wLA2,v3(0,0.1,-1.5),v3(70,-180,-60),1)
  967. SetWeld(RAW,0,i,ASpeed*num,wRA,wRA2,v3(0,0.1,-1.5),v3(85,180,60),1)
  968. SetWeld(Neck,0,i,ASpeed*num,wNE,wNE2,v3(0,1.5,0),v3(15,0,0),1)
  969. SetWeld(Root,0,i,ASpeed*num,wRT,wRT2,v3(0,0,0),v3(0,0,0),1)
  970. SetWeld(LLW,0,i,ASpeed*num,wLL,wLL2,PoseLL,PoseLL2,1)
  971. SetWeld(RLW,0,i,ASpeed*num,wRL,wRL2,PoseRL,PoseRL2,1)
  972. SetWeld(wLSword,0,i,ASpeed*num,wLS,wLS2,v3(0,-0.95,0),v3(-90,-60,0),1)
  973. SetWeld(wLSword,1,i,ASpeed*num,v3(0,0,0),v3(0,0,0),v3(0,0,0),v3(-50,0,0),1)
  974. SetWeld(wRSword,0,i,ASpeed*num,wRS,wRS2,v3(0,-0.95,0),v3(-90,60,0),1)
  975. SetWeld(wRSword,1,i,ASpeed*num,v3(0,0,0),v3(0,0,0),v3(0,0,0),v3(-50,0,0),1)
  976. wait(0)
  977. end
  978. RePose()
  979. for i=1,ASpeed*num do
  980. SetWeld(LAW,0,i,ASpeed*num,wLA,wLA2,PoseLA,PoseLA2,1)
  981. SetWeld(RAW,0,i,ASpeed*num,wRA,wRA2,PoseRA,PoseRA2,1)
  982. SetWeld(Neck,0,i,ASpeed*num,wNE,wNE2,PoseNE,PoseNE2,1)
  983. SetWeld(wLSword,0,i,ASpeed*num,wLS,wLS2,PoseLS,PoseLS2,1)
  984. SetWeld(wLSword,1,i,ASpeed*num,v3(0,0,0),v3(0,0,0),v3(0,0,0),v3(0,0,0),1)
  985. SetWeld(wRSword,0,i,ASpeed*num,wRS,wRS2,PoseRS,PoseRS2,1)
  986. SetWeld(wRSword,1,i,ASpeed*num,v3(0,0,0),v3(0,0,0),v3(0,0,0),v3(0,0,0),1)
  987. wait(0)
  988. end
  989. Anim = ""
  990. CanGrapple = true
  991.  
  992. elseif CurrentBlades[1] and CurrentBlades[2] then
  993. PlaySound(as.Disconnect,1,1,Torso)
  994. CurrentBlades[1].Part0 = nil
  995. CurrentBlades[1].Part1.CanCollide = true
  996. CurrentBlades[1] = nil
  997.  
  998. CurrentBlades[2].Part0 = nil
  999. CurrentBlades[2].Part1.CanCollide = true
  1000. CurrentBlades[2] = nil
  1001. end
  1002. Anim = ""
  1003. CanGrapple = true
  1004. Humanoid.WalkSpeed = WalkMode == "Walk" and 10 or WalkMode == "Run" and 28
  1005. end
  1006. end
  1007.  
  1008. -- Spin Attack
  1009. if key == "t" then
  1010. if not CurrentBlades[1] and not CurrentBlades[2] then return end
  1011. if Anim == "" then
  1012. Anim = "Spin"
  1013. RePose()
  1014. for i=1,ASpeed do
  1015. SetWeld(LAW,0,i,ASpeed,wLA,wLA2,v3(-1.5,0.5,0),v3(180,0,-90),1)
  1016. SetWeld(RAW,0,i,ASpeed,wRA,wRA2,v3(1.5,0.5,0),v3(0,0,90),1)
  1017. SetWeld(Root,0,i,ASpeed,wRT,wRT2,v3(0,0,0),v3(0,80,5),1)
  1018. SetWeld(Neck,0,i,ASpeed,wNE,wNE2,v3(0,1.5,0),v3(0,0,0),1)
  1019. SetWeld(wLSword,0,i,ASpeed,wLS,wLS2,v3(0,-0.95,0),v3(-180,0,0),1)
  1020. SetWeld(wRSword,0,i,ASpeed,wRS,wRS2,v3(0,-0.95,0),v3(-180,0,0),1)
  1021. wait(0)
  1022. end
  1023. Dmg=true
  1024. RePose()
  1025. local num = 2
  1026. PlaySound(as.QuickSlash,0.95,1,Torso)
  1027. for i=1,ASpeed*num do
  1028. if i%4==0 then
  1029. MeshEffect(Pack,Torso.CFrame*cn(0,0.5,0),16,0.5,16,0.07,"Dark grey","Cylinder")
  1030. end
  1031. SetWeld(Root,0,i,ASpeed*num,wRT,wRT2,v3(0,0,0),v3(-15,-360-270,0),1)
  1032. SetWeld(LAW,0,i,ASpeed*num,wLA,wLA2,v3(-1.5,0.5,0),v3(180,0,-90),1)
  1033. SetWeld(RAW,0,i,ASpeed*num,wRA,wRA2,v3(1.5,0.5,0),v3(0,0,90),1)
  1034. SetWeld(wLSword,0,i,ASpeed*num,wLS,wLS2,v3(0,-0.95,0),v3(-180,0,0),1)
  1035. SetWeld(wRSword,0,i,ASpeed*num,wRS,wRS2,v3(0,-0.95,0),v3(-180,0,0),1)
  1036. wait(0)
  1037. end
  1038. Dmg=false
  1039. ClearWeld(Root)
  1040. ReturnPose()
  1041. Anim=""
  1042. end
  1043. end
  1044.  
  1045. -- Block
  1046. if key == "f" then
  1047. if WalkMode == "Run" then return end
  1048. if not CurrentBlades[1] and not CurrentBlades[2] then return end
  1049. if Anim == "" then
  1050. Anim = "Blocking"
  1051. Block.Value = 1
  1052. RePose()
  1053. for i=1,ASpeed do
  1054. SetWeld(LAW,0,i,ASpeed,wLA,wLA2,v3(-1.5,0.5,0),v3(73,-45,0),1)
  1055. SetWeld(RAW,0,i,ASpeed,wRA,wRA2,v3(1.5,0.5,0),v3(65,38,0),1)
  1056. SetWeld(wLSword,0,i,ASpeed,wLS,wLS2,v3(0,-0.95,0),v3(-90,0,0),1)
  1057. SetWeld(wRSword,0,i,ASpeed,wRS,wRS2,v3(0,-0.95,0),v3(-90,0,0),1)
  1058. wait(0)
  1059. end
  1060. PlaySound(as.Block,1,1,Torso)
  1061. Anim = "Block"
  1062. repeat wait() until Block.Value<=0 or not keys["f"] or Anim ~= "Block"
  1063. if Anim == "Block" then
  1064. Anim = "Unblocking"
  1065. Block.Value = 0
  1066. ReturnPose(not Walking)
  1067. Anim = ""
  1068. end
  1069. end
  1070. end
  1071.  
  1072. -- Double Grapple
  1073. if key == "g" then
  1074. if not keys["q"] and not keys["e"] then
  1075. Spawn(function() Grapple("q",Mouse.Hit*cn(-(RootPart.Position-Mouse.Hit.p).magnitude/5,0,0),18) end)
  1076. Spawn(function() Grapple("e",Mouse.Hit*cn((RootPart.Position-Mouse.Hit.p).magnitude/5,0,0),18) end)
  1077. end
  1078. end
  1079.  
  1080. -- Choke Kill
  1081. if key == "z" then
  1082. if not CurrentBlades[1] and not CurrentBlades[2] then return end
  1083. if Anim == "" and not Grappling and not Humanoid.PlatformStand and WalkMode == "Walk" then
  1084. hit,hitpos = Raycast(RootPart.Position-v3(0,1,0),RootPart.Position-v3(0,1,0) - (RootPart.CFrame *cn(0,0,5)).p,10,Char)
  1085.  
  1086. if not hit or not hitpos then return end
  1087. if not hit.Parent:findFirstChild("Humanoid") and not hit.Parent.Parent:findFirstChild("Humanoid") then return end
  1088. if not hit.Parent:findFirstChild("Torso") and not hit.Parent.Parent:findFirstChild("Torso") then return end
  1089.  
  1090. hitHum = not hit.Parent:findFirstChild("Humanoid") and (not hit.Parent.Parent:findFirstChild("Humanoid")and nil or hit.Parent.Parent:findFirstChild("Humanoid")) or hit.Parent:findFirstChild("Humanoid")
  1091. hitTorso = not hit.Parent:findFirstChild("Torso") and (not hit.Parent.Parent:findFirstChild("Torso") and nil or hit.Parent.Parent:findFirstChild("Torso")) or hit.Parent:findFirstChild("Torso")
  1092.  
  1093. -- Check for titans
  1094. if hitTorso:GetMass() > 4 then print("OMG U TRIED TO CHOKE A TITAN") return end
  1095.  
  1096. if hitHum and hitTorso then
  1097. Anim = "Choke"
  1098. hitHum.PlatformStand=false
  1099. RootPart.CFrame=hitTorso.CFrame*cn(0,0,1)
  1100. wHitTorso = iNew{"Weld",Pack,Part0=RootPart,Part1=hitTorso,C0=cn(0,-0.2,-1)*ca(-10,0,0)}
  1101. RePose()
  1102. for i=1,ASpeed do
  1103. SetWeld(LAW,0,i,ASpeed,wLA,wLA2,v3(-1.5,0.5,0),v3(0,-75,-100),1)
  1104. SetWeld(RAW,0,i,ASpeed,wRA,wRA2,v3(1.5,0.5,0),v3(0,75,100),1)
  1105. wait(0)
  1106. end
  1107. end
  1108.  
  1109. local prevSpeed = Humanoid.WalkSpeed
  1110. repeat wait(0.3)
  1111. if hitHum then
  1112. Humanoid.WalkSpeed = prevSpeed / 5
  1113. pcall(function()
  1114. hitHum.PlatformStand=true
  1115. end)
  1116. end
  1117. until not keys["z"] or not hitHum or not hitTorso or hitHum.Health <= 0 or Grappling or Humanoid.PlatformStand or Humanoid.Sit or WalkMode~="Walk" or Humanoid.Jump or Anim~="Choke"
  1118. if Anim == "Choke" then
  1119. Humanoid.WalkSpeed=prevSpeed
  1120. pcall(function() wHitTorso:Destroy() end)
  1121. ReturnPose()
  1122. Anim = ""
  1123. else
  1124. PlaySound(Slashes.Slash2,1,1,Torso)
  1125. RePose()
  1126. for i=1,ASpeed do
  1127. SetWeld(LAW,0,i,ASpeed,wLA,wLA2,v3(-1.5,0.5,0),v3(0,-25,-100),1)
  1128. SetWeld(RAW,0,i,ASpeed,wRA,wRA2,v3(1.5,0.5,0),v3(0,25,100),1)
  1129. SetWeld(wLSword,0,i,ASpeed,wLS,wLS2,v3(0,-0.95,0),v3(-90+50,0,0),1)
  1130. SetWeld(wRSword,0,i,ASpeed,wRS,wRS2,v3(0,-0.95,0),v3(-90+50,0,0),1)
  1131. wait(0)
  1132. end
  1133. pcall(function() wHitTorso:Destroy() end)
  1134. pcall(function() Damage(hitHum,3) end)
  1135. wait(0.3)
  1136. Humanoid.WalkSpeed=prevSpeed
  1137. ReturnPose()
  1138. Anim = ""
  1139. end
  1140. end
  1141. end
  1142.  
  1143. -- Flip Slash
  1144. if key == "x" then
  1145. if not CurrentBlades[1] and not CurrentBlades[2] then return end
  1146. if Anim == "" then
  1147. Anim = "Flip Slash"
  1148. if not Humanoid.PlatformStand then Force.force = v3(0,16000,0) end
  1149. Legs(0)
  1150. RePose()
  1151. for i=1,ASpeed do
  1152. SetWeld(LAW,0,i,ASpeed,wLA,wLA2,v3(-1.5,0.5,0),v3(210,0,20),1)
  1153. SetWeld(RAW,0,i,ASpeed,wRA,wRA2,v3(1.5,0.5,0),v3(210,0,-20),1)
  1154. SetWeld(LLW,0,i,ASpeed,wLL,wLL2,v3(-0.5,-1,0),v3(-60,0,-15),0)
  1155. SetWeld(RLW,0,i,ASpeed,wRL,wRL2,v3(0.5,-1,0),v3(-60,0,15),0)
  1156. SetWeld(Root,0,i,ASpeed,wRT,wRT2,v3(0,0,0),v3(55,0,0),1)
  1157. SetWeld(Neck,0,i,ASpeed,wNE,wNE2,v3(0,1.5,0),v3(30,0,0),1)
  1158. wait(0)
  1159. end
  1160. Force.force = v3(0,0,0)
  1161. PlaySound(as.QuickSlash,1,1,Torso)
  1162. Dmg=true
  1163. RePose()
  1164. Spawn(function()
  1165. for i=1,ASpeed/1.2 do
  1166. SetWeld(LLW,0,i,ASpeed/1.2,wLL,wLL2,v3(-0.5,-1,0),v3(-15,0,-15),0)
  1167. SetWeld(RLW,0,i,ASpeed/1.2,wRL,wRL2,v3(0.5,-1,0),v3(-15,0,15),0)
  1168. SetWeld(Neck,0,i,ASpeed/1.2,wNE,wNE2,v3(0,1.5,0),v3(30,0,0),1)
  1169. SetWeld(wLSword,0,i,ASpeed/1.2,wLS,wLS2,PoseLS,v3(-130,0,0),1)
  1170. SetWeld(wRSword,0,i,ASpeed/1.2,wRS,wRS2,PoseRS,v3(-130,0,0),1)
  1171. wait(0)
  1172. end
  1173. end)
  1174. for i=1,ASpeed/0.6 do
  1175. SetWeld(LAW,0,i,ASpeed/0.6,wLA,wLA2,v3(-1.5,0.5,0),v3(20,0,20),1)
  1176. SetWeld(RAW,0,i,ASpeed/0.6,wRA,wRA2,v3(1.5,0.5,0),v3(20,0,-20),1)
  1177. SetWeld(Root,0,i,ASpeed/0.6,wRT,wRT2,v3(0,0,0),v3(-360-30,0,0),1)
  1178. wait(0)
  1179. end
  1180. RePose()
  1181. ClearWeld(Root)
  1182. SetWeld(Root,0,1,1,wRT,wRT2,v3(0,0,0),v3(-30,0,0),0)
  1183. Dmg=false
  1184. ReturnPose()
  1185. Anim = ""
  1186. end
  1187. end
  1188.  
  1189. -- Blade Throw
  1190. if key == "c" then
  1191. if Anim == "" and CurrentBlades[1] and CurrentBlades[2] then
  1192. Anim = "Blade Throw"
  1193. RePose()
  1194. for i=1,ASpeed do
  1195. SetWeld(LAW,0,i,ASpeed,wLA,wLA2,PoseLA,PoseLA2,1)
  1196. SetWeld(RAW,0,i,ASpeed,wRA,wRA2,v3(1.5,0.5,0),v3(200,-15,20),1)
  1197. SetWeld(Neck,0,i,ASpeed,wNE,wNE,v3(0,1.5,0),v3(15,-20,0),1)
  1198. SetWeld(Root,0,i,ASpeed,wRT,wRT2,v3(0,0,0),v3(0,-15,0),1)
  1199. wait(0)
  1200. end
  1201. ThrowBlade(1)
  1202. RePose()
  1203. for i=1,ASpeed do
  1204. SetWeld(LAW,0,i,ASpeed,wLA,wLA2,PoseLA,PoseLA2,1)
  1205. SetWeld(RAW,0,i,ASpeed,wRA,wRA2,PoseRA,PoseRA2,1)
  1206. SetWeld(Neck,0,i,ASpeed,wNE,wNE,v3(0,1.5,0),v3(5,0,0),1)
  1207. SetWeld(Root,0,i,ASpeed,wRT,wRT2,v3(0,0,0),v3(0,0,0),1)
  1208. wait(0)
  1209. end
  1210.  
  1211.  
  1212. RePose()
  1213. for i=1,ASpeed do
  1214. SetWeld(LAW,0,i,ASpeed,wLA,wLA2,v3(-1.5,0.5,0),v3(200,15,-20),1)
  1215. SetWeld(RAW,0,i,ASpeed,wRA,wRA2,PoseRA,PoseRA2,1)
  1216. SetWeld(Neck,0,i,ASpeed,wNE,wNE,v3(0,1.5,0),v3(15,20,0),1)
  1217. SetWeld(Root,0,i,ASpeed,wRT,wRT2,v3(0,0,0),v3(0,15,0),1)
  1218. wait(0)
  1219. end
  1220. ThrowBlade(2)
  1221. RePose()
  1222. for i=1,ASpeed do
  1223. SetWeld(LAW,0,i,ASpeed,wLA,wLA2,PoseLA,PoseLA2,1)
  1224. SetWeld(RAW,0,i,ASpeed,wRA,wRA2,PoseRA,PoseRA2,1)
  1225. SetWeld(Neck,0,i,ASpeed,wNE,wNE,v3(0,1.5,0),v3(5,0,0),1)
  1226. SetWeld(Root,0,i,ASpeed,wRT,wRT2,v3(0,0,0),v3(0,0,0),1)
  1227. wait(0)
  1228. end
  1229. Anim = ""
  1230. end
  1231. end
  1232. end
  1233. end)
  1234.  
  1235. Mouse.KeyUp:connect(function(key)
  1236. keys[key]=false
  1237. if key == "q" then
  1238. if keys["g"] then return end
  1239. if not keys["e"] then Grappling=false end
  1240. if qPart then qPart:Destroy() qPart=nil qRope = nil qHit=nil end
  1241. if qePart then qePart:Destroy() qePart=nil end
  1242. if qProp then qProp:Destroy() qProp=nil end
  1243. if qeProp then qeProp:Destroy() qeProp=nil end
  1244.  
  1245. if keys["e"] then
  1246. if ePart and not eProp and eHit then
  1247. eProp=AddRP(ePart,"eProp",MaxThrust1)
  1248. eProp:Fire()
  1249. end
  1250. end
  1251. end
  1252. if key == "e" then
  1253. if keys["g"] then return end
  1254. if not keys["q"] then Grappling=false end
  1255. if ePart then ePart:Destroy() ePart=nil eRope = nil eHit=nil end
  1256. if qePart then qePart:Destroy() qePart=nil end
  1257. if eProp then eProp:Destroy() eProp=nil end
  1258. if qeProp then qeProp:Destroy() qeProp=nil end
  1259.  
  1260. if keys["q"] then
  1261. if qPart and not qProp and qHit then
  1262. qProp=AddRP(qPart,"qProp",MaxThrust1)
  1263. qProp:Fire()
  1264. end
  1265. end
  1266. end
  1267. if key == "g" then
  1268. if keys["q"] or keys["e"] then return end
  1269. Grappling=false
  1270. if qPart then qPart:Destroy() qPart=nil qRope = nil qHit=nil end
  1271. if ePart then ePart:Destroy() ePart=nil eRope = nil eHit=nil end
  1272. if qePart then qePart:Destroy() qePart=nil end
  1273. if qProp then qProp:Destroy() qProp=nil end
  1274. if eProp then eProp:Destroy() eProp=nil end
  1275. if qeProp then qeProp:Destroy() qeProp=nil end
  1276. end
  1277. end)
  1278.  
  1279. Mouse.Button1Down:connect(function()
  1280. if Anim == "" then
  1281. if not CurrentBlades[1] and not CurrentBlades[2] then return end
  1282. if Attack == 1 then
  1283. Anim = "Attack1"
  1284. RePose()
  1285. local torsoA,torsoB,torsoC = Root.C0:toEulerAnglesXYZ()
  1286. for i=1,ASpeed do
  1287. SetWeld(LAW,0,i,ASpeed,wLA,wLA2,v3(-1.3,0.5,-0.25),v3(90,0,20),1)
  1288. SetWeld(RAW,0,i,ASpeed,wRA,wRA2,v3(1.3,0.5,-0.25),v3(90,0,20),1)
  1289. SetWeld(Root,0,i,ASpeed,wRT,wRT2,v3(0,0,0),v3(math.deg(torsoA),50,0),1)
  1290. SetWeld(Neck,0,i,ASpeed,wNE,wNE2,v3(0,1.5,0),v3(0,0,0),1)
  1291. SetWeld(wLSword,0,i,ASpeed,wLS,wLS2,PoseLS,v3(-90,0,90),1)
  1292. SetWeld(wRSword,0,i,ASpeed,wRS,wRS2,PoseRS,v3(-90,0,90),1)
  1293. wait(0)
  1294. end
  1295. Dmg=true
  1296. PlaySound(Slashes[mran(1,#Slashes)],1,1,Torso)
  1297. RePose()
  1298. for i=1,ASpeed/1.3 do
  1299. SetWeld(LAW,0,i,ASpeed/1.3,wLA,wLA2,v3(-1.3,0.5,-0.25),v3(90,0,70),1)
  1300. SetWeld(RAW,0,i,ASpeed/1.3,wRA,wRA2,v3(1.3,0.5,-0.25),v3(90,0,70),1)
  1301. SetWeld(Root,0,i,ASpeed/1.3,wRT,wRT2,v3(0,0,0),v3(math.deg(torsoA),-70,0),1)
  1302. SetWeld(Neck,0,i,ASpeed/1.3,wNE,wNE2,v3(0,1.5,0),v3(0,0,0),1)
  1303. SetWeld(wLSword,0,i,ASpeed/1.3,wLS,wLS2,PoseLS,v3(-90,-60,90),1)
  1304. SetWeld(wRSword,0,i,ASpeed/1.3,wRS,wRS2,PoseRS,v3(-90,-60,90),1)
  1305. wait(0)
  1306. end
  1307. Dmg=false
  1308. ReturnPose(not Walking)
  1309. Anim = ""
  1310. Attack = 2
  1311. elseif Attack == 2 then
  1312. Anim = "Attack2"
  1313. RePose()
  1314. local torsoA,torsoB,torsoC = Root.C0:toEulerAnglesXYZ()
  1315. for i=1,ASpeed do
  1316. SetWeld(LAW,0,i,ASpeed,wLA,wLA2,v3(-1.3,0.5,-0.25),v3(90,0,-20),1)
  1317. SetWeld(RAW,0,i,ASpeed,wRA,wRA2,v3(1.3,0.5,-0.25),v3(90,0,-20),1)
  1318. SetWeld(Root,0,i,ASpeed,wRT,wRT2,v3(0,0,0),v3(math.deg(torsoA),-50,0),1)
  1319. SetWeld(Neck,0,i,ASpeed,wNE,wNE2,v3(0,1.5,0),v3(0,0,0),1)
  1320. SetWeld(wLSword,0,i,ASpeed,wLS,wLS2,PoseLS,v3(-90,0,-90),1)
  1321. SetWeld(wRSword,0,i,ASpeed,wRS,wRS2,PoseRS,v3(-90,0,-90),1)
  1322. wait(0)
  1323. end
  1324. Dmg=true
  1325. PlaySound(Slashes[mran(1,#Slashes)],1,1,Torso)
  1326. RePose()
  1327. for i=1,ASpeed/1.3 do
  1328. SetWeld(LAW,0,i,ASpeed/1.3,wLA,wLA2,v3(-1.3,0.5,-0.25),v3(90,0,-70),1)
  1329. SetWeld(RAW,0,i,ASpeed/1.3,wRA,wRA2,v3(1.3,0.5,-0.25),v3(90,0,-70),1)
  1330. SetWeld(Root,0,i,ASpeed/1.3,wRT,wRT2,v3(0,0,0),v3(math.deg(torsoA),70,0),1)
  1331. SetWeld(Neck,0,i,ASpeed/1.3,wNE,wNE2,v3(0,1.5,0),v3(0,0,0),1)
  1332. SetWeld(wLSword,0,i,ASpeed/1.3,wLS,wLS2,PoseLS,v3(-90,60,-90),1)
  1333. SetWeld(wRSword,0,i,ASpeed/1.3,wRS,wRS2,PoseRS,v3(-90,60,-90),1)
  1334. wait(0)
  1335. end
  1336. Dmg=false
  1337. ReturnPose(not Walking)
  1338. Anim = ""
  1339. Attack = 3
  1340.  
  1341. elseif Attack == 3 then
  1342. if not CurrentBlades[1] and not CurrentBlades[2] then return end
  1343. if Anim == "" then
  1344. Anim = "Dual Plunge"
  1345. RePose()
  1346. for i=1,ASpeed do
  1347. SetWeld(LAW,0,i,ASpeed,wLA,wLA2,v3(-1.4,0.5,0),v3(0,-105,-75),1)
  1348. SetWeld(RAW,0,i,ASpeed,wRA,wRA2,v3(1.4,0.5,0),v3(0,105,75),1)
  1349. SetWeld(Neck,0,i,ASpeed,wNE,wNE2,v3(0,1.5,0),v3(-15,0,0),1)
  1350. SetWeld(wLSword,0,i,ASpeed,wLS,wLS2,v3(0,-0.95,0),v3(-180,0,0),1)
  1351. SetWeld(wRSword,0,i,ASpeed,wRS,wRS2,v3(0,-0.95,0),v3(-180,0,0),1)
  1352. wait(0)
  1353. end
  1354. Dmg=true
  1355. wait(0.1)
  1356. PlaySound(Slashes[mran(1,#Slashes)],1,1,Torso)
  1357. RePose()
  1358. for i=1,ASpeed/1.3 do
  1359. SetWeld(LAW,0,i,ASpeed/1.3,wLA,wLA2,v3(-1.4,0.5,0),v3(0,25,-75),1)
  1360. SetWeld(RAW,0,i,ASpeed/1.3,wRA,wRA2,v3(1.4,0.5,0),v3(0,-25,75),1)
  1361. SetWeld(Neck,0,i,ASpeed/1.3,wNE,wNE2,v3(0,1.5,0),v3(-15,0,0),1)
  1362. SetWeld(wLSword,0,i,ASpeed/1.3,wLS,wLS2,v3(0,-0.95,0),v3(-180,0,0),1)
  1363. SetWeld(wRSword,0,i,ASpeed/1.3,wRS,wRS2,v3(0,-0.95,0),v3(-180,0,0),1)
  1364. wait(0)
  1365. end
  1366. Dmg=false
  1367. ReturnPose()
  1368. Anim=""
  1369. end
  1370. Attack = 1
  1371. end
  1372. end
  1373.  
  1374. if Anim == "Block" and keys["f"] then
  1375. if not CurrentBlades[1] and not CurrentBlades[2] then return end
  1376. Anim = "Block Counter"
  1377. Block.Value = 0
  1378. RePose()
  1379. for i=1,ASpeed do
  1380. SetWeld(LAW,0,i,ASpeed,wLA,wLA2,v3(-1.5,0.5,0),v3(103,-40,15),1)
  1381. SetWeld(RAW,0,i,ASpeed,wRA,wRA2,v3(1.5,0.5,0),v3(95,40,-15),1)
  1382. SetWeld(Root,0,i,ASpeed,wRT,wRT2,v3(0,0,0),v3(0,0,0),1)
  1383. SetWeld(Neck,0,i,ASpeed,wNE,wNE2,v3(0,1.5,0),v3(5,0,0),1)
  1384. SetWeld(wLSword,0,i,ASpeed,wLS,wLS2,v3(0,-0.95,0),v3(-90,0,0),1)
  1385. SetWeld(wRSword,0,i,ASpeed,wRS,wRS2,v3(0,-0.95,0),v3(-90,0,0),1)
  1386. wait(0)
  1387. end
  1388. PlaySound(Slashes[mran(1,#Slashes)],1,1,Torso)
  1389. Dmg = true
  1390. RePose()
  1391. for i=1,ASpeed/1.3 do
  1392. SetWeld(LAW,0,i,ASpeed/1.3,wLA,wLA2,v3(-1.5,0.5,0),v3(-88,-25,-40),1)
  1393. SetWeld(RAW,0,i,ASpeed/1.3,wRA,wRA2,v3(1.5,0.5,0),v3(-80,25,40),1)
  1394. SetWeld(Root,0,i,ASpeed/1.3,wRT,wRT2,v3(0,0,0),v3(0,0,0),1)
  1395. SetWeld(Neck,0,i,ASpeed/1.3,wNE,wNE2,v3(0,1.5,0),v3(-20,0,0),1)
  1396. SetWeld(wLSword,0,i,ASpeed/1.3,wLS,wLS2,v3(0,-0.95,0),v3(-130,0,0),1)
  1397. SetWeld(wRSword,0,i,ASpeed/1.3,wRS,wRS2,v3(0,-0.95,0),v3(-130,0,0),1)
  1398. wait(0)
  1399. end
  1400. Dmg = false
  1401. ReturnPose(not Walking)
  1402. Anim = ""
  1403. end
  1404.  
  1405. if Anim == "Choke" and keys["z"] then
  1406. if not CurrentBlades[1] and not CurrentBlades[2] then return end
  1407. Anim = "Assassinate"
  1408. end
  1409. end)
  1410. end
  1411.  
  1412.  
  1413. Anim = ""
  1414. Footsteps = {as.Footstep1,as.Footstep2,as.Footstep3}
  1415. Grappling = false
  1416. ASpeed = 9
  1417. Attack = 1
  1418. CurrentBlades = {nil,nil}
  1419.  
  1420. PoseLA=v3(-1.5,0.5,0) PoseLA2=v3(-10,15,-20)
  1421. PoseRA=v3(1.5,0.5,0) PoseRA2=v3(-10,-15,20)
  1422. PoseLL=v3(-0.5,-1,0) PoseLL2=v3(0,12,-12)
  1423. PoseRL=v3(0.5,-1,0) PoseRL2=v3(0,-12,12)
  1424. PoseRT=v3(0,0,0) PoseRT2=v3(0,0,0)
  1425. PoseNE=v3(0,1.5,0) PoseNE2=v3(0,0,0)
  1426. PoseLS=v3(0,-0.95,-0.25) PoseLS2=v3(-90,0,0)
  1427. PoseRS=v3(0,-0.95,-0.25) PoseRS2=v3(-90,0,0)
  1428. Arms() Legs()
  1429. ReturnPose()
  1430. Arms(0) Legs(0)
  1431.  
  1432.  
  1433. Walking=false
  1434. Humanoid.Running:connect(function(Walk) Walking=Walk>0 and true or false end)
  1435. Humanoid.Changed:connect(function() if Anim ~= "" then Humanoid.Jump = false end end)
  1436. Humanoid.Jumping:connect(function()
  1437. if Anim == "" then
  1438. if WalkMode == "Run" then
  1439. if not qPart and not ePart then
  1440. Anim = "Jump"
  1441. local torsoVector = RootPart.CFrame.lookVector
  1442. local forz = v3(torsoVector.x,0,torsoVector.z)
  1443. RePose()
  1444. Force.force=forz*12000
  1445. CanGrapple = false
  1446. for i=1,ASpeed do
  1447. SetWeld(LAW,0,i,ASpeed,wLA,wLA2,v3(-1.5,0.5,0),v3(205,-15,15),0)
  1448. SetWeld(RAW,0,i,ASpeed,wRA,wRA2,v3(1.5,0.5,0),v3(205,15,-15),0)
  1449. SetWeld(LLW,0,i,ASpeed,wLL,wLL2,v3(-0.5,-1,0),v3(15,0,-5),0)
  1450. SetWeld(RLW,0,i,ASpeed,wRL,wRL2,v3(0.5,-1,0),v3(15,0,5),0)
  1451. SetWeld(Neck,0,i,ASpeed,wNE,wNE2,v3(0,1.5,0),v3(10,0,0),0)
  1452. SetWeld(Root,0,i,ASpeed,wRT,wRT2,v3(0,0,0),v3(-65,0,0),0)
  1453. SetWeld(wLSword,0,i,ASpeed,wLS,wLS2,v3(0,-0.95,0),v3(-270,40,0),0)
  1454. SetWeld(wRSword,0,i,ASpeed,wRS,wRS2,v3(0,-0.95,0),v3(-270,-40,0),0)
  1455. wait(0)
  1456. end
  1457. Dmg=true
  1458. RePose()
  1459. for i=1,ASpeed*1.8 do
  1460. SetWeld(LAW,0,i,ASpeed*1.8,wLA,wLA2,v3(-1.5,0.5,0),v3(155,-15,15),1)
  1461. SetWeld(RAW,0,i,ASpeed*1.8,wRA,wRA2,v3(1.5,0.5,0),v3(155,15,-15),1)
  1462. SetWeld(Neck,0,i,ASpeed*1.8,wNE,wNE2,v3(0,1.5,0),v3(10,0,0),1)
  1463. SetWeld(Root,0,i,ASpeed*1.8,wRT,wRT2,v3(0,-1.5,0),v3(-360-75,0,0),1)
  1464. wait(0)
  1465. end
  1466. RePose()
  1467. ClearWeld(Root)
  1468. SetWeld(Root,0,1,1,wRT,wRT2,v3(0,-1.5,0),v3(-75,0,0),0)
  1469. Humanoid.WalkSpeed = 0
  1470.  
  1471. repeat wait(0)
  1472. hit,hitpos = Raycast(Torso.Position,Torso.Position - (Torso.CFrame*cn(0,0,1)).p,6,Char)
  1473. until (hit and hitpos) or Grappling
  1474. Force.force=v3(0,0,0)
  1475. wait(0.2)
  1476. Dmg=false
  1477. ReturnPose()
  1478. CanGrapple = true
  1479. Humanoid.WalkSpeed = 28
  1480. Anim = ""
  1481. end
  1482.  
  1483. elseif WalkMode == "Walk" then
  1484. if not qPart and not ePart then
  1485. Anim = "Jump"
  1486. RePose()
  1487. for i=1,ASpeed do
  1488. SetWeld(LAW,0,i,ASpeed,wLA,wLA2,v3(-1.5,0.5,0),v3(135,-15,-15),1)
  1489. SetWeld(RAW,0,i,ASpeed,wRA,wRA2,v3(1.5,0.5,0),v3(135,15,15),1)
  1490. SetWeld(LLW,0,i,ASpeed,wLL,wLL2,v3(-0.5,-1,0),v3(-15,0,-5),1)
  1491. SetWeld(RLW,0,i,ASpeed,wRL,wRL2,v3(0.5,-1,0),v3(-15,0,5),1)
  1492. SetWeld(Neck,0,i,ASpeed,wNE,wNE2,v3(0,1.5,0),v3(-5,0,0),1)
  1493. SetWeld(Root,0,i,ASpeed,wRT,wRT2,v3(0,0,0),v3(-15,0,0),1)
  1494. wait(0)
  1495. end
  1496.  
  1497. repeat wait()
  1498. hit,hitpos = Raycast(Torso.Position,Torso.Position - (Torso.CFrame*cn(0,3,0)).p,6,Char)
  1499. until hit and hitpos
  1500. PlaySound(Footsteps[mran(1,#Footsteps)],1,1,Torso)
  1501. ReturnPose()
  1502. Anim = ""
  1503. end
  1504. end
  1505. end
  1506. end)
  1507.  
  1508. Humanoid.Died:connect(function() Pack:Destroy() script:Destroy() end)
  1509.  
  1510.  
  1511. -- Walk / Run / Idle animations
  1512. Idling = true
  1513. Spawn(function()
  1514. while wait(0) do
  1515. if not Grappling and not Humanoid.PlatformStand and not Humanoid.Sit then
  1516. if Torso.Velocity.magnitude > 2 then
  1517. Idling = false
  1518. Arms(0)
  1519. Legs(0)
  1520. if WalkMode == "Walk" then -- walk anims
  1521. local num=1
  1522. if not Humanoid.Jump and Anim ~= "Flip Slash" and Anim ~= "Jump" then
  1523. PlaySound(Footsteps[mran(1,#Footsteps)],1,1,Torso)
  1524. end
  1525. RePose()
  1526. for i=1,ASpeed*num do
  1527. if Anim ~= "Flip Slash" and Anim ~= "Jump" then
  1528. SetWeld(LLW,0,i,ASpeed*num,wLL,wLL2,v3(-0.5,-1,0),v3(-20,0,-3),0)
  1529. SetWeld(RLW,0,i,ASpeed*num,wRL,wRL2,v3(0.5,-1,0),v3(20,0,3),0)
  1530. end
  1531. if Anim == "" then
  1532. SetWeld(LAW,0,i,ASpeed*num,wLA,wLA2,v3(-1.5,0.5,0),v3(20,-8,-10),0)
  1533. SetWeld(RAW,0,i,ASpeed*num,wRA,wRA2,v3(1.5,0.5,0),v3(-20,8,10),0)
  1534. SetWeld(Root,0,i,ASpeed*num,wRT,wRT2,v3(0,0,0),v3(0,0,0),0)
  1535. SetWeld(Neck,0,i,ASpeed*num,wNE,wNE2,v3(0,1.5,0),v3(-5,0,0),0)
  1536.  
  1537. end
  1538. wait(0)
  1539. if Torso.Velocity.magnitude<2 or Grappling then -- break
  1540. if Anim=="" then
  1541. Anim="Return"
  1542. ReturnPose()
  1543. Anim=""
  1544. end
  1545. break
  1546. end
  1547. end
  1548. if not Humanoid.Jump and Anim ~= "Flip Slash" and Anim ~= "Jump" then
  1549. PlaySound(Footsteps[mran(1,#Footsteps)],1,1,Torso)
  1550. end
  1551. RePose()
  1552. for i=1,ASpeed*num do
  1553. if Anim ~= "Flip Slash" and Anim ~= "Jump" then
  1554. SetWeld(LLW,0,i,ASpeed*num,wLL,wLL2,v3(-0.5,-1,0),v3(20,0,-3),0)
  1555. SetWeld(RLW,0,i,ASpeed*num,wRL,wRL2,v3(0.5,-1,0),v3(-20,0,3),0)
  1556. end
  1557. if Anim == "" then
  1558. SetWeld(LAW,0,i,ASpeed*num,wLA,wLA2,v3(-1.5,0.5,0),v3(-20,-8,-10),0)
  1559. SetWeld(RAW,0,i,ASpeed*num,wRA,wRA2,v3(1.5,0.5,0),v3(20,8,10),0)
  1560. SetWeld(Root,0,i,ASpeed*num,wRT,wRT2,v3(0,0,0),v3(0,0,0),0)
  1561. SetWeld(Neck,0,i,ASpeed*num,wNE,wNE2,v3(0,1.5,0),v3(-5,0,0),0)
  1562. end
  1563. wait(0)
  1564. if Torso.Velocity.magnitude<2 or Grappling or WalkMode~="Walk" then -- break
  1565. if Anim=="" then
  1566. Anim="Return"
  1567. ReturnPose()
  1568. Anim=""
  1569. end
  1570. break
  1571. end
  1572. end
  1573. elseif WalkMode == "Run" then -- run anims
  1574. local num = 0.8
  1575. local ang = 50
  1576. if not Humanoid.Jump and Anim ~= "Flip Slash" and Anim ~= "Jump" then
  1577. PlaySound(Footsteps[mran(1,#Footsteps)],1,1,Torso)
  1578. end
  1579. RePose()
  1580. for i=1,ASpeed*num do
  1581. if Anim ~= "Flip Slash" and Anim ~= "Jump" then
  1582. SetWeld(LLW,0,i,ASpeed*num,wLL,wLL2,v3(-0.5,-1,0),v3(-ang,0,-3),0)
  1583. SetWeld(RLW,0,i,ASpeed*num,wRL,wRL2,v3(0.5,-1,0),v3(ang,0,3),0)
  1584. end
  1585. if Anim == "" then
  1586. SetWeld(LAW,0,i,ASpeed*num,wLA,wLA2,v3(-1.5,0.5,0),v3(-90+15,90,0),0)
  1587. SetWeld(RAW,0,i,ASpeed*num,wRA,wRA2,v3(1.5,0.5,0),v3(-90+15,-90,0),0)
  1588. SetWeld(Root,0,i,ASpeed*num,wRT,wRT2,v3(0,0,0),v3(-15,0,0),0)
  1589. SetWeld(Neck,0,i,ASpeed*num,wNE,wNE2,v3(0,1.5,-0.2),v3(-15,0,0),0)
  1590. end
  1591. wait(0)
  1592. if Torso.Velocity.magnitude<2 or Grappling or WalkMode~="Run" then -- break
  1593. if Anim=="" then
  1594. Anim="Return"
  1595. ReturnPose()
  1596. Anim=""
  1597. end
  1598. break
  1599. end
  1600. end
  1601. if not Humanoid.Jump and Anim ~= "Flip Slash" and Anim ~= "Jump" then
  1602. PlaySound(Footsteps[mran(1,#Footsteps)],1,1,Torso)
  1603. end
  1604. RePose()
  1605. for i=1,ASpeed*num do
  1606. if Anim ~= "Flip Slash" and Anim ~= "Jump" then
  1607. SetWeld(LLW,0,i,ASpeed*num,wLL,wLL2,v3(-0.5,-1,0),v3(ang,0,-3),0)
  1608. SetWeld(RLW,0,i,ASpeed*num,wRL,wRL2,v3(0.5,-1,0),v3(-ang,0,-3),0)
  1609. end
  1610. if Anim == "" then
  1611. SetWeld(LAW,0,i,ASpeed*num,wLA,wLA2,v3(-1.5,0.5,0),v3(-90+25,90,0),0)
  1612. SetWeld(RAW,0,i,ASpeed*num,wRA,wRA2,v3(1.5,0.5,0),v3(-90+25,-90,0),0)
  1613. SetWeld(Root,0,i,ASpeed*num,wRT,wRT2,v3(0,0,0),v3(-25,0,0),0)
  1614. SetWeld(Neck,0,i,ASpeed*num,wNE,wNE2,v3(0,1.5,-0.2),v3(-25,0,0),0)
  1615. end
  1616. wait(0)
  1617. if Torso.Velocity.magnitude<2 or Grappling or WalkMode~="Run" then -- break
  1618. if Anim=="" then
  1619. Anim="Return"
  1620. ReturnPose()
  1621. Anim=""
  1622. end
  1623. break
  1624. end
  1625. end
  1626. end
  1627. elseif Torso.Velocity.magnitude < 2 then -- idle anims
  1628. Idling = true
  1629. if Anim == "" then
  1630. --ReturnPose()
  1631. local num=WalkMode=="Walk" and 6.5 or 5
  1632. RePose()
  1633. for i=1,ASpeed*num do
  1634. SetWeld(LAW,0,i,ASpeed*num,wLA,wLA2,v3(-1.5,0.5,0),v3(0,15,-20),1)
  1635. SetWeld(RAW,0,i,ASpeed*num,wRA,wRA2,v3(1.5,0.5,0),v3(0,-15,20),1)
  1636. SetWeld(LLW,0,i,ASpeed*num,wLL,wLL2,v3(-0.5,-1,0),v3(0,12,-12),1)
  1637. SetWeld(RLW,0,i,ASpeed*num,wRL,wRL2,v3(0.5,-1,0),v3(0,-12,12),1)
  1638. SetWeld(Root,0,i,ASpeed*num,wRT,wRT2,v3(0,0,0),v3(0,0,0),1)
  1639. SetWeld(Neck,0,i,ASpeed*num,wNE,wNE2,v3(0,1.5,-0.1),v3(3,0,0),1)
  1640. if Torso.Velocity.magnitude>2 or Anim~="" or Grappling then -- break
  1641. break
  1642. end
  1643. wait(0)
  1644. end
  1645. RePose()
  1646. for i=1,ASpeed*(num-1.5) do
  1647. SetWeld(LAW,0,i,ASpeed*(num-1.5),wLA,wLA2,v3(-1.5,0.5,0),v3(0,-4,-15),1)
  1648. SetWeld(RAW,0,i,ASpeed*(num-1.5),wRA,wRA2,v3(1.5,0.5,0),v3(0,4,15),1)
  1649. SetWeld(LLW,0,i,ASpeed*(num-1.5),wLL,wLL2,v3(-0.5,-1,0),v3(0,4,-4),1)
  1650. SetWeld(RLW,0,i,ASpeed*(num-1.5),wRL,wRL2,v3(0.5,-1,0),v3(0,-4,4),1)
  1651. SetWeld(Root,0,i,ASpeed*(num-1.5),wRT,wRT2,v3(0,0,0),v3(0,0,0),1)
  1652. SetWeld(Neck,0,i,ASpeed*(num-1.5),wNE,wNE2,v3(0,1.5,-0.1),v3(-8,0,0),1)
  1653. if Torso.Velocity.magnitude>2 or Anim~="" or Grappling then -- break
  1654. break
  1655. end
  1656. wait(0)
  1657. end
  1658. end
  1659. end
  1660. end
  1661. end
  1662. end)
  1663.  
  1664.  
  1665. -- Main loop
  1666. Count = 0
  1667. game:GetService("RunService").RenderStepped:connect(function()
  1668. Count = Count + 1
  1669. if Pack.Parent then
  1670. -- Grapple sticking
  1671. if qOffset and qHit and qPart then
  1672. qPart.CFrame = qHit.CFrame * qOffset
  1673. end
  1674. if eOffset and eHit and ePart then
  1675. ePart.CFrame = eHit.CFrame * eOffset
  1676. end
  1677. if qPart and ePart and qePart then
  1678. qePart.CFrame = cn(qPart.CFrame.p,ePart.CFrame.p)*cn(0,0,-(qPart.CFrame.p-ePart.CFrame.p).magnitude/2)
  1679. end
  1680. -- Rope
  1681. if qRope then
  1682. qRope.Mesh.Scale = v3(0.25,(qbb.CFrame.p-qPart.CFrame.p).magnitude,0.25)
  1683. qRope.CFrame = cn(qbb.CFrame.p,qPart.CFrame.p)*ca(-90,0,0)*cn(0,(qbb.CFrame.p-qPart.CFrame.p).magnitude/2,0)
  1684. end
  1685. if eRope then
  1686. eRope.Mesh.Scale = v3(0.25,(ebb.CFrame.p-ePart.CFrame.p).magnitude,0.25)
  1687. eRope.CFrame = cn(ebb.CFrame.p,ePart.CFrame.p)*ca(-90,0,0)*cn(0,(ebb.CFrame.p-ePart.CFrame.p).magnitude/2,0)
  1688. end
  1689. -- Mouse gyro, force, and boosting
  1690. if (qHit and qProp) or (eHit and eProp) or (qePart and qeProp) then
  1691. if qProp then qProp:Fire() end
  1692. if eProp then eProp:Fire() end
  1693. if qeProp then qeProp:Fire() end
  1694. RootPart.CFrame = cn(RootPart.CFrame.p,Mouse.Hit.p)
  1695. if keys["4"] and Gas>0 then
  1696. if Count%10==0 then
  1697. iNew{"Smoke",hp2,Color=bc("Medium stone grey").Color,Opacity=0.5,RiseVelocity=7,Size=2}
  1698. deb:AddItem(LastMade,1)
  1699. Gas = Gas - 0.005
  1700. end
  1701. Force.force=RootPart.CFrame.lookVector*3000
  1702. MaxSpeed = 400
  1703. ThrustP = 5
  1704. UpdatePropulsions()
  1705. elseif not keys["4"] then
  1706. Force.force=RootPart.CFrame.lookVector*0
  1707. MaxSpeed = 300
  1708. ThrustP = 5
  1709. UpdatePropulsions()
  1710. end
  1711. elseif not qProp and not eProp and not qeProp then
  1712. if not Anim == "Jump" and not Anim == "Flip Slash" then
  1713. Force.force = v3(0,0,0)
  1714. end
  1715. end
  1716. -- Walkspeed
  1717. if WalkMode == "Walk" and Anim == "" then
  1718. Humanoid.WalkSpeed = 10
  1719. elseif WalkMode == "Run" and Anim == "" then
  1720. Humanoid.WalkSpeed = 28
  1721. end
  1722. -- PlatformStand
  1723. if Grappling and not Humanoid.PlatformStand then
  1724. GrappleStance()
  1725. end
  1726. -- Sharpness and Gas
  1727. if Sharpness <= 0 then
  1728. Sharpness = 0
  1729. if CurrentBlades[1] and CurrentBlades[2] then
  1730. PlaySound(as.Disconnect,1,1,Torso)
  1731. CurrentBlades[1].Part0 = nil
  1732. CurrentBlades[1].Part1.CanCollide = true
  1733. CurrentBlades[1] = nil
  1734.  
  1735. CurrentBlades[2].Part0 = nil
  1736. CurrentBlades[2].Part1.CanCollide = true
  1737. CurrentBlades[2] = nil
  1738. end
  1739. end
  1740. if Gas <= 0 then
  1741. Gas = 0
  1742. end
  1743. if Gui then
  1744. SwordBar.Size = ud(Sharpness,0,1,0)
  1745. GasBar.Size = ud(Gas,0,1,0)
  1746. end
  1747. end
  1748. end)
  1749. --[[
  1750. -- props (only really useful for when there is no map)
  1751. for _,prop in pairs(workspace:GetChildren()) do
  1752. if prop.Name=="prop" and prop:IsA("BasePart") then
  1753. prop:Destroy()
  1754. end
  1755. end
  1756. tp=iPart{workspace,80,5,700,cf=cn(0,200,600)*ca(15,0,0),an=true,ca=true} tp.Name="prop"
  1757. for i=1,10 do
  1758. local sizeY = mran(25,250)
  1759. tp=iPart{workspace,15,sizeY,15,cf=cn(mran(-300,300),sizeY/2.5,mran(-300,300))*ca(mran(-15,15),0,mran(-15,15)),an=true,ca=true} tp.Name="prop"
  1760. end
  1761. for i=1,100 do
  1762. local tp = iPart{workspace,i==100 and 80 or mran(40,60),6,i==100 and 80 or mran(15,30),an=true,ca=true,co=i==100 and "Black" or "Medium stone grey",
  1763. cf=cn(mran(-150,150),250+(i*mran(80,120)),mran(-100,100))*ca(mran(-15,15),mran(-360,360),mran(-15,15))
  1764. }
  1765. tp.Name="prop"
  1766. end]]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement