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