Advertisement
hjkook

FE CHARA

Feb 20th, 2019
160
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 49.63 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,game,owner = owner,game
  4. local RealPlayer = Player
  5. do
  6. print("FE Compatibility code V2 by Mokiros")
  7. local RealPlayer = RealPlayer
  8. script.Parent = RealPlayer.Character
  9.  
  10. --Fake event to make stuff like Mouse.KeyDown work
  11. local Disconnect_Function = function(this)
  12. this[1].Functions[this[2]] = nil
  13. end
  14. local Disconnect_Metatable = {__index={disconnect=Disconnect_Function,Disconnect=Disconnect_Function}}
  15. local FakeEvent_Metatable = {__index={
  16. Connect = function(this,f)
  17. local i = tostring(math.random(0,10000))
  18. while this.Functions[i] do
  19. i = tostring(math.random(0,10000))
  20. end
  21. this.Functions[i] = f
  22. return setmetatable({this,i},Disconnect_Metatable)
  23. end
  24. }}
  25. FakeEvent_Metatable.__index.connect = FakeEvent_Metatable.__index.Connect
  26. local function fakeEvent()
  27. return setmetatable({Functions={}},FakeEvent_Metatable)
  28. end
  29.  
  30. --Creating fake input objects with fake variables
  31. local FakeMouse = {Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent(),Button2Up=fakeEvent(),Button2Down=fakeEvent()}
  32. FakeMouse.keyUp = FakeMouse.KeyUp
  33. FakeMouse.keyDown = FakeMouse.KeyDown
  34. local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  35. local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
  36. CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
  37. end}
  38. --Merged 2 functions into one by checking amount of arguments
  39. CAS.UnbindAction = CAS.BindAction
  40.  
  41. --This function will trigger the events that have been :Connect()'ed
  42. local function TriggerEvent(self,ev,...)
  43. for _,f in pairs(self[ev].Functions) do
  44. f(...)
  45. end
  46. end
  47. FakeMouse.TriggerEvent = TriggerEvent
  48. UIS.TriggerEvent = TriggerEvent
  49.  
  50. --Client communication
  51. local Event = Instance.new("RemoteEvent")
  52. Event.Name = "UserInput_Event"
  53. Event.OnServerEvent:Connect(function(plr,io)
  54. if plr~=RealPlayer then return end
  55. FakeMouse.Target = io.Target
  56. FakeMouse.Hit = io.Hit
  57. if not io.isMouse then
  58. local b = io.UserInputState == Enum.UserInputState.Begin
  59. if io.UserInputType == Enum.UserInputType.MouseButton1 then
  60. return FakeMouse:TriggerEvent(b and "Button1Down" or "Button1Up")
  61. end
  62. if io.UserInputType == Enum.UserInputType.MouseButton2 then
  63. return FakeMouse:TriggerEvent(b and "Button2Down" or "Button2Up")
  64. end
  65. for _,t in pairs(CAS.Actions) do
  66. for _,k in pairs(t.Keys) do
  67. if k==io.KeyCode then
  68. t.Function(t.Name,io.UserInputState,io)
  69. end
  70. end
  71. end
  72. FakeMouse:TriggerEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
  73. UIS:TriggerEvent(b and "InputBegan" or "InputEnded",io,false)
  74. end
  75. end)
  76. Event.Parent = NLS([==[local Event = script:WaitForChild("UserInput_Event")
  77. local Mouse = owner:GetMouse()
  78. local UIS = game:GetService("UserInputService")
  79. local input = function(io,RobloxHandled)
  80. if RobloxHandled then return end
  81. --Since InputObject is a client-side instance, we create and pass table instead
  82. Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState,Hit=Mouse.Hit,Target=Mouse.Target})
  83. end
  84. UIS.InputBegan:Connect(input)
  85. UIS.InputEnded:Connect(input)
  86. local h,t
  87. --Give the server mouse data every second frame, but only if the values changed
  88. --If player is not moving their mouse, client won't fire events
  89. local HB = game:GetService("RunService").Heartbeat
  90. while true do
  91. if h~=Mouse.Hit or t~=Mouse.Target then
  92. h,t=Mouse.Hit,Mouse.Target
  93. Event:FireServer({isMouse=true,Target=t,Hit=h})
  94. end
  95. --Wait 2 frames
  96. for i=1,2 do
  97. HB:Wait()
  98. end
  99. end]==],script)
  100.  
  101. ----Sandboxed game object that allows the usage of client-side methods and services
  102. --Real game object
  103. local RealGame = game
  104.  
  105. --Metatable for fake service
  106. local FakeService_Metatable = {
  107. __index = function(self,k)
  108. local s = rawget(self,"_RealService")
  109. if s then
  110. return typeof(s[k])=="function"
  111. and function(_,...)return s[k](s,...)end or s[k]
  112. end
  113. end,
  114. __newindex = function(self,k,v)
  115. local s = rawget(self,"_RealService")
  116. if s then s[k]=v end
  117. end
  118. }
  119. local function FakeService(t,RealService)
  120. t._RealService = typeof(RealService)=="string" and RealGame:GetService(RealService) or RealService
  121. return setmetatable(t,FakeService_Metatable)
  122. end
  123.  
  124. --Fake game object
  125. local FakeGame = {
  126. GetService = function(self,s)
  127. return rawget(self,s) or RealGame:GetService(s)
  128. end,
  129. Players = FakeService({
  130. LocalPlayer = FakeService({GetMouse=function(self)return FakeMouse end},Player)
  131. },"Players"),
  132. UserInputService = FakeService(UIS,"UserInputService"),
  133. ContextActionService = FakeService(CAS,"ContextActionService"),
  134. RunService = FakeService({
  135. _btrs = {},
  136. RenderStepped = RealGame:GetService("RunService").Heartbeat,
  137. BindToRenderStep = function(self,name,_,fun)
  138. self._btrs[name] = self.Heartbeat:Connect(fun)
  139. end,
  140. UnbindFromRenderStep = function(self,name)
  141. self._btrs[name]:Disconnect()
  142. end,
  143. },"RunService")
  144. }
  145. rawset(FakeGame.Players,"localPlayer",FakeGame.Players.LocalPlayer)
  146. FakeGame.service = FakeGame.GetService
  147. FakeService(FakeGame,game)
  148. --Changing owner to fake player object to support owner:GetMouse()
  149. game,owner = FakeGame,FakeGame.Players.LocalPlayer
  150. end
  151.  
  152. --// Initializing \\--
  153. local S = setmetatable({},{__index = function(s,i) return game:service(i) end})
  154. local Plr = owner
  155. local Char = Plr.Character
  156. local Hum = Char:FindFirstChildOfClass'Humanoid'
  157. local RArm = Char["Right Arm"]
  158. local LArm = Char["Left Arm"]
  159. local RLeg = Char["Right Leg"]
  160. local LLeg = Char["Left Leg"]
  161. local Root = Char:FindFirstChild'HumanoidRootPart'
  162. local Torso = Char.Torso
  163. local Head = Char.Head
  164. local NeutralAnims = true
  165. local Attack = false
  166. local BloodPuddles = {}
  167. local Effects = {}
  168. local Debounces = {Debounces={}}
  169. local Mouse = Plr:GetMouse()
  170. local Hit = {}
  171. local Sine = 0
  172. local Change = 1
  173. local Souls = 0
  174. --// Debounce System \\--
  175.  
  176.  
  177. function Debounces:New(name,cooldown)
  178. local aaaaa = {Usable=true,Cooldown=cooldown or 2,CoolingDown=false,LastUse=0}
  179. setmetatable(aaaaa,{__index = Debounces})
  180. Debounces.Debounces[name] = aaaaa
  181. return aaaaa
  182. end
  183.  
  184. function Debounces:Use(overrideUsable)
  185. assert(self.Usable ~= nil and self.LastUse ~= nil and self.CoolingDown ~= nil,"Expected ':' not '.' calling member function Use")
  186. if(self.Usable or overrideUsable)then
  187. self.Usable = false
  188. self.CoolingDown = true
  189. local LastUse = time()
  190. self.LastUse = LastUse
  191. delay(self.Cooldown or 2,function()
  192. if(self.LastUse == LastUse)then
  193. self.CoolingDown = false
  194. self.Usable = true
  195. end
  196. end)
  197. end
  198. end
  199.  
  200. function Debounces:Get(name)
  201. assert(typeof(name) == 'string',("bad argument #1 to 'get' (string expected, got %s)"):format(typeof(name) == nil and "no value" or typeof(name)))
  202. for i,v in next, Debounces.Debounces do
  203. if(i == name)then
  204. return v;
  205. end
  206. end
  207. end
  208.  
  209. function Debounces:GetProgressPercentage()
  210. assert(self.Usable ~= nil and self.LastUse ~= nil and self.CoolingDown ~= nil,"Expected ':' not '.' calling member function Use")
  211. if(self.CoolingDown and not self.Usable)then
  212. return math.max(
  213. math.floor(
  214. (
  215. (time()-self.LastUse)/self.Cooldown or 2
  216. )*100
  217. )
  218. )
  219. else
  220. return 100
  221. end
  222. end
  223.  
  224. --// Shortcut Variables \\--
  225. local CF = {N=CFrame.new,A=CFrame.Angles,fEA=CFrame.fromEulerAnglesXYZ}
  226. local C3 = {N=Color3.new,RGB=Color3.fromRGB,HSV=Color3.fromHSV,tHSV=Color3.toHSV}
  227. local V3 = {N=Vector3.new,FNI=Vector3.FromNormalId,A=Vector3.FromAxis}
  228. 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}
  229. local R3 = {N=Region3.new}
  230. local De = S.Debris
  231. local WS = workspace
  232. local Lght = S.Lighting
  233. local RepS = S.ReplicatedStorage
  234. local IN = Instance.new
  235. local CSK = ColorSequenceKeypoint.new
  236. local CS = ColorSequence.new
  237. --// Instance Creation Functions \\--
  238.  
  239. function Sound(parent,id,pitch,volume,looped,effect,autoPlay)
  240. local Sound = IN("Sound")
  241. Sound.SoundId = "rbxassetid://".. tostring(id or 0)
  242. Sound.Pitch = pitch or 1
  243. Sound.Volume = volume or 1
  244. Sound.Looped = looped or false
  245. if(autoPlay)then
  246. coroutine.wrap(function()
  247. repeat wait() until Sound.IsLoaded
  248. Sound.Playing = autoPlay or false
  249. end)()
  250. end
  251. if(not looped and effect)then
  252. Sound.Stopped:connect(function()
  253. Sound.Volume = 0
  254. Sound:destroy()
  255. end)
  256. elseif(effect)then
  257. warn("Sound can't be looped and a sound effect!")
  258. end
  259. Sound.Parent =parent or Torso
  260. return Sound
  261. end
  262. function Part(parent,color,material,size,cframe,anchored,cancollide)
  263. local part = IN("Part")
  264. part[typeof(color) == 'BrickColor' and 'BrickColor' or 'Color'] = color or C3.N(0,0,0)
  265. part.Material = (material or Enum.Material.SmoothPlastic)
  266. part.TopSurface,part.BottomSurface=10,10
  267. part.Size = (size or V3.N(1,1,1))
  268. part.CFrame = (cframe or CF.N(0,0,0))
  269. part.Anchored = (anchored or false)
  270. part.CanCollide = (cancollide or false)
  271. part.Parent = (parent or Char)
  272. return part
  273. end
  274. function Mesh(parent,meshtype,meshid,textid,scale,offset)
  275. local part = IN("SpecialMesh")
  276. part.MeshId = meshid or ""
  277. part.TextureId = textid or ""
  278. part.Scale = scale or V3.N(1,1,1)
  279. part.Offset = offset or V3.N(0,0,0)
  280. part.MeshType = meshtype or Enum.MeshType.Sphere
  281. part.Parent = parent
  282. return part
  283. end
  284.  
  285. NewInstance = function(instance,parent,properties)
  286. local inst = Instance.new(instance,parent)
  287. if(properties)then
  288. for i,v in next, properties do
  289. pcall(function() inst[i] = v end)
  290. end
  291. end
  292. return inst;
  293. end
  294.  
  295.  
  296.  
  297. --// Extended ROBLOX tables \\--
  298. 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})
  299. --// Customization \\--
  300.  
  301. local Frame_Speed = 60 -- The frame speed for swait. 1 is automatically divided by this
  302. local Remove_Hats = false
  303. local Remove_Clothing = true
  304. local PlayerSize = 1
  305. local DamageColor = BrickColor.new'Really red'
  306. local MusicID = 935501955
  307. local WalkSpeed = 8
  308. local MaxSouls = 100
  309. local MaxHealth = 500
  310.  
  311.  
  312. if(_G.RefusedAnimation == nil) then _G.RefusedAnimation = false end
  313.  
  314. --// Weapon and GUI creation, and Character Customization \\--
  315.  
  316. if(Remove_Hats)then Instance.ClearChildrenOfClass(Char,"Accessory",true) end
  317. if(Remove_Clothing)then Instance.ClearChildrenOfClass(Char,"Clothing",true) Instance.ClearChildrenOfClass(Char,"ShirtGraphic",true) end
  318. local Effects = IN("Folder",Char)
  319. Effects.Name = "Effects"
  320.  
  321. Hum.MaxHealth = MaxHealth
  322. Hum.Health = MaxHealth
  323.  
  324. local Knife = NewInstance("Part",Char,{Name='Knife',Size=V3.N(.4,3,.7),Anchored=false,CanCollide=false,Locked=true,Archivable=false,Reflectance=.01,Color=C3.N(0,0,0)})
  325. local KnifeMesh = Mesh(Knife,Enum.MeshType.FileMesh,"rbxassetid://121944778","rbxassetid://362719969",V3.N(1,1,1),V3.N())
  326. local AuraEmitter = NewInstance("ParticleEmitter",Knife,{EmissionDirection='Back',Color=CS{CSK(0,C3.N(1,0,0)),CSK(0.5,C3.N(1,1,0)),CSK(1,C3.RGB(255,191,0))},LightEmission=.5,LightInfluence=0,Size=NumberSequence.new(0.3),Texture="rbxassetid://141116476",Transparency=NumberSequence.new(0,1),LockedToPart=true,Lifetime=NumberRange.new(1),Rate=150,Speed=NumberRange.new(0)})
  327. local FireEmitter = NewInstance("ParticleEmitter",Knife,{EmissionDirection='Back',Color=CS(C3.N(1,0,0),C3.N(1,0,0)),LightEmission=.5,LightInfluence=0,Size=NumberSequence.new{NumberSequenceKeypoint.new(0,.5,0),NumberSequenceKeypoint.new(0.755,0,0),NumberSequenceKeypoint.new(1,0,0)},Texture="rbxassetid://141116476",Transparency=NumberSequence.new(0.35,1),Lifetime=NumberRange.new(1,2),Rate=150,Speed=NumberRange.new(3)})
  328.  
  329. local KTrail = NewInstance("Trail",Knife,{
  330. Attachment0=NewInstance("Attachment",Knife,{Position=V3.N(0,-.4,0)}),
  331. Attachment1=NewInstance("Attachment",Knife,{Position=V3.N(0,1.2,0)}),
  332. Color=CS(C3.N(1,0,0)),
  333. Enabled=false,
  334. Transparency=NumberSequence.new(0,1),
  335. Lifetime=1.25,
  336. })
  337. local Hair = Part(Char,C3.N(0,0,0),Enum.Material.SmoothPlastic,V3.N(1,1,1),CF.N(),false,false)
  338. local HairMesh = Mesh(Hair,Enum.MeshType.FileMesh,"rbxassetid://250264520","rbxassetid://75975464",V3.N(1.05,1.05,1.05),V3.N())
  339.  
  340. NewInstance("PointLight",Knife,{Color=C3.N(1,0,0),Range=10,Brightness=3})
  341.  
  342.  
  343. Hum.DisplayDistanceType = 'None'
  344.  
  345. IN("Shirt",Char)
  346. IN("Pants",Char)
  347.  
  348. Hum.WalkSpeed = WalkSpeed
  349. if(PlayerSize ~= 1)then
  350. for _,v in next, Char:GetDescendats() do
  351. if(v:IsA'BasePart')then
  352. v.Size = v.Size * PlayerSize
  353. end
  354. end
  355. end
  356.  
  357.  
  358. for i = 1, 35 do
  359. local FACE = Part(Char,C3.N(0,0,0),Enum.Material.Neon,V3.N(1.01,.5,1.01),CF.N(),false,false)
  360. FACE.Transparency = 0+(i-1)/35.2
  361. FACE.Name = 'ShadowFace'
  362. Head:FindFirstChildOfClass("SpecialMesh"):Clone().Parent = FACE
  363. NewInstance("Weld",Head,{Part0=Head,Part1=FACE,C0=CF.N(0,.35-(i-1)/75,0)})
  364. --CreateWeldOrSnapOrMotor("Weld", Head, Head, FACE, CF(0,0.35-(i-1)/75,0), CF(0, 0, 0))
  365. end
  366.  
  367. local LEye = Part(Char,C3.N(1,0,0),Enum.Material.Neon,V3.N(.15,.25,.2),CF.N(),false,false)
  368. local LEyeM = Mesh(LEye,Enum.MeshType.Sphere,"","",V3.N(1,1,1),V3.N())
  369. local LEyeW = NewInstance("Weld",LEye,{Part0=Head,Part1=LEye,C0=CF.N(-.2,.2,-.49)})
  370.  
  371. local REye = Part(Char,C3.N(1,0,0),Enum.Material.Neon,V3.N(.15,.25,.2),CF.N(),false,false)
  372. local REyeM = Mesh(REye,Enum.MeshType.Sphere,"","",V3.N(1,1,1),V3.N())
  373. local REyeW = NewInstance("Weld",REye,{Part0=Head,Part1=REye,C0=CF.N(.2,.2,-.49)})
  374.  
  375.  
  376. pcall(function()
  377. Char.LeftWing:destroy()
  378. Char.ReaperShadowHead:destroy()
  379. end)
  380.  
  381.  
  382. local Music = Sound(Torso,MusicID,1,3,true,false,true)
  383. Music.Name = 'Music'
  384.  
  385. --// Stop animations \\--
  386. for _,v in next, Hum:GetPlayingAnimationTracks() do
  387. v:Stop();
  388. end
  389.  
  390. pcall(game.Destroy,Char:FindFirstChild'Animate')
  391. pcall(game.Destroy,Hum:FindFirstChild'Animator')
  392.  
  393. --// Joints \\--
  394.  
  395. 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)})
  396. 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)})
  397. local NK = NewInstance('Motor',Char,{Part0=Torso,Part1=Head,C0 = CF.N(0,1.5 * PlayerSize,0)})
  398. local LH = NewInstance('Motor',Char,{Part0=Torso,Part1=LLeg,C0 = CF.N(-.5 * PlayerSize,-1 * PlayerSize,0),C1 = CF.N(0,1 * PlayerSize,0)})
  399. local RH = NewInstance('Motor',Char,{Part0=Torso,Part1=RLeg,C0 = CF.N(.5 * PlayerSize,-1 * PlayerSize,0),C1 = CF.N(0,1 * PlayerSize,0)})
  400. local RJ = NewInstance('Motor',Char,{Part0=Root,Part1=Torso})
  401. local HW = NewInstance('Motor',Char,{Part0=RArm,Part1=Knife,C0=CF.N(0,-1,-1)*CF.A(M.R(-90),0,0)})
  402. local HW2 = NewInstance('Motor',Char,{Part0=Head,Part1=Hair,C0=CF.N(0,.25,0)})
  403.  
  404. local LSC0 = LS.C0
  405. local RSC0 = RS.C0
  406. local NKC0 = NK.C0
  407. local LHC0 = LH.C0
  408. local RHC0 = RH.C0
  409. local RJC0 = RJ.C0
  410.  
  411. --// Artificial HB \\--
  412.  
  413. local ArtificialHB = IN("BindableEvent", script)
  414. ArtificialHB.Name = "Heartbeat"
  415.  
  416. script:WaitForChild("Heartbeat")
  417.  
  418. local tf = 0
  419. local allowframeloss = false
  420. local tossremainder = false
  421. local lastframe = tick()
  422. local frame = 1/Frame_Speed
  423. ArtificialHB:Fire()
  424.  
  425. game:GetService("RunService").Heartbeat:connect(function(s, p)
  426. tf = tf + s
  427. if tf >= frame then
  428. if allowframeloss then
  429. script.Heartbeat:Fire()
  430. lastframe = tick()
  431. else
  432. for i = 1, math.floor(tf / frame) do
  433. ArtificialHB:Fire()
  434. end
  435. lastframe = tick()
  436. end
  437. if tossremainder then
  438. tf = 0
  439. else
  440. tf = tf - frame * math.floor(tf / frame)
  441. end
  442. end
  443. end)
  444.  
  445. function swait(num)
  446. if num == 0 or num == nil then
  447. ArtificialHB.Event:wait()
  448. else
  449. for i = 0, num do
  450. ArtificialHB.Event:wait()
  451. end
  452. end
  453. end
  454.  
  455.  
  456. --// Effect Function(s) \\--
  457.  
  458. function Bezier(startpos, pos2, pos3, endpos, t)
  459. local A = startpos:lerp(pos2, t)
  460. local B = pos2:lerp(pos3, t)
  461. local C = pos3:lerp(endpos, t)
  462. local lerp1 = A:lerp(B, t)
  463. local lerp2 = B:lerp(C, t)
  464. local cubic = lerp1:lerp(lerp2, t)
  465. return cubic
  466. end
  467.  
  468. function Tween(obj,props,time,easing,direction,repeats,backwards)
  469. local info = TweenInfo.new(time or .5, easing or Enum.EasingStyle.Quad, direction or Enum.EasingDirection.Out, repeats or 0, backwards or false)
  470. local tween = S.TweenService:Create(obj, info, props)
  471.  
  472. tween:Play()
  473. end
  474.  
  475. local FXTable = {}
  476.  
  477. coroutine.resume(coroutine.create(function()
  478. while true do
  479. for i = 1, #FXTable do
  480. local data = FXTable[i]
  481. if(data)then
  482. local Frame = data.Frame
  483. local FX = data.Effect or 'ResizeAndFade'
  484. local Parent = data.Parent or Effects
  485. local Color = data.Color or C3.N(0,0,0)
  486. local Size = data.Size or V3.N(1,1,1)
  487. local MoveDir = data.MoveDirection or nil
  488. local MeshData = data.Mesh or nil
  489. local SndData = data.Sound or nil
  490. local Frames = data.Frames or 45
  491. local CFra = data.CFrame or Torso.CFrame
  492. local Settings = data.FXSettings or {}
  493. local Prt,Msh,Snd = data.Part,data.Mesh,data.Sound
  494. local grow = data.Grow
  495.  
  496. local MoveSpeed = nil;
  497. if(MoveDir)then
  498. MoveSpeed = (CFra.p - MoveDir).magnitude/Frames
  499. end
  500. if(FX ~= 'Arc')then
  501. Frame = Frame + 1
  502. if(FX == "Fade")then
  503. Prt.Transparency = (Frame/Frames)
  504. elseif(FX == "Resize")then
  505. if(not Settings.EndSize)then
  506. Settings.EndSize = V3.N(0,0,0)
  507. end
  508. if(Settings.EndIsIncrement)then
  509. if(Msh)then
  510. Msh.Scale = Msh.Scale + Settings.EndSize
  511. else
  512. Prt.Size = Prt.Size + Settings.EndSize
  513. end
  514. else
  515. if(Msh)then
  516. Msh.Scale = Msh.Scale - grow/Frames
  517. else
  518. Prt.Size = Prt.Size - grow/Frames
  519. end
  520. end
  521. elseif(FX == "ResizeAndFade")then
  522. if(not Settings.EndSize)then
  523. Settings.EndSize = V3.N(0,0,0)
  524. end
  525. if(Settings.EndIsIncrement)then
  526. if(Msh)then
  527. Msh.Scale = Msh.Scale + Settings.EndSize
  528. else
  529. Prt.Size = Prt.Size + Settings.EndSize
  530. end
  531. else
  532. if(Msh)then
  533. Msh.Scale = Msh.Scale - grow/Frames
  534. else
  535. Prt.Size = Prt.Size - grow/Frames
  536. end
  537. end
  538. Prt.Transparency = (Frame/Frames)
  539. end
  540. if(Settings.RandomizeCFrame)then
  541. Prt.CFrame = Prt.CFrame * CF.A(M.RRNG(-360,360),M.RRNG(-360,360),M.RRNG(-360,360))
  542. end
  543. if(MoveDir and MoveSpeed)then
  544. local Orientation = Prt.Orientation
  545. Prt.CFrame = CF.N(Prt.Position,MoveDir)*CF.N(0,0,-MoveSpeed)
  546. Prt.Orientation = Orientation
  547. end
  548. if(Prt.Transparency >= 1 or Frame >= Frames)then
  549. Prt:destroy()
  550. table.remove(FXTable,i)
  551. else
  552. data.Frame = Frame
  553. end
  554. else
  555. local start,third,fourth,endP = Settings.Start,Settings.Third,Settings.Fourth,Settings.End
  556. if(not Settings.End and Settings.Home)then endP = Settings.Home.CFrame end
  557. if(start and endP)then
  558. local quarter = third or start:lerp(endP, 0.25) * CF.N(M.RNG(-25,25),M.RNG(0,25),M.RNG(-25,25))
  559. local threequarter = fourth or start:lerp(endP, 0.75) * CF.N(M.RNG(-25,25),M.RNG(0,25),M.RNG(-25,25))
  560. Frame = Frame + (Settings.Speed or 0.01)
  561. if(Settings.Home)then
  562. endP = Settings.Home.CFrame
  563. end
  564. Prt.CFrame = Bezier(start, quarter, threequarter, endP, Frame)
  565. if(Prt.Transparency >= 1 or Frame >= Frames)then
  566. if(Settings.RemoveOnGoal)then
  567. Prt:destroy()
  568. end
  569. end
  570. else
  571. Prt:destroy()
  572. end
  573. end
  574. end
  575. end
  576. swait()
  577. end
  578. end))
  579.  
  580. function Effect(data)
  581. local FX = data.Effect or 'ResizeAndFade'
  582. local Parent = data.Parent or Effects
  583. local Color = data.Color or C3.N(0,0,0)
  584. local Size = data.Size or V3.N(1,1,1)
  585. local MoveDir = data.MoveDirection or nil
  586. local MeshData = data.Mesh or nil
  587. local SndData = data.Sound or nil
  588. local Frames = data.Frames or 45
  589. local Manual = data.Manual or nil
  590. local Material = data.Material or nil
  591. local CFra = data.CFrame or Torso.CFrame
  592. local Settings = data.FXSettings or {}
  593. local Shape = data.Shape or Enum.PartType.Block
  594. local Snd,Prt,Msh;
  595. coroutine.wrap(function()
  596. if(Manual and typeof(Manual) == 'Instance' and Manual:IsA'BasePart')then
  597. Prt = Manual
  598. else
  599. Prt = Part(Parent,Color,Material,Size,CFra,true,false)
  600. Prt.Shape = Shape
  601. end
  602. if(typeof(MeshData) == 'table')then
  603. Msh = Mesh(Prt,MeshData.MeshType,MeshData.MeshId,MeshData.TextureId,MeshData.Scale,MeshData.Offset)
  604. elseif(typeof(MeshData) == 'Instance')then
  605. Msh = MeshData:Clone()
  606. Msh.Parent = Prt
  607. elseif(Shape == Enum.PartType.Block)then
  608. Msh = Mesh(Prt,Enum.MeshType.Brick)
  609. end
  610. if(typeof(SndData) == 'table' or typeof(SndData) == 'Instance')then
  611. Snd = Sound(Prt,SndData.SoundId,SndData.Pitch,SndData.Volume,false,false,true)
  612. end
  613. if(Snd)then
  614. repeat swait() until Snd.Playing and Snd.IsLoaded and Snd.TimeLength > 0
  615. Frames = Snd.TimeLength * Frame_Speed/Snd.Pitch
  616. end
  617. Size = (Msh and Msh.Scale or Size)
  618. local grow = Size-(Settings.EndSize or (Msh and Msh.Scale or Size)/2)
  619.  
  620. local MoveSpeed = nil;
  621. if(MoveDir)then
  622. MoveSpeed = (CFra.p - MoveDir).magnitude/Frames
  623. end
  624. if(FX ~= 'Arc')then
  625. for Frame = 1, Frames do
  626. if(FX == "Fade")then
  627. Prt.Transparency = (Frame/Frames)
  628. elseif(FX == "Resize")then
  629. if(not Settings.EndSize)then
  630. Settings.EndSize = V3.N(0,0,0)
  631. end
  632. if(Settings.EndIsIncrement)then
  633. if(Msh)then
  634. Msh.Scale = Msh.Scale + Settings.EndSize
  635. else
  636. Prt.Size = Prt.Size + Settings.EndSize
  637. end
  638. else
  639. if(Msh)then
  640. Msh.Scale = Msh.Scale - grow/Frames
  641. else
  642. Prt.Size = Prt.Size - grow/Frames
  643. end
  644. end
  645. elseif(FX == "ResizeAndFade")then
  646. if(not Settings.EndSize)then
  647. Settings.EndSize = V3.N(0,0,0)
  648. end
  649. if(Settings.EndIsIncrement)then
  650. if(Msh)then
  651. Msh.Scale = Msh.Scale + Settings.EndSize
  652. else
  653. Prt.Size = Prt.Size + Settings.EndSize
  654. end
  655. else
  656. if(Msh)then
  657. Msh.Scale = Msh.Scale - grow/Frames
  658. else
  659. Prt.Size = Prt.Size - grow/Frames
  660. end
  661. end
  662. Prt.Transparency = (Frame/Frames)
  663. end
  664. if(Settings.RandomizeCFrame)then
  665. Prt.CFrame = Prt.CFrame * CF.A(M.RRNG(-360,360),M.RRNG(-360,360),M.RRNG(-360,360))
  666. end
  667. if(MoveDir and MoveSpeed)then
  668. local Orientation = Prt.Orientation
  669. Prt.CFrame = CF.N(Prt.Position,MoveDir)*CF.N(0,0,-MoveSpeed)
  670. Prt.Orientation = Orientation
  671. end
  672. swait()
  673. end
  674. Prt:destroy()
  675. else
  676. local start,third,fourth,endP = Settings.Start,Settings.Third,Settings.Fourth,Settings.End
  677. if(not Settings.End and Settings.Home)then endP = Settings.Home.CFrame end
  678. if(start and endP)then
  679. local quarter = third or start:lerp(endP, 0.25) * CF.N(M.RNG(-25,25),M.RNG(0,25),M.RNG(-25,25))
  680. local threequarter = fourth or start:lerp(endP, 0.75) * CF.N(M.RNG(-25,25),M.RNG(0,25),M.RNG(-25,25))
  681. for Frame = 0, 1, (Settings.Speed or 0.01) do
  682. if(Settings.Home)then
  683. endP = Settings.Home.CFrame
  684. end
  685. Prt.CFrame = Bezier(start, quarter, threequarter, endP, Frame)
  686. end
  687. if(Settings.RemoveOnGoal)then
  688. Prt:destroy()
  689. end
  690. else
  691. Prt:destroy()
  692. assert(start,"You need a start position!")
  693. assert(endP,"You need a start position!")
  694. end
  695. end
  696. end)()
  697. return Prt,Msh,Snd
  698. end
  699.  
  700.  
  701.  
  702. function SoulSteal(whom,human)
  703. local torso = (whom:FindFirstChild'Torso' or whom:FindFirstChild'UpperTorso' or whom:FindFirstChild'LowerTorso' or whom:FindFirstChild'HumanoidRootPart' or whom:FindFirstChild'Torso')
  704. local succ, health, alive = pcall(function() return whom:FindFirstChildOfClass'Humanoid'.Health, whom:FindFirstChildOfClass'Humanoid'.Health > 0 end)
  705. if(torso and torso:IsA'BasePart' and alive == true)then
  706. whom:FindFirstChildOfClass'Humanoid'.Health = 0
  707. whom:BreakJoints()
  708. local Model = IN("Model",Effects)
  709. warn('Soul stolen from '..whom.Name)
  710. Model.Name = whom.Name.."'s Soul"
  711. local Soul = Part(Model,(human and BrickColor.new'Really red' or BrickColor.new(C3.N(1,1,1))),'Glass',V3.N(1,1,1),torso.CFrame,true,false)
  712. Soul.CanCollide=false
  713. Mesh(Soul,Enum.MeshType.Sphere)
  714. Soul.Name = 'Head'
  715. if(whom.Name == 'CKbackup')then
  716. Soul.Color = C3.N(1,1,1)
  717. local DripEmitter = NewInstance("ParticleEmitter",Soul,{EmissionDirection='Bottom',Color=CS(Soul.Color),LightEmission=.5,LightInfluence=0,Size=NumberSequence.new(0.3),Texture="rbxassetid://243132757",Transparency=NumberSequence.new(0,1),LockedToPart=false,Lifetime=NumberRange.new(1),Rate=150,Speed=NumberRange.new(5)})
  718. end
  719. local Hoom = NewInstance("Humanoid",Model,{MaxHealth=(health <= 10000 and health/2 or 10000),Health=(health <= 10000 and health/2 or 10000)})
  720. local AT0 = NewInstance("Attachment",Soul,{Position=V3.N(0,.5,0)})
  721. local AT1 = NewInstance("Attachment",Soul,{Position=V3.N(0,-.5,0)})
  722. local Trail = NewInstance("Trail",Soul,{Attachment0=AT0,Attachment1=AT1,Transparency=NumberSequence.new(0),FaceCamera = true,Texture="rbxassetid://945758042",LightEmission=.3,Color=CS(Soul.Color),Lifetime=.5,MinLength=0})
  723. NewInstance("PointLight",Soul,{Color=Soul.Color,Range=10,Brightness=(human and 3 or .5)})
  724.  
  725. local turdso = Soul:Clone()
  726. turdso.Name = "Torso"
  727. turdso.CanCollide = false
  728. turdso.Anchored = true
  729. turdso.CFrame = Soul.CFrame
  730. turdso.Parent = Model
  731. turdso.Size = V3.N()
  732. turdso.Transparency=1
  733. local Distance = math.huge
  734. repeat
  735. Soul.CFrame = CF.N(Soul.Position,Torso.Position)*CF.N(0,0,-1)
  736. turdso.CFrame = Soul.CFrame
  737. Distance = (Soul.CFrame.p-Torso.CFrame.p).magnitude
  738. swait()
  739. until Hoom.Health <= 0 or not Soul.Parent or Distance <= 1.2
  740. if(Soul.Parent and Hoom.Health > 0)then
  741. Model:destroy()
  742. Effect{
  743. Effect="ResizeAndFade",
  744. Mesh={Enum.MeshType.Sphere},
  745. Color = Soul.Color,
  746. CFrame=Torso.CFrame,
  747. Size=V3.N(3,3,3),
  748. Material=Enum.Material.Neon,
  749. Sound={SoundId=444667859,Pitch=1,Volume=2.5},
  750. FXSettings={
  751. EndSize=V3.N(6,6,6),
  752. }
  753. }
  754. Souls = Souls + (human and 1 or .1)
  755. warn("Souls: "..Souls)
  756. MaxHealth = MaxHealth + Hoom.Health
  757. Hum.Health = Hum.Health + Hoom.Health
  758. for i = 1, 5 do
  759. Effect{
  760. Effect="Fade",
  761. Color = Soul.Color,
  762. MoveDirection = (Torso.CFrame*CFrame.new(M.RNG(-40,40),M.RNG(-40,40),M.RNG(-40,40))).p
  763. }
  764. end
  765. else
  766.  
  767. warn("Soul destroyed!")
  768. for i = 1, 5 do
  769. Effect{
  770. Effect="Fade",
  771. Color = Soul.Color,
  772. CFrame=Soul.CFrame,
  773. MoveDirection = (Soul.CFrame*CFrame.new(M.RNG(-40,40),M.RNG(-40,40),M.RNG(-40,40))).p
  774. }
  775. end
  776. Effect{
  777. Effect="ResizeAndFade",
  778. Mesh={Enum.MeshType.Sphere},
  779. Sound={SoundId=444667859,Pitch=1,Volume=5},
  780. Color = Soul.Color,
  781. CFrame=Soul.CFrame,
  782. Size=V3.N(3,3,3),
  783. Material=Enum.Material.Neon,
  784. FXSettings={
  785. EndSize=V3.N(6,6,6),
  786. }
  787. }
  788. Model:destroy()
  789. end
  790. end
  791. end
  792.  
  793. --// Other Functions \\ --
  794.  
  795. function getRegion(point,range,ignore)
  796. return workspace:FindPartsInRegion3WithIgnoreList(R3.N(point-V3.N(1,1,1)*range/2,point+V3.N(1,1,1)*range/2),ignore,100)
  797. end
  798.  
  799. function clerp(startCF,endCF,alpha)
  800. return startCF:lerp(endCF, alpha)
  801. end
  802.  
  803. function GetTorso(char)
  804. return char:FindFirstChild'Torso' or char:FindFirstChild'UpperTorso' or char:FindFirstChild'LowerTorso' or char:FindFirstChild'HumanoidRootPart'
  805. end
  806.  
  807. function ShowDamage(Pos, Text, Time, Color)
  808. coroutine.wrap(function()
  809. local Rate = (1 / Frame_Speed)
  810. local Pos = (Pos or Vector3.new(0, 0, 0))
  811. local Text = (Text or "")
  812. local Time = (Time or 2)
  813. local Color = (Color or Color3.new(1, 0, 1))
  814. local EffectPart = NewInstance("Part",Effects,{
  815. Material=Enum.Material.SmoothPlastic,
  816. Reflectance = 0,
  817. Transparency = 1,
  818. BrickColor = BrickColor.new(Color),
  819. Name = "Effect",
  820. Size = Vector3.new(0,0,0),
  821. Anchored = true,
  822. CFrame = CF.N(Pos)
  823. })
  824. local BillboardGui = NewInstance("BillboardGui",EffectPart,{
  825. Size = UDim2.new(1.25, 0, 1.25, 0),
  826. Adornee = EffectPart,
  827. })
  828. local TextLabel = NewInstance("TextLabel",BillboardGui,{
  829. BackgroundTransparency = 1,
  830. Size = UDim2.new(1, 0, 1, 0),
  831. Text = Text,
  832. Font = "Arcade",
  833. TextColor3 = Color,
  834. TextStrokeColor3 = Color3.new(0,0,0),
  835. TextStrokeTransparency=0,
  836. TextScaled = true,
  837. })
  838. S.Debris:AddItem(EffectPart, (Time))
  839. EffectPart.Parent = workspace
  840. delay(0, function()
  841. Tween(EffectPart,{CFrame=CF.N(Pos)*CF.N(0,3,0)},Time,Enum.EasingStyle.Elastic,Enum.EasingDirection.Out)
  842. local Frames = (Time / Rate)
  843. for Frame = 1, Frames do
  844. swait()
  845. local Percent = (Frame / Frames)
  846. TextLabel.TextTransparency = Percent
  847. TextLabel.TextStrokeTransparency = Percent
  848. end
  849. if EffectPart and EffectPart.Parent then
  850. EffectPart:Destroy()
  851. end
  852. end) end)()
  853. end
  854.  
  855. function Kill(whom)
  856. if(whom.Name ~= 'Nebula_Zorua')then
  857. local isPlr = Plrs:GetPlayerFromCharacter(whom) ~= nil
  858. coroutine.wrap(SoulSteal)(whom,isPlr)
  859. for _,v in next, whom:children() do
  860. if(v:IsA'BasePart')then
  861. v.Parent = Effects
  862. v:ClearAllChildren()
  863. v.Anchored = true
  864. v.CanCollide = false
  865. v.Transparency = 1
  866. local dust = NewInstance("ParticleEmitter",v,{
  867. Color = ColorSequence.new(C3.N(1,1,1)),
  868. LightEmission=0,
  869. LightInfluence=1,
  870. Size=NumberSequence.new{NumberSequenceKeypoint.new(0,1,0),NumberSequenceKeypoint.new(1,0,0)},
  871. Texture="rbxassetid://284205403",
  872. Transparency=NumberSequence.new{NumberSequenceKeypoint.new(0,0,0),NumberSequenceKeypoint.new(1,1,0)},
  873. Lifetime = NumberRange.new(1),
  874. Rate=150,
  875. Acceleration = V3.N(0,10,0),
  876. Speed = NumberRange.new(5),
  877. Enabled = true
  878. })
  879. delay(1, function()
  880. dust.Enabled = false
  881. S.Debris:AddItem(v,2)
  882. end)
  883. end
  884. end
  885. else
  886. warn"nope. nawt happenin'"
  887. end
  888. end
  889.  
  890. function DealDamage(who,minDam,maxDam,Knock,Type,critChance,critMult)
  891. if(who)then
  892. local hum = who:FindFirstChildOfClass'Humanoid'
  893. local Damage = M.RNG(minDam,maxDam)
  894. local canHit = true
  895. if(hum)then
  896. for _, p in pairs(Hit) do
  897. if p[1] == hum then
  898. if(time() - p[2] < 0.4) then
  899. canHit = false
  900. else
  901. Hit[_] = nil
  902. end
  903. end
  904. end
  905. if(canHit)then
  906. table.insert(Hit,{hum,time()})
  907. if(GetTorso(who))then
  908. Sound(GetTorso(who),406913243,1,10,false,true,true)
  909. end
  910. if(hum.Health >= math.huge)then
  911. Kill(who)
  912. if(who:FindFirstChild'Head' and hum.Health > 0)then
  913. ShowDamage((who.Head.CFrame * CF.N(0, 0, (who.Head.Size.Z / 2)).p+V3.N(0,1.5,0)+V3.N(M.RNG(-2,2),0,M.RNG(-2,2))), "INSTANT", 3, DamageColor.Color)
  914. end
  915. else
  916. local player = S.Players:GetPlayerFromCharacter(who)
  917. if(Type == "Fire")then
  918. --idk..
  919. else
  920. local c = Instance.new("ObjectValue",hum)
  921. c.Name = "creator"
  922. c.Value = Plr
  923. game:service'Debris':AddItem(c,0.35)
  924. local Crit = false
  925. if(M.RNG(1,100) <= (critChance or 0) and critMult > 1)then
  926. Crit = true
  927. Damage = Damage*(critMult or 2)
  928. end
  929. Damage = Damage*((Souls/5)+1)
  930. if(who:FindFirstChild'Head' and hum.Health > 0)then
  931. ShowDamage((who.Head.CFrame * CF.N(0, 0, (who.Head.Size.Z / 2)).p+V3.N(0,1.5,0)+V3.N(M.RNG(-2,2),0,M.RNG(-2,2))), (Crit and "[CRIT] " or "").. math.floor(Damage), 3, (Crit and BrickColor.new'New Yeller'.Color or DamageColor.Color))
  932. end
  933.  
  934. if(hum.Health - Damage <= 0)then
  935. Kill(who)
  936. else
  937. hum.Health = hum.Health - Damage
  938. if(Type == 'Knockback' and GetTorso(who))then
  939. local angle = GetTorso(who).Position - Root.Position + Vector3.new(0, 0, 0).unit
  940. local body = NewInstance('BodyVelocity',GetTorso(who),{
  941. P = 500,
  942. maxForce = V3.N(math.huge,0,math.huge),
  943. velocity = Root.CFrame.lookVector * Knock + Root.Velocity / 1.05
  944. })
  945. game:service'Debris':AddItem(body,.5)
  946. elseif(Type == "Electric")then
  947. if(M.RNG(1,100) >= critChance)then
  948. if(who:FindFirstChild'Head' and hum.Health > 0)then
  949. ShowDamage((who.Head.CFrame * CF.N(0, 0, (who.Head.Size.Z / 2)).p+V3.N(0,1.5,0)+V3.N(M.RNG(-2,2),0,M.RNG(-2,2))), "[PARALYZED]", 3, BrickColor.new"New Yeller".Color)
  950. end
  951. local asd = hum.WalkSpeed/2
  952. hum.WalkSpeed = asd
  953. local paralyzed = true
  954. coroutine.wrap(function()
  955. while paralyzed do
  956. swait(25)
  957. if(M.RNG(1,25) == 1)then
  958. if(who:FindFirstChild'Head' and hum.Health > 0)then
  959. ShowDamage((who.Head.CFrame * CF.N(0, 0, (who.Head.Size.Z / 2)).p+V3.N(0,1.5,0)+V3.N(M.RNG(-2,2),0,M.RNG(-2,2))), "[STATIC]", 3, BrickColor.new"New Yeller".Color)
  960. end
  961. hum.PlatformStand = true
  962. end
  963. end
  964. end)()
  965. delay(4, function()
  966. paralyzed = false
  967. hum.WalkSpeed = hum.WalkSpeed + asd
  968. end)
  969. end
  970.  
  971. elseif(Type == 'Knockdown' and GetTorso(who))then
  972. local rek = GetTorso(who)
  973. hum.PlatformStand = true
  974. delay(1,function()
  975. hum.PlatformStand = false
  976. end)
  977. local angle = (GetTorso(who).Position - (Root.Position + Vector3.new(0, 0, 0))).unit
  978. local bodvol = NewInstance("BodyVelocity",rek,{
  979. velocity = angle * Knock,
  980. P = 5000,
  981. maxForce = Vector3.new(8e+003, 8e+003, 8e+003),
  982. })
  983. local rl = NewInstance("BodyAngularVelocity",rek,{
  984. P = 3000,
  985. maxTorque = Vector3.new(500000, 500000, 500000) * 50000000000000,
  986. angularvelocity = Vector3.new(math.random(-10, 10), math.random(-10, 10), math.random(-10, 10)),
  987. })
  988. game:GetService("Debris"):AddItem(bodvol, .5)
  989. game:GetService("Debris"):AddItem(rl, .5)
  990. end
  991. end
  992. end
  993. end
  994. end
  995. end
  996. end
  997. end
  998.  
  999.  
  1000. function AOEDamage(where,range,minDam,maxDam,Knock,Type,critChance,critMult)
  1001. for _,v in next, getRegion(where,range,{Char}) do
  1002. if(v.Name ~= 'Nebula_Zorua')then
  1003. if(v.Parent and v.Parent:FindFirstChildOfClass'Humanoid')then
  1004. DealDamage(v.Parent,minDam,maxDam,Knock,Type,critChance,critMult)
  1005. end
  1006. end
  1007. end
  1008. end
  1009.  
  1010. function AOEKill(where,range)
  1011. for _,v in next, getRegion(where,range,{Char,Effects}) do
  1012. local succ,alive = pcall(function() return v.Parent:FindFirstChildOfClass'Humanoid'.Health > 0 end)
  1013. if(v.Name ~= 'Nebula_Zorua')then
  1014. if(v.Parent and alive == true)then
  1015. coroutine.wrap(Kill)(v.Parent)
  1016. end
  1017. end
  1018. end
  1019. end
  1020.  
  1021. function AOEHeal(where,range,amount)
  1022. local healed = {}
  1023. for _,v in next, getRegion(where,range,{Char}) do
  1024. local hum = (v.Parent and v.Parent:FindFirstChildOfClass'Humanoid' or nil)
  1025. if(hum and not healed[hum])then
  1026. hum.Health = hum.Health + amount
  1027. if(v.Parent:FindFirstChild'Head' and hum.Health > 0)then
  1028. 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)
  1029. end
  1030. end
  1031. end
  1032. end
  1033.  
  1034.  
  1035. --// Attack Functions \\--
  1036.  
  1037.  
  1038. function Slash()
  1039. Attack = true
  1040. NeutralAnims = false
  1041. local sound = Sound(Knife,437475935,1,5,false,true,false)
  1042. for i = 0, 2, 0.1 do
  1043. swait()
  1044. local Alpha = .2
  1045. RJ.C0 = clerp(RJ.C0,CFrame.new(0.0343287587, 0.00629056804, 0.0572580174, 0.943793893, 0.00207689893, 0.330528289, 1.0000764e-06, 0.99998033, -0.00628630351, -0.330534875, 0.00593330665, 0.943775296),Alpha)
  1046. LH.C0 = clerp(LH.C0,CFrame.new(-0.496478021, -0.990818381, 0.021652732, 0.999878168, 0, 0.0156089365, -9.80779296e-05, 0.99998033, 0.00628268253, -0.0156086385, -0.00628344761, 0.999858379),Alpha)
  1047. RH.C0 = clerp(RH.C0,CFrame.new(0.498511612, -0.990985274, 0.0154910646, 0.999878168, 0, 0.0156089365, -9.80779296e-05, 0.99998033, 0.00628268253, -0.0156086385, -0.00628344761, 0.999858379),Alpha)
  1048. LS.C0 = clerp(LS.C0,CFrame.new(-1.32692134, 0.474511296, -0.0055731535, 0.934981823, 0.354351997, 0.0156129003, -0.354479939, 0.93504262, 0.00628374517, -0.0123721063, -0.0114096552, 0.999858379),Alpha)
  1049. RS.C0 = clerp(RS.C0,CFrame.new(1.12629449, 0.369358033, -0.486052871, 0.490151912, 0.65154773, 0.57899636, 0.721657813, 0.0691910982, -0.688783586, -0.488836735, 0.755445719, -0.436280251),Alpha)
  1050. NK.C0 = clerp(NK.C0,CFrame.new(-0.0118216109, 1.49854016, -0.0795068145, 0.943793833, 0.0190048125, -0.329988182, 0.00207654224, 0.997985244, 0.0634154305, 0.330528468, -0.0605363287, 0.94185257),Alpha)
  1051. HW.C0 = HW.C0:lerp(CF.N(0,-1,-1)*CF.A(M.R(-90),0,0),Alpha)
  1052. end
  1053. KTrail.Enabled = true
  1054. sound:Play()
  1055. for i = 0, 2.5, 0.1 do
  1056. swait()
  1057. AOEDamage(Knife.CFrame.p,1,15,30,0,"Normal",0,1)
  1058. local Alpha = .25
  1059. RJ.C0 = clerp(RJ.C0,CFrame.new(-0.0352100767, 0.00629066909, -0.0097481478, 0.817972422, -0.00361463916, -0.575246274, -1.74103582e-06, 0.99998033, -0.00628598873, 0.575257719, 0.00514276745, 0.817956269),Alpha)
  1060. LH.C0 = clerp(LH.C0,CFrame.new(-0.496478021, -0.990818381, 0.0216572341, 0.999878287, 0, 0.015610218, -9.80866607e-05, 0.99998033, 0.00628274865, -0.0156098902, -0.00628351374, 0.999858499),Alpha)
  1061. RH.C0 = clerp(RH.C0,CFrame.new(0.498511702, -0.990985274, 0.0154905058, 0.999878287, 0, 0.015610218, -9.80866607e-05, 0.99998033, 0.00628274865, -0.0156098902, -0.00628351374, 0.999858499),Alpha)
  1062. LS.C0 = clerp(LS.C0,CFrame.new(-1.32694602, 0.474510223, -0.00555660389, 0.934981823, 0.354351729, 0.0156157613, -0.354479671, 0.935042739, 0.00628153514, -0.012375474, -0.0114085823, 0.999858379),Alpha)
  1063. RS.C0 = clerp(RS.C0,CFrame.new(1.23906493, 0.406229913, 0.00231830776, 0.49015066, -0.849889755, 0.193494052, 0.721655607, 0.520183682, 0.456752002, -0.488841236, -0.0842411816, 0.868295968),Alpha)
  1064. NK.C0 = clerp(NK.C0,CFrame.new(0.0315471888, 1.49887729, -0.0257819965, 0.817972481, -0.0330747738, 0.574305832, -0.00361499586, 0.998030663, 0.0626262054, -0.575246155, -0.0533026271, 0.81624186),Alpha)
  1065. HW.C0 = HW.C0:lerp(CF.N(0,-1,-1)*CF.A(M.R(-90),0,0),Alpha)
  1066. end
  1067. KTrail.Enabled = false
  1068. Attack = false
  1069. NeutralAnims = true
  1070. end
  1071.  
  1072. Mouse.Button1Down:connect(function()
  1073. if(Attack)then return end
  1074. Slash()
  1075. end)
  1076.  
  1077. Mouse.KeyDown:connect(function(k)
  1078. if(Attack)then return end
  1079. if(k == 'z')then AOEKill(Root.CFrame.p,25) end -- TODO: Animation and effects
  1080. if(k == 'q')then WalkSpeed = (WalkSpeed == 8 and 32 or 8) end
  1081. end)
  1082.  
  1083.  
  1084. function Refuse()
  1085. Attack = true
  1086. warn("B u t i t r e f u s e d.")
  1087. local oMH = MaxHealth
  1088. MaxHealth = "inf"
  1089. Hum.MaxHealth = "inf"
  1090. Hum.Health = "inf"
  1091. Char.Parent = nil
  1092. Hum:destroy()
  1093. if(not _G.RefusedAnimation)then
  1094. _G.RefusedAnimation = true
  1095.  
  1096.  
  1097. local Soul;
  1098. function Soul(where,decalId)
  1099. local destroy = false
  1100. local soul = NewInstance("Part",workspace)
  1101. soul.Name = "Soul"
  1102. soul.Transparency=1
  1103. soul.Size = V3.N(2,2,.05)
  1104. soul.Anchored=true
  1105. soul.CanCollide=false
  1106. soul.CFrame = where
  1107. local heartF = NewInstance("Decal",soul,{Face=Enum.NormalId.Front,Texture="rbxassetid://"..decalId})
  1108. local heartB = NewInstance("Decal",soul,{Face=Enum.NormalId.Back,Texture="rbxassetid://"..decalId})
  1109. return soul,heartF,heartB
  1110. end
  1111. local owo = Root.CFrame
  1112. local s,f,b = Soul(owo,1569347904)
  1113. swait(60)
  1114. local snd = Sound(s,862552636,1,5,false,false,false)
  1115. snd:Play()
  1116. f.Texture = "rbxassetid://1569348344"
  1117. b.Texture = "rbxassetid://1569348344"
  1118. swait(15)
  1119. snd:Stop()
  1120. swait(60)
  1121. print'lol'
  1122. for i = 0, 6, .1 do
  1123. swait()
  1124. s.CFrame = owo * CF.N(M.RNG(-50,50)/100,M.RNG(-50,50)/100,M.RNG(-50,50)/100)
  1125. end
  1126. local snd = Sound(s,862552636,1,5,false,false,false)
  1127. snd:Play()
  1128. s.CFrame = owo
  1129. f.Texture = "rbxassetid://1569347904"
  1130. b.Texture = "rbxassetid://1569347904"
  1131. swait(15)
  1132. snd:Stop()
  1133. swait(60)
  1134.  
  1135. s:destroy()
  1136. end
  1137.  
  1138. RJ.Parent = Char
  1139. LS.Parent = Char
  1140. RS.Parent = Char
  1141. LH.Parent = Char
  1142. RH.Parent = Char
  1143. NK.Parent = Char
  1144.  
  1145. LArm.Parent = Char
  1146. RArm.Parent = Char
  1147. LLeg.Parent = Char
  1148. LArm.Parent = Char
  1149. Root.Parent = Char
  1150. Torso.Parent = Char
  1151. Head.Parent = Char
  1152.  
  1153. Knife.Parent = Char
  1154. Hair.Parent = Char
  1155.  
  1156. HW.Parent = Char
  1157. HW2.Parent = Char
  1158.  
  1159.  
  1160. REye:destroy()
  1161. LEye:destroy()
  1162.  
  1163. for _,v in next, Char:children() do
  1164. if(v.Name == 'ShadowFace')then v:destroy() end
  1165. end
  1166. LEye = Part(Char,C3.N(1,0,0),Enum.Material.Neon,V3.N(.15,.25,.2),CF.N(),false,false)
  1167. LEyeM = Mesh(LEye,Enum.MeshType.Sphere,"","",V3.N(1,1,1),V3.N())
  1168. LEyeW = NewInstance("Weld",LEye,{Part0=Head,Part1=LEye,C0=CF.N(-.2,.2,-.49)})
  1169.  
  1170. REye = Part(Char,C3.N(1,0,0),Enum.Material.Neon,V3.N(.15,.25,.2),CF.N(),false,false)
  1171. REyeM = Mesh(REye,Enum.MeshType.Sphere,"","",V3.N(1,1,1),V3.N())
  1172. REyeW = NewInstance("Weld",REye,{Part0=Head,Part1=REye,C0=CF.N(.2,.2,-.49)})
  1173. for i = 1, 35 do
  1174. local FACE = Part(Char,C3.N(0,0,0),Enum.Material.Neon,V3.N(1.01,.5,1.01),CF.N(),false,false)
  1175. FACE.Transparency = 0+(i-1)/35.2
  1176. FACE.Name = 'ShadowFace'
  1177. Head:FindFirstChildOfClass("SpecialMesh"):Clone().Parent = FACE
  1178. NewInstance("Weld",Head,{Part0=Head,Part1=FACE,C0=CF.N(0,.35-(i-1)/75,0)})
  1179. --CreateWeldOrSnapOrMotor("Weld", Head, Head, FACE, CF(0,0.35-(i-1)/75,0), CF(0, 0, 0))
  1180. end
  1181. Hum = NewInstance("Humanoid",Char,{DisplayDistanceType='None'})
  1182. ConnectHum()
  1183. MaxHealth = oMH
  1184. Hum.MaxHealth = MaxHealth
  1185. Hum.Health = MaxHealth
  1186. swait(5)
  1187. Char.Parent = workspace
  1188.  
  1189. Attack = false
  1190. end
  1191.  
  1192. function ConnectHum()
  1193. Hum.Died:connect(Refuse)
  1194. end
  1195. ConnectHum()
  1196.  
  1197.  
  1198. --// Wrap it all up \\--
  1199. while true do
  1200. swait()
  1201. Sine = Sine + Change
  1202. if(not Music)then
  1203. Music = Sound(Torso,MusicID,1,3,true,false,true)
  1204. Music.Name = 'Music'
  1205. end
  1206. Music.Pitch = 1
  1207. Music.Volume = 5
  1208. Music.SoundId = "rbxassetid://"..MusicID
  1209. Music.Parent = Torso
  1210. Music:Resume()
  1211. local hitfloor,posfloor = workspace:FindPartOnRay(Ray.new(Root.CFrame.p,((CFrame.new(Root.Position,Root.Position - Vector3.new(0,1,0))).lookVector).unit * 4), Char)
  1212. local Walking = (math.abs(Root.Velocity.x) > 1 or math.abs(Root.Velocity.z) > 1)
  1213. 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 "Walk" or hitfloor and "Idle")
  1214. if(not Effects or not Effects.Parent)then
  1215. Effects = IN("Model",Char)
  1216. Effects.Name = "Effects"
  1217. end
  1218. Hum.WalkSpeed = WalkSpeed
  1219. if(State == 'Walk')then
  1220. if(Hum.WalkSpeed >= 24)then
  1221. local wsVal = 22 / (Hum.WalkSpeed/16)
  1222. local Alpha = math.min(.1 * (Hum.WalkSpeed/16),1)
  1223. Change = 2
  1224. RH.C1 = RH.C1:lerp(CF.N(0,1,0)*CF.N(0,0-.2*M.C(Sine/wsVal),0+.4*M.C(Sine/wsVal))*CF.A(M.R(25+45*M.C(Sine/wsVal))+-M.S(Sine/wsVal),0,0),Alpha)
  1225. LH.C1 = LH.C1:lerp(CF.N(0,1,0)*CF.N(0,0+.2*M.C(Sine/wsVal),0-.4*M.C(Sine/wsVal))*CF.A(M.R(25-45*M.C(Sine/wsVal))+M.S(Sine/wsVal),0,0),Alpha)
  1226. else
  1227. Change = .9
  1228. local wsVal = 8 / (Hum.WalkSpeed/8)
  1229. local Alpha = math.min(.2 * (Hum.WalkSpeed/8),1)
  1230. LH.C1 = LH.C1:lerp(CF.N(0,1-.2*M.C(Sine/wsVal)/2,.4*M.C(Sine/wsVal)/2)*CF.A(M.R(15-2*M.C(Sine/wsVal))-M.S(Sine/wsVal)/2.5,0,0)*CF.A(M.R(0-3*M.C(Sine/wsVal)),0,0),Alpha)
  1231. RH.C1 = RH.C1:lerp(CF.N(0,1+.2*M.C(Sine/wsVal)/2,-.4*M.C(Sine/wsVal)/2)*CF.A(M.R(15+2*M.C(Sine/wsVal))+M.S(Sine/wsVal)/2.5,0,0)*CF.A(M.R(0+3*M.C(Sine/wsVal)),0,0),Alpha)
  1232. end
  1233. else
  1234. RH.C1 = RH.C1:lerp(CF.N(0,1,0),.1)
  1235. LH.C1 = LH.C1:lerp(CF.N(0,1,0),.1)
  1236. end
  1237. for _,v in next, Char:children() do
  1238. if(v:IsA'Accessory')then
  1239. v:destroy()
  1240. elseif(v:IsA'Shirt')then
  1241. v.ShirtTemplate = "rbxassetid://344089667"
  1242. elseif(v:IsA'Pants')then
  1243. v.PantsTemplate = "rbxassetid://344084364"
  1244. elseif(v:IsA'CharacterMesh')then
  1245. v:destroy()
  1246. elseif(v:FindFirstChildOfClass'ShirtGraphic')then
  1247. v:FindFirstChildOfClass'ShirtGraphic':destroy()
  1248. end
  1249. end
  1250. local face = Head:FindFirstChild'face'
  1251. if(not face)then
  1252. NewInstance("Decal",Head,{Name='face',Face=Enum.NormalId.Front,Texture="rbxassetid://404306534"})
  1253. else
  1254. face.Texture = "rbxassetid://404306534"
  1255. end
  1256. RArm.BrickColor = BrickColor.new'Pastel brown'
  1257. LArm.BrickColor = BrickColor.new'Pastel brown'
  1258. RLeg.BrickColor = BrickColor.new'Pastel brown'
  1259. LLeg.BrickColor = BrickColor.new'Pastel brown'
  1260. Torso.BrickColor = BrickColor.new'Pastel brown'
  1261. Head.BrickColor = BrickColor.new'Pastel brown'
  1262. Hum.Name = 'Chara'
  1263. if(Hum.MaxHealth ~= MaxHealth)then
  1264. Hum.MaxHealth = MaxHealth
  1265. end
  1266. Hum.DisplayDistanceType='None'
  1267. if(NeutralAnims)then
  1268. if(State == 'Idle')then
  1269. Change = 1
  1270. local Alpha = .1
  1271. RJ.C0 = clerp(RJ.C0,CFrame.new(-0.0999571308, 0+.05*M.C(Sine/16), -0.237876296, 0.857335567, -0.00323621999, -0.514731407, 0, 0.99998033, -0.00628707698, 0.51474154, 0.00539013464, 0.85731858),Alpha)
  1272. LH.C0 = clerp(LH.C0,CFrame.new(-0.536091685, -0.991042495-.05*M.C(Sine/16), -0.0134909991, 0.849195242, 0, 0.528063774, -0.00331997755, 0.99998033, 0.00533895614, -0.528053343, -0.00628707698, 0.849178433),Alpha)
  1273. RH.C0 = clerp(RH.C0,CFrame.new(0.529067397, -0.991597891-.05*M.C(Sine/16), -0.0818087086, 0.849195242, 0, 0.528063774, -0.00331997755, 0.99998033, 0.00533895614, -0.528053343, -0.00628707698, 0.849178433),Alpha)
  1274. LS.C0 = clerp(LS.C0,CFrame.new(-1.32175505, 0.156236127+.15*M.C(Sine/16), 0.233877867, 0.877554953, -0.456876248, 0.145469457, 0.259513229, 0.707695842, 0.657129884, -0.403175086, -0.538916171, 0.739607573),Alpha)
  1275. RS.C0 = clerp(RS.C0,CFrame.new(1.2516855, 0.604915917+.15*M.C(Sine/16), -0.0189059302, 0.915104508, -0.287113011, -0.283108115, 0.301054537, 0.953587949, 0.00603589695, 0.268235415, -0.0907544345, 0.959069014),Alpha)
  1276. NK.C0 = clerp(NK.C0,CFrame.new(1.79447234e-05, 1.49895597, -0.0143749639, 0.769539058, -0.360377938, 0.527197778, 0.387706369, 0.919646919, 0.0627188534, -0.507438183, 0.156133309, 0.847424924),Alpha)
  1277. HW.C0 = HW.C0:lerp(CF.N(0,-1,-1)*CF.A(M.R(-90),0,0),Alpha)
  1278. -- idle
  1279. elseif(State == 'Walk')then
  1280. if(Hum.WalkSpeed >= 24)then
  1281. local wsVal = 22 / (Hum.WalkSpeed/16)
  1282. local Alpha = math.min(.2 * (Hum.WalkSpeed/16),1)
  1283. RJ.C0 = RJ.C0:lerp(CF.N(0,0-.15*M.C(Sine/(wsVal/2)),0)*CF.A(M.R(-15),M.R(0-15*M.S(Sine/wsVal)/2),0),Alpha)
  1284. 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+15*M.S(Sine/wsVal))),Alpha)
  1285. 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+15*M.S(Sine/wsVal))),Alpha)
  1286. NK.C0 = NK.C0:lerp(NKC0*CF.A(M.R(15),0,0),Alpha)
  1287. LH.C0 = LH.C0:lerp(LHC0*CF.N(0,0+.15*M.C(Sine/(wsVal/2)),0)*CF.A(M.R(15),0,0),Alpha)
  1288. RH.C0 = RH.C0:lerp(RHC0*CF.N(0,0+.15*M.C(Sine/(wsVal/2)),0)*CF.A(M.R(15),0,0),Alpha)
  1289. HW.C0 = HW.C0:lerp(CF.N(0,-1,-1)*CF.A(M.R(-90),0,0),Alpha)
  1290. else
  1291. local wsVal = 8 / (Hum.WalkSpeed/8)
  1292. local Alpha = math.min(.2 * (Hum.WalkSpeed/8),1)
  1293. RJ.C0 = RJ.C0:lerp(CF.N(0,0-.05*M.C(Sine/(wsVal/2)),0)*CF.A(0,M.R(0-5*M.S(Sine/wsVal)/2),0),Alpha)
  1294. LS.C0 = LS.C0:lerp(LSC0*CF.N(0,0,0+.3*M.S(Sine/wsVal))*CF.A(M.R(0-25*M.S(Sine/wsVal)),0,M.R(5-5*M.S(Sine/wsVal))),Alpha)
  1295. RS.C0 = RS.C0:lerp(RSC0*CF.N(0,0,0-.3*M.S(Sine/wsVal))*CF.A(M.R(0+25*M.S(Sine/wsVal)),0,M.R(-5-5*M.S(Sine/wsVal))),Alpha)
  1296. NK.C0 = NK.C0:lerp(NKC0,Alpha)
  1297. LH.C0 = LH.C0:lerp(LHC0*CF.N(0,0+.05*M.C(Sine/(wsVal/2)),0),Alpha)
  1298. RH.C0 = RH.C0:lerp(RHC0*CF.N(0,0+.05*M.C(Sine/(wsVal/2)),0),Alpha)
  1299. HW.C0 = HW.C0:lerp(CF.N(0,-1,-1)*CF.A(M.R(-90),0,0),Alpha)
  1300. end
  1301. elseif(State == 'Jump' or State == 'Fall')then
  1302. if(Walking)then
  1303. local Alpha = .2
  1304. RJ.C0 = clerp(RJ.C0,RJC0*CF.A(math.min(math.max(Root.Velocity.Y/100,-M.R(65)),M.R(65)),0,0),Alpha)
  1305. LH.C0 = clerp(LH.C0,CFrame.new(-0.497912645, -1.0987643, -0.0683324337, 0.999878228, 0.00860835519, 0.0130246133, -0.00010142161, 0.837816596, -0.545952022, -0.015611981, 0.545884132, 0.837715328),Alpha)
  1306. RH.C0 = clerp(RH.C0,CFrame.new(0.499978393, -1.16382337, 0.109293163, 0.999878228, -0.0120433727, 0.00993486121, -0.00010142161, 0.631323814, 0.775519371, -0.015611981, -0.775425911, 0.631245613),Alpha)
  1307. LS.C0 = clerp(LS.C0,CFrame.new(-1.55211556, 0.576563478, -0.00269976072, 0.976067662, 0.216906726, 0.0156116467, -0.217024669, 0.976145923, 0.00628317893, -0.0138763804, -0.00952091813, 0.999858499),Alpha)
  1308. RS.C0 = clerp(RS.C0,CFrame.new(1.50182188, 0.636661649, 0.00632623257, 0.977592707, -0.209926367, 0.0156121543, 0.209851891, 0.977713108, 0.00628198683, -0.016582964, -0.00286500831, 0.999858439),Alpha)
  1309. NK.C0 = clerp(NK.C0,CFrame.new(1.14440072e-05, 1.49924362, -0.0143961608, 1.00000024, -5.82076609e-11, 0, 1.23691279e-10, 0.997964919, 0.0637660474, 0, -0.0637660623, 0.997965038),Alpha)
  1310. HW.C0 = HW.C0:lerp(CF.N(0,-1,-1)*CF.A(M.R(-90),0,0),Alpha)
  1311. else
  1312. local Alpha = .2
  1313. RJ.C0 = clerp(RJ.C0,RJC0*CF.A(math.min(math.max(Root.Velocity.Y/100,-M.R(65)),M.R(65)),0,0),Alpha)
  1314. LH.C0 = clerp(LH.C0,CFrame.new(-0.504374504, -0.291219354, -0.487436086, 0.999878228, -0.00438931212, 0.0149825988, -0.00010142161, 0.957819223, 0.287371844, -0.015611981, -0.287338346, 0.957701981),Alpha)
  1315. RH.C0 = clerp(RH.C0,CFrame.new(0.453094482, -0.871358454, 0.0898642987, 0.985589385, -0.168456957, 0.0153662469, 0.162863791, 0.969548643, 0.182895929, -0.0457084104, -0.177757636, 0.983012319),Alpha)
  1316. LS.C0 = clerp(LS.C0,CFrame.new(-1.55211556, 0.576563478, -0.00269976072, 0.976067662, 0.216906726, 0.0156116467, -0.217024669, 0.976145923, 0.00628317893, -0.0138763804, -0.00952091813, 0.999858499),Alpha)
  1317. RS.C0 = clerp(RS.C0,CFrame.new(1.50182188, 0.636661649, 0.00632623257, 0.977592707, -0.209926367, 0.0156121543, 0.209851891, 0.977713108, 0.00628198683, -0.016582964, -0.00286500831, 0.999858439),Alpha)
  1318. NK.C0 = clerp(NK.C0,CFrame.new(1.14440072e-05, 1.49924362, -0.0143961608, 1.00000024, -5.82076609e-11, 0, 1.23691279e-10, 0.997964919, 0.0637660474, 0, -0.0637660623, 0.997965038),Alpha)
  1319. HW.C0 = HW.C0:lerp(CF.N(0,-1,-1)*CF.A(M.R(-90),0,0),Alpha)
  1320. end
  1321. elseif(State == 'Paralyzed')then
  1322. -- paralyzed
  1323. elseif(State == 'Sit')then
  1324. -- sit
  1325. end
  1326. end
  1327. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement