carlosname

Untitled

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