Deyer

Untitled

Apr 16th, 2023
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 74.05 KB | None | 0 0
  1. game.Players.LocalPlayer.Character["Hat1"].Handle.Mesh:Destroy()
  2. game.Players.LocalPlayer.Character["Pal Hair"].Handle.Mesh:Destroy() --Pink Hair
  3. game.Players.LocalPlayer.Character["Pink Hair"].Handle.Mesh:Destroy()
  4. game.Players.LocalPlayer.Character["Kate Hair"].Handle.Mesh:Destroy() --LavanderHair
  5. game.Players.LocalPlayer.Character["LavanderHair"].Handle.Mesh:Destroy()
  6. game.Players.LocalPlayer.Character["Robloxclassicred"].Handle.Mesh:Destroy()
  7. game.Players.LocalPlayer.Character["Necklace"].Handle.Mesh:Destroy()
  8.  
  9. local c = game.Players.LocalPlayer.Character
  10. for i, v in pairs({"Right Arm", "Left Arm"}) do
  11. local arm = c[v]
  12. arm.Parent = nil
  13. arm.Transparency = 1
  14. arm.Parent = c
  15. end
  16.  
  17. local c = game.Players.LocalPlayer.Character
  18. for i, v in pairs({"Right Leg", "Left Leg"}) do
  19. local Leg = c[v]
  20. Leg.Parent = nil
  21. Leg.Transparency = 1
  22. Leg.Parent = c
  23. end
  24.  
  25. local v3_net, v3_808 = Vector3.new(0, 25.1, 0), Vector3.new(8, 0, 8)
  26. local function getNetlessVelocity(realPartVelocity)
  27. local mag = realPartVelocity.Magnitude
  28. if mag > 1 then
  29. local unit = realPartVelocity.Unit
  30. if (unit.Y > 0.25) or (unit.Y < -0.75) then
  31. return unit * (25.1 / unit.Y)
  32. end
  33. end
  34. return v3_net + realPartVelocity * v3_808
  35. end
  36. local simradius = "shp" --simulation radius (net bypass) method
  37. --simulation radius (net bypass) method
  38. --"shp" - sethiddenproperty
  39. --"ssr" - setsimulationradius
  40. --false - disable
  41. local antiragdoll = true --removes hingeConstraints and ballSocketConstraints from your character
  42. local newanimate = true --disables the animate script and enables after reanimation
  43. local discharscripts = true --disables all localScripts parented to your character before reanimation
  44. local R15toR6 = true --tries to convert your character to r6 if its r15
  45. local hatcollide = true --makes hats cancollide (only method 0)
  46. local humState16 = true --enables collisions for limbs before the humanoid dies (using hum:ChangeState)
  47. local addtools = false --puts all tools from backpack to character and lets you hold them after reanimation
  48. local hedafterneck = false --disable aligns for head and enable after neck is removed
  49. local loadtime = game:GetService("Players").RespawnTime + 0.5 --anti respawn delay
  50. local method = 0 --reanimation method
  51. --methods:
  52. --0 - breakJoints (takes [loadtime] seconds to laod)
  53. --1 - limbs
  54. --2 - limbs + anti respawn
  55. --3 - limbs + breakJoints after [loadtime] seconds
  56. --4 - remove humanoid + breakJoints
  57. --5 - remove humanoid + limbs
  58. local alignmode = 2 --AlignPosition mode
  59. --modes:
  60. --1 - AlignPosition rigidity enabled true
  61. --2 - 2 AlignPositions rigidity enabled both true and false
  62. --3 - AlignPosition rigidity enabled false
  63.  
  64. healthHide = healthHide and ((method == 0) or (method == 2) or (method == 000)) and gp(c, "Head", "BasePart")
  65.  
  66. local lp = game:GetService("Players").LocalPlayer
  67. local rs = game:GetService("RunService")
  68. local stepped = rs.Stepped
  69. local heartbeat = rs.Heartbeat
  70. local renderstepped = rs.RenderStepped
  71. local sg = game:GetService("StarterGui")
  72. local ws = game:GetService("Workspace")
  73. local cf = CFrame.new
  74. local v3 = Vector3.new
  75. local v3_0 = v3(0, 0, 0)
  76. local inf = math.huge
  77.  
  78. local c = lp.Character
  79.  
  80. if not (c and c.Parent) then
  81. return
  82. end
  83.  
  84. c.Destroying:Connect(function()
  85. c = nil
  86. end)
  87.  
  88. local function gp(parent, name, className)
  89. if typeof(parent) == "Instance" then
  90. for i, v in pairs(parent:GetChildren()) do
  91. if (v.Name == name) and v:IsA(className) then
  92. return v
  93. end
  94. end
  95. end
  96. return nil
  97. end
  98.  
  99. local function align(Part0, Part1)
  100. Part0.CustomPhysicalProperties = PhysicalProperties.new(0.0001, 0.0001, 0.0001, 0.0001, 0.0001)
  101.  
  102. local att0 = Instance.new("Attachment", Part0)
  103. att0.Orientation = v3_0
  104. att0.Position = v3_0
  105. att0.Name = "att0_" .. Part0.Name
  106. local att1 = Instance.new("Attachment", Part1)
  107. att1.Orientation = v3_0
  108. att1.Position = v3_0
  109. att1.Name = "att1_" .. Part1.Name
  110.  
  111. if (alignmode == 1) or (alignmode == 2) then
  112. local ape = Instance.new("AlignPosition", att0)
  113. ape.ApplyAtCenterOfMass = false
  114. ape.MaxForce = inf
  115. ape.MaxVelocity = inf
  116. ape.ReactionForceEnabled = false
  117. ape.Responsiveness = 200
  118. ape.Attachment1 = att1
  119. ape.Attachment0 = att0
  120. ape.Name = "AlignPositionRtrue"
  121. ape.RigidityEnabled = true
  122. end
  123.  
  124. if (alignmode == 2) or (alignmode == 3) then
  125. local apd = Instance.new("AlignPosition", att0)
  126. apd.ApplyAtCenterOfMass = false
  127. apd.MaxForce = inf
  128. apd.MaxVelocity = inf
  129. apd.ReactionForceEnabled = false
  130. apd.Responsiveness = 200
  131. apd.Attachment1 = att1
  132. apd.Attachment0 = att0
  133. apd.Name = "AlignPositionRfalse"
  134. apd.RigidityEnabled = false
  135. end
  136.  
  137. local ao = Instance.new("AlignOrientation", att0)
  138. ao.MaxAngularVelocity = inf
  139. ao.MaxTorque = inf
  140. ao.PrimaryAxisOnly = false
  141. ao.ReactionTorqueEnabled = false
  142. ao.Responsiveness = 200
  143. ao.Attachment1 = att1
  144. ao.Attachment0 = att0
  145. ao.RigidityEnabled = false
  146.  
  147. if type(getNetlessVelocity) == "function" then
  148. local realVelocity = v3_0
  149. local steppedcon = stepped:Connect(function()
  150. Part0.Velocity = realVelocity
  151. end)
  152. local heartbeatcon = heartbeat:Connect(function()
  153. realVelocity = Part0.Velocity
  154. Part0.Velocity = getNetlessVelocity(realVelocity)
  155. end)
  156. Part0.Destroying:Connect(function()
  157. Part0 = nil
  158. steppedcon:Disconnect()
  159. heartbeatcon:Disconnect()
  160. end)
  161. end
  162. end
  163.  
  164. local function respawnrequest()
  165. local ccfr = ws.CurrentCamera.CFrame
  166. local c = lp.Character
  167. lp.Character = nil
  168. lp.Character = c
  169. local con = nil
  170. con = ws.CurrentCamera.Changed:Connect(function(prop)
  171. if (prop ~= "Parent") and (prop ~= "CFrame") then
  172. return
  173. end
  174. ws.CurrentCamera.CFrame = ccfr
  175. con:Disconnect()
  176. end)
  177. end
  178.  
  179. local destroyhum = (method == 4) or (method == 5)
  180. local breakjoints = (method == 0) or (method == 4)
  181. local antirespawn = (method == 0) or (method == 2) or (method == 3)
  182.  
  183. hatcollide = hatcollide and (method == 0)
  184.  
  185. addtools = addtools and gp(lp, "Backpack", "Backpack")
  186.  
  187. local fenv = getfenv()
  188. local shp = fenv.sethiddenproperty or fenv.set_hidden_property or fenv.set_hidden_prop or fenv.sethiddenprop
  189. local ssr = fenv.setsimulationradius or fenv.set_simulation_radius or fenv.set_sim_radius or fenv.setsimradius or fenv.set_simulation_rad or fenv.setsimulationrad
  190.  
  191. if shp and (simradius == "shp") then
  192. spawn(function()
  193. while c and heartbeat:Wait() do
  194. shp(lp, "SimulationRadius", inf)
  195. end
  196. end)
  197. elseif ssr and (simradius == "ssr") then
  198. spawn(function()
  199. while c and heartbeat:Wait() do
  200. ssr(inf)
  201. end
  202. end)
  203. end
  204.  
  205. antiragdoll = antiragdoll and function(v)
  206. if v:IsA("HingeConstraint") or v:IsA("BallSocketConstraint") then
  207. v.Parent = nil
  208. end
  209. end
  210.  
  211. if antiragdoll then
  212. for i, v in pairs(c:GetDescendants()) do
  213. antiragdoll(v)
  214. end
  215. c.DescendantAdded:Connect(antiragdoll)
  216. end
  217.  
  218. if antirespawn then
  219. respawnrequest()
  220. end
  221.  
  222. if method == 0 then
  223. wait(loadtime)
  224. if not c then
  225. return
  226. end
  227. end
  228.  
  229. if discharscripts then
  230. for i, v in pairs(c:GetChildren()) do
  231. if v:IsA("LocalScript") then
  232. v.Disabled = true
  233. end
  234. end
  235. elseif newanimate then
  236. local animate = gp(c, "Animate", "LocalScript")
  237. if animate and (not animate.Disabled) then
  238. animate.Disabled = true
  239. else
  240. newanimate = false
  241. end
  242. end
  243.  
  244. if addtools then
  245. for i, v in pairs(addtools:GetChildren()) do
  246. if v:IsA("Tool") then
  247. v.Parent = c
  248. end
  249. end
  250. end
  251.  
  252. pcall(function()
  253. settings().Physics.AllowSleep = false
  254. settings().Physics.PhysicsEnvironmentalThrottle = Enum.EnviromentalPhysicsThrottle.Disabled
  255. end)
  256.  
  257. local OLDscripts = {}
  258.  
  259. for i, v in pairs(c:GetDescendants()) do
  260. if v.ClassName == "Script" then
  261. table.insert(OLDscripts, v)
  262. end
  263. end
  264.  
  265. local scriptNames = {}
  266.  
  267. for i, v in pairs(c:GetDescendants()) do
  268. if v:IsA("BasePart") then
  269. local newName = tostring(i)
  270. local exists = true
  271. while exists do
  272. exists = false
  273. for i, v in pairs(OLDscripts) do
  274. if v.Name == newName then
  275. exists = true
  276. end
  277. end
  278. if exists then
  279. newName = newName .. "_"
  280. end
  281. end
  282. table.insert(scriptNames, newName)
  283. Instance.new("Script", v).Name = newName
  284. end
  285. end
  286.  
  287. c.Archivable = true
  288. local hum = c:FindFirstChildOfClass("Humanoid")
  289. if hum then
  290. for i, v in pairs(hum:GetPlayingAnimationTracks()) do
  291. v:Stop()
  292. end
  293. end
  294. local cl = c:Clone()
  295. if hum and humState16 then
  296. hum:ChangeState(Enum.HumanoidStateType.Physics)
  297. if destroyhum then
  298. wait(1.6)
  299. end
  300. end
  301. if hum and hum.Parent and destroyhum then
  302. hum:Destroy()
  303. end
  304.  
  305. if not c then
  306. return
  307. end
  308.  
  309. local head = gp(c, "Head", "BasePart")
  310. local torso = gp(c, "Torso", "BasePart") or gp(c, "UpperTorso", "BasePart")
  311. local root = gp(c, "HumanoidRootPart", "BasePart")
  312. if hatcollide and c:FindFirstChildOfClass("Accessory") then
  313. local anything = c:FindFirstChildOfClass("BodyColors") or gp(c, "Health", "Script")
  314. if not (torso and root and anything) then
  315. return
  316. end
  317. torso:Destroy()
  318. root:Destroy()
  319. if shp then
  320. for i,v in pairs(c:GetChildren()) do
  321. if v:IsA("Accessory") then
  322. shp(v, "BackendAccoutrementState", 0)
  323. end
  324. end
  325. end
  326. anything:Destroy()
  327. if head then
  328. head:Destroy()
  329. end
  330. end
  331.  
  332. for i, v in pairs(cl:GetDescendants()) do
  333. if v:IsA("BasePart") then
  334. v.Transparency = 1
  335. v.Anchored = false
  336. end
  337. end
  338.  
  339. local model = Instance.new("Model", c)
  340. model.Name = model.ClassName
  341.  
  342. model.Destroying:Connect(function()
  343. model = nil
  344. end)
  345.  
  346. for i, v in pairs(c:GetChildren()) do
  347. if v ~= model then
  348. if addtools and v:IsA("Tool") then
  349. for i1, v1 in pairs(v:GetDescendants()) do
  350. if v1 and v1.Parent and v1:IsA("BasePart") then
  351. local bv = Instance.new("BodyVelocity", v1)
  352. bv.Velocity = v3_0
  353. bv.MaxForce = v3(1000, 1000, 1000)
  354. bv.P = 1250
  355. bv.Name = "bv_" .. v.Name
  356. end
  357. end
  358. end
  359. v.Parent = model
  360. end
  361. end
  362.  
  363. if breakjoints then
  364. model:BreakJoints()
  365. else
  366. if head and torso then
  367. for i, v in pairs(model:GetDescendants()) do
  368. if v:IsA("Weld") or v:IsA("Snap") or v:IsA("Glue") or v:IsA("Motor") or v:IsA("Motor6D") then
  369. local save = false
  370. if (v.Part0 == torso) and (v.Part1 == head) then
  371. save = true
  372. end
  373. if (v.Part0 == head) and (v.Part1 == torso) then
  374. save = true
  375. end
  376. if save then
  377. if hedafterneck then
  378. hedafterneck = v
  379. end
  380. else
  381. v:Destroy()
  382. end
  383. end
  384. end
  385. end
  386. if method == 3 then
  387. spawn(function()
  388. wait(loadtime)
  389. if model then
  390. model:BreakJoints()
  391. end
  392. end)
  393. end
  394. end
  395.  
  396. cl.Parent = c
  397. for i, v in pairs(cl:GetChildren()) do
  398. v.Parent = c
  399. end
  400. cl:Destroy()
  401.  
  402. local modelDes = {}
  403. for i, v in pairs(model:GetDescendants()) do
  404. if v:IsA("BasePart") then
  405. i = tostring(i)
  406. v.Destroying:Connect(function()
  407. modelDes[i] = nil
  408. end)
  409. modelDes[i] = v
  410. end
  411. end
  412. local modelcolcon = nil
  413. local function modelcolf()
  414. if model then
  415. for i, v in pairs(modelDes) do
  416. v.CanCollide = false
  417. end
  418. else
  419. modelcolcon:Disconnect()
  420. end
  421. end
  422. modelcolcon = stepped:Connect(modelcolf)
  423. modelcolf()
  424.  
  425. for i, scr in pairs(model:GetDescendants()) do
  426. if (scr.ClassName == "Script") and table.find(scriptNames, scr.Name) then
  427. local Part0 = scr.Parent
  428. if Part0:IsA("BasePart") then
  429. for i1, scr1 in pairs(c:GetDescendants()) do
  430. if (scr1.ClassName == "Script") and (scr1.Name == scr.Name) and (not scr1:IsDescendantOf(model)) then
  431. local Part1 = scr1.Parent
  432. if (Part1.ClassName == Part0.ClassName) and (Part1.Name == Part0.Name) then
  433. align(Part0, Part1)
  434. break
  435. end
  436. end
  437. end
  438. end
  439. end
  440. end
  441.  
  442. if (typeof(hedafterneck) == "Instance") and head then
  443. local aligns = {}
  444. local con = nil
  445. con = hedafterneck.Changed:Connect(function(prop)
  446. if (prop == "Parent") and not hedafterneck.Parent then
  447. con:Disconnect()
  448. for i, v in pairs(aligns) do
  449. v.Enabled = true
  450. end
  451. end
  452. end)
  453. for i, v in pairs(head:GetDescendants()) do
  454. if v:IsA("AlignPosition") or v:IsA("AlignOrientation") then
  455. i = tostring(i)
  456. aligns[i] = v
  457. v.Destroying:Connect(function()
  458. aligns[i] = nil
  459. end)
  460. v.Enabled = false
  461. end
  462. end
  463. end
  464.  
  465. for i, v in pairs(c:GetDescendants()) do
  466. if v and v.Parent then
  467. if v.ClassName == "Script" then
  468. if table.find(scriptNames, v.Name) then
  469. v:Destroy()
  470. end
  471. elseif not v:IsDescendantOf(model) then
  472. if v:IsA("Decal") then
  473. v.Transparency = 1
  474. elseif v:IsA("ForceField") then
  475. v.Visible = false
  476. elseif v:IsA("Sound") then
  477. v.Playing = false
  478. elseif v:IsA("BillboardGui") or v:IsA("SurfaceGui") or v:IsA("ParticleEmitter") or v:IsA("Fire") or v:IsA("Smoke") or v:IsA("Sparkles") then
  479. v.Enabled = false
  480. end
  481. end
  482. end
  483. end
  484.  
  485. if newanimate then
  486. local animate = gp(c, "Animate", "LocalScript")
  487. if animate then
  488. animate.Disabled = false
  489. end
  490. end
  491.  
  492. if addtools then
  493. for i, v in pairs(c:GetChildren()) do
  494. if v:IsA("Tool") then
  495. v.Parent = addtools
  496. end
  497. end
  498. end
  499.  
  500. local hum0 = model:FindFirstChildOfClass("Humanoid")
  501. if hum0 then
  502. hum0.Destroying:Connect(function()
  503. hum0 = nil
  504. end)
  505. end
  506.  
  507. local hum1 = c:FindFirstChildOfClass("Humanoid")
  508. if hum1 then
  509. hum1.Destroying:Connect(function()
  510. hum1 = nil
  511. end)
  512. end
  513.  
  514. if hum1 then
  515. ws.CurrentCamera.CameraSubject = hum1
  516. local camSubCon = nil
  517. local function camSubFunc()
  518. camSubCon:Disconnect()
  519. if c and hum1 then
  520. ws.CurrentCamera.CameraSubject = hum1
  521. end
  522. end
  523. camSubCon = renderstepped:Connect(camSubFunc)
  524. if hum0 then
  525. hum0.Changed:Connect(function(prop)
  526. if hum1 and (prop == "Jump") then
  527. hum1.Jump = hum0.Jump
  528. end
  529. end)
  530. else
  531. respawnrequest()
  532. end
  533. end
  534.  
  535. local rb = Instance.new("BindableEvent", c)
  536. rb.Event:Connect(function()
  537. rb:Destroy()
  538. sg:SetCore("ResetButtonCallback", true)
  539. if destroyhum then
  540. c:BreakJoints()
  541. return
  542. end
  543. if hum0 and (hum0.Health > 0) then
  544. model:BreakJoints()
  545. hum0.Health = 0
  546. end
  547. if antirespawn then
  548. respawnrequest()
  549. end
  550. end)
  551. sg:SetCore("ResetButtonCallback", rb)
  552.  
  553. spawn(function()
  554. while c do
  555. if hum0 and hum1 then
  556. hum1.Jump = hum0.Jump
  557. end
  558. wait()
  559. end
  560. sg:SetCore("ResetButtonCallback", true)
  561. end)
  562.  
  563. R15toR6 = R15toR6 and hum1 and (hum1.RigType == Enum.HumanoidRigType.R15)
  564. if R15toR6 then
  565. local part = gp(c, "HumanoidRootPart", "BasePart") or gp(c, "UpperTorso", "BasePart") or gp(c, "LowerTorso", "BasePart") or gp(c, "Head", "BasePart") or c:FindFirstChildWhichIsA("BasePart")
  566. if part then
  567. local cfr = part.CFrame
  568. local R6parts = {
  569. head = {
  570. Name = "Head",
  571. Size = v3(2, 1, 1),
  572. R15 = {
  573. Head = 0
  574. }
  575. },
  576. torso = {
  577. Name = "Torso",
  578. Size = v3(2, 2, 1),
  579. R15 = {
  580. UpperTorso = 0.2,
  581. LowerTorso = -100
  582. }
  583. },
  584. root = {
  585. Name = "HumanoidRootPart",
  586. Size = v3(2, 2, 1),
  587. R15 = {
  588. HumanoidRootPart = 0
  589. }
  590. },
  591. leftArm = {
  592. Name = "Left Arm",
  593. Size = v3(1, 2, 1),
  594. R15 = {
  595. LeftHand = -0.73,
  596. LeftLowerArm = -0.2,
  597. LeftUpperArm = 0.4
  598. }
  599. },
  600. rightArm = {
  601. Name = "Right Arm",
  602. Size = v3(1, 2, 1),
  603. R15 = {
  604. RightHand = -0.73,
  605. RightLowerArm = -0.2,
  606. RightUpperArm = 0.4
  607. }
  608. },
  609. leftLeg = {
  610. Name = "Left Leg",
  611. Size = v3(1, 2, 1),
  612. R15 = {
  613. LeftFoot = -0.73,
  614. LeftLowerLeg = -0.15,
  615. LeftUpperLeg = 0.6
  616. }
  617. },
  618. rightLeg = {
  619. Name = "Right Leg",
  620. Size = v3(1, 2, 1),
  621. R15 = {
  622. RightFoot = -0.73,
  623. RightLowerLeg = -0.15,
  624. RightUpperLeg = 0.6
  625. }
  626. }
  627. }
  628. for i, v in pairs(c:GetChildren()) do
  629. if v:IsA("BasePart") then
  630. for i1, v1 in pairs(v:GetChildren()) do
  631. if v1:IsA("Motor6D") then
  632. v1.Part0 = nil
  633. end
  634. end
  635. end
  636. end
  637. part.Archivable = true
  638. for i, v in pairs(R6parts) do
  639. local part = part:Clone()
  640. part:ClearAllChildren()
  641. part.Name = v.Name
  642. part.Size = v.Size
  643. part.CFrame = cfr
  644. part.Anchored = false
  645. part.Transparency = 1
  646. part.CanCollide = false
  647. for i1, v1 in pairs(v.R15) do
  648. local R15part = gp(c, i1, "BasePart")
  649. local att = gp(R15part, "att1_" .. i1, "Attachment")
  650. if R15part then
  651. local weld = Instance.new("Weld", R15part)
  652. weld.Name = "Weld_" .. i1
  653. weld.Part0 = part
  654. weld.Part1 = R15part
  655. weld.C0 = cf(0, v1, 0)
  656. weld.C1 = cf(0, 0, 0)
  657. R15part.Massless = true
  658. R15part.Name = "R15_" .. i1
  659. R15part.Parent = part
  660. if att then
  661. att.Parent = part
  662. att.Position = v3(0, v1, 0)
  663. end
  664. end
  665. end
  666. part.Parent = c
  667. R6parts[i] = part
  668. end
  669. local R6joints = {
  670. neck = {
  671. Parent = Scarf,
  672. Name = "Neck",
  673. Part0 = Scarf, --R6parts.torso
  674. Part1 = Scarf, --R6parts.head
  675. C0 = cf(0, 1, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0),
  676. C1 = cf(0, -0.5, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0)
  677. },
  678. rootJoint = {
  679. Parent = R6parts.root,
  680. Name = "RootJoint" ,
  681. Part0 = R6parts.root,
  682. Part1 = R6parts.torso,
  683. C0 = cf(0, 0, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0),
  684. C1 = cf(0, 0, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0)
  685. },
  686. rightShoulder = {
  687. Parent = R6parts.torso,
  688. Name = "Right Shoulder",
  689. Part0 = R6parts.torso,
  690. Part1 = R6parts.rightArm,
  691. C0 = cf(1, 0.5, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0),
  692. C1 = cf(-0.5, 0.5, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)
  693. },
  694. leftShoulder = {
  695. Parent = R6parts.torso,
  696. Name = "Left Shoulder",
  697. Part0 = R6parts.torso,
  698. Part1 = R6parts.leftArm,
  699. C0 = cf(-1, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0),
  700. C1 = cf(0.5, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  701. },
  702. rightHip = {
  703. Parent = R6parts.torso,
  704. Name = "Right Hip",
  705. Part0 = R6parts.torso,
  706. Part1 = R6parts.rightLeg,
  707. C0 = cf(1, -1, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0),
  708. C1 = cf(0.5, 1, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)
  709. },
  710. leftHip = {
  711. Parent = R6parts.torso,
  712. Name = "Left Hip" ,
  713. Part0 = R6parts.torso,
  714. Part1 = R6parts.leftLeg,
  715. C0 = cf(-1, -1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0),
  716. C1 = cf(-0.5, 1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  717. }
  718. }
  719. for i, v in pairs(R6joints) do
  720. local joint = Instance.new("Motor6D")
  721. for prop, val in pairs(v) do
  722. joint[prop] = val
  723. end
  724. R6joints[i] = joint
  725. end
  726. hum1.RigType = Enum.HumanoidRigType.R6
  727. hum1.HipHeight = 0
  728. end
  729. end
  730.  
  731.  
  732.  
  733. --find rig joints
  734.  
  735. local function fakemotor()
  736. return {C0=cf(), C1=cf()}
  737. end
  738.  
  739. local torso = gp(c, "Torso", "BasePart")
  740. local root = gp(c, "HumanoidRootPart", "BasePart")
  741.  
  742. local neck = gp(torso, "Neck", "Motor6D")
  743. neck = neck or fakemotor()
  744.  
  745. local rootJoint = gp(root, "RootJoint", "Motor6D")
  746. rootJoint = rootJoint or fakemotor()
  747.  
  748. local leftShoulder = gp(torso, "Left Shoulder", "Motor6D")
  749. leftShoulder = leftShoulder or fakemotor()
  750.  
  751. local rightShoulder = gp(torso, "Right Shoulder", "Motor6D")
  752. rightShoulder = rightShoulder or fakemotor()
  753.  
  754. local leftHip = gp(torso, "Left Hip", "Motor6D")
  755. leftHip = leftHip or fakemotor()
  756.  
  757. local rightHip = gp(torso, "Right Hip", "Motor6D")
  758. rightHip = rightHip or fakemotor()
  759.  
  760. --120 fps
  761.  
  762. local fps = 0
  763. local event = Instance.new("BindableEvent", c)
  764. event.Name = "120 fps"
  765. local floor = math.floor
  766. fps = 1 / fps
  767. local tf = 0
  768. local con = nil
  769. con = game:GetService("RunService").RenderStepped:Connect(function(s)
  770. if not c then
  771. con:Disconnect()
  772. return
  773. end
  774. --tf += s
  775. if tf >= fps then
  776. for i=1, floor(tf / fps) do
  777. event:Fire(c)
  778. end
  779. tf = 0
  780. end
  781. end)
  782. local event = event.Event
  783.  
  784. local hedrot = v3(0, 5, 0)
  785.  
  786. local uis = game:GetService("UserInputService")
  787. local function isPressed(key)
  788. return (not uis:GetFocusedTextBox()) and uis:IsKeyDown(Enum.KeyCode[key])
  789. end
  790.  
  791. local biggesthandle = nil
  792. for i, v in pairs(c:GetChildren()) do
  793. if v:IsA("Accessory") and v.Name == "Necklace" then
  794. local handle = gp(v, "Handle", "BasePart")
  795. if biggesthandle then
  796. if biggesthandle.Size.Magnitude < handle.Size.Magnitude then
  797. biggesthandle = Handle
  798. end
  799. else
  800. biggesthandle = gp(v, "Handle", "BasePart")
  801. end
  802. end
  803. end
  804.  
  805. if not biggesthandle then
  806. return
  807. end
  808.  
  809. local handle1 = gp(gp(model, biggesthandle.Parent.Name, "Accessory"), "Handle", "BasePart")
  810. if not handle1 then
  811. return
  812. end
  813.  
  814. handle1.Destroying:Connect(function()
  815. handle1 = nil
  816. end)
  817. biggesthandle.Destroying:Connect(function()
  818. biggesthandle = nil
  819. end)
  820.  
  821. biggesthandle:BreakJoints()
  822. biggesthandle.Anchored = true
  823.  
  824. for i, v in pairs(handle1:GetDescendants()) do
  825. if v:IsA("AlignOrientation") then
  826. v.Enabled = false
  827. end
  828. end
  829.  
  830. local mouse = lp:GetMouse()
  831. local fling = false
  832. mouse.Button1Down:Connect(function()
  833. fling = true
  834. end)
  835. mouse.Button1Up:Connect(function()
  836. fling = false
  837. end)
  838. local function doForSignal(signal, vel)
  839. spawn(function()
  840. while signal:Wait() and c and handle1 and biggesthandle do
  841. if fling and mouse.Target then
  842. biggesthandle.Position = mouse.Hit.Position
  843. end
  844. handle1.RotVelocity = vel
  845. end
  846. end)
  847. end
  848. doForSignal(stepped, v3(10000, 10000, 10000))
  849. doForSignal(renderstepped, v3(10000, 10000, 10000))
  850. doForSignal(heartbeat, v3(200000000000000, 200000000000000, 200000000000000)) --https://web.roblox.com/catalog/63690008/Pal-Hair
  851.  
  852. local lp = game:GetService("Players").LocalPlayer
  853. local rs = game:GetService("RunService")
  854. local stepped = rs.Stepped
  855. local heartbeat = rs.Heartbeat
  856. local renderstepped = rs.RenderStepped
  857. local sg = game:GetService("StarterGui")
  858. local ws = game:GetService("Workspace")
  859. local cf = CFrame.new
  860. local v3 = Vector3.new
  861. local v3_0 = Vector3.zero
  862. local inf = math.huge
  863.  
  864. local cplayer = lp.Character
  865.  
  866. local v3 = Vector3.new
  867.  
  868. local function gp(parent, name, className)
  869. if typeof(parent) == "Instance" then
  870. for i, v in pairs(parent:GetChildren()) do
  871. if (v.Name == name) and v:IsA(className) then
  872. return v
  873. end
  874. end
  875. end
  876. return nil
  877. end
  878.  
  879. local hat2 = gp(cplayer, "Hat1", "Accessory")
  880. local handle2 = gp(hat2, "Handle", "BasePart")
  881. local att2 = gp(handle2, "att1_Handle", "Attachment")
  882. att2.Parent = cplayer["Torso"]
  883. att2.Position = Vector3.new(0.5, -0, 0)
  884. att2.Rotation = Vector3.new(90, 0, 0)
  885.  
  886. local hat2 = gp(cplayer, "Pal Hair", "Accessory")
  887. local handle2 = gp(hat2, "Handle", "BasePart")
  888. local att2 = gp(handle2, "att1_Handle", "Attachment")
  889. att2.Parent = cplayer["Torso"]
  890. att2.Position = Vector3.new(-0.5, -0, 0)
  891. att2.Rotation = Vector3.new(90, 0, 0)
  892.  
  893. local hat2 = gp(cplayer, "Pink Hair", "Accessory")
  894. local handle2 = gp(hat2, "Handle", "BasePart")
  895. local att2 = gp(handle2, "att1_Handle", "Attachment")
  896. att2.Parent = cplayer["Left Arm"]
  897. att2.Position = Vector3.new(0, -0, 0)
  898. att2.Rotation = Vector3.new(90, 0, 0)
  899.  
  900. local hat2 = gp(cplayer, "Kate Hair", "Accessory")
  901. local handle2 = gp(hat2, "Handle", "BasePart")
  902. local att2 = gp(handle2, "att1_Handle", "Attachment")
  903. att2.Parent = cplayer["Right Arm"]
  904. att2.Position = Vector3.new(-0, -0, 0)
  905. att2.Rotation = Vector3.new(90, 0, 0) --LavanderHair
  906.  
  907. local hat2 = gp(cplayer, "LavanderHair", "Accessory")
  908. local handle2 = gp(hat2, "Handle", "BasePart")
  909. local att2 = gp(handle2, "att1_Handle", "Attachment")
  910. att2.Parent = cplayer["Right Leg"]
  911. att2.Position = Vector3.new(0, 0, 0) --Robloxclassicred
  912. att2.Rotation = Vector3.new(90, 0, 0)
  913.  
  914. local hat2 = gp(cplayer, "Robloxclassicred", "Accessory")
  915. local handle2 = gp(hat2, "Handle", "BasePart")
  916. local att2 = gp(handle2, "att1_Handle", "Attachment")
  917. att2.Parent = cplayer["Left Leg"]
  918. att2.Position = Vector3.new(-0, 0, 0)
  919. att2.Rotation = Vector3.new(90, 0, 0)
  920.  
  921. local folder = game:GetObjects("rbxassetid://13118393567")[1] --lo podes simplificar poniendo "script en folder"
  922. folder.Parent = game:GetService("Players").LocalPlayer
  923.  
  924.  
  925. --require(4781464455)() -- Converter
  926.  
  927. --// SHORTCUTS \\--
  928. local S =setmetatable({},{__index=function(s,i)local serv = select(2,pcall(game.GetService,game,i))if(serv)then rawset(s,i,serv) return serv end end})
  929. local RNG = (function()
  930. local R=Random.new()
  931. return function(min,max,intOrDivider)
  932. local min=min or 0
  933. local max=max or 1
  934.  
  935. if(typeof(intOrDivider)=='number')then
  936. return R:NextInteger(min,max)/intOrDivider
  937. else
  938. if(intOrDivider)then
  939. return R:NextInteger(min,max)
  940. else
  941. return R:NextNumber(min,max)
  942. end
  943. end
  944. end
  945. end)()
  946.  
  947. local M = {R=math.rad;RNG=RNG;RRNG=function(...)return math.rad(RNG(...))end;P=math.pi;C=math.clamp;S=math.sin;C=math.cos;T=math.tan;AS=math.asin;AC=math.acos;AT=math.atan;D=math.deg;H=math.huge;}
  948. local CF = {N=CFrame.new;A=CFrame.Angles;fEA=CFrame.fromEulerAnglesXYZ;}
  949. local C3 = {N=Color3.new;RGB=Color3.fromRGB;HSV=function(...)local data={...}if(typeof(data[1])=='Color3')then return Color3.toHSV(...)else return Color3.fromHSV(...)end;end;}
  950. local V3 = {N=Vector3.new};
  951. local IN = Instance.new;
  952. local R3 = Region3.new
  953.  
  954. --// START OF THE SCRIPT \\--
  955. local Title = 'T h e B o y s';
  956. local Info = "The boys are back in town!\n(To kill you)\nMouse 1 - Behead\n(Hold) Z - Cleave\n\nB - Kick\nK - Switch camera"
  957.  
  958. local Creator = game:service'Players':GetNameFromUserIdAsync(5719877)
  959.  
  960. warn(string.format([[
  961. %s
  962. %s
  963.  
  964. Created by %s
  965. ]],Title,Info:gsub("\n","\n\t\t"),Creator))
  966.  
  967. -- Initialization --
  968.  
  969. local Plr = game:GetService("Players"):GetPlayerFromCharacter(folder.Parent);
  970. local PlrGui = PlayerGui
  971. local Char = game:GetService("Players").LocalPlayer.Character
  972. local Ragdoll = folder:WaitForChild'Ragdoll'
  973. Ragdoll.Parent=nil
  974. local Hum = Char:FindFirstChildOfClass'Humanoid'
  975. assert(Hum and Hum.RigType==Enum.HumanoidRigType.R6,"You need to have a Humanoid and be R6.")
  976. local RArm = Char:WaitForChild'Right Arm'
  977. local LArm = Char:WaitForChild'Left Arm'
  978. local Torso = Char:WaitForChild'Torso'
  979. local RLeg = Char:WaitForChild'Right Leg'
  980. local LLeg = Char:WaitForChild'Left Leg'
  981. local Head = Char:WaitForChild'Head'
  982. local Root = Char:WaitForChild'HumanoidRootPart'
  983. local Puddle = folder:WaitForChild'Puddle'
  984. Puddle.Parent=nil
  985. local Liquid = folder:WaitForChild'Drop'
  986. Liquid.Parent=nil
  987. local LiqSplash = folder:WaitForChild'Splash'
  988. local NeutralAnims = true;
  989. local Attack = false;
  990. local Corpses = Instance.new("Folder")
  991. Corpses.Name='Corpses'
  992. Corpses.Parent=workspace.Terrain
  993.  
  994. local DmgLabel = folder:WaitForChild'DMGPart'
  995. local CritStars =folder:WaitForChild'Crit'
  996. --local Mouse = Plr:GetMouse()
  997. local EffectFolder=Instance.new("Folder")
  998. EffectFolder.Name='Effects'
  999. EffectFolder.Parent=Char
  1000. local ProjectileFolder = Instance.new("Folder")
  1001. ProjectileFolder.Name='Projectiles'
  1002. ProjectileFolder.Parent=EffectFolder
  1003. local Cloud = folder:WaitForChild'Cloud'
  1004. Cloud.Parent=nil
  1005. local Blood = folder:WaitForChild'Blood'
  1006. Blood.Parent=nil
  1007.  
  1008. local FXFolder = folder:WaitForChild'Effects'
  1009. FXFolder.Parent=nil
  1010. local Joints = {}
  1011. local Sine = 0
  1012. local Change = 1
  1013. local CamCFrame=CFrame.new()
  1014. local Puddles = {}
  1015. --local CamFollowing=Head;
  1016. local Dead={}
  1017.  
  1018. folder:WaitForChild'FX'.Disabled=false
  1019. local ProjRemote = Instance.new("RemoteEvent")
  1020. ProjRemote.Name='Remote'
  1021. ProjRemote.Parent=folder:WaitForChild'FX'
  1022. local Projectiles = {}
  1023.  
  1024. --local Vector3Sequence,Vector3SequenceKeypoint = unpack(require(folder:WaitForChild'Vector3Sequence'))
  1025. --local CFrameSequence,CFrameSequenceKeypoint = unpack(require(folder:WaitForChild'CFrameSequence'))
  1026.  
  1027. -- Info UI --
  1028. local InfoUI = folder:WaitForChild'InfoUI'
  1029. InfoUI.Parent=PlrGui
  1030. local InfoFr = InfoUI:WaitForChild'InfoUI'
  1031.  
  1032. InfoFr:WaitForChild'Title'.Text = Title
  1033. InfoFr:WaitForChild'Info'.Text = Info
  1034. InfoFr:WaitForChild'Credit'.Text = "Created by " .. Creator
  1035.  
  1036. -- Instance Functions --
  1037. --require(7163376902) -- Makes instances work
  1038. local baseSound = IN("Sound")
  1039. function Sound(parent,id,pitch,volume,looped,effect,autoPlay)
  1040. local Sound = baseSound:Clone()
  1041. Sound.SoundId = "rbxassetid://".. tostring(id or 0)
  1042. Sound.Pitch = pitch or 1
  1043. Sound.Volume = volume or 1
  1044. Sound.Looped = looped or false
  1045. if(not looped and effect)then
  1046. Sound.Stopped:connect(function()
  1047. Sound.Volume = 0
  1048. Sound:destroy()
  1049. end)
  1050. elseif(effect)then
  1051. warn("Sound can't be looped and a sound effect!")
  1052. end
  1053. Sound.Parent =parent or workspace
  1054. if(autoPlay)then
  1055. Sound:Play()
  1056. end
  1057. return Sound
  1058. end
  1059. function Part(parent,color,material,size,cframe,anchored,cancollide)
  1060. local part = IN("Part")
  1061. part[typeof(color) == 'BrickColor' and 'BrickColor' or 'Color'] = color or C3.N(0,0,0)
  1062. part.Material = material or Enum.Material.SmoothPlastic
  1063. part.TopSurface,part.BottomSurface=10,10
  1064. part.Size = size or V3.N(1,1,1)
  1065. part.CFrame = cframe or CF.N(0,0,0)
  1066. part.CanCollide = cancollide or false
  1067. part.Anchored = anchored or false
  1068. part.Parent = parent
  1069. return part
  1070. end
  1071.  
  1072.  
  1073.  
  1074. function Weld(part0,part1,c0,c1)
  1075. local weld = IN("Weld")
  1076. weld.Part0 = part0
  1077. weld.Part1 = part1
  1078. weld.C0 = c0 or CF.N()
  1079. weld.C1 = c1 or CF.N()
  1080. weld.Parent = part0
  1081. return weld
  1082. end
  1083.  
  1084. function Mesh(parent,meshtype,meshid,textid,scale,offset)
  1085. --local part = IN("SpecialMesh")
  1086. --part.MeshId = meshid or ""
  1087. --part.TextureId = textid or ""
  1088. --part.Scale = scale or V3.N(1,1,1)
  1089. --part.Offset = offset or V3.N(0,0,0)
  1090. --part.MeshType = meshtype or Enum.MeshType.Sphere
  1091. --part.Parent = parent
  1092. return part
  1093. end
  1094.  
  1095. function SoundPart(id,pitch,volume,looped,effect,autoPlay,cf)
  1096. local soundPart = Part(EffectFolder,C3.N(1,1,1),Enum.Material.SmoothPlastic,V3.N(.05,.05,.05),cf,true,false)
  1097. soundPart.Transparency=1
  1098. local Sound = IN("Sound")
  1099. Sound.SoundId = "rbxassetid://".. tostring(id or 0)
  1100. Sound.Pitch = pitch or 1
  1101. Sound.Volume = volume or 1
  1102. Sound.Looped = looped or false
  1103. if(autoPlay)then
  1104. coroutine.wrap(function()
  1105. repeat wait() until Sound.IsLoaded
  1106. Sound.Playing = autoPlay or false
  1107. end)()
  1108. end
  1109. if(not looped and effect)then
  1110. Sound.Stopped:connect(function()
  1111. Sound.Volume = 0
  1112. soundPart:destroy()
  1113. end)
  1114. elseif(effect)then
  1115. warn("Sound can't be looped and a sound effect!")
  1116. end
  1117. Sound.Parent = soundPart
  1118. return Sound
  1119. end
  1120.  
  1121. function Joint(name,part0,part1,c0,c1,type)
  1122. local joint = IN(type or "Motor6D")
  1123. joint.Part0 = part0
  1124. joint.Part1 = part1
  1125. joint.C0 = c0 or CF.N()
  1126. joint.C1 = c1 or CF.N()
  1127. joint.Parent=part0
  1128. joint.Name=name or part0.." to "..part1.." "..joint.ClassName
  1129. return joint
  1130. end
  1131.  
  1132. function NewInstance(instance,parent,properties)if(properties.Parent)then properties.Parent=parent end;local new = IN(instance)if(properties)then for prop,val in next, properties do pcall(function() new[prop]=val end)end;end;new.Parent=parent;return new;end
  1133.  
  1134. -- Customization --
  1135. local DamageColor = Color3.new(1,0,0)
  1136. local WalkSpeed = 16
  1137. local MusicData = {ID=9045971220;Pitch=1;Volume=1;}
  1138. local Soundgroup = folder:WaitForChild'SoundGroup'
  1139. local MaxPuddles = 500;
  1140.  
  1141. -- Joints and Manipulation --
  1142.  
  1143. function IsAllowedAccessory(handle)
  1144. local Attachments={"BodyBackAttachment","BodyFrontAttachment","LeftCollarAttachment","RightCollarAttachment","WaistFrontAttachment","WaistCenterAttachment","WaistBackAttachment"}
  1145. for i = 1,#Attachments do
  1146. if(handle:FindFirstChild(Attachments[i]))then
  1147. return true
  1148. end
  1149. end
  1150. return false
  1151. end
  1152.  
  1153. local Accessories = {}
  1154. for _,v in next, Char:GetDescendants()do
  1155. if(v:IsA'BasePart' and v.Parent:IsA'Accessory' and not IsAllowedAccessory(v))then
  1156. table.insert(Accessories,{v,v.Transparency})
  1157. --v.Transparency=1
  1158. end
  1159. end
  1160.  
  1161. local Axe = folder:WaitForChild'Axe'
  1162. Axe.Parent=Char
  1163. Axe.PrimaryPart.Anchored=false
  1164. local Hitbox = Axe:WaitForChild'Blade'
  1165.  
  1166.  
  1167. --local hitbox2 = Axe:WaitForChild''Blade''
  1168.  
  1169.  
  1170. Hitbox.Transparency = 1
  1171.  
  1172. game:GetService("Players").LocalPlayer.Character["Back_AccAccessory"].Handle.att1_Handle.Parent = Hitbox
  1173. Hitbox.att1_Handle.Rotation = Vector3.new(-85,0,40)
  1174. Hitbox.att1_Handle.Position = Vector3.new(0.25,0,-0.5)
  1175.  
  1176. game:GetService("Players").LocalPlayer.Character["Necklace"].Handle.att1_Handle.Parent = Hitbox
  1177. Hitbox.att1_Handle.Rotation = Vector3.new(-85,0,40)
  1178. Hitbox.att1_Handle.Position = Vector3.new(0.25,0,-0.5)
  1179.  
  1180. --Handle.Transparency = 1
  1181.  
  1182. local Morph = folder:WaitForChild'Morph'
  1183. ---Morph.Transparency = 1
  1184. Head.Transparency=1
  1185. --Head:ClearAllChildren()
  1186.  
  1187. local HueShift = {
  1188. [344016870]={H=.73,S=1,V=1};--.73;
  1189. -- [19342912]={H=.57,S=1,V=.5};
  1190. [407695969]={H=.9,S=.7,V=1};
  1191. -- [45322272]={H=0,S=1,V=.4};
  1192. -- [407695969]={H=.07,S=.7,V=.8};
  1193. }
  1194.  
  1195. --[[if(HueShift[Plr.CharacterAppearanceId])then
  1196. --local m = HueShift[Plr.CharacterAppearanceId]
  1197. for _,v in next, Morph.Head:GetDescendants()do
  1198. if(v:IsA'BasePart')then
  1199. if(v.Name~='Hood' and v.Name~='Cone')then
  1200. local H,S,V=C3.HSV(v.Color)
  1201. v.Color=C3.HSV(math.clamp(m.H,0,1),math.clamp(S*m.S,0,1),math.clamp(V*m.V,0,1))
  1202. end
  1203. elseif(v:IsA'ParticleEmitter')then
  1204. if(v.Name~='Smoke')then
  1205. local newSequence={}
  1206. for i = 1,#v.Color.Keypoints do
  1207. local H,S,V=C3.HSV(v.Color.Keypoints[i].Value)
  1208. table.insert(newSequence,ColorSequenceKeypoint.new(v.Color.Keypoints[i].Time,C3.HSV(math.clamp(m.H,0,1),math.clamp(S*m.S,0,1),math.clamp(V*m.V,0,1))))
  1209. end
  1210. v.Color=ColorSequence.new(newSequence)
  1211.  
  1212. end
  1213. end
  1214. end
  1215. end]]
  1216.  
  1217. for _,v in next, Char:children() do
  1218. if(Morph:FindFirstChild(v.Name))then
  1219. local part = Morph[v.Name]
  1220. part.Parent=Char
  1221. part:SetPrimaryPartCFrame(v.CFrame)
  1222. for _,c in next, part:GetDescendants() do
  1223. if(c:IsA'BasePart' and c~=part.PrimaryPart)then
  1224. c.Massless=true
  1225. c.Anchored=false
  1226. local j = Weld(v,c,CFrame.new(),c.CFrame:inverse()*v.CFrame)
  1227. c.CanCollide=false
  1228. end
  1229. end
  1230. part.PrimaryPart:destroy()
  1231. end
  1232. end
  1233.  
  1234. function GetJoint(joint)
  1235. for i,v in next, Joints do
  1236. if(i==joint or v.J==joint)then
  1237. return v,i;
  1238. end
  1239. end
  1240. return nil;
  1241. end
  1242.  
  1243. function getLength(table)local len=0;for i,v in next,table do len=len+1 end;return len;end
  1244. function getFirstEntry(table)for i,v in next,table do return i,v end;return nil;end
  1245.  
  1246. function Animate(joint,props,alpha,style,dir)
  1247. local joint = typeof(joint)=='string' and Joints[joint].J or typeof(joint)=='table' and joint.J or typeof(joint)=='Instance' and joint or error("lol animate needs a string, table or instance")
  1248. local propName='C0'
  1249. if(typeof(props)=='table' and getLength(props)==1 and select(2,getFirstEntry(props)).lerp)then
  1250. propName,props=getFirstEntry(props)
  1251. end
  1252.  
  1253. if(style=='Lerp' and props.lerp)then
  1254. joint[propName] = joint[propName]:lerp(props,alpha)
  1255. else
  1256. if(typeof(props)=='CFrame')then
  1257. props={C0=props}
  1258. end
  1259. local info = TweenInfo.new(alpha or 1,(style~='Lerp' and style) or Enum.EasingStyle.Linear,dir or Enum.EasingDirection.Out,0,false,0)
  1260. local tween = S.TweenService:Create(joint,info,props)
  1261. tween:Play();
  1262. return tween;
  1263. end
  1264. end
  1265.  
  1266. Joints['RJ'] = Joint("RootJoint",Root,Torso,CF.N(),CF.N())
  1267. Joints['NK'] = Joint("neck",Torso,Head,CF.N(0,1.5,0),CF.N())
  1268. Joints['LS'] = Joint("Left Shoulder",Torso,LArm,CF.N(-1.5,.5,0),CF.N(0,.5,0))
  1269. Joints['RS'] = Joint("Right Shoulder",Torso,RArm,CF.N(1.5,.5,0),CF.N(0,.5,0))
  1270. Joints['LH'] = Joint("Left Hip",Torso,LLeg,CF.N(-.5,-2,0),CF.N(0,0,0))
  1271. Joints['RH'] = Joint("Right Hip",Torso,RLeg,CF.N(.5,-2,0),CF.N(0,0,0))
  1272. Joints['HW'] = Joint("Handle",RArm,Axe.PrimaryPart,CF.N(0,-1,0)*CF.A(M.R(-90),M.R(180),M.R(-90)))
  1273.  
  1274. --Handle.Transparency = 1
  1275.  
  1276. for i,v in next, Joints do Joints[i]={J=v,D={C0=v.C0,C1=v.C1}} end
  1277.  
  1278. --[[for _,v in next, Char:GetDescendants() do
  1279. if(v:IsA'JointInstance' and not GetJoint(v) and (v.Name:find("Hip") or v.Name:find("Shoulder") or v.Name=='Neck' or v.Name:find("Root")))then
  1280. --v:destroy()
  1281. end
  1282. end]]
  1283.  
  1284.  
  1285. -- Artificial Heartbeat --
  1286. local AHB = Instance.new("BindableEvent")
  1287. do
  1288. local Timeframe = 0;
  1289. local LastFrame= 0;
  1290.  
  1291. local FPS = 60
  1292. AHB:Fire()
  1293.  
  1294. game:GetService("RunService").Heartbeat:connect(function(s, p)
  1295. Timeframe = Timeframe + s
  1296. if(Timeframe >= 1/FPS)then
  1297. for i = 1, math.floor(Timeframe/(1/FPS)) do
  1298. AHB:Fire()
  1299. end
  1300. LastFrame = tick()
  1301. Timeframe = Timeframe - (1/FPS) * math.floor(Timeframe / (1/FPS))
  1302. end
  1303. end)
  1304. end
  1305.  
  1306. function fwait(Frames)
  1307. for i = 1,((typeof(Frames)~='number' or Frames<=0) and 1 or Frames)do
  1308. AHB.Event:wait()
  1309. end
  1310. end
  1311.  
  1312. -- Stop Animations --
  1313. for _,v in next, Hum:GetPlayingAnimationTracks() do
  1314. v:Stop();
  1315. end
  1316.  
  1317. pcall(game.Destroy,Char:FindFirstChild'Animate')
  1318. pcall(game.Destroy,Hum:FindFirstChild'Animator')
  1319. -- Effect Functions --
  1320.  
  1321. function CamshakePlayer(p,settings)
  1322. local sh = folder:WaitForChild'CamShake':Clone()
  1323. local optionFolder = sh:WaitForChild'Options'
  1324. for _,v in next, optionFolder:children() do
  1325. if(settings[v.Name])then
  1326. v.Value=settings[v.Name]
  1327. end
  1328. end
  1329. local originVal;
  1330. if(typeof(settings.Origin)=='Vector3')then
  1331. originVal=IN("Vector3Value")
  1332. elseif(typeof(settings.Origin)=='CFrame')then
  1333. originVal=IN("CFrameValue")
  1334. elseif(typeof(settings.Origin)=='Instance')then
  1335. originVal=IN("ObjectValue")
  1336. end
  1337. if(originVal)then
  1338. originVal.Name = 'Origin'
  1339. originVal.Value = settings.Origin
  1340. originVal.Parent=optionFolder
  1341. end
  1342. local parent = p.Character or p:FindFirstChildOfClass'Backpack' or p:FindFirstChildOfClass'PlayerGui'
  1343. if(parent)then
  1344. local nig = sh:Clone();
  1345. nig.Parent=parent
  1346. nig.Disabled=false
  1347. S.Debris:AddItem(nig,(settings.Duration or 2)+1)
  1348. end
  1349. end
  1350.  
  1351. function Camshake(settings)
  1352. for _,p in next, game:service'Players':players() do
  1353. CamshakePlayer(p,settings)
  1354. end
  1355. end
  1356.  
  1357. function Tween(object,properties,time,style,dir,repeats,reverse,delay)
  1358. local info = TweenInfo.new(time or 1,style or Enum.EasingStyle.Linear,dir or Enum.EasingDirection.Out,repeats or 0,reverse or false,delay or 0)
  1359. local tween = S.TweenService:Create(object,info,properties)
  1360. tween:Play()
  1361. return tween;
  1362. end
  1363.  
  1364. local function numLerp(Start,Finish,Alpha)
  1365. return Start + (Finish- Start) * Alpha
  1366. end
  1367.  
  1368. function IsValidEnum(val,enum,def)
  1369. local enum = Enum[tostring(enum)]
  1370. local succ,err=pcall(function() return enum[val.Name] end)
  1371. if(not err)then
  1372. return val
  1373. else
  1374. return def
  1375. end
  1376. end
  1377.  
  1378. function IsValid(val,type,def)
  1379. if(typeof(type)=='string')then
  1380. return (typeof(val)==type and val or def)
  1381. elseif(typeof(type)=='table')then
  1382. for i,v in next, type do
  1383. if(typeof(val)==v)then
  1384. return val
  1385. end
  1386. end
  1387. end
  1388. return def
  1389. end
  1390.  
  1391. function LiquidPuddle(hit,pos,normal,color,mat,size,lerpSize)
  1392. local size = size or M.RNG(.5,1.5)
  1393. if(not Puddles[hit])then
  1394. local C3C=typeof(color)=='BrickColor' and color.Color or color
  1395. local splat = Puddle:Clone();
  1396. local weldConstraint=IN("WeldConstraint")
  1397. if(not hit.Anchored)then
  1398. weldConstraint.Parent=splat
  1399. weldConstraint.Part0=hit
  1400. weldConstraint.Part1=splat
  1401. splat.Anchored=false
  1402. end
  1403. splat.Size = lerpSize and V3.N(0,.025,0) or V3.N(size,.025,size)
  1404. splat.CFrame=CF.N(pos,pos+normal)*CF.A(M.R(90),0,0)
  1405. splat.Color=C3C
  1406. splat.Material=mat or Enum.Material.Glass
  1407. splat.Parent=workspace
  1408. local DespawnData={splat,{Size=V3.N(.05,.025,.05);Transparency=1},.75,Enum.EasingStyle.Linear,Enum.EasingDirection.Out,0,false,3}
  1409. Puddles[splat]={DecayStart=tick(),Size=size,DespawnTweenD=DespawnData}
  1410. if(lerpSize)then
  1411. Tween(splat,{CFrame=splat.CFrame*CF.A(0,M.RRNG(0,360),0)},.4)
  1412. Tween(splat,{Size=V3.N(size,.025,size)},.4).Completed:connect(function(state)
  1413. if(state==Enum.PlaybackState.Completed)then
  1414. Puddles[splat].DespawnTween=Tween(unpack(DespawnData))
  1415. Puddles[splat].DespawnTween.Completed:connect(function(state)if(state==Enum.PlaybackState.Completed)then Puddles[splat].Changed:disconnect() Puddles[splat]=nil; splat:destroy() end end)
  1416. Puddles[splat].Changed = splat.Changed:connect(function()
  1417. if(splat and Puddles[splat])then
  1418. Puddles[splat].Size=splat.Size.x
  1419. end
  1420. end)
  1421. end
  1422. end)
  1423. end
  1424. return false
  1425. elseif(Puddles[hit].Size<12)then
  1426. local newSize = math.min(Puddles[hit].Size+size or M.RNG(.025,.15),5)
  1427. Puddles[hit].Size=newSize
  1428. if(Puddles[hit].Changed)then Puddles[hit].Changed:disconnect()end
  1429. Tween(hit,{Size=V3.N(newSize,.025,newSize),Transparency=0},.3).Completed:connect(function(state)
  1430. if(state==Enum.PlaybackState.Completed)then
  1431. Puddles[hit].DespawnTween=Tween(unpack(Puddles[hit].DespawnTweenD))
  1432. Puddles[hit].Changed = hit.Changed:connect(function()
  1433. if(hit and Puddles[hit])then
  1434. Puddles[hit].Size=hit.Size.x
  1435. end
  1436. end)
  1437. Puddles[hit].DespawnTween.Completed:connect(function(state)if(state==Enum.PlaybackState.Completed)then Puddles[hit].Changed:disconnect() Puddles[hit]=nil; hit:destroy() end end)
  1438. end
  1439. end)
  1440.  
  1441. return true
  1442. end
  1443. end
  1444.  
  1445. function LiquidDrop(data)
  1446. data.Color=data.Color or C3.RGB(100,0,0)
  1447. local ColorC3 = typeof(data.Color)=='BrickColor' and data.Color.Color or data.Color
  1448. data.IgnoreHumanoids=true;
  1449. data.IgnoreInvisibility=true;
  1450. data.IgnoreUncollidables=true;
  1451. data.IgnoreUnanchored=true;
  1452. data.IgnoreExceptions={}
  1453. for part,puddleData in next, Puddles do table.insert(data.IgnoreExceptions,part)end
  1454.  
  1455. data.Collision=data.Collision or function(self,_,pos,norm,ignoreList)
  1456. if(pos and norm)then
  1457. self.Part.Transparency=1
  1458. local Raying=false;
  1459. local hit,pos,norm = CastRay(pos+V3.N(0,.1,0),pos,2,ignoreList)
  1460. --pcall(function()self.Part.Prt:destroy()end)
  1461. self.Part.CFrame=CF.N(pos,pos+norm)
  1462. S.Debris:AddItem(self.Part,5)
  1463. local hitPuddle = LiquidPuddle(hit,pos,norm,ColorC3,data.Part.Material,.3,true)
  1464. if(hitPuddle)then
  1465. local att = Instance.new("Attachment",hit)
  1466. att.WorldCFrame=CF.N(pos,pos+norm)
  1467. local asd = LiqSplash:Clone()
  1468. asd.Color=ColorSequence.new(data.Color)
  1469. asd.Parent=att
  1470. asd:Emit(25)
  1471. delay(.1,function()
  1472. S.Debris:AddItem(att,2)
  1473. end)
  1474. Sound(hit,685857471,M.RNG(.85,1.25),1,false,true,true)
  1475. end
  1476. else
  1477. self.Part:destroy()
  1478. end
  1479. end
  1480. data.Part = Liquid:Clone()
  1481. data.Part.Color = ColorC3
  1482. data.Part.Material =data.Material or Enum.Material.Glass
  1483. data.Part.Trail.Color=ColorSequence.new(ColorC3)
  1484. --data.Part.Prt.Color=ColorSequence.new(ColorC3)
  1485. data.Color=ColorC3
  1486.  
  1487. Projectile(data)
  1488. end
  1489.  
  1490. function TableToValues(Tbl)
  1491. local Vals={}
  1492. local Types={boolean='BoolValue';Color3='Color3Value';CFrame='CFrameValue';Vector3='Vector3Value';Ray='RayValue';string='StringValue';number='NumberValue';Instance='ObjectValue'}
  1493. for i,v in next,Tbl do
  1494. local Type = typeof(v)
  1495. if(Types[Type])then
  1496. local Val = Instance.new(Types[Type])
  1497. Val.Name=tostring(i)
  1498. Val.Value=v
  1499. Vals[i]=Val;
  1500. elseif(typeof(v)=='table')then
  1501. local Values=TableToValues(v)
  1502. Vals[i]=Instance.new("Folder")
  1503. Vals[i].Name=i;
  1504. for _,v in next, Values do
  1505. v.Parent=Vals[i]
  1506. end
  1507. end
  1508. end
  1509. return Vals
  1510. end
  1511.  
  1512. function Projectile(data)
  1513. data.IgnoreUncollidables = data.IgnoreUncollidables or true
  1514. data.IgnoreInvisibility = data.IgnoreInvisibility or true
  1515. data.IgnoreHumanoids = data.IgnoreHumanoids or true
  1516. data.IgnoreUnanchored = data.IgnoreUnanchored or false
  1517. data.Velocity = data.Direction*data.Speed
  1518.  
  1519. local part = data.Part
  1520. part.CFrame=data.Origin
  1521. if(data.BeamProjectile)then
  1522. local Beam = part:FindFirstChildOfClass'Beam'
  1523. if(Beam)then
  1524. local A0,A1=Beam.Attachment0,Beam.Attachment1
  1525. if(A0 and A1)then
  1526. local A0P = Part(nil,C3.N(1,1,1),Enum.Material.SmoothPlastic,V3.N(),A0.WorldCFrame,false,false)
  1527. A0P.Name='A0P'
  1528. A0P.Parent=part
  1529. A0.Parent=A0P
  1530.  
  1531. local A1P = Part(nil,C3.N(1,1,1),Enum.Material.SmoothPlastic,V3.N(),A1.WorldCFrame,false,false)
  1532. A1P.Name='A1P'
  1533. A1P.Parent=part
  1534. A1.Parent=A1P
  1535. NewInstance("BodyVelocity",A1P,{Velocity=V3.N()})
  1536. NewInstance("BodyVelocity",A0P,{Velocity=V3.N()})
  1537.  
  1538. A0P.Transparency=1
  1539. A1P.Transparency=1
  1540.  
  1541. end
  1542. end
  1543. end
  1544. --NewInstance("BodyVelocity",part,{Velocity=V3.N()})
  1545. part.Anchored=false
  1546. part.CanCollide=false
  1547. data.ID = game:service'HttpService':GenerateGUID(0)
  1548. for _,v in next, data.Part:GetDescendants()do if(v:IsA'BasePart')then v:SetNetworkOwner(Plr.real) end end
  1549. data.Ignorelist=data.Ignore or {Char}
  1550. Projectiles[data.ID]=data;
  1551. data.Type='Projectile'
  1552. local Values = IN("Folder")
  1553. Values.Name='Values'
  1554. Values.Parent=part
  1555. for _,v in next, TableToValues(data)do
  1556. v.Parent=Values
  1557. end
  1558. part.Parent=ProjectileFolder
  1559. part.Velocity = data.Velocity
  1560. part:SetNetworkOwner(Plr.real)
  1561. ProjRemote:FireClient(Plr.real,data)
  1562. end
  1563.  
  1564. --[[ProjRemote.OnServerEvent:connect(function(p,id,...)]] --OnServer(function(p,id,...)
  1565. if(p~=Plr)then return p:Kick("lol") end
  1566. if(id=='CamUpdate')then
  1567. CamCFrame=...
  1568. else
  1569. local data = Projectiles[id]
  1570. if(data)then
  1571. if(({...})[1] and data.Collision)then
  1572. data:Collision(...)
  1573. else
  1574. data.Part:destroy()
  1575. end
  1576. Projectiles[id]=nil;
  1577. end
  1578. end
  1579. --end)
  1580.  
  1581. local FXInformation = {}
  1582. function EffectFunc(data)
  1583. if(typeof(data)=='Instance' and data:IsA'ModuleScript')then data=require(data)end
  1584. assert(typeof(data)=='table',"Expected 'table' calling EffectFunc")
  1585. data.Parent=EffectFolder
  1586. if(data.BeamEffect)then
  1587. return Slash(data)
  1588. end
  1589.  
  1590. local Lifetime = data.Lifetime or 1;
  1591. local Color = data.Color or Color3.new(1,1,1)
  1592. local EndColor = data.EndColor
  1593. local Size = data.Size or Vector3.new(1,1,1)
  1594. local EndSize = data.EndSize
  1595. local Transparency = data.Transparency or 0
  1596. local EndTransparency = data.EndTransparency or 1
  1597. local Material = data.Material or Enum.Material.Neon;
  1598. local Part = typeof(data.RefPart)=='Instance' and data.RefPart or typeof(data.RefPart)=='string' and FXFolder:FindFirstChild(data.RefPart);
  1599. local CF = data.CFrame or CFrame.new(0,10,0)
  1600. local EndCF = data.EndCFrame or data.EndPos
  1601. local Mesh = data.MeshData or data.Mesh or {MeshType=Enum.MeshType.Brick}
  1602. local Rotation = data.Rotation or {0,0,0}
  1603. local UpdateCF = data.UpdateCFrame;
  1604. local Update = data.Update;
  1605.  
  1606. local CSQ,SSQ,TSQ,CFQ;
  1607. if(typeof(Color)=='BrickColor')then Color = Color.Color end
  1608. if(typeof(EndColor)=='BrickColor')then EndColor = EndColor.Color end
  1609. if(typeof(Color)=='ColorSequence')then
  1610. CSQ = Color
  1611. elseif(typeof(Color)=='Color3' and typeof(EndColor)=='Color3')then
  1612. CSQ = ColorSequence.new(Color,EndColor)
  1613. elseif(typeof(Color)=='Color3')then
  1614. CSQ = ColorSequence.new(Color)
  1615. else
  1616. CSQ = ColorSequence.new(Color3.new(1,1,1))
  1617. end
  1618.  
  1619.  
  1620. if(typeof(Size)=='table' and Size.Keypoints and typeof(Size.Keypoints[1].Value)=='Vector3')then
  1621. SSQ = Size
  1622. elseif(typeof(Size)=='Vector3' and typeof(EndSize)=='Vector3')then
  1623. SSQ = Vector3Sequence.new(Size,EndSize)
  1624. elseif(typeof(Size)=='Vector3')then
  1625. SSQ = Vector3Sequence.new(Size)
  1626. else
  1627. SSQ = Vector3Sequence.new(Vector3.new(1,1,1))
  1628. end
  1629.  
  1630. if(typeof(CF)=='table' and CF.Keypoints and typeof(CF.Keypoints[1].Value)=='CFrame')then
  1631. CFQ = CF
  1632. elseif(typeof(CF)=='CFrame' and typeof(EndCF)=='CFrame')then
  1633. CFQ = CFrameSequence.new(CF,EndCF)
  1634. elseif(typeof(CF)=='CFrame')then
  1635. CFQ = CFrameSequence.new(CF)
  1636. else
  1637. CFQ = CFrameSequence.new(CFrame.new(0,10,0))
  1638. end
  1639.  
  1640. if(typeof(Transparency)=='NumberSequence')then
  1641. TSQ = Transparency
  1642. elseif(typeof(Transparency)=='number' and typeof(EndTransparency)=='number')then
  1643. TSQ = NumberSequence.new(Transparency,EndTransparency)
  1644. elseif(typeof(Transparency)=='number')then
  1645. TSQ = NumberSequence.new(Transparency)
  1646. else
  1647. TSQ = NumberSequence.new(0,1)
  1648. end
  1649.  
  1650.  
  1651. --local part,mesh;
  1652. if(not Part or not Part:IsA'BasePart')then
  1653. --part = Instance.new("Part")
  1654. --mesh = Instance.new("SpecialMesh",part)
  1655. else
  1656. -- part=Part:Clone();
  1657. -- mesh=part:FindFirstChildOfClass'DataModelMesh'
  1658. end
  1659. --part.Color = CSQ.Keypoints[1].Value
  1660. --part.Transparency = TSQ.Keypoints[1].Value
  1661. --part.Size = (not mesh and SSQ.Keypoints[1].Value or Vector3.new(1,1,1))
  1662. --part.Anchored = true
  1663. --part.CanCollide = false
  1664. --part.CFrame = CFQ.Keypoints[1].Value
  1665. --part.Material = Material
  1666. --part.Locked = true
  1667. --part.Parent = EffectFolder
  1668. if(mesh)then
  1669. --mesh.Scale = SSQ.Keypoints[1].Value
  1670. --mesh.MeshType = Mesh.MeshType or Mesh.Type or Enum.MeshType.Brick
  1671. --mesh.MeshId = Mesh.MeshId or Mesh.Id or ""
  1672. --mesh.TextureId = Mesh.TextureId or Mesh.Texture or ""
  1673. end
  1674. game:service'Debris':AddItem(part,Lifetime*1.5)
  1675. table.insert(FXInformation,{
  1676. Part=part;
  1677. Mesh=mesh;
  1678. Lifetime=Lifetime;
  1679. Create=tick();
  1680. ColorSeq=CSQ;
  1681. SizeSeq=SSQ;
  1682. TranSeq=TSQ;
  1683. CFSeq=CFQ;
  1684. ColorPoint=CSQ.Keypoints[1];
  1685. SizePoint=SSQ.Keypoints[1];
  1686. TranPoint=TSQ.Keypoints[1];
  1687. CFPoint=CFQ.Keypoints[1];
  1688. Rotation=Rotation;
  1689. CurrRot=CFrame.new();
  1690. UpdateCF=(typeof(UpdateCF)=='function' and UpdateCF or typeof(UpdateCF)=='Instance' and UpdateCF:IsA'ModuleScript' and require(UpdateCF) or nil);
  1691. OnUpdate=(typeof(Update)=='function' and Update or typeof(Update)=='Instance' and Update:IsA'ModuleScript' and require(Update) or nil)
  1692. })
  1693. end
  1694.  
  1695. function GetKeyframe(sequence,currentTime,lifeTime)
  1696. local scale = currentTime/lifeTime
  1697. for i = 1,#sequence.Keypoints do
  1698. local keyframe = sequence.Keypoints[i]
  1699. local nframe = sequence.Keypoints[i+1]
  1700. if(not nframe or keyframe.Time>=scale and keyframe.Time<nframe.Time)then
  1701. return keyframe
  1702. end
  1703. end
  1704. return sequence.Keypoints[1];
  1705. end;
  1706.  
  1707. coroutine.wrap(function()
  1708. while true do
  1709. fwait()
  1710. local queue={}
  1711. for i,dat in next, FXInformation do
  1712. local part,mesh,lifetime,created,csq,ssq,tsq,cfq,rot,ucf,upd =
  1713. dat.Part,
  1714. dat.Mesh,
  1715. dat.Lifetime,
  1716. dat.Create,
  1717. dat.ColorSeq,
  1718. dat.SizeSeq,
  1719. dat.TranSeq,
  1720. dat.CFSeq,
  1721. dat.Rotation,
  1722. dat.UpdateCF,
  1723. dat.OnUpdate;
  1724. local current = tick();
  1725. local elapsed = tick()-created
  1726. local currentcpoint = GetKeyframe(csq,elapsed,lifetime)
  1727. local currentspoint = GetKeyframe(ssq,elapsed,lifetime)
  1728. local currenttpoint = GetKeyframe(tsq,elapsed,lifetime)
  1729. local currentcfpoint = GetKeyframe(cfq,elapsed,lifetime)
  1730.  
  1731. local currentcolor = currentcpoint.Value
  1732. local currenttrans = currenttpoint.Value
  1733. local currentsize = currentspoint.Value
  1734. local currentcf = currentcfpoint.Value
  1735.  
  1736. if(currentcpoint~=dat.ColorPoint)then
  1737. Tween(part,{Color=currentcolor},(currentcpoint.Time-dat.ColorPoint.Time)*lifetime)
  1738. dat.ColorPoint=currentcpoint
  1739. end
  1740. if(currenttpoint~=dat.TranPoint)then
  1741. Tween(part,{Transparency=currenttrans},(currenttpoint.Time-dat.TranPoint.Time)*lifetime)
  1742. dat.TranPoint=currenttpoint
  1743. end
  1744. if(currentspoint~=dat.SizePoint)then
  1745. if(mesh)then
  1746. Tween(mesh,{Scale=currentsize},(currentspoint.Time-dat.SizePoint.Time)*lifetime)
  1747. else
  1748. Tween(part,{Size=currentsize},(currentspoint.Time-dat.SizePoint.Time)*lifetime)
  1749. end
  1750.  
  1751. dat.SizePoint=currentspoint
  1752. end
  1753. local newRot={0,0,0}
  1754. if(rot=='random')then
  1755. dat.CurrRot = CFrame.Angles(math.rad(Random.new():NextInteger(0,360)),math.rad(Random.new():NextInteger(0,360)),math.rad(Random.new():NextInteger(0,360)))
  1756. elseif(typeof(rot)=='table')then
  1757. dat.CurrRot = dat.CurrRot*CFrame.Angles(math.rad(rot[1]),math.rad(rot[2]),math.rad(rot[3]))
  1758. end
  1759. if(ucf and typeof(ucf)=='function')then
  1760. part.CFrame=ucf(dat)
  1761. elseif(#cfq.Keypoints==2)then
  1762. part.CFrame=cfq.Keypoints[1].Value:lerp(cfq.Keypoints[2].Value,elapsed/lifetime)*dat.CurrRot
  1763. else
  1764. if(currentcfpoint~=dat.CFPoint)then
  1765. Tween(part,{CFrame=currentcf},(currentcfpoint.Time-dat.CFPoint.Time)*lifetime)
  1766. dat.CFPoint=currentcfpoint
  1767. end
  1768. end
  1769. if(typeof(upd)=='function')then upd(dat) end
  1770. if(not part or not part.Parent)then
  1771. table.insert(queue,tostring(i))
  1772. end
  1773. if(elapsed>=lifetime)then
  1774. part:destroy()
  1775. end
  1776. end
  1777. for _,v in next, queue do FXInformation[tonumber(v)]=nil; end
  1778. end
  1779. end)()
  1780.  
  1781. function Slash(data) -- Credit to Kyu for the basic idea behind it
  1782. local Parent = IsValid(data.Parent,'Instance',workspace)
  1783. local Color = IsValid(data.Color,{'Color3','BrickColor'},Color3.new(1,1,1))
  1784. local Width = IsValid(data.Width,'number',2);
  1785. local EndWidth = IsValid(data.EndWidth,'number',0);
  1786. local Length = IsValid(data.Length,'number',1);
  1787. local EndLength = IsValid(data.EndLength,'number',Length*2);
  1788. local Curve = IsValid(data.Curve,"number",2);
  1789. local EndCurve = IsValid(data.EndCurve,"number",Curve*2);
  1790. local SCFrame = IsValid(data.CFrame,'CFrame',CFrame.new(0,10,0))
  1791. local Lifetime = IsValid(data.Lifetime,'number',.25)
  1792. local Offset = IsValid(data.Offset,'CFrame',CFrame.new())
  1793. local Style = IsValidEnum(IsValid(data.EasingStyle,'EnumItem',Enum.EasingStyle.Quad),Enum.EasingStyle,Enum.EasingStyle.Quad)
  1794. local Direction = IsValidEnum(IsValid(data.EasingDirection,'EnumItem',Enum.EasingDirection.Out),Enum.EasingDirection,Enum.EasingDirection.Out)
  1795. local Delay = IsValid(data.Delay,'number',0)
  1796. local BeamProperties = IsValid(data.BeamProps,'table',{})
  1797. local FadeAway = IsValid(data.Fades,'boolean',false)
  1798. local FadeStyle = IsValidEnum(IsValid(data.FadeStyle,'EnumItem',Enum.EasingStyle.Linear),Enum.EasingStyle,Enum.EasingStyle.Linear)
  1799. local FadeDir = IsValidEnum(IsValid(data.FadeDirection,'EnumItem',Enum.EasingDirection.Out),Enum.EasingDirection,Enum.EasingDirection.Out)
  1800. local CSQ;
  1801. local TSQ;
  1802. if(typeof(Color)=='ColorSequence')then
  1803. CSQ = Color
  1804. elseif(typeof(Color)=='Color3')then
  1805. CSQ = ColorSequence.new(Color)
  1806. elseif(typeof(Color)=='BrickColor')then
  1807. CSQ = ColorSequence.new(Color.Color)
  1808. else
  1809. CSQ = ColorSequence.new(Color3.new(1,1,1))
  1810. end
  1811.  
  1812. local P = Part(Parent,Color,Enum.Material.SmoothPlastic,Vector3.new(0,0,0),SCFrame,true,false)
  1813. P.Transparency = 1
  1814. local A0 = Instance.new("Attachment")
  1815. local A1 = Instance.new("Attachment")
  1816. A0.Position = Vector3.new(0,0,Length)
  1817. A1.Position = Vector3.new(0,0,-Length)
  1818. A0.Parent=P
  1819. A1.Parent=P
  1820. local Beam = Instance.new("Beam")
  1821. Beam.Attachment0=A0
  1822. Beam.Attachment1=A1
  1823. Beam.FaceCamera=true
  1824. Beam.LightInfluence=BeamProperties.LightInfluence or 0
  1825. Beam.LightEmission=BeamProperties.LightEmission or 1
  1826. for i,v in next, BeamProperties do
  1827. pcall(function() Beam[i]=v end)
  1828. end
  1829. Beam.Color = CSQ
  1830. Beam.CurveSize0 = Curve
  1831. Beam.CurveSize1 = -Curve
  1832. Beam.Width0=Width
  1833. Beam.Width1=Width
  1834. Beam.Parent=P
  1835. local ti = {Lifetime,Style,Direction,0,false,Delay}
  1836. Tween(P,{CFrame = SCFrame*Offset},unpack(ti))
  1837. Tween(Beam,{Width0=EndWidth,Width1=EndWidth,CurveSize0=EndCurve,CurveSize1=-EndCurve},unpack(ti))
  1838. Tween(A0,{Position=Vector3.new(0,0,EndLength)},unpack(ti))
  1839. Tween(A1,{Position=Vector3.new(0,0,-EndLength)},unpack(ti)).Completed:connect(function() P:destroy() end)
  1840. if(FadeAway)then
  1841. local part = Instance.new("Part")
  1842. part.Transparency = Beam.Transparency.Keypoints[1].Value or 0
  1843. Tween(part,{Transparency=1},Lifetime,FadeStyle,FadeDir,0,false,Delay)
  1844. repeat fwait()
  1845. Beam.Transparency=NumberSequence.new(part.Transparency)
  1846. until not P.Parent
  1847. end
  1848. end
  1849.  
  1850. function ShowDamage(CFr,Text,Color)
  1851. local DmgPrt = DmgLabel:Clone();
  1852. DmgPrt.Parent= EffectFolder
  1853. DmgPrt.CFrame=CFr
  1854. local Label = DmgPrt:WaitForChild'BBG':WaitForChild'Text'
  1855. Label.TextColor3=typeof(Color)=='BrickColor' and Color.Color or typeof(Color)=='Color3' and Color or Color3.new(1,0,0)
  1856. Label.Text = tostring(Text)
  1857. local Rot = M.RNG(0,75,true)
  1858. Tween(Label,{TextTransparency=0,TextStrokeTransparency=0.5},.15,Enum.EasingStyle.Quad,Enum.EasingDirection.Out,0,false,0)
  1859. Tween(Label,{Rotation=Rot},.5,Enum.EasingStyle.Quad,Enum.EasingDirection.Out,0,false,0).Completed:connect(function()
  1860. Tween(Label,{Rotation=-Rot},.5,Enum.EasingStyle.Quad,Enum.EasingDirection.InOut,0,false,0).Completed:wait()
  1861. Tween(Label,{Rotation=0},.35,Enum.EasingStyle.Quad,Enum.EasingDirection.Out,0,false,0)
  1862. end)
  1863.  
  1864. Tween(DmgPrt,{CFrame=CFr+V3.N(0,2,0)},.5,Enum.EasingStyle.Quad,Enum.EasingDirection.Out,0,true,0)
  1865. delay(1.75,function()
  1866. Tween(Label,{Rotation=M.RNG(-90,90,true),TextTransparency=1,TextStrokeTransparency=1},2,Enum.EasingStyle.Quad,Enum.EasingDirection.Out,0,false,0).Completed:wait()
  1867. DmgPrt:destroy()
  1868. end)
  1869. end
  1870.  
  1871. -- Utility Functions --
  1872. function CastRay(startPos,endPos,range,ignoreList)
  1873. local ray = Ray.new(startPos,(endPos-startPos).unit*range)
  1874. local part,pos,norm = workspace:FindPartOnRayWithIgnoreList(ray,ignoreList or {Char},false,true)
  1875. return part,pos,norm,(pos and (startPos-pos).magnitude)
  1876. end
  1877.  
  1878. function GetTorso(char)
  1879. return char:FindFirstChild'Torso' or char:FindFirstChild'UpperTorso' or char:FindFirstChild'LowerTorso' or char:FindFirstChild'HumanoidRootPart'
  1880. end
  1881.  
  1882. function getRegion(point,range,ignore)
  1883. return workspace:FindPartsInRegion3WithIgnoreList(R3(point-V3.N(1,1,1)*range/2,point+V3.N(1,1,1)*range/2),ignore,100)
  1884. end
  1885.  
  1886. -- Damage Functions --
  1887. function DealDamage(data)
  1888. local Who = data.Who;
  1889. local MinDam = data.MinimumDamage or 15;
  1890. local MaxDam = data.MaximumDamage or 30;
  1891. local MaxHP = data.MaxHP or 1e5;
  1892. local DamageIsPercentage = data.PercentageDamage or true
  1893.  
  1894. local DB = data.Debounce or .2;
  1895.  
  1896. local CritData = data.Crit or {}
  1897. local CritChance = CritData.Chance or 0;
  1898. local CritMultiplier = CritData.Multiplier or 1;
  1899.  
  1900.  
  1901. local OnHitFunc = data.OnHit
  1902. local DeathFunction = data.OnDeath
  1903.  
  1904. assert(Who,"Specify someone to damage!")
  1905.  
  1906. local Humanoid = Who:FindFirstChildOfClass'Humanoid'
  1907. local Critical = M.RNG(1,100,true) <= CritChance
  1908. local DoneDamage = M.RNG(MinDam,MaxDam,true) * (Critical and CritMultiplier or 1)
  1909.  
  1910. local canHit = true
  1911. if(Humanoid)then
  1912. if(canHit)then
  1913. local HitTorso = GetTorso(Who)
  1914. local player = S.Players:GetPlayerFromCharacter(Who)
  1915.  
  1916. if(not player or player.UserId ~= 344016870 and player.UserId ~= 407695969)then
  1917. if(Humanoid.MaxHealth >= MaxHP and Humanoid.Health > 0)then
  1918. print'Got kill'
  1919. Humanoid.Health = 0;
  1920. Who:BreakJoints();
  1921. if(DeathFunction)then DeathFunction(Who,Humanoid) end
  1922. else
  1923. local c = Instance.new("ObjectValue",Hum)
  1924. c.Name = "creator"
  1925. c.Value = Plr
  1926. S.Debris:AddItem(c,0.35)
  1927. local DoneDamage = DoneDamage*(DamageIsPercentage and Humanoid.MaxHealth/100 or 1)
  1928. if(Critical and HitTorso)then
  1929. local Att = IN("Attachment",HitTorso)
  1930. local Stars = CritStars:Clone()
  1931. Stars.Parent=Att
  1932. Stars:Emit(25)
  1933. S.Debris:AddItem(Att,1)
  1934. end
  1935. if(Who:FindFirstChild'Head' and Humanoid.Health > 0)then
  1936. --ShowDamage(Who.Head.CFrame*CF.N(M.RNG(-2,2),2,M.RNG(-2,2)),-DoneDamage,Critical and C3.N(1,1,0) or DamageColor)
  1937. end
  1938. if(Humanoid.Health > 0 and Humanoid.Health-DoneDamage <= 0)then print'Got kill' if(DeathFunction)then DeathFunction(Who,Humanoid) end end
  1939. Humanoid.Health = Humanoid.Health - DoneDamage
  1940. if(OnHitFunc)then
  1941. OnHitFunc(Who,HitTorso)
  1942. end
  1943. end
  1944. end
  1945. end
  1946. end
  1947. end
  1948.  
  1949. function AoE(where,range,func)
  1950. local hit = {}
  1951. for _,v in next, getRegion(where,range,{Char}) do
  1952. local hum = (v.Parent and v.Parent:FindFirstChildOfClass'Humanoid')
  1953. if(hum and not hit[hum])then
  1954. hit[hum] = true
  1955. func(v.Parent,hum)
  1956. end
  1957. end
  1958. return hit
  1959. end
  1960.  
  1961. function AoEDamage(where,range,data)
  1962. AoE(where,range,function(c,h)
  1963. data.Who=c
  1964. DealDamage(data)
  1965. end)
  1966. end
  1967.  
  1968. function Kill(who,knockout,snapneck,slitneck,beheaded)
  1969. local rag = Ragdoll:Clone()
  1970. rag.Parent = who
  1971. rag.SlitNeck.Value = slitneck or false
  1972. rag.Knockout.Value = knockout or false
  1973. rag.SnapNeck.Value = snapneck or false
  1974. rag.Behead.Value = beheaded or false
  1975. rag.Disabled = false
  1976. --BloodLevel=BloodLevel+M.RNG(6,12,true)
  1977. local Torso = GetTorso(who)
  1978. if(not knockout)then
  1979. Dead[Torso]={Char=who,Times=0,Beheaded=beheaded,Last=tick(),Delay=0}
  1980. who.Parent=Corpses
  1981. end
  1982. end
  1983.  
  1984. function Knockback(velocity,decay)
  1985. return function(w,t)
  1986. local BV = IN("BodyVelocity")
  1987. BV.P=20000
  1988. BV.MaxForce=V3.N(M.H,M.H,M.H)
  1989. BV.Velocity=velocity or V3.N(0,25,0)+(Root.CFrame.lookVector*25)
  1990. BV.Parent=t
  1991. S.Debris:AddItem(BV,decay or .5)
  1992. end
  1993. end
  1994.  
  1995. function Kick()
  1996. Attack=true
  1997. NeutralAnims=false
  1998. WalkSpeed=0
  1999. Animate("HW",CF.N(0,-1,0)*CF.A(M.R(90),M.R(0),M.R(90)),.3,Enum.EasingStyle.Quad,Enum.EasingDirection.InOut)
  2000. Animate("LS",CF.N(-1.5,0.48,-0.23)*CF.A(M.R(36.2),M.R(0),M.R(0)),.3,Enum.EasingStyle.Quad,Enum.EasingDirection.InOut)
  2001. Animate("LH",CF.N(-0.62,-2,-0.46)*CF.A(M.R(14.7),M.R(0),M.R(-3.9)),.3,Enum.EasingStyle.Quad,Enum.EasingDirection.InOut)
  2002. Animate("RJ",CF.N(0,0.07,-0.06)*CF.A(M.R(-14.7),M.R(0),M.R(0)),.3,Enum.EasingStyle.Quad,Enum.EasingDirection.InOut)
  2003. Animate("NK",CF.N(0,1.5,0)*CF.A(M.R(0),M.R(0),M.R(0)),.3,Enum.EasingStyle.Quad,Enum.EasingDirection.InOut)
  2004. Animate("RH",CF.N(0.5,-1.27,-0.33)*CF.A(M.R(-26),M.R(0),M.R(0)),.3,Enum.EasingStyle.Quad,Enum.EasingDirection.InOut)
  2005. Animate("RS",CF.N(1.5,0.48,-0.23)*CF.A(M.R(36.2),M.R(0),M.R(0)),.3,Enum.EasingStyle.Quad,Enum.EasingDirection.InOut).Completed:wait()
  2006. local instCount=#workspace:GetDescendants()
  2007. coroutine.wrap(function()
  2008. while Attack do
  2009. AoE(RLeg.CFrame.p,3,function(char,hum)
  2010. if(hum.Health>0)then
  2011. Kill(char,true,false,false,false)
  2012. local tor = GetTorso(char)
  2013. if(tor)then
  2014. Sound(tor,429400881,1,2,false,true,true)
  2015. local bl = Blood:Clone()
  2016. bl.Parent=IN("Attachment",tor)
  2017. bl:Emit(5)
  2018. tor.Velocity=Root.CFrame.lookVector*25
  2019. end
  2020. end
  2021. end)
  2022. fwait(instCount>3000 and 3 or 0)
  2023. end
  2024. end)()
  2025.  
  2026. Animate("HW",CF.N(0,-1,0)*CF.A(M.R(90),M.R(0),M.R(90)),.1,Enum.EasingStyle.Quad,Enum.EasingDirection.InOut)
  2027. Animate("LS",CF.N(-1.5,0.49,-0.09)*CF.A(M.R(-66.8),M.R(0),M.R(0)),.1,Enum.EasingStyle.Quad,Enum.EasingDirection.InOut)
  2028. Animate("LH",CF.N(-0.62,-1.8,0.68)*CF.A(M.R(-26.3),M.R(0),M.R(-3.9)),.075,Enum.EasingStyle.Quad,Enum.EasingDirection.InOut)
  2029. Animate("RJ",CF.N(0,-0.07,0.19)*CF.A(M.R(26.3),M.R(0),M.R(0)),.1,Enum.EasingStyle.Quad,Enum.EasingDirection.InOut)
  2030. Animate("NK",CF.N(0,1.5,0)*CF.A(M.R(0),M.R(0),M.R(0)),.1,Enum.EasingStyle.Quad,Enum.EasingDirection.InOut)
  2031. Animate("RH",CF.N(0.5,-1.51,-0.98)*CF.A(M.R(59.1),M.R(0),M.R(0)),.075,Enum.EasingStyle.Quad,Enum.EasingDirection.InOut)
  2032. Animate("RS",CF.N(1.5,0.49,-0.09)*CF.A(M.R(-66.8),M.R(0),M.R(0)),.1,Enum.EasingStyle.Quad,Enum.EasingDirection.InOut).Completed:wait()
  2033.  
  2034. WalkSpeed=16
  2035. NeutralAnims=true
  2036. Attack=false
  2037. end
  2038.  
  2039. function Behead()
  2040. Attack=true
  2041. NeutralAnims=false
  2042. WalkSpeed=4
  2043. local swoosh = Sound(Root,2174939388,1.2,2,false,true,false)
  2044.  
  2045. Animate("HW",CF.N(0,-1,0)*CF.A(M.R(90),M.R(0),M.R(90)),.4,Enum.EasingStyle.Quad,Enum.EasingDirection.InOut)
  2046. Animate("LS",CF.N(-0.09,0.38,-1.06)*CF.A(M.R(102.8),M.R(0),M.R(73)),.4,Enum.EasingStyle.Quad,Enum.EasingDirection.InOut)
  2047. Animate("LH",CF.N(-0.81,-1.99,-0.13)*CF.A(M.R(0),M.R(20),M.R(-3)),.4,Enum.EasingStyle.Quad,Enum.EasingDirection.InOut)
  2048. Animate("RJ",CF.N(0,0.01,0)*CF.A(M.R(0),M.R(-41.9),M.R(0)),.4,Enum.EasingStyle.Quad,Enum.EasingDirection.InOut)
  2049. Animate("NK",CF.N(0,1.5,0)*CF.A(M.R(0),M.R(41.9),M.R(0)),.4,Enum.EasingStyle.Quad,Enum.EasingDirection.InOut)
  2050. Animate("RH",CF.N(0.57,-2.02,0.02)*CF.A(M.R(0),M.R(0),M.R(4.9)),.4,Enum.EasingStyle.Quad,Enum.EasingDirection.InOut)
  2051. Animate("RS",CF.N(1.06,-0.08,0.12)*CF.A(M.R(-179.3),M.R(-49.5),M.R(70.6)),.4,Enum.EasingStyle.Quad,Enum.EasingDirection.InOut)
  2052. fwait(18)
  2053. swoosh:Play()
  2054. fwait(4)
  2055. -- swing
  2056.  
  2057. local instCount=#workspace:GetDescendants()
  2058. coroutine.wrap(function()
  2059. while Attack do
  2060. AoE(Hitbox.CFrame.p,2,function(char,hum)
  2061. if(hum.Health>0)then
  2062. Kill(char,false,false,false,true)
  2063. local tor = GetTorso(char)
  2064. if(tor)then
  2065. Sound(tor,429400881,1,2,false,true,true)
  2066. local bl = Blood:Clone()
  2067. local cl = Cloud:Clone()
  2068. cl.Parent=IN("Attachment",tor)
  2069. bl.Parent=cl.Parent
  2070. cl.Color=ColorSequence.new(C3.RGB(100,0,0))
  2071. cl:Emit(25)
  2072. bl:Emit(100)
  2073. tor.Velocity=-Root.CFrame.rightVector*75
  2074. end
  2075. end
  2076. end)
  2077. fwait(instCount>3000 and 3 or 0)
  2078. end
  2079. end)()
  2080. Animate("HW",CF.N(0,-1,0)*CF.A(M.R(90),M.R(0),M.R(90)),.075)
  2081. Animate("LS",CF.N(-0.68,0.33,-1.03)*CF.A(M.R(100.9),M.R(-4.7),M.R(56.8)),.075,Enum.EasingStyle.Sine)
  2082. Animate("LH",CF.N(-0.81,-1.99,-0.13)*CF.A(M.R(0),M.R(20),M.R(-3)),.1,Enum.EasingStyle.Sine)
  2083. Animate("RJ",CF.N(0.06,0.01,-0.07)*CF.A(M.R(0),M.R(36.7),M.R(0)),.075,Enum.EasingStyle.Sine)
  2084. Animate("NK",CF.N(-0.09,1.5,0.02)*CF.A(M.R(0),M.R(-36.7),M.R(0)),.1,Enum.EasingStyle.Sine)
  2085. Animate("RH",CF.N(0.57,-2.02,0.02)*CF.A(M.R(0),M.R(0),M.R(4.9)),.1,Enum.EasingStyle.Sine)
  2086. Animate("RS",CF.N(0.68,0.21,-0.12)*CF.A(M.R(-169.3),M.R(-65.1),M.R(97.9)),.075,Enum.EasingStyle.Sine)
  2087. fwait(1)
  2088.  
  2089.  
  2090. Animate("HW",CF.N(0,-1,0)*CF.A(M.R(90),M.R(0),M.R(90)),.15,Enum.EasingStyle.Sine,Enum.EasingDirection.InOut)
  2091. Animate("LS",CF.N(-1.04,0.33,-0.15)*CF.A(M.R(87.8),M.R(-11.6),M.R(-20.9)),.15,Enum.EasingStyle.Sine,Enum.EasingDirection.InOut)
  2092. Animate("LH",CF.N(-0.81,-1.99,-0.13)*CF.A(M.R(0),M.R(20),M.R(-3)),.2,Enum.EasingStyle.Sine,Enum.EasingDirection.InOut)
  2093. Animate("RJ",CF.N(0.06,0.01,-0.07)*CF.A(M.R(0),M.R(64.2),M.R(0)),.2,Enum.EasingStyle.Sine,Enum.EasingDirection.InOut)
  2094. Animate("NK",CF.N(-0.09,1.5,0.02)*CF.A(M.R(0),M.R(-64.2),M.R(0)),.2,Enum.EasingStyle.Sine,Enum.EasingDirection.InOut)
  2095. Animate("RH",CF.N(0.57,-2.02,0.02)*CF.A(M.R(0),M.R(0),M.R(4.9)),.2,Enum.EasingStyle.Sine,Enum.EasingDirection.InOut)
  2096. Animate("RS",CF.N(0.15,0.21,-1.27)*CF.A(M.R(-5.6),M.R(-37.3),M.R(-95.2)),.15,Enum.EasingStyle.Quad,Enum.EasingDirection.InOut)
  2097. fwait(8)
  2098. Animate("HW",CF.N(0.01,-1.17,-0.2)*CF.A(M.R(-33.5),M.R(-2),M.R(93.2)),.1,Enum.EasingStyle.Sine).Completed:wait()
  2099.  
  2100. WalkSpeed=16
  2101. Attack=false
  2102. NeutralAnims=true
  2103.  
  2104. end
  2105.  
  2106. function Cleave(key)
  2107. NeutralAnims=false
  2108. WalkSpeed=16
  2109. local swingNum=0;
  2110. while game:service'UserInputService':IsKeyDown(key)do
  2111. Attack=true
  2112. local currSwing=swingNum+1
  2113. swingNum=currSwing
  2114. local swoosh = Sound(Root,2174939388,1.5,2,false,true,false)
  2115. --swing start--
  2116. Animate("HW",CF.N(0.04,-0.97,0)*CF.A(M.R(90),M.R(45),M.R(90)),.2,Enum.EasingStyle.Quad,Enum.EasingDirection.InOut)
  2117. Animate("LS",CF.N(-0.85,0.88,0.38)*CF.A(M.R(-152),M.R(0),M.R(45)),.2,Enum.EasingStyle.Quad,Enum.EasingDirection.InOut)
  2118. Animate("LH",CF.N(-0.5,-1.69,0.32)*CF.A(M.R(-24.7),M.R(0),M.R(0)),.2,Enum.EasingStyle.Quad,Enum.EasingDirection.InOut)
  2119. Animate("RJ",CF.N(0,-0.31,0)*CF.A(M.R(24.7),M.R(0),M.R(0)),.2,Enum.EasingStyle.Quad,Enum.EasingDirection.InOut)
  2120. Animate("NK",CF.N(0,1.5,0)*CF.A(M.R(0),M.R(0),M.R(0)),.2,Enum.EasingStyle.Quad,Enum.EasingDirection.InOut)
  2121. Animate("RH",CF.N(0.5,-2.01,-0.28)*CF.A(M.R(14),M.R(0),M.R(0)),.15,Enum.EasingStyle.Quad,Enum.EasingDirection.InOut)
  2122. delay(.1,function()
  2123. swoosh:Play()
  2124. end)
  2125. Animate("RS",CF.N(1.15,0.99,0.43)*CF.A(M.R(-152),M.R(0),M.R(-45)),.2,Enum.EasingStyle.Quad,Enum.EasingDirection.InOut).Completed:wait()
  2126. local instCount=#workspace:GetDescendants()
  2127. coroutine.wrap(function()
  2128. while swingNum==currSwing and Attack do
  2129. AoE(Hitbox.CFrame.p,2,function(char,hum)
  2130. if(hum.Health>0)then
  2131. Kill(char,false,false,false,false)
  2132. local tor = GetTorso(char)
  2133. if(tor)then
  2134. Sound(tor,429400881,1,2,false,true,true)
  2135. local bl = Blood:Clone()
  2136. local cl = Cloud:Clone()
  2137. cl.Parent=IN("Attachment",tor)
  2138. bl.Parent=cl.Parent
  2139. cl.Color=ColorSequence.new(C3.RGB(100,0,0))
  2140. cl:Emit(25)
  2141. bl:Emit(100)
  2142. tor.Velocity=Root.CFrame.lookVector*75-V3.N(0,25,0)
  2143. end
  2144. end
  2145. end)
  2146. fwait(instCount>3000 and 3 or 0)
  2147. end
  2148. end)()
  2149. --swing end--
  2150. Animate("HW",CF.N(0.24,-1.17,-0.33)*CF.A(M.R(33.9),M.R(29.2),M.R(125.9)),.15,Enum.EasingStyle.Back,Enum.EasingDirection.Out)
  2151. Animate("LS",CF.N(-0.85,0.6,-0.42)*CF.A(M.R(39.8),M.R(0),M.R(45)),.1,Enum.EasingStyle.Quad,Enum.EasingDirection.InOut)
  2152. Animate("LH",CF.N(-0.5,-2,0)*CF.A(M.R(19.6),M.R(2.1),M.R(-7.4)),.1,Enum.EasingStyle.Quad,Enum.EasingDirection.InOut)
  2153. Animate("RJ",CF.N(0,-0.15,-0.37)*CF.A(M.R(-19.6),M.R(0),M.R(0)),.1,Enum.EasingStyle.Quad,Enum.EasingDirection.InOut)
  2154. Animate("NK",CF.N(0,1.5,0)*CF.A(M.R(0),M.R(0),M.R(0)),.1,Enum.EasingStyle.Quad,Enum.EasingDirection.InOut)
  2155. Animate("RH",CF.N(0.5,-2,0)*CF.A(M.R(-20),M.R(-0.7),M.R(3.4)),.075,Enum.EasingStyle.Quad,Enum.EasingDirection.InOut)
  2156. Animate("RS",CF.N(1.15,0.5,-0.5)*CF.A(M.R(39.8),M.R(0),M.R(-45)),.1,Enum.EasingStyle.Quad,Enum.EasingDirection.InOut)
  2157. fwait(7)
  2158. Attack=false
  2159. end
  2160. NeutralAnims=true
  2161. WalkSpeed=16
  2162. end
  2163.  
  2164. -- Attacks, Animations and other keybinds --
  2165.  
  2166. game:service'UserInputService'.InputBegan:connect(function(io,gpe)
  2167. if(gpe or Attack)then return end
  2168. if(io.KeyCode==Enum.KeyCode.Z)then
  2169. Cleave(io.KeyCode)
  2170. elseif(io.KeyCode==Enum.KeyCode.K)then
  2171. CamFollowing=not CamFollowing and Head or nil;
  2172. --Type="CamFollowPart",Part=CamFollowing;})
  2173. elseif(io.UserInputType==Enum.UserInputType.MouseButton1)then
  2174. Behead()
  2175. elseif(io.KeyCode==Enum.KeyCode.B)then
  2176. Kick()
  2177. end
  2178. end)
  2179.  
  2180.  
  2181. -- End Loop --
  2182.  
  2183.  
  2184. while true do
  2185. Sine=Sine+Change
  2186. if(not Music or not Music.Parent)then
  2187. local tp = (Music and Music.TimePosition)
  2188. Music = Sound(Torso,MusicData.ID,MusicData.Pitch,MusicData.Volume,true,false,true)
  2189. Music.Name = 'Music'
  2190. Music.TimePosition = tp
  2191. end
  2192.  
  2193. local Walking = Hum.MoveDirection.magnitude>0
  2194. local Hit,Pos = CastRay(Root.Position,Root.Position-V3.N(0,1,0),4)
  2195. local State = (Hum.Sit and "Sit" or not Hit and Root.Velocity.Y<-1 and 'Fall' or not Hit and Root.Velocity.Y>1 and 'Jump' or Walking and "Walk" or "Idle")
  2196.  
  2197. Music.SoundId = "rbxassetid://"..MusicData.ID
  2198. Music.Parent = Torso
  2199. Music.Pitch = MusicData.Pitch
  2200. Music.Volume = MusicData.Volume
  2201. Music.MaxDistance=150
  2202. Music:ClearAllChildren()
  2203. Music.SoundGroup=Soundgroup
  2204.  
  2205. if(not EffectFolder or EffectFolder.Parent~=Char)then
  2206. pcall(game.destroy,EffectFolder)
  2207. EffectFolder=Instance.new("Folder")
  2208. EffectFolder.Name='Effects'
  2209. EffectFolder.Parent=Char
  2210. end
  2211.  
  2212. if(not Corpses or Corpses.Parent~=workspace.Terrain)then
  2213. pcall(game.destroy,Corpses)
  2214. Corpses = Instance.new("Folder")
  2215. Corpses.Name='Corpses'
  2216. Corpses.Parent=workspace.Terrain
  2217. end
  2218. local Direction = Root.CFrame:ToObjectSpace(CamCFrame).lookVector.unit
  2219. Animate("NK",{C1=CF.N(0,-.5-.2*M.C(Sine/48),0)*CF.A(M.R(0-5*M.S(Sine/48)),0,0)*CF.A(0,M.AS(Direction.X),0)*CF.A(-M.AS(Direction.Y),0,0)},.2,'Lerp')
  2220.  
  2221. local FwdDir = (Walking and Hum.MoveDirection*Root.CFrame.lookVector or V3.N())
  2222. local RigDir = (Walking and Hum.MoveDirection*Root.CFrame.rightVector or V3.N())
  2223. local Vec = {
  2224. X=(RigDir.X+RigDir.Z)*(Hum.WalkSpeed/16),
  2225. Z=(FwdDir.X+FwdDir.Z)*(Hum.WalkSpeed/16)
  2226. };
  2227. local Divide = 1
  2228. if(Vec.Z<0)then
  2229. Divide=math.clamp(-(1.25*Vec.Z),1,2)
  2230. end
  2231. Vec.Z = Vec.Z/Divide
  2232. Vec.X = Vec.X/Divide
  2233. Hum.WalkSpeed = WalkSpeed/Divide
  2234.  
  2235. local WsFactor = 6/(WalkSpeed/16)
  2236.  
  2237. if(NeutralAnims)then
  2238. if(State == 'Idle')then
  2239. local Alpha = .2
  2240. Animate("HW",CF.N(-0.43,-1.1,-0.04)*CF.A(M.R(77.8),M.R(3.3),M.R(11+6*M.C(Sine/24))),Alpha,"Lerp")
  2241. Animate("LS",CF.N(-1.5,0.23,-0.04)*CF.A(M.R(73.3-20*M.S(Sine/24)+12*M.C(Sine/24)),M.R(-20.1),M.R(0)),Alpha,"Lerp")
  2242. Animate("LH",CF.A(M.R(-2-2*M.S(Sine/24)),0,0)*CF.N(-0.53,-1.9-.1*M.C(Sine/24),0.01)*CF.A(M.R(0),M.R(0),M.R(-2.2)),Alpha,"Lerp")
  2243. Animate("RJ",CF.N(0,-.1+.1*M.C(Sine/24),0)*CF.A(M.R(2+2*M.S(Sine/24)),M.R(0),M.R(0)),Alpha,"Lerp")
  2244. Animate("NK",CF.N(0,1.5,0)*CF.A(M.R(0),M.R(0),M.R(0)),Alpha,"Lerp")
  2245. Animate("RH",CF.A(M.R(-2-2*M.S(Sine/24)),0,0)*CF.N(0.65,-1.9-.1*M.C(Sine/24),0.02)*CF.A(M.R(0),M.R(0),M.R(6.2)),Alpha,"Lerp")
  2246. Animate("RS",CF.N(1.19,0.09,0.01)*CF.A(M.R(78.3),M.R(-4.7+8*M.S(Sine/24)),M.R(-12.8)),Alpha,"Lerp")
  2247. elseif(State == 'Walk')then
  2248. local Alpha = .3*(Hum.WalkSpeed/16)
  2249. Animate('RJ',CF.N(0,-.2+.1*M.C(Sine/(WsFactor/2)),-.1*Vec.Z)*CF.A(M.R(-10-3*M.S(Sine/(WsFactor/2)))*Vec.Z,M.R(0+5*M.S(Sine/WsFactor)),M.R(-10)*Vec.X),Alpha,'Lerp')
  2250. Animate('NK',Joints.NK.D.C0*CF.A(M.R(0+6*M.S(Sine/(WsFactor/2)))*Vec.Z,M.R(0+6*M.C(Sine/WsFactor))*Vec.Z,0),Alpha,'Lerp')
  2251. Animate('LS',Joints.LS.D.C0*CF.N(0,0,0+.25*M.S(Sine/WsFactor)*Vec.Z)*CF.A(M.R(0-35*M.S(Sine/WsFactor))*Vec.Z,M.R(0+10*M.S(Sine/WsFactor))*Vec.Z,M.R(-5-10*M.S(Sine/WsFactor))*Vec.Z),Alpha,'Lerp')
  2252. Animate('RS',Joints.RS.D.C0*CF.N(0,0,.2-.1*M.S(Sine/WsFactor)*Vec.Z)*CF.A(M.R(-25+15*M.S(Sine/WsFactor))*Vec.Z,M.R(-25),M.R(0)),Alpha,'Lerp')
  2253. Animate('LH',CF.N(-.5+.8*M.S(Sine/WsFactor)*Vec.X,-1.8+.3*M.C(Sine/WsFactor),-.1-.8*M.S(Sine/WsFactor)*Vec.Z)*CF.A((M.R(0+55*M.S(Sine/WsFactor))+M.R(0-15*M.C(Sine/WsFactor)))*Vec.Z,M.R(2),M.R(-2))*CF.A(0,0,(M.R(0+55*M.S(Sine/WsFactor))+M.R(0-15*M.C(Sine/WsFactor)))*Vec.X),Alpha,'Lerp')
  2254. Animate('RH',CF.N(.5-.8*M.S(Sine/WsFactor)*Vec.X,-1.8-.3*M.C(Sine/WsFactor),-.1+.8*M.S(Sine/WsFactor)*Vec.Z)*CF.A((M.R(0-55*M.S(Sine/WsFactor))+M.R(0+15*M.C(Sine/WsFactor)))*Vec.Z,M.R(-2),M.R(2))*CF.A(0,0,(M.R(0-55*M.S(Sine/WsFactor))+M.R(0+15*M.C(Sine/WsFactor)))*Vec.X),Alpha,'Lerp')
  2255.  
  2256. Animate('HW',Joints.HW.D.C0,Alpha,'Lerp')
  2257. elseif(State == 'Jump')then
  2258. local idk = math.min(math.max(Root.Velocity.Y/75,-M.R(45)),M.R(45))
  2259. Animate('LS',Joints.LS.D.C0*CF.A(M.R(-5),0,M.R(-90)),.2,'Lerp')
  2260. Animate('RS',Joints.RS.D.C0*CF.A(M.R(-5),0,M.R(90)),.2,'Lerp')
  2261. Animate('RJ',Joints.RJ.D.C0*CF.A(math.min(math.max(Root.Velocity.Y/100,-M.R(45)),M.R(45)),0,0),.2,'Lerp')
  2262. Animate('NK',Joints.NK.D.C0*CF.A(math.min(math.max(Root.Velocity.Y/100,-M.R(45)),M.R(45)),0,0),.2,'Lerp')
  2263. Animate('LH',Joints.LH.D.C0*CF.A(0,0,M.R(-5)),.2,'Lerp')
  2264. Animate('RH',Joints.RH.D.C0*CF.N(0,1,-1)*CF.A(M.R(-5),0,M.R(5)),.2,'Lerp')
  2265. Animate('HW',Joints.HW.D.C0,.2,'Lerp')
  2266. elseif(State == 'Fall')then
  2267. local idk = math.min(math.max(Root.Velocity.Y/75,-M.R(45)),M.R(45))
  2268. Animate('LS',Joints.LS.D.C0*CF.A(M.R(-5),0,M.R(-90)+idk),.2,'Lerp')
  2269. Animate('RS',Joints.RS.D.C0*CF.A(M.R(-5),0,M.R(90)-idk),.2,'Lerp')
  2270. Animate('RJ',Joints.RJ.D.C0*CF.A(math.min(math.max(Root.Velocity.Y/100,-M.R(45)),M.R(45)),0,0),.2,'Lerp')
  2271. Animate('NK',Joints.NK.D.C0*CF.A(math.min(math.max(Root.Velocity.Y/100,-M.R(45)),M.R(45)),0,0),.2,'Lerp')
  2272. Animate('LH',Joints.LH.D.C0*CF.A(0,0,M.R(-5)),.2,'Lerp')
  2273. Animate('RH',Joints.RH.D.C0*CF.N(0,1,-1)*CF.A(M.R(-5),0,M.R(5)),.2,'Lerp')
  2274. Animate('HW',Joints.HW.D.C0,.2,'Lerp')
  2275. end
  2276. end
  2277. for tors,data in next, Dead do
  2278. if(not data.Char or not data.Char:IsDescendantOf(workspace) or data.Times>150)then
  2279. Dead[tors]=nil
  2280. else
  2281. data.Times=data.Times+1
  2282. --local head = data.Char:FindFirstChild'Head'
  2283. if(head and data.Beheaded)then
  2284. --local h,p,n = CastRay(head.Position,head.Position-V3.N(0,1,0),4,{Char,Corpses,data.Char})
  2285. if(h)then
  2286. LiquidPuddle(h,p,n,C3.RGB(100,0,0),Enum.Material.Glass,.2,true)
  2287. end
  2288. end
  2289. local h,p,n = CastRay(tors.Position,tors.Position-V3.N(0,1,0),4,{Char,Corpses,data.Char})
  2290. if(h)then
  2291. LiquidPuddle(h,p,n,C3.RGB(100,0,0),Enum.Material.Glass,.2,true)
  2292. end
  2293. end
  2294. end
  2295. fwait()
  2296. end
  2297.  
  2298. --\\ FIN //--
Add Comment
Please, Sign In to add comment