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