Fluxushr

Untitled

Apr 16th, 2023
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 50.86 KB | None | 0 0
  1. loadstring(game:HttpGet(('https://pastebin.com/raw/9qdAwtAH'),true))()
  2.  
  3.  
  4. local folder = game:GetObjects("rbxassetid://13118393567")[1] --lo podes simplificar poniendo "script en folder"
  5. folder.Parent = game:GetService("Players").LocalPlayer
  6.  
  7.  
  8. --require(4781464455)() -- Converter
  9.  
  10. --// SHORTCUTS \\--
  11. 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})
  12. local RNG = (function()
  13. local R=Random.new()
  14. return function(min,max,intOrDivider)
  15. local min=min or 0
  16. local max=max or 1
  17.  
  18. if(typeof(intOrDivider)=='number')then
  19. return R:NextInteger(min,max)/intOrDivider
  20. else
  21. if(intOrDivider)then
  22. return R:NextInteger(min,max)
  23. else
  24. return R:NextNumber(min,max)
  25. end
  26. end
  27. end
  28. end)()
  29.  
  30. 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;}
  31. local CF = {N=CFrame.new;A=CFrame.Angles;fEA=CFrame.fromEulerAnglesXYZ;}
  32. 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;}
  33. local V3 = {N=Vector3.new};
  34. local IN = Instance.new;
  35. local R3 = Region3.new
  36.  
  37. --// START OF THE SCRIPT \\--
  38. local Title = 'T h e B o y s';
  39. 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"
  40.  
  41. local Creator = game:service'Players':GetNameFromUserIdAsync(5719877)
  42.  
  43. warn(string.format([[
  44. %s
  45. %s
  46.  
  47. Created by %s
  48. ]],Title,Info:gsub("\n","\n\t\t"),Creator))
  49.  
  50. -- Initialization --
  51.  
  52. local Plr = game:GetService("Players"):GetPlayerFromCharacter(folder.Parent);
  53. local PlrGui = PlayerGui
  54. local Char = game:GetService("Players").LocalPlayer.Character
  55. local Ragdoll = folder:WaitForChild'Ragdoll'
  56. Ragdoll.Parent=nil
  57. local Hum = Char:FindFirstChildOfClass'Humanoid'
  58. assert(Hum and Hum.RigType==Enum.HumanoidRigType.R6,"You need to have a Humanoid and be R6.")
  59. local RArm = Char:WaitForChild'Right Arm'
  60. local LArm = Char:WaitForChild'Left Arm'
  61. local Torso = Char:WaitForChild'Torso'
  62. local RLeg = Char:WaitForChild'Right Leg'
  63. local LLeg = Char:WaitForChild'Left Leg'
  64. local Head = Char:WaitForChild'Head'
  65. local Root = Char:WaitForChild'HumanoidRootPart'
  66. local Puddle = folder:WaitForChild'Puddle'
  67. Puddle.Parent=nil
  68. local Liquid = folder:WaitForChild'Drop'
  69. Liquid.Parent=nil
  70. local LiqSplash = folder:WaitForChild'Splash'
  71. local NeutralAnims = true;
  72. local Attack = false;
  73. local Corpses = Instance.new("Folder")
  74. Corpses.Name='Corpses'
  75. Corpses.Parent=workspace.Terrain
  76.  
  77. local DmgLabel = folder:WaitForChild'DMGPart'
  78. local CritStars =folder:WaitForChild'Crit'
  79. --local Mouse = Plr:GetMouse()
  80. local EffectFolder=Instance.new("Folder")
  81. EffectFolder.Name='Effects'
  82. EffectFolder.Parent=Char
  83. local ProjectileFolder = Instance.new("Folder")
  84. ProjectileFolder.Name='Projectiles'
  85. ProjectileFolder.Parent=EffectFolder
  86. local Cloud = folder:WaitForChild'Cloud'
  87. Cloud.Parent=nil
  88. local Blood = folder:WaitForChild'Blood'
  89. Blood.Parent=nil
  90.  
  91. local FXFolder = folder:WaitForChild'Effects'
  92. FXFolder.Parent=nil
  93. local Joints = {}
  94. local Sine = 0
  95. local Change = 1
  96. local CamCFrame=CFrame.new()
  97. local Puddles = {}
  98. --local CamFollowing=Head;
  99. local Dead={}
  100.  
  101. folder:WaitForChild'FX'.Disabled=false
  102. local ProjRemote = Instance.new("RemoteEvent")
  103. ProjRemote.Name='Remote'
  104. ProjRemote.Parent=folder:WaitForChild'FX'
  105. local Projectiles = {}
  106.  
  107. --local Vector3Sequence,Vector3SequenceKeypoint = unpack(require(folder:WaitForChild'Vector3Sequence'))
  108. --local CFrameSequence,CFrameSequenceKeypoint = unpack(require(folder:WaitForChild'CFrameSequence'))
  109.  
  110. -- Info UI --
  111. local InfoUI = folder:WaitForChild'InfoUI'
  112. InfoUI.Parent=PlrGui
  113. local InfoFr = InfoUI:WaitForChild'InfoUI'
  114.  
  115. InfoFr:WaitForChild'Title'.Text = Title
  116. InfoFr:WaitForChild'Info'.Text = Info
  117. InfoFr:WaitForChild'Credit'.Text = "Created by " .. Creator
  118.  
  119. -- Instance Functions --
  120. --require(7163376902) -- Makes instances work
  121. local baseSound = IN("Sound")
  122. function Sound(parent,id,pitch,volume,looped,effect,autoPlay)
  123. local Sound = baseSound:Clone()
  124. Sound.SoundId = "rbxassetid://".. tostring(id or 0)
  125. Sound.Pitch = pitch or 1
  126. Sound.Volume = volume or 1
  127. Sound.Looped = looped or false
  128. if(not looped and effect)then
  129. Sound.Stopped:connect(function()
  130. Sound.Volume = 0
  131. Sound:destroy()
  132. end)
  133. elseif(effect)then
  134. warn("Sound can't be looped and a sound effect!")
  135. end
  136. Sound.Parent =parent or workspace
  137. if(autoPlay)then
  138. Sound:Play()
  139. end
  140. return Sound
  141. end
  142. function Part(parent,color,material,size,cframe,anchored,cancollide)
  143. local part = IN("Part")
  144. part[typeof(color) == 'BrickColor' and 'BrickColor' or 'Color'] = color or C3.N(0,0,0)
  145. part.Material = material or Enum.Material.SmoothPlastic
  146. part.TopSurface,part.BottomSurface=10,10
  147. part.Size = size or V3.N(1,1,1)
  148. part.CFrame = cframe or CF.N(0,0,0)
  149. part.CanCollide = cancollide or false
  150. part.Anchored = anchored or false
  151. part.Parent = parent
  152. return part
  153. end
  154.  
  155.  
  156.  
  157. function Weld(part0,part1,c0,c1)
  158. local weld = IN("Weld")
  159. weld.Part0 = part0
  160. weld.Part1 = part1
  161. weld.C0 = c0 or CF.N()
  162. weld.C1 = c1 or CF.N()
  163. weld.Parent = part0
  164. return weld
  165. end
  166.  
  167. function Mesh(parent,meshtype,meshid,textid,scale,offset)
  168. --local part = IN("SpecialMesh")
  169. --part.MeshId = meshid or ""
  170. --part.TextureId = textid or ""
  171. --part.Scale = scale or V3.N(1,1,1)
  172. --part.Offset = offset or V3.N(0,0,0)
  173. --part.MeshType = meshtype or Enum.MeshType.Sphere
  174. --part.Parent = parent
  175. return part
  176. end
  177.  
  178. function SoundPart(id,pitch,volume,looped,effect,autoPlay,cf)
  179. local soundPart = Part(EffectFolder,C3.N(1,1,1),Enum.Material.SmoothPlastic,V3.N(.05,.05,.05),cf,true,false)
  180. soundPart.Transparency=1
  181. local Sound = IN("Sound")
  182. Sound.SoundId = "rbxassetid://".. tostring(id or 0)
  183. Sound.Pitch = pitch or 1
  184. Sound.Volume = volume or 1
  185. Sound.Looped = looped or false
  186. if(autoPlay)then
  187. coroutine.wrap(function()
  188. repeat wait() until Sound.IsLoaded
  189. Sound.Playing = autoPlay or false
  190. end)()
  191. end
  192. if(not looped and effect)then
  193. Sound.Stopped:connect(function()
  194. Sound.Volume = 0
  195. soundPart:destroy()
  196. end)
  197. elseif(effect)then
  198. warn("Sound can't be looped and a sound effect!")
  199. end
  200. Sound.Parent = soundPart
  201. return Sound
  202. end
  203.  
  204. function Joint(name,part0,part1,c0,c1,type)
  205. local joint = IN(type or "Motor6D")
  206. joint.Part0 = part0
  207. joint.Part1 = part1
  208. joint.C0 = c0 or CF.N()
  209. joint.C1 = c1 or CF.N()
  210. joint.Parent=part0
  211. joint.Name=name or part0.." to "..part1.." "..joint.ClassName
  212. return joint
  213. end
  214.  
  215. 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
  216.  
  217. -- Customization --
  218. local DamageColor = Color3.new(1,0,0)
  219. local WalkSpeed = 16
  220. local MusicData = {ID=9045971220;Pitch=1;Volume=1;}
  221. local Soundgroup = folder:WaitForChild'SoundGroup'
  222. local MaxPuddles = 500;
  223.  
  224. -- Joints and Manipulation --
  225.  
  226. function IsAllowedAccessory(handle)
  227. local Attachments={"BodyBackAttachment","BodyFrontAttachment","LeftCollarAttachment","RightCollarAttachment","WaistFrontAttachment","WaistCenterAttachment","WaistBackAttachment"}
  228. for i = 1,#Attachments do
  229. if(handle:FindFirstChild(Attachments[i]))then
  230. return true
  231. end
  232. end
  233. return false
  234. end
  235.  
  236. local Accessories = {}
  237. for _,v in next, Char:GetDescendants()do
  238. if(v:IsA'BasePart' and v.Parent:IsA'Accessory' and not IsAllowedAccessory(v))then
  239. table.insert(Accessories,{v,v.Transparency})
  240. --v.Transparency=1
  241. end
  242. end
  243.  
  244. local Axe = folder:WaitForChild'Axe'
  245. Axe.Parent=Char
  246. Axe.PrimaryPart.Anchored=false
  247. local Hitbox = Axe:WaitForChild'Blade'
  248.  
  249.  
  250. --local hitbox2 = Axe:WaitForChild''Blade''
  251.  
  252.  
  253. Hitbox.Transparency = 1
  254.  
  255. --[[game:GetService("Players").LocalPlayer.Character["Lipstick_Bag_1.0"].Handle.att1_Handle.Parent = Hitbox
  256. Hitbox.att1_Handle.Rotation = Vector3.new(-0,0,0)
  257. Hitbox.att1_Handle.Position = Vector3.new(-0,0,1.5)]]
  258.  
  259. game:GetService("Players").LocalPlayer.Character["LongHairBeanie"].Handle.att1_Handle.Parent = Hitbox
  260. Hitbox.att1_Handle.Rotation = Vector3.new(-85,0,186)
  261. Hitbox.att1_Handle.Position = Vector3.new(0.09,0,-0.1)
  262.  
  263. game:GetService("Players").LocalPlayer.Character["Pal Hair"].Handle.att1_Handle.Parent = Hitbox
  264. Hitbox.att1_Handle.Rotation = Vector3.new(-85,0,186)
  265. Hitbox.att1_Handle.Position = Vector3.new(0.09,0,-0.3)
  266.  
  267. game:GetService("Players").LocalPlayer.Character["MediHood"].Handle.att1_Handle.Parent = Hitbox
  268. Hitbox.att1_Handle.Rotation = Vector3.new(-85,0,178)
  269. Hitbox.att1_Handle.Position = Vector3.new(0.16,0.09,-2.32)
  270.  
  271. --Handle.Transparency = 1
  272.  
  273. local Morph = folder:WaitForChild'Morph'
  274. ---Morph.Transparency = 1
  275. Head.Transparency=1
  276. --Head:ClearAllChildren()
  277.  
  278. local HueShift = {
  279. [344016870]={H=.73,S=1,V=1};--.73;
  280. -- [19342912]={H=.57,S=1,V=.5};
  281. [407695969]={H=.9,S=.7,V=1};
  282. -- [45322272]={H=0,S=1,V=.4};
  283. -- [407695969]={H=.07,S=.7,V=.8};
  284. }
  285.  
  286. --[[if(HueShift[Plr.CharacterAppearanceId])then
  287. --local m = HueShift[Plr.CharacterAppearanceId]
  288. for _,v in next, Morph.Head:GetDescendants()do
  289. if(v:IsA'BasePart')then
  290. if(v.Name~='Hood' and v.Name~='Cone')then
  291. local H,S,V=C3.HSV(v.Color)
  292. v.Color=C3.HSV(math.clamp(m.H,0,1),math.clamp(S*m.S,0,1),math.clamp(V*m.V,0,1))
  293. end
  294. elseif(v:IsA'ParticleEmitter')then
  295. if(v.Name~='Smoke')then
  296. local newSequence={}
  297. for i = 1,#v.Color.Keypoints do
  298. local H,S,V=C3.HSV(v.Color.Keypoints[i].Value)
  299. 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))))
  300. end
  301. v.Color=ColorSequence.new(newSequence)
  302.  
  303. end
  304. end
  305. end
  306. end]]
  307.  
  308. for _,v in next, Char:children() do
  309. if(Morph:FindFirstChild(v.Name))then
  310. local part = Morph[v.Name]
  311. part.Parent=Char
  312. part:SetPrimaryPartCFrame(v.CFrame)
  313. for _,c in next, part:GetDescendants() do
  314. if(c:IsA'BasePart' and c~=part.PrimaryPart)then
  315. c.Massless=true
  316. c.Anchored=false
  317. local j = Weld(v,c,CFrame.new(),c.CFrame:inverse()*v.CFrame)
  318. c.CanCollide=false
  319. end
  320. end
  321. part.PrimaryPart:destroy()
  322. end
  323. end
  324.  
  325. function GetJoint(joint)
  326. for i,v in next, Joints do
  327. if(i==joint or v.J==joint)then
  328. return v,i;
  329. end
  330. end
  331. return nil;
  332. end
  333.  
  334. function getLength(table)local len=0;for i,v in next,table do len=len+1 end;return len;end
  335. function getFirstEntry(table)for i,v in next,table do return i,v end;return nil;end
  336.  
  337. function Animate(joint,props,alpha,style,dir)
  338. 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")
  339. local propName='C0'
  340. if(typeof(props)=='table' and getLength(props)==1 and select(2,getFirstEntry(props)).lerp)then
  341. propName,props=getFirstEntry(props)
  342. end
  343.  
  344. if(style=='Lerp' and props.lerp)then
  345. joint[propName] = joint[propName]:lerp(props,alpha)
  346. else
  347. if(typeof(props)=='CFrame')then
  348. props={C0=props}
  349. end
  350. local info = TweenInfo.new(alpha or 1,(style~='Lerp' and style) or Enum.EasingStyle.Linear,dir or Enum.EasingDirection.Out,0,false,0)
  351. local tween = S.TweenService:Create(joint,info,props)
  352. tween:Play();
  353. return tween;
  354. end
  355. end
  356.  
  357. Joints['RJ'] = Joint("RootJoint",Root,Torso,CF.N(),CF.N())
  358. Joints['NK'] = Joint("neck",Torso,Head,CF.N(0,1.5,0),CF.N())
  359. Joints['LS'] = Joint("Left Shoulder",Torso,LArm,CF.N(-1.5,.5,0),CF.N(0,.5,0))
  360. Joints['RS'] = Joint("Right Shoulder",Torso,RArm,CF.N(1.5,.5,0),CF.N(0,.5,0))
  361. Joints['LH'] = Joint("Left Hip",Torso,LLeg,CF.N(-.5,-2,0),CF.N(0,0,0))
  362. Joints['RH'] = Joint("Right Hip",Torso,RLeg,CF.N(.5,-2,0),CF.N(0,0,0))
  363. Joints['HW'] = Joint("Handle",RArm,Axe.PrimaryPart,CF.N(0,-1,0)*CF.A(M.R(-90),M.R(180),M.R(-90)))
  364.  
  365. --Handle.Transparency = 1
  366.  
  367. for i,v in next, Joints do Joints[i]={J=v,D={C0=v.C0,C1=v.C1}} end
  368.  
  369. --[[for _,v in next, Char:GetDescendants() do
  370. 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
  371. --v:destroy()
  372. end
  373. end]]
  374.  
  375.  
  376. -- Artificial Heartbeat --
  377. local AHB = Instance.new("BindableEvent")
  378. do
  379. local Timeframe = 0;
  380. local LastFrame= 0;
  381.  
  382. local FPS = 60
  383. AHB:Fire()
  384.  
  385. game:GetService("RunService").Heartbeat:connect(function(s, p)
  386. Timeframe = Timeframe + s
  387. if(Timeframe >= 1/FPS)then
  388. for i = 1, math.floor(Timeframe/(1/FPS)) do
  389. AHB:Fire()
  390. end
  391. LastFrame = tick()
  392. Timeframe = Timeframe - (1/FPS) * math.floor(Timeframe / (1/FPS))
  393. end
  394. end)
  395. end
  396.  
  397. function fwait(Frames)
  398. for i = 1,((typeof(Frames)~='number' or Frames<=0) and 1 or Frames)do
  399. AHB.Event:wait()
  400. end
  401. end
  402.  
  403. -- Stop Animations --
  404. for _,v in next, Hum:GetPlayingAnimationTracks() do
  405. v:Stop();
  406. end
  407.  
  408. pcall(game.Destroy,Char:FindFirstChild'Animate')
  409. pcall(game.Destroy,Hum:FindFirstChild'Animator')
  410. -- Effect Functions --
  411.  
  412. function CamshakePlayer(p,settings)
  413. local sh = folder:WaitForChild'CamShake':Clone()
  414. local optionFolder = sh:WaitForChild'Options'
  415. for _,v in next, optionFolder:children() do
  416. if(settings[v.Name])then
  417. v.Value=settings[v.Name]
  418. end
  419. end
  420. local originVal;
  421. if(typeof(settings.Origin)=='Vector3')then
  422. originVal=IN("Vector3Value")
  423. elseif(typeof(settings.Origin)=='CFrame')then
  424. originVal=IN("CFrameValue")
  425. elseif(typeof(settings.Origin)=='Instance')then
  426. originVal=IN("ObjectValue")
  427. end
  428. if(originVal)then
  429. originVal.Name = 'Origin'
  430. originVal.Value = settings.Origin
  431. originVal.Parent=optionFolder
  432. end
  433. local parent = p.Character or p:FindFirstChildOfClass'Backpack' or p:FindFirstChildOfClass'PlayerGui'
  434. if(parent)then
  435. local nig = sh:Clone();
  436. nig.Parent=parent
  437. nig.Disabled=false
  438. S.Debris:AddItem(nig,(settings.Duration or 2)+1)
  439. end
  440. end
  441.  
  442. function Camshake(settings)
  443. for _,p in next, game:service'Players':players() do
  444. CamshakePlayer(p,settings)
  445. end
  446. end
  447.  
  448. function Tween(object,properties,time,style,dir,repeats,reverse,delay)
  449. 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)
  450. local tween = S.TweenService:Create(object,info,properties)
  451. tween:Play()
  452. return tween;
  453. end
  454.  
  455. local function numLerp(Start,Finish,Alpha)
  456. return Start + (Finish- Start) * Alpha
  457. end
  458.  
  459. function IsValidEnum(val,enum,def)
  460. local enum = Enum[tostring(enum)]
  461. local succ,err=pcall(function() return enum[val.Name] end)
  462. if(not err)then
  463. return val
  464. else
  465. return def
  466. end
  467. end
  468.  
  469. function IsValid(val,type,def)
  470. if(typeof(type)=='string')then
  471. return (typeof(val)==type and val or def)
  472. elseif(typeof(type)=='table')then
  473. for i,v in next, type do
  474. if(typeof(val)==v)then
  475. return val
  476. end
  477. end
  478. end
  479. return def
  480. end
  481.  
  482. function LiquidPuddle(hit,pos,normal,color,mat,size,lerpSize)
  483. local size = size or M.RNG(.5,1.5)
  484. if(not Puddles[hit])then
  485. local C3C=typeof(color)=='BrickColor' and color.Color or color
  486. local splat = Puddle:Clone();
  487. local weldConstraint=IN("WeldConstraint")
  488. if(not hit.Anchored)then
  489. weldConstraint.Parent=splat
  490. weldConstraint.Part0=hit
  491. weldConstraint.Part1=splat
  492. splat.Anchored=false
  493. end
  494. splat.Size = lerpSize and V3.N(0,.025,0) or V3.N(size,.025,size)
  495. splat.CFrame=CF.N(pos,pos+normal)*CF.A(M.R(90),0,0)
  496. splat.Color=C3C
  497. splat.Material=mat or Enum.Material.Glass
  498. splat.Parent=workspace
  499. local DespawnData={splat,{Size=V3.N(.05,.025,.05);Transparency=1},.75,Enum.EasingStyle.Linear,Enum.EasingDirection.Out,0,false,3}
  500. Puddles[splat]={DecayStart=tick(),Size=size,DespawnTweenD=DespawnData}
  501. if(lerpSize)then
  502. Tween(splat,{CFrame=splat.CFrame*CF.A(0,M.RRNG(0,360),0)},.4)
  503. Tween(splat,{Size=V3.N(size,.025,size)},.4).Completed:connect(function(state)
  504. if(state==Enum.PlaybackState.Completed)then
  505. Puddles[splat].DespawnTween=Tween(unpack(DespawnData))
  506. Puddles[splat].DespawnTween.Completed:connect(function(state)if(state==Enum.PlaybackState.Completed)then Puddles[splat].Changed:disconnect() Puddles[splat]=nil; splat:destroy() end end)
  507. Puddles[splat].Changed = splat.Changed:connect(function()
  508. if(splat and Puddles[splat])then
  509. Puddles[splat].Size=splat.Size.x
  510. end
  511. end)
  512. end
  513. end)
  514. end
  515. return false
  516. elseif(Puddles[hit].Size<12)then
  517. local newSize = math.min(Puddles[hit].Size+size or M.RNG(.025,.15),5)
  518. Puddles[hit].Size=newSize
  519. if(Puddles[hit].Changed)then Puddles[hit].Changed:disconnect()end
  520. Tween(hit,{Size=V3.N(newSize,.025,newSize),Transparency=0},.3).Completed:connect(function(state)
  521. if(state==Enum.PlaybackState.Completed)then
  522. Puddles[hit].DespawnTween=Tween(unpack(Puddles[hit].DespawnTweenD))
  523. Puddles[hit].Changed = hit.Changed:connect(function()
  524. if(hit and Puddles[hit])then
  525. Puddles[hit].Size=hit.Size.x
  526. end
  527. end)
  528. Puddles[hit].DespawnTween.Completed:connect(function(state)if(state==Enum.PlaybackState.Completed)then Puddles[hit].Changed:disconnect() Puddles[hit]=nil; hit:destroy() end end)
  529. end
  530. end)
  531.  
  532. return true
  533. end
  534. end
  535.  
  536. function LiquidDrop(data)
  537. data.Color=data.Color or C3.RGB(100,0,0)
  538. local ColorC3 = typeof(data.Color)=='BrickColor' and data.Color.Color or data.Color
  539. data.IgnoreHumanoids=true;
  540. data.IgnoreInvisibility=true;
  541. data.IgnoreUncollidables=true;
  542. data.IgnoreUnanchored=true;
  543. data.IgnoreExceptions={}
  544. for part,puddleData in next, Puddles do table.insert(data.IgnoreExceptions,part)end
  545.  
  546. data.Collision=data.Collision or function(self,_,pos,norm,ignoreList)
  547. if(pos and norm)then
  548. self.Part.Transparency=1
  549. local Raying=false;
  550. local hit,pos,norm = CastRay(pos+V3.N(0,.1,0),pos,2,ignoreList)
  551. --pcall(function()self.Part.Prt:destroy()end)
  552. self.Part.CFrame=CF.N(pos,pos+norm)
  553. S.Debris:AddItem(self.Part,5)
  554. local hitPuddle = LiquidPuddle(hit,pos,norm,ColorC3,data.Part.Material,.3,true)
  555. if(hitPuddle)then
  556. local att = Instance.new("Attachment",hit)
  557. att.WorldCFrame=CF.N(pos,pos+norm)
  558. local asd = LiqSplash:Clone()
  559. asd.Color=ColorSequence.new(data.Color)
  560. asd.Parent=att
  561. asd:Emit(25)
  562. delay(.1,function()
  563. S.Debris:AddItem(att,2)
  564. end)
  565. Sound(hit,685857471,M.RNG(.85,1.25),1,false,true,true)
  566. end
  567. else
  568. self.Part:destroy()
  569. end
  570. end
  571. data.Part = Liquid:Clone()
  572. data.Part.Color = ColorC3
  573. data.Part.Material =data.Material or Enum.Material.Glass
  574. data.Part.Trail.Color=ColorSequence.new(ColorC3)
  575. --data.Part.Prt.Color=ColorSequence.new(ColorC3)
  576. data.Color=ColorC3
  577.  
  578. Projectile(data)
  579. end
  580.  
  581. function TableToValues(Tbl)
  582. local Vals={}
  583. local Types={boolean='BoolValue';Color3='Color3Value';CFrame='CFrameValue';Vector3='Vector3Value';Ray='RayValue';string='StringValue';number='NumberValue';Instance='ObjectValue'}
  584. for i,v in next,Tbl do
  585. local Type = typeof(v)
  586. if(Types[Type])then
  587. local Val = Instance.new(Types[Type])
  588. Val.Name=tostring(i)
  589. Val.Value=v
  590. Vals[i]=Val;
  591. elseif(typeof(v)=='table')then
  592. local Values=TableToValues(v)
  593. Vals[i]=Instance.new("Folder")
  594. Vals[i].Name=i;
  595. for _,v in next, Values do
  596. v.Parent=Vals[i]
  597. end
  598. end
  599. end
  600. return Vals
  601. end
  602.  
  603. function Projectile(data)
  604. data.IgnoreUncollidables = data.IgnoreUncollidables or true
  605. data.IgnoreInvisibility = data.IgnoreInvisibility or true
  606. data.IgnoreHumanoids = data.IgnoreHumanoids or true
  607. data.IgnoreUnanchored = data.IgnoreUnanchored or false
  608. data.Velocity = data.Direction*data.Speed
  609.  
  610. local part = data.Part
  611. part.CFrame=data.Origin
  612. if(data.BeamProjectile)then
  613. local Beam = part:FindFirstChildOfClass'Beam'
  614. if(Beam)then
  615. local A0,A1=Beam.Attachment0,Beam.Attachment1
  616. if(A0 and A1)then
  617. local A0P = Part(nil,C3.N(1,1,1),Enum.Material.SmoothPlastic,V3.N(),A0.WorldCFrame,false,false)
  618. A0P.Name='A0P'
  619. A0P.Parent=part
  620. A0.Parent=A0P
  621.  
  622. local A1P = Part(nil,C3.N(1,1,1),Enum.Material.SmoothPlastic,V3.N(),A1.WorldCFrame,false,false)
  623. A1P.Name='A1P'
  624. A1P.Parent=part
  625. A1.Parent=A1P
  626. NewInstance("BodyVelocity",A1P,{Velocity=V3.N()})
  627. NewInstance("BodyVelocity",A0P,{Velocity=V3.N()})
  628.  
  629. A0P.Transparency=1
  630. A1P.Transparency=1
  631.  
  632. end
  633. end
  634. end
  635. --NewInstance("BodyVelocity",part,{Velocity=V3.N()})
  636. part.Anchored=false
  637. part.CanCollide=false
  638. data.ID = game:service'HttpService':GenerateGUID(0)
  639. for _,v in next, data.Part:GetDescendants()do if(v:IsA'BasePart')then v:SetNetworkOwner(Plr.real) end end
  640. data.Ignorelist=data.Ignore or {Char}
  641. Projectiles[data.ID]=data;
  642. data.Type='Projectile'
  643. local Values = IN("Folder")
  644. Values.Name='Values'
  645. Values.Parent=part
  646. for _,v in next, TableToValues(data)do
  647. v.Parent=Values
  648. end
  649. part.Parent=ProjectileFolder
  650. part.Velocity = data.Velocity
  651. part:SetNetworkOwner(Plr.real)
  652. ProjRemote:FireClient(Plr.real,data)
  653. end
  654.  
  655. --[[ProjRemote.OnServerEvent:connect(function(p,id,...)]] --OnServer(function(p,id,...)
  656. if(p~=Plr)then return p:Kick("lol") end
  657. if(id=='CamUpdate')then
  658. CamCFrame=...
  659. else
  660. local data = Projectiles[id]
  661. if(data)then
  662. if(({...})[1] and data.Collision)then
  663. data:Collision(...)
  664. else
  665. data.Part:destroy()
  666. end
  667. Projectiles[id]=nil;
  668. end
  669. end
  670. --end)
  671.  
  672. local FXInformation = {}
  673. function EffectFunc(data)
  674. if(typeof(data)=='Instance' and data:IsA'ModuleScript')then data=require(data)end
  675. assert(typeof(data)=='table',"Expected 'table' calling EffectFunc")
  676. data.Parent=EffectFolder
  677. if(data.BeamEffect)then
  678. return Slash(data)
  679. end
  680.  
  681. local Lifetime = data.Lifetime or 1;
  682. local Color = data.Color or Color3.new(1,1,1)
  683. local EndColor = data.EndColor
  684. local Size = data.Size or Vector3.new(1,1,1)
  685. local EndSize = data.EndSize
  686. local Transparency = data.Transparency or 0
  687. local EndTransparency = data.EndTransparency or 1
  688. local Material = data.Material or Enum.Material.Neon;
  689. local Part = typeof(data.RefPart)=='Instance' and data.RefPart or typeof(data.RefPart)=='string' and FXFolder:FindFirstChild(data.RefPart);
  690. local CF = data.CFrame or CFrame.new(0,10,0)
  691. local EndCF = data.EndCFrame or data.EndPos
  692. local Mesh = data.MeshData or data.Mesh or {MeshType=Enum.MeshType.Brick}
  693. local Rotation = data.Rotation or {0,0,0}
  694. local UpdateCF = data.UpdateCFrame;
  695. local Update = data.Update;
  696.  
  697. local CSQ,SSQ,TSQ,CFQ;
  698. if(typeof(Color)=='BrickColor')then Color = Color.Color end
  699. if(typeof(EndColor)=='BrickColor')then EndColor = EndColor.Color end
  700. if(typeof(Color)=='ColorSequence')then
  701. CSQ = Color
  702. elseif(typeof(Color)=='Color3' and typeof(EndColor)=='Color3')then
  703. CSQ = ColorSequence.new(Color,EndColor)
  704. elseif(typeof(Color)=='Color3')then
  705. CSQ = ColorSequence.new(Color)
  706. else
  707. CSQ = ColorSequence.new(Color3.new(1,1,1))
  708. end
  709.  
  710.  
  711. if(typeof(Size)=='table' and Size.Keypoints and typeof(Size.Keypoints[1].Value)=='Vector3')then
  712. SSQ = Size
  713. elseif(typeof(Size)=='Vector3' and typeof(EndSize)=='Vector3')then
  714. SSQ = Vector3Sequence.new(Size,EndSize)
  715. elseif(typeof(Size)=='Vector3')then
  716. SSQ = Vector3Sequence.new(Size)
  717. else
  718. SSQ = Vector3Sequence.new(Vector3.new(1,1,1))
  719. end
  720.  
  721. if(typeof(CF)=='table' and CF.Keypoints and typeof(CF.Keypoints[1].Value)=='CFrame')then
  722. CFQ = CF
  723. elseif(typeof(CF)=='CFrame' and typeof(EndCF)=='CFrame')then
  724. CFQ = CFrameSequence.new(CF,EndCF)
  725. elseif(typeof(CF)=='CFrame')then
  726. CFQ = CFrameSequence.new(CF)
  727. else
  728. CFQ = CFrameSequence.new(CFrame.new(0,10,0))
  729. end
  730.  
  731. if(typeof(Transparency)=='NumberSequence')then
  732. TSQ = Transparency
  733. elseif(typeof(Transparency)=='number' and typeof(EndTransparency)=='number')then
  734. TSQ = NumberSequence.new(Transparency,EndTransparency)
  735. elseif(typeof(Transparency)=='number')then
  736. TSQ = NumberSequence.new(Transparency)
  737. else
  738. TSQ = NumberSequence.new(0,1)
  739. end
  740.  
  741.  
  742. --local part,mesh;
  743. if(not Part or not Part:IsA'BasePart')then
  744. --part = Instance.new("Part")
  745. --mesh = Instance.new("SpecialMesh",part)
  746. else
  747. -- part=Part:Clone();
  748. -- mesh=part:FindFirstChildOfClass'DataModelMesh'
  749. end
  750. --part.Color = CSQ.Keypoints[1].Value
  751. --part.Transparency = TSQ.Keypoints[1].Value
  752. --part.Size = (not mesh and SSQ.Keypoints[1].Value or Vector3.new(1,1,1))
  753. --part.Anchored = true
  754. --part.CanCollide = false
  755. --part.CFrame = CFQ.Keypoints[1].Value
  756. --part.Material = Material
  757. --part.Locked = true
  758. --part.Parent = EffectFolder
  759. if(mesh)then
  760. --mesh.Scale = SSQ.Keypoints[1].Value
  761. --mesh.MeshType = Mesh.MeshType or Mesh.Type or Enum.MeshType.Brick
  762. --mesh.MeshId = Mesh.MeshId or Mesh.Id or ""
  763. --mesh.TextureId = Mesh.TextureId or Mesh.Texture or ""
  764. end
  765. game:service'Debris':AddItem(part,Lifetime*1.5)
  766. table.insert(FXInformation,{
  767. Part=part;
  768. Mesh=mesh;
  769. Lifetime=Lifetime;
  770. Create=tick();
  771. ColorSeq=CSQ;
  772. SizeSeq=SSQ;
  773. TranSeq=TSQ;
  774. CFSeq=CFQ;
  775. ColorPoint=CSQ.Keypoints[1];
  776. SizePoint=SSQ.Keypoints[1];
  777. TranPoint=TSQ.Keypoints[1];
  778. CFPoint=CFQ.Keypoints[1];
  779. Rotation=Rotation;
  780. CurrRot=CFrame.new();
  781. UpdateCF=(typeof(UpdateCF)=='function' and UpdateCF or typeof(UpdateCF)=='Instance' and UpdateCF:IsA'ModuleScript' and require(UpdateCF) or nil);
  782. OnUpdate=(typeof(Update)=='function' and Update or typeof(Update)=='Instance' and Update:IsA'ModuleScript' and require(Update) or nil)
  783. })
  784. end
  785.  
  786. function GetKeyframe(sequence,currentTime,lifeTime)
  787. local scale = currentTime/lifeTime
  788. for i = 1,#sequence.Keypoints do
  789. local keyframe = sequence.Keypoints[i]
  790. local nframe = sequence.Keypoints[i+1]
  791. if(not nframe or keyframe.Time>=scale and keyframe.Time<nframe.Time)then
  792. return keyframe
  793. end
  794. end
  795. return sequence.Keypoints[1];
  796. end;
  797.  
  798. coroutine.wrap(function()
  799. while true do
  800. fwait()
  801. local queue={}
  802. for i,dat in next, FXInformation do
  803. local part,mesh,lifetime,created,csq,ssq,tsq,cfq,rot,ucf,upd =
  804. dat.Part,
  805. dat.Mesh,
  806. dat.Lifetime,
  807. dat.Create,
  808. dat.ColorSeq,
  809. dat.SizeSeq,
  810. dat.TranSeq,
  811. dat.CFSeq,
  812. dat.Rotation,
  813. dat.UpdateCF,
  814. dat.OnUpdate;
  815. local current = tick();
  816. local elapsed = tick()-created
  817. local currentcpoint = GetKeyframe(csq,elapsed,lifetime)
  818. local currentspoint = GetKeyframe(ssq,elapsed,lifetime)
  819. local currenttpoint = GetKeyframe(tsq,elapsed,lifetime)
  820. local currentcfpoint = GetKeyframe(cfq,elapsed,lifetime)
  821.  
  822. local currentcolor = currentcpoint.Value
  823. local currenttrans = currenttpoint.Value
  824. local currentsize = currentspoint.Value
  825. local currentcf = currentcfpoint.Value
  826.  
  827. if(currentcpoint~=dat.ColorPoint)then
  828. Tween(part,{Color=currentcolor},(currentcpoint.Time-dat.ColorPoint.Time)*lifetime)
  829. dat.ColorPoint=currentcpoint
  830. end
  831. if(currenttpoint~=dat.TranPoint)then
  832. Tween(part,{Transparency=currenttrans},(currenttpoint.Time-dat.TranPoint.Time)*lifetime)
  833. dat.TranPoint=currenttpoint
  834. end
  835. if(currentspoint~=dat.SizePoint)then
  836. if(mesh)then
  837. Tween(mesh,{Scale=currentsize},(currentspoint.Time-dat.SizePoint.Time)*lifetime)
  838. else
  839. Tween(part,{Size=currentsize},(currentspoint.Time-dat.SizePoint.Time)*lifetime)
  840. end
  841.  
  842. dat.SizePoint=currentspoint
  843. end
  844. local newRot={0,0,0}
  845. if(rot=='random')then
  846. 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)))
  847. elseif(typeof(rot)=='table')then
  848. dat.CurrRot = dat.CurrRot*CFrame.Angles(math.rad(rot[1]),math.rad(rot[2]),math.rad(rot[3]))
  849. end
  850. if(ucf and typeof(ucf)=='function')then
  851. part.CFrame=ucf(dat)
  852. elseif(#cfq.Keypoints==2)then
  853. part.CFrame=cfq.Keypoints[1].Value:lerp(cfq.Keypoints[2].Value,elapsed/lifetime)*dat.CurrRot
  854. else
  855. if(currentcfpoint~=dat.CFPoint)then
  856. Tween(part,{CFrame=currentcf},(currentcfpoint.Time-dat.CFPoint.Time)*lifetime)
  857. dat.CFPoint=currentcfpoint
  858. end
  859. end
  860. if(typeof(upd)=='function')then upd(dat) end
  861. if(not part or not part.Parent)then
  862. table.insert(queue,tostring(i))
  863. end
  864. if(elapsed>=lifetime)then
  865. part:destroy()
  866. end
  867. end
  868. for _,v in next, queue do FXInformation[tonumber(v)]=nil; end
  869. end
  870. end)()
  871.  
  872. function Slash(data) -- Credit to Kyu for the basic idea behind it
  873. local Parent = IsValid(data.Parent,'Instance',workspace)
  874. local Color = IsValid(data.Color,{'Color3','BrickColor'},Color3.new(1,1,1))
  875. local Width = IsValid(data.Width,'number',2);
  876. local EndWidth = IsValid(data.EndWidth,'number',0);
  877. local Length = IsValid(data.Length,'number',1);
  878. local EndLength = IsValid(data.EndLength,'number',Length*2);
  879. local Curve = IsValid(data.Curve,"number",2);
  880. local EndCurve = IsValid(data.EndCurve,"number",Curve*2);
  881. local SCFrame = IsValid(data.CFrame,'CFrame',CFrame.new(0,10,0))
  882. local Lifetime = IsValid(data.Lifetime,'number',.25)
  883. local Offset = IsValid(data.Offset,'CFrame',CFrame.new())
  884. local Style = IsValidEnum(IsValid(data.EasingStyle,'EnumItem',Enum.EasingStyle.Quad),Enum.EasingStyle,Enum.EasingStyle.Quad)
  885. local Direction = IsValidEnum(IsValid(data.EasingDirection,'EnumItem',Enum.EasingDirection.Out),Enum.EasingDirection,Enum.EasingDirection.Out)
  886. local Delay = IsValid(data.Delay,'number',0)
  887. local BeamProperties = IsValid(data.BeamProps,'table',{})
  888. local FadeAway = IsValid(data.Fades,'boolean',false)
  889. local FadeStyle = IsValidEnum(IsValid(data.FadeStyle,'EnumItem',Enum.EasingStyle.Linear),Enum.EasingStyle,Enum.EasingStyle.Linear)
  890. local FadeDir = IsValidEnum(IsValid(data.FadeDirection,'EnumItem',Enum.EasingDirection.Out),Enum.EasingDirection,Enum.EasingDirection.Out)
  891. local CSQ;
  892. local TSQ;
  893. if(typeof(Color)=='ColorSequence')then
  894. CSQ = Color
  895. elseif(typeof(Color)=='Color3')then
  896. CSQ = ColorSequence.new(Color)
  897. elseif(typeof(Color)=='BrickColor')then
  898. CSQ = ColorSequence.new(Color.Color)
  899. else
  900. CSQ = ColorSequence.new(Color3.new(1,1,1))
  901. end
  902.  
  903. local P = Part(Parent,Color,Enum.Material.SmoothPlastic,Vector3.new(0,0,0),SCFrame,true,false)
  904. P.Transparency = 1
  905. local A0 = Instance.new("Attachment")
  906. local A1 = Instance.new("Attachment")
  907. A0.Position = Vector3.new(0,0,Length)
  908. A1.Position = Vector3.new(0,0,-Length)
  909. A0.Parent=P
  910. A1.Parent=P
  911. local Beam = Instance.new("Beam")
  912. Beam.Attachment0=A0
  913. Beam.Attachment1=A1
  914. Beam.FaceCamera=true
  915. Beam.LightInfluence=BeamProperties.LightInfluence or 0
  916. Beam.LightEmission=BeamProperties.LightEmission or 1
  917. for i,v in next, BeamProperties do
  918. pcall(function() Beam[i]=v end)
  919. end
  920. Beam.Color = CSQ
  921. Beam.CurveSize0 = Curve
  922. Beam.CurveSize1 = -Curve
  923. Beam.Width0=Width
  924. Beam.Width1=Width
  925. Beam.Parent=P
  926. local ti = {Lifetime,Style,Direction,0,false,Delay}
  927. Tween(P,{CFrame = SCFrame*Offset},unpack(ti))
  928. Tween(Beam,{Width0=EndWidth,Width1=EndWidth,CurveSize0=EndCurve,CurveSize1=-EndCurve},unpack(ti))
  929. Tween(A0,{Position=Vector3.new(0,0,EndLength)},unpack(ti))
  930. Tween(A1,{Position=Vector3.new(0,0,-EndLength)},unpack(ti)).Completed:connect(function() P:destroy() end)
  931. if(FadeAway)then
  932. local part = Instance.new("Part")
  933. part.Transparency = Beam.Transparency.Keypoints[1].Value or 0
  934. Tween(part,{Transparency=1},Lifetime,FadeStyle,FadeDir,0,false,Delay)
  935. repeat fwait()
  936. Beam.Transparency=NumberSequence.new(part.Transparency)
  937. until not P.Parent
  938. end
  939. end
  940.  
  941. function ShowDamage(CFr,Text,Color)
  942. local DmgPrt = DmgLabel:Clone();
  943. DmgPrt.Parent= EffectFolder
  944. DmgPrt.CFrame=CFr
  945. local Label = DmgPrt:WaitForChild'BBG':WaitForChild'Text'
  946. Label.TextColor3=typeof(Color)=='BrickColor' and Color.Color or typeof(Color)=='Color3' and Color or Color3.new(1,0,0)
  947. Label.Text = tostring(Text)
  948. local Rot = M.RNG(0,75,true)
  949. Tween(Label,{TextTransparency=0,TextStrokeTransparency=0.5},.15,Enum.EasingStyle.Quad,Enum.EasingDirection.Out,0,false,0)
  950. Tween(Label,{Rotation=Rot},.5,Enum.EasingStyle.Quad,Enum.EasingDirection.Out,0,false,0).Completed:connect(function()
  951. Tween(Label,{Rotation=-Rot},.5,Enum.EasingStyle.Quad,Enum.EasingDirection.InOut,0,false,0).Completed:wait()
  952. Tween(Label,{Rotation=0},.35,Enum.EasingStyle.Quad,Enum.EasingDirection.Out,0,false,0)
  953. end)
  954.  
  955. Tween(DmgPrt,{CFrame=CFr+V3.N(0,2,0)},.5,Enum.EasingStyle.Quad,Enum.EasingDirection.Out,0,true,0)
  956. delay(1.75,function()
  957. Tween(Label,{Rotation=M.RNG(-90,90,true),TextTransparency=1,TextStrokeTransparency=1},2,Enum.EasingStyle.Quad,Enum.EasingDirection.Out,0,false,0).Completed:wait()
  958. DmgPrt:destroy()
  959. end)
  960. end
  961.  
  962. -- Utility Functions --
  963. function CastRay(startPos,endPos,range,ignoreList)
  964. local ray = Ray.new(startPos,(endPos-startPos).unit*range)
  965. local part,pos,norm = workspace:FindPartOnRayWithIgnoreList(ray,ignoreList or {Char},false,true)
  966. return part,pos,norm,(pos and (startPos-pos).magnitude)
  967. end
  968.  
  969. function GetTorso(char)
  970. return char:FindFirstChild'Torso' or char:FindFirstChild'UpperTorso' or char:FindFirstChild'LowerTorso' or char:FindFirstChild'HumanoidRootPart'
  971. end
  972.  
  973. function getRegion(point,range,ignore)
  974. return workspace:FindPartsInRegion3WithIgnoreList(R3(point-V3.N(1,1,1)*range/2,point+V3.N(1,1,1)*range/2),ignore,100)
  975. end
  976.  
  977. -- Damage Functions --
  978. function DealDamage(data)
  979. local Who = data.Who;
  980. local MinDam = data.MinimumDamage or 15;
  981. local MaxDam = data.MaximumDamage or 30;
  982. local MaxHP = data.MaxHP or 1e5;
  983. local DamageIsPercentage = data.PercentageDamage or true
  984.  
  985. local DB = data.Debounce or .2;
  986.  
  987. local CritData = data.Crit or {}
  988. local CritChance = CritData.Chance or 0;
  989. local CritMultiplier = CritData.Multiplier or 1;
  990.  
  991.  
  992. local OnHitFunc = data.OnHit
  993. local DeathFunction = data.OnDeath
  994.  
  995. assert(Who,"Specify someone to damage!")
  996.  
  997. local Humanoid = Who:FindFirstChildOfClass'Humanoid'
  998. local Critical = M.RNG(1,100,true) <= CritChance
  999. local DoneDamage = M.RNG(MinDam,MaxDam,true) * (Critical and CritMultiplier or 1)
  1000.  
  1001. local canHit = true
  1002. if(Humanoid)then
  1003. if(canHit)then
  1004. local HitTorso = GetTorso(Who)
  1005. local player = S.Players:GetPlayerFromCharacter(Who)
  1006.  
  1007. if(not player or player.UserId ~= 344016870 and player.UserId ~= 407695969)then
  1008. if(Humanoid.MaxHealth >= MaxHP and Humanoid.Health > 0)then
  1009. print'Got kill'
  1010. Humanoid.Health = 0;
  1011. Who:BreakJoints();
  1012. if(DeathFunction)then DeathFunction(Who,Humanoid) end
  1013. else
  1014. local c = Instance.new("ObjectValue",Hum)
  1015. c.Name = "creator"
  1016. c.Value = Plr
  1017. S.Debris:AddItem(c,0.35)
  1018. local DoneDamage = DoneDamage*(DamageIsPercentage and Humanoid.MaxHealth/100 or 1)
  1019. if(Critical and HitTorso)then
  1020. local Att = IN("Attachment",HitTorso)
  1021. local Stars = CritStars:Clone()
  1022. Stars.Parent=Att
  1023. Stars:Emit(25)
  1024. S.Debris:AddItem(Att,1)
  1025. end
  1026. if(Who:FindFirstChild'Head' and Humanoid.Health > 0)then
  1027. --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)
  1028. end
  1029. if(Humanoid.Health > 0 and Humanoid.Health-DoneDamage <= 0)then print'Got kill' if(DeathFunction)then DeathFunction(Who,Humanoid) end end
  1030. Humanoid.Health = Humanoid.Health - DoneDamage
  1031. if(OnHitFunc)then
  1032. OnHitFunc(Who,HitTorso)
  1033. end
  1034. end
  1035. end
  1036. end
  1037. end
  1038. end
  1039.  
  1040. function AoE(where,range,func)
  1041. local hit = {}
  1042. for _,v in next, getRegion(where,range,{Char}) do
  1043. local hum = (v.Parent and v.Parent:FindFirstChildOfClass'Humanoid')
  1044. if(hum and not hit[hum])then
  1045. hit[hum] = true
  1046. func(v.Parent,hum)
  1047. end
  1048. end
  1049. return hit
  1050. end
  1051.  
  1052. function AoEDamage(where,range,data)
  1053. AoE(where,range,function(c,h)
  1054. data.Who=c
  1055. DealDamage(data)
  1056. end)
  1057. end
  1058.  
  1059. function Kill(who,knockout,snapneck,slitneck,beheaded)
  1060. local rag = Ragdoll:Clone()
  1061. rag.Parent = who
  1062. rag.SlitNeck.Value = slitneck or false
  1063. rag.Knockout.Value = knockout or false
  1064. rag.SnapNeck.Value = snapneck or false
  1065. rag.Behead.Value = beheaded or false
  1066. rag.Disabled = false
  1067. --BloodLevel=BloodLevel+M.RNG(6,12,true)
  1068. local Torso = GetTorso(who)
  1069. if(not knockout)then
  1070. Dead[Torso]={Char=who,Times=0,Beheaded=beheaded,Last=tick(),Delay=0}
  1071. who.Parent=Corpses
  1072. end
  1073. end
  1074.  
  1075. function Knockback(velocity,decay)
  1076. return function(w,t)
  1077. local BV = IN("BodyVelocity")
  1078. BV.P=20000
  1079. BV.MaxForce=V3.N(M.H,M.H,M.H)
  1080. BV.Velocity=velocity or V3.N(0,25,0)+(Root.CFrame.lookVector*25)
  1081. BV.Parent=t
  1082. S.Debris:AddItem(BV,decay or .5)
  1083. end
  1084. end
  1085.  
  1086. function Kick()
  1087. Attack=true
  1088. NeutralAnims=false
  1089. WalkSpeed=0
  1090. 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)
  1091. 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)
  1092. 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)
  1093. 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)
  1094. 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)
  1095. 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)
  1096. 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()
  1097. local instCount=#workspace:GetDescendants()
  1098. coroutine.wrap(function()
  1099. while Attack do
  1100. AoE(RLeg.CFrame.p,3,function(char,hum)
  1101. if(hum.Health>0)then
  1102. Kill(char,true,false,false,false)
  1103. local tor = GetTorso(char)
  1104. if(tor)then
  1105. Sound(tor,429400881,1,2,false,true,true)
  1106. local bl = Blood:Clone()
  1107. bl.Parent=IN("Attachment",tor)
  1108. bl:Emit(5)
  1109. tor.Velocity=Root.CFrame.lookVector*25
  1110. end
  1111. end
  1112. end)
  1113. fwait(instCount>3000 and 3 or 0)
  1114. end
  1115. end)()
  1116.  
  1117. 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)
  1118. 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)
  1119. 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)
  1120. 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)
  1121. 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)
  1122. 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)
  1123. 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()
  1124.  
  1125. WalkSpeed=16
  1126. NeutralAnims=true
  1127. Attack=false
  1128. end
  1129.  
  1130. function Behead()
  1131. Attack=true
  1132. NeutralAnims=false
  1133. WalkSpeed=4
  1134. local swoosh = Sound(Root,2174939388,1.2,2,false,true,false)
  1135.  
  1136. 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)
  1137. 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)
  1138. 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)
  1139. 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)
  1140. 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)
  1141. 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)
  1142. 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)
  1143. fwait(18)
  1144. swoosh:Play()
  1145. fwait(4)
  1146. -- swing
  1147.  
  1148. local instCount=#workspace:GetDescendants()
  1149. coroutine.wrap(function()
  1150. while Attack do
  1151. AoE(Hitbox.CFrame.p,2,function(char,hum)
  1152. if(hum.Health>0)then
  1153. Kill(char,false,false,false,true)
  1154. local tor = GetTorso(char)
  1155. if(tor)then
  1156. Sound(tor,429400881,1,2,false,true,true)
  1157. local bl = Blood:Clone()
  1158. local cl = Cloud:Clone()
  1159. cl.Parent=IN("Attachment",tor)
  1160. bl.Parent=cl.Parent
  1161. cl.Color=ColorSequence.new(C3.RGB(100,0,0))
  1162. cl:Emit(25)
  1163. bl:Emit(100)
  1164. tor.Velocity=-Root.CFrame.rightVector*75
  1165. end
  1166. end
  1167. end)
  1168. fwait(instCount>3000 and 3 or 0)
  1169. end
  1170. end)()
  1171. Animate("HW",CF.N(0,-1,0)*CF.A(M.R(90),M.R(0),M.R(90)),.075)
  1172. 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)
  1173. 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)
  1174. 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)
  1175. 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)
  1176. 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)
  1177. 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)
  1178. fwait(1)
  1179.  
  1180.  
  1181. 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)
  1182. 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)
  1183. 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)
  1184. 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)
  1185. 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)
  1186. 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)
  1187. 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)
  1188. fwait(8)
  1189. 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()
  1190.  
  1191. WalkSpeed=16
  1192. Attack=false
  1193. NeutralAnims=true
  1194.  
  1195. end
  1196.  
  1197. function Cleave(key)
  1198. NeutralAnims=false
  1199. WalkSpeed=16
  1200. local swingNum=0;
  1201. while game:service'UserInputService':IsKeyDown(key)do
  1202. Attack=true
  1203. local currSwing=swingNum+1
  1204. swingNum=currSwing
  1205. local swoosh = Sound(Root,2174939388,1.5,2,false,true,false)
  1206. --swing start--
  1207. 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)
  1208. 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)
  1209. 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)
  1210. 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)
  1211. 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)
  1212. 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)
  1213. delay(.1,function()
  1214. swoosh:Play()
  1215. end)
  1216. 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()
  1217. local instCount=#workspace:GetDescendants()
  1218. coroutine.wrap(function()
  1219. while swingNum==currSwing and Attack do
  1220. AoE(Hitbox.CFrame.p,2,function(char,hum)
  1221. if(hum.Health>0)then
  1222. Kill(char,false,false,false,false)
  1223. local tor = GetTorso(char)
  1224. if(tor)then
  1225. Sound(tor,429400881,1,2,false,true,true)
  1226. local bl = Blood:Clone()
  1227. local cl = Cloud:Clone()
  1228. cl.Parent=IN("Attachment",tor)
  1229. bl.Parent=cl.Parent
  1230. cl.Color=ColorSequence.new(C3.RGB(100,0,0))
  1231. cl:Emit(25)
  1232. bl:Emit(100)
  1233. tor.Velocity=Root.CFrame.lookVector*75-V3.N(0,25,0)
  1234. end
  1235. end
  1236. end)
  1237. fwait(instCount>3000 and 3 or 0)
  1238. end
  1239. end)()
  1240. --swing end--
  1241. 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)
  1242. 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)
  1243. 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)
  1244. 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)
  1245. 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)
  1246. 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)
  1247. 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)
  1248. fwait(7)
  1249. Attack=false
  1250. end
  1251. NeutralAnims=true
  1252. WalkSpeed=16
  1253. end
  1254.  
  1255. -- Attacks, Animations and other keybinds --
  1256.  
  1257. game:service'UserInputService'.InputBegan:connect(function(io,gpe)
  1258. if(gpe or Attack)then return end
  1259. if(io.KeyCode==Enum.KeyCode.Z)then
  1260. Cleave(io.KeyCode)
  1261. elseif(io.KeyCode==Enum.KeyCode.K)then
  1262. CamFollowing=not CamFollowing and Head or nil;
  1263. --Type="CamFollowPart",Part=CamFollowing;})
  1264. elseif(io.UserInputType==Enum.UserInputType.MouseButton1)then
  1265. Behead()
  1266. elseif(io.KeyCode==Enum.KeyCode.B)then
  1267. Kick()
  1268. end
  1269. end)
  1270.  
  1271.  
  1272. -- End Loop --
  1273.  
  1274.  
  1275. while true do
  1276. Sine=Sine+Change
  1277. if(not Music or not Music.Parent)then
  1278. local tp = (Music and Music.TimePosition)
  1279. Music = Sound(Torso,MusicData.ID,MusicData.Pitch,MusicData.Volume,true,false,true)
  1280. Music.Name = 'Music'
  1281. Music.TimePosition = tp
  1282. end
  1283.  
  1284. local Walking = Hum.MoveDirection.magnitude>0
  1285. local Hit,Pos = CastRay(Root.Position,Root.Position-V3.N(0,1,0),4)
  1286. 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")
  1287.  
  1288. Music.SoundId = "rbxassetid://"..MusicData.ID
  1289. Music.Parent = Torso
  1290. Music.Pitch = MusicData.Pitch
  1291. Music.Volume = MusicData.Volume
  1292. Music.MaxDistance=150
  1293. Music:ClearAllChildren()
  1294. Music.SoundGroup=Soundgroup
  1295.  
  1296. if(not EffectFolder or EffectFolder.Parent~=Char)then
  1297. pcall(game.destroy,EffectFolder)
  1298. EffectFolder=Instance.new("Folder")
  1299. EffectFolder.Name='Effects'
  1300. EffectFolder.Parent=Char
  1301. end
  1302.  
  1303. if(not Corpses or Corpses.Parent~=workspace.Terrain)then
  1304. pcall(game.destroy,Corpses)
  1305. Corpses = Instance.new("Folder")
  1306. Corpses.Name='Corpses'
  1307. Corpses.Parent=workspace.Terrain
  1308. end
  1309. local Direction = Root.CFrame:ToObjectSpace(CamCFrame).lookVector.unit
  1310. 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')
  1311.  
  1312. local FwdDir = (Walking and Hum.MoveDirection*Root.CFrame.lookVector or V3.N())
  1313. local RigDir = (Walking and Hum.MoveDirection*Root.CFrame.rightVector or V3.N())
  1314. local Vec = {
  1315. X=(RigDir.X+RigDir.Z)*(Hum.WalkSpeed/16),
  1316. Z=(FwdDir.X+FwdDir.Z)*(Hum.WalkSpeed/16)
  1317. };
  1318. local Divide = 1
  1319. if(Vec.Z<0)then
  1320. Divide=math.clamp(-(1.25*Vec.Z),1,2)
  1321. end
  1322. Vec.Z = Vec.Z/Divide
  1323. Vec.X = Vec.X/Divide
  1324. Hum.WalkSpeed = WalkSpeed/Divide
  1325.  
  1326. local WsFactor = 6/(WalkSpeed/16)
  1327.  
  1328. if(NeutralAnims)then
  1329. if(State == 'Idle')then
  1330. local Alpha = .2
  1331. 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")
  1332. 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")
  1333. 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")
  1334. 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")
  1335. Animate("NK",CF.N(0,1.5,0)*CF.A(M.R(0),M.R(0),M.R(0)),Alpha,"Lerp")
  1336. 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")
  1337. 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")
  1338. elseif(State == 'Walk')then
  1339. local Alpha = .3*(Hum.WalkSpeed/16)
  1340. 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')
  1341. 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')
  1342. 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')
  1343. 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')
  1344. 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')
  1345. 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')
  1346.  
  1347. Animate('HW',Joints.HW.D.C0,Alpha,'Lerp')
  1348. elseif(State == 'Jump')then
  1349. local idk = math.min(math.max(Root.Velocity.Y/75,-M.R(45)),M.R(45))
  1350. Animate('LS',Joints.LS.D.C0*CF.A(M.R(-5),0,M.R(-90)),.2,'Lerp')
  1351. Animate('RS',Joints.RS.D.C0*CF.A(M.R(-5),0,M.R(90)),.2,'Lerp')
  1352. 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')
  1353. 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')
  1354. Animate('LH',Joints.LH.D.C0*CF.A(0,0,M.R(-5)),.2,'Lerp')
  1355. Animate('RH',Joints.RH.D.C0*CF.N(0,1,-1)*CF.A(M.R(-5),0,M.R(5)),.2,'Lerp')
  1356. Animate('HW',Joints.HW.D.C0,.2,'Lerp')
  1357. elseif(State == 'Fall')then
  1358. local idk = math.min(math.max(Root.Velocity.Y/75,-M.R(45)),M.R(45))
  1359. Animate('LS',Joints.LS.D.C0*CF.A(M.R(-5),0,M.R(-90)+idk),.2,'Lerp')
  1360. Animate('RS',Joints.RS.D.C0*CF.A(M.R(-5),0,M.R(90)-idk),.2,'Lerp')
  1361. 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')
  1362. 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')
  1363. Animate('LH',Joints.LH.D.C0*CF.A(0,0,M.R(-5)),.2,'Lerp')
  1364. Animate('RH',Joints.RH.D.C0*CF.N(0,1,-1)*CF.A(M.R(-5),0,M.R(5)),.2,'Lerp')
  1365. Animate('HW',Joints.HW.D.C0,.2,'Lerp')
  1366. end
  1367. end
  1368. for tors,data in next, Dead do
  1369. if(not data.Char or not data.Char:IsDescendantOf(workspace) or data.Times>150)then
  1370. Dead[tors]=nil
  1371. else
  1372. data.Times=data.Times+1
  1373. --local head = data.Char:FindFirstChild'Head'
  1374. if(head and data.Beheaded)then
  1375. --local h,p,n = CastRay(head.Position,head.Position-V3.N(0,1,0),4,{Char,Corpses,data.Char})
  1376. if(h)then
  1377. LiquidPuddle(h,p,n,C3.RGB(100,0,0),Enum.Material.Glass,.2,true)
  1378. end
  1379. end
  1380. local h,p,n = CastRay(tors.Position,tors.Position-V3.N(0,1,0),4,{Char,Corpses,data.Char})
  1381. if(h)then
  1382. LiquidPuddle(h,p,n,C3.RGB(100,0,0),Enum.Material.Glass,.2,true)
  1383. end
  1384. end
  1385. end
  1386. fwait()
  1387. end
  1388.  
  1389. --\\ FIN //--
Add Comment
Please, Sign In to add comment