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