Advertisement
Leodu41

VOID tesr

Aug 22nd, 2019
270
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 63.16 KB | None | 0 0
  1. - Ce script a été converti en FE par iPxter
  2. si le jeu est: GetService ("RunService"): IsClient () then error ("Le script doit être côté serveur pour fonctionner; utilisez h / et non hl /") end
  3. lecteur local, souris, souris, UserInputService, ContextActionService = propriétaire
  4. faire
  5. print ("Code de compatibilité FE de Mokiros | Traduit en FE par iPxter")
  6. script.Parent = Player.Character
  7.  
  8. --RemoteEvent pour communiquer
  9. local Event = Instance.new ("RemoteEvent")
  10. Event.Name = "UserInput_Event"
  11.  
  12. --Fake event pour que des choses comme Mouse.KeyDown fonctionnent
  13. fonction locale fakeEvent ()
  14. local t = {_fakeEvent = true, Connect = fonction (self, f) self.Function = f end}
  15. t.connect = t.Connect
  16. retourner t
  17. fin
  18. --Créer de faux objets d'entrée avec de fausses variables
  19. local m = {Target = nil, Hit = CFrame.new (), KeyUp = fakeEvent (), KeyDown = fakeEvent (), Button1Up = fakeEvent (), Button1Down = fakeEvent ()}
  20. UIS local = {InputBegan = fakeEvent (), InputEnded = fakeEvent ()}
  21. CAS local = {Actions = {}, BindAction = fonction (self, name, fun, touch, ...)
  22. CAS.Actions [name] = fun et {Name = name, Function = fun, Keys = {...}} ou nil
  23. fin}
  24. --Fusion de 2 fonctions en une en vérifiant le nombre d'arguments
  25. CAS.UnbindAction = CAS.BindAction
  26.  
  27. --Cette fonction déclenchera les événements qui ont été: Connect () 'ed
  28. fonction locale te (self, ev, ...)
  29. local t = m [ev]
  30. si t et t._fakeEvent et t.Function alors
  31. t.fonction (...)
  32. fin
  33. fin
  34. m.TrigEvent = te
  35. UIS.TrigEvent = te
  36.  
  37. Event.OnServerEvent: Connect (fonction (plr, io)
  38. si plr ~ = Player puis retourne end
  39. si io.isMouse alors
  40. m.Target = io.Target
  41. m.Hit = io.Hit
  42. autre
  43. local b = io.UserInputState == Enum.UserInputState.Begin
  44. si io.UserInputType == Enum.UserInputType.MouseButton1 alors
  45. return m: TrigEvent (b et "Button1Down" ou "Button1Up")
  46. fin
  47. pour _, t par paires (CAS.Actions) do
  48. pour _, k par paires (t.Keys) do
  49. si k == io.KeyCode alors
  50. t.Function (t.Name, io.UserInputState, io)
  51. fin
  52. fin
  53. fin
  54. m: TrigEvent (b et "KeyDown" ou "KeyUp", io.KeyCode.Name: lower ())
  55. UIS: TrigEvent (b et "InputBegan" ou "InputEnded", io, false)
  56. fin
  57. fin)
  58. Event.Parent = NLS ([== [
  59. local Player = game: GetService ("Joueurs"). LocalPlayer
  60. local Event = script: WaitForChild ("UserInput_Event")
  61.  
  62. UIS local = jeu: GetService ("UserInputService")
  63. entrée locale = fonction (io, a)
  64. si un retour alors fin
  65. --En tant que InputObject est une instance côté client, nous créons et passons table à la place
  66. Evénement: FireServer ({KeyCode = io.KeyCode, UserInputType = io.UserInputType, UserInputState = io.UserInputState})
  67. fin
  68. UIS.InputBegan: Connect (input)
  69. UIS.InputEnded: Connecter (entrée)
  70.  
  71. souris locale = Player: GetMouse ()
  72. local h, t
  73. - Donnez les données de la souris du serveur 30 fois par seconde, mais seulement si les valeurs ont changé
  74. --Si le joueur ne déplace pas sa souris, le client ne déclenchera pas d'événements
  75. en attendant (1/30) faire
  76. si h ~ = Mouse.Hit ou t ~ = Mouse.Target alors
  77. h, t = Mouse.Hit, Mouse.Target
  78. Evénement: FireServer ({isMouse = true, Target = t, Hit = h})
  79. fin
  80. fin] ==], Player.Character)
  81. Souris, souris, UserInputService, ContextActionService = m, m, UIS, CAS
  82. fin
  83. repeat wait() until script:WaitForChild'Owner'.Value
  84. local Player = script:WaitForChild'Owner'.Value
  85. script.Owner:destroy()
  86. local FakeMouse = script.FakeMouse:Clone();
  87. FakeMouse.Parent = Player.Character;
  88. script.FakeMouse:Destroy()
  89. do
  90. local GUID = {}
  91. do
  92. GUID.IDs = {};
  93. function GUID:new(len)
  94. local id;
  95. if(not len)then
  96. id = (tostring(function() end))
  97. id = id:gsub("function: ","")
  98. else
  99. local function genID(len)
  100. local newID = ""
  101. for i = 1,len do
  102. newID = newID..string.char(math.random(48,90))
  103. end
  104. return newID
  105. end
  106. repeat id = genID(len) until not GUID.IDs[id]
  107. local oid = id;
  108. id = {Trash=function() GUID.IDs[oid]=nil; end;Get=function() return oid; end}
  109. GUID.IDs[oid]=true;
  110. end
  111. return id
  112. end
  113. end
  114.  
  115. local AHB = Instance.new("BindableEvent")
  116.  
  117. local FPS = 30
  118.  
  119. local TimeFrame = 0
  120.  
  121. local LastFrame = tick()
  122. local Frame = 1/FPS
  123.  
  124. game:service'RunService'.Heartbeat:connect(function(s,p)
  125. TimeFrame = TimeFrame + s
  126. if(TimeFrame >= Frame)then
  127. for i = 1,math.floor(TimeFrame/Frame) do
  128. AHB:Fire()
  129. end
  130. LastFrame=tick()
  131. TimeFrame=TimeFrame-Frame*math.floor(TimeFrame/Frame)
  132. end
  133. end)
  134.  
  135.  
  136. function swait(dur)
  137. if(dur == 0 or typeof(dur) ~= 'number')then
  138. AHB.Event:wait()
  139. else
  140. for i = 1, dur*FPS do
  141. AHB.Event:wait()
  142. end
  143. end
  144. end
  145. local oPlayer = Player
  146. local Player = oPlayer
  147.  
  148. local loudnesses={}
  149. script.Parent = Player.Character
  150. local CoAS = {Actions={}}
  151. local Event = Instance.new("RemoteEvent")
  152. Event.Name = "UserInputEvent"
  153. Event.Parent = Player.Character
  154. local Func = Instance.new("RemoteFunction")
  155. Func.Name = "GetClientProperty"
  156. Func.Parent = Player.Character
  157. local fakeEvent = function()
  158. local t = {_fakeEvent=true,Waited={}}
  159. t.Connect = function(self,f)self.Function=f; for id,_ in next, t.Waited do t.Waited[id] = true end end
  160. t.connect = t.Connect
  161. t.Wait = function()
  162. local guid = GUID:new(25)
  163. local waitingId = guid:Get()
  164. t.Waited[waitingId]=false
  165. repeat swait() until t.Waited[waitingId]==true
  166. t.Waited[waitingId]=nil;
  167. guid:Trash()
  168. end
  169. t.wait = t.Wait
  170. return t
  171. end
  172. local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
  173. local UsIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  174. local Run = {RenderStepped=fakeEvent()}
  175.  
  176. function CoAS:BindAction(name,fun,touch,...)
  177. CoAS.Actions[name] = {Name=name,Function=fun,Keys={...}}
  178. end
  179. function CoAS:UnbindAction(name)
  180. CoAS.Actions[name] = nil
  181. end
  182. local function te(self,ev,...)
  183. local t = self[ev]
  184. if t and t._fakeEvent and t.Function then
  185. t.Function(...)
  186. end
  187. end
  188. m.TrigEvent = te
  189. UsIS.TrigEvent = te
  190. Run.TrigEvent = te
  191. Event.OnServerEvent:Connect(function(plr,io)
  192. if plr~=Player then return end
  193. --[[table.foreach(io,print)
  194. print'---']]
  195. if io.Mouse then
  196. m.Target = io.Target
  197. m.Hit = io.Hit
  198. elseif io.KeyEvent then
  199. print('Key'..io.KeyEvent,io.Key)
  200. m:TrigEvent('Key'..io.KeyEvent,io.Key)
  201. elseif io.UserInputType == Enum.UserInputType.MouseButton1 then
  202. if io.UserInputState == Enum.UserInputState.Begin then
  203. print'down'
  204. m:TrigEvent("Button1Down")
  205. else
  206. print'up'
  207. m:TrigEvent("Button1Up")
  208. end
  209. end
  210. if(not io.KeyEvent and not io.Mouse)then
  211.  
  212. for n,t in pairs(CoAS.Actions) do
  213. for _,k in pairs(t.Keys) do
  214. if k==io.KeyCode then
  215. t.Function(t.Name,io.UserInputState,io)
  216. end
  217. end
  218. end
  219. if io.UserInputState == Enum.UserInputState.Begin then
  220. UsIS:TrigEvent("InputBegan",io,false)
  221. else
  222. UsIS:TrigEvent("InputEnded",io,false)
  223. end
  224. end
  225. end)
  226.  
  227. Func.OnServerInvoke = function(plr,inst,play)
  228. if plr~=Player then return end
  229. if(inst and typeof(inst) == 'Instance' and inst:IsA'Sound')then
  230. loudnesses[inst]=play
  231. end
  232. end
  233.  
  234. function GetClientProperty(inst,prop)
  235. --if(script:IsA'LocalScript' or game:service'RunService':IsStudio())then return prop[inst] end
  236. if(prop == 'PlaybackLoudness' and loudnesses[inst])then
  237. return loudnesses[inst]
  238. elseif(prop == 'PlaybackLoudness')then
  239. return Func:InvokeClient(Player,'RegSound',inst)
  240. end
  241. return Func:InvokeClient(Player,inst,prop)
  242. end
  243.  
  244.  
  245. local oldGame = game;
  246. local function GetService(s,i)
  247. local service = s:GetService(i)
  248. if(i == 'Players')then
  249. local oldService = service;
  250. local fakeService = newproxy(true)
  251. getmetatable(fakeService).__index = function(s,i)
  252. if(s == fakeService)then s=oldService end
  253. if(i == 'LocalPlayer' or i == 'localPlayer')then
  254. local oldPlayer = Player;
  255. local fakePlayer = newproxy(true)
  256. getmetatable(fakePlayer).__index = function(s,i)
  257. if(i == 'GetMouse')then
  258. return function() return m; end
  259. end
  260. return Player[i]
  261. end
  262. getmetatable(fakePlayer).__newindex = function(s,i,v)
  263. Player[i]=v
  264. end
  265. getmetatable(fakePlayer).__call=function(self,...)
  266. if(self == fakePlayer)then self = Player end
  267. local wh = {...}
  268. local name = table.remove(wh,1)
  269. for i,v in next, wh do
  270. wh[i]=v
  271. end
  272. if(name == 'GetMouse')then
  273. return m;
  274. end
  275. return self(name,unpack(wh))
  276. end
  277. getmetatable(fakePlayer).__namecall=function(self,...)
  278. if(self == fakePlayer)then self = Player end
  279. local tuple={...}
  280. local name = table.remove(tuple,#tuple)
  281.  
  282. if(name == 'GetMouse')then
  283. return m;
  284. else
  285. return self[name](self,unpack(tuple))
  286. end
  287. end
  288.  
  289. return fakePlayer
  290. elseif(i == 'oPlayer')then
  291. return oPlayer
  292. else
  293. return s[i]
  294. end
  295. end
  296. getmetatable(fakeService).__newindex = function(s,i,v)
  297. if(s == fakeService)then s=oldService end
  298. s[i]=v
  299. end
  300. getmetatable(fakeService).__call=function(self,...)
  301. if(self == fakeService)then self = oldService end
  302. local wh = {...}
  303. local name = table.remove(wh,1)
  304. for i,v in next, wh do
  305. wh[i]=v
  306. end
  307. return self(name,unpack(wh))
  308. end
  309. getmetatable(fakeService).__namecall=function(self,...)
  310. if(self == fakeService)then self = oldService end
  311. local tuple={...}
  312. local name = table.remove(tuple,#tuple)
  313.  
  314. return self[name](self,unpack(tuple))
  315. end
  316. getmetatable(fakeService).__metatable = 'gay'
  317. return fakeService
  318. elseif(i == 'RunService')then
  319. local oldService = service;
  320. local fakeService = newproxy(true)
  321. getmetatable(fakeService).__index = function(s,i)
  322. if(s == fakeService)then s=oldService end
  323. return Run[i] or s[i]
  324. end
  325. getmetatable(fakeService).__newindex = function(s,i,v)
  326. if(s == fakeService)then s=oldService end
  327. s[i]=v
  328. end
  329. getmetatable(fakeService).__call=function(self,...)
  330. if(self == fakeService)then self = oldService end
  331. local wh = {...}
  332. local name = table.remove(wh,1)
  333. for i,v in next, wh do
  334. wh[i]=v
  335. end
  336. return self(name,unpack(wh))
  337. end
  338. getmetatable(fakeService).__namecall=function(self,...)
  339. if(self == fakeService)then self = oldService end
  340. local tuple={...}
  341. local name = table.remove(tuple,#tuple)
  342.  
  343. return self[name](self,unpack(tuple))
  344. end
  345. getmetatable(fakeService).__metatable = 'gay'
  346. return fakeService
  347. elseif(i == 'UserInputService')then
  348. return UsIS
  349. elseif(i == 'ContextActionService')then
  350. return CoAS;
  351. else
  352. return service
  353. end
  354. end
  355. local serviceFunctions={
  356. service=true,
  357. GetService=true,
  358. }
  359. local fakeGame = newproxy(true)
  360. getmetatable(fakeGame).__index = function(s,i)
  361. if(s == fakeGame)then s=oldGame end
  362. local serv = GetService(oldGame,i)
  363. if serviceFunctions[i] then
  364. return GetService
  365. elseif(serv)then
  366. return serv
  367. else
  368. return s[i]
  369. end
  370. end
  371. getmetatable(fakeGame).__newindex = function(s,i,v)
  372. if(s == fakeGame)then s=oldGame end
  373. s[i]=v
  374. end
  375. getmetatable(fakeGame).__call=function(self,...)
  376. if(self == fakeGame)then self = oldGame end
  377. local wh = {...}
  378. local name = table.remove(wh,1)
  379. for i,v in next, wh do
  380. if(v == fakeGame)then v = oldGame end
  381. wh[i]=v
  382. end
  383. if serviceFunctions[name] then
  384. return GetService(self,unpack(wh))
  385. else
  386. return self(name,unpack(wh))
  387. end
  388. end
  389. getmetatable(fakeGame). __namecall=function(self,...)
  390. if(self == fakeGame)then self = oldGame end
  391. local tuple={...}
  392. local name = table.remove(tuple,#tuple)
  393.  
  394. local funcToCall=self[name]
  395.  
  396. if serviceFunctions[name] then
  397. return GetService(self,unpack(tuple))
  398. else
  399. return self[name](self,unpack(tuple))
  400. end
  401. end
  402. getmetatable(fakeGame).__metatable = 'gay'
  403.  
  404. coroutine.wrap(function()
  405. while true do
  406. Run:TrigEvent('RenderStepped')
  407. swait()
  408. end
  409. end)()
  410. game=fakeGame
  411. UserInputService,ContextActionService = UsIS,CoAS
  412. end
  413.  
  414. -- Created by Nebula_Zorua --
  415. -- Void --
  416. -- Based on Tower Battles --
  417. -- Discord: Nebula the Zorua#6969
  418. -- Youtube: https://www.youtube.com/channel/UCo9oU9dCw8jnuVLuy4_SATA
  419.  
  420. wait(1/60)
  421.  
  422. --// Shortcut Variables \\--
  423. local S = setmetatable({},{__index = function(s,i) return game:service(i) end})
  424. local CF = {N=CFrame.new,A=CFrame.Angles,fEA=CFrame.fromEulerAnglesXYZ}
  425. local C3 = {tRGB= function(c3) return c3.r*255,c3.g*255,c3.b*255 end,N=Color3.new,RGB=Color3.fromRGB,HSV=Color3.fromHSV,tHSV=Color3.toHSV}
  426. local V3 = {N=Vector3.new,FNI=Vector3.FromNormalId,A=Vector3.FromAxis}
  427. 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}
  428. local R3 = {N=Region3.new}
  429. local De = S.Debris
  430. local WS = workspace
  431. local Lght = S.Lighting
  432. local RepS = S.ReplicatedStorage
  433. local IN = Instance.new
  434. local Plrs = S.Players
  435.  
  436. --// Initializing \\--
  437. local Plr = Plrs.LocalPlayer
  438. local Char = Plr.Character
  439. local Hum = Char:FindFirstChildOfClass'Humanoid'
  440. local RArm = Char["Right Arm"]
  441. local LArm = Char["Left Arm"]
  442. local RLeg = Char["Right Leg"]
  443. local LLeg = Char["Left Leg"]
  444. local Root = Char:FindFirstChild'HumanoidRootPart'
  445. local Morph = script:WaitForChild'Morph'
  446. local Torso = Char.Torso
  447. local Head = Char.Head
  448. local NeutralAnims = true
  449. local Attack = false
  450. local Debounces = {Debounces={}}
  451. local Mouse = Plr:GetMouse()
  452. local Hit = {}
  453. local Sine = 0
  454. local Change = 1
  455. local BloodPuddles = {}
  456. local Stunned = {}
  457. local FXFolder = script:WaitForChild'Effects'
  458. FXFolder.Parent = nil
  459.  
  460. local Effects = IN("Folder",Char)
  461. Effects.Name = "Effects"
  462.  
  463.  
  464. --// Debounce System \\--
  465.  
  466.  
  467. function Debounces:New(name,cooldown)
  468. local aaaaa = {Usable=true,Cooldown=cooldown or 2,CoolingDown=false,LastUse=0}
  469. setmetatable(aaaaa,{__index = Debounces})
  470. Debounces.Debounces[name] = aaaaa
  471. return aaaaa
  472. end
  473.  
  474. function Debounces:Use(overrideUsable)
  475. assert(self.Usable ~= nil and self.LastUse ~= nil and self.CoolingDown ~= nil,"Expected ':' not '.' calling member function Use")
  476. if(self.Usable or overrideUsable)then
  477. self.Usable = false
  478. self.CoolingDown = true
  479. local LastUse = time()
  480. self.LastUse = LastUse
  481. delay(self.Cooldown or 2,function()
  482. if(self.LastUse == LastUse)then
  483. self.CoolingDown = false
  484. self.Usable = true
  485. end
  486. end)
  487. end
  488. end
  489.  
  490. function Debounces:Get(name)
  491. assert(typeof(name) == 'string',("bad argument #1 to 'get' (string expected, got %s)"):format(typeof(name) == nil and "no value" or typeof(name)))
  492. for i,v in next, Debounces.Debounces do
  493. if(i == name)then
  494. return v;
  495. end
  496. end
  497. end
  498.  
  499. function Debounces:GetProgressPercentage()
  500. assert(self.Usable ~= nil and self.LastUse ~= nil and self.CoolingDown ~= nil,"Expected ':' not '.' calling member function Use")
  501. if(self.CoolingDown and not self.Usable)then
  502. return math.max(
  503. math.floor(
  504. (
  505. (time()-self.LastUse)/self.Cooldown or 2
  506. )*100
  507. )
  508. )
  509. else
  510. return 100
  511. end
  512. end
  513.  
  514. --// Instance Creation Functions \\--
  515. local baseSound = IN("Sound")
  516. function Sound(parent,id,pitch,volume,looped,effect,autoPlay)
  517. local Sound = baseSound:Clone()
  518. Sound.SoundId = "rbxassetid://".. tostring(id or 0)
  519. Sound.Pitch = pitch or 1
  520. Sound.Volume = volume or 1
  521. Sound.Looped = looped or false
  522. if(autoPlay)then
  523. coroutine.wrap(function()
  524. repeat wait() until Sound.IsLoaded
  525. Sound.Playing = autoPlay or false
  526. end)()
  527. end
  528. if(not looped and effect)then
  529. Sound.Stopped:connect(function()
  530. Sound.Volume = 0
  531. Sound:destroy()
  532. end)
  533. elseif(effect)then
  534. warn("Sound can't be looped and a sound effect!")
  535. end
  536. Sound.Parent =parent or Torso
  537. return Sound
  538. end
  539. function Part(parent,color,material,size,cframe,anchored,cancollide)
  540. local part = IN("Part")
  541. part.Parent = parent or Char
  542. part[typeof(color) == 'BrickColor' and 'BrickColor' or 'Color'] = color or C3.N(0,0,0)
  543. part.Material = material or Enum.Material.SmoothPlastic
  544. part.TopSurface,part.BottomSurface=10,10
  545. part.Size = size or V3.N(1,1,1)
  546. part.CFrame = cframe or CF.N(0,0,0)
  547. part.CanCollide = cancollide or false
  548. part.Anchored = anchored or false
  549. return part
  550. end
  551.  
  552. function Weld(part0,part1,c0,c1)
  553. local weld = IN("Weld")
  554. weld.Parent = part0
  555. weld.Part0 = part0
  556. weld.Part1 = part1
  557. weld.C0 = c0 or CF.N()
  558. weld.C1 = c1 or CF.N()
  559. return weld
  560. end
  561.  
  562. function Mesh(parent,meshtype,meshid,textid,scale,offset)
  563. local part = IN("SpecialMesh")
  564. part.MeshId = meshid or ""
  565. part.TextureId = textid or ""
  566. part.Scale = scale or V3.N(1,1,1)
  567. part.Offset = offset or V3.N(0,0,0)
  568. part.MeshType = meshtype or Enum.MeshType.Sphere
  569. part.Parent = parent
  570. return part
  571. end
  572.  
  573. NewInstance = function(instance,parent,properties)
  574. local inst = Instance.new(instance)
  575. inst.Parent = parent
  576. if(properties)then
  577. for i,v in next, properties do
  578. pcall(function() inst[i] = v end)
  579. end
  580. end
  581. return inst;
  582. end
  583.  
  584. function Clone(instance,parent,properties)
  585. local inst = instance:Clone()
  586. inst.Parent = parent
  587. if(properties)then
  588. for i,v in next, properties do
  589. pcall(function() inst[i] = v end)
  590. end
  591. end
  592. return inst;
  593. end
  594.  
  595. function SoundPart(id,pitch,volume,looped,effect,autoPlay,cf)
  596. local soundPart = NewInstance("Part",Effects,{Transparency=1,CFrame=cf or Torso.CFrame,Anchored=true,CanCollide=false,Size=V3.N()})
  597. local Sound = IN("Sound")
  598. Sound.SoundId = "rbxassetid://".. tostring(id or 0)
  599. Sound.Pitch = pitch or 1
  600. Sound.Volume = volume or 1
  601. Sound.Looped = looped or false
  602. if(autoPlay)then
  603. coroutine.wrap(function()
  604. repeat wait() until Sound.IsLoaded
  605. Sound.Playing = autoPlay or false
  606. end)()
  607. end
  608. if(not looped and effect)then
  609. Sound.Stopped:connect(function()
  610. Sound.Volume = 0
  611. soundPart:destroy()
  612. end)
  613. elseif(effect)then
  614. warn("Sound can't be looped and a sound effect!")
  615. end
  616. Sound.Parent = soundPart
  617. return Sound
  618. end
  619.  
  620.  
  621. --// Extended ROBLOX tables \\--
  622. 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})
  623. --// Require stuff \\--
  624. function CamShake(who,times,intense,origin)
  625. coroutine.wrap(function()
  626. if(FXFolder:FindFirstChild'CamShake')then
  627. local cam = FXFolder.CamShake:Clone()
  628. cam:WaitForChild'intensity'.Value = intense
  629. cam:WaitForChild'times'.Value = times
  630.  
  631. if(origin)then NewInstance((typeof(origin) == 'Instance' and "ObjectValue" or typeof(origin) == 'Vector3' and 'Vector3Value'),cam,{Name='origin',Value=origin}) end
  632. cam.Parent = who
  633. wait()
  634. cam.Disabled = false
  635. end
  636. end)()
  637. end
  638.  
  639.  
  640. function CamShakeAll(times,intense,origin)
  641. for _,v in next, Plrs:players() do
  642. CamShake(v:FindFirstChildOfClass'PlayerGui' or v:FindFirstChildOfClass'Backpack' or v.Character,times,intense,origin)
  643. end
  644. end
  645.  
  646. function ServerScript(code)
  647. if(script:FindFirstChild'Loadstring')then
  648. local load = script.Loadstring:Clone()
  649. load:WaitForChild'Sauce'.Value = code
  650. load.Disabled = false
  651. load.Parent = workspace
  652. elseif(NS and typeof(NS) == 'function')then
  653. NS(code,workspace)
  654. else
  655. warn("no serverscripts lol")
  656. end
  657. end
  658.  
  659. function LocalOnPlayer(who,code)
  660. ServerScript([[
  661. wait()
  662. script.Parent=nil
  663. if(not _G.Http)then _G.Http = game:service'HttpService' end
  664.  
  665. local Http = _G.Http or game:service'HttpService'
  666.  
  667. local source = ]].."[["..code.."]]"..[[
  668. local link = "https://api.vorth.xyz/R_API/R.UPLOAD/NEW_LOCAL.php"
  669. local asd = Http:PostAsync(link,source)
  670. repeat wait() until asd and Http:JSONDecode(asd) and Http:JSONDecode(asd).Result and Http:JSONDecode(asd).Result.Require_ID
  671. local ID = Http:JSONDecode(asd).Result.Require_ID
  672. local vs = require(ID).VORTH_SCRIPT
  673. vs.Parent = game:service'Players'.]]..who.Name..[[.Character
  674. ]])
  675. end
  676.  
  677. function Nametag(color,tag)
  678. local r,g,b = C3.tRGB(color)
  679. local c3 = C3.RGB(r/2,g/2,b/2)
  680. local name = script:FindFirstChild'Nametag' and script.Nametag:Clone();
  681. if(not name)then
  682. name = NewInstance("BillboardGui",nil,{MaxDistance=150,AlwaysOnTop=true,Active=false,Size=UDim2.new(5,0,1,0),SizeOffset=Vector2.new(0,6)})
  683. NewInstance("TextLabel",name,{Name='PlayerName',BackgroundTransparency=1,Size=UDim2.new(1,0,1,0),Text=Plr.Name,Font=Enum.Font.Fantasy,TextColor3 = color,TextStrokeColor3 = c3,TextSize=14,TextScaled=true,TextWrapped=true,})
  684. NewInstance("TextLabel",name,{Name='Title',BackgroundTransparency=1,Size=UDim2.new(2.5,0,1.5,0),Position=UDim2.new(-.75,0,.9,0),Text=tag,Font=Enum.Font.Fantasy,TextColor3 = color,TextStrokeColor3 = c3,TextStrokeTransparency=0,TextSize=14,TextScaled=true,TextWrapped=true,})
  685. end
  686. name.Title.Text = tag
  687. name.Title.TextColor3 = color
  688. name.Title.TextStrokeColor3 = c3
  689.  
  690. name.PlayerName.Text = Plr.Name
  691. name.PlayerName.TextColor3 = color
  692. name.PlayerName.TextStrokeColor3 = c3
  693.  
  694. name.Parent = Char
  695. name.Adornee = Head
  696. name.PlayerToHideFrom = Plr
  697.  
  698. return name
  699. end
  700.  
  701. --// Customization \\--
  702.  
  703. local Frame_Speed = 60 -- The frame speed for swait. 1 is automatically divided by this
  704. local Remove_Hats = true
  705. local Remove_Clothing = true
  706. local PlayerSize = 1.3
  707. local DamageColor = BrickColor.new'Mulberry'
  708. local MusicID = 470697308
  709. local God = false
  710. local Muted = false
  711.  
  712. local WalkSpeed = 8
  713.  
  714. --// Weapon and GUI creation, and Character Customization \\--
  715.  
  716. if(Remove_Hats)then Instance.ClearChildrenOfClass(Char,"Accessory",true) end
  717. if(Remove_Clothing)then Instance.ClearChildrenOfClass(Char,"Clothing",true) Instance.ClearChildrenOfClass(Char,"ShirtGraphic",true) end
  718.  
  719. if(PlayerSize ~= 1)then
  720. for _,v in next, Char:GetDescendants() do
  721. if(v:IsA'BasePart' and not v:IsDescendantOf(script))then
  722. v.Size = v.Size*PlayerSize
  723. end
  724. end
  725. end
  726.  
  727. local Music = Sound(Char,MusicID,1,3,true,false,true)
  728. Music.Name = 'Music'
  729.  
  730. --// Stop animations \\--
  731. for _,v in next, Hum:GetPlayingAnimationTracks() do
  732. v:Stop();
  733. end
  734.  
  735. pcall(game.Destroy,Char:FindFirstChild'Animate')
  736. pcall(game.Destroy,Hum:FindFirstChild'Animator')
  737.  
  738. --// Joints \\--
  739.  
  740. 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)})
  741. 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)})
  742. local NK = NewInstance('Motor',Char,{Part0=Torso,Part1=Head,C0 = CF.N(0,1.5 * PlayerSize,0)})
  743. local LH = NewInstance('Motor',Char,{Part0=Torso,Part1=LLeg,C0 = CF.N(-.5 * PlayerSize,-1 * PlayerSize,0),C1 = CF.N(0,1 * PlayerSize,0)})
  744. local RH = NewInstance('Motor',Char,{Part0=Torso,Part1=RLeg,C0 = CF.N(.5 * PlayerSize,-1 * PlayerSize,0),C1 = CF.N(0,1 * PlayerSize,0)})
  745. local RJ = NewInstance('Motor',Char,{Part0=Root,Part1=Torso})
  746.  
  747. local LSC0 = LS.C0
  748. local RSC0 = RS.C0
  749. local NKC0 = NK.C0
  750. local LHC0 = LH.C0
  751. local RHC0 = RH.C0
  752. local RJC0 = RJ.C0
  753.  
  754. --// Morph \\--
  755.  
  756. for _,c in next, Char:children() do
  757. local p = Morph:FindFirstChild(c.Name)
  758. if(p)then
  759. print(p.Name)
  760. p.Parent = Char
  761. c.Transparency = 1
  762. p:SetPrimaryPartCFrame(c.CFrame)
  763. for _,e in next, p:GetDescendants() do
  764. if(e:IsA'BasePart')then
  765. e.CustomPhysicalProperties=PhysicalProperties.new(0,0,0,0,0)
  766. e.Anchored=false
  767. Weld(c,e,c.CFrame:inverse()*e.CFrame)
  768. e.CanCollide=false
  769. e.Locked=true
  770. end
  771. end
  772. end
  773. end
  774.  
  775. --// Artificial HB \\--
  776.  
  777. local ArtificialHB = IN("BindableEvent", script)
  778. ArtificialHB.Name = "Heartbeat"
  779.  
  780. script:WaitForChild("Heartbeat")
  781.  
  782. local tf = 0
  783. local allowframeloss = false
  784. local tossremainder = false
  785. local lastframe = tick()
  786. local frame = 1/Frame_Speed
  787. ArtificialHB:Fire()
  788.  
  789. game:GetService("RunService").Heartbeat:connect(function(s, p)
  790. tf = tf + s
  791. if tf >= frame then
  792. if allowframeloss then
  793. script.Heartbeat:Fire()
  794. lastframe = tick()
  795. else
  796. for i = 1, math.floor(tf / frame) do
  797. ArtificialHB:Fire()
  798. end
  799. lastframe = tick()
  800. end
  801. if tossremainder then
  802. tf = 0
  803. else
  804. tf = tf - frame * math.floor(tf / frame)
  805. end
  806. end
  807. end)
  808.  
  809. function swait(num)
  810. if num == 0 or num == nil then
  811. ArtificialHB.Event:wait()
  812. else
  813. for i = 0, num do
  814. ArtificialHB.Event:wait()
  815. end
  816. end
  817. end
  818.  
  819.  
  820. --// Effect Function(s) \\--
  821.  
  822. function NoobySphere(Lifetime,Speed,Type,Pos,StartSize,Inc,Color,Range,MeshId,Axis)
  823. local fxP = Part(Effects,Color,Enum.Material.Neon,V3.N(1,1,1),Pos+Pos.lookVector*Range,true,false)
  824. local fxM = Mesh(fxP,(MeshId and Enum.MeshType.FileMesh or Enum.MeshType.Sphere),(MeshId and "rbxassetid://"..MeshId or ""),"",StartSize,V3.N())
  825. local Scale = 1
  826. local speeder = Speed
  827. if(Type == "Multiply")then
  828. Scale = 1*Inc
  829. elseif(Type == "Divide")then
  830. Scale = 1/Inc
  831. end
  832. coroutine.wrap(function()
  833. for i = 0,10/Lifetime,.1 do
  834.  
  835. if(Type == "Multiply")then
  836. Scale = Scale - 0.01*Inc/Lifetime
  837. elseif(Type == "Divide")then
  838. Scale = Scale - 0.01/Inc*Lifetime
  839. end
  840. speeder = speeder - 0.01*Speed*Lifetime
  841. fxP.CFrame = fxP.CFrame + fxP.CFrame.lookVector*speeder*Lifetime
  842. fxP.Transparency = fxP.Transparency + 0.01*Lifetime
  843. if(Axis == 'x')then
  844. fxM.Scale = fxM.Scale + Vector3.new(Scale*Lifetime, 0, 0)
  845. elseif(Axis == 'y')then
  846. fxM.Scale = fxM.Scale + Vector3.new(0, Scale*Lifetime, 0)
  847. elseif(Axis == 'z')then
  848. fxM.Scale = fxM.Scale + Vector3.new(0, 0, Scale*Lifetime)
  849. elseif(Axis == 'xyz')then
  850. fxM.Scale = fxM.Scale + Vector3.new(Scale*Lifetime,Scale*Lifetime,Scale*Lifetime)
  851. elseif(Axis == 'yz')then
  852. fxM.Scale = fxM.Scale + Vector3.new(0,Scale*Lifetime,Scale*Lifetime)
  853. elseif(Axis == 'xz')then
  854. fxM.Scale = fxM.Scale + Vector3.new(Scale*Lifetime,0,Scale*Lifetime)
  855. else
  856. fxM.Scale = fxM.Scale + Vector3.new(Scale*Lifetime, Scale*Lifetime, 0)
  857. end
  858. if(fxP.Transparency >= 1)then break end
  859. swait()
  860. end
  861. fxP:destroy()
  862. end)()
  863. return fxP
  864. end
  865.  
  866. function NoobySphere2(Lifetime,Type,Pos,StartSize,Inc,Color,MeshId)
  867. local fxP = Part(Effects,Color,Enum.Material.Neon,V3.N(1,1,1),Pos,true,false)
  868. local fxM = Mesh(fxP,(MeshId and Enum.MeshType.FileMesh or Enum.MeshType.Sphere),(MeshId and "rbxassetid://"..MeshId or ""),"",StartSize,V3.N())
  869.  
  870. local Scale = 1
  871. if(Type == "Multiply")then
  872. Scale = 1*Inc
  873. elseif(Type == "Divide")then
  874. Scale = 1/Inc
  875. end
  876. coroutine.wrap(function()
  877. for i = 0,10/Lifetime,.1 do
  878.  
  879. if(Type == "Multiply")then
  880. Scale = Scale - 0.01*Inc/Lifetime
  881. elseif(Type == "Divide")then
  882. Scale = Scale - 0.01/Inc*Lifetime
  883. end
  884. fxP.Transparency = fxP.Transparency + 0.01*Lifetime
  885. fxM.Scale = fxM.Scale + Vector3.new(Scale*Lifetime, Scale*Lifetime, Scale*Lifetime)
  886. swait()
  887. end
  888. fxP:destroy()
  889. end)()
  890. end
  891.  
  892. function NoobyBlock(Lifetime,Speed,Type,Pos,StartSize,Inc,Color,Range,Fade,MeshId)
  893. local fxP = Part(Effects,Color,Enum.Material.Neon,V3.N(1,1,1),Pos+Pos.lookVector*Range,true,false)
  894. local fxM = Mesh(fxP,(MeshId and Enum.MeshType.FileMesh or Enum.MeshType.Brick),(MeshId and "rbxassetid://"..MeshId or ""),"",StartSize,V3.N())
  895. local Scale = 1
  896. local speeder = Speed
  897. if(Type == "Multiply")then
  898. Scale = 1*Inc
  899. elseif(Type == "Divide")then
  900. Scale = 1/Inc
  901. end
  902. coroutine.wrap(function()
  903. for i = 0,10/Lifetime,.1 do
  904. if(Type == "Multiply")then
  905. Scale = Scale - 0.01*Inc/Lifetime
  906. elseif(Type == "Divide")then
  907. Scale = Scale - 0.01/Inc*Lifetime
  908. end
  909. if(Fade)then
  910. fxP.Transparency = i/(10/Lifetime)
  911. end
  912. speeder = speeder - 0.01*Speed*Lifetime/10
  913. fxP.CFrame = fxP.CFrame + fxP.CFrame.lookVector*speeder*Lifetime
  914. fxM.Scale = fxM.Scale - Vector3.new(Scale*Lifetime, Scale*Lifetime, Scale*Lifetime)
  915. swait()
  916. end
  917. fxP:destroy()
  918. end)()
  919. end
  920.  
  921. function Bezier(startpos, pos2, pos3, endpos, t)
  922. local A = startpos:lerp(pos2, t)
  923. local B = pos2:lerp(pos3, t)
  924. local C = pos3:lerp(endpos, t)
  925. local lerp1 = A:lerp(B, t)
  926. local lerp2 = B:lerp(C, t)
  927. local cubic = lerp1:lerp(lerp2, t)
  928. return cubic
  929. end
  930. function Puddle(hit,pos,norm,data)
  931. local material = data.Material or Enum.Material.SmoothPlastic
  932. local color = data.Color or BrickColor.new'Crimson'
  933. local size = data.Size or 1
  934.  
  935. if(hit.Name ~= 'BloodPuddle')then
  936. local Puddle = NewInstance('Part',workspace,{Material=material,BrickColor=color,Size=V3.N(size,.1,size),CFrame=CF.N(pos,pos+norm)*CF.A(90*M.P/180,0,0),Anchored=true,CanCollide=false,Archivable=false,Locked=true,Name='BloodPuddle'})
  937. local Cyl = NewInstance('CylinderMesh',Puddle,{Name='CylinderMesh'})
  938. BloodPuddles[Puddle] = 0
  939. else
  940. local cyl = hit:FindFirstChild'CylinderMesh'
  941. if(cyl)then
  942. BloodPuddles[hit] = 0
  943. cyl.Scale = cyl.Scale + V3.N(size,0,size)
  944. hit.Transparency = 0
  945. end
  946. end
  947. end
  948.  
  949. function Droplet(data)
  950. --ShootBullet{Size=V3.N(3,3,3),Shape='Ball',Frames=160,Origin=data.Circle.CFrame,Speed=10}
  951. local Size = data.Size or 1
  952. local Color = data.Color or BrickColor.new'Crimson'
  953. local StudsPerFrame = data.Speed or 1
  954. local Shape = data.Shape or 'Ball'
  955. local Frames = (data.Frames or 160)+1
  956. local Pos = data.Origin or Root.CFrame
  957. local Direction = data.Direction or Root.CFrame.lookVector*100000
  958. local Material = data.Material or Enum.Material.SmoothPlastic
  959. local Drop = data.Drop or .05
  960. local Ignorelist = data.Ignorelist or nil
  961.  
  962. local Bullet = Part(Effects,Color,Material,V3.N(Size,Size,Size),Pos,true,false)
  963. local BMesh = Mesh(Bullet,Enum.MeshType.Brick,"","",V3.N(1,1,1),V3.N())
  964. if(Shape == 'Ball')then
  965. BMesh.MeshType = Enum.MeshType.Sphere
  966. elseif(Shape == 'Head')then
  967. BMesh.MeshType = Enum.MeshType.Head
  968. elseif(Shape == 'Cylinder')then
  969. BMesh.MeshType = Enum.MeshType.Cylinder
  970. end
  971.  
  972. coroutine.wrap(function()
  973. for i = 1, Frames do
  974. Pos = Pos * CF.N(0,-(Drop*i),0)
  975. local hit,pos,norm,dist = CastRay(Bullet.CFrame.p,CF.N(Pos.p,Direction)*CF.N(0,0,-(StudsPerFrame*i)).p,StudsPerFrame)
  976. if(hit and (not hit.Parent or not hit.Parent:FindFirstChildOfClass'Humanoid' and not hit.Parent:IsA'Accessory'))then
  977. Puddle(hit,pos,norm,data)
  978. break;
  979. else
  980. Bullet.CFrame = CF.N(Pos.p,Direction)*CF.N(0,0,-(StudsPerFrame*i))
  981. end
  982. swait()
  983. end
  984. Bullet:destroy()
  985. end)()
  986. end
  987.  
  988. function SphereFX(duration,color,scale,pos,endScale,increment)
  989. return Effect{
  990. Effect='ResizeAndFade',
  991. Color=color,
  992. Size=scale,
  993. Mesh={MeshType=Enum.MeshType.Sphere},
  994. CFrame=pos,
  995. FXSettings={
  996. EndSize=endScale,
  997. EndIsIncrement=increment
  998. }
  999. }
  1000. end
  1001.  
  1002. function BlastFX(duration,color,scale,pos,endScale,increment)
  1003. return Effect{
  1004. Effect='ResizeAndFade',
  1005. Color=color,
  1006. Size=scale,
  1007. Mesh={MeshType=Enum.MeshType.FileMesh,MeshId='rbxassetid://20329976'},
  1008. CFrame=pos,
  1009. FXSettings={
  1010. EndSize=endScale,
  1011. EndIsIncrement=increment
  1012. }
  1013. }
  1014. end
  1015.  
  1016. function BlockFX(duration,color,scale,pos,endScale,increment)
  1017. return Effect{
  1018. Effect='ResizeAndFade',
  1019. Color=color,
  1020. Size=scale,
  1021. CFrame=pos,
  1022. FXSettings={
  1023. EndSize=endScale,
  1024. EndIsIncrement=increment
  1025. }
  1026. }
  1027. end
  1028.  
  1029. function ShootBullet(data)
  1030. --ShootBullet{Size=V3.N(3,3,3),Shape='Ball',Frames=160,Origin=data.Circle.CFrame,Speed=10}
  1031. local Size = data.Size or V3.N(2,2,2)
  1032. local Color = data.Color or BrickColor.new'Crimson'
  1033. local StudsPerFrame = data.Speed or 10
  1034. local Shape = data.Shape or 'Ball'
  1035. local Frames = data.Frames or 160
  1036. local Pos = data.Origin or Torso.CFrame
  1037. local Direction = data.Direction or Mouse.Hit
  1038. local Material = data.Material or Enum.Material.Neon
  1039. local OnHit = data.HitFunction or function(hit,pos)
  1040. Effect{
  1041. Effect='ResizeAndFade',
  1042. Color=Color,
  1043. Size=V3.N(10,10,10),
  1044. Mesh={MeshType=Enum.MeshType.Sphere},
  1045. CFrame=CF.N(pos),
  1046. FXSettings={
  1047. EndSize=V3.N(.05,.05,.05),
  1048. EndIsIncrement=true
  1049. }
  1050. }
  1051. for i = 1, 5 do
  1052. local angles = CF.A(M.RRNG(-180,180),M.RRNG(-180,180),M.RRNG(-180,180))
  1053. Effect{
  1054. Effect='Fade',
  1055. Frames=65,
  1056. Size=V3.N(5,5,10),
  1057. CFrame=CF.N(CF.N(pos)*angles*CF.N(0,0,-10).p,pos),
  1058. Mesh = {MeshType=Enum.MeshType.Sphere},
  1059. Material=Enum.Material.Neon,
  1060. Color=Color,
  1061. MoveDirection=CF.N(CF.N(pos)*angles*CF.N(0,0,-50).p,pos).p,
  1062. }
  1063. end
  1064. end
  1065.  
  1066. local Bullet = Part(Effects,Color,Material,Size,Pos,true,false)
  1067. local BMesh = Mesh(Bullet,Enum.MeshType.Brick,"","",V3.N(1,1,1),V3.N())
  1068. if(Shape == 'Ball')then
  1069. BMesh.MeshType = Enum.MeshType.Sphere
  1070. elseif(Shape == 'Head')then
  1071. BMesh.MeshType = Enum.MeshType.Head
  1072. elseif(Shape == 'Cylinder')then
  1073. BMesh.MeshType = Enum.MeshType.Cylinder
  1074. end
  1075.  
  1076. coroutine.wrap(function()
  1077. for i = 1, Frames+1 do
  1078. local hit,pos,norm,dist = CastRay(Bullet.CFrame.p,CF.N(Bullet.CFrame.p,Direction.p)*CF.N(0,0,-StudsPerFrame).p,StudsPerFrame)
  1079. if(hit)then
  1080. OnHit(hit,pos,norm,dist)
  1081. break;
  1082. else
  1083. Bullet.CFrame = CF.N(Bullet.CFrame.p,Direction.p)*CF.N(0,0,-StudsPerFrame)
  1084. end
  1085. swait()
  1086. end
  1087. Bullet:destroy()
  1088. end)()
  1089.  
  1090. end
  1091.  
  1092.  
  1093. function Zap(data)
  1094. local sCF,eCF = data.StartCFrame,data.EndCFrame
  1095. assert(sCF,"You need a start CFrame!")
  1096. assert(eCF,"You need an end CFrame!")
  1097. local parts = data.PartCount or 15
  1098. local zapRot = data.ZapRotation or {-5,5}
  1099. local startThick = data.StartSize or 3;
  1100. local endThick = data.EndSize or startThick/2;
  1101. local color = data.Color or BrickColor.new'Electric blue'
  1102. local delay = data.Delay or 35
  1103. local delayInc = data.DelayInc or 0
  1104. local lastLightning;
  1105. local MagZ = (sCF.p - eCF.p).magnitude
  1106. local thick = startThick
  1107. local inc = (startThick/parts)-(endThick/parts)
  1108.  
  1109. for i = 1, parts do
  1110. local pos = sCF.p
  1111. if(lastLightning)then
  1112. pos = lastLightning.CFrame*CF.N(0,0,MagZ/parts/2).p
  1113. end
  1114. delay = delay + delayInc
  1115. local zapPart = Part(Effects,color,Enum.Material.Neon,V3.N(thick,thick,MagZ/parts),CF.N(pos),true,false)
  1116. 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)))
  1117. if(parts == i)then
  1118. local MagZ = (pos-eCF.p).magnitude
  1119. zapPart.Size = V3.N(endThick,endThick,MagZ)
  1120. zapPart.CFrame = CF.N(pos, eCF.p)*CF.N(0,0,-MagZ/2)
  1121. 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)}}
  1122. else
  1123. zapPart.CFrame = CF.N(pos,posie)*CF.N(0,0,MagZ/parts/2)
  1124. end
  1125.  
  1126. lastLightning = zapPart
  1127. Effect{Effect='Fade',Manual=zapPart,Frames=delay}
  1128.  
  1129. thick=thick-inc
  1130.  
  1131. end
  1132. end
  1133.  
  1134. function Zap2(data)
  1135. local Color = data.Color or BrickColor.new'Electric blue'
  1136. local StartPos = data.Start or Torso.Position
  1137. local EndPos = data.End or Mouse.Hit.p
  1138. local SegLength = data.SegL or 2
  1139. local Thicc = data.Thickness or 0.5
  1140. local Fades = data.Fade or 45
  1141. local Parent = data.Parent or Effects
  1142. local MaxD = data.MaxDist or 200
  1143. local Branch = data.Branches or false
  1144. local Material = data.Material or Enum.Material.Neon
  1145. local Raycasts = data.Raycasts or false
  1146. local Offset = data.Offset or {0,360}
  1147. local AddMesh = (data.Mesh == nil and true or data.Mesh)
  1148. if((StartPos-EndPos).magnitude > MaxD)then
  1149. EndPos = CF.N(StartPos,EndPos)*CF.N(0,0,-MaxD).p
  1150. end
  1151. local hit,pos,norm,dist=nil,EndPos,nil,(StartPos-EndPos).magnitude
  1152. if(Raycasts)then
  1153. hit,pos,norm,dist = CastRay(StartPos,EndPos,MaxD)
  1154. end
  1155. local segments = dist/SegLength
  1156. local model = IN("Model",Parent)
  1157. model.Name = 'Lightning'
  1158. local Last;
  1159. for i = 1, segments do
  1160. local size = (segments-i)/25
  1161. local prt = Part(model,Color,Material,V3.N(Thicc+size,SegLength,Thicc+size),CF.N(),true,false)
  1162. if(AddMesh)then IN("CylinderMesh",prt) end
  1163. if(Last and math.floor(segments) == i)then
  1164. local MagZ = (Last.CFrame*CF.N(0,-SegLength/2,0).p-EndPos).magnitude
  1165. prt.Size = V3.N(Thicc+size,MagZ,Thicc+size)
  1166. 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)
  1167. elseif(not Last)then
  1168. prt.CFrame = CF.N(StartPos,pos)*CF.A(M.R(90),0,0)*CF.N(0,-SegLength/2,0)
  1169. else
  1170. 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)
  1171. end
  1172. Last = prt
  1173. if(Branch)then
  1174. local choice = M.RNG(1,7+((segments-i)*2))
  1175. if(choice == 1)then
  1176. local LastB;
  1177. for i2 = 1,M.RNG(2,5) do
  1178. local size2 = ((segments-i)/35)/i2
  1179. local prt = Part(model,Color,Material,V3.N(Thicc+size2,SegLength,Thicc+size2),CF.N(),true,false)
  1180. if(AddMesh)then IN("CylinderMesh",prt) end
  1181. if(not LastB)then
  1182. 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)
  1183. else
  1184. 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)
  1185. end
  1186. LastB = prt
  1187. end
  1188. end
  1189. end
  1190. end
  1191. if(Fades > 0)then
  1192. coroutine.wrap(function()
  1193. for i = 1, Fades do
  1194. for _,v in next, model:children() do
  1195. if(v:IsA'BasePart')then
  1196. v.Transparency = (i/Fades)
  1197. end
  1198. end
  1199. swait()
  1200. end
  1201. model:destroy()
  1202. end)()
  1203. else
  1204. S.Debris:AddItem(model,.01)
  1205. end
  1206. return {End=(Last and Last.CFrame*CF.N(0,-Last.Size.Y/2,0).p),Last=Last,Model=model}
  1207. end
  1208.  
  1209. function Tween(obj,props,time,easing,direction,repeats,backwards)
  1210. local info = TweenInfo.new(time or .5, easing or Enum.EasingStyle.Quad, direction or Enum.EasingDirection.Out, repeats or 0, backwards or false)
  1211. local tween = S.TweenService:Create(obj, info, props)
  1212.  
  1213. tween:Play()
  1214. end
  1215.  
  1216. function Effect(data)
  1217. local Color = data.Color or C3.N(0,0,0)
  1218. local Material = data.Material or Enum.Material.Neon;
  1219. local MeshD = data.Mesh or {};
  1220. local SoundD = data.Sound or nil;
  1221. local Shape = data.Shape or Enum.PartType.Block;
  1222. local Size = data.StartSize or V3.N(.1,.1,.1);
  1223. local ESize = data.EndSize or V3.N(6,6,6);
  1224. local Direction = data.Direction or nil;
  1225. local Speed = data.Speed or .1; -- studs per second
  1226. local Boomerang = data.Boomerang or {Enabled=false,SizeBoomerang=0,MoveBoomerang=0};
  1227. local Pos = data.CFrame or Torso.CFrame;
  1228. local Frames = data.Frames or 60;
  1229. local RotInc = data.RotInc or {0,0,0}
  1230. local StartTrans = data.TransStart or 0;
  1231. local EndTrans = data.TransEnd or 1;
  1232. local KeepOrientation = data.KeepOrien or false;
  1233.  
  1234. if(typeof(RotInc) == 'number')then RotInc = {RotInc,RotInc,RotInc}; end
  1235. local S,PM,P;
  1236.  
  1237. coroutine.wrap(function()
  1238. P = Part(Effects,Color,Material,V3.N(1,1,1),Pos,true,false)
  1239.  
  1240. if(MeshD == "Blast")then
  1241. PM = Mesh(P,Enum.MeshType.FileMesh,'rbxassetid://20329976','',Size,V3.N(0,0,-Size.X/8))
  1242. elseif(MeshD == 'Ring')then
  1243. PM = Mesh(P,Enum.MeshType.FileMesh,'rbxassetid://559831844','',Size,V3.N(0,0,0))
  1244. elseif(MeshD == 'Slash1')then
  1245. PM = Mesh(P,Enum.MeshType.FileMesh,'rbxassetid://662586858','',V3.N(Size.X/10,.001,Size.Z/10),V3.N(0,0,0))
  1246. elseif(MeshD == 'Slash2')then
  1247. PM = Mesh(P,Enum.MeshType.FileMesh,'rbxassetid://448386996','',V3.N(Size.X/1000,Size.Y/100,Size.Z/100),V3.N(0,0,0))
  1248. elseif(MeshD == 'Tornado1')then
  1249. PM = Mesh(P,Enum.MeshType.FileMesh,'rbxassetid://443529437','',Size/10,V3.N(0,0,0))
  1250. elseif(MeshD == 'Tornado2')then
  1251. PM = Mesh(P,Enum.MeshType.FileMesh,'rbxassetid://168892432','',Size/4,V3.N(0,0,0))
  1252. elseif(MeshD == 'Skull')then
  1253. PM = Mesh(P,Enum.MeshType.FileMesh,'rbxassetid://4770583','',Size*2,V3.N(0,0,0))
  1254. elseif(MeshD == 'Crystal')then
  1255. PM = Mesh(P,Enum.MeshType.FileMesh,'rbxassetid://9756362','',Size,V3.N(0,0,0))
  1256. elseif(MeshD == 'Cloud')then
  1257. PM = Mesh(P,Enum.MeshType.FileMesh,'rbxassetid://1095708','',Size,V3.N(0,0,0))
  1258. elseif(typeof(MeshD) == 'table')then
  1259. local Type = MeshD.Type or Enum.MeshType.Brick
  1260. local ID = MeshD.ID or '';
  1261. local Tex = MeshD.Texture or '';
  1262. local Offset = MeshD.Offset or V3.N(0,0,0)
  1263. PM = Mesh(P,Type,ID,Tex,Size,Offset)
  1264. else
  1265. PM = Mesh(P,Enum.MeshType.Brick,'','',Size)
  1266. end
  1267.  
  1268. if(typeof(SoundD) == 'table' and SoundD.ID and SoundD.ID ~= '')then
  1269. local ID = SoundD.ID or '';
  1270. local Pitch = SoundD.Pitch or 1;
  1271. local Volume = SoundD.Volume or 1;
  1272. S = Sound(P,ID,Pitch,Volume,false,true,true)
  1273. elseif(typeof(SoundD) == 'string' or typeof(SoundD) == 'number')then
  1274. S = Sound(P,SoundD,1,1,false,true,true)
  1275. end
  1276. local grow = (Size - ESize)
  1277. local SizeBoomer = 1+Boomerang.SizeBoomerang/50
  1278. local MoveBoomer = 1+Boomerang.MoveBoomerang/50
  1279. if(Boomerang and Boomerang.Enabled)then
  1280. grow = (Size - ESize)*(SizeBoomer+1)
  1281. end
  1282. local TransChange = StartTrans - EndTrans
  1283. for i = 0, Frames do
  1284. local MoveSpeed = -Speed
  1285. local scaleGay = grow/Frames
  1286. if(Boomerang and Boomerang.Enabled)then -- thanks shack
  1287. MoveSpeed = -(Speed)*((1-(i/Frames)*MoveBoomer))
  1288. scaleGay = (V3.N((grow.X)*((1 - (i/Frames)*SizeBoomer)),(grow.Y)*((1 - (i/Frames)*SizeBoomer)),(grow.Z)*((1 - (i/Frames)*SizeBoomer)))*SizeBoomer)/Frames
  1289. end
  1290. PM.Scale = PM.Scale - scaleGay
  1291. if(PM.MeshId == 'rbxassetid://20329976')then
  1292. PM.Offset = V3.N(0,0,-PM.Scale.Z/8)
  1293. elseif(PM.MeshId == 'rbxassetid://4770583')then
  1294. scaleGay = scaleGay*2
  1295. elseif(PM.MeshId == 'rbxassetid://168892432')then
  1296. scaleGay = scaleGay/4
  1297. elseif(PM.MeshId == 'rbxassetid://443529437')then
  1298. scaleGay = scaleGay/10
  1299. elseif(PM.MeshId == 'rbxassetid://443529437')then
  1300. scaleGay = scaleGay/10
  1301. end
  1302. P.Transparency = P.Transparency - TransChange/Frames
  1303. if(RotInc == 'random')then
  1304. P.CFrame=P.CFrame*CF.A(M.RRNG(-180,180),M.RRNG(-180,180),M.RRNG(-180,180))
  1305. elseif(typeof(RotInc) == 'table')then
  1306. P.CFrame=P.CFrame*CF.A(unpack(RotInc))
  1307. end
  1308.  
  1309.  
  1310. if(Direction and Speed)then
  1311. local Orientation = P.Orientation
  1312. P.CFrame = CF.N(P.Position,P.Position+Direction)*CF.N(0,0,MoveSpeed)
  1313. if(KeepOrientation)then P.Orientation = Orientation end
  1314. end
  1315. swait()
  1316. end
  1317.  
  1318. P.Transparency = 1
  1319. if(S and S.Playing)then
  1320. repeat swait() until not S.Parent or not S.Playing
  1321. end
  1322. if(S and S.Parent)then
  1323. S:destroy()
  1324. end
  1325. P:destroy()
  1326. end)()
  1327.  
  1328.  
  1329. end
  1330.  
  1331. function SoulSteal(whom)
  1332. local torso = (whom:FindFirstChild'Head' or whom:FindFirstChild'Torso' or whom:FindFirstChild'UpperTorso' or whom:FindFirstChild'LowerTorso' or whom:FindFirstChild'HumanoidRootPart')
  1333. print(torso)
  1334. if(torso and torso:IsA'BasePart')then
  1335. local Model = Instance.new("Model",Effects)
  1336. Model.Name = whom.Name.."'s Soul"
  1337. whom:BreakJoints()
  1338. local Soul = Part(Model,BrickColor.new'Really red','Glass',V3.N(.5,.5,.5),torso.CFrame,true,false)
  1339. Soul.Name = 'Head'
  1340. NewInstance("Humanoid",Model,{Health=0,MaxHealth=0})
  1341. Effect{
  1342. Effect="Arc",
  1343. Manual = Soul,
  1344. FXSettings={
  1345. Start=torso.CFrame,
  1346. Home = Torso,
  1347. RemoveOnGoal = true,
  1348. }
  1349. }
  1350. local lastPoint = Soul.CFrame.p
  1351.  
  1352. for i = 0, 1, 0.01 do
  1353. local point = CFrame.new(lastPoint, Soul.Position) * CFrame.Angles(-math.pi/2, 0, 0)
  1354. local mag = (lastPoint - Soul.Position).magnitude
  1355. Effect{
  1356. Effect = "Fade",
  1357. CFrame = point * CF.N(0, mag/2, 0),
  1358. Size = V3.N(.5,mag+.5,.5),
  1359. Color = Soul.BrickColor
  1360. }
  1361. lastPoint = Soul.CFrame.p
  1362. swait()
  1363. end
  1364. for i = 1, 5 do
  1365. Effect{
  1366. Effect="Fade",
  1367. Color = BrickColor.new'Really red',
  1368. MoveDirection = (Torso.CFrame*CFrame.new(M.RNG(-40,40),M.RNG(-40,40),M.RNG(-40,40))).p
  1369. }
  1370. end
  1371. end
  1372. end
  1373.  
  1374. --// Other Functions \\ --
  1375.  
  1376. function CastRay(startPos,endPos,range,ignoreList)
  1377. local ray = Ray.new(startPos,(endPos-startPos).unit*range)
  1378. local part,pos,norm = workspace:FindPartOnRayWithIgnoreList(ray,ignoreList or {Char},false,true)
  1379. return part,pos,norm,(pos and (startPos-pos).magnitude)
  1380. end
  1381.  
  1382. function getRegion(point,range,ignore)
  1383. return workspace:FindPartsInRegion3WithIgnoreList(R3.N(point-V3.N(1,1,1)*range/2,point+V3.N(1,1,1)*range/2),ignore,100)
  1384. end
  1385.  
  1386. function clerp(startCF,endCF,alpha)
  1387. return startCF:lerp(endCF, alpha)
  1388. end
  1389.  
  1390. function GetTorso(char)
  1391. return char:FindFirstChild'Torso' or char:FindFirstChild'UpperTorso' or char:FindFirstChild'LowerTorso' or char:FindFirstChild'HumanoidRootPart'
  1392. end
  1393.  
  1394.  
  1395. function ShowDamage(Pos, Text, Time, Color)
  1396. coroutine.wrap(function()
  1397. local Rate = (1 / Frame_Speed)
  1398. local Pos = (Pos or Vector3.new(0, 0, 0))
  1399. local Text = (Text or "")
  1400. local Time = (Time or 2)
  1401. local Color = (Color or Color3.new(1, 0, 1))
  1402. local EffectPart = NewInstance("Part",Effects,{
  1403. Material=Enum.Material.SmoothPlastic,
  1404. Reflectance = 0,
  1405. Transparency = 1,
  1406. BrickColor = BrickColor.new(Color),
  1407. Name = "Effect",
  1408. Size = Vector3.new(0,0,0),
  1409. Anchored = true,
  1410. CFrame = CF.N(Pos)
  1411. })
  1412. local BillboardGui = NewInstance("BillboardGui",EffectPart,{
  1413. Size = UDim2.new(1.25, 0, 1.25, 0),
  1414. Adornee = EffectPart,
  1415. })
  1416. local TextLabel = NewInstance("TextLabel",BillboardGui,{
  1417. BackgroundTransparency = 1,
  1418. Size = UDim2.new(1, 0, 1, 0),
  1419. Text = Text,
  1420. Font = "Bodoni",
  1421. TextColor3 = Color,
  1422. TextStrokeColor3 = Color3.new(0,0,0),
  1423. TextStrokeTransparency=0,
  1424. TextScaled = true,
  1425. })
  1426. S.Debris:AddItem(EffectPart, (Time))
  1427. EffectPart.Parent = workspace
  1428. delay(0, function()
  1429. Tween(EffectPart,{CFrame=CF.N(Pos)*CF.N(0,3,0)},Time,Enum.EasingStyle.Elastic,Enum.EasingDirection.Out)
  1430. local Frames = (Time / Rate)
  1431. for Frame = 1, Frames do
  1432. swait()
  1433. local Percent = (Frame / Frames)
  1434. TextLabel.TextTransparency = Percent
  1435. TextLabel.TextStrokeTransparency = Percent
  1436. end
  1437. if EffectPart and EffectPart.Parent then
  1438. EffectPart:Destroy()
  1439. end
  1440. end) end)()
  1441. end
  1442.  
  1443. function DealDamage(data)
  1444. local Who = data.Who;
  1445. local MinDam = data.MinimumDamage or 15;
  1446. local MaxDam = data.MaximumDamage or 30;
  1447. local MaxHP = data.MaxHP or 1e5;
  1448.  
  1449. local DB = data.Debounce or .2;
  1450.  
  1451. local CritData = data.Crit or {}
  1452. local CritChance = CritData.Chance or 0;
  1453. local CritMultiplier = CritData.Multiplier or 1;
  1454.  
  1455. local DamageEffects = data.DamageFX or {}
  1456. local DamageType = DamageEffects.Type or "Normal"
  1457. local DeathFunction = DamageEffects.DeathFunction
  1458.  
  1459. assert(Who,"Specify someone to damage!")
  1460.  
  1461. local Humanoid = Who:FindFirstChildOfClass'Humanoid'
  1462. local DoneDamage = M.RNG(MinDam,MaxDam) * (M.RNG(1,100) <= CritChance and CritMultiplier or 1)
  1463.  
  1464. local canHit = true
  1465. if(Humanoid)then
  1466. for _, p in pairs(Hit) do
  1467. if p[1] == Humanoid then
  1468. if(time() - p[2] <= DB) then
  1469. canHit = false
  1470. else
  1471. Hit[_] = nil
  1472. end
  1473. end
  1474. end
  1475. if(canHit)then
  1476. table.insert(Hit,{Humanoid,time()})
  1477. local HitTorso = GetTorso(Who)
  1478. local player = S.Players:GetPlayerFromCharacter(Who)
  1479. CamShake(Who,2,150,HitTorso.Position)
  1480. if(not player or player.UserId ~= 5719877 and player.UserId ~= 19081129)then
  1481. if(Humanoid.MaxHealth >= MaxHP and Humanoid.Health > 0)then
  1482. print'Got kill'
  1483. Humanoid.Health = 0;
  1484. Who:BreakJoints();
  1485. if(DeathFunction)then DeathFunction(Who,Humanoid) end
  1486. else
  1487. local c = Instance.new("ObjectValue",Hum)
  1488. c.Name = "creator"
  1489. c.Value = Plrs.oPlayer
  1490. S.Debris:AddItem(c,0.35)
  1491. if(Who:FindFirstChild'Head' and Humanoid.Health > 0)then
  1492. 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))), DoneDamage, 1.5, DamageColor.Color)
  1493. end
  1494. if(Humanoid.Health > 0 and Humanoid.Health-DoneDamage <= 0)then print'Got kill' if(DeathFunction)then DeathFunction(Who,Humanoid) end end
  1495. Humanoid.Health = Humanoid.Health - DoneDamage
  1496.  
  1497. if(DamageType == 'Knockback' and HitTorso)then
  1498. local up = DamageEffects.KnockUp or 25
  1499. local back = DamageEffects.KnockBack or 25
  1500. local origin = DamageEffects.Origin or Root
  1501. local decay = DamageEffects.Decay or .5;
  1502.  
  1503. local bfos = Instance.new("BodyVelocity",HitTorso)
  1504. bfos.P = 20000
  1505. bfos.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
  1506. bfos.Velocity = Vector3.new(0,up,0) + (origin.CFrame.lookVector * back)
  1507. S.Debris:AddItem(bfos,decay)
  1508. elseif(DamageType == 'StunKnock' and HitTorso)then
  1509. local up = DamageEffects.KnockUp or 25
  1510. local back = DamageEffects.KnockBack or 25
  1511. local origin = DamageEffects.Origin or Root
  1512. local decay = DamageEffects.Decay or .5;
  1513. local lookVector = origin;
  1514. if(typeof(origin) == 'Instance')then
  1515. lookVector = origin.CFrame.lookVector
  1516. elseif(typeof(origin) == 'CFrame')then
  1517. lookVector = origin.lookVector
  1518. end
  1519. local bfos = Instance.new("BodyVelocity",HitTorso)
  1520. bfos.P = 20000
  1521. bfos.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
  1522. bfos.Velocity = Vector3.new(0,up,0) + (lookVector * back)
  1523. S.Debris:AddItem(bfos,decay)
  1524. if(not Stunned[Who] and player)then
  1525. local stunScr=FXFolder:FindFirstChild'Stunner' and FXFolder:FindFirstChild'Stunner':Clone()
  1526. local t = {0,M.RNG(time()+3,time()+5),nil}
  1527. if(stunScr)then
  1528. stunScr.Disabled=false
  1529. stunScr.Parent=Who
  1530. local stunEmit = FXFolder:FindFirstChild'AttEffects' and FXFolder.AttEffects:FindFirstChild'Stun'
  1531. local hed = Who:FindFirstChild'Head'
  1532. if(stunEmit)then
  1533. local e = stunEmit:Clone()
  1534. e.Name='StunEmitter'
  1535. e.Parent=hed
  1536. t[3]=e
  1537. end
  1538. end
  1539. Stunned[Who] = t
  1540. end
  1541. elseif(DamageType == 'Stun' and HitTorso and not Stunned[Who] and player)then
  1542. local stunScr=FXFolder:FindFirstChild'Stunner' and FXFolder:FindFirstChild'Stunner':Clone()
  1543. local t = {0,M.RNG(time()+3,time()+5),nil}
  1544. if(stunScr)then
  1545. stunScr.Disabled=false
  1546. stunScr.Parent=Who
  1547. local stunEmit = FXFolder:FindFirstChild'AttEffects' and FXFolder.AttEffects:FindFirstChild'Stun'
  1548. local hed = Who:FindFirstChild'Head'
  1549. if(stunEmit)then
  1550. local e = stunEmit:Clone()
  1551. e.Name='StunEmitter'
  1552. e.Parent=hed
  1553. t[3]=e
  1554. end
  1555. end
  1556. Stunned[Who] = t
  1557. end
  1558. end
  1559. end
  1560. end
  1561. end
  1562. end
  1563.  
  1564. function AOEDamage(where,range,options)
  1565. local hit = {}
  1566. for _,v in next, getRegion(where,range,{Char}) do
  1567. if(v.Parent and v.Parent:FindFirstChildOfClass'Humanoid' and not hit[v.Parent])then
  1568. local callTable = {Who=v.Parent}
  1569. hit[v.Parent] = true
  1570. for _,v in next, options do callTable[_] = v end
  1571. DealDamage(callTable)
  1572. end
  1573. end
  1574. return hit
  1575. end
  1576.  
  1577. function AOEHeal(where,range,amount)
  1578. local healed = {}
  1579. for _,v in next, getRegion(where,range,{Char}) do
  1580. local hum = (v.Parent and v.Parent:FindFirstChildOfClass'Humanoid' or nil)
  1581. if(hum and not healed[hum])then
  1582. hum.Health = hum.Health + amount
  1583. if(v.Parent:FindFirstChild'Head' and hum.Health > 0)then
  1584. 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)
  1585. end
  1586. end
  1587. end
  1588. end
  1589.  
  1590.  
  1591. function Stomp()
  1592. Attack = true
  1593. NeutralAnims = false
  1594. WalkSpeed = 0
  1595. for i = 0,3,.1 do
  1596. local Alpha = .1
  1597. RJ.C0 = RJ.C0:lerp(RJC0*CF.N(0,0,0)*CF.A(M.R(5),0,0),Alpha)
  1598. NK.C0 = NK.C0:lerp(NKC0,Alpha)
  1599. LS.C0 = LS.C0:lerp(LSC0*CF.N(0,.3,0)*CF.A(M.R(45),0,M.R(-15)),Alpha)
  1600. RS.C0 = RS.C0:lerp(RSC0*CF.N(0,.3,0)*CF.A(M.R(45),0,M.R(15)),Alpha)
  1601. LH.C0 = LH.C0:lerp(LHC0*CF.N(0,1.5,-1)*CF.A(M.R(-5),0,0),Alpha)
  1602. RH.C0 = RH.C0:lerp(RHC0*CF.A(M.R(-5),0,0),Alpha)
  1603. swait()
  1604. end
  1605. local h,p,n = workspace:FindPartOnRay(Ray.new(Root.CFrame.p,((CFrame.new(Root.Position,Root.Position - Vector3.new(0,1,0))).lookVector).unit * (4*PlayerSize)), Char)
  1606. if(h)then
  1607. Sound(LLeg,741272936,.7,3,false,true,true)
  1608. --AOEDamage(p,50,{MinDam=15;MaxDam=30;DamageFX={Type='Stun'}})
  1609. AOEDamage(p,50,{MinDam=15;MaxDam=30;DamageFX={Type='StunKnock',KnockUp=30,KnockBack=15,Origin=Root}})
  1610. CamShakeAll(30,250,p)
  1611. Effect{
  1612. Color=C3.N(0,0,0),
  1613. Material=Enum.Material.Plastic,
  1614. Mesh='Ring',
  1615. StartSize=V3.N(.1,.1,.1),
  1616. EndSize=V3.N(3,3,1),
  1617. Frames=60;
  1618. Boomerang={Enabled=true,SizeBoomerang=30,MoveBoomerang=0};
  1619. CFrame=CF.N(p,p+n)
  1620. }
  1621. Effect{
  1622. Color=C3.N(0,0,0),
  1623. Material=Enum.Material.Plastic,
  1624. Mesh='Blast',
  1625. StartSize=V3.N(.1,.1,.1),
  1626. EndSize=V3.N(50,30,50),
  1627. Frames=60;
  1628. Boomerang={Enabled=true,SizeBoomerang=45,MoveBoomerang=0};
  1629. CFrame=CF.N(p,p+n)*CF.A(M.R(-90),0,0);
  1630. RotInc={0,.1,0};
  1631. }
  1632. Effect{
  1633. Color=C3.N(0,0,0),
  1634. Material=Enum.Material.Plastic,
  1635. Mesh='Blast',
  1636. StartSize=V3.N(.1,.1,.1),
  1637. EndSize=V3.N(40,30,40),
  1638. Frames=60;
  1639. Boomerang={Enabled=true,SizeBoomerang=45,MoveBoomerang=0};
  1640. CFrame=CF.N(p,p+n)*CF.A(M.R(-90),0,0);
  1641. RotInc={0,-.1,0};
  1642. }
  1643. end
  1644. for i = 0,3,.1 do
  1645. local Alpha = .4
  1646. RJ.C0 = RJ.C0:lerp(RJC0*CF.N(0,-.1,0)*CF.A(M.R(-5),0,0),Alpha)
  1647. NK.C0 = NK.C0:lerp(NKC0,Alpha)
  1648. LS.C0 = LS.C0:lerp(LSC0*CF.A(M.R(-5),0,M.R(-5)),Alpha)
  1649. RS.C0 = RS.C0:lerp(RSC0*CF.A(M.R(-5),0,M.R(5)),Alpha)
  1650. LH.C0 = LH.C0:lerp(LHC0*CF.N(0,.1,-1)*CF.A(M.R(5),0,0),Alpha)
  1651. RH.C0 = RH.C0:lerp(RHC0,Alpha)
  1652. swait()
  1653. end
  1654. WalkSpeed = 8
  1655. Attack = false
  1656. NeutralAnims = true
  1657. end
  1658.  
  1659. function VoidSpikes()
  1660. local atteffects = FXFolder:FindFirstChild'AttEffects'
  1661. if(not atteffects)then return end
  1662. local vm =atteffects:FindFirstChild'VoidMagic'
  1663. if(not vm)then return end
  1664. Attack=true
  1665. NeutralAnims=false
  1666. WalkSpeed = 0
  1667. local vm1 = vm:Clone();
  1668. local vm2 = vm:Clone();
  1669. vm1.Parent = LArm;
  1670. vm2.Parent = RArm;
  1671. for i = 0,4,.1 do
  1672. local Alpha = .15
  1673. RJ.C0 = RJ.C0:lerp(RJC0*CF.A(M.R(-15),0,0),Alpha)
  1674. NK.C0 = NK.C0:lerp(NKC0,Alpha)
  1675. LS.C0 = LS.C0:lerp(LSC0*CF.A(0,M.R(-50),M.R(-90)),Alpha)
  1676. RS.C0 = RS.C0:lerp(RSC0*CF.A(0,M.R(50),M.R(90)),Alpha)
  1677. LH.C0 = LH.C0:lerp(LHC0*CF.N(0,0,-.5)*CF.A(M.R(15),0,0),Alpha)
  1678. RH.C0 = RH.C0:lerp(RHC0,Alpha)
  1679. swait()
  1680. end
  1681. local cr = FXFolder:FindFirstChild'VoidCrystal':Clone();
  1682. coroutine.wrap(function()
  1683. local oPoint=Root.CFrame
  1684. for i = 1, 5 do
  1685. local pos = oPoint*CF.N(0,0,-i*3)
  1686. local h,p,n = workspace:FindPartOnRay(Ray.new(pos.p,((CFrame.new(pos.p,pos.p - Vector3.new(0,1,0))).lookVector).unit * 8), Char)
  1687. CamShakeAll(5,250,p)
  1688. AOEDamage(p,5,{MinDam=5;MaxDam=20;DamageFX={Type='StunKnock',KnockUp=25,KnockBack=0,Origin=CF.N(p,p+n)}})
  1689. local curc = cr:Clone();
  1690. curc.CFrame = CF.N(0,-5,0)*CF.N(p,p+n)*CF.A(M.R(-90),0,0)
  1691. curc.Parent = Char;
  1692. Sound(curc,338594467,M.RNG(95,105)/100,4,false,true,true)
  1693. local pp = Part(curc,C3.N(0,0,0),Enum.Material.SmoothPlastic,V3.N(.05,.05,.05),CF.N(p,p+n)*CF.A(M.R(-90),0,0),true,false)
  1694. local h = atteffects:FindFirstChild'VoidExplode2' and atteffects.VoidExplode2:Clone()
  1695. if(h)then
  1696. h.Parent=pp
  1697. h.Nebulea1:Emit(150)
  1698. h.Nebulea2:Emit(150)
  1699. end
  1700. coroutine.wrap(function()
  1701. for i = -5, i/2,.5 do
  1702. curc.CFrame = curc.CFrame*CF.N(0,.5,0)
  1703. swait()
  1704. end
  1705. end)()
  1706.  
  1707. delay(3,function()
  1708. Sound(curc,338594524,M.RNG(95,105)/100,4,false,true,true)
  1709. for _,v in next, curc:children() do
  1710. if(v:IsA'ParticleEmitter')then
  1711. v.Enabled=false
  1712. end
  1713. end
  1714. for i = i/2,-5-i,-.5 do
  1715. curc.CFrame = curc.CFrame*CF.N(0,-.5,0)
  1716. swait()
  1717. end
  1718. curc:destroy()
  1719. end)
  1720.  
  1721. swait(6)
  1722. end
  1723. end)()
  1724. for i = 0,1,.1 do
  1725. local Alpha = .3
  1726. RJ.C0 = RJ.C0:lerp(RJC0*CF.N(0,-1.9,0)*CF.A(M.R(-75),0,0),Alpha)
  1727. NK.C0 = NK.C0:lerp(NKC0,Alpha)
  1728. LS.C0 = LS.C0:lerp(LSC0*CF.N(0,0,-.25)*CF.A(0,M.R(-90),M.R(-90)),Alpha)
  1729. RS.C0 = RS.C0:lerp(RSC0*CF.N(0,0,-.25)*CF.A(0,M.R(90),M.R(90)),Alpha)
  1730. LH.C0 = LH.C0:lerp(LHC0*CF.N(0,1.5,-.5)*CF.A(M.R(75),0,0),Alpha)
  1731. RH.C0 = RH.C0:lerp(RHC0*CF.A(M.R(35),0,0),Alpha)
  1732. swait()
  1733. end
  1734.  
  1735. vm1.Nebulea1.Enabled=false
  1736. vm1.Nebulea2.Enabled=false
  1737. vm2.Nebulea1.Enabled=false
  1738. vm2.Nebulea2.Enabled=false
  1739. delay(1,function()
  1740. vm1:destroy()
  1741. vm2:destroy()
  1742. end)
  1743. WalkSpeed=8
  1744. Attack = false
  1745. NeutralAnims = true
  1746.  
  1747. end
  1748. --// Wrap it all up \\--
  1749.  
  1750. Mouse.KeyDown:connect(function(k)
  1751. if(Attack)then return end
  1752. if(k == 'z')then
  1753. Stomp()
  1754. elseif(k == 'x')then
  1755. VoidSpikes()
  1756. end
  1757. end)
  1758.  
  1759. coroutine.resume(coroutine.create(function() -- Stun Damge Loop
  1760. while true do
  1761. swait()
  1762. for who,data in next, Stunned do
  1763. local lastBurn, burnMaxTime, emitter = unpack(data)
  1764. if(time()-lastBurn >= .5)then
  1765. data[1] = time()
  1766. for _,v in next, who:children() do if(v.Name == 'Health' and v:IsA'Script')then v.Disabled = true end end
  1767. local hum = who:FindFirstChildOfClass'Humanoid'
  1768. local tors = GetTorso(who)
  1769. if(time() >= burnMaxTime or hum and hum.Health <= 0)then
  1770. local f=Instance.new("BoolValue")
  1771. f.Name = 'ResumeControl'
  1772. f.Parent = who
  1773. S.Debris:AddItem(f,3)
  1774. if(emitter)then
  1775. emitter:destroy()
  1776. end
  1777. Stunned[who] = nil;
  1778. for _,v in next, who:children() do if(v.Name == 'Health' and v:IsA'Script')then v.Disabled = false end end
  1779. end
  1780. end
  1781. end
  1782. end
  1783. end))
  1784.  
  1785. Hum.MaxHealth = 450000
  1786. swait()
  1787. Hum.Health = 450000
  1788.  
  1789. while true do
  1790. swait()
  1791. Sine = Sine + Change
  1792. if(not Music or not Music.Parent)then
  1793. local tp = (Music and Music.TimePosition)
  1794. Music = Sound(Char,MusicID,1,10,true,false,true)
  1795. Music.Name = 'Music'
  1796. Music.TimePosition = tp
  1797. end
  1798. Music.SoundId = "rbxassetid://"..MusicID
  1799. Music.Parent = Torso
  1800. Music.Pitch = .8
  1801. Music.Volume = 3
  1802. if(not Muted)then
  1803. Music:Resume()
  1804. else
  1805. Music:Pause()
  1806. end
  1807.  
  1808.  
  1809. if(God)then
  1810. Hum.MaxHealth = 1e100
  1811. Hum.Health = 1e100
  1812. if(not Char:FindFirstChildOfClass'ForceField')then IN("ForceField",Char).Visible = false end
  1813. Hum.Name = M.RNG()*100
  1814. end
  1815.  
  1816. Hum.MaxHealth = 450000
  1817.  
  1818. 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)
  1819.  
  1820. local Walking = (math.abs(Root.Velocity.x) > 1 or math.abs(Root.Velocity.z) > 1)
  1821. 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 < 24 and "Walk" or "Run") or hitfloor and "Idle")
  1822. if(not Effects or not Effects.Parent)then
  1823. Effects = IN("Model",Char)
  1824. Effects.Name = "Effects"
  1825. end
  1826. if(State == 'Run')then
  1827. local wsVal = 7 / (Hum.WalkSpeed/16)
  1828. local Alpha = math.min(.2 * (Hum.WalkSpeed/16),1)
  1829. Change = 1
  1830. RH.C1 = RH.C1:lerp(CF.N(0,1*PlayerSize-.1*M.C(Sine/wsVal),0+.2*M.C(Sine/wsVal))*CF.A(M.R(8-0*M.C(Sine/wsVal))+-M.S(Sine/wsVal)/1.5,0,0),.2)
  1831. LH.C1 = LH.C1:lerp(CF.N(0,1*PlayerSize+.1*M.C(Sine/wsVal),0-.2*M.C(Sine/wsVal))*CF.A(M.R(8+0*M.C(Sine/wsVal))+M.S(Sine/wsVal)/1.5,0,0),.2)
  1832. elseif(State == 'Walk')then
  1833. local wsVal = 12 / (Hum.WalkSpeed/10)
  1834. local Alpha = math.min(.2 * (Hum.WalkSpeed/16),1)
  1835. Change = 1
  1836. LH.C1 = LH.C1:lerp(CF.N(0,1*PlayerSize+.4*M.C(Sine/wsVal),-.3*M.C(Sine/wsVal))*CF.A(M.R(6-0*M.C(Sine/wsVal))+M.S(Sine/wsVal)/2.5,0,0),Alpha)
  1837. RH.C1 = RH.C1:lerp(CF.N(0,1*PlayerSize-.4*M.C(Sine/wsVal),.3*M.C(Sine/wsVal))*CF.A(M.R(6+0*M.C(Sine/wsVal))+-M.S(Sine/wsVal)/2.5,0,0),Alpha)
  1838. else
  1839. RH.C1 = RH.C1:lerp(CF.N(0,1*PlayerSize,0),.2)
  1840. LH.C1 = LH.C1:lerp(CF.N(0,1*PlayerSize,0),.2)
  1841. end
  1842. Hum.WalkSpeed = WalkSpeed
  1843. if(Remove_Hats)then Instance.ClearChildrenOfClass(Char,"Accessory",true) end
  1844. if(Remove_Clothing)then Instance.ClearChildrenOfClass(Char,"Clothing",true) Instance.ClearChildrenOfClass(Char,"ShirtGraphic",true) end
  1845.  
  1846. if(NeutralAnims)then
  1847. if(State == 'Idle')then
  1848. local Alpha = .1
  1849. Change = 1
  1850. RJ.C0 = RJ.C0:lerp(RJC0*CF.N(0,-.1+.2*M.C(Sine/48),0)*CF.A(M.R(0-2*M.S(Sine/48)),0,M.R(0+2.5*M.C(Sine/48))),Alpha)
  1851. NK.C0 = NK.C0:lerp(NKC0*CF.A(M.R(-5+5*M.C(Sine/48)),0,M.R(-10*M.S(Sine/48))),Alpha)
  1852. LS.C0 = LS.C0:lerp(LSC0*CF.A(0,0,M.R(-5+5*-M.C(Sine/48))),Alpha)
  1853. RS.C0 = RS.C0:lerp(RSC0*CF.A(0,0,M.R(5-5*-M.C(Sine/48))),Alpha)
  1854. LH.C0 = LH.C0:lerp(LHC0*CF.N(0,.1-.2*M.C(Sine/48),0)*CF.A(M.R(0+2*M.S(Sine/48)),0,M.R(-5)+M.R(0-2.5*M.C(Sine/48))),Alpha)
  1855. RH.C0 = RH.C0:lerp(RHC0*CF.N(0,.1-.2*M.C(Sine/48),0)*CF.A(M.R(0+2*M.S(Sine/48)),0,M.R(5)+M.R(0-2.5*M.C(Sine/48))),Alpha)
  1856. -- idle
  1857. elseif(State == 'Run')then
  1858. local wsVal = 7 / (Hum.WalkSpeed/16)
  1859. local Alpha = math.min(.2 * (Hum.WalkSpeed/16),1)
  1860. 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)
  1861. NK.C0 = NK.C0:lerp(NKC0,Alpha)
  1862. 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)
  1863. 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)
  1864. 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)
  1865. 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)
  1866. elseif(State == 'Walk')then
  1867. local wsVal = 12 / (Hum.WalkSpeed/10)
  1868. local Alpha = math.min(.2 * (Hum.WalkSpeed/8),1)
  1869. RJ.C0 = RJ.C0:lerp(CF.N(0,-.075+.1*M.C(Sine/(wsVal/2)+-M.S(Sine/(wsVal/2))/7),0)*CF.A(M.R(-9-2.5*M.C(Sine/(wsVal/2))),M.R(-5*M.C(Sine/wsVal)),Root.RotVelocity.y/75),Alpha)
  1870. NK.C0 = NK.C0:lerp(NKC0*CF.A(0,-Head.RotVelocity.y/75,0),Alpha)
  1871. LS.C0 = LS.C0:lerp(LSC0*CF.N(0,0,-.2*M.C(Sine/wsVal))*CF.A(M.R(25*M.C(Sine/wsVal)),0,M.R(-5)+LArm.RotVelocity.y/75),Alpha)
  1872. RS.C0 = RS.C0:lerp(RSC0*CF.N(0,0,.2*M.C(Sine/wsVal))*CF.A(M.R(-25*M.C(Sine/wsVal)),0,M.R(5)-RArm.RotVelocity.y/75),Alpha)
  1873. LH.C0 = LH.C0:lerp(LHC0*CF.N(0,0-.1*M.C(Sine/(wsVal/2)),0)*CF.A(0,M.R(5*M.C(Sine/wsVal)),0),Alpha)
  1874. RH.C0 = RH.C0:lerp(RHC0*CF.N(0,0-.1*M.C(Sine/(wsVal/2)),0)*CF.A(0,M.R(5*M.C(Sine/wsVal)),0),Alpha)
  1875. elseif(State == 'Jump')then
  1876. local Alpha = .1
  1877. local idk = math.min(math.max(Root.Velocity.Y/50,-M.R(90)),M.R(90))
  1878. LS.C0 = LS.C0:lerp(LSC0*CF.A(M.R(-5),0,M.R(-90)),Alpha)
  1879. RS.C0 = RS.C0:lerp(RSC0*CF.A(M.R(-5),0,M.R(90)),Alpha)
  1880. 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)
  1881. 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)
  1882. LH.C0 = LH.C0:lerp(LHC0*CF.A(0,0,M.R(-5)),Alpha)
  1883. RH.C0 = RH.C0:lerp(RHC0*CF.N(0,1,-1)*CF.A(M.R(-5),0,M.R(5)),Alpha)
  1884. elseif(State == 'Fall')then
  1885. local Alpha = .1
  1886. local idk = math.min(math.max(Root.Velocity.Y/50,-M.R(90)),M.R(90))
  1887. LS.C0 = LS.C0:lerp(LSC0*CF.A(M.R(-5),0,M.R(-90)+idk),Alpha)
  1888. RS.C0 = RS.C0:lerp(RSC0*CF.A(M.R(-5),0,M.R(90)-idk),Alpha)
  1889. 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)
  1890. 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)
  1891. LH.C0 = LH.C0:lerp(LHC0*CF.A(0,0,M.R(-5)),Alpha)
  1892. RH.C0 = RH.C0:lerp(RHC0*CF.N(0,1,-1)*CF.A(M.R(-5),0,M.R(5)),Alpha)
  1893. elseif(State == 'Paralyzed')then
  1894. -- paralyzed
  1895. elseif(State == 'Sit')then
  1896. -- sit
  1897. end
  1898. end
  1899.  
  1900. for i,v in next, BloodPuddles do
  1901. local mesh = i:FindFirstChild'CylinderMesh'
  1902. BloodPuddles[i] = v + 1
  1903. if(not mesh or i.Transparency >= 1)then
  1904. i:destroy()
  1905. BloodPuddles[i] = nil
  1906. elseif(v >= Frame_Speed*4)then
  1907. local trans = (v-Frame_Speed*4)/(Frame_Speed*2)
  1908. i.Transparency = trans
  1909. if(mesh.Scale.Z > 0)then
  1910. mesh.Scale = mesh.Scale-V3.N(.05,0,.05)
  1911. end
  1912. else
  1913. i.Transparency = 0
  1914. end
  1915. end
  1916.  
  1917. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement