Advertisement
Bendy928443534

Untitled

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