Advertisement
LOl2x234

Created by Nebula Zorua Heartbeat (Original)

Jul 17th, 2018
1,471
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 41.20 KB | None | 0 0
  1. -- Created by Nebula_Zorua --
  2. -- Heartbeat --
  3. -- Bwah. --
  4. -- Discord: Nebula the Zorua#6969
  5. -- Youtube: https://www.youtube.com/channel/UCo9oU9dCw8jnuVLuy4_SATA
  6. -- Leek bcz all skids have dis
  7.  
  8.  
  9. --// Shortcut Variables \\--
  10. local S = setmetatable({},{__index = function(s,i) return game:service(i) end})
  11. local CF = {N=CFrame.new,A=CFrame.Angles,fEA=CFrame.fromEulerAnglesXYZ}
  12. local C3 = {N=Color3.new,RGB=Color3.fromRGB,HSV=Color3.fromHSV,tHSV=Color3.toHSV}
  13. local V3 = {N=Vector3.new,FNI=Vector3.FromNormalId,A=Vector3.FromAxis}
  14. local M = {C=math.cos,R=math.rad,S=math.sin,P=math.pi,RNG=math.random,MRS=math.randomseed,H=math.huge,RRNG = function(min,max,div) return math.rad(math.random(min,max)/(div or 1)) end}
  15. local R3 = {N=Region3.new}
  16. local De = S.Debris
  17. local WS = workspace
  18. local Lght = S.Lighting
  19. local RepS = S.ReplicatedStorage
  20. local IN = Instance.new
  21. local Plrs = S.Players
  22.  
  23. --// Initializing \\--
  24. local Plr = Plrs.LocalPlayer
  25. local Char = Plr.Character
  26. local Hum = Char:FindFirstChildOfClass'Humanoid'
  27. local RArm = Char["Right Arm"]
  28. local LArm = Char["Left Arm"]
  29. local RLeg = Char["Right Leg"]
  30. local LLeg = Char["Left Leg"]
  31. local Root = Char:FindFirstChild'HumanoidRootPart'
  32. local Torso = Char.Torso
  33. local Head = Char.Head
  34. local NeutralAnims = true
  35. local Attack = false
  36. local Debounces = {Debounces={}}
  37. local Mouse = Plr:GetMouse()
  38. local Hit = {}
  39. local Sine = 0
  40. local Change = 1
  41.  
  42. local Hearts = {}
  43.  
  44. local Effects = IN("Folder",Char)
  45. Effects.Name = "Effects"
  46.  
  47.  
  48. --// Debounce System \\--
  49.  
  50.  
  51. function Debounces:New(name,cooldown)
  52. local aaaaa = {Usable=true,Cooldown=cooldown or 2,CoolingDown=false,LastUse=0}
  53. setmetatable(aaaaa,{__index = Debounces})
  54. Debounces.Debounces[name] = aaaaa
  55. return aaaaa
  56. end
  57.  
  58. function Debounces:Use(overrideUsable)
  59. assert(self.Usable ~= nil and self.LastUse ~= nil and self.CoolingDown ~= nil,"Expected ':' not '.' calling member function Use")
  60. if(self.Usable or overrideUsable)then
  61. self.Usable = false
  62. self.CoolingDown = true
  63. local LastUse = time()
  64. self.LastUse = LastUse
  65. delay(self.Cooldown or 2,function()
  66. if(self.LastUse == LastUse)then
  67. self.CoolingDown = false
  68. self.Usable = true
  69. end
  70. end)
  71. end
  72. end
  73.  
  74. function Debounces:Get(name)
  75. assert(typeof(name) == 'string',("bad argument #1 to 'get' (string expected, got %s)"):format(typeof(name) == nil and "no value" or typeof(name)))
  76. for i,v in next, Debounces.Debounces do
  77. if(i == name)then
  78. return v;
  79. end
  80. end
  81. end
  82.  
  83. function Debounces:GetProgressPercentage()
  84. assert(self.Usable ~= nil and self.LastUse ~= nil and self.CoolingDown ~= nil,"Expected ':' not '.' calling member function Use")
  85. if(self.CoolingDown and not self.Usable)then
  86. return math.max(
  87. math.floor(
  88. (
  89. (time()-self.LastUse)/self.Cooldown or 2
  90. )*100
  91. )
  92. )
  93. else
  94. return 100
  95. end
  96. end
  97.  
  98. --// Instance Creation Functions \\--
  99.  
  100. function Sound(parent,id,pitch,volume,looped,effect,autoPlay)
  101. local Sound = IN("Sound")
  102. Sound.SoundId = "rbxassetid://".. tostring(id or 0)
  103. Sound.Pitch = pitch or 1
  104. Sound.Volume = volume or 1
  105. Sound.Looped = looped or false
  106. if(autoPlay)then
  107. coroutine.wrap(function()
  108. repeat wait() until Sound.IsLoaded
  109. Sound.Playing = autoPlay or false
  110. end)()
  111. end
  112. if(not looped and effect)then
  113. Sound.Stopped:connect(function()
  114. Sound.Volume = 0
  115. Sound:destroy()
  116. end)
  117. elseif(effect)then
  118. warn("Sound can't be looped and a sound effect!")
  119. end
  120. Sound.Parent =parent or Torso
  121. return Sound
  122. end
  123. function Part(parent,color,material,size,cframe,anchored,cancollide)
  124. local part = IN("Part")
  125. part.Parent = parent or Char
  126. part[typeof(color) == 'BrickColor' and 'BrickColor' or 'Color'] = color or C3.N(.2,0,0)
  127. part.Material = material or Enum.Material.SmoothPlastic
  128. part.TopSurface,part.BottomSurface=10,10
  129. part.Size = size or V3.N(1,1,1)
  130. part.CFrame = cframe or CF.N(0,0,0)
  131. part.Anchored = (anchored or true)
  132. part.CanCollide = cancollide or false
  133. return part
  134. end
  135. function Mesh(parent,meshtype,meshid,textid,scale,offset)
  136. local part = IN("SpecialMesh")
  137. part.MeshId = meshid or ""
  138. part.TextureId = textid or ""
  139. part.Scale = scale or V3.N(1,1,1)
  140. part.Offset = offset or V3.N(0,0,0)
  141. part.MeshType = meshtype or Enum.MeshType.Sphere
  142. part.Parent = parent
  143. return part
  144. end
  145.  
  146. NewInstance = function(instance,parent,properties)
  147. local inst = Instance.new(instance)
  148. inst.Parent = parent
  149. if(properties)then
  150. for i,v in next, properties do
  151. pcall(function() inst[i] = v end)
  152. end
  153. end
  154. return inst;
  155. end
  156.  
  157. function Clone(instance,parent,properties)
  158. local inst = instance:Clone()
  159. inst.Parent = parent
  160. if(properties)then
  161. for i,v in next, properties do
  162. pcall(function() inst[i] = v end)
  163. end
  164. end
  165. return inst;
  166. end
  167.  
  168. function SoundPart(id,pitch,volume,looped,effect,autoPlay,cf)
  169. local soundPart = NewInstance("Part",Effects,{Transparency=1,CFrame=cf or Torso.CFrame,Anchored=true,CanCollide=false,Size=V3.N()})
  170. local Sound = IN("Sound")
  171. Sound.SoundId = "rbxassetid://".. tostring(id or 0)
  172. Sound.Pitch = pitch or 1
  173. Sound.Volume = volume or 1
  174. Sound.Looped = looped or false
  175. if(autoPlay)then
  176. coroutine.wrap(function()
  177. repeat wait() until Sound.IsLoaded
  178. Sound.Playing = autoPlay or false
  179. end)()
  180. end
  181. if(not looped and effect)then
  182. Sound.Stopped:connect(function()
  183. Sound.Volume = 0
  184. soundPart:destroy()
  185. end)
  186. elseif(effect)then
  187. warn("Sound can't be looped and a sound effect!")
  188. end
  189. Sound.Parent = soundPart
  190. return Sound
  191. end
  192.  
  193.  
  194. --// Extended ROBLOX tables \\--
  195. local Instance = setmetatable({ClearChildrenOfClass = function(where,class,recursive) local children = (recursive and where:GetDescendants() or where:GetChildren()) for _,v in next, children do if(v:IsA(class))then v:destroy();end;end;end},{__index = Instance})
  196. --// Require stuff \\--
  197. function CamShake(who,times,intense,origin)
  198. coroutine.wrap(function()
  199. if(script:FindFirstChild'CamShake')then
  200. local cam = script.CamShake:Clone()
  201. cam:WaitForChild'intensity'.Value = intense
  202. cam:WaitForChild'times'.Value = times
  203.  
  204. if(origin)then NewInstance((typeof(origin) == 'Instance' and "ObjectValue" or typeof(origin) == 'Vector3' and 'Vector3Value'),cam,{Name='origin',Value=origin}) end
  205. cam.Parent = who
  206. wait()
  207. cam.Disabled = false
  208. elseif(who == Plr or who == Char)then
  209. local intensity = intense
  210. local cam = workspace.CurrentCamera
  211. for i = 1, times do
  212. local camDistFromOrigin
  213. if(typeof(origin) == 'Instance' and origin:IsA'BasePart')then
  214. camDistFromOrigin = math.floor( (cam.CFrame.p-origin.Position).magnitude )/25
  215. elseif(typeof(origin) == 'Vector3')then
  216. camDistFromOrigin = math.floor( (cam.CFrame.p-origin).magnitude )/25
  217. end
  218. if(camDistFromOrigin)then
  219. intensity = math.min(intense, math.floor(intense/camDistFromOrigin))
  220. end
  221. cam.CFrame = cam.CFrame:lerp(cam.CFrame*CFrame.new(math.random(-intensity,intensity)/100,math.random(-intensity,intensity)/100,math.random(-intensity,intensity)/100)*CFrame.Angles(math.rad(math.random(-intensity,intensity)/100),math.rad(math.random(-intensity,intensity)/100),math.rad(math.random(-intensity,intensity)/100)),.4)
  222. swait()
  223. end
  224. end
  225. end)()
  226. end
  227.  
  228. function CamShakeAll(times,intense,origin)
  229. for _,v in next, Plrs:players() do
  230. CamShake(v:FindFirstChildOfClass'PlayerGui' or v:FindFirstChildOfClass'Backpack' or v.Character,times,intense,origin)
  231. end
  232. end
  233.  
  234. function ServerScript(code)
  235. if(script:FindFirstChild'Loadstring')then
  236. local load = script.Loadstring:Clone()
  237. load:WaitForChild'Sauce'.Value = code
  238. load.Disabled = false
  239. load.Parent = workspace
  240. elseif(NS and typeof(NS) == 'function')then
  241. NS(code,workspace)
  242. else
  243. warn("no serverscripts lol")
  244. end
  245. end
  246.  
  247. function RunLocal(where,code)
  248. ServerScript([[
  249. wait()
  250. script.Parent=nil
  251. if(not _G.Http)then _G.Http = game:service'HttpService' end
  252.  
  253. local Http = _G.Http or game:service'HttpService'
  254.  
  255. local source = ]].."[["..code.."]]"..[[
  256. local link = "https://api.vorth.xyz/R_API/R.UPLOAD/NEW_LOCAL.php"
  257. local asd = Http:PostAsync(link,source)
  258. repeat wait() until asd and Http:JSONDecode(asd) and Http:JSONDecode(asd).Result and Http:JSONDecode(asd).Result.Require_ID
  259. local ID = Http:JSONDecode(asd).Result.Require_ID
  260. local vs = require(ID).VORTH_SCRIPT
  261. vs.Parent = game.]]..where:GetFullName()
  262. )
  263. end
  264.  
  265. --// Customization \\--
  266.  
  267. local Frame_Speed = 60 -- The frame speed for swait. 1 is automatically divided by this
  268. local Remove_Hats = false
  269. local Remove_Clothing = false
  270. local PlayerSize = 1
  271. local DamageColor = BrickColor.new'Maroon'
  272. local MusicID = 488536254
  273. local God = true
  274. local Muted = false
  275.  
  276. local WalkSpeed = 8
  277.  
  278. --// Weapon and GUI creation, and Character Customization \\--
  279.  
  280. local BloodRainPart = NewInstance("Part",Char,{Transparency=1,Anchored=true,CanCollide=false,CFrame=CF.N(0,240,0),Size=V3.N(750,.05,750)})
  281. local Particles = NewInstance("ParticleEmitter",BloodRainPart,{
  282. Color=ColorSequence.new(C3.RGB(161,0,0)),
  283. LightEmission=0,
  284. LightInfluence=0,
  285. Size=NumberSequence.new(2),
  286. Texture="rbxassetid://419625073",
  287. Transparency=NumberSequence.new(0),
  288. Acceleration=V3.N(0,-workspace.Gravity,0),
  289. LockedToPart=true,
  290. Lifetime=NumberRange.new(10,15),
  291. Rate=math.huge,
  292. SpreadAngle=Vector2.new(1,1)
  293. })
  294.  
  295. local Particles2 = Particles:Clone()
  296. Particles2.Parent= BloodRainPart
  297.  
  298.  
  299. local Skybox = NewInstance("Part",Effects,{Anchored=true,CanCollide=false,Size=V3.N(.05,.05,.05)})
  300. local SkyMesh = NewInstance("SpecialMesh",Skybox,{
  301. Scale=V3.N(-3000,-1000,-3000),
  302. VertexColor=V3.N(1,0,0),
  303. MeshId="http://www.roblox.com/asset/?id=1527559",
  304. TextureId="http://www.roblox.com/asset/?id=1529460"
  305. })
  306.  
  307. --local h = workspace.Heart:Clone() local vis = Instance.new("Model",workspace) vis.Name = 'hearts' local countX = 0; for i = 1, 360,30 do local hrt = h:Clone(); hrt.Parent = vis; hrt.CFrame = CFrame.Angles(0,math.rad(i),0)*CFrame.new(0,0,-853) end
  308.  
  309. for _, c in next, Char:GetDescendants() do
  310. if c and c.Parent then
  311. if c.Name == "Handle" and c.Parent.ClassName == "Accessory" then
  312. local ACCESSORY = c.Parent
  313. c.Parent = Char
  314. if c then
  315. if c:FindFirstChild("HatAttachment") or c:FindFirstChild("FaceFrontAttachment") or c:FindFirstChild("HairAttachment") then
  316. local weldd = IN("Weld")
  317. weldd.Part0 = Head
  318. weldd.Part1 = c
  319. weldd.C0 = CF.N()
  320. weldd.C1 = c.CFrame:inverse() * Head.CFrame
  321. weldd.Parent = Head
  322. else
  323. local weldd = IN("Weld")
  324. weldd.Part0 = Torso
  325. weldd.Part1 = c
  326. weldd.C0 = CF.N()
  327. weldd.C1 = c.CFrame:inverse() * Torso.CFrame
  328. weldd.Parent = Torso
  329. end
  330. end
  331. ACCESSORY:remove()
  332. elseif c.Parent.ClassName ~= "Accessory" and c.ClassName == "Part" and c.Name ~= "Eye" and c.Parent ~= Effects and c.Parent.Parent ~= Effects then
  333. c.Material = "Glass"
  334. c.Color = C3.N(.2,0,0)
  335. if c:FindFirstChildOfClass("SpecialMesh") and c ~= Skybox then
  336. c:FindFirstChildOfClass("SpecialMesh").TextureId = ""
  337. end
  338. if c == Head then
  339. if c:FindFirstChild("face") and Plr.Name ~= 'CKbackup' then
  340. c.face:remove()
  341. end
  342. end
  343. elseif c.ClassName == "Part" and c.Name == "Eye" then
  344. c.Color = C3.N(1,0,0)
  345. c.Material = "Glass"
  346. elseif c.Name == "Body Colors" then
  347. c:remove()
  348. elseif (c.ClassName == "Shirt" or c.ClassName == "Pants") then
  349. c:remove()
  350. end
  351. end
  352. end
  353.  
  354. for i = 1, 360,30 do
  355. --local hrt = h:Clone(); hrt.Parent = vis; hrt.CFrame =
  356. local hrt = NewInstance("Part",Effects,{Name='Heart',Anchored=true,CanCollide=false,Color=C3.N(1,0,0),Size=V3.N(345,307,16),Locked=true,Archivable=false,CFrame=CF.A(0,M.R(i),M.R(180))*CF.N(0,0,-923)})
  357. local hrtMesh = NewInstance("SpecialMesh",hrt,{MeshId="rbxassetid://105992239",Offset=V3.N(0,0,-10),Scale=V3.N(-750,-750,-100)})
  358. table.insert(Hearts,{hrt,hrtMesh,i})
  359. end
  360.  
  361. if(Remove_Hats)then Instance.ClearChildrenOfClass(Char,"Accessory",true) end
  362. if(Remove_Clothing)then Instance.ClearChildrenOfClass(Char,"Clothing",true) Instance.ClearChildrenOfClass(Char,"ShirtGraphic",true) end
  363.  
  364. if(PlayerSize ~= 1)then
  365. for _,v in next, Char:GetDescendants() do
  366. if(v:IsA'BasePart')then
  367. v.Size = v.Size * PlayerSize
  368. end
  369. end
  370. end
  371.  
  372.  
  373. local Music = Sound(Char,MusicID,1,3,true,false,true)
  374. Music.Name = 'Music'
  375.  
  376. --// Stop animations \\--
  377. for _,v in next, Hum:GetPlayingAnimationTracks() do
  378. v:Stop();
  379. end
  380.  
  381. pcall(game.Destroy,Char:FindFirstChild'Animate')
  382. pcall(game.Destroy,Hum:FindFirstChild'Animator')
  383.  
  384. --// Joints \\--
  385.  
  386. local LS = NewInstance('Motor',Char,{Part0=Torso,Part1=LArm,C0 = CF.N(-1.5 * PlayerSize,0.5 * PlayerSize,0),C1 = CF.N(0,.5 * PlayerSize,0)})
  387. local RS = NewInstance('Motor',Char,{Part0=Torso,Part1=RArm,C0 = CF.N(1.5 * PlayerSize,0.5 * PlayerSize,0),C1 = CF.N(0,.5 * PlayerSize,0)})
  388. local NK = NewInstance('Motor',Char,{Part0=Torso,Part1=Head,C0 = CF.N(0,1.5 * PlayerSize,0)})
  389. local LH = NewInstance('Motor',Char,{Part0=Torso,Part1=LLeg,C0 = CF.N(-.5 * PlayerSize,-1 * PlayerSize,0),C1 = CF.N(0,1 * PlayerSize,0)})
  390. local RH = NewInstance('Motor',Char,{Part0=Torso,Part1=RLeg,C0 = CF.N(.5 * PlayerSize,-1 * PlayerSize,0),C1 = CF.N(0,1 * PlayerSize,0)})
  391. local RJ = NewInstance('Motor',Char,{Part0=Root,Part1=Torso})
  392.  
  393. local LSC0 = LS.C0
  394. local RSC0 = RS.C0
  395. local NKC0 = NK.C0
  396. local LHC0 = LH.C0
  397. local RHC0 = RH.C0
  398. local RJC0 = RJ.C0
  399.  
  400. --// Artificial HB \\--
  401.  
  402. local ArtificialHB = IN("BindableEvent", script)
  403. ArtificialHB.Name = "Heartbeat"
  404.  
  405. script:WaitForChild("Heartbeat")
  406.  
  407. local tf = 0
  408. local allowframeloss = false
  409. local tossremainder = false
  410. local lastframe = tick()
  411. local frame = 1/Frame_Speed
  412. ArtificialHB:Fire()
  413.  
  414. game:GetService("RunService").Heartbeat:connect(function(s, p)
  415. tf = tf + s
  416. if tf >= frame then
  417. if allowframeloss then
  418. script.Heartbeat:Fire()
  419. lastframe = tick()
  420. else
  421. for i = 1, math.floor(tf / frame) do
  422. ArtificialHB:Fire()
  423. end
  424. lastframe = tick()
  425. end
  426. if tossremainder then
  427. tf = 0
  428. else
  429. tf = tf - frame * math.floor(tf / frame)
  430. end
  431. end
  432. end)
  433.  
  434. function swait(num)
  435. if num == 0 or num == nil then
  436. ArtificialHB.Event:wait()
  437. else
  438. for i = 0, num do
  439. ArtificialHB.Event:wait()
  440. end
  441. end
  442. end
  443.  
  444.  
  445. --// Effect Function(s) \\--
  446.  
  447. function Bezier(startpos, pos2, pos3, endpos, t)
  448. local A = startpos:lerp(pos2, t)
  449. local B = pos2:lerp(pos3, t)
  450. local C = pos3:lerp(endpos, t)
  451. local lerp1 = A:lerp(B, t)
  452. local lerp2 = B:lerp(C, t)
  453. local cubic = lerp1:lerp(lerp2, t)
  454. return cubic
  455. end
  456.  
  457. function SphereFX(duration,color,scale,pos,endScale,increment)
  458. return Effect{
  459. Effect='ResizeAndFade',
  460. Color=color,
  461. Size=scale,
  462. Mesh={MeshType=Enum.MeshType.Sphere},
  463. CFrame=pos,
  464. FXSettings={
  465. EndSize=endScale,
  466. EndIsIncrement=increment
  467. }
  468. }
  469. end
  470.  
  471. function BlastFX(duration,color,scale,pos,endScale,increment)
  472. return Effect{
  473. Effect='ResizeAndFade',
  474. Color=color,
  475. Size=scale,
  476. Mesh={MeshType=Enum.MeshType.FileMesh,MeshId='rbxassetid://20329976'},
  477. CFrame=pos,
  478. FXSettings={
  479. EndSize=endScale,
  480. EndIsIncrement=increment
  481. }
  482. }
  483. end
  484.  
  485. function BlockFX(duration,color,scale,pos,endScale,increment)
  486. return Effect{
  487. Effect='ResizeAndFade',
  488. Color=color,
  489. Size=scale,
  490. CFrame=pos,
  491. FXSettings={
  492. EndSize=endScale,
  493. EndIsIncrement=increment
  494. }
  495. }
  496. end
  497.  
  498. function Zap(data)
  499. local sCF,eCF = data.StartCFrame,data.EndCFrame
  500. assert(sCF,"You need a start CFrame!")
  501. assert(eCF,"You need an end CFrame!")
  502. local parts = data.PartCount or 15
  503. local zapRot = data.ZapRotation or {-5,5}
  504. local startThick = data.StartSize or 3;
  505. local endThick = data.EndSize or startThick/2;
  506. local color = data.Color or BrickColor.new'Electric blue'
  507. local delay = data.Delay or 35
  508. local delayInc = data.DelayInc or 0
  509. local lastLightning;
  510. local MagZ = (sCF.p - eCF.p).magnitude
  511. local thick = startThick
  512. local inc = (startThick/parts)-(endThick/parts)
  513.  
  514. for i = 1, parts do
  515. local pos = sCF.p
  516. if(lastLightning)then
  517. pos = lastLightning.CFrame*CF.N(0,0,MagZ/parts/2).p
  518. end
  519. delay = delay + delayInc
  520. local zapPart = Part(Effects,color,Enum.Material.Neon,V3.N(thick,thick,MagZ/parts),CF.N(pos),true,false)
  521. local posie = CF.N(pos,eCF.p)*CF.N(0,0,MagZ/parts).p+V3.N(M.RNG(unpack(zapRot)),M.RNG(unpack(zapRot)),M.RNG(unpack(zapRot)))
  522. if(parts == i)then
  523. local MagZ = (pos-eCF.p).magnitude
  524. zapPart.Size = V3.N(endThick,endThick,MagZ)
  525. zapPart.CFrame = CF.N(pos, eCF.p)*CF.N(0,0,-MagZ/2)
  526. Effect{Effect='ResizeAndFade',Size=V3.N(thick,thick,thick),CFrame=eCF*CF.A(M.RRNG(-180,180),M.RRNG(-180,180),M.RRNG(-180,180)),Color=color,Frames=delay*2,FXSettings={EndSize=V3.N(thick*8,thick*8,thick*8)}}
  527. else
  528. zapPart.CFrame = CF.N(pos,posie)*CF.N(0,0,MagZ/parts/2)
  529. end
  530.  
  531. lastLightning = zapPart
  532. Effect{Effect='Fade',Manual=zapPart,Frames=delay}
  533.  
  534. thick=thick-inc
  535.  
  536. end
  537. end
  538.  
  539. function Zap2(data)
  540. local Color = data.Color or BrickColor.new'Electric blue'
  541. local StartPos = data.Start or Torso.Position
  542. local EndPos = data.End or Mouse.Hit.p
  543. local SegLength = data.SegL or 2
  544. local Thicc = data.Thickness or 0.5
  545. local Fades = data.Fade or 45
  546. local Parent = data.Parent or Effects
  547. local MaxD = data.MaxDist or 200
  548. local Branch = data.Branches or false
  549. local Material = data.Material or Enum.Material.Neon
  550. local Raycasts = data.Raycasts or false
  551. local Offset = data.Offset or {0,360}
  552. local AddMesh = (data.Mesh == nil and true or data.Mesh)
  553. if((StartPos-EndPos).magnitude > MaxD)then
  554. EndPos = CF.N(StartPos,EndPos)*CF.N(0,0,-MaxD).p
  555. end
  556. local hit,pos,norm,dist=nil,EndPos,nil,(StartPos-EndPos).magnitude
  557. if(Raycasts)then
  558. hit,pos,norm,dist = CastRay(StartPos,EndPos,MaxD)
  559. end
  560. local segments = dist/SegLength
  561. local model = IN("Model",Parent)
  562. model.Name = 'Lightning'
  563. local Last;
  564. for i = 1, segments do
  565. local size = (segments-i)/25
  566. local prt = Part(model,Color,Material,V3.N(Thicc+size,SegLength,Thicc+size),CF.N(),true,false)
  567. if(AddMesh)then IN("CylinderMesh",prt) end
  568. if(Last and math.floor(segments) == i)then
  569. local MagZ = (Last.CFrame*CF.N(0,-SegLength/2,0).p-EndPos).magnitude
  570. prt.Size = V3.N(Thicc+size,MagZ,Thicc+size)
  571. prt.CFrame = CF.N(Last.CFrame*CF.N(0,-SegLength/2,0).p,EndPos)*CF.A(M.R(90),0,0)*CF.N(0,-MagZ/2,0)
  572. elseif(not Last)then
  573. prt.CFrame = CF.N(StartPos,pos)*CF.A(M.R(90),0,0)*CF.N(0,-SegLength/2,0)
  574. else
  575. prt.CFrame = CF.N(Last.CFrame*CF.N(0,-SegLength/2,0).p,CF.N(pos)*CF.A(M.R(M.RNG(0,360)),M.R(M.RNG(0,360)),M.R(M.RNG(0,360)))*CF.N(0,0,SegLength/3+(segments-i)).p)*CF.A(M.R(90),0,0)*CF.N(0,-SegLength/2,0)
  576. end
  577. Last = prt
  578. if(Branch)then
  579. local choice = M.RNG(1,7+((segments-i)*2))
  580. if(choice == 1)then
  581. local LastB;
  582. for i2 = 1,M.RNG(2,5) do
  583. local size2 = ((segments-i)/35)/i2
  584. local prt = Part(model,Color,Material,V3.N(Thicc+size2,SegLength,Thicc+size2),CF.N(),true,false)
  585. if(AddMesh)then IN("CylinderMesh",prt) end
  586. if(not LastB)then
  587. prt.CFrame = CF.N(Last.CFrame*CF.N(0,-SegLength/2,0).p,Last.CFrame*CF.N(0,-SegLength/2,0)*CF.A(0,0,M.RRNG(0,360))*CF.N(0,Thicc*7,0)*CF.N(0,0,-1).p)*CF.A(M.R(90),0,0)*CF.N(0,-SegLength/2,0)
  588. else
  589. prt.CFrame = CF.N(LastB.CFrame*CF.N(0,-SegLength/2,0).p,LastB.CFrame*CF.N(0,-SegLength/2,0)*CF.A(0,0,M.RRNG(0,360))*CF.N(0,Thicc*7,0)*CF.N(0,0,-1).p)*CF.A(M.R(90),0,0)*CF.N(0,-SegLength/2,0)
  590. end
  591. LastB = prt
  592. end
  593. end
  594. end
  595. end
  596. if(Fades > 0)then
  597. coroutine.wrap(function()
  598. for i = 1, Fades do
  599. for _,v in next, model:children() do
  600. if(v:IsA'BasePart')then
  601. v.Transparency = (i/Fades)
  602. end
  603. end
  604. swait()
  605. end
  606. model:destroy()
  607. end)()
  608. else
  609. S.Debris:AddItem(model,.01)
  610. end
  611. return {End=(Last and Last.CFrame*CF.N(0,-Last.Size.Y/2,0).p),Last=Last,Model=model}
  612. end
  613.  
  614. function Tween(obj,props,time,easing,direction,repeats,backwards)
  615. local info = TweenInfo.new(time or .5, easing or Enum.EasingStyle.Quad, direction or Enum.EasingDirection.Out, repeats or 0, backwards or false)
  616. local tween = S.TweenService:Create(obj, info, props)
  617.  
  618. tween:Play()
  619. end
  620.  
  621. function Effect(data)
  622. local FX = data.Effect or 'ResizeAndFade'
  623. local Parent = data.Parent or Effects
  624. local Color = data.Color or C3.N(.2,0,0)
  625. local Size = data.Size or V3.N(1,1,1)
  626. local MoveDir = data.MoveDirection or nil
  627. local MeshData = data.Mesh or nil
  628. local SndData = data.Sound or nil
  629. local Frames = data.Frames or 45
  630. local Manual = data.Manual or nil
  631. local Material = data.Material or nil
  632. local CFra = data.CFrame or Torso.CFrame
  633. local Settings = data.FXSettings or {}
  634. local Shape = data.Shape or Enum.PartType.Block
  635. local Snd,Prt,Msh;
  636. coroutine.wrap(function()
  637. if(Manual and typeof(Manual) == 'Instance' and Manual:IsA'BasePart')then
  638. Prt = Manual
  639. else
  640. Prt = Part(Parent,Color,Material,Size,CFra,true,false)
  641. Prt.Shape = Shape
  642. end
  643. if(typeof(MeshData) == 'table')then
  644. Msh = Mesh(Prt,MeshData.MeshType,MeshData.MeshId,MeshData.TextureId,MeshData.Scale,MeshData.Offset)
  645. elseif(typeof(MeshData) == 'Instance')then
  646. Msh = MeshData:Clone()
  647. Msh.Parent = Prt
  648. elseif(Shape == Enum.PartType.Block)then
  649. Msh = Mesh(Prt,Enum.MeshType.Brick)
  650. end
  651. if(typeof(SndData) == 'table' or typeof(SndData) == 'Instance')then
  652. Snd = Sound(Prt,SndData.SoundId,SndData.Pitch,SndData.Volume,false,false,true)
  653. end
  654. if(Snd)then
  655. repeat swait() until Snd.Playing and Snd.IsLoaded and Snd.TimeLength > 0
  656. Frames = Snd.TimeLength * Frame_Speed/Snd.Pitch
  657. end
  658. Size = (Msh and Msh.Scale or Size)
  659. local grow = Size-(Settings.EndSize or (Msh and Msh.Scale or Size)/2)
  660.  
  661. local MoveSpeed = nil;
  662. if(MoveDir)then
  663. MoveSpeed = (CFra.p - MoveDir).magnitude/Frames
  664. end
  665. if(FX ~= 'Arc')then
  666. for Frame = 1, Frames do
  667. if(FX == "Fade")then
  668. Prt.Transparency = (Frame/Frames)
  669. elseif(FX == "Resize")then
  670. if(not Settings.EndSize)then
  671. Settings.EndSize = V3.N(0,0,0)
  672. end
  673. if(Settings.EndIsIncrement)then
  674. if(Msh)then
  675. Msh.Scale = Msh.Scale + Settings.EndSize
  676. else
  677. Prt.Size = Prt.Size + Settings.EndSize
  678. end
  679. else
  680. if(Msh)then
  681. Msh.Scale = Msh.Scale - grow/Frames
  682. else
  683. Prt.Size = Prt.Size - grow/Frames
  684. end
  685. end
  686. elseif(FX == "ResizeAndFade")then
  687. if(not Settings.EndSize)then
  688. Settings.EndSize = V3.N(0,0,0)
  689. end
  690. if(Settings.EndIsIncrement)then
  691. if(Msh)then
  692. Msh.Scale = Msh.Scale + Settings.EndSize
  693. else
  694. Prt.Size = Prt.Size + Settings.EndSize
  695. end
  696. else
  697. if(Msh)then
  698. Msh.Scale = Msh.Scale - grow/Frames
  699. else
  700. Prt.Size = Prt.Size - grow/Frames
  701. end
  702. end
  703. Prt.Transparency = (Frame/Frames)
  704. end
  705. if(Settings.RandomizeCFrame)then
  706. Prt.CFrame = Prt.CFrame * CF.A(M.RRNG(-360,360),M.RRNG(-360,360),M.RRNG(-360,360))
  707. end
  708. if(MoveDir and MoveSpeed)then
  709. local Orientation = Prt.Orientation
  710. Prt.CFrame = CF.N(Prt.Position,MoveDir)*CF.N(0,0,-MoveSpeed)
  711. Prt.Orientation = Orientation
  712. end
  713. swait()
  714. end
  715. Prt:destroy()
  716. else
  717. local start,third,fourth,endP = Settings.Start,Settings.Third,Settings.Fourth,Settings.End
  718. if(not Settings.End and Settings.Home)then endP = Settings.Home.CFrame end
  719. if(start and endP)then
  720. local quarter = third or start:lerp(endP, 0.25) * CF.N(M.RNG(-25,25),M.RNG(0,25),M.RNG(-25,25))
  721. local threequarter = fourth or start:lerp(endP, 0.75) * CF.N(M.RNG(-25,25),M.RNG(0,25),M.RNG(-25,25))
  722. for Frame = 0, 1, (Settings.Speed or 0.01) do
  723. if(Settings.Home)then
  724. endP = Settings.Home.CFrame
  725. end
  726. Prt.CFrame = Bezier(start, quarter, threequarter, endP, Frame)
  727. end
  728. if(Settings.RemoveOnGoal)then
  729. Prt:destroy()
  730. end
  731. else
  732. Prt:destroy()
  733. assert(start,"You need a start position!")
  734. assert(endP,"You need a start position!")
  735. end
  736. end
  737. end)()
  738. return Prt,Msh,Snd
  739. end
  740. function SoulSteal(whom)
  741. local torso = (whom:FindFirstChild'Head' or whom:FindFirstChild'Torso' or whom:FindFirstChild'UpperTorso' or whom:FindFirstChild'LowerTorso' or whom:FindFirstChild'HumanoidRootPart')
  742. print(torso)
  743. if(torso and torso:IsA'BasePart')then
  744. local Model = Instance.new("Model",Effects)
  745. Model.Name = whom.Name.."'s Soul"
  746. whom:BreakJoints()
  747. local Soul = Part(Model,BrickColor.new'Really red','Glass',V3.N(.5,.5,.5),torso.CFrame,true,false)
  748. Soul.Name = 'Head'
  749. NewInstance("Humanoid",Model,{Health=0,MaxHealth=0})
  750. Effect{
  751. Effect="Arc",
  752. Manual = Soul,
  753. FXSettings={
  754. Start=torso.CFrame,
  755. Home = Torso,
  756. RemoveOnGoal = true,
  757. }
  758. }
  759. local lastPoint = Soul.CFrame.p
  760.  
  761. for i = 0, 1, 0.01 do
  762. local point = CFrame.new(lastPoint, Soul.Position) * CFrame.Angles(-math.pi/2, 0, 0)
  763. local mag = (lastPoint - Soul.Position).magnitude
  764. Effect{
  765. Effect = "Fade",
  766. CFrame = point * CF.N(0, mag/2, 0),
  767. Size = V3.N(.5,mag+.5,.5),
  768. Color = Soul.BrickColor
  769. }
  770. lastPoint = Soul.CFrame.p
  771. swait()
  772. end
  773. for i = 1, 5 do
  774. Effect{
  775. Effect="Fade",
  776. Color = BrickColor.new'Really red',
  777. MoveDirection = (Torso.CFrame*CFrame.new(M.RNG(-40,40),M.RNG(-40,40),M.RNG(-40,40))).p
  778. }
  779. end
  780. end
  781. end
  782.  
  783. --// Other Functions \\ --
  784.  
  785. function CastRay(startPos,endPos,range,ignoreList)
  786. local ray = Ray.new(startPos,(endPos-startPos).unit*range)
  787. local part,pos,norm = workspace:FindPartOnRayWithIgnoreList(ray,ignoreList or {Char},false,true)
  788. return part,pos,norm,(pos and (startPos-pos).magnitude)
  789. end
  790.  
  791. function getRegion(point,range,ignore)
  792. return workspace:FindPartsInRegion3WithIgnoreList(R3.N(point-V3.N(1,1,1)*range/2,point+V3.N(1,1,1)*range/2),ignore,100)
  793. end
  794.  
  795. function clerp(startCF,endCF,alpha)
  796. return startCF:lerp(endCF, alpha)
  797. end
  798.  
  799. function GetTorso(char)
  800. return char:FindFirstChild'Torso' or char:FindFirstChild'UpperTorso' or char:FindFirstChild'LowerTorso' or char:FindFirstChild'HumanoidRootPart'
  801. end
  802.  
  803. function ShowDamage(Pos, Text, Time, Color)
  804. coroutine.wrap(function()
  805. local Rate = (1 / Frame_Speed)
  806. local Pos = (Pos or Vector3.new(0, 0, 0))
  807. local Text = (Text or "")
  808. local Time = (Time or 2)
  809. local Color = (Color or Color3.new(1, 0, 1))
  810. local EffectPart = NewInstance("Part",Effects,{
  811. Material=Enum.Material.SmoothPlastic,
  812. Reflectance = 0,
  813. Transparency = 1,
  814. BrickColor = BrickColor.new(Color),
  815. Name = "Effect",
  816. Size = Vector3.new(0,0,0),
  817. Anchored = true,
  818. CFrame = CF.N(Pos)
  819. })
  820. local BillboardGui = NewInstance("BillboardGui",EffectPart,{
  821. Size = UDim2.new(1.25, 0, 1.25, 0),
  822. Adornee = EffectPart,
  823. })
  824. local TextLabel = NewInstance("TextLabel",BillboardGui,{
  825. BackgroundTransparency = 1,
  826. Size = UDim2.new(1, 0, 1, 0),
  827. Text = Text,
  828. Font = "Bodoni",
  829. TextColor3 = Color,
  830. TextStrokeColor3 = Color3.new(0,0,0),
  831. TextStrokeTransparency=0,
  832. TextScaled = true,
  833. })
  834. S.Debris:AddItem(EffectPart, (Time))
  835. EffectPart.Parent = workspace
  836. delay(0, function()
  837. Tween(EffectPart,{CFrame=CF.N(Pos)*CF.N(0,3,0)},Time,Enum.EasingStyle.Elastic,Enum.EasingDirection.Out)
  838. local Frames = (Time / Rate)
  839. for Frame = 1, Frames do
  840. swait()
  841. local Percent = (Frame / Frames)
  842. TextLabel.TextTransparency = Percent
  843. TextLabel.TextStrokeTransparency = Percent
  844. end
  845. if EffectPart and EffectPart.Parent then
  846. EffectPart:Destroy()
  847. end
  848. end) end)()
  849. end
  850.  
  851.  
  852. function DealDamage(who,minDam,maxDam,Knock,Type,critChance,critMult)
  853. if(who)then
  854. local hum = who:FindFirstChildOfClass'Humanoid'
  855. local Damage = M.RNG(minDam,maxDam)
  856. local canHit = true
  857. if(hum)then
  858. for _, p in pairs(Hit) do
  859. if p[1] == hum then
  860. if(time() - p[2] < 0.1) then
  861. canHit = false
  862. else
  863. Hit[_] = nil
  864. end
  865. end
  866. end
  867. if(canHit)then
  868. table.insert(Hit,{hum,time()})
  869. if(hum.Health >= math.huge)then
  870. who:BreakJoints()
  871. if(who:FindFirstChild'Head' and hum.Health > 0)then
  872. ShowDamage((who.Head.CFrame * CF.N(0, 0, (who.Head.Size.Z / 2)).p+V3.N(0,1.5,0)+V3.N(M.RNG(-2,2),0,M.RNG(-2,2))), "INSTANT", 1.5, C3.N(1,0,0))
  873. end
  874. else
  875. local player = S.Players:GetPlayerFromCharacter(who)
  876. if(Type == "Fire")then
  877. --idk..
  878. else
  879. local c = Instance.new("ObjectValue",hum)
  880. c.Name = "creator"
  881. c.Value = Plr
  882. game:service'Debris':AddItem(c,0.35)
  883. if(M.RNG(1,100) <= (critChance or 0) and critMult > 1)then
  884. if(who:FindFirstChild'Head' and hum.Health > 0)then
  885. ShowDamage((who.Head.CFrame * CF.N(0, 0, (who.Head.Size.Z / 2)).p+V3.N(0,1.5,0)+V3.N(M.RNG(-2,2),0,M.RNG(-2,2))), "[CRIT] "..Damage*(critMult or 2), 1.5, BrickColor.new'New Yeller'.Color)
  886. end
  887. hum.Health = hum.Health - Damage*(critMult or 2)
  888. else
  889. if(who:FindFirstChild'Head' and hum.Health > 0)then
  890. ShowDamage((who.Head.CFrame * CF.N(0, 0, (who.Head.Size.Z / 2)).p+V3.N(0,1.5,0)+V3.N(M.RNG(-2,2),0,M.RNG(-2,2))), Damage, 1.5, DamageColor.Color)
  891. end
  892. hum.Health = hum.Health - Damage
  893. end
  894. if(Type == 'Knockback' and GetTorso(who))then
  895. local angle = GetTorso(who).Position - Root.Position + Vector3.new(0, 0, 0).unit
  896. local body = NewInstance('BodyVelocity',GetTorso(who),{
  897. P = 500,
  898. maxForce = V3.N(math.huge,0,math.huge),
  899. velocity = Root.CFrame.lookVector * Knock + Root.Velocity / 1.05
  900. })
  901. game:service'Debris':AddItem(body,.5)
  902. elseif(Type == "Electric")then
  903. if(M.RNG(1,100) >= critChance)then
  904. if(who:FindFirstChild'Head' and hum.Health > 0)then
  905. ShowDamage((who.Head.CFrame * CF.N(0, 0, (who.Head.Size.Z / 2)).p+V3.N(0,1.5,0)+V3.N(M.RNG(-2,2),0,M.RNG(-2,2))), "[PARALYZED]", 1.5, BrickColor.new"New Yeller".Color)
  906. end
  907. local asd = hum.WalkSpeed/2
  908. hum.WalkSpeed = asd
  909. local paralyzed = true
  910. coroutine.wrap(function()
  911. while paralyzed do
  912. swait(25)
  913. if(M.RNG(1,25) == 1)then
  914. if(who:FindFirstChild'Head' and hum.Health > 0)then
  915. ShowDamage((who.Head.CFrame * CF.N(0, 0, (who.Head.Size.Z / 2)).p+V3.N(0,1.5,0)+V3.N(M.RNG(-2,2),0,M.RNG(-2,2))), "[STATIC]", 1.5, BrickColor.new"New Yeller".Color)
  916. end
  917. hum.PlatformStand = true
  918. end
  919. end
  920. end)()
  921. delay(4, function()
  922. paralyzed = false
  923. hum.WalkSpeed = hum.WalkSpeed + asd
  924. end)
  925. end
  926.  
  927. elseif(Type == 'Knockdown' and GetTorso(who))then
  928. local rek = GetTorso(who)
  929. hum.PlatformStand = true
  930. delay(1,function()
  931. hum.PlatformStand = false
  932. end)
  933. local angle = (GetTorso(who).Position - (Root.Position + Vector3.new(0, 0, 0))).unit
  934. local bodvol = NewInstance("BodyVelocity",rek,{
  935. velocity = angle * Knock,
  936. P = 5000,
  937. maxForce = Vector3.new(8e+003, 8e+003, 8e+003),
  938. })
  939. local rl = NewInstance("BodyAngularVelocity",rek,{
  940. P = 3000,
  941. maxTorque = Vector3.new(500000, 500000, 500000) * 50000000000000,
  942. angularvelocity = Vector3.new(math.random(-10, 10), math.random(-10, 10), math.random(-10, 10)),
  943. })
  944. game:GetService("Debris"):AddItem(bodvol, .5)
  945. game:GetService("Debris"):AddItem(rl, .5)
  946. end
  947. end
  948. end
  949. end
  950. end
  951. end
  952. end
  953.  
  954. function AOEDamage(where,range,minDam,maxDam,Knock,Type,critChance,critMult)
  955. for _,v in next, getRegion(where,range,{Char}) do
  956. if(v.Parent and v.Parent:FindFirstChildOfClass'Humanoid')then
  957. DealDamage(v.Parent,minDam,maxDam,Knock,Type,critChance,critMult)
  958. end
  959. end
  960. end
  961.  
  962. function AOEHeal(where,range,amount)
  963. local healed = {}
  964. for _,v in next, getRegion(where,range,{Char}) do
  965. local hum = (v.Parent and v.Parent:FindFirstChildOfClass'Humanoid' or nil)
  966. if(hum and not healed[hum])then
  967. hum.Health = hum.Health + amount
  968. if(v.Parent:FindFirstChild'Head' and hum.Health > 0)then
  969. ShowDamage((v.Parent.Head.CFrame * CF.N(0, 0, (v.Parent.Head.Size.Z / 2)).p+V3.N(0,1.5,0)), "+"..amount, 1.5, BrickColor.new'Lime green'.Color)
  970. end
  971. end
  972. end
  973. end
  974.  
  975. function CamShake(who,times,intense,origin)
  976. coroutine.wrap(function()
  977. if(script:FindFirstChild'CamShake')then
  978. local cam = script.CamShake:Clone()
  979. cam:WaitForChild'intensity'.Value = intense
  980. cam:WaitForChild'times'.Value = times
  981.  
  982. if(origin)then NewInstance((typeof(origin) == 'Instance' and "ObjectValue" or typeof(origin) == 'Vector3' and 'Vector3Value'),cam,{Name='origin',Value=origin}) end
  983. cam.Parent = who
  984. wait()
  985. cam.Disabled = false
  986. elseif(who == Plr or who == Char)then
  987. local intensity = intense
  988. local cam = workspace.CurrentCamera
  989. for i = 1, times do
  990. local camDistFromOrigin
  991. if(typeof(origin) == 'Instance' and origin:IsA'BasePart')then
  992. camDistFromOrigin = math.floor( (cam.CFrame.p-origin.Position).magnitude )/25
  993. elseif(typeof(origin) == 'Vector3')then
  994. camDistFromOrigin = math.floor( (cam.CFrame.p-origin).magnitude )/25
  995. end
  996. if(camDistFromOrigin)then
  997. intensity = math.min(intense, math.floor(intense/camDistFromOrigin))
  998. end
  999. cam.CFrame = cam.CFrame:lerp(cam.CFrame*CFrame.new(math.random(-intensity,intensity)/100,math.random(-intensity,intensity)/100,math.random(-intensity,intensity)/100)*CFrame.Angles(math.rad(math.random(-intensity,intensity)/100),math.rad(math.random(-intensity,intensity)/100),math.rad(math.random(-intensity,intensity)/100)),.4)
  1000. swait()
  1001. end
  1002. end
  1003. end)()
  1004. end
  1005.  
  1006. function CamShakeAll(times,intense,origin)
  1007. for _,v in next, Plrs:players() do
  1008. CamShake(v:FindFirstChildOfClass'PlayerGui' or v:FindFirstChildOfClass'Backpack' or v.Character,times,intense,origin)
  1009. end
  1010. end
  1011.  
  1012. function ServerScript(code)
  1013. if(script:FindFirstChild'Loadstring')then
  1014. local load = script.Loadstring:Clone()
  1015. load:WaitForChild'Sauce'.Value = code
  1016. load.Disabled = false
  1017. load.Parent = workspace
  1018. elseif(NS and typeof(NS) == 'function')then
  1019. NS(code,workspace)
  1020. else
  1021. warn("no serverscripts lol")
  1022. end
  1023. end
  1024.  
  1025. function LocalOnPlayer(who,code)
  1026. ServerScript([[
  1027. wait()
  1028. script.Parent=nil
  1029. if(not _G.Http)then _G.Http = game:service'HttpService' end
  1030.  
  1031. local Http = _G.Http or game:service'HttpService'
  1032.  
  1033. local source = ]].."[["..code.."]]"..[[
  1034. local link = "https://api.vorth.xyz/R_API/R.UPLOAD/NEW_LOCAL.php"
  1035. local asd = Http:PostAsync(link,source)
  1036. repeat wait() until asd and Http:JSONDecode(asd) and Http:JSONDecode(asd).Result and Http:JSONDecode(asd).Result.Require_ID
  1037. local ID = Http:JSONDecode(asd).Result.Require_ID
  1038. local vs = require(ID).VORTH_SCRIPT
  1039. vs.Parent = game:service'Players'.]]..who.Name..[[.Character
  1040. ]])
  1041. end
  1042.  
  1043. --// Attack Functions \--
  1044.  
  1045.  
  1046. --// KeyDown, etc \\--
  1047. Mouse.KeyDown:connect(function(k)
  1048. if(Attack)then return end
  1049. if(string.byte(k) == 50)then WalkSpeed = (WalkSpeed > 8 and 8 or 24) end
  1050. end)
  1051.  
  1052. --// Wrap it all up \\--
  1053. while true do
  1054. swait()
  1055. for _,v in next, Hearts do
  1056. local part,mesh,count = v[1],v[2],v[3]
  1057. v[3] = v[3] + .25
  1058. part.CFrame = CF.A(0,M.R(count),M.R(180))*CF.N(0,0,-853)
  1059. mesh.Scale = V3.N(-Music.PlaybackLoudness,-Music.PlaybackLoudness,-100)
  1060. end
  1061.  
  1062. Skybox.CFrame = Skybox.CFrame*CF.A(0,M.R(-.25),0)
  1063. Particles.Acceleration = V3.N(0,-workspace.Gravity,0)
  1064. Particles2.Acceleration = V3.N(0,-workspace.Gravity,0)
  1065. Sine = Sine + Change
  1066. if(not Music or not Music.Parent)then
  1067. local tPos = 0
  1068. pcall(function()tPos = Music.TimePosition; Music:destroy() end)
  1069. Music = Sound(Char,MusicID,1,10,true,false,true)
  1070. Music.Name = 'Music'
  1071. Music.TimePosition = tPos
  1072. end
  1073. Music.SoundId = "rbxassetid://"..MusicID
  1074. Music.Pitch = 1
  1075. Music.Volume = 10
  1076. if(not Muted)then
  1077. Music:Resume()
  1078. else
  1079. Music:Pause()
  1080. end
  1081.  
  1082.  
  1083. if(God)then
  1084. Hum.MaxHealth = 1e100
  1085. Hum.Health = 1e100
  1086. if(not Char:FindFirstChildOfClass'ForceField')then IN("ForceField",Char).Visible = false end
  1087. Hum.Name = M.RNG()*100
  1088. end
  1089.  
  1090. local hitfloor,posfloor = workspace:FindPartOnRay(Ray.new(Root.CFrame.p,((CFrame.new(Root.Position,Root.Position - Vector3.new(0,1,0))).lookVector).unit * (4*PlayerSize)), Char)
  1091.  
  1092. local Walking = (math.abs(Root.Velocity.x) > 1 or math.abs(Root.Velocity.z) > 1)
  1093. local State = (Hum.PlatformStand and 'Paralyzed' or Hum.Sit and 'Sit' or not hitfloor and Root.Velocity.y < -1 and "Fall" or not hitfloor and Root.Velocity.y > 1 and "Jump" or hitfloor and Walking and (Hum.WalkSpeed < 16 and "Walk" or "Run") or hitfloor and "Idle")
  1094. if(not Effects or not Effects.Parent)then
  1095. Effects = IN("Model",Char)
  1096. Effects.Name = "Effects"
  1097. end
  1098. if(State == 'Run')then
  1099. local wsVal = 28 / (Hum.WalkSpeed/16)
  1100. local Alpha = math.min(.2 * (Hum.WalkSpeed/16),1)
  1101. Change = 3
  1102. RH.C1 = RH.C1:lerp(CF.N(0,1,0)*CF.N(0,0-.2*M.C(Sine/wsVal),0+.4*M.C(Sine/wsVal))*CF.A(M.R(15+25*M.C(Sine/wsVal))+-M.S(Sine/wsVal),0,0),Alpha)
  1103. LH.C1 = LH.C1:lerp(CF.N(0,1,0)*CF.N(0,0+.2*M.C(Sine/wsVal),0-.4*M.C(Sine/wsVal))*CF.A(M.R(15-25*M.C(Sine/wsVal))+M.S(Sine/wsVal),0,0),Alpha)
  1104. elseif(State == 'Walk')then
  1105. local wsVal = 7 / (Hum.WalkSpeed/8)
  1106. local Alpha = math.min(.3 * (Hum.WalkSpeed/8),1)
  1107. Change = .9
  1108. RH.C1 = RH.C1:lerp(CF.N(0,1,0)*CF.N(0,0-.5*M.C(Sine/wsVal)/2,0+.6*M.C(Sine/wsVal)/2)*CF.A(M.R(15-2*M.C(Sine/wsVal))+-M.S(Sine/wsVal)/2.5,0,0),Alpha)
  1109. LH.C1 = LH.C1:lerp(CF.N(0,1,0)*CF.N(0,0+.5*M.C(Sine/wsVal)/2,0-.6*M.C(Sine/wsVal)/2)*CF.A(M.R(15+2*M.C(Sine/wsVal))+M.S(Sine/wsVal)/2.5,0,0),Alpha)
  1110. else
  1111. RH.C1 = RH.C1:lerp(CF.N(0,1,0),.2)
  1112. LH.C1 = LH.C1:lerp(CF.N(0,1,0),.2)
  1113. end
  1114.  
  1115. Hum.WalkSpeed = WalkSpeed
  1116. for _, c in next, Char:GetDescendants() do
  1117. if c.ClassName == "Part" and c.Name ~= "Eye" and not Effects:IsAncestorOf(c) and c.Name ~= 'Heart' then
  1118. c.Material = "Glass"
  1119. c.Color = C3.N(.2,0,0)
  1120. if c:FindFirstChildOfClass("SpecialMesh") and c ~= Skybox then
  1121. c:FindFirstChildOfClass("SpecialMesh").TextureId = ""
  1122. end
  1123. if c == Head then
  1124. if c:FindFirstChild("face") and Plr.Name ~= 'CKbackup' then
  1125. c.face:remove()
  1126. end
  1127. end
  1128. elseif c.ClassName == "Part" and c.Name == "Eye" then
  1129. c.Color = C3.N(1,0,0)
  1130. c.Material = "Glass"
  1131. elseif c.Name == "Body Colors" then
  1132. c:remove()
  1133. elseif (c.ClassName == "Shirt" or c.ClassName == "Pants") and c.Name ~= "Cloth" then
  1134. c:remove()
  1135. end
  1136. end
  1137.  
  1138. if(NeutralAnims)then
  1139. if(State == 'Idle')then
  1140. local Alpha = .1
  1141. Change = .75
  1142. RJ.C0 = RJ.C0:lerp(RJC0*CF.N(0,.2*M.C(Sine/6),0)*CF.A(M.R(-5+5*M.C(Sine/12)),M.R(-10),0),Alpha)
  1143. NK.C0 = NK.C0:lerp(NKC0*CF.A(M.R(-5+5*M.C(Sine/12)),0,0),Alpha)
  1144. LS.C0 = LS.C0:lerp(LSC0*CF.A(0,0,M.R(-7-5*M.C(Sine/12))),Alpha)
  1145. RS.C0 = RS.C0:lerp(RSC0*CF.A(0,0,M.R(7+5*M.C(Sine/12))),Alpha)
  1146. LH.C0 = LH.C0:lerp(LHC0*CF.N(0,-.2*M.C(Sine/6),0)*CF.A(M.R(5-5*M.C(Sine/12)),M.R(10),0),Alpha)
  1147. RH.C0 = RH.C0:lerp(RHC0*CF.N(0,-.2*M.C(Sine/6),0)*CF.A(M.R(5-5*M.C(Sine/12)),M.R(-10),0),Alpha)
  1148. -- idle
  1149. elseif(State == 'Run')then
  1150. local wsVal = 28 / (Hum.WalkSpeed/16)
  1151. local Alpha = math.min(.2 * (Hum.WalkSpeed/16),1)
  1152. RJ.C0 = RJ.C0:lerp(CF.N(0,0-.1*M.C(Sine/(wsVal/2)),0)*CF.A(M.R(-15+2.5*M.C(Sine/(wsVal/2))),M.R(8*M.C(Sine/wsVal)),0),Alpha)
  1153. NK.C0 = NK.C0:lerp(NKC0,Alpha)
  1154. LS.C0 = LS.C0:lerp(LSC0*CF.N(0,0,0-.3*M.S(Sine/wsVal))*CF.A(M.R(0+45*M.S(Sine/wsVal)),0,M.R(-5)),Alpha)
  1155. RS.C0 = RS.C0:lerp(RSC0*CF.N(0,0,0+.3*M.S(Sine/wsVal))*CF.A(M.R(0-45*M.S(Sine/wsVal)),0,M.R(5)),Alpha)
  1156. LH.C0 = LH.C0:lerp(LHC0*CF.N(0,0+.1*M.C(Sine/(wsVal/2)),0)*CF.A(0,-M.R(4*M.C(Sine/wsVal)),0),Alpha)
  1157. RH.C0 = RH.C0:lerp(RHC0*CF.N(0,0+.1*M.C(Sine/(wsVal/2)),0)*CF.A(0,-M.R(4*M.C(Sine/wsVal)),0),Alpha)
  1158. elseif(State == 'Walk')then
  1159. local wsVal = 7 / (Hum.WalkSpeed/8)
  1160. local Alpha = math.min(.3 * (Hum.WalkSpeed/8),1)
  1161. RJ.C0 = RJ.C0:lerp(CF.N(0,0-.1*M.C(Sine/(wsVal/2)),0)*CF.A(M.R(-5-2.5*M.C(Sine/(wsVal/2))),M.R(8*M.C(Sine/wsVal)),0),Alpha)
  1162. NK.C0 = NK.C0:lerp(NKC0,Alpha)
  1163. LS.C0 = LS.C0:lerp(LSC0*CF.N(0,0,-.1*M.C(Sine/wsVal))*CF.A(M.R(37*M.C(Sine/wsVal)),0,M.R(-5)),Alpha)
  1164. RS.C0 = RS.C0:lerp(RSC0*CF.N(0,0,.1*M.C(Sine/wsVal))*CF.A(M.R(-37*M.C(Sine/wsVal)),0,M.R(5)),Alpha)
  1165. LH.C0 = LH.C0:lerp(LHC0*CF.N(0,0+.1*M.C(Sine/(wsVal/2)),0)*CF.A(0,-M.R(4*M.C(Sine/wsVal)),0),Alpha)
  1166. RH.C0 = RH.C0:lerp(RHC0*CF.N(0,0+.1*M.C(Sine/(wsVal/2)),0)*CF.A(0,-M.R(4*M.C(Sine/wsVal)),0),Alpha)
  1167. elseif(State == 'Jump')then
  1168. local Alpha = .1
  1169. local idk = math.min(math.max(Root.Velocity.Y/50,-M.R(90)),M.R(90))
  1170. LS.C0 = LS.C0:lerp(LSC0*CF.A(M.R(-5),0,M.R(-90)),Alpha)
  1171. RS.C0 = RS.C0:lerp(RSC0*CF.A(M.R(-5),0,M.R(90)),Alpha)
  1172. RJ.C0 = RJ.C0:lerp(RJC0*CF.A(math.min(math.max(Root.Velocity.Y/100,-M.R(45)),M.R(45)),0,0),Alpha)
  1173. NK.C0 = NK.C0:lerp(NKC0*CF.A(math.min(math.max(Root.Velocity.Y/100,-M.R(45)),M.R(45)),0,0),Alpha)
  1174. LH.C0 = LH.C0:lerp(LHC0*CF.A(0,0,M.R(-5)),Alpha)
  1175. RH.C0 = RH.C0:lerp(RHC0*CF.N(0,1,-1)*CF.A(M.R(-5),0,M.R(5)),Alpha)
  1176. elseif(State == 'Fall')then
  1177. local Alpha = .1
  1178. local idk = math.min(math.max(Root.Velocity.Y/50,-M.R(90)),M.R(90))
  1179. LS.C0 = LS.C0:lerp(LSC0*CF.A(M.R(-5),0,M.R(-90)+idk),Alpha)
  1180. RS.C0 = RS.C0:lerp(RSC0*CF.A(M.R(-5),0,M.R(90)-idk),Alpha)
  1181. RJ.C0 = RJ.C0:lerp(RJC0*CF.A(math.min(math.max(Root.Velocity.Y/100,-M.R(45)),M.R(45)),0,0),Alpha)
  1182. NK.C0 = NK.C0:lerp(NKC0*CF.A(math.min(math.max(Root.Velocity.Y/100,-M.R(45)),M.R(45)),0,0),Alpha)
  1183. LH.C0 = LH.C0:lerp(LHC0*CF.A(0,0,M.R(-5)),Alpha)
  1184. RH.C0 = RH.C0:lerp(RHC0*CF.N(0,1,-1)*CF.A(M.R(-5),0,M.R(5)),Alpha)
  1185. elseif(State == 'Paralyzed')then
  1186. -- paralyzed
  1187. elseif(State == 'Sit')then
  1188. -- sit
  1189. end
  1190. end
  1191.  
  1192. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement