-----------------

another 3dmg yes again *might work*

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