scriptshocasereditor

Untitled

Aug 10th, 2018
143
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 43.54 KB | None | 0 0
  1. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  2. local Player,Mouse,mouse,UserInputService,ContextActionService = owner
  3. do
  4. print("FE Compatibility code by Mokiros")
  5. script.Parent = Player.Character
  6.  
  7. --RemoteEvent for communicating
  8. local Event = Instance.new("RemoteEvent")
  9. Event.Name = "UserInput_Event"
  10.  
  11. --Fake event to make stuff like Mouse.KeyDown work
  12. local function fakeEvent()
  13. local t = {_fakeEvent=true,Connect=function(self,f)self.Function=f end}
  14. t.connect = t.Connect
  15. return t
  16. end
  17.  
  18. --Creating fake input objects with fake variables
  19. local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
  20. local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  21. local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
  22. CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
  23. end}
  24. --Merged 2 functions into one by checking amount of arguments
  25. CAS.UnbindAction = CAS.BindAction
  26.  
  27. --This function will trigger the events that have been :Connect()'ed
  28. local function te(self,ev,...)
  29. local t = m[ev]
  30. if t and t._fakeEvent and t.Function then
  31. t.Function(...)
  32. end
  33. end
  34. m.TrigEvent = te
  35. UIS.TrigEvent = te
  36.  
  37. Event.OnServerEvent:Connect(function(plr,io)
  38. if plr~=Player then return end
  39. if io.isMouse then
  40. m.Target = io.Target
  41. m.Hit = io.Hit
  42. else
  43. local b = io.UserInputState == Enum.UserInputState.Begin
  44. if io.UserInputType == Enum.UserInputType.MouseButton1 then
  45. return m:TrigEvent(b and "Button1Down" or "Button1Up")
  46. end
  47. for _,t in pairs(CAS.Actions) do
  48. for _,k in pairs(t.Keys) do
  49. if k==io.KeyCode then
  50. t.Function(t.Name,io.UserInputState,io)
  51. end
  52. end
  53. end
  54. m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
  55. UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
  56. end
  57. end)
  58. Event.Parent = NLS([==[
  59. local Player = game:GetService("Players").LocalPlayer
  60. local Event = script:WaitForChild("UserInput_Event")
  61.  
  62. local UIS = game:GetService("UserInputService")
  63. local input = function(io,a)
  64. if a then return end
  65. --Since InputObject is a client-side instance, we create and pass table instead
  66. Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState})
  67. end
  68. UIS.InputBegan:Connect(input)
  69. UIS.InputEnded:Connect(input)
  70.  
  71. local Mouse = Player:GetMouse()
  72. local h,t
  73. --Give the server mouse data 30 times every second, but only if the values changed
  74. --If player is not moving their mouse, client won't fire events
  75. while wait(1/30) do
  76. if h~=Mouse.Hit or t~=Mouse.Target then
  77. h,t=Mouse.Hit,Mouse.Target
  78. Event:FireServer({isMouse=true,Target=t,Hit=h})
  79. end
  80. end]==],Player.Character)
  81. Mouse,mouse,UserInputService,ContextActionService = m,m,UIS,CAS
  82. end
  83.  
  84.  
  85. -- Created by Nebula_Zorua --
  86. -- Boreldi --
  87. -- I was bored --
  88. -- Discord: Nebula the Zorua#6969
  89. -- Youtube: https://www.youtube.com/channel/UCo9oU9dCw8jnuVLuy4_SATA
  90.  
  91. wait(1/60)
  92.  
  93. --// Shortcut Variables \\--
  94. local S = setmetatable({},{__index = function(s,i) return game:service(i) end})
  95. local CF = {N=CFrame.new,A=CFrame.Angles,fEA=CFrame.fromEulerAnglesXYZ}
  96. local C3 = {N=Color3.new,RGB=Color3.fromRGB,HSV=Color3.fromHSV,tHSV=Color3.toHSV}
  97. local V3 = {N=Vector3.new,FNI=Vector3.FromNormalId,A=Vector3.FromAxis}
  98. 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}
  99. local R3 = {N=Region3.new}
  100. local De = S.Debris
  101. local WS = workspace
  102. local Lght = S.Lighting
  103. local RepS = S.ReplicatedStorage
  104. local IN = Instance.new
  105. local Plrs = S.Players
  106.  
  107. --// Initializing \\--
  108. local Plr = owner
  109. local Char = owner
  110. local Hum = Char:FindFirstChildOfClass'Humanoid'
  111. local RArm = Char["Right Arm"]
  112. local LArm = Char["Left Arm"]
  113. local RLeg = Char["Right Leg"]
  114. local LLeg = Char["Left Leg"]
  115. local Root = Char:FindFirstChild'HumanoidRootPart'
  116. local Torso = Char.Torso
  117. local Head = Char.Head
  118. local NeutralAnims = true
  119. local Attack = false
  120. local Debounces = {Debounces={}}
  121. local Hit = {}
  122. local Sine = 0
  123. local Change = 1
  124. local BloodPuddles = {}
  125.  
  126. local Effects = IN("Folder",Char)
  127. Effects.Name = "Effects"
  128.  
  129.  
  130. --// Debounce System \\--
  131.  
  132.  
  133. function Debounces:New(name,cooldown)
  134. local aaaaa = {Usable=true,Cooldown=cooldown or 2,CoolingDown=false,LastUse=0}
  135. setmetatable(aaaaa,{__index = Debounces})
  136. Debounces.Debounces[name] = aaaaa
  137. return aaaaa
  138. end
  139.  
  140. function Debounces:Use(overrideUsable)
  141. assert(self.Usable ~= nil and self.LastUse ~= nil and self.CoolingDown ~= nil,"Expected ':' not '.' calling member function Use")
  142. if(self.Usable or overrideUsable)then
  143. self.Usable = false
  144. self.CoolingDown = true
  145. local LastUse = time()
  146. self.LastUse = LastUse
  147. delay(self.Cooldown or 2,function()
  148. if(self.LastUse == LastUse)then
  149. self.CoolingDown = false
  150. self.Usable = true
  151. end
  152. end)
  153. end
  154. end
  155.  
  156. function Debounces:Get(name)
  157. assert(typeof(name) == 'string',("bad argument #1 to 'get' (string expected, got %s)"):format(typeof(name) == nil and "no value" or typeof(name)))
  158. for i,v in next, Debounces.Debounces do
  159. if(i == name)then
  160. return v;
  161. end
  162. end
  163. end
  164.  
  165. function Debounces:GetProgressPercentage()
  166. assert(self.Usable ~= nil and self.LastUse ~= nil and self.CoolingDown ~= nil,"Expected ':' not '.' calling member function Use")
  167. if(self.CoolingDown and not self.Usable)then
  168. return math.max(
  169. math.floor(
  170. (
  171. (time()-self.LastUse)/self.Cooldown or 2
  172. )*100
  173. )
  174. )
  175. else
  176. return 100
  177. end
  178. end
  179.  
  180. --// Instance Creation Functions \\--
  181. local baseSound = IN("Sound")
  182. function Sound(parent,id,pitch,volume,looped,effect,autoPlay)
  183. local Sound = baseSound:Clone()
  184. Sound.SoundId = "rbxassetid://".. tostring(id or 0)
  185. Sound.Pitch = pitch or 1
  186. Sound.Volume = volume or 1
  187. Sound.Looped = looped or false
  188. if(autoPlay)then
  189. coroutine.wrap(function()
  190. repeat wait() until Sound.IsLoaded
  191. Sound.Playing = autoPlay or false
  192. end)()
  193. end
  194. if(not looped and effect)then
  195. Sound.Stopped:connect(function()
  196. Sound.Volume = 0
  197. Sound:destroy()
  198. end)
  199. elseif(effect)then
  200. warn("Sound can't be looped and a sound effect!")
  201. end
  202. Sound.Parent =parent or Torso
  203. return Sound
  204. end
  205. function Part(parent,color,material,size,cframe,anchored,cancollide)
  206. local part = IN("Part")
  207. part.Parent = parent or Char
  208. part[typeof(color) == 'BrickColor' and 'BrickColor' or 'Color'] = color or C3.N(0,0,0)
  209. part.Material = material or Enum.Material.SmoothPlastic
  210. part.TopSurface,part.BottomSurface=10,10
  211. part.Size = size or V3.N(1,1,1)
  212. part.CFrame = cframe or CF.N(0,0,0)
  213. part.CanCollide = cancollide or false
  214. part.Anchored = anchored or false
  215. return part
  216. end
  217.  
  218. function Weld(part0,part1,c0,c1)
  219. local weld = IN("Weld")
  220. weld.Parent = part0
  221. weld.Part0 = part0
  222. weld.Part1 = part1
  223. weld.C0 = c0 or CF.N()
  224. weld.C1 = c1 or CF.N()
  225. return weld
  226. end
  227.  
  228. function Mesh(parent,meshtype,meshid,textid,scale,offset)
  229. local part = IN("SpecialMesh")
  230. part.MeshId = meshid or ""
  231. part.TextureId = textid or ""
  232. part.Scale = scale or V3.N(1,1,1)
  233. part.Offset = offset or V3.N(0,0,0)
  234. part.MeshType = meshtype or Enum.MeshType.Sphere
  235. part.Parent = parent
  236. return part
  237. end
  238.  
  239. NewInstance = function(instance,parent,properties)
  240. local inst = Instance.new(instance)
  241. inst.Parent = parent
  242. if(properties)then
  243. for i,v in next, properties do
  244. pcall(function() inst[i] = v end)
  245. end
  246. end
  247. return inst;
  248. end
  249.  
  250. function Clone(instance,parent,properties)
  251. local inst = instance:Clone()
  252. inst.Parent = parent
  253. if(properties)then
  254. for i,v in next, properties do
  255. pcall(function() inst[i] = v end)
  256. end
  257. end
  258. return inst;
  259. end
  260.  
  261. function SoundPart(id,pitch,volume,looped,effect,autoPlay,cf)
  262. local soundPart = NewInstance("Part",Effects,{Transparency=1,CFrame=cf or Torso.CFrame,Anchored=true,CanCollide=false,Size=V3.N()})
  263. local Sound = IN("Sound")
  264. Sound.SoundId = "rbxassetid://".. tostring(id or 0)
  265. Sound.Pitch = pitch or 1
  266. Sound.Volume = volume or 1
  267. Sound.Looped = looped or false
  268. if(autoPlay)then
  269. coroutine.wrap(function()
  270. repeat wait() until Sound.IsLoaded
  271. Sound.Playing = autoPlay or false
  272. end)()
  273. end
  274. if(not looped and effect)then
  275. Sound.Stopped:connect(function()
  276. Sound.Volume = 0
  277. soundPart:destroy()
  278. end)
  279. elseif(effect)then
  280. warn("Sound can't be looped and a sound effect!")
  281. end
  282. Sound.Parent = soundPart
  283. return Sound
  284. end
  285.  
  286.  
  287. --// Extended ROBLOX tables \\--
  288. 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})
  289. --// Require stuff \\--
  290. function CamShake(who,times,intense,origin)
  291. coroutine.wrap(function()
  292. if(script:FindFirstChild'CamShake')then
  293. local cam = script.CamShake:Clone()
  294. cam:WaitForChild'intensity'.Value = intense
  295. cam:WaitForChild'times'.Value = times
  296.  
  297. if(origin)then NewInstance((typeof(origin) == 'Instance' and "ObjectValue" or typeof(origin) == 'Vector3' and 'Vector3Value'),cam,{Name='origin',Value=origin}) end
  298. cam.Parent = who
  299. wait()
  300. cam.Disabled = false
  301. elseif(who == Plr or who == Char or who:IsDescendantOf(Plr))then
  302. local intensity = intense
  303. if(Hum and not Hum:FindFirstChild'CamShaking')then
  304. local cam = workspace.CurrentCamera
  305. local oCO = Hum.CameraOffset
  306. local cs = Instance.new("BoolValue",Hum)
  307. cs.Name = "CamShaking"
  308. for i = 1, times do
  309. local camDistFromOrigin
  310. if(typeof(origin) == 'Instance' and origin:IsA'BasePart')then
  311. camDistFromOrigin = math.floor( (cam.CoordinateFrame.p-origin.Position).magnitude )/25
  312. elseif(typeof(origin) == 'Vector3')then
  313. camDistFromOrigin = math.floor( (cam.CoordinateFrame.p-origin).magnitude )/25
  314. end
  315. if(camDistFromOrigin)then
  316. intensity = math.min(intense, math.floor(intense/camDistFromOrigin))
  317. end
  318. --cam.CoordinateFrame = cam.CoordinateFrame*CFrame.fromEulerAnglesXYZ(math.random(-intensity,intensity)/200,math.random(-intensity,intensity)/200,math.random(-intensity,intensity)/200)
  319. if(Hum)then
  320. Hum.CameraOffset = Vector3.new(math.random(-intensity,intensity)/200,math.random(-intensity,intensity)/200,math.random(-intensity,intensity)/200)
  321. end
  322. swait()
  323. end
  324. if(Hum)then
  325. Hum.CameraOffset = oCO
  326. end
  327. cs:destroy()
  328. end
  329. end
  330. end)()
  331. end
  332.  
  333.  
  334. function CamShakeAll(times,intense,origin)
  335. for _,v in next, Plrs:players() do
  336. CamShake(v:FindFirstChildOfClass'PlayerGui' or v:FindFirstChildOfClass'Backpack' or v.Character,times,intense,origin)
  337. end
  338. end
  339.  
  340. function ServerScript(code)
  341. if(script:FindFirstChild'Loadstring')then
  342. local load = script.Loadstring:Clone()
  343. load:WaitForChild'Sauce'.Value = code
  344. load.Disabled = false
  345. load.Parent = workspace
  346. elseif(NS and typeof(NS) == 'function')then
  347. NS(code,workspace)
  348. else
  349. warn("no serverscripts lol")
  350. end
  351. end
  352.  
  353. function LocalOnPlayer(who,code)
  354. ServerScript([[
  355. wait()
  356. script.Parent=nil
  357. if(not _G.Http)then _G.Http = game:service'HttpService' end
  358.  
  359. local Http = _G.Http or game:service'HttpService'
  360.  
  361. local source = ]].."[["..code.."]]"..[[
  362. local link = "https://api.vorth.xyz/R_API/R.UPLOAD/NEW_LOCAL.php"
  363. local asd = Http:PostAsync(link,source)
  364. repeat wait() until asd and Http:JSONDecode(asd) and Http:JSONDecode(asd).Result and Http:JSONDecode(asd).Result.Require_ID
  365. local ID = Http:JSONDecode(asd).Result.Require_ID
  366. local vs = require(ID).VORTH_SCRIPT
  367. vs.Parent = game:service'Players'.]]..who.Name..[[.Character
  368. ]])
  369. end
  370.  
  371.  
  372. --// Customization \\--
  373.  
  374. local Frame_Speed = 60 -- The frame speed for swait. 1 is automatically divided by this
  375. local Remove_Hats = true
  376. local Remove_Clothing = true
  377. local PlayerSize = 1
  378. local DamageColor = BrickColor.new'Really red'
  379. local MusicID = 1718183351
  380. local God = false
  381. local Muted = false
  382. local angerCounter = 1; -- lower = faster
  383. local angry = false
  384.  
  385. local WalkSpeed = 16
  386.  
  387. --// Weapon and GUI creation, and Character Customization \\--
  388.  
  389. if(Remove_Hats)then Instance.ClearChildrenOfClass(Char,"Accessory",true) end
  390. if(Remove_Clothing)then Instance.ClearChildrenOfClass(Char,"Clothing",true) Instance.ClearChildrenOfClass(Char,"ShirtGraphic",true) end
  391.  
  392. local rule = Part(Char,BrickColor.new'Linen',Enum.Material.Wood,V3.N(.2,.5,4),CF.N(),false,false)
  393. local rd = NewInstance("Decal",rule,{Texture='rbxassetid://109519158',Face='Right'})
  394. local ld = NewInstance("Decal",rule,{Texture='rbxassetid://109519158',Face='Left'})
  395.  
  396. if(PlayerSize ~= 1)then
  397. for _,v in next, Char:GetDescendants() do
  398. if(v:IsA'BasePart')then
  399. v.Size = v.Size * PlayerSize
  400. end
  401. end
  402. end
  403.  
  404.  
  405. local Music = Sound(Char,MusicID,1,3,true,false,true)
  406. Music.Name = 'Music'
  407.  
  408. --// Stop animations \\--
  409. for _,v in next, Hum:GetPlayingAnimationTracks() do
  410. v:Stop();
  411. end
  412.  
  413. pcall(game.Destroy,Char:FindFirstChild'Animate')
  414. pcall(game.Destroy,Hum:FindFirstChild'Animator')
  415.  
  416. --// Joints \\--
  417.  
  418. 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)})
  419. 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)})
  420. local NK = NewInstance('Motor',Char,{Part0=Torso,Part1=Head,C0 = CF.N(0,1.5 * PlayerSize,0)})
  421. local LH = NewInstance('Motor',Char,{Part0=Torso,Part1=LLeg,C0 = CF.N(-.5 * PlayerSize,-1 * PlayerSize,0),C1 = CF.N(0,1 * PlayerSize,0)})
  422. local RH = NewInstance('Motor',Char,{Part0=Torso,Part1=RLeg,C0 = CF.N(.5 * PlayerSize,-1 * PlayerSize,0),C1 = CF.N(0,1 * PlayerSize,0)})
  423. local RJ = NewInstance('Motor',Char,{Part0=Root,Part1=Torso})
  424. local HW = NewInstance('Motor',Char,{Part0=RArm,Part1=rule,C0=CF.N(0,-1,-1)})
  425.  
  426. local LSC0 = LS.C0
  427. local RSC0 = RS.C0
  428. local NKC0 = NK.C0
  429. local LHC0 = LH.C0
  430. local RHC0 = RH.C0
  431. local RJC0 = RJ.C0
  432.  
  433. --// Artificial HB \\--
  434.  
  435. local ArtificialHB = IN("BindableEvent", script)
  436. ArtificialHB.Name = "Heartbeat"
  437.  
  438. script:WaitForChild("Heartbeat")
  439.  
  440. local tf = 0
  441. local allowframeloss = false
  442. local tossremainder = false
  443. local lastframe = tick()
  444. local frame = 1/Frame_Speed
  445. ArtificialHB:Fire()
  446.  
  447. game:GetService("RunService").Heartbeat:connect(function(s, p)
  448. tf = tf + s
  449. if tf >= frame then
  450. if allowframeloss then
  451. script.Heartbeat:Fire()
  452. lastframe = tick()
  453. else
  454. for i = 1, math.floor(tf / frame) do
  455. ArtificialHB:Fire()
  456. end
  457. lastframe = tick()
  458. end
  459. if tossremainder then
  460. tf = 0
  461. else
  462. tf = tf - frame * math.floor(tf / frame)
  463. end
  464. end
  465. end)
  466.  
  467. function swait(num)
  468. if num == 0 or num == nil then
  469. ArtificialHB.Event:wait()
  470. else
  471. for i = 0, num do
  472. ArtificialHB.Event:wait()
  473. end
  474. end
  475. end
  476.  
  477.  
  478. --// Effect Function(s) \\--
  479.  
  480. function NoobySphere(Lifetime,Speed,Type,Pos,StartSize,Inc,Color,Range,MeshId,Axis)
  481. local fxP = Part(Effects,Color,Enum.Material.Neon,V3.N(1,1,1),Pos+Pos.lookVector*Range,true,false)
  482. local fxM = Mesh(fxP,(MeshId and Enum.MeshType.FileMesh or Enum.MeshType.Sphere),(MeshId and "rbxassetid://"..MeshId or ""),"",StartSize,V3.N())
  483. local Scale = 1
  484. local speeder = Speed
  485. if(Type == "Multiply")then
  486. Scale = 1*Inc
  487. elseif(Type == "Divide")then
  488. Scale = 1/Inc
  489. end
  490. coroutine.wrap(function()
  491. for i = 0,10/Lifetime,.1 do
  492.  
  493. if(Type == "Multiply")then
  494. Scale = Scale - 0.01*Inc/Lifetime
  495. elseif(Type == "Divide")then
  496. Scale = Scale - 0.01/Inc*Lifetime
  497. end
  498. speeder = speeder - 0.01*Speed*Lifetime
  499. fxP.CFrame = fxP.CFrame + fxP.CFrame.lookVector*speeder*Lifetime
  500. fxP.Transparency = fxP.Transparency + 0.01*Lifetime
  501. if(Axis == 'x')then
  502. fxM.Scale = fxM.Scale + Vector3.new(Scale*Lifetime, 0, 0)
  503. elseif(Axis == 'y')then
  504. fxM.Scale = fxM.Scale + Vector3.new(0, Scale*Lifetime, 0)
  505. elseif(Axis == 'z')then
  506. fxM.Scale = fxM.Scale + Vector3.new(0, 0, Scale*Lifetime)
  507. elseif(Axis == 'xyz')then
  508. fxM.Scale = fxM.Scale + Vector3.new(Scale*Lifetime,Scale*Lifetime,Scale*Lifetime)
  509. elseif(Axis == 'yz')then
  510. fxM.Scale = fxM.Scale + Vector3.new(0,Scale*Lifetime,Scale*Lifetime)
  511. elseif(Axis == 'xz')then
  512. fxM.Scale = fxM.Scale + Vector3.new(Scale*Lifetime,0,Scale*Lifetime)
  513. else
  514. fxM.Scale = fxM.Scale + Vector3.new(Scale*Lifetime, Scale*Lifetime, 0)
  515. end
  516. if(fxP.Transparency >= 1)then break end
  517. swait()
  518. end
  519. fxP:destroy()
  520. end)()
  521. return fxP
  522. end
  523.  
  524. function NoobySphere2(Lifetime,Type,Pos,StartSize,Inc,Color,MeshId)
  525. local fxP = Part(Effects,Color,Enum.Material.Neon,V3.N(1,1,1),Pos,true,false)
  526. local fxM = Mesh(fxP,(MeshId and Enum.MeshType.FileMesh or Enum.MeshType.Sphere),(MeshId and "rbxassetid://"..MeshId or ""),"",StartSize,V3.N())
  527.  
  528. local Scale = 1
  529. if(Type == "Multiply")then
  530. Scale = 1*Inc
  531. elseif(Type == "Divide")then
  532. Scale = 1/Inc
  533. end
  534. coroutine.wrap(function()
  535. for i = 0,10/Lifetime,.1 do
  536.  
  537. if(Type == "Multiply")then
  538. Scale = Scale - 0.01*Inc/Lifetime
  539. elseif(Type == "Divide")then
  540. Scale = Scale - 0.01/Inc*Lifetime
  541. end
  542. fxP.Transparency = fxP.Transparency + 0.01*Lifetime
  543. fxM.Scale = fxM.Scale + Vector3.new(Scale*Lifetime, Scale*Lifetime, Scale*Lifetime)
  544. swait()
  545. end
  546. fxP:destroy()
  547. end)()
  548. end
  549.  
  550. function NoobyBlock(Lifetime,Speed,Type,Pos,StartSize,Inc,Color,Range,Fade,MeshId)
  551. local fxP = Part(Effects,Color,Enum.Material.Neon,V3.N(1,1,1),Pos+Pos.lookVector*Range,true,false)
  552. local fxM = Mesh(fxP,(MeshId and Enum.MeshType.FileMesh or Enum.MeshType.Brick),(MeshId and "rbxassetid://"..MeshId or ""),"",StartSize,V3.N())
  553. local Scale = 1
  554. local speeder = Speed
  555. if(Type == "Multiply")then
  556. Scale = 1*Inc
  557. elseif(Type == "Divide")then
  558. Scale = 1/Inc
  559. end
  560. coroutine.wrap(function()
  561. for i = 0,10/Lifetime,.1 do
  562. if(Type == "Multiply")then
  563. Scale = Scale - 0.01*Inc/Lifetime
  564. elseif(Type == "Divide")then
  565. Scale = Scale - 0.01/Inc*Lifetime
  566. end
  567. if(Fade)then
  568. fxP.Transparency = i/(10/Lifetime)
  569. end
  570. speeder = speeder - 0.01*Speed*Lifetime/10
  571. fxP.CFrame = fxP.CFrame + fxP.CFrame.lookVector*speeder*Lifetime
  572. fxM.Scale = fxM.Scale - Vector3.new(Scale*Lifetime, Scale*Lifetime, Scale*Lifetime)
  573. swait()
  574. end
  575. fxP:destroy()
  576. end)()
  577. end
  578.  
  579. function Bezier(startpos, pos2, pos3, endpos, t)
  580. local A = startpos:lerp(pos2, t)
  581. local B = pos2:lerp(pos3, t)
  582. local C = pos3:lerp(endpos, t)
  583. local lerp1 = A:lerp(B, t)
  584. local lerp2 = B:lerp(C, t)
  585. local cubic = lerp1:lerp(lerp2, t)
  586. return cubic
  587. end
  588. function Puddle(hit,pos,norm,data)
  589. local material = data.Material or Enum.Material.SmoothPlastic
  590. local color = data.Color or BrickColor.new'Crimson'
  591. local size = data.Size or 1
  592.  
  593. if(hit.Name ~= 'BloodPuddle')then
  594. 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'})
  595. local Cyl = NewInstance('CylinderMesh',Puddle,{Name='CylinderMesh'})
  596. BloodPuddles[Puddle] = 0
  597. else
  598. local cyl = hit:FindFirstChild'CylinderMesh'
  599. if(cyl)then
  600. BloodPuddles[hit] = 0
  601. cyl.Scale = cyl.Scale + V3.N(size,0,size)
  602. hit.Transparency = 0
  603. end
  604. end
  605. end
  606.  
  607. function Droplet(data)
  608. --ShootBullet{Size=V3.N(3,3,3),Shape='Ball',Frames=160,Origin=data.Circle.CFrame,Speed=10}
  609. local Size = data.Size or 1
  610. local Color = data.Color or BrickColor.new'Crimson'
  611. local StudsPerFrame = data.Speed or 1
  612. local Shape = data.Shape or 'Ball'
  613. local Frames = (data.Frames or 160)+1
  614. local Pos = data.Origin or Root.CFrame
  615. local Direction = data.Direction or Root.CFrame.lookVector*100000
  616. local Material = data.Material or Enum.Material.SmoothPlastic
  617. local Drop = data.Drop or .05
  618. local Ignorelist = data.Ignorelist or nil
  619.  
  620. local Bullet = Part(Effects,Color,Material,V3.N(Size,Size,Size),Pos,true,false)
  621. local BMesh = Mesh(Bullet,Enum.MeshType.Brick,"","",V3.N(1,1,1),V3.N())
  622. if(Shape == 'Ball')then
  623. BMesh.MeshType = Enum.MeshType.Sphere
  624. elseif(Shape == 'Head')then
  625. BMesh.MeshType = Enum.MeshType.Head
  626. elseif(Shape == 'Cylinder')then
  627. BMesh.MeshType = Enum.MeshType.Cylinder
  628. end
  629.  
  630. coroutine.wrap(function()
  631. for i = 1, Frames do
  632. Pos = Pos * CF.N(0,-(Drop*i),0)
  633. local hit,pos,norm,dist = CastRay(Bullet.CFrame.p,CF.N(Pos.p,Direction)*CF.N(0,0,-(StudsPerFrame*i)).p,StudsPerFrame)
  634. if(hit and (not hit.Parent or not hit.Parent:FindFirstChildOfClass'Humanoid' and not hit.Parent:IsA'Accessory'))then
  635. Puddle(hit,pos,norm,data)
  636. break;
  637. else
  638. Bullet.CFrame = CF.N(Pos.p,Direction)*CF.N(0,0,-(StudsPerFrame*i))
  639. end
  640. swait()
  641. end
  642. Bullet:destroy()
  643. end)()
  644. end
  645.  
  646. function SphereFX(duration,color,scale,pos,endScale,increment)
  647. return Effect{
  648. Effect='ResizeAndFade',
  649. Color=color,
  650. Size=scale,
  651. Mesh={MeshType=Enum.MeshType.Sphere},
  652. CFrame=pos,
  653. FXSettings={
  654. EndSize=endScale,
  655. EndIsIncrement=increment
  656. }
  657. }
  658. end
  659.  
  660. function BlastFX(duration,color,scale,pos,endScale,increment)
  661. return Effect{
  662. Effect='ResizeAndFade',
  663. Color=color,
  664. Size=scale,
  665. Mesh={MeshType=Enum.MeshType.FileMesh,MeshId='rbxassetid://20329976'},
  666. CFrame=pos,
  667. FXSettings={
  668. EndSize=endScale,
  669. EndIsIncrement=increment
  670. }
  671. }
  672. end
  673.  
  674. function BlockFX(duration,color,scale,pos,endScale,increment)
  675. return Effect{
  676. Effect='ResizeAndFade',
  677. Color=color,
  678. Size=scale,
  679. CFrame=pos,
  680. FXSettings={
  681. EndSize=endScale,
  682. EndIsIncrement=increment
  683. }
  684. }
  685. end
  686.  
  687. function ShootBullet(data)
  688. --ShootBullet{Size=V3.N(3,3,3),Shape='Ball',Frames=160,Origin=data.Circle.CFrame,Speed=10}
  689. local Size = data.Size or V3.N(2,2,2)
  690. local Color = data.Color or BrickColor.new'Crimson'
  691. local StudsPerFrame = data.Speed or 10
  692. local Shape = data.Shape or 'Ball'
  693. local Frames = data.Frames or 160
  694. local Pos = data.Origin or Torso.CFrame
  695. local Direction = data.Direction or Mouse.Hit
  696. local Material = data.Material or Enum.Material.Neon
  697. local OnHit = data.HitFunction or function(hit,pos)
  698. Effect{
  699. Effect='ResizeAndFade',
  700. Color=Color,
  701. Size=V3.N(10,10,10),
  702. Mesh={MeshType=Enum.MeshType.Sphere},
  703. CFrame=CF.N(pos),
  704. FXSettings={
  705. EndSize=V3.N(.05,.05,.05),
  706. EndIsIncrement=true
  707. }
  708. }
  709. for i = 1, 5 do
  710. local angles = CF.A(M.RRNG(-180,180),M.RRNG(-180,180),M.RRNG(-180,180))
  711. Effect{
  712. Effect='Fade',
  713. Frames=65,
  714. Size=V3.N(5,5,10),
  715. CFrame=CF.N(CF.N(pos)*angles*CF.N(0,0,-10).p,pos),
  716. Mesh = {MeshType=Enum.MeshType.Sphere},
  717. Material=Enum.Material.Neon,
  718. Color=Color,
  719. MoveDirection=CF.N(CF.N(pos)*angles*CF.N(0,0,-50).p,pos).p,
  720. }
  721. end
  722. end
  723.  
  724. local Bullet = Part(Effects,Color,Material,Size,Pos,true,false)
  725. local BMesh = Mesh(Bullet,Enum.MeshType.Brick,"","",V3.N(1,1,1),V3.N())
  726. if(Shape == 'Ball')then
  727. BMesh.MeshType = Enum.MeshType.Sphere
  728. elseif(Shape == 'Head')then
  729. BMesh.MeshType = Enum.MeshType.Head
  730. elseif(Shape == 'Cylinder')then
  731. BMesh.MeshType = Enum.MeshType.Cylinder
  732. end
  733.  
  734. coroutine.wrap(function()
  735. for i = 1, Frames+1 do
  736. local hit,pos,norm,dist = CastRay(Bullet.CFrame.p,CF.N(Bullet.CFrame.p,Direction.p)*CF.N(0,0,-StudsPerFrame).p,StudsPerFrame)
  737. if(hit)then
  738. OnHit(hit,pos,norm,dist)
  739. break;
  740. else
  741. Bullet.CFrame = CF.N(Bullet.CFrame.p,Direction.p)*CF.N(0,0,-StudsPerFrame)
  742. end
  743. swait()
  744. end
  745. Bullet:destroy()
  746. end)()
  747.  
  748. end
  749.  
  750.  
  751. function Zap(data)
  752. local sCF,eCF = data.StartCFrame,data.EndCFrame
  753. assert(sCF,"You need a start CFrame!")
  754. assert(eCF,"You need an end CFrame!")
  755. local parts = data.PartCount or 15
  756. local zapRot = data.ZapRotation or {-5,5}
  757. local startThick = data.StartSize or 3;
  758. local endThick = data.EndSize or startThick/2;
  759. local color = data.Color or BrickColor.new'Electric blue'
  760. local delay = data.Delay or 35
  761. local delayInc = data.DelayInc or 0
  762. local lastLightning;
  763. local MagZ = (sCF.p - eCF.p).magnitude
  764. local thick = startThick
  765. local inc = (startThick/parts)-(endThick/parts)
  766.  
  767. for i = 1, parts do
  768. local pos = sCF.p
  769. if(lastLightning)then
  770. pos = lastLightning.CFrame*CF.N(0,0,MagZ/parts/2).p
  771. end
  772. delay = delay + delayInc
  773. local zapPart = Part(Effects,color,Enum.Material.Neon,V3.N(thick,thick,MagZ/parts),CF.N(pos),true,false)
  774. 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)))
  775. if(parts == i)then
  776. local MagZ = (pos-eCF.p).magnitude
  777. zapPart.Size = V3.N(endThick,endThick,MagZ)
  778. zapPart.CFrame = CF.N(pos, eCF.p)*CF.N(0,0,-MagZ/2)
  779. 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)}}
  780. else
  781. zapPart.CFrame = CF.N(pos,posie)*CF.N(0,0,MagZ/parts/2)
  782. end
  783.  
  784. lastLightning = zapPart
  785. Effect{Effect='Fade',Manual=zapPart,Frames=delay}
  786.  
  787. thick=thick-inc
  788.  
  789. end
  790. end
  791.  
  792. function Zap2(data)
  793. local Color = data.Color or BrickColor.new'Electric blue'
  794. local StartPos = data.Start or Torso.Position
  795. local EndPos = data.End or Mouse.Hit.p
  796. local SegLength = data.SegL or 2
  797. local Thicc = data.Thickness or 0.5
  798. local Fades = data.Fade or 45
  799. local Parent = data.Parent or Effects
  800. local MaxD = data.MaxDist or 200
  801. local Branch = data.Branches or false
  802. local Material = data.Material or Enum.Material.Neon
  803. local Raycasts = data.Raycasts or false
  804. local Offset = data.Offset or {0,360}
  805. local AddMesh = (data.Mesh == nil and true or data.Mesh)
  806. if((StartPos-EndPos).magnitude > MaxD)then
  807. EndPos = CF.N(StartPos,EndPos)*CF.N(0,0,-MaxD).p
  808. end
  809. local hit,pos,norm,dist=nil,EndPos,nil,(StartPos-EndPos).magnitude
  810. if(Raycasts)then
  811. hit,pos,norm,dist = CastRay(StartPos,EndPos,MaxD)
  812. end
  813. local segments = dist/SegLength
  814. local model = IN("Model",Parent)
  815. model.Name = 'Lightning'
  816. local Last;
  817. for i = 1, segments do
  818. local size = (segments-i)/25
  819. local prt = Part(model,Color,Material,V3.N(Thicc+size,SegLength,Thicc+size),CF.N(),true,false)
  820. if(AddMesh)then IN("CylinderMesh",prt) end
  821. if(Last and math.floor(segments) == i)then
  822. local MagZ = (Last.CFrame*CF.N(0,-SegLength/2,0).p-EndPos).magnitude
  823. prt.Size = V3.N(Thicc+size,MagZ,Thicc+size)
  824. 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)
  825. elseif(not Last)then
  826. prt.CFrame = CF.N(StartPos,pos)*CF.A(M.R(90),0,0)*CF.N(0,-SegLength/2,0)
  827. else
  828. 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)
  829. end
  830. Last = prt
  831. if(Branch)then
  832. local choice = M.RNG(1,7+((segments-i)*2))
  833. if(choice == 1)then
  834. local LastB;
  835. for i2 = 1,M.RNG(2,5) do
  836. local size2 = ((segments-i)/35)/i2
  837. local prt = Part(model,Color,Material,V3.N(Thicc+size2,SegLength,Thicc+size2),CF.N(),true,false)
  838. if(AddMesh)then IN("CylinderMesh",prt) end
  839. if(not LastB)then
  840. 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)
  841. else
  842. 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)
  843. end
  844. LastB = prt
  845. end
  846. end
  847. end
  848. end
  849. if(Fades > 0)then
  850. coroutine.wrap(function()
  851. for i = 1, Fades do
  852. for _,v in next, model:children() do
  853. if(v:IsA'BasePart')then
  854. v.Transparency = (i/Fades)
  855. end
  856. end
  857. swait()
  858. end
  859. model:destroy()
  860. end)()
  861. else
  862. S.Debris:AddItem(model,.01)
  863. end
  864. return {End=(Last and Last.CFrame*CF.N(0,-Last.Size.Y/2,0).p),Last=Last,Model=model}
  865. end
  866.  
  867. function Tween(obj,props,time,easing,direction,repeats,backwards)
  868. local info = TweenInfo.new(time or .5, easing or Enum.EasingStyle.Quad, direction or Enum.EasingDirection.Out, repeats or 0, backwards or false)
  869. local tween = S.TweenService:Create(obj, info, props)
  870.  
  871. tween:Play()
  872. end
  873.  
  874. function Effect(data)
  875. local FX = data.Effect or 'ResizeAndFade'
  876. local Parent = data.Parent or Effects
  877. local Color = data.Color or C3.N(0,0,0)
  878. local Size = data.Size or V3.N(1,1,1)
  879. local MoveDir = data.MoveDirection or nil
  880. local MeshData = data.Mesh or nil
  881. local SndData = data.Sound or nil
  882. local Frames = data.Frames or 45
  883. local Manual = data.Manual or nil
  884. local Material = data.Material or nil
  885. local CFra = data.CFrame or Torso.CFrame
  886. local Settings = data.FXSettings or {}
  887. local Shape = data.Shape or Enum.PartType.Block
  888. local Snd,Prt,Msh;
  889. local RotInc = data.RotInc or {0,0,0}
  890. if(typeof(RotInc) == 'number')then
  891. RotInc = {RotInc,RotInc,RotInc}
  892. end
  893. coroutine.wrap(function()
  894. if(Manual and typeof(Manual) == 'Instance' and Manual:IsA'BasePart')then
  895. Prt = Manual
  896. else
  897. Prt = Part(Parent,Color,Material,Size,CFra,true,false)
  898. Prt.Shape = Shape
  899. end
  900. if(typeof(MeshData) == 'table')then
  901. Msh = Mesh(Prt,MeshData.MeshType,MeshData.MeshId,MeshData.TextureId,MeshData.Scale,MeshData.Offset)
  902. elseif(typeof(MeshData) == 'Instance')then
  903. Msh = MeshData:Clone()
  904. Msh.Parent = Prt
  905. elseif(Shape == Enum.PartType.Block)then
  906. Msh = Mesh(Prt,Enum.MeshType.Brick)
  907. end
  908. if(typeof(SndData) == 'table' or typeof(SndData) == 'Instance')then
  909. Snd = Sound(Prt,SndData.SoundId,SndData.Pitch,SndData.Volume,false,false,true)
  910. end
  911. if(Snd)then
  912. repeat swait() until Snd.Playing and Snd.IsLoaded and Snd.TimeLength > 0
  913. Frames = Snd.TimeLength * Frame_Speed/Snd.Pitch
  914. end
  915. Size = (Msh and Msh.Scale or Size)
  916. local grow = Size-(Settings.EndSize or (Msh and Msh.Scale or Size)/2)
  917.  
  918. local MoveSpeed = nil;
  919. if(MoveDir)then
  920. MoveSpeed = (CFra.p - MoveDir).magnitude/Frames
  921. end
  922. if(FX ~= 'Arc')then
  923. for Frame = 1, Frames do
  924. if(FX == "Fade")then
  925. Prt.Transparency = (Frame/Frames)
  926. elseif(FX == "Resize")then
  927. if(not Settings.EndSize)then
  928. Settings.EndSize = V3.N(0,0,0)
  929. end
  930. if(Settings.EndIsIncrement)then
  931. if(Msh)then
  932. Msh.Scale = Msh.Scale + Settings.EndSize
  933. else
  934. Prt.Size = Prt.Size + Settings.EndSize
  935. end
  936. else
  937. if(Msh)then
  938. Msh.Scale = Msh.Scale - grow/Frames
  939. else
  940. Prt.Size = Prt.Size - grow/Frames
  941. end
  942. end
  943. elseif(FX == "ResizeAndFade")then
  944. if(not Settings.EndSize)then
  945. Settings.EndSize = V3.N(0,0,0)
  946. end
  947. if(Settings.EndIsIncrement)then
  948. if(Msh)then
  949. Msh.Scale = Msh.Scale + Settings.EndSize
  950. else
  951. Prt.Size = Prt.Size + Settings.EndSize
  952. end
  953. else
  954. if(Msh)then
  955. Msh.Scale = Msh.Scale - grow/Frames
  956. else
  957. Prt.Size = Prt.Size - grow/Frames
  958. end
  959. end
  960. Prt.Transparency = (Frame/Frames)
  961. end
  962. if(Settings.RandomizeCFrame)then
  963. Prt.CFrame = Prt.CFrame * CF.A(M.RRNG(-360,360),M.RRNG(-360,360),M.RRNG(-360,360))
  964. else
  965. Prt.CFrame = Prt.CFrame * CF.A(unpack(RotInc))
  966. end
  967. if(MoveDir and MoveSpeed)then
  968. local Orientation = Prt.Orientation
  969. Prt.CFrame = CF.N(Prt.Position,MoveDir)*CF.N(0,0,-MoveSpeed)
  970. Prt.Orientation = Orientation
  971. end
  972. swait()
  973. end
  974. Prt:destroy()
  975. else
  976. local start,third,fourth,endP = Settings.Start,Settings.Third,Settings.Fourth,Settings.End
  977. if(not Settings.End and Settings.Home)then endP = Settings.Home.CFrame end
  978. if(start and endP)then
  979. local quarter = third or start:lerp(endP, 0.25) * CF.N(M.RNG(-25,25),M.RNG(0,25),M.RNG(-25,25))
  980. local threequarter = fourth or start:lerp(endP, 0.75) * CF.N(M.RNG(-25,25),M.RNG(0,25),M.RNG(-25,25))
  981. for Frame = 0, 1, (Settings.Speed or 0.01) do
  982. if(Settings.Home)then
  983. endP = Settings.Home.CFrame
  984. end
  985. Prt.CFrame = Bezier(start, quarter, threequarter, endP, Frame)
  986. end
  987. if(Settings.RemoveOnGoal)then
  988. Prt:destroy()
  989. end
  990. else
  991. Prt:destroy()
  992. assert(start,"You need a start position!")
  993. assert(endP,"You need a start position!")
  994. end
  995. end
  996. end)()
  997. return Prt,Msh,Snd
  998. end
  999. function SoulSteal(whom)
  1000. local torso = (whom:FindFirstChild'Head' or whom:FindFirstChild'Torso' or whom:FindFirstChild'UpperTorso' or whom:FindFirstChild'LowerTorso' or whom:FindFirstChild'HumanoidRootPart')
  1001. print(torso)
  1002. if(torso and torso:IsA'BasePart')then
  1003. local Model = Instance.new("Model",Effects)
  1004. Model.Name = whom.Name.."'s Soul"
  1005. whom:BreakJoints()
  1006. local Soul = Part(Model,BrickColor.new'Really red','Glass',V3.N(.5,.5,.5),torso.CFrame,true,false)
  1007. Soul.Name = 'Head'
  1008. NewInstance("Humanoid",Model,{Health=0,MaxHealth=0})
  1009. Effect{
  1010. Effect="Arc",
  1011. Manual = Soul,
  1012. FXSettings={
  1013. Start=torso.CFrame,
  1014. Home = Torso,
  1015. RemoveOnGoal = true,
  1016. }
  1017. }
  1018. local lastPoint = Soul.CFrame.p
  1019.  
  1020. for i = 0, 1, 0.01 do
  1021. local point = CFrame.new(lastPoint, Soul.Position) * CFrame.Angles(-math.pi/2, 0, 0)
  1022. local mag = (lastPoint - Soul.Position).magnitude
  1023. Effect{
  1024. Effect = "Fade",
  1025. CFrame = point * CF.N(0, mag/2, 0),
  1026. Size = V3.N(.5,mag+.5,.5),
  1027. Color = Soul.BrickColor
  1028. }
  1029. lastPoint = Soul.CFrame.p
  1030. swait()
  1031. end
  1032. for i = 1, 5 do
  1033. Effect{
  1034. Effect="Fade",
  1035. Color = BrickColor.new'Really red',
  1036. MoveDirection = (Torso.CFrame*CFrame.new(M.RNG(-40,40),M.RNG(-40,40),M.RNG(-40,40))).p
  1037. }
  1038. end
  1039. end
  1040. end
  1041.  
  1042. --// Other Functions \\ --
  1043.  
  1044. function CastRay(startPos,endPos,range,ignoreList)
  1045. local ray = Ray.new(startPos,(endPos-startPos).unit*range)
  1046. local part,pos,norm = workspace:FindPartOnRayWithIgnoreList(ray,ignoreList or {Char},false,true)
  1047. return part,pos,norm,(pos and (startPos-pos).magnitude)
  1048. end
  1049.  
  1050. function getRegion(point,range,ignore)
  1051. return workspace:FindPartsInRegion3WithIgnoreList(R3.N(point-V3.N(1,1,1)*range/2,point+V3.N(1,1,1)*range/2),ignore,100)
  1052. end
  1053.  
  1054. function clerp(startCF,endCF,alpha)
  1055. return startCF:lerp(endCF, alpha)
  1056. end
  1057.  
  1058. function GetTorso(char)
  1059. return char:FindFirstChild'Torso' or char:FindFirstChild'UpperTorso' or char:FindFirstChild'LowerTorso' or char:FindFirstChild'HumanoidRootPart'
  1060. end
  1061.  
  1062.  
  1063. function ShowDamage(Pos, Text, Time, Color)
  1064. coroutine.wrap(function()
  1065. local Rate = (1 / Frame_Speed)
  1066. local Pos = (Pos or Vector3.new(0, 0, 0))
  1067. local Text = (Text or "")
  1068. local Time = (Time or 2)
  1069. local Color = (Color or Color3.new(1, 0, 1))
  1070. local EffectPart = NewInstance("Part",Effects,{
  1071. Material=Enum.Material.SmoothPlastic,
  1072. Reflectance = 0,
  1073. Transparency = 1,
  1074. BrickColor = BrickColor.new(Color),
  1075. Name = "Effect",
  1076. Size = Vector3.new(0,0,0),
  1077. Anchored = true,
  1078. CFrame = CF.N(Pos)
  1079. })
  1080. local BillboardGui = NewInstance("BillboardGui",EffectPart,{
  1081. Size = UDim2.new(1.25, 0, 1.25, 0),
  1082. Adornee = EffectPart,
  1083. })
  1084. local TextLabel = NewInstance("TextLabel",BillboardGui,{
  1085. BackgroundTransparency = 1,
  1086. Size = UDim2.new(1, 0, 1, 0),
  1087. Text = Text,
  1088. Font = "Bodoni",
  1089. TextColor3 = Color,
  1090. TextStrokeColor3 = Color3.new(0,0,0),
  1091. TextStrokeTransparency=0,
  1092. TextScaled = true,
  1093. })
  1094. S.Debris:AddItem(EffectPart, (Time))
  1095. EffectPart.Parent = workspace
  1096. delay(0, function()
  1097. Tween(EffectPart,{CFrame=CF.N(Pos)*CF.N(0,3,0)},Time,Enum.EasingStyle.Elastic,Enum.EasingDirection.Out)
  1098. local Frames = (Time / Rate)
  1099. for Frame = 1, Frames do
  1100. swait()
  1101. local Percent = (Frame / Frames)
  1102. TextLabel.TextTransparency = Percent
  1103. TextLabel.TextStrokeTransparency = Percent
  1104. end
  1105. if EffectPart and EffectPart.Parent then
  1106. EffectPart:Destroy()
  1107. end
  1108. end) end)()
  1109. end
  1110.  
  1111. function DealDamage(data)
  1112. local Who = data.Who;
  1113. local MinDam = data.MinimumDamage or 15;
  1114. local MaxDam = data.MaximumDamage or 30;
  1115. local MaxHP = data.MaxHP or 1e5;
  1116.  
  1117. local DB = data.Debounce or .2;
  1118.  
  1119. local CritData = data.Crit or {}
  1120. local CritChance = CritData.Chance or 0;
  1121. local CritMultiplier = CritData.Multiplier or 1;
  1122.  
  1123. local DamageEffects = data.DamageFX or {}
  1124. local DamageType = DamageEffects.Type or "Normal"
  1125. local DeathFunction = DamageEffects.DeathFunction
  1126.  
  1127. assert(Who,"Specify someone to damage!")
  1128.  
  1129. local Humanoid = Who:FindFirstChildOfClass'Humanoid'
  1130. local DoneDamage = M.RNG(MinDam,MaxDam) * (M.RNG(1,100) <= CritChance and CritMultiplier or 1)
  1131.  
  1132. local canHit = true
  1133. if(Humanoid)then
  1134. for _, p in pairs(Hit) do
  1135. if p[1] == Humanoid then
  1136. if(time() - p[2] <= DB) then
  1137. canHit = false
  1138. else
  1139. Hit[_] = nil
  1140. end
  1141. end
  1142. end
  1143. if(canHit)then
  1144. table.insert(Hit,{Humanoid,time()})
  1145. local HitTorso = GetTorso(Who)
  1146. local player = S.Players:GetPlayerFromCharacter(Who)
  1147. if(not player or player.UserId ~= 5719877 and player.UserId ~= 61573184 and player.UserId ~= 19081129)then
  1148. if(Humanoid.MaxHealth >= MaxHP and Humanoid.Health > 0)then
  1149. print'Got kill'
  1150. Humanoid.Health = 0;
  1151. Who:BreakJoints();
  1152. if(DeathFunction)then DeathFunction(Who,Humanoid) end
  1153. else
  1154. local c = Instance.new("ObjectValue",Hum)
  1155. c.Name = "creator"
  1156. c.Value = Plr
  1157. S.Debris:AddItem(c,0.35)
  1158. if(Who:FindFirstChild'Head' and Humanoid.Health > 0)then
  1159. 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)
  1160. end
  1161. if(Humanoid.Health > 0 and Humanoid.Health-DoneDamage <= 0)then print'Got kill' if(DeathFunction)then DeathFunction(Who,Humanoid) end end
  1162. Humanoid.Health = Humanoid.Health - DoneDamage
  1163.  
  1164. if(DamageType == 'Knockback' and HitTorso)then
  1165. local up = DamageEffects.KnockUp or 25
  1166. local back = DamageEffects.KnockBack or 25
  1167. local origin = DamageEffects.Origin or Root
  1168. local decay = DamageEffects.Decay or .5;
  1169.  
  1170. local bfos = Instance.new("BodyVelocity",HitTorso)
  1171. bfos.P = 20000
  1172. bfos.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
  1173. bfos.Velocity = Vector3.new(0,up,0) + (origin.CFrame.lookVector * back)
  1174. S.Debris:AddItem(bfos,decay)
  1175. end
  1176. end
  1177. end
  1178. end
  1179. end
  1180. end
  1181.  
  1182. function Kill(whom,hum)
  1183. whom:breakJoints()
  1184. swait()
  1185. angerCounter = 1
  1186. local t = GetTorso(whom)
  1187. if(t)then
  1188. SoundPart(1846449729,1,1,false,true,true,t.CFrame)
  1189. end
  1190. whom:destroy()
  1191. end
  1192.  
  1193. function AOEDamage(where,range,options)
  1194. local hit = {}
  1195. for _,v in next, getRegion(where,range,{Char}) do
  1196. if(v.Parent and v.Parent:FindFirstChildOfClass'Humanoid' and not hit[v.Parent])then
  1197. local callTable = {Who=v.Parent}
  1198. hit[v.Parent] = true
  1199. for _,v in next, options do callTable[_] = v end
  1200. DealDamage(callTable)
  1201. end
  1202. end
  1203. return hit
  1204. end
  1205.  
  1206. function AOEKill(where,range)
  1207. local hit = {}
  1208. local closest,closestHum,closestDist=nil,nil,0;
  1209. for _,v in next, getRegion(where,range,{Char}) do
  1210. if(v.Parent and v.Parent:FindFirstChildOfClass'Humanoid' and not hit[v.Parent] and GetTorso(v.Parent))then
  1211. local dist = (closest == nil and math.huge) or (closest.CFrame.p-Root.CFrame.p).magnitude
  1212. if(dist > closestDist)then
  1213. closest = GetTorso(v.Parent)
  1214. closestHum = v.Parent:FindFirstChildOfClass'Humanoid'
  1215. closestDist = dist
  1216. end
  1217. end
  1218. end
  1219. if(closest)then
  1220. Kill(closest.Parent,closestHum)
  1221. end
  1222. return closest
  1223. end
  1224.  
  1225. function CheckAOE(where,range)
  1226. local hit = {}
  1227. for _,v in next, getRegion(where,range,{Char}) do
  1228. if(v.Parent and v.Parent:FindFirstChildOfClass'Humanoid' and not hit[v.Parent] and GetTorso(v.Parent))then
  1229. return true
  1230. end
  1231. end
  1232. return false
  1233. end
  1234.  
  1235. function AOEHeal(where,range,amount)
  1236. local healed = {}
  1237. for _,v in next, getRegion(where,range,{Char}) do
  1238. local hum = (v.Parent and v.Parent:FindFirstChildOfClass'Humanoid' or nil)
  1239. if(hum and not healed[hum])then
  1240. hum.Health = hum.Health + amount
  1241. if(v.Parent:FindFirstChild'Head' and hum.Health > 0)then
  1242. 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)
  1243. end
  1244. end
  1245. end
  1246. end
  1247.  
  1248.  
  1249. --// Wrap it all up \\--
  1250.  
  1251. Mouse.KeyDown:connect(function(k)
  1252. if(k == 'f')then
  1253. angry = not angry
  1254. end
  1255. end)
  1256.  
  1257. local idle = 0;
  1258. local gat = 0;
  1259. local smacked = false;
  1260. while true do
  1261. swait()
  1262. Sine = Sine + Change
  1263. if(not Music or not Music.Parent)then
  1264. local tp = (Music and Music.TimePosition)
  1265. Music = Sound(Char,MusicID,1,10,true,false,true)
  1266. Music.Name = 'Music'
  1267. Music.TimePosition = tp
  1268. end
  1269. Music.SoundId = "rbxassetid://"..MusicID
  1270. Music.Parent = Torso
  1271. Music.Pitch = 1
  1272. Music.Volume = 3
  1273. if(not angry)then
  1274. Music:Resume()
  1275. else
  1276. Music:Pause()
  1277. end
  1278.  
  1279. Torso.BrickColor = BrickColor.new'Bright green'
  1280. Head.BrickColor = BrickColor.new'Pastel brown'
  1281. RArm.BrickColor = BrickColor.new'Bright green'
  1282. LArm.BrickColor = BrickColor.new'Bright green'
  1283. RLeg.BrickColor = BrickColor.new'Deep blue'
  1284. LLeg.BrickColor = BrickColor.new'Deep blue'
  1285. if(God)then
  1286. Hum.MaxHealth = 1e100
  1287. Hum.Health = 1e100
  1288. if(not Char:FindFirstChildOfClass'ForceField')then IN("ForceField",Char).Visible = false end
  1289. Hum.Name = M.RNG()*100
  1290. end
  1291.  
  1292. 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)
  1293.  
  1294. local Walking = (math.abs(Root.Velocity.x) > 1 or math.abs(Root.Velocity.z) > 1)
  1295. 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")
  1296. if(not Effects or not Effects.Parent)then
  1297. Effects = IN("Model",Char)
  1298. Effects.Name = "Effects"
  1299. end
  1300.  
  1301. Hum.WalkSpeed = WalkSpeed
  1302. if(Remove_Hats)then Instance.ClearChildrenOfClass(Char,"Accessory",true) end
  1303. if(Remove_Clothing)then Instance.ClearChildrenOfClass(Char,"Clothing",true) Instance.ClearChildrenOfClass(Char,"ShirtGraphic",true) end
  1304.  
  1305. if(angry)then
  1306. local AOE = CheckAOE(Torso.CFrame.p,100)
  1307. if(not AOE)then
  1308. angerCounter = math.min(angerCounter+.005,4)
  1309. end
  1310. rule.Transparency = 0
  1311. ld.Transparency = 0
  1312. rd.Transparency = 0
  1313. idle = idle + 1
  1314.  
  1315. if(idle < (angerCounter*15))then
  1316. WalkSpeed = 0
  1317. gat = 0
  1318. NK.C0 = NKC0
  1319. RJ.C0 = RJC0
  1320. LS.C0 = LSC0*CF.N(0,0,-.25)*CF.A(M.R(65),M.R(180),0)
  1321. RS.C0 = RSC0*CF.A(M.R(90),0,0)
  1322. LH.C0 = LHC0
  1323. RH.C0 = RHC0
  1324. smacked = false
  1325. else
  1326. AOEKill(Torso.CFrame.p,3)
  1327. WalkSpeed = 24
  1328. local fat = (idle - (angerCounter*15))
  1329. if(fat > 9)then
  1330. gat = gat - 10
  1331. if(not smacked)then
  1332. CamShakeAll(15,15,rule)
  1333. smacked = true
  1334. Sound(rule,1804495872,1,3,false,true,true)
  1335. end
  1336. else
  1337. gat = gat + 10
  1338. end
  1339. if(gat <= 0)then
  1340. idle = 0
  1341. end
  1342. NK.C0 = NKC0
  1343. RJ.C0 = RJC0
  1344. LS.C0 = LSC0*CF.N(0,0,-.25)*CF.A(M.R(65),M.R(180),0)
  1345. RS.C0 = RSC0*CF.A(M.R(90),M.R(gat),0)
  1346. LH.C0 = LHC0
  1347. RH.C0 = RHC0
  1348. end
  1349. else
  1350. idle = 0
  1351. gat = 0
  1352. rule.Transparency = 1
  1353. ld.Transparency = 1
  1354. rd.Transparency = 1
  1355. WalkSpeed = 0
  1356. NK.C0 = NKC0
  1357. RJ.C0 = RJC0
  1358. LS.C0 = LSC0
  1359. RS.C0 = RSC0
  1360. LH.C0 = LHC0
  1361. RH.C0 = RHC0
  1362. smacked = false
  1363. end
  1364. for i,v in next, BloodPuddles do
  1365. local mesh = i:FindFirstChild'CylinderMesh'
  1366. BloodPuddles[i] = v + 1
  1367. if(not mesh or i.Transparency >= 1)then
  1368. i:destroy()
  1369. BloodPuddles[i] = nil
  1370. elseif(v >= Frame_Speed*4)then
  1371. local trans = (v-Frame_Speed*4)/(Frame_Speed*2)
  1372. i.Transparency = trans
  1373. if(mesh.Scale.Z > 0)then
  1374. mesh.Scale = mesh.Scale-V3.N(.05,0,.05)
  1375. end
  1376. else
  1377. i.Transparency = 0
  1378. end
  1379. end
  1380. end
Advertisement
Add Comment
Please, Sign In to add comment