kilcrafter

Mephisto

Sep 1st, 2019
207
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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("Fixed by kilcrafter (crift_games1)")
  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. -- Created by Nebula_Zorua --
  85. -- Mephisto --
  86. -- ..? --
  87. -- Discord: Nebula the Zorua#6969
  88. -- Youtube: https://www.youtube.com/channel/UCo9oU9dCw8jnuVLuy4_SATA
  89.  
  90. wait(1/60)
  91.  
  92. --// Shortcut Variables \\--
  93. local S = setmetatable({},{__index = function(s,i) return game:service(i) end})
  94. local CF = {N=CFrame.new,A=CFrame.Angles,fEA=CFrame.fromEulerAnglesXYZ}
  95. local C3 = {N=Color3.new,RGB=Color3.fromRGB,HSV=Color3.fromHSV,tHSV=Color3.toHSV}
  96. local V3 = {N=Vector3.new,FNI=Vector3.FromNormalId,A=Vector3.FromAxis}
  97. 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}
  98. local R3 = {N=Region3.new}
  99. local De = S.Debris
  100. local WS = workspace
  101. local Lght = S.Lighting
  102. local RepS = S.ReplicatedStorage
  103. local IN = Instance.new
  104. local Plrs = S.Players
  105.  
  106. --// Initializing \\--
  107. local Plr = owner
  108. local Char = Plr.Character
  109. local Hum = Char:FindFirstChildOfClass'Humanoid'
  110. local RArm = Char["Right Arm"]
  111. local LArm = Char["Left Arm"]
  112. local RLeg = Char["Right Leg"]
  113. local LLeg = Char["Left Leg"]
  114. local Root = Char:FindFirstChild'HumanoidRootPart'
  115. local Torso = Char.Torso
  116. local Head = Char.Head
  117. local NeutralAnims = true
  118. local Attack = false
  119. local Debounces = {Debounces={}}
  120. local Hit = {}
  121. local Sine = 0
  122. local Change = 1
  123. local BloodPuddles = {}
  124. local idleCounter = 0;
  125. local Sitting = false
  126.  
  127. local Effects = IN("Folder",Char)
  128. Effects.Name = "Effects"
  129.  
  130.  
  131. --// Debounce System \\--
  132.  
  133.  
  134. function Debounces:New(name,cooldown)
  135. local aaaaa = {Usable=true,Cooldown=cooldown or 2,CoolingDown=false,LastUse=0}
  136. setmetatable(aaaaa,{__index = Debounces})
  137. Debounces.Debounces[name] = aaaaa
  138. return aaaaa
  139. end
  140.  
  141. function Debounces:Use(overrideUsable)
  142. assert(self.Usable ~= nil and self.LastUse ~= nil and self.CoolingDown ~= nil,"Expected ':' not '.' calling member function Use")
  143. if(self.Usable or overrideUsable)then
  144. self.Usable = false
  145. self.CoolingDown = true
  146. local LastUse = time()
  147. self.LastUse = LastUse
  148. delay(self.Cooldown or 2,function()
  149. if(self.LastUse == LastUse)then
  150. self.CoolingDown = false
  151. self.Usable = true
  152. end
  153. end)
  154. end
  155. end
  156.  
  157. function Debounces:Get(name)
  158. assert(typeof(name) == 'string',("bad argument #1 to 'get' (string expected, got %s)"):format(typeof(name) == nil and "no value" or typeof(name)))
  159. for i,v in next, Debounces.Debounces do
  160. if(i == name)then
  161. return v;
  162. end
  163. end
  164. end
  165.  
  166. function Debounces:GetProgressPercentage()
  167. assert(self.Usable ~= nil and self.LastUse ~= nil and self.CoolingDown ~= nil,"Expected ':' not '.' calling member function Use")
  168. if(self.CoolingDown and not self.Usable)then
  169. return math.max(
  170. math.floor(
  171. (
  172. (time()-self.LastUse)/self.Cooldown or 2
  173. )*100
  174. )
  175. )
  176. else
  177. return 100
  178. end
  179. end
  180.  
  181. --// Instance Creation Functions \\--
  182.  
  183. function Sound(parent,id,pitch,volume,looped,effect,autoPlay)
  184. local Sound = IN("Sound")
  185. Sound.SoundId = "rbxassetid://".. tostring(id or 0)
  186. Sound.Pitch = pitch or 1
  187. Sound.Volume = volume or 1
  188. Sound.Looped = looped or false
  189. if(autoPlay)then
  190. coroutine.wrap(function()
  191. repeat wait() until Sound.IsLoaded
  192. Sound.Playing = autoPlay or false
  193. end)()
  194. end
  195. if(not looped and effect)then
  196. Sound.Stopped:connect(function()
  197. Sound.Volume = 0
  198. Sound:destroy()
  199. end)
  200. elseif(effect)then
  201. warn("Sound can't be looped and a sound effect!")
  202. end
  203. Sound.Parent = parent or Torso
  204. return Sound
  205. end
  206. function Part(parent,color,material,size,cframe,anchored,cancollide)
  207. local part = IN("Part")
  208. part.Parent = parent or Char
  209. part[typeof(color) == 'BrickColor' and 'BrickColor' or 'Color'] = color or C3.N(0,0,0)
  210. part.Material = material or Enum.Material.SmoothPlastic
  211. part.TopSurface,part.BottomSurface=10,10
  212. part.Size = size or V3.N(1,1,1)
  213. part.CFrame = cframe or CF.N(0,0,0)
  214. part.CanCollide = cancollide or false
  215. part.Anchored = anchored or false
  216. return part
  217. end
  218.  
  219. function Weld(part0,part1,c0,c1)
  220. local weld = IN("Weld")
  221. weld.Parent = part0
  222. weld.Part0 = part0
  223. weld.Part1 = part1
  224. weld.C0 = c0 or CF.N()
  225. weld.C1 = c1 or CF.N()
  226. return weld
  227. end
  228.  
  229. function Mesh(parent,meshtype,meshid,textid,scale,offset)
  230. local part = IN("SpecialMesh")
  231. part.MeshId = meshid or ""
  232. part.TextureId = textid or ""
  233. part.Scale = scale or V3.N(1,1,1)
  234. part.Offset = offset or V3.N(0,0,0)
  235. part.MeshType = meshtype or Enum.MeshType.Sphere
  236. part.Parent = parent
  237. return part
  238. end
  239.  
  240. NewInstance = function(instance,parent,properties)
  241. local inst = Instance.new(instance)
  242. inst.Parent = parent
  243. if(properties)then
  244. for i,v in next, properties do
  245. pcall(function() inst[i] = v end)
  246. end
  247. end
  248. return inst;
  249. end
  250.  
  251. function Clone(instance,parent,properties)
  252. local inst = instance:Clone()
  253. inst.Parent = parent
  254. if(properties)then
  255. for i,v in next, properties do
  256. pcall(function() inst[i] = v end)
  257. end
  258. end
  259. return inst;
  260. end
  261.  
  262. function SoundPart(id,pitch,volume,looped,effect,autoPlay,cf)
  263. local soundPart = NewInstance("Part",Effects,{Transparency=1,CFrame=cf or Torso.CFrame,Anchored=true,CanCollide=false,Size=V3.N()})
  264. local Sound = IN("Sound")
  265. Sound.SoundId = "rbxassetid://".. tostring(id or 0)
  266. Sound.Pitch = pitch or 1
  267. Sound.Volume = volume or 1
  268. Sound.Looped = looped or false
  269. if(autoPlay)then
  270. coroutine.wrap(function()
  271. repeat wait() until Sound.IsLoaded
  272. Sound.Playing = autoPlay or false
  273. end)()
  274. end
  275. if(not looped and effect)then
  276. Sound.Stopped:connect(function()
  277. Sound.Volume = 0
  278. soundPart:destroy()
  279. end)
  280. elseif(effect)then
  281. warn("Sound can't be looped and a sound effect!")
  282. end
  283. Sound.Parent = soundPart
  284. return Sound
  285. end
  286.  
  287.  
  288. --// Extended ROBLOX tables \\--
  289. 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})
  290. --// Require stuff \\--
  291. function CamShake(who,times,intense,origin)
  292. coroutine.wrap(function()
  293. if(script:FindFirstChild'CamShake')then
  294. local cam = script.CamShake:Clone()
  295. cam:WaitForChild'intensity'.Value = intense
  296. cam:WaitForChild'times'.Value = times
  297.  
  298. if(origin)then NewInstance((typeof(origin) == 'Instance' and "ObjectValue" or typeof(origin) == 'Vector3' and 'Vector3Value'),cam,{Name='origin',Value=origin}) end
  299. cam.Parent = who
  300. wait()
  301. cam.Disabled = false
  302. elseif(who == Plr or who == Char or who:IsDescendantOf(Plr))then
  303. local intensity = intense
  304. local cam = workspace.CurrentCamera
  305. for i = 1, times do
  306. local camDistFromOrigin
  307. if(typeof(origin) == 'Instance' and origin:IsA'BasePart')then
  308. camDistFromOrigin = math.floor( (cam.CFrame.p-origin.Position).magnitude )/25
  309. elseif(typeof(origin) == 'Vector3')then
  310. camDistFromOrigin = math.floor( (cam.CFrame.p-origin).magnitude )/25
  311. end
  312. if(camDistFromOrigin)then
  313. intensity = math.min(intense, math.floor(intense/camDistFromOrigin))
  314. end
  315. cam.CFrame = cam.CFrame:lerp(cam.CFrame*CFrame.new(math.random(-intensity,intensity)/100,math.random(-intensity,intensity)/100,math.random(-intensity,intensity)/100)*CFrame.Angles(math.rad(math.random(-intensity,intensity)/100),math.rad(math.random(-intensity,intensity)/100),math.rad(math.random(-intensity,intensity)/100)),.4)
  316. swait()
  317. end
  318. end
  319. end)()
  320. end
  321.  
  322.  
  323. function CamShakeAll(times,intense,origin)
  324. for _,v in next, Plrs:players() do
  325. CamShake(v:FindFirstChildOfClass'PlayerGui' or v:FindFirstChildOfClass'Backpack' or v.Character,times,intense,origin)
  326. end
  327. end
  328.  
  329. function ServerScript(code)
  330. if(script:FindFirstChild'Loadstring')then
  331. local load = script.Loadstring:Clone()
  332. load:WaitForChild'Sauce'.Value = code
  333. load.Disabled = false
  334. load.Parent = workspace
  335. elseif(NS and typeof(NS) == 'function')then
  336. NS(code,workspace)
  337. else
  338. warn("no serverscripts lol")
  339. end
  340. end
  341.  
  342. function LocalOnPlayer(who,code)
  343. ServerScript([[
  344. wait()
  345. script.Parent=nil
  346. if(not _G.Http)then _G.Http = game:service'HttpService' end
  347.  
  348. local Http = _G.Http or game:service'HttpService'
  349.  
  350. local source = ]].."[["..code.."]]"..[[
  351. local link = "https://api.vorth.xyz/R_API/R.UPLOAD/NEW_LOCAL.php"
  352. local asd = Http:PostAsync(link,source)
  353. repeat wait() until asd and Http:JSONDecode(asd) and Http:JSONDecode(asd).Result and Http:JSONDecode(asd).Result.Require_ID
  354. local ID = Http:JSONDecode(asd).Result.Require_ID
  355. local vs = require(ID).VORTH_SCRIPT
  356. vs.Parent = game:service'Players'.]]..who.Name..[[.Character
  357. ]])
  358. end
  359.  
  360.  
  361. --// Customization \\--
  362.  
  363. local Frame_Speed = 60 -- The frame speed for swait. 1 is automatically divided by this
  364. local Remove_Hats = true
  365. local Remove_Clothing = true
  366. local PlayerSize = 1.3
  367. local DamageColor = BrickColor.new'Really black'
  368. local MusicID = 340286845
  369. local God = true
  370. local Muted = false
  371.  
  372. local WalkSpeed = 12
  373.  
  374. local Music = Sound(Char,MusicID,1,3,true,false,true)
  375. Music.Name = 'Music'
  376.  
  377. --// Stop animations \\--
  378. for _,v in next, Hum:GetPlayingAnimationTracks() do
  379. v:Stop();
  380. end
  381.  
  382. pcall(game.Destroy,Char:FindFirstChild'Animate')
  383. pcall(game.Destroy,Hum:FindFirstChild'Animator')
  384.  
  385.  
  386. --// Joints \\--
  387.  
  388. 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)})
  389. 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)})
  390. local NK = NewInstance('Motor',Char,{Part0=Torso,Part1=Head,C0 = CF.N(0,1.5 * PlayerSize,0)})
  391. local LH = NewInstance('Motor',Char,{Part0=Torso,Part1=LLeg,C0 = CF.N(-.5 * PlayerSize,-1 * PlayerSize,0),C1 = CF.N(0,1 * PlayerSize,0)})
  392. local RH = NewInstance('Motor',Char,{Part0=Torso,Part1=RLeg,C0 = CF.N(.5 * PlayerSize,-1 * PlayerSize,0),C1 = CF.N(0,1 * PlayerSize,0)})
  393. local RJ = NewInstance('Motor',Char,{Part0=Root,Part1=Torso})
  394.  
  395. local LSC0 = LS.C0
  396. local RSC0 = RS.C0
  397. local NKC0 = NK.C0
  398. local LHC0 = LH.C0
  399. local RHC0 = RH.C0
  400. local RJC0 = RJ.C0
  401.  
  402. --// Resizing \\--
  403.  
  404. Hum.Parent = nil
  405. Root.Size = Root.Size*PlayerSize
  406. Torso.Size = Torso.Size*PlayerSize
  407. RArm.Size = RArm.Size*PlayerSize
  408. RLeg.Size = RLeg.Size*PlayerSize
  409. LArm.Size = LArm.Size*PlayerSize
  410. LLeg.Size = LLeg.Size*PlayerSize
  411. Head.Size = Head.Size*PlayerSize
  412.  
  413. RJ.Parent = Root
  414. NK.Parent = Torso
  415. RS.Parent = Torso
  416. LS.Parent = Torso
  417. RH.Parent = Torso
  418. LH.Parent = Torso
  419.  
  420. Hum.Parent = Char
  421.  
  422. --// Weapon and GUI creation, and Character Customization \\--
  423.  
  424. local pe = NewInstance("ParticleEmitter",Torso,{ZOffset=.9,Color=ColorSequence.new(C3.N(0,0,0)),LightEmission=.5,LightInfluence=0,Size=NumberSequence.new(1,0),Texture='rbxasset://textures/particles/fire_main.dds',Transparency=NumberSequence.new(0,1),EmissionDirection=Enum.NormalId.Top,Enabled=true,Lifetime=NumberRange.new(.7),Rate=500,Speed=NumberRange.new(5)})
  425. local hood = Part(Char,C3.N(.2,.2,.2),Enum.Material.Fabric,V3.N(2*PlayerSize,2*PlayerSize,2*PlayerSize),CF.N(),false,false)
  426. local hoodM = Mesh(hood,Enum.MeshType.FileMesh,'rbxassetid://16952952','',V3.N(1.05*PlayerSize,1.05*PlayerSize,1.05*PlayerSize))
  427. local hoodW = Weld(hood,Head,CF.N(0,-.384*PlayerSize,0))
  428.  
  429. if(Remove_Hats)then Instance.ClearChildrenOfClass(Char,"Accessory",true) end
  430. if(Remove_Clothing)then Instance.ClearChildrenOfClass(Char,"Clothing",true) Instance.ClearChildrenOfClass(Char,"ShirtGraphic",true) end
  431.  
  432. for side = 1,2 do
  433. local LastPart = hood;
  434.  
  435. for i = 1,34 do
  436. local mult = (1-(i/38))*PlayerSize
  437. if(LastPart == hood)then
  438. local Horn = Part(Char,BrickColor.new'Really black',Enum.Material.SmoothPlastic,V3.N(.25*mult,.15,.25*mult),Head.CFrame,false,false)
  439. Horn.Name = 'Horn'
  440. Weld(LastPart,Horn,CF.N((side == 1 and .3 or -.3)*PlayerSize,.6*PlayerSize,-.2*PlayerSize)*CF.A(0,M.R((side == 1 and -5 or 5)),0))
  441. LastPart = Horn
  442. else
  443. local Horn = Part(Char,BrickColor.new'Really black',Enum.Material.SmoothPlastic,V3.N(.25*mult,.15,.25*mult),Head.CFrame,false,false)
  444. Horn.Name = 'Horn'
  445. Weld(LastPart,Horn,CF.N(0,Horn.Size.Y/2,0)*CF.A(M.R(7),M.R(side == 1 and 3 or -3),0))
  446. LastPart = Horn
  447. end
  448. end
  449. end
  450.  
  451. for side = 1,2 do
  452. local LastPart = hood;
  453.  
  454. for i = 1,24 do
  455. local mult = (1-(i/28))*PlayerSize
  456. if(LastPart == hood)then
  457. local Horn = Part(Char,BrickColor.new'Really black',Enum.Material.SmoothPlastic,V3.N(.25*mult,.15,.25*mult),Head.CFrame,false,false)
  458. Horn.Name = 'Horn'
  459. Weld(LastPart,Horn,CF.N((side == 1 and .5 or -.5)*PlayerSize,-.2*PlayerSize,-.2*PlayerSize)*CF.A(M.R(-25),M.R((side == 1 and -180 or 180)),M.R((side == 1 and 90 or -90))))
  460. LastPart = Horn
  461. else
  462. local Horn = Part(Char,BrickColor.new'Really black',Enum.Material.SmoothPlastic,V3.N(.25*mult,.15,.25*mult),Head.CFrame,false,false)
  463. Horn.Name = 'Horn'
  464. Weld(LastPart,Horn,CF.N(0,Horn.Size.Y/2,0)*CF.A(M.R(-7),M.R((side == 1 and -3 or 3)),0))
  465. LastPart = Horn
  466. end
  467. end
  468. end
  469.  
  470. --// Artificial HB \\--
  471.  
  472. local ArtificialHB = IN("BindableEvent", script)
  473. ArtificialHB.Name = "Heartbeat"
  474.  
  475. script:WaitForChild("Heartbeat")
  476.  
  477. local tf = 0
  478. local allowframeloss = false
  479. local tossremainder = false
  480. local lastframe = tick()
  481. local frame = 1/Frame_Speed
  482. ArtificialHB:Fire()
  483.  
  484. game:GetService("RunService").Heartbeat:connect(function(s, p)
  485. tf = tf + s
  486. if tf >= frame then
  487. if allowframeloss then
  488. script.Heartbeat:Fire()
  489. lastframe = tick()
  490. else
  491. for i = 1, math.floor(tf / frame) do
  492. ArtificialHB:Fire()
  493. end
  494. lastframe = tick()
  495. end
  496. if tossremainder then
  497. tf = 0
  498. else
  499. tf = tf - frame * math.floor(tf / frame)
  500. end
  501. end
  502. end)
  503.  
  504. function swait(num)
  505. if num == 0 or num == nil then
  506. ArtificialHB.Event:wait()
  507. else
  508. for i = 0, num do
  509. ArtificialHB.Event:wait()
  510. end
  511. end
  512. end
  513.  
  514.  
  515. --// Effect Function(s) \\--
  516.  
  517. function Bezier(startpos, pos2, pos3, endpos, t)
  518. local A = startpos:lerp(pos2, t)
  519. local B = pos2:lerp(pos3, t)
  520. local C = pos3:lerp(endpos, t)
  521. local lerp1 = A:lerp(B, t)
  522. local lerp2 = B:lerp(C, t)
  523. local cubic = lerp1:lerp(lerp2, t)
  524. return cubic
  525. end
  526. function Puddle(hit,pos,norm,data)
  527. local material = data.Material or Enum.Material.Granite
  528. local color = data.Color or BrickColor.new'Crimson'
  529. local size = data.Size and data.Size/4 or .25
  530.  
  531. if(hit.Name ~= 'BloodPuddle')then
  532. 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'})
  533. local Cyl = NewInstance('CylinderMesh',Puddle,{Name='CylinderMesh'})
  534. BloodPuddles[Puddle] = 0
  535. else
  536. local cyl = hit:FindFirstChild'CylinderMesh'
  537. if(cyl and cyl.Scale.x < 20)then
  538. BloodPuddles[hit] = 0
  539. cyl.Scale = cyl.Scale + V3.N(size,0,size)
  540. hit.Transparency = 0
  541. end
  542. end
  543. end
  544.  
  545. function Droplet(data)
  546. --ShootBullet{Size=V3.N(3,3,3),Shape='Ball',Frames=160,Origin=data.Circle.CFrame,Speed=10}
  547. local Size = data.Size or .5
  548. local Color = data.Color or BrickColor.new'Crimson'
  549. local StudsPerFrame = data.Speed or 1
  550. local Shape = data.Shape or 'Ball'
  551. local Frames = (data.Frames or 160)+1
  552. local Pos = data.Origin or Root.CFrame
  553. local Direction = data.Direction or Root.CFrame.lookVector*100000
  554. local Material = data.Material or Enum.Material.Granite
  555. local Drop = data.Drop or .05
  556. local Ignorelist = data.Ignorelist or (function()
  557. local list = {}
  558. for _,v in next, workspace:children() do
  559. if(v:FindFirstChildOfClass'Humanoid')then
  560. table.insert(list,v)
  561. end
  562. end
  563. return list
  564. end)()
  565.  
  566. local Bullet = Part(Effects,Color,Material,V3.N(Size,Size,Size),Pos,true,false)
  567. local BMesh = Mesh(Bullet,Enum.MeshType.Brick,"","",V3.N(1,1,1),V3.N())
  568. if(Shape == 'Ball')then
  569. BMesh.MeshType = Enum.MeshType.Sphere
  570. elseif(Shape == 'Head')then
  571. BMesh.MeshType = Enum.MeshType.Head
  572. elseif(Shape == 'Cylinder')then
  573. BMesh.MeshType = Enum.MeshType.Cylinder
  574. end
  575.  
  576. coroutine.wrap(function()
  577. for i = 1, Frames do
  578. Pos = Pos + V3.N(0,-(Drop*i),0)
  579. local hit,pos,norm,dist = CastRay(Bullet.CFrame.p,CF.N(Pos.p,Direction)*CF.N(0,0,-(StudsPerFrame*i)).p,StudsPerFrame,Ignorelist)
  580. if(hit and (not hit.Parent or not hit.Parent:FindFirstChildOfClass'Humanoid' and not hit.Parent:IsA'Accessory'))then
  581. Puddle(hit,pos,norm,data)
  582. break;
  583. else
  584. Bullet.CFrame = CF.N(Pos.p,Direction)*CF.N(0,0,-(StudsPerFrame*i))
  585. end
  586. swait()
  587. end
  588. Bullet:destroy()
  589. end)()
  590. end
  591.  
  592. function BloodDrop(pos,dir,maxsize,BloodMaterial,BloodColor)
  593. BloodMaterial = BloodMaterial or Enum.Material.Granite
  594. BloodColor = BloodColor or BrickColor.new'Maroon'
  595. local owo = NewInstance("Part",Char,{Material=BloodMaterial,BrickColor=BloodColor,Shape=Enum.PartType.Ball,Size=V3.N(.25,.25,.25), CanCollide = false})
  596. owo.CFrame=CF.N(pos,dir)
  597. local bv = Instance.new("BodyVelocity",owo)
  598. bv.maxForce = Vector3.new(1e9, 1e9, 1e9)
  599. bv.velocity = CF.N(pos,dir+V3.N(M.RNG(-3,3)/30,M.RNG(-3,3)/30,M.RNG(-3,3)/30)).lookVector*15
  600. bv.Name = "MOVE"
  601. game:service'Debris':AddItem(bv,0.05)
  602. local touch
  603. touch = owo.Touched:connect(function(hit)
  604. if(hit.Anchored==true and hit.CanCollide and not hit.Parent:FindFirstChildOfClass'Humanoid' and not hit.Parent.Parent:FindFirstChildOfClass'Humanoid')then
  605. touch:disconnect()
  606. BloodPuddle(owo.Position+V3.N(0,1,0),3,maxsize,owo)
  607. owo:destroy()
  608. end
  609. end)
  610. end
  611. function BloodPuddle(position,range,maxSize,where,BloodMaterial,BloodColor)
  612. BloodMaterial = BloodMaterial or Enum.Material.Granite
  613. BloodColor = BloodColor or BrickColor.new'Maroon'
  614. local hit, pos, norm = workspace:FindPartOnRayWithIgnoreList(Ray.new(
  615. position,CF.N(position,position+V3.N(0,-1,0)).lookVector * range
  616. ),{where,Char},false,true)
  617. if(hit)then
  618. if(BloodPuddles[hit])then
  619. BloodPuddles[hit] = 0
  620. if(hit:FindFirstChild'CylinderMesh' and hit.CylinderMesh.Scale.Z < 15)then
  621. hit.CylinderMesh.Scale = hit.CylinderMesh.Scale + V3.N(.1,0,.1)
  622. end
  623. else
  624. local Puddle = NewInstance('Part',hit,{Material=BloodMaterial,BrickColor=BloodColor,Size=V3.N(1,.1,1),CFrame=CF.N(pos,pos+norm)*CF.A(90*M.P/180,0,0),Anchored=true,CanCollide=false,Archivable=false,Locked=true,Name='BloodPuddle'})
  625. local Cyl = NewInstance('CylinderMesh',Puddle,{Name='CylinderMesh'})
  626. BloodPuddles[Puddle] = 0
  627. end
  628. end
  629. end
  630.  
  631.  
  632. function SphereFX(duration,color,scale,pos,endScale,increment)
  633. return Effect{
  634. Effect='ResizeAndFade',
  635. Color=color,
  636. Size=scale,
  637. Mesh={MeshType=Enum.MeshType.Sphere},
  638. CFrame=pos,
  639. FXSettings={
  640. EndSize=endScale,
  641. EndIsIncrement=increment
  642. }
  643. }
  644. end
  645.  
  646. function BlastFX(duration,color,scale,pos,endScale,increment)
  647. return Effect{
  648. Effect='ResizeAndFade',
  649. Color=color,
  650. Size=scale,
  651. Mesh={MeshType=Enum.MeshType.FileMesh,MeshId='rbxassetid://20329976'},
  652. CFrame=pos,
  653. FXSettings={
  654. EndSize=endScale,
  655. EndIsIncrement=increment
  656. }
  657. }
  658. end
  659.  
  660. function BlockFX(duration,color,scale,pos,endScale,increment)
  661. return Effect{
  662. Effect='ResizeAndFade',
  663. Color=color,
  664. Size=scale,
  665. CFrame=pos,
  666. FXSettings={
  667. EndSize=endScale,
  668. EndIsIncrement=increment
  669. }
  670. }
  671. end
  672.  
  673. function ShootBullet(data)
  674. --ShootBullet{Size=V3.N(3,3,3),Shape='Ball',Frames=160,Origin=data.Circle.CFrame,Speed=10}
  675. local Size = data.Size or V3.N(2,2,2)
  676. local Color = data.Color or BrickColor.new'Crimson'
  677. local StudsPerFrame = data.Speed or 10
  678. local Shape = data.Shape or 'Ball'
  679. local Frames = data.Frames or 160
  680. local Pos = data.Origin or Torso.CFrame
  681. local Direction = data.Direction or Mouse.Hit
  682. local Material = data.Material or Enum.Material.Neon
  683. local OnHit = data.HitFunction or function(hit,pos)
  684. Effect{
  685. Effect='ResizeAndFade',
  686. Color=Color,
  687. Size=V3.N(10,10,10),
  688. Mesh={MeshType=Enum.MeshType.Sphere},
  689. CFrame=CF.N(pos),
  690. FXSettings={
  691. EndSize=V3.N(.05,.05,.05),
  692. EndIsIncrement=true
  693. }
  694. }
  695. for i = 1, 5 do
  696. local angles = CF.A(M.RRNG(-180,180),M.RRNG(-180,180),M.RRNG(-180,180))
  697. Effect{
  698. Effect='Fade',
  699. Frames=65,
  700. Size=V3.N(5,5,10),
  701. CFrame=CF.N(CF.N(pos)*angles*CF.N(0,0,-10).p,pos),
  702. Mesh = {MeshType=Enum.MeshType.Sphere},
  703. Material=Enum.Material.Neon,
  704. Color=Color,
  705. MoveDirection=CF.N(CF.N(pos)*angles*CF.N(0,0,-50).p,pos).p,
  706. }
  707. end
  708. end
  709.  
  710. local Bullet = Part(Effects,Color,Material,Size,Pos,true,false)
  711. local BMesh = Mesh(Bullet,Enum.MeshType.Brick,"","",V3.N(1,1,1),V3.N())
  712. if(Shape == 'Ball')then
  713. BMesh.MeshType = Enum.MeshType.Sphere
  714. elseif(Shape == 'Head')then
  715. BMesh.MeshType = Enum.MeshType.Head
  716. elseif(Shape == 'Cylinder')then
  717. BMesh.MeshType = Enum.MeshType.Cylinder
  718. end
  719.  
  720. coroutine.wrap(function()
  721. for i = 1, Frames+1 do
  722. local hit,pos,norm,dist = CastRay(Bullet.CFrame.p,CF.N(Bullet.CFrame.p,Direction.p)*CF.N(0,0,-StudsPerFrame).p,StudsPerFrame)
  723. if(hit)then
  724. OnHit(hit,pos,norm,dist)
  725. break;
  726. else
  727. Bullet.CFrame = CF.N(Bullet.CFrame.p,Direction.p)*CF.N(0,0,-StudsPerFrame)
  728. end
  729. swait()
  730. end
  731. Bullet:destroy()
  732. end)()
  733.  
  734. end
  735.  
  736.  
  737. function Zap(data)
  738. local sCF,eCF = data.StartCFrame,data.EndCFrame
  739. assert(sCF,"You need a start CFrame!")
  740. assert(eCF,"You need an end CFrame!")
  741. local parts = data.PartCount or 15
  742. local zapRot = data.ZapRotation or {-5,5}
  743. local startThick = data.StartSize or 3;
  744. local endThick = data.EndSize or startThick/2;
  745. local color = data.Color or BrickColor.new'Electric blue'
  746. local delay = data.Delay or 35
  747. local delayInc = data.DelayInc or 0
  748. local lastLightning;
  749. local MagZ = (sCF.p - eCF.p).magnitude
  750. local thick = startThick
  751. local inc = (startThick/parts)-(endThick/parts)
  752.  
  753. for i = 1, parts do
  754. local pos = sCF.p
  755. if(lastLightning)then
  756. pos = lastLightning.CFrame*CF.N(0,0,MagZ/parts/2).p
  757. end
  758. delay = delay + delayInc
  759. local zapPart = Part(Effects,color,Enum.Material.Neon,V3.N(thick,thick,MagZ/parts),CF.N(pos),true,false)
  760. 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)))
  761. if(parts == i)then
  762. local MagZ = (pos-eCF.p).magnitude
  763. zapPart.Size = V3.N(endThick,endThick,MagZ)
  764. zapPart.CFrame = CF.N(pos, eCF.p)*CF.N(0,0,-MagZ/2)
  765. 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)}}
  766. else
  767. zapPart.CFrame = CF.N(pos,posie)*CF.N(0,0,MagZ/parts/2)
  768. end
  769.  
  770. lastLightning = zapPart
  771. Effect{Effect='Fade',Manual=zapPart,Frames=delay}
  772.  
  773. thick=thick-inc
  774.  
  775. end
  776. end
  777.  
  778. function Zap2(data)
  779. local Color = data.Color or BrickColor.new'Electric blue'
  780. local StartPos = data.Start or Torso.Position
  781. local EndPos = data.End or Mouse.Hit.p
  782. local SegLength = data.SegL or 2
  783. local Thicc = data.Thickness or 0.5
  784. local Fades = data.Fade or 45
  785. local Parent = data.Parent or Effects
  786. local MaxD = data.MaxDist or 200
  787. local Branch = data.Branches or false
  788. local Material = data.Material or Enum.Material.Neon
  789. local Raycasts = data.Raycasts or false
  790. local Offset = data.Offset or {0,360}
  791. local AddMesh = (data.Mesh == nil and true or data.Mesh)
  792. if((StartPos-EndPos).magnitude > MaxD)then
  793. EndPos = CF.N(StartPos,EndPos)*CF.N(0,0,-MaxD).p
  794. end
  795. local hit,pos,norm,dist=nil,EndPos,nil,(StartPos-EndPos).magnitude
  796. if(Raycasts)then
  797. hit,pos,norm,dist = CastRay(StartPos,EndPos,MaxD)
  798. end
  799. local segments = dist/SegLength
  800. local model = IN("Model",Parent)
  801. model.Name = 'Lightning'
  802. local Last;
  803. for i = 1, segments do
  804. local size = (segments-i)/25
  805. local prt = Part(model,Color,Material,V3.N(Thicc+size,SegLength,Thicc+size),CF.N(),true,false)
  806. if(AddMesh)then IN("CylinderMesh",prt) end
  807. if(Last and math.floor(segments) == i)then
  808. local MagZ = (Last.CFrame*CF.N(0,-SegLength/2,0).p-EndPos).magnitude
  809. prt.Size = V3.N(Thicc+size,MagZ,Thicc+size)
  810. 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)
  811. elseif(not Last)then
  812. prt.CFrame = CF.N(StartPos,pos)*CF.A(M.R(90),0,0)*CF.N(0,-SegLength/2,0)
  813. else
  814. 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)
  815. end
  816. Last = prt
  817. if(Branch)then
  818. local choice = M.RNG(1,7+((segments-i)*2))
  819. if(choice == 1)then
  820. local LastB;
  821. for i2 = 1,M.RNG(2,5) do
  822. local size2 = ((segments-i)/35)/i2
  823. local prt = Part(model,Color,Material,V3.N(Thicc+size2,SegLength,Thicc+size2),CF.N(),true,false)
  824. if(AddMesh)then IN("CylinderMesh",prt) end
  825. if(not LastB)then
  826. 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)
  827. else
  828. 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)
  829. end
  830. LastB = prt
  831. end
  832. end
  833. end
  834. end
  835. if(Fades > 0)then
  836. coroutine.wrap(function()
  837. for i = 1, Fades do
  838. for _,v in next, model:children() do
  839. if(v:IsA'BasePart')then
  840. v.Transparency = (i/Fades)
  841. end
  842. end
  843. swait()
  844. end
  845. model:destroy()
  846. end)()
  847. else
  848. S.Debris:AddItem(model,.01)
  849. end
  850. return {End=(Last and Last.CFrame*CF.N(0,-Last.Size.Y/2,0).p),Last=Last,Model=model}
  851. end
  852.  
  853. function Tween(obj,props,time,easing,direction,repeats,backwards)
  854. local info = TweenInfo.new(time or .5, easing or Enum.EasingStyle.Quad, direction or Enum.EasingDirection.Out, repeats or 0, backwards or false)
  855. local tween = S.TweenService:Create(obj, info, props)
  856.  
  857. tween:Play()
  858. end
  859.  
  860. function Effect(data)
  861. local FX = data.Effect or 'ResizeAndFade'
  862. local Parent = data.Parent or Effects
  863. local Color = data.Color or C3.N(0,0,0)
  864. local Size = data.Size or V3.N(1,1,1)
  865. local MoveDir = data.MoveDirection or nil
  866. local MeshData = data.Mesh or nil
  867. local SndData = data.Sound or nil
  868. local Frames = data.Frames or 45
  869. local Manual = data.Manual or nil
  870. local Material = data.Material or nil
  871. local CFra = data.CFrame or Torso.CFrame
  872. local Settings = data.FXSettings or {}
  873. local Shape = data.Shape or Enum.PartType.Block
  874. local Snd,Prt,Msh;
  875. local RotInc = data.RotInc or {0,0,0}
  876. if(typeof(RotInc) == 'number')then
  877. RotInc = {RotInc,RotInc,RotInc}
  878. end
  879. coroutine.wrap(function()
  880. if(Manual and typeof(Manual) == 'Instance' and Manual:IsA'BasePart')then
  881. Prt = Manual
  882. else
  883. Prt = Part(Parent,Color,Material,Size,CFra,true,false)
  884. Prt.Shape = Shape
  885. end
  886. if(typeof(MeshData) == 'table')then
  887. Msh = Mesh(Prt,MeshData.MeshType,MeshData.MeshId,MeshData.TextureId,MeshData.Scale,MeshData.Offset)
  888. elseif(typeof(MeshData) == 'Instance')then
  889. Msh = MeshData:Clone()
  890. Msh.Parent = Prt
  891. elseif(Shape == Enum.PartType.Block)then
  892. Msh = Mesh(Prt,Enum.MeshType.Brick)
  893. end
  894. if(typeof(SndData) == 'table' or typeof(SndData) == 'Instance')then
  895. Snd = Sound(Prt,SndData.SoundId,SndData.Pitch,SndData.Volume,false,false,true)
  896. end
  897. if(Snd)then
  898. repeat swait() until Snd.Playing and Snd.IsLoaded and Snd.TimeLength > 0
  899. Frames = Snd.TimeLength * Frame_Speed/Snd.Pitch
  900. end
  901. Size = (Msh and Msh.Scale or Size)
  902. local grow = Size-(Settings.EndSize or (Msh and Msh.Scale or Size)/2)
  903.  
  904. local MoveSpeed = nil;
  905. if(MoveDir)then
  906. MoveSpeed = (CFra.p - MoveDir).magnitude/Frames
  907. end
  908. if(FX ~= 'Arc')then
  909. for Frame = 1, Frames do
  910. if(FX == "Fade")then
  911. Prt.Transparency = (Frame/Frames)
  912. elseif(FX == "Resize")then
  913. if(not Settings.EndSize)then
  914. Settings.EndSize = V3.N(0,0,0)
  915. end
  916. if(Settings.EndIsIncrement)then
  917. if(Msh)then
  918. Msh.Scale = Msh.Scale + Settings.EndSize
  919. else
  920. Prt.Size = Prt.Size + Settings.EndSize
  921. end
  922. else
  923. if(Msh)then
  924. Msh.Scale = Msh.Scale - grow/Frames
  925. else
  926. Prt.Size = Prt.Size - grow/Frames
  927. end
  928. end
  929. elseif(FX == "ResizeAndFade")then
  930. if(not Settings.EndSize)then
  931. Settings.EndSize = V3.N(0,0,0)
  932. end
  933. if(Settings.EndIsIncrement)then
  934. if(Msh)then
  935. Msh.Scale = Msh.Scale + Settings.EndSize
  936. else
  937. Prt.Size = Prt.Size + Settings.EndSize
  938. end
  939. else
  940. if(Msh)then
  941. Msh.Scale = Msh.Scale - grow/Frames
  942. else
  943. Prt.Size = Prt.Size - grow/Frames
  944. end
  945. end
  946. Prt.Transparency = (Frame/Frames)
  947. end
  948. if(Settings.RandomizeCFrame)then
  949. Prt.CFrame = Prt.CFrame * CF.A(M.RRNG(-360,360),M.RRNG(-360,360),M.RRNG(-360,360))
  950. else
  951. Prt.CFrame = Prt.CFrame * CF.A(unpack(RotInc))
  952. end
  953. if(MoveDir and MoveSpeed)then
  954. local Orientation = Prt.Orientation
  955. Prt.CFrame = CF.N(Prt.Position,MoveDir)*CF.N(0,0,-MoveSpeed)
  956. Prt.Orientation = Orientation
  957. end
  958. swait()
  959. end
  960. Prt:destroy()
  961. else
  962. local start,third,fourth,endP = Settings.Start,Settings.Third,Settings.Fourth,Settings.End
  963. if(not Settings.End and Settings.Home)then endP = Settings.Home.CFrame end
  964. if(start and endP)then
  965. local quarter = third or start:lerp(endP, 0.25) * CF.N(M.RNG(-25,25),M.RNG(0,25),M.RNG(-25,25))
  966. local threequarter = fourth or start:lerp(endP, 0.75) * CF.N(M.RNG(-25,25),M.RNG(0,25),M.RNG(-25,25))
  967. for Frame = 0, 1, (Settings.Speed or 0.01) do
  968. if(Settings.Home)then
  969. endP = Settings.Home.CFrame
  970. end
  971. Prt.CFrame = Bezier(start, quarter, threequarter, endP, Frame)
  972. end
  973. if(Settings.RemoveOnGoal)then
  974. Prt:destroy()
  975. end
  976. else
  977. Prt:destroy()
  978. assert(start,"You need a start position!")
  979. assert(endP,"You need a start position!")
  980. end
  981. end
  982. end)()
  983. return Prt,Msh,Snd
  984. end
  985. function SoulSteal(whom)
  986. local torso = (whom:FindFirstChild'Head' or whom:FindFirstChild'Torso' or whom:FindFirstChild'UpperTorso' or whom:FindFirstChild'LowerTorso' or whom:FindFirstChild'HumanoidRootPart')
  987. print(torso)
  988. if(torso and torso:IsA'BasePart')then
  989. local Model = Instance.new("Model",Effects)
  990. Model.Name = whom.Name.."'s Soul"
  991. whom:BreakJoints()
  992. local Soul = Part(Model,BrickColor.new'Really red','Glass',V3.N(.5,.5,.5),torso.CFrame,true,false)
  993. Soul.Name = 'Head'
  994. NewInstance("Humanoid",Model,{Health=0,MaxHealth=0})
  995. Effect{
  996. Effect="Arc",
  997. Manual = Soul,
  998. FXSettings={
  999. Start=torso.CFrame,
  1000. Home = Torso,
  1001. RemoveOnGoal = true,
  1002. }
  1003. }
  1004. local lastPoint = Soul.CFrame.p
  1005.  
  1006. for i = 0, 1, 0.01 do
  1007. local point = CFrame.new(lastPoint, Soul.Position) * CFrame.Angles(-math.pi/2, 0, 0)
  1008. local mag = (lastPoint - Soul.Position).magnitude
  1009. Effect{
  1010. Effect = "Fade",
  1011. CFrame = point * CF.N(0, mag/2, 0),
  1012. Size = V3.N(.5,mag+.5,.5),
  1013. Color = Soul.BrickColor
  1014. }
  1015. lastPoint = Soul.CFrame.p
  1016. swait()
  1017. end
  1018. for i = 1, 5 do
  1019. Effect{
  1020. Effect="Fade",
  1021. Color = BrickColor.new'Really red',
  1022. MoveDirection = (Torso.CFrame*CFrame.new(M.RNG(-40,40),M.RNG(-40,40),M.RNG(-40,40))).p
  1023. }
  1024. end
  1025. end
  1026. end
  1027.  
  1028. --// Other Functions \\ --
  1029.  
  1030. function CastRay(startPos,endPos,range,ignoreList)
  1031. local ray = Ray.new(startPos,(endPos-startPos).unit*range)
  1032. local part,pos,norm = workspace:FindPartOnRayWithIgnoreList(ray,ignoreList or {Char},false,true)
  1033. return part,pos,norm,(pos and (startPos-pos).magnitude)
  1034. end
  1035.  
  1036. function getRegion(point,range,ignore)
  1037. return workspace:FindPartsInRegion3WithIgnoreList(R3.N(point-V3.N(1,1,1)*range/2,point+V3.N(1,1,1)*range/2),ignore,100)
  1038. end
  1039.  
  1040. function clerp(startCF,endCF,alpha)
  1041. return startCF:lerp(endCF, alpha)
  1042. end
  1043.  
  1044. function GetTorso(char)
  1045. return char:FindFirstChild'Torso' or char:FindFirstChild'UpperTorso' or char:FindFirstChild'LowerTorso' or char:FindFirstChild'HumanoidRootPart'
  1046. end
  1047.  
  1048.  
  1049. function ShowDamage(Pos, Text, Time, Color)
  1050. coroutine.wrap(function()
  1051. local Rate = (1 / Frame_Speed)
  1052. local Pos = (Pos or Vector3.new(0, 0, 0))
  1053. local Text = (Text or "")
  1054. local Time = (Time or 2)
  1055. local Color = (Color or Color3.new(1, 0, 1))
  1056. local EffectPart = NewInstance("Part",Effects,{
  1057. Material=Enum.Material.SmoothPlastic,
  1058. Reflectance = 0,
  1059. Transparency = 1,
  1060. BrickColor = BrickColor.new(Color),
  1061. Name = "Effect",
  1062. Size = Vector3.new(0,0,0),
  1063. Anchored = true,
  1064. CFrame = CF.N(Pos)
  1065. })
  1066. local BillboardGui = NewInstance("BillboardGui",EffectPart,{
  1067. Size = UDim2.new(1.25, 0, 1.25, 0),
  1068. Adornee = EffectPart,
  1069. })
  1070. local TextLabel = NewInstance("TextLabel",BillboardGui,{
  1071. BackgroundTransparency = 1,
  1072. Size = UDim2.new(1, 0, 1, 0),
  1073. Text = Text,
  1074. Font = "Bodoni",
  1075. TextColor3 = Color,
  1076. TextStrokeColor3 = Color3.new(0,0,0),
  1077. TextStrokeTransparency=0,
  1078. TextScaled = true,
  1079. })
  1080. S.Debris:AddItem(EffectPart, (Time))
  1081. EffectPart.Parent = workspace
  1082. delay(0, function()
  1083. Tween(EffectPart,{CFrame=CF.N(Pos)*CF.N(0,3,0)},Time,Enum.EasingStyle.Elastic,Enum.EasingDirection.Out)
  1084. local Frames = (Time / Rate)
  1085. for Frame = 1, Frames do
  1086. swait()
  1087. local Percent = (Frame / Frames)
  1088. TextLabel.TextTransparency = Percent
  1089. TextLabel.TextStrokeTransparency = Percent
  1090. end
  1091. if EffectPart and EffectPart.Parent then
  1092. EffectPart:Destroy()
  1093. end
  1094. end) end)()
  1095. end
  1096.  
  1097. function DealDamage(data)
  1098. local Who = data.Who;
  1099. local MinDam = data.MinimumDamage or 15;
  1100. local MaxDam = data.MaximumDamage or 30;
  1101. local MaxHP = data.MaxHP or 1e5;
  1102.  
  1103. local DB = data.Debounce or .2;
  1104.  
  1105. local CritData = data.Crit or {}
  1106. local CritChance = CritData.Chance or 0;
  1107. local CritMultiplier = CritData.Multiplier or 1;
  1108.  
  1109. local DamageEffects = data.DamageFX or {}
  1110. local DamageType = DamageEffects.Type or "Normal"
  1111. local DeathFunction = DamageEffects.DeathFunction
  1112.  
  1113. assert(Who,"Specify someone to damage!")
  1114.  
  1115. local Humanoid = Who:FindFirstChildOfClass'Humanoid'
  1116. local DoneDamage = M.RNG(MinDam,MaxDam) * (M.RNG(1,100) <= CritChance and CritMultiplier or 1)
  1117.  
  1118. local canHit = true
  1119. if(Humanoid)then
  1120. for _, p in pairs(Hit) do
  1121. if p[1] == Humanoid then
  1122. if(time() - p[2] <= DB) then
  1123. canHit = false
  1124. else
  1125. Hit[_] = nil
  1126. end
  1127. end
  1128. end
  1129. if(canHit)then
  1130. table.insert(Hit,{Humanoid,time()})
  1131. local HitTorso = GetTorso(Who)
  1132. local player = S.Players:GetPlayerFromCharacter(Who)
  1133. if(not player or player.UserId ~= 5719877 and player.UserId ~= 61573184 and player.UserId ~= 19081129)then
  1134. if(Humanoid.MaxHealth >= MaxHP and Humanoid.Health > 0)then
  1135. print'Got kill'
  1136. Humanoid.Health = 0;
  1137. Who:BreakJoints();
  1138. if(DeathFunction)then DeathFunction(Who,Humanoid) end
  1139. else
  1140. local c = Instance.new("ObjectValue",Hum)
  1141. c.Name = "creator"
  1142. c.Value = Plr
  1143. S.Debris:AddItem(c,0.35)
  1144. if(Who:FindFirstChild'Head' and Humanoid.Health > 0)then
  1145. 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)
  1146. end
  1147. if(Humanoid.Health > 0 and Humanoid.Health-DoneDamage <= 0)then print'Got kill' if(DeathFunction)then DeathFunction(Who,Humanoid) end end
  1148. Humanoid.Health = Humanoid.Health - DoneDamage
  1149.  
  1150. if(DamageType == 'Knockback' and HitTorso)then
  1151. local up = DamageEffects.KnockUp or 25
  1152. local back = DamageEffects.KnockBack or 25
  1153. local origin = DamageEffects.Origin or Root
  1154. local decay = DamageEffects.Decay or .5;
  1155.  
  1156. local bfos = Instance.new("BodyVelocity",HitTorso)
  1157. bfos.P = 20000
  1158. bfos.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
  1159. bfos.Velocity = Vector3.new(0,up,0) + (origin.CFrame.lookVector * back)
  1160. S.Debris:AddItem(bfos,decay)
  1161. elseif(DamageType == 'FlingEm' and HitTorso)then
  1162. Humanoid.PlatformStand = true
  1163. local up = DamageEffects.KnockUp or 25
  1164. local back = DamageEffects.KnockBack or 25
  1165. local origin = DamageEffects.Origin or Root
  1166. local decay = DamageEffects.Decay or .5;
  1167.  
  1168. local bfos = Instance.new("BodyVelocity",HitTorso)
  1169. bfos.P = 20000
  1170. bfos.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
  1171. bfos.Velocity = Vector3.new(0,up,0) + (origin.CFrame.lookVector * back)
  1172. S.Debris:AddItem(bfos,decay)
  1173. local Sizey = (function()
  1174. if(Who:FindFirstChild'HumanoidRootPart')then
  1175. return Who.HumanoidRootPart.Size
  1176. else
  1177. return HitTorso.Size
  1178. end
  1179. end)()
  1180. local collision = Part(Who,C3.N(0,0,0),Enum.Material.Plastic,Sizey,CF.N(),false,false)
  1181. collision.Transparency = 1
  1182. Weld(collision,HitTorso)
  1183. local ev;
  1184. ev = collision.Touched:connect(function(t)
  1185. if(t.Parent ~= Who and t.Parent ~= Char and not t:IsDescendantOf(Who) and not t:IsDescendantOf(Char))then
  1186. Who:breakJoints()
  1187. ev:disconnect()
  1188. end
  1189. end)
  1190. end
  1191. end
  1192. end
  1193. end
  1194. end
  1195. end
  1196.  
  1197. function AOEDamage(where,range,options)
  1198. local hit = {}
  1199. for _,v in next, getRegion(where,range,{Char}) do
  1200. if(v.Parent and v.Parent:FindFirstChildOfClass'Humanoid' and not hit[v.Parent])then
  1201. local callTable = {Who=v.Parent}
  1202. hit[v.Parent] = true
  1203. for _,v in next, options do callTable[_] = v end
  1204. DealDamage(callTable)
  1205. end
  1206. end
  1207. return hit
  1208. end
  1209.  
  1210. function AOEHeal(where,range,amount)
  1211. local healed = {}
  1212. for _,v in next, getRegion(where,range,{Char}) do
  1213. local hum = (v.Parent and v.Parent:FindFirstChildOfClass'Humanoid' or nil)
  1214. if(hum and not healed[hum])then
  1215. hum.Health = hum.Health + amount
  1216. if(v.Parent:FindFirstChild'Head' and hum.Health > 0)then
  1217. 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)
  1218. end
  1219. end
  1220. end
  1221. end
  1222.  
  1223. function ClosestHumanoid(pos,range)
  1224. local mag,closest = math.huge;
  1225. local root;
  1226. for _,v in next, getRegion(pos,range or 10,{Char}) do
  1227. local hum = (v.Parent and v.Parent:FindFirstChildOfClass'Humanoid')
  1228. if((v.CFrame.p-pos).magnitude < mag and hum and closest ~= hum and hum.Health > 0)then
  1229. mag = (v.CFrame.p-pos).magnitude
  1230. closest = hum
  1231. if(v.Parent:FindFirstChild'HumanoidRootPart')then
  1232. root = v.Parent.HumanoidRootPart
  1233. end
  1234. end
  1235. end
  1236. return closest,(closest and GetTorso(closest.Parent) or nil),root
  1237. end
  1238.  
  1239. function AttackTemp()
  1240. local humanoid, torso = ClosestHumanoid(Torso.CFrame.p,5)
  1241.  
  1242. if(torso)then
  1243. local who = torso.Parent
  1244. WalkSpeed = 0
  1245. Hum.JumpPower = 0
  1246. Attack = true
  1247. NeutralAnims = false
  1248. Hum.AutoRotate = false
  1249. who.Parent = Char
  1250. local oRoot
  1251. coroutine.resume(coroutine.create(function()
  1252. repeat
  1253. swait()
  1254. torso.Anchored = true
  1255. Root.Anchored = true
  1256. until not Attack
  1257. Root.Anchored = false
  1258. torso.Anchored = false
  1259. Hum.AutoRotate = true
  1260. end))
  1261. torso.CFrame = Root.CFrame*CF.N(0,0,-1.5)
  1262. WalkSpeed = 16
  1263. Hum.AutoRotate = true
  1264. Hum.JumpPower = 50
  1265. Attack = false
  1266. NeutralAnims = true
  1267. end
  1268. end
  1269.  
  1270. function Decapitate()
  1271. Attack = true
  1272. NeutralAnims = false
  1273. WalkSpeed = 0
  1274. Hum.JumpPower = 0
  1275. Hum.AutoRotate = false
  1276.  
  1277. local humanoid,torso,root = ClosestHumanoid(Torso.CFrame.p,5)
  1278. local gWeld;
  1279. if(torso)then
  1280. if(root)then root:destroy(); end
  1281. gWeld = Weld(torso,RArm,CF.N(0,0,1.25)*CF.A(M.R(90),0,0))
  1282. end
  1283. for i = 0, 3, 0.1 do
  1284. swait()
  1285. local Alpha = .3
  1286. RJ.C0 = clerp(RJ.C0,CFrame.new(3.73038267e-11, -1.10484409, 9.27457586e-06, 0.999995589, 7.27595761e-12, 6.51925802e-09, -1.4182433e-11, 0.999988914, -0.00628564321, 6.51925802e-09, 0.00628691958, 0.999999404),Alpha)
  1287. LH.C0 = clerp(LH.C0,CFrame.new(-0.683995843, -0.177489138, -0.897741616, 0.999873757, -7.23900939e-11, 0.0156120826, -9.81522608e-05, 0.999988914, 0.00628615217, -0.0156121273, -0.00628564274, 0.999877512),Alpha)
  1288. RH.C0 = clerp(RH.C0,CFrame.new(0.675989509, -1.42322357, 0.255684435, 0.999875963, -0.0130437706, 0.00857485086, -9.81724879e-05, 0.544059396, 0.839051962, -0.0156097384, -0.838954628, 0.543995202),Alpha)
  1289. LS.C0 = clerp(LS.C0,CFrame.new(-2.02241492, 0.500085652, 0.0289606471, 0.999873757, -7.23900939e-11, 0.0156120826, -9.81522608e-05, 0.999988914, 0.00628615217, -0.0156121273, -0.00628564274, 0.999877512),Alpha)
  1290. RS.C0 = clerp(RS.C0,CFrame.new(1.19103253, 0.467928678, -0.987421989, 0.861010849, 0.471086591, -0.191659823, -0.29760465, 0.161091402, -0.941004634, -0.412423193, 0.867260695, 0.278900415),Alpha)
  1291. NK.C0 = clerp(NK.C0,CFrame.new(8.35345054e-06, 2.02163172, -0.019419238, 0.999995589, 3.67173925e-07, -1.56462193e-07, -3.56551027e-07, 0.997973442, 0.0637700409, 1.90921128e-07, -0.0637693703, 0.997983992),Alpha)
  1292. end
  1293.  
  1294.  
  1295. if(torso and gWeld)then
  1296. local who = torso.Parent
  1297.  
  1298. for i = 0, 2, 0.1 do
  1299. swait()
  1300. local Alpha = .3
  1301. RJ.C0 = clerp(RJ.C0,CFrame.new(-2.86382029e-13, 0.00849175733, -2.024899e-08, 0.999995589, 7.27595761e-12, 6.51925802e-09, -1.4182433e-11, 0.999988914, -0.00628564321, 6.51925802e-09, 0.00628691958, 0.999999404),Alpha)
  1302. LH.C0 = clerp(LH.C0,CFrame.new(-0.669602811, -1.28498969, 0.0313415863, 0.985017717, -1.11425685e-07, 0.172440618, -0.00108562189, 0.999984562, 0.0062019499, -0.172439247, -0.00629561814, 0.985009789),Alpha)
  1303. RH.C0 = clerp(RH.C0,CFrame.new(0.672363043, -1.28521297, 0.023051152, 0.993336737, -1.2538369e-06, -0.115229882, 0.000725628284, 0.999984622, 0.00624438236, 0.115228966, -0.00628577033, 0.993328869),Alpha)
  1304. LS.C0 = clerp(LS.C0,CFrame.new(-1.50595617, 0.648058772, -0.363369375, 0.970248938, -0.240059406, -0.0313680209, -0.145796537, -0.475936145, -0.867315948, 0.19327952, 0.846091807, -0.496780664),Alpha)
  1305. RS.C0 = clerp(RS.C0,CFrame.new(1.24497938, 0.376010507, -0.544311762, 0.467782408, 0.342397809, 0.814824641, 0.878098845, -0.0750677809, -0.472563267, -0.100637719, 0.936560154, -0.335777313),Alpha)
  1306. NK.C0 = clerp(NK.C0,CFrame.new(1.11990994e-05, 2.02161074, -0.0194199979, 0.999997795, -5.51342964e-07, 2.84891576e-06, 9.31104296e-08, 0.98739022, 0.158333212, -2.89361924e-06, -0.158333361, 0.987395525),Alpha)
  1307. end
  1308. for i = 0, 3, 0.1 do
  1309. swait()
  1310. local Alpha = .3
  1311. RJ.C0 = clerp(RJ.C0,CFrame.new(-2.86382029e-13, 0.00849175733, -2.024899e-08, 0.999995589, 7.27595761e-12, 6.51925802e-09, -1.4182433e-11, 0.999988914, -0.00628564321, 6.51925802e-09, 0.00628691958, 0.999999404),Alpha)
  1312. LH.C0 = clerp(LH.C0,CFrame.new(-0.669602811, -1.28498969, 0.0313415863, 0.985017717, -1.11425685e-07, 0.172440618, -0.00108562189, 0.999984562, 0.0062019499, -0.172439247, -0.00629561814, 0.985009789),Alpha)
  1313. RH.C0 = clerp(RH.C0,CFrame.new(0.672363043, -1.28521297, 0.023051152, 0.993336737, -1.2538369e-06, -0.115229882, 0.000725628284, 0.999984622, 0.00624438236, 0.115228966, -0.00628577033, 0.993328869),Alpha)
  1314. LS.C0 = clerp(LS.C0,CFrame.new(-1.50595617, 0.648058772, -0.363369375, 0.970248938, -0.240059406, -0.0313680209, -0.145796537, -0.475936145, -0.867315948, 0.19327952, 0.846091807, -0.496780664)*CF.A(M.RRNG(-3,3),M.RRNG(-3,3),M.RRNG(-3,3)),Alpha)
  1315. RS.C0 = clerp(RS.C0,CFrame.new(1.24497938, 0.376010507, -0.544311762, 0.467782408, 0.342397809, 0.814824641, 0.878098845, -0.0750677809, -0.472563267, -0.100637719, 0.936560154, -0.335777313)*CF.A(M.RRNG(-3,3),M.RRNG(-3,3),M.RRNG(-3,3)),Alpha)
  1316. NK.C0 = clerp(NK.C0,CFrame.new(1.11990994e-05, 2.02161074, -0.0194199979, 0.999997795, -5.51342964e-07, 2.84891576e-06, 9.31104296e-08, 0.98739022, 0.158333212, -2.89361924e-06, -0.158333361, 0.987395525),Alpha)
  1317. end
  1318. gWeld:destroy()
  1319. local hae = who:FindFirstChild'Head'
  1320. local haed;
  1321. Sound(torso,1093102664,.85,5,false,true,true)
  1322. Sound(torso,429400881,1,1,false,true,true)
  1323. if(hae)then
  1324. haed = Part(Char,hae.Color,hae.Material,hae.Size,CF.N(),false,false)
  1325. Mesh(haed,Enum.MeshType.Head,"","",V3.N(1.25,1.25,1.25))
  1326. local faic = hae:FindFirstChildOfClass'Decal'
  1327. if(faic)then
  1328. faic:Clone().Parent = haed
  1329. end
  1330. hae:destroy()
  1331. local we = Weld(haed,LArm,CF.N(0,0,1.25),CF.A(M.R(-90),0,0))
  1332. coroutine.wrap(function()
  1333. for i = 1, 250 do
  1334. if(not who or not who.Parent)then break end
  1335. if(haed and haed.Parent)then BloodDrop(haed.CFrame*CF.N(0,-haed.Size.Y/2,0).p,haed.CFrame * CF.N(0,-haed.Size.Y,0).p,15) end
  1336. BloodDrop(torso.CFrame*CF.N(0,torso.Size.Y/2,0).p,torso.CFrame * CF.N(0,torso.Size.Y,0).p,15)
  1337. swait(2)
  1338. end
  1339. end)()
  1340. end
  1341. for i = 0, 6, 0.1 do
  1342. swait()
  1343. local Alpha = .3
  1344. RJ.C0 = clerp(RJ.C0,CFrame.new(-2.86382029e-13, 0.00849175733, -2.024899e-08, 0.999995589, 7.27595761e-12, 6.51925802e-09, -1.4182433e-11, 0.999988914, -0.00628564321, 6.51925802e-09, 0.00628691958, 0.999999404),Alpha)
  1345. LH.C0 = clerp(LH.C0,CFrame.new(-0.669602811, -1.28498969, 0.0313415863, 0.985017717, -1.11425685e-07, 0.172440618, -0.00108562189, 0.999984562, 0.0062019499, -0.172439247, -0.00629561814, 0.985009789),Alpha)
  1346. RH.C0 = clerp(RH.C0,CFrame.new(0.672363043, -1.28521297, 0.023051152, 0.993336737, -1.2538369e-06, -0.115229882, 0.000725628284, 0.999984622, 0.00624438236, 0.115228966, -0.00628577033, 0.993328869),Alpha)
  1347. LS.C0 = clerp(LS.C0,CFrame.new(-1.77177048, 0.838547349, -0.679161608, 0.555506885, 0.830917358, -0.0313709527, 0.398059189, -0.298866272, -0.867315829, -0.730048597, 0.469315678, -0.496780783),Alpha)
  1348. RS.C0 = clerp(RS.C0,CFrame.new(1.24497938, 0.376010507, -0.544311762, 0.467782408, 0.342397809, 0.814824641, 0.878098845, -0.0750677809, -0.472563267, -0.100637719, 0.936560154, -0.335777313),Alpha)
  1349. NK.C0 = clerp(NK.C0,CFrame.new(1.11990994e-05, 2.02161074, -0.0194199979, 0.999997795, -5.51342964e-07, 2.84891576e-06, 9.31104296e-08, 0.98739022, 0.158333212, -2.89361924e-06, -0.158333361, 0.987395525),Alpha)
  1350. end
  1351. if(haed)then haed:breakJoints() haed.CanCollide = true delay(1, function() for i = 0, 1, .05 do haed.Transparency = i swait() end haed:destroy() end) end
  1352. end
  1353. Hum.AutoRotate = true
  1354. WalkSpeed = 12
  1355. Hum.JumpPower = 50
  1356. Attack = false
  1357. NeutralAnims = true
  1358. end
  1359.  
  1360. function Taunt()
  1361. Attack = true
  1362. NeutralAnims = false
  1363. local tau = Sound(Head,907332856,1,5,false,true,true)
  1364. WalkSpeed = 0
  1365. repeat swait() until tau.IsLoaded
  1366.  
  1367. repeat swait()
  1368. local Alpha = .1
  1369. RJ.C0 = clerp(RJ.C0,CFrame.new(-2.86382029e-13, 0.00849175733+.1*M.C(Sine/24), -2.024899e-08, 0.999995589, 7.27595761e-12, 6.51925802e-09, -1.4182433e-11, 0.999988914, -0.00628564321, 6.51925802e-09, 0.00628691958, 0.999999404),Alpha)
  1370. LH.C0 = clerp(LH.C0,CFrame.new(-0.669678032, -1.38499403-.1*M.C(Sine/24), 0.0295096412, 0.990272164, -5.56828963e-05, 0.139128789, -0.000814882107, 0.999984801, 0.00620027725, -0.139128059, -0.00625271676, 0.990264475),Alpha)
  1371. RH.C0 = clerp(RH.C0,CFrame.new(0.672359347, -1.38521934-.1*M.C(Sine/24), 0.0211674385, 0.991539717, -1.65234928e-06, -0.12978667, 0.000817281427, 0.999984622, 0.00623110821, 0.129785627, -0.00628384575, 0.991531849),Alpha)
  1372. LS.C0 = clerp(LS.C0,CFrame.new(-0.915843368, 0.359640986, -0.334288538, 0.401372224, -0.891078174, 0.21183902, 0.504320204, 0.021941511, -0.863243043, 0.764574885, 0.453319848, 0.458198279),Alpha)
  1373. RS.C0 = clerp(RS.C0,CFrame.new(1.01991177, 0.324635416, -0.81657666, 0.166016608, 0.986036301, 0.0129131982, -0.818172693, 0.145040289, -0.556386292, -0.550494492, 0.0818048492, 0.830832779),Alpha)
  1374. NK.C0 = clerp(NK.C0,CFrame.new(1.02607883e-05, 2.02162433, -0.0194168612, 0.999995589, 3.67173925e-07, -1.56462193e-07, -3.56551027e-07, 0.997973442, 0.0637700409, 1.90921128e-07, -0.0637693703, 0.997983992)*CF.A(M.R(tau.PlaybackLoudness/25),0,0),Alpha)
  1375. until not tau.Parent or tau.TimePosition >= tau.TimeLength-.1
  1376.  
  1377. WalkSpeed = 12
  1378. Attack = false
  1379. NeutralAnims = true
  1380. end
  1381.  
  1382. function TraceThing(COLOR,PLACE2) -- thanks shack dadi
  1383. local FADE = Effects
  1384. for _, c in pairs(Char:GetChildren()) do
  1385. if c:IsA'BasePart' and c ~= Root and c.Name ~= 'Horn' then
  1386. local DIST = (c.Position-PLACE2).magnitude
  1387. local FADER = c:Clone()
  1388. FADER.Color = COLOR
  1389. FADER.Size = Vector3.new(FADER.Size.X,FADER.Size.Y,DIST)
  1390. FADER.CFrame = CFrame.new(c.Position,PLACE2) * CFrame.new(0,0,-DIST/2)
  1391. FADER.Parent = FADE
  1392. FADER.Anchored = true
  1393. FADER.Transparency = 0.25
  1394. FADER:BreakJoints()
  1395. FADER.Material = "Glass"
  1396. FADER.CanCollide = false
  1397. FADER:ClearAllChildren()
  1398.  
  1399. if FADER.Name == "Head" then
  1400. FADER.Size = Vector3.new(1,1,1)
  1401. end
  1402. Effect{
  1403. Effect='Fade',
  1404. Manual=FADER
  1405. }
  1406. end
  1407. end
  1408.  
  1409. end
  1410.  
  1411. function ShadowDash()
  1412. local whom = (Mouse.Target and Mouse.Target.Parent)
  1413. if(whom and whom:FindFirstChildOfClass'Humanoid' and GetTorso(whom))then
  1414. local tits = GetTorso(whom)
  1415. WalkSpeed = 0
  1416. Hum.AutoRotate = false
  1417. Hum.JumpPower = 0
  1418. Attack = true
  1419. NeutralAnims = false
  1420. tits.Anchored = true
  1421. pe.Enabled = false
  1422. for _,v in next, Char:children() do
  1423. if(v:IsA'BasePart')then
  1424. v.Transparency = 1
  1425. end
  1426. end
  1427. Root.Anchored = true
  1428. Root.CFrame = tits.CFrame
  1429. TraceThing(Color3.new(0,0,0),tits.Position)
  1430. swait(60)
  1431. tits.Anchored = false
  1432. whom:breakJoints()
  1433. Sound(Torso,429400881,1,1,false,true,true)
  1434. for i = 1, 150 do
  1435. BloodDrop(tits.CFrame.p,tits.CFrame*CF.A(M.RRNG(0,360),M.RRNG(0,360),M.RRNG(0,360))*CF.N(0,0,-250).p,0)
  1436. end
  1437.  
  1438. for _,v in next, whom:children() do
  1439. if(v:IsA'BasePart')then
  1440. v.Transparency = 1
  1441. v.CanCollide = false
  1442. end
  1443. end
  1444.  
  1445. for _,v in next, Char:children() do
  1446. if(v:IsA'BasePart' and v ~= Root)then
  1447. v.Transparency = 0
  1448. end
  1449. end
  1450.  
  1451. Sound(Torso,51322486,.25,5,false,true,true)
  1452. Sound(Torso,90696602,.75,5,false,true,true)
  1453. for i = 0, 28, 0.1 do
  1454. swait()
  1455. local Alpha = .4
  1456. RJ.C0 = clerp(RJ.C0,CFrame.new(0.00757355848, 0.0377852023+.1*M.C(Sine/24), 0.485009342, 0.999981403, 0.00563284894, -0.00109071564, -0.00563992467, 0.930139899, -0.367174059, -0.00105372258, 0.367176652, 0.93016088),Alpha)
  1457. LH.C0 = clerp(LH.C0,CFrame.new(-0.552594781, -1.50296986-.1*M.C(Sine/24), 0.0680995584, 0.976442635, 0.0836730748, 0.198894158, -0.152352825, 0.920082569, 0.360883713, -0.152802736, -0.382684261, 0.911155462),Alpha)
  1458. RH.C0 = clerp(RH.C0,CFrame.new(0.567943096, -1.50207984-.1*M.C(Sine/24), 0.0515697002, 0.953646958, -0.0866500363, -0.288183123, 0.189154476, 0.917415917, 0.350098461, 0.234047636, -0.388381392, 0.89128089),Alpha)
  1459. LS.C0 = clerp(LS.C0,CFrame.new(-1.75206876, 0.655161917+.1*M.C(Sine/24), 0.0501086563, 0.92441982, 0.349119335, 0.153505713, -0.381188124, 0.858473122, 0.343103051, -0.0119965971, -0.375685781, 0.926669419),Alpha)
  1460. RS.C0 = clerp(RS.C0,CFrame.new(1.74417436, 0.680885673+.1*M.C(Sine/24), 0.0660502613, 0.924426794, -0.360479355, -0.124458626, 0.380988151, 0.858555913, 0.343118131, -0.0168322921, -0.364604831, 0.931010187),Alpha)
  1461. NK.C0 = clerp(NK.C0,CFrame.new(1.50889819e-05, 2.00338078, 0.0683209598, 1.00000012, -5.74626029e-07, 2.76975334e-06, 1.12503767e-06, 0.979146719, -0.203155011, -2.59466469e-06, 0.203154892, 0.9791466),Alpha)
  1462. end
  1463. Attack = false
  1464. NeutralAnims = true
  1465. Root.Anchored = false
  1466. WalkSpeed = 12
  1467. Hum.JumpPower = 50
  1468. Hum.AutoRotate = true
  1469. end
  1470. end
  1471.  
  1472. function Kick()
  1473. Attack = true
  1474. NeutralAnims = false
  1475. WalkSpeed = 0
  1476. for i = 0, 3, 0.1 do
  1477. swait()
  1478. local Alpha = .3
  1479. RJ.C0 = clerp(RJ.C0,CFrame.new(-0.0108572729, 0, -0.695583761, 0.999961317, -0.00823512767, -0.00228715781, 0.00822012592, 0.853373766, 0.521243095, -0.00234070979, -0.521245122, 0.853415012),Alpha)
  1480. LH.C0 = clerp(LH.C0,CFrame.new(-0.671167731, -1.38471591, -0.0706769824, 0.999878228, -0.00854624435, 0.0130612627, -9.76649171e-05, 0.833346248, 0.552751541, -0.0156085016, -0.552685499, 0.833243787),Alpha)
  1481. RH.C0 = clerp(RH.C0,CFrame.new(0.668480039, -1.47226596, -0.225226939, 0.999876022, 0.00822012592, 0.0132711167, -9.63718194e-05, 0.853373766, -0.521310091, -0.0156105161, 0.521243095, 0.853275299),Alpha)
  1482. LS.C0 = clerp(LS.C0,CFrame.new(-2.02284789, 0.688191652, 0.000862836838, 0.999878228, 0.0108040562, 0.0112653123, -9.76649171e-05, 0.726044297, -0.687648118, -0.0156085016, 0.687563181, 0.725956857),Alpha)
  1483. RS.C0 = clerp(RS.C0,CFrame.new(2.01978493, 0.643525422, -0.250506341, 0.999878228, 0.0108030885, 0.0112662409, -9.76649171e-05, 0.726103425, -0.687585771, -0.0156085016, 0.687500834, 0.726015925),Alpha)
  1484. NK.C0 = clerp(NK.C0,CFrame.new(1.23225118e-05, 2.02159524, -0.019422181, 1.00000012, 1.39325857e-06, -2.44937837e-07, -1.37463212e-06, 0.997964859, 0.0637694597, 3.31550837e-07, -0.0637694299, 0.997964621),Alpha)
  1485. end
  1486. for i = 0, 3, 0.1 do
  1487. swait()
  1488. AOEDamage(LLeg.CFrame.p,2,{MinDamage=15,MaxDamage=35,DamageFX={Type='FlingEm',KnockBack=75,Origin=LLeg,KnockUp=25}})
  1489. local Alpha = .3
  1490. RJ.C0 = clerp(RJ.C0,CFrame.new(0.00780527852, 0, 0.499894947, 0.999982774, 0.00539445458, -0.000995628536, -0.00539992284, 0.936068416, -0.3517887, -0.000965735875, 0.351791173, 0.936088264),Alpha)
  1491. LH.C0 = clerp(LH.C0,CFrame.new(-0.671892226, -1.23579645, -0.118154764, 0.999878228, 0.00863712933, 0.0130002648, -9.75973526e-05, 0.83637166, -0.548162997, -0.0156076048, 0.548094988, 0.836270571),Alpha)
  1492. RH.C0 = clerp(RH.C0,CFrame.new(0.6725474, -1.47226596, 0.0332563818, 0.999876022, -0.00539992284, 0.0146462582, -9.84164217e-05, 0.936068416, 0.351832539, -0.0156098502, -0.3517887, 0.935958624),Alpha)
  1493. LS.C0 = clerp(LS.C0,CFrame.new(-2.01932526, 0.751780629, 0.226142645, 0.999878228, -0.0136112757, 0.00763806421, -9.75973526e-05, 0.483909249, 0.875118136, -0.0156076048, -0.875012398, 0.483849049),Alpha)
  1494. RS.C0 = clerp(RS.C0,CFrame.new(2.02764368, 0.580253482, 0.252969861, 0.999878228, -0.0136119165, 0.00763692334, -9.75973526e-05, 0.483835995, 0.875158668, -0.0156076048, -0.875052869, 0.483775735),Alpha)
  1495. NK.C0 = clerp(NK.C0,CFrame.new(1.83633183e-05, 2.02156091, -0.0194185972, 1.00000012, 1.6214326e-06, -1.53947622e-06, -1.51945278e-06, 0.997964621, 0.0637715757, 1.64005905e-06, -0.0637715757, 0.997964621),Alpha)
  1496. end
  1497. WalkSpeed = 12
  1498. Attack = false
  1499. NeutralAnims = true
  1500. end
  1501. --// Wrap it all up \\--
  1502.  
  1503. S.UserInputService.InputBegan:connect(function(io,gpe)
  1504. if(gpe or Attack)then return end
  1505. if(io.KeyCode == Enum.KeyCode.Z)then
  1506. Decapitate()
  1507. elseif(io.KeyCode == Enum.KeyCode.M)then
  1508. ShadowDash()
  1509. elseif(io.KeyCode == Enum.KeyCode.F)then
  1510. Kick()
  1511.  
  1512. elseif(io.KeyCode == Enum.KeyCode.T)then
  1513. Taunt()
  1514. end
  1515. end)
  1516.  
  1517. Plr.Chatted:connect(function(m)
  1518. if(m == '/e sit')then
  1519. idleCounter = 0
  1520. Sitting = not Sitting
  1521. end
  1522. end)
  1523.  
  1524. while true do
  1525. swait()
  1526. Sine = Sine + Change
  1527. if(not Music)then
  1528. Music = Sound(Char,MusicID,1,3,true,false,true)
  1529. Music.Name = 'Music'
  1530. end
  1531. Music.SoundId = "rbxassetid://"..MusicID
  1532. Music.Parent = Torso
  1533. Music.Pitch = 1
  1534. Music.Volume = 5
  1535. if(not Muted)then
  1536. Music:Resume()
  1537. else
  1538. Music:Pause()
  1539. end
  1540.  
  1541.  
  1542. if(God)then
  1543. Hum.MaxHealth = 1e100
  1544. Hum.Health = 1e100
  1545. if(not Char:FindFirstChildOfClass'ForceField')then IN("ForceField",Char).Visible = false end
  1546. Hum.Name = M.RNG()*100
  1547. end
  1548.  
  1549. 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)
  1550.  
  1551. local Walking = (math.abs(Root.Velocity.x) > 1 or math.abs(Root.Velocity.z) > 1)
  1552. 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")
  1553. if(not Effects or not Effects.Parent)then
  1554. Effects = IN("Model",Char)
  1555. Effects.Name = "Effects"
  1556. end
  1557. if(State == 'Run')then
  1558. local wsVal = 7 / (Hum.WalkSpeed/16)
  1559. local Alpha = math.min(.2 * (Hum.WalkSpeed/16),1)
  1560. Change = 1
  1561. RH.C1 = RH.C1:lerp(CF.N(0,1*PlayerSize-.1*M.C(Sine/wsVal),0+.2*M.C(Sine/wsVal))*CF.A(M.R(8-0*M.C(Sine/wsVal))+-M.S(Sine/wsVal)/1.5,0,0),.2)
  1562. LH.C1 = LH.C1:lerp(CF.N(0,1*PlayerSize+.1*M.C(Sine/wsVal),0-.2*M.C(Sine/wsVal))*CF.A(M.R(8+0*M.C(Sine/wsVal))+M.S(Sine/wsVal)/1.5,0,0),.2)
  1563. elseif(State == 'Walk')then
  1564. local wsVal = 7 / (Hum.WalkSpeed/16)
  1565. local Alpha = math.min(.2 * (Hum.WalkSpeed/16),1)
  1566. Change = 1
  1567. RH.C1 = RH.C1:lerp(CF.N(0,1*PlayerSize-.5*M.C(Sine/wsVal)/2,0+.5*M.C(Sine/wsVal)/2)*CF.A(M.R(15-15*M.C(Sine/wsVal))+-M.S(Sine/wsVal)/2.5,0,0),Alpha)
  1568. LH.C1 = LH.C1:lerp(CF.N(0,1*PlayerSize+.5*M.C(Sine/wsVal)/2,0-.5*M.C(Sine/wsVal)/2)*CF.A(M.R(15+15*M.C(Sine/wsVal))+M.S(Sine/wsVal)/2.5,0,0),Alpha)
  1569. else
  1570. RH.C1 = RH.C1:lerp(CF.N(0,1*PlayerSize,0),.2)
  1571. LH.C1 = LH.C1:lerp(CF.N(0,1*PlayerSize,0),.2)
  1572. end
  1573.  
  1574. if(State == 'Idle' and NeutralAnims)then
  1575. idleCounter = idleCounter + 1
  1576. else
  1577. Sitting = false
  1578. idleCounter = 0
  1579. end
  1580.  
  1581. Hum.WalkSpeed = WalkSpeed
  1582. if(not Char:FindFirstChildOfClass'Shirt')then
  1583. NewInstance("Shirt",Char,{ShirtTemplate='rbxassetid://236410507'})
  1584. else
  1585. Char:FindFirstChildOfClass'Shirt'.ShirtTemplate='rbxassetid://236410507'
  1586. end
  1587.  
  1588. if(not Char:FindFirstChildOfClass'Pants')then
  1589. NewInstance("Pants",Char,{PantsTemplate='rbxassetid://236412261'})
  1590. else
  1591. Char:FindFirstChildOfClass'Pants'.PantsTemplate='rbxassetid://236412261'
  1592. end
  1593.  
  1594. if(Remove_Hats)then Instance.ClearChildrenOfClass(Char,"Accessory",true) end
  1595.  
  1596. local face = Head:FindFirstChild'face'
  1597. if(not face)then
  1598. NewInstance("Decal",Head,{Name='face',Face=Enum.NormalId.Front,Texture="rbxassetid://404306534"})
  1599. else
  1600. face.Texture = "rbxassetid://404306534"
  1601. end
  1602.  
  1603. RArm.Color = C3.N(0.1,0.1,0.1)
  1604. LArm.Color = C3.N(0.1,0.1,0.1)
  1605. RLeg.Color = C3.N(0.1,0.1,0.1)
  1606. LLeg.Color = C3.N(0.1,0.1,0.1)
  1607. Torso.Color = C3.N(0.1,0.1,0.1)
  1608. Head.Color = C3.N(0.1,0.1,0.1)
  1609.  
  1610. if(NeutralAnims)then
  1611. if(State == 'Idle')then
  1612. if(not Sitting and idleCounter < 1500)then
  1613. local Alpha = .1
  1614. Change = 1
  1615. RJ.C0 = RJ.C0:lerp(RJC0*CF.N(0,0+.2*M.C(Sine/24),0)*CF.A(M.R(0+5*M.S(Sine/24)),0,0),Alpha)
  1616. NK.C0 = NK.C0:lerp(NKC0*CF.N(0,0,-.1)*CF.A(M.R(-15),0,M.R(10)),Alpha)
  1617. LS.C0 = LS.C0:lerp(LSC0*CF.A(M.R(10+5*M.C(Sine/24)),0,M.R(-15+5*M.C(Sine/24))),Alpha)
  1618. RS.C0 = RS.C0:lerp(RSC0*CF.A(M.R(10+5*M.C(Sine/24)),0,M.R(15-5*M.C(Sine/24))),Alpha)
  1619. LH.C0 = LH.C0:lerp(LHC0*CF.N(0,0-.2*M.C(Sine/24),0)*CF.A(M.R(0-5*M.S(Sine/24)),0,M.R(-5)),Alpha)
  1620. RH.C0 = RH.C0:lerp(RHC0*CF.N(0,0-.2*M.C(Sine/24),0)*CF.A(M.R(0-5*M.S(Sine/24)),0,M.R(5)),Alpha)
  1621. else
  1622. local Alpha = .1
  1623. Change = 1
  1624. RJ.C0 = RJ.C0:lerp(RJC0*CF.N(0,-2+.2*M.C(Sine/24),0)*CF.A(M.R(0+5*M.S(Sine/24)),0,0),Alpha)
  1625. NK.C0 = NK.C0:lerp(NKC0*CF.N(0,0,-.1)*CF.A(M.R(-15),0,M.R(10)),Alpha)
  1626. LS.C0 = LS.C0:lerp(LSC0*CF.A(M.R(90+2*M.C(Sine/24)),0,M.R(15+2*M.C(Sine/24))),Alpha)
  1627. RS.C0 = RS.C0:lerp(RSC0*CF.A(M.R(10+5*M.C(Sine/24)),0,M.R(15-5*M.C(Sine/24))),Alpha)
  1628. LH.C0 = LH.C0:lerp(LHC0*CF.N(0,2-.2*M.C(Sine/24),-1)*CF.A(M.R(0-5*M.S(Sine/24)),0,M.R(-5)),Alpha)
  1629. RH.C0 = RH.C0:lerp(RHC0*CF.N(0,0-.2*M.C(Sine/24),0)*CF.A(M.R(-90-5*M.S(Sine/24)),0,M.R(5)),Alpha)
  1630. end
  1631. elseif(State == 'Run')then
  1632. local wsVal = 7 / (Hum.WalkSpeed/16)
  1633. local Alpha = math.min(.2 * (Hum.WalkSpeed/16),1)
  1634. RJ.C0 = RJ.C0:lerp(CF.N(0,0-.1*M.C(Sine/(wsVal/2)),0)*CF.A(M.R(-15+2.5*M.C(Sine/(wsVal/2))),M.R(8*M.C(Sine/wsVal)),0),Alpha)
  1635. NK.C0 = NK.C0:lerp(NKC0,Alpha)
  1636. LS.C0 = LS.C0:lerp(LSC0*CF.N(0,0,0-.3*M.S(Sine/wsVal))*CF.A(M.R(0+45*M.S(Sine/wsVal)),0,M.R(-5)),Alpha)
  1637. RS.C0 = RS.C0:lerp(RSC0*CF.N(0,0,0+.3*M.S(Sine/wsVal))*CF.A(M.R(0-45*M.S(Sine/wsVal)),0,M.R(5)),Alpha)
  1638. LH.C0 = LH.C0:lerp(LHC0*CF.N(0,0+.1*M.C(Sine/(wsVal/2)),0)*CF.A(0,-M.R(4*M.C(Sine/wsVal)),0),Alpha)
  1639. RH.C0 = RH.C0:lerp(RHC0*CF.N(0,0+.1*M.C(Sine/(wsVal/2)),0)*CF.A(0,-M.R(4*M.C(Sine/wsVal)),0),Alpha)
  1640. elseif(State == 'Walk')then
  1641. local wsVal = 7 / (Hum.WalkSpeed/16)
  1642. local Alpha = math.min(.2 * (Hum.WalkSpeed/16),1)
  1643. local Alpha2 = math.min(.15 * (Hum.WalkSpeed/16),1)
  1644. RJ.C0 = RJ.C0:lerp(CF.N(0,-.1+.1*M.C(Sine/(wsVal/2)+-M.S(Sine/(wsVal/2))/3),0)*CF.A(M.R(-9-2.5*M.C(Sine/(wsVal/2))),M.R(10*M.C(Sine/wsVal)),Root.RotVelocity.y/75),Alpha2)
  1645. NK.C0 = NK.C0:lerp(NKC0*CF.A(0,-Head.RotVelocity.y/75,0),Alpha)
  1646. LS.C0 = LS.C0:lerp(LSC0*CF.N(0,0,-.27*M.C(Sine/wsVal))*CF.A(M.R(45*M.C(Sine/wsVal)),0,M.R(-5)+LArm.RotVelocity.y/75),Alpha)
  1647. RS.C0 = RS.C0:lerp(RSC0*CF.N(0,0,.27*M.C(Sine/wsVal))*CF.A(M.R(-45*M.C(Sine/wsVal)),0,M.R(5)-RArm.RotVelocity.y/75),Alpha)
  1648. LH.C0 = LH.C0:lerp(LHC0*CF.N(0,0-.1*M.C(Sine/(wsVal/2)),0)*CF.A(0,0,0),Alpha)
  1649. RH.C0 = RH.C0:lerp(RHC0*CF.N(0,0-.1*M.C(Sine/(wsVal/2)),0)*CF.A(0,0,0),Alpha)
  1650. elseif(State == 'Jump')then
  1651. local Alpha = .1
  1652. local idk = math.min(math.max(Root.Velocity.Y/50,-M.R(90)),M.R(90))
  1653. LS.C0 = LS.C0:lerp(LSC0*CF.A(M.R(-5),0,M.R(-90)),Alpha)
  1654. RS.C0 = RS.C0:lerp(RSC0*CF.A(M.R(-5),0,M.R(90)),Alpha)
  1655. RJ.C0 = RJ.C0:lerp(RJC0*CF.A(math.min(math.max(Root.Velocity.Y/100,-M.R(45)),M.R(45)),0,0),Alpha)
  1656. NK.C0 = NK.C0:lerp(NKC0*CF.A(math.min(math.max(Root.Velocity.Y/100,-M.R(45)),M.R(45)),0,0),Alpha)
  1657. LH.C0 = LH.C0:lerp(LHC0*CF.A(0,0,M.R(-5)),Alpha)
  1658. RH.C0 = RH.C0:lerp(RHC0*CF.N(0,1,-1)*CF.A(M.R(-5),0,M.R(5)),Alpha)
  1659. elseif(State == 'Fall')then
  1660. local Alpha = .1
  1661. local idk = math.min(math.max(Root.Velocity.Y/50,-M.R(90)),M.R(90))
  1662. LS.C0 = LS.C0:lerp(LSC0*CF.A(M.R(-5),0,M.R(-90)+idk),Alpha)
  1663. RS.C0 = RS.C0:lerp(RSC0*CF.A(M.R(-5),0,M.R(90)-idk),Alpha)
  1664. RJ.C0 = RJ.C0:lerp(RJC0*CF.A(math.min(math.max(Root.Velocity.Y/100,-M.R(45)),M.R(45)),0,0),Alpha)
  1665. NK.C0 = NK.C0:lerp(NKC0*CF.A(math.min(math.max(Root.Velocity.Y/100,-M.R(45)),M.R(45)),0,0),Alpha)
  1666. LH.C0 = LH.C0:lerp(LHC0*CF.A(0,0,M.R(-5)),Alpha)
  1667. RH.C0 = RH.C0:lerp(RHC0*CF.N(0,1,-1)*CF.A(M.R(-5),0,M.R(5)),Alpha)
  1668. elseif(State == 'Paralyzed')then
  1669. -- paralyzed
  1670. elseif(State == 'Sit')then
  1671. -- sit
  1672. end
  1673. end
  1674.  
  1675. for i,v in next, BloodPuddles do
  1676. local mesh = i:FindFirstChild'CylinderMesh'
  1677. BloodPuddles[i] = v + 1
  1678. if(not mesh or i.Transparency >= 1)then
  1679. i:destroy()
  1680. BloodPuddles[i] = nil
  1681. elseif(v > Frame_Speed*4)then
  1682. local trans = (v-Frame_Speed*4)/(Frame_Speed*2)
  1683. i.Transparency = trans
  1684. if(mesh.Scale.Z > 0)then
  1685. mesh.Scale = mesh.Scale-V3.N(.05,0,.05)
  1686. end
  1687. else
  1688. i.Transparency = 0
  1689. end
  1690. end
  1691. end
Advertisement
Add Comment
Please, Sign In to add comment