Advertisement
DavisRBLX

test 3DmG

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