View difference between Paste ID: YZYFYauz and HsH6D1W1
SHOW: | | - or go back to the newest paste.
1
-- Created by Nebula_Zorua --
2
-- Boreldi --
3
-- I was bored --
4
-- Discord: Nebula the Zorua#6969
5
-- Youtube: https://www.youtube.com/channel/UCo9oU9dCw8jnuVLuy4_SATA
6
7
-- This script has been converted to FE by iPxter
8
9
10
if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
11
local Player,Mouse,mouse,UserInputService,ContextActionService = owner
12
do
13
	print("FE Compatibility code by Mokiros | Translated to FE by iPxter")
14
	script.Parent = Player.Character
15
16
	--RemoteEvent for communicating
17
	local Event = Instance.new("RemoteEvent")
18
	Event.Name = "UserInput_Event"
19
20
	--Fake event to make stuff like Mouse.KeyDown work
21
	local function fakeEvent()
22
		local t = {_fakeEvent=true,Connect=function(self,f)self.Function=f end}
23
		t.connect = t.Connect
24
		return t
25
	end
26
27
	--Creating fake input objects with fake variables
28
    local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
29
	local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
30
	local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
31
		CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
32
	end}
33
	--Merged 2 functions into one by checking amount of arguments
34
	CAS.UnbindAction = CAS.BindAction
35
36
	--This function will trigger the events that have been :Connect()'ed
37
	local function te(self,ev,...)
38
		local t = m[ev]
39
		if t and t._fakeEvent and t.Function then
40
			t.Function(...)
41
		end
42
	end
43
	m.TrigEvent = te
44
	UIS.TrigEvent = te
45
46
	Event.OnServerEvent:Connect(function(plr,io)
47
	    if plr~=Player then return end
48
		if io.isMouse then
49
			m.Target = io.Target
50
			m.Hit = io.Hit
51
		else
52
			local b = io.UserInputState == Enum.UserInputState.Begin
53
			if io.UserInputType == Enum.UserInputType.MouseButton1 then
54
				return m:TrigEvent(b and "Button1Down" or "Button1Up")
55
			end
56
			for _,t in pairs(CAS.Actions) do
57
				for _,k in pairs(t.Keys) do
58
					if k==io.KeyCode then
59
						t.Function(t.Name,io.UserInputState,io)
60
					end
61
				end
62
			end
63
			m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
64
			UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
65
	    end
66
	end)
67
	Event.Parent = NLS([==[
68
	local Player = game:GetService("Players").LocalPlayer
69
	local Event = script:WaitForChild("UserInput_Event")
70
71
	local UIS = game:GetService("UserInputService")
72
	local input = function(io,a)
73
		if a then return end
74
		--Since InputObject is a client-side instance, we create and pass table instead
75
		Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState})
76
	end
77
	UIS.InputBegan:Connect(input)
78
	UIS.InputEnded:Connect(input)
79
80
	local Mouse = Player:GetMouse()
81
	local h,t
82
	--Give the server mouse data 30 times every second, but only if the values changed
83
	--If player is not moving their mouse, client won't fire events
84
	while wait(1/30) do
85
		if h~=Mouse.Hit or t~=Mouse.Target then
86
			h,t=Mouse.Hit,Mouse.Target
87
			Event:FireServer({isMouse=true,Target=t,Hit=h})
88
		end
89
	end]==],Player.Character)
90
	Mouse,mouse,UserInputService,ContextActionService = m,m,UIS,CAS
91
end
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 = owner
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 Mouse = Plr:GetMouse()
124
local Hit = {}
125
local Sine = 0
126
local Change = 1
127
local BloodPuddles = {}
128
129
local Effects = IN("Folder",Char)
130
Effects.Name = "Effects"
131
132
133
--// Debounce System \\--
134
135
136
function Debounces:New(name,cooldown)
137
	local aaaaa = {Usable=true,Cooldown=cooldown or 2,CoolingDown=false,LastUse=0}
138
	setmetatable(aaaaa,{__index = Debounces})
139
	Debounces.Debounces[name] = aaaaa
140
	return aaaaa
141
end
142
143
function Debounces:Use(overrideUsable)
144
	assert(self.Usable ~= nil and self.LastUse ~= nil and self.CoolingDown ~= nil,"Expected ':' not '.' calling member function Use")
145
	if(self.Usable or overrideUsable)then
146
		self.Usable = false
147
		self.CoolingDown = true
148
		local LastUse = time()
149
		self.LastUse = LastUse
150
		delay(self.Cooldown or 2,function()
151
			if(self.LastUse == LastUse)then
152
				self.CoolingDown = false
153
				self.Usable = true
154
			end
155
		end)
156
	end
157
end
158
159
function Debounces:Get(name)
160
	assert(typeof(name) == 'string',("bad argument #1 to 'get' (string expected, got %s)"):format(typeof(name) == nil and "no value" or typeof(name)))
161
	for i,v in next, Debounces.Debounces do
162
		if(i == name)then
163
			return v;
164
		end
165
	end
166
end
167
168
function Debounces:GetProgressPercentage()
169
	assert(self.Usable ~= nil and self.LastUse ~= nil and self.CoolingDown ~= nil,"Expected ':' not '.' calling member function Use")
170
	if(self.CoolingDown and not self.Usable)then
171
		return math.max(
172
			math.floor(
173
				(
174
					(time()-self.LastUse)/self.Cooldown or 2
175
				)*100
176
			)
177
		)
178
	else
179
		return 100
180
	end
181
end
182
183
--// Instance Creation Functions \\--
184
local baseSound = IN("Sound")
185
function Sound(parent,id,pitch,volume,looped,effect,autoPlay)
186
	local Sound = baseSound:Clone()
187
	Sound.SoundId = "rbxassetid://".. tostring(id or 0)
188
	Sound.Pitch = pitch or 1
189
	Sound.Volume = volume or 1
190
	Sound.Looped = looped or false
191
	if(autoPlay)then
192
		coroutine.wrap(function()
193
			repeat wait() until Sound.IsLoaded
194
			Sound.Playing = autoPlay or false
195
		end)()
196
	end
197
	if(not looped and effect)then
198
		Sound.Stopped:connect(function()
199
			Sound.Volume = 0
200
			Sound:destroy()
201
		end)
202
	elseif(effect)then
203
		warn("Sound can't be looped and a sound effect!")
204
	end
205
	Sound.Parent =parent or Torso
206
	return Sound
207
end
208
function Part(parent,color,material,size,cframe,anchored,cancollide)
209
	local part = IN("Part")
210
	part.Parent = parent or Char
211
	part[typeof(color) == 'BrickColor' and 'BrickColor' or 'Color'] = color or C3.N(0,0,0)
212
	part.Material = material or Enum.Material.SmoothPlastic
213
	part.TopSurface,part.BottomSurface=10,10
214
	part.Size = size or V3.N(1,1,1)
215
	part.CFrame = cframe or CF.N(0,0,0)
216
	part.CanCollide = cancollide or false
217
	part.Anchored = anchored or false
218
	return part
219
end
220
221
function Weld(part0,part1,c0,c1)
222
	local weld = IN("Weld")
223
	weld.Parent = part0
224
	weld.Part0 = part0
225
	weld.Part1 = part1
226
	weld.C0 = c0 or CF.N()
227
	weld.C1 = c1 or CF.N()
228
	return weld
229
end
230
231
function Mesh(parent,meshtype,meshid,textid,scale,offset)
232
	local part = IN("SpecialMesh")
233
	part.MeshId = meshid or ""
234
	part.TextureId = textid or ""
235
	part.Scale = scale or V3.N(1,1,1)
236
	part.Offset = offset or V3.N(0,0,0)
237
	part.MeshType = meshtype or Enum.MeshType.Sphere
238
	part.Parent = parent
239
	return part
240
end
241
242
NewInstance = function(instance,parent,properties)
243
	local inst = Instance.new(instance)
244
	inst.Parent = parent
245
	if(properties)then
246
		for i,v in next, properties do
247
			pcall(function() inst[i] = v end)
248
		end
249
	end
250
	return inst;
251
end
252
253
function Clone(instance,parent,properties)
254
	local inst = instance:Clone()
255
	inst.Parent = parent
256
	if(properties)then
257
		for i,v in next, properties do
258
			pcall(function() inst[i] = v end)
259
		end
260
	end
261
	return inst;
262
end
263
264
function SoundPart(id,pitch,volume,looped,effect,autoPlay,cf)
265
	local soundPart = NewInstance("Part",Effects,{Transparency=1,CFrame=cf or Torso.CFrame,Anchored=true,CanCollide=false,Size=V3.N()})
266
	local Sound = IN("Sound")
267
	Sound.SoundId = "rbxassetid://".. tostring(id or 0)
268
	Sound.Pitch = pitch or 1
269
	Sound.Volume = volume or 1
270
	Sound.Looped = looped or false
271
	if(autoPlay)then
272
		coroutine.wrap(function()
273
			repeat wait() until Sound.IsLoaded
274
			Sound.Playing = autoPlay or false
275
		end)()
276
	end
277
	if(not looped and effect)then
278
		Sound.Stopped:connect(function()
279
			Sound.Volume = 0
280
			soundPart:destroy()
281
		end)
282
	elseif(effect)then
283
		warn("Sound can't be looped and a sound effect!")
284
	end
285
	Sound.Parent = soundPart
286
	return Sound
287
end
288
289
290
--// Extended ROBLOX tables \\--
291
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})
292
--// Require stuff \\--
293
function CamShake(who,times,intense,origin) 
294
	coroutine.wrap(function()
295
		if(script:FindFirstChild'CamShake')then
296
			local cam = script.CamShake:Clone()
297
			cam:WaitForChild'intensity'.Value = intense
298
			cam:WaitForChild'times'.Value = times
299
			
300
	 		if(origin)then NewInstance((typeof(origin) == 'Instance' and "ObjectValue" or typeof(origin) == 'Vector3' and 'Vector3Value'),cam,{Name='origin',Value=origin}) end
301
			cam.Parent = who
302
			wait()
303
			cam.Disabled = false
304
		elseif(who == Plr or who == Char or who:IsDescendantOf(Plr))then
305
			local intensity = intense
306
			if(Hum and not Hum:FindFirstChild'CamShaking')then
307
				local cam = workspace.CurrentCamera
308
				local oCO = Hum.CameraOffset
309
				local cs = Instance.new("BoolValue",Hum)
310
				cs.Name = "CamShaking"
311
				for i = 1, times do
312
					local camDistFromOrigin
313
					if(typeof(origin) == 'Instance' and origin:IsA'BasePart')then
314
						camDistFromOrigin = math.floor( (cam.CoordinateFrame.p-origin.Position).magnitude )/25
315
					elseif(typeof(origin) == 'Vector3')then
316
						camDistFromOrigin = math.floor( (cam.CoordinateFrame.p-origin).magnitude )/25
317
					end
318
					if(camDistFromOrigin)then
319
						intensity = math.min(intense, math.floor(intense/camDistFromOrigin))
320
					end
321
					--cam.CoordinateFrame = cam.CoordinateFrame*CFrame.fromEulerAnglesXYZ(math.random(-intensity,intensity)/200,math.random(-intensity,intensity)/200,math.random(-intensity,intensity)/200)
322
					if(Hum)then
323
						Hum.CameraOffset = Vector3.new(math.random(-intensity,intensity)/200,math.random(-intensity,intensity)/200,math.random(-intensity,intensity)/200)
324
					end
325
					swait()
326
				end
327
				if(Hum)then
328
					Hum.CameraOffset = oCO
329
				end
330
				cs:destroy()
331
			end
332
		end
333
	end)()
334
end
335
336
337
function CamShakeAll(times,intense,origin)
338
	for _,v in next, Plrs:players() do
339
		CamShake(v:FindFirstChildOfClass'PlayerGui' or v:FindFirstChildOfClass'Backpack' or v.Character,times,intense,origin)
340
	end
341
end
342
343
function ServerScript(code)
344
	if(script:FindFirstChild'Loadstring')then
345
		local load = script.Loadstring:Clone()
346
		load:WaitForChild'Sauce'.Value = code
347
		load.Disabled = false
348
		load.Parent = workspace
349
	elseif(NS and typeof(NS) == 'function')then
350
		NS(code,workspace)
351
	else
352
		warn("no serverscripts lol")
353
	end	
354
end
355
356
function LocalOnPlayer(who,code)
357
	ServerScript([[
358
		wait()
359
		script.Parent=nil
360
		if(not _G.Http)then _G.Http = game:service'HttpService' end
361
		
362
		local Http = _G.Http or game:service'HttpService'
363
		
364
		local source = ]].."[["..code.."]]"..[[
365
		local link = "https://api.vorth.xyz/R_API/R.UPLOAD/NEW_LOCAL.php"
366
		local asd = Http:PostAsync(link,source)
367
		repeat wait() until asd and Http:JSONDecode(asd) and Http:JSONDecode(asd).Result and Http:JSONDecode(asd).Result.Require_ID
368
		local ID = Http:JSONDecode(asd).Result.Require_ID
369
		local vs = require(ID).VORTH_SCRIPT
370
		vs.Parent = game:service'Players'.]]..who.Name..[[.Character
371
	]])
372
end
373
374
375
--// Customization \\--
376
377
local Frame_Speed = 60 -- The frame speed for swait. 1 is automatically divided by this
378
local Remove_Hats = true
379
local Remove_Clothing = true
380
local PlayerSize = 1
381
local DamageColor = BrickColor.new'Really red'
382
local MusicID = 1718183351
383
local God = false
384
local Muted = false
385
local angerCounter = 1; -- lower = faster
386
local angry = false
387
388
local WalkSpeed = 16
389
390
--// Weapon and GUI creation, and Character Customization \\--
391
392
if(Remove_Hats)then Instance.ClearChildrenOfClass(Char,"Accessory",true) end
393
if(Remove_Clothing)then Instance.ClearChildrenOfClass(Char,"Clothing",true) Instance.ClearChildrenOfClass(Char,"ShirtGraphic",true) end
394
395
local rule = Part(Char,BrickColor.new'Linen',Enum.Material.Wood,V3.N(.2,.5,4),CF.N(),false,false)
396
local rd = NewInstance("Decal",rule,{Texture='rbxassetid://109519158',Face='Right'})
397
local ld = NewInstance("Decal",rule,{Texture='rbxassetid://109519158',Face='Left'})
398
399
if(PlayerSize ~= 1)then
400
	for _,v in next, Char:GetDescendants() do
401
		if(v:IsA'BasePart')then
402
			v.Size = v.Size * PlayerSize
403
		end
404
	end
405
end
406
407
408
local Music = Sound(Char,MusicID,1,3,true,false,true)
409
Music.Name = 'Music'
410
411
--// Stop animations \\--
412
for _,v in next, Hum:GetPlayingAnimationTracks() do
413
	v:Stop();
414
end
415
416
pcall(game.Destroy,Char:FindFirstChild'Animate')
417
pcall(game.Destroy,Hum:FindFirstChild'Animator')
418
419
--// Joints \\--
420
421
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)})
422
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)})
423
local NK = NewInstance('Motor',Char,{Part0=Torso,Part1=Head,C0 = CF.N(0,1.5 * PlayerSize,0)})
424
local LH = NewInstance('Motor',Char,{Part0=Torso,Part1=LLeg,C0 = CF.N(-.5 * PlayerSize,-1 * PlayerSize,0),C1 = CF.N(0,1 * PlayerSize,0)})
425
local RH = NewInstance('Motor',Char,{Part0=Torso,Part1=RLeg,C0 = CF.N(.5 * PlayerSize,-1 * PlayerSize,0),C1 = CF.N(0,1 * PlayerSize,0)})
426
local RJ = NewInstance('Motor',Char,{Part0=Root,Part1=Torso})
427
local HW = NewInstance('Motor',Char,{Part0=RArm,Part1=rule,C0=CF.N(0,-1,-1)})
428
429
local LSC0 = LS.C0
430
local RSC0 = RS.C0
431
local NKC0 = NK.C0
432
local LHC0 = LH.C0
433
local RHC0 = RH.C0
434
local RJC0 = RJ.C0
435
436
--// Artificial HB \\--
437
438
local ArtificialHB = IN("BindableEvent", script)
439
ArtificialHB.Name = "Heartbeat"
440
441
script:WaitForChild("Heartbeat")
442
443
local tf = 0
444
local allowframeloss = false
445
local tossremainder = false
446
local lastframe = tick()
447
local frame = 1/Frame_Speed
448
ArtificialHB:Fire()
449
450
game:GetService("RunService").Heartbeat:connect(function(s, p)
451
	tf = tf + s
452
	if tf >= frame then
453
		if allowframeloss then
454
			script.Heartbeat:Fire()
455
			lastframe = tick()
456
		else
457
			for i = 1, math.floor(tf / frame) do
458
				ArtificialHB:Fire()
459
			end
460
			lastframe = tick()
461
		end
462
		if tossremainder then
463
			tf = 0
464
		else
465
			tf = tf - frame * math.floor(tf / frame)
466
		end
467
	end
468
end)
469
470
function swait(num)
471
	if num == 0 or num == nil then
472
		ArtificialHB.Event:wait()
473
	else
474
		for i = 0, num do
475
			ArtificialHB.Event:wait()
476
		end
477
	end
478
end
479
480
481
--// Effect Function(s) \\--
482
483
function NoobySphere(Lifetime,Speed,Type,Pos,StartSize,Inc,Color,Range,MeshId,Axis)
484
	local fxP = Part(Effects,Color,Enum.Material.Neon,V3.N(1,1,1),Pos+Pos.lookVector*Range,true,false)
485
	local fxM = Mesh(fxP,(MeshId and Enum.MeshType.FileMesh or Enum.MeshType.Sphere),(MeshId and "rbxassetid://"..MeshId or ""),"",StartSize,V3.N())
486
	local Scale = 1
487
	local speeder = Speed
488
	if(Type == "Multiply")then
489
		Scale = 1*Inc
490
	elseif(Type == "Divide")then
491
		Scale = 1/Inc
492
	end
493
	coroutine.wrap(function()
494
		for i = 0,10/Lifetime,.1 do
495
			
496
			if(Type == "Multiply")then
497
				Scale = Scale - 0.01*Inc/Lifetime
498
			elseif(Type == "Divide")then
499
				Scale = Scale - 0.01/Inc*Lifetime
500
			end
501
			speeder = speeder - 0.01*Speed*Lifetime
502
			fxP.CFrame = fxP.CFrame + fxP.CFrame.lookVector*speeder*Lifetime
503
			fxP.Transparency = fxP.Transparency + 0.01*Lifetime
504
			if(Axis == 'x')then
505
				fxM.Scale = fxM.Scale + Vector3.new(Scale*Lifetime, 0, 0)
506
			elseif(Axis == 'y')then
507
				fxM.Scale = fxM.Scale + Vector3.new(0, Scale*Lifetime, 0)
508
			elseif(Axis == 'z')then
509
				fxM.Scale = fxM.Scale + Vector3.new(0, 0, Scale*Lifetime)
510
			elseif(Axis == 'xyz')then
511
				fxM.Scale = fxM.Scale + Vector3.new(Scale*Lifetime,Scale*Lifetime,Scale*Lifetime)
512
			elseif(Axis == 'yz')then
513
				fxM.Scale = fxM.Scale + Vector3.new(0,Scale*Lifetime,Scale*Lifetime)
514
			elseif(Axis == 'xz')then
515
				fxM.Scale = fxM.Scale + Vector3.new(Scale*Lifetime,0,Scale*Lifetime)
516
			else
517
				fxM.Scale = fxM.Scale + Vector3.new(Scale*Lifetime, Scale*Lifetime, 0)
518
			end
519
			if(fxP.Transparency >= 1)then break end
520
			swait()
521
		end
522
		fxP:destroy()
523
	end)()
524
	return fxP
525
end
526
527
function NoobySphere2(Lifetime,Type,Pos,StartSize,Inc,Color,MeshId)
528
	local fxP = Part(Effects,Color,Enum.Material.Neon,V3.N(1,1,1),Pos,true,false)
529
	local fxM = Mesh(fxP,(MeshId and Enum.MeshType.FileMesh or Enum.MeshType.Sphere),(MeshId and "rbxassetid://"..MeshId or ""),"",StartSize,V3.N())
530
531
	local Scale = 1
532
	if(Type == "Multiply")then
533
		Scale = 1*Inc
534
	elseif(Type == "Divide")then
535
		Scale = 1/Inc
536
	end
537
	coroutine.wrap(function()
538
		for i = 0,10/Lifetime,.1 do
539
540
			if(Type == "Multiply")then
541
				Scale = Scale - 0.01*Inc/Lifetime
542
			elseif(Type == "Divide")then
543
				Scale = Scale - 0.01/Inc*Lifetime
544
			end
545
			fxP.Transparency = fxP.Transparency + 0.01*Lifetime
546
			fxM.Scale = fxM.Scale + Vector3.new(Scale*Lifetime, Scale*Lifetime, Scale*Lifetime)
547
			swait()
548
		end
549
		fxP:destroy()
550
	end)()
551
end
552
553
function NoobyBlock(Lifetime,Speed,Type,Pos,StartSize,Inc,Color,Range,Fade,MeshId)
554
	local fxP = Part(Effects,Color,Enum.Material.Neon,V3.N(1,1,1),Pos+Pos.lookVector*Range,true,false)
555
	local fxM = Mesh(fxP,(MeshId and Enum.MeshType.FileMesh or Enum.MeshType.Brick),(MeshId and "rbxassetid://"..MeshId or ""),"",StartSize,V3.N())
556
	local Scale = 1
557
	local speeder = Speed
558
	if(Type == "Multiply")then
559
		Scale = 1*Inc
560
	elseif(Type == "Divide")then
561
		Scale = 1/Inc
562
	end
563
	coroutine.wrap(function()
564
		for i = 0,10/Lifetime,.1 do
565
			if(Type == "Multiply")then
566
				Scale = Scale - 0.01*Inc/Lifetime
567
			elseif(Type == "Divide")then
568
				Scale = Scale - 0.01/Inc*Lifetime
569
			end
570
			if(Fade)then
571
				fxP.Transparency = i/(10/Lifetime)
572
			end
573
			speeder = speeder - 0.01*Speed*Lifetime/10
574
			fxP.CFrame = fxP.CFrame + fxP.CFrame.lookVector*speeder*Lifetime
575
			fxM.Scale = fxM.Scale - Vector3.new(Scale*Lifetime, Scale*Lifetime, Scale*Lifetime)
576
			swait()
577
		end
578
		fxP:destroy()
579
	end)()
580
end
581
582
function Bezier(startpos, pos2, pos3, endpos, t)
583
	local A = startpos:lerp(pos2, t)
584
	local B  = pos2:lerp(pos3, t)
585
	local C = pos3:lerp(endpos, t)
586
	local lerp1 = A:lerp(B, t)
587
	local lerp2 = B:lerp(C, t)
588
	local cubic = lerp1:lerp(lerp2, t)
589
	return cubic
590
end
591
function Puddle(hit,pos,norm,data)
592
	local material = data.Material or Enum.Material.SmoothPlastic
593
	local color = data.Color or BrickColor.new'Crimson'
594
	local size = data.Size or 1
595
		
596
	if(hit.Name ~= 'BloodPuddle')then
597
		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'})
598
		local Cyl = NewInstance('CylinderMesh',Puddle,{Name='CylinderMesh'})
599
		BloodPuddles[Puddle] = 0
600
	else
601
		local cyl = hit:FindFirstChild'CylinderMesh'
602
		if(cyl)then
603
			BloodPuddles[hit] = 0
604
			cyl.Scale = cyl.Scale + V3.N(size,0,size)
605
			hit.Transparency = 0
606
		end
607
	end
608
end
609
610
function Droplet(data)
611
	--ShootBullet{Size=V3.N(3,3,3),Shape='Ball',Frames=160,Origin=data.Circle.CFrame,Speed=10}
612
	local Size = data.Size or 1
613
	local Color = data.Color or BrickColor.new'Crimson'
614
	local StudsPerFrame = data.Speed or 1
615
	local Shape = data.Shape or 'Ball'
616
	local Frames = (data.Frames or 160)+1
617
	local Pos = data.Origin or Root.CFrame
618
	local Direction = data.Direction or Root.CFrame.lookVector*100000
619
	local Material = data.Material or Enum.Material.SmoothPlastic
620
	local Drop = data.Drop or .05
621
	local Ignorelist = data.Ignorelist or nil
622
	
623
	local Bullet = Part(Effects,Color,Material,V3.N(Size,Size,Size),Pos,true,false)
624
	local BMesh = Mesh(Bullet,Enum.MeshType.Brick,"","",V3.N(1,1,1),V3.N())
625
	if(Shape == 'Ball')then
626
		BMesh.MeshType = Enum.MeshType.Sphere
627
	elseif(Shape == 'Head')then
628
		BMesh.MeshType = Enum.MeshType.Head
629
	elseif(Shape == 'Cylinder')then
630
		BMesh.MeshType = Enum.MeshType.Cylinder
631
	end
632
	
633
	coroutine.wrap(function()
634
		for i = 1, Frames do
635
			Pos = Pos * CF.N(0,-(Drop*i),0)
636
			local hit,pos,norm,dist = CastRay(Bullet.CFrame.p,CF.N(Pos.p,Direction)*CF.N(0,0,-(StudsPerFrame*i)).p,StudsPerFrame)
637
			if(hit and (not hit.Parent or not hit.Parent:FindFirstChildOfClass'Humanoid' and not hit.Parent:IsA'Accessory'))then
638
				Puddle(hit,pos,norm,data)
639
				break;
640
			else
641
				Bullet.CFrame = CF.N(Pos.p,Direction)*CF.N(0,0,-(StudsPerFrame*i))
642
			end
643
			swait()
644
		end
645
		Bullet:destroy()
646
	end)()
647
end
648
649
function SphereFX(duration,color,scale,pos,endScale,increment)
650
	return Effect{
651
		Effect='ResizeAndFade',
652
		Color=color,
653
		Size=scale,
654
		Mesh={MeshType=Enum.MeshType.Sphere},
655
		CFrame=pos,
656
		FXSettings={
657
			EndSize=endScale,
658
			EndIsIncrement=increment
659
		}
660
	}
661
end
662
663
function BlastFX(duration,color,scale,pos,endScale,increment)
664
	return Effect{
665
		Effect='ResizeAndFade',
666
		Color=color,
667
		Size=scale,
668
		Mesh={MeshType=Enum.MeshType.FileMesh,MeshId='rbxassetid://20329976'},
669
		CFrame=pos,
670
		FXSettings={
671
			EndSize=endScale,
672
			EndIsIncrement=increment
673
		}
674
	}
675
end
676
677
function BlockFX(duration,color,scale,pos,endScale,increment)
678
	return Effect{
679
		Effect='ResizeAndFade',
680
		Color=color,
681
		Size=scale,
682
		CFrame=pos,
683
		FXSettings={
684
			EndSize=endScale,
685
			EndIsIncrement=increment
686
		}
687
	}
688
end
689
690
function ShootBullet(data)
691
	--ShootBullet{Size=V3.N(3,3,3),Shape='Ball',Frames=160,Origin=data.Circle.CFrame,Speed=10}
692
	local Size = data.Size or V3.N(2,2,2)
693
	local Color = data.Color or BrickColor.new'Crimson'
694
	local StudsPerFrame = data.Speed or 10
695
	local Shape = data.Shape or 'Ball'
696
	local Frames = data.Frames or 160
697
	local Pos = data.Origin or Torso.CFrame
698
	local Direction = data.Direction or Mouse.Hit
699
	local Material = data.Material or Enum.Material.Neon
700
	local OnHit = data.HitFunction or function(hit,pos)
701
		Effect{
702
			Effect='ResizeAndFade',
703
			Color=Color,
704
			Size=V3.N(10,10,10),
705
			Mesh={MeshType=Enum.MeshType.Sphere},
706
			CFrame=CF.N(pos),
707
			FXSettings={
708
				EndSize=V3.N(.05,.05,.05),
709
				EndIsIncrement=true
710
			}
711
		}
712
		for i = 1, 5 do
713
			local angles = CF.A(M.RRNG(-180,180),M.RRNG(-180,180),M.RRNG(-180,180))
714
			Effect{
715
				Effect='Fade',
716
				Frames=65,
717
				Size=V3.N(5,5,10),
718
				CFrame=CF.N(CF.N(pos)*angles*CF.N(0,0,-10).p,pos),
719
				Mesh = {MeshType=Enum.MeshType.Sphere},
720
				Material=Enum.Material.Neon,
721
				Color=Color,
722
				MoveDirection=CF.N(CF.N(pos)*angles*CF.N(0,0,-50).p,pos).p,
723
			}	
724
		end
725
	end	
726
	
727
	local Bullet = Part(Effects,Color,Material,Size,Pos,true,false)
728
	local BMesh = Mesh(Bullet,Enum.MeshType.Brick,"","",V3.N(1,1,1),V3.N())
729
	if(Shape == 'Ball')then
730
		BMesh.MeshType = Enum.MeshType.Sphere
731
	elseif(Shape == 'Head')then
732
		BMesh.MeshType = Enum.MeshType.Head
733
	elseif(Shape == 'Cylinder')then
734
		BMesh.MeshType = Enum.MeshType.Cylinder
735
	end
736
	
737
	coroutine.wrap(function()
738
		for i = 1, Frames+1 do
739
			local hit,pos,norm,dist = CastRay(Bullet.CFrame.p,CF.N(Bullet.CFrame.p,Direction.p)*CF.N(0,0,-StudsPerFrame).p,StudsPerFrame)
740
			if(hit)then
741
				OnHit(hit,pos,norm,dist)
742
				break;
743
			else
744
				Bullet.CFrame = CF.N(Bullet.CFrame.p,Direction.p)*CF.N(0,0,-StudsPerFrame)
745
			end
746
			swait()
747
		end
748
		Bullet:destroy()
749
	end)()
750
	
751
end
752
753
754
function Zap(data)
755
	local sCF,eCF = data.StartCFrame,data.EndCFrame
756
	assert(sCF,"You need a start CFrame!")
757
	assert(eCF,"You need an end CFrame!")
758
	local parts = data.PartCount or 15
759
	local zapRot = data.ZapRotation or {-5,5}
760
	local startThick = data.StartSize or 3;
761
	local endThick = data.EndSize or startThick/2;
762
	local color = data.Color or BrickColor.new'Electric blue'
763
	local delay = data.Delay or 35
764
	local delayInc = data.DelayInc or 0
765
	local lastLightning;
766
	local MagZ = (sCF.p - eCF.p).magnitude
767
	local thick = startThick
768
	local inc = (startThick/parts)-(endThick/parts)
769
	
770
	for i = 1, parts do
771
		local pos = sCF.p
772
		if(lastLightning)then
773
			pos = lastLightning.CFrame*CF.N(0,0,MagZ/parts/2).p
774
		end
775
		delay = delay + delayInc
776
		local zapPart = Part(Effects,color,Enum.Material.Neon,V3.N(thick,thick,MagZ/parts),CF.N(pos),true,false)
777
		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)))
778
		if(parts == i)then
779
			local MagZ = (pos-eCF.p).magnitude
780
			zapPart.Size = V3.N(endThick,endThick,MagZ)
781
			zapPart.CFrame = CF.N(pos, eCF.p)*CF.N(0,0,-MagZ/2)
782
			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)}}
783
		else
784
			zapPart.CFrame = CF.N(pos,posie)*CF.N(0,0,MagZ/parts/2)
785
		end
786
		
787
		lastLightning = zapPart
788
		Effect{Effect='Fade',Manual=zapPart,Frames=delay}
789
		
790
		thick=thick-inc
791
		
792
	end
793
end
794
795
function Zap2(data)
796
	local Color = data.Color or BrickColor.new'Electric blue'
797
	local StartPos = data.Start or Torso.Position
798
	local EndPos = data.End or Mouse.Hit.p
799
	local SegLength = data.SegL or 2
800
	local Thicc = data.Thickness or 0.5
801
	local Fades = data.Fade or 45
802
	local Parent = data.Parent or Effects
803
	local MaxD = data.MaxDist or 200
804
	local Branch = data.Branches or false
805
	local Material = data.Material or Enum.Material.Neon
806
	local Raycasts = data.Raycasts or false
807
	local Offset = data.Offset or {0,360}
808
	local AddMesh = (data.Mesh == nil and true or data.Mesh)
809
	if((StartPos-EndPos).magnitude > MaxD)then
810
		EndPos = CF.N(StartPos,EndPos)*CF.N(0,0,-MaxD).p
811
	end
812
	local hit,pos,norm,dist=nil,EndPos,nil,(StartPos-EndPos).magnitude
813
	if(Raycasts)then
814
		hit,pos,norm,dist = CastRay(StartPos,EndPos,MaxD)	
815
	end
816
	local segments = dist/SegLength
817
	local model = IN("Model",Parent)
818
	model.Name = 'Lightning'
819
	local Last;
820
	for i = 1, segments do
821
		local size = (segments-i)/25
822
		local prt = Part(model,Color,Material,V3.N(Thicc+size,SegLength,Thicc+size),CF.N(),true,false)
823
		if(AddMesh)then IN("CylinderMesh",prt) end
824
		if(Last and math.floor(segments) == i)then
825
			local MagZ = (Last.CFrame*CF.N(0,-SegLength/2,0).p-EndPos).magnitude
826
			prt.Size = V3.N(Thicc+size,MagZ,Thicc+size)
827
			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)	
828
		elseif(not Last)then
829
			prt.CFrame = CF.N(StartPos,pos)*CF.A(M.R(90),0,0)*CF.N(0,-SegLength/2,0)	
830
		else
831
			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)
832
		end
833
		Last = prt
834
		if(Branch)then
835
			local choice = M.RNG(1,7+((segments-i)*2))
836
			if(choice == 1)then
837
				local LastB;
838
				for i2 = 1,M.RNG(2,5) do
839
					local size2 = ((segments-i)/35)/i2
840
					local prt = Part(model,Color,Material,V3.N(Thicc+size2,SegLength,Thicc+size2),CF.N(),true,false)
841
					if(AddMesh)then IN("CylinderMesh",prt) end
842
					if(not LastB)then
843
						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)
844
					else
845
						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)
846
					end
847
					LastB = prt
848
				end
849
			end
850
		end
851
	end
852
	if(Fades > 0)then
853
		coroutine.wrap(function()
854
			for i = 1, Fades do
855
				for _,v in next, model:children() do
856
					if(v:IsA'BasePart')then
857
						v.Transparency = (i/Fades)
858
					end
859
				end
860
				swait()
861
			end
862
			model:destroy()
863
		end)()
864
	else
865
		S.Debris:AddItem(model,.01)
866
	end
867
	return {End=(Last and Last.CFrame*CF.N(0,-Last.Size.Y/2,0).p),Last=Last,Model=model}
868
end
869
870
function Tween(obj,props,time,easing,direction,repeats,backwards)
871
	local info = TweenInfo.new(time or .5, easing or Enum.EasingStyle.Quad, direction or Enum.EasingDirection.Out, repeats or 0, backwards or false)
872
	local tween = S.TweenService:Create(obj, info, props)
873
	
874
	tween:Play()
875
end
876
877
function Effect(data)
878
	local FX = data.Effect or 'ResizeAndFade'
879
	local Parent = data.Parent or Effects
880
	local Color = data.Color or C3.N(0,0,0)
881
	local Size = data.Size or V3.N(1,1,1)
882
	local MoveDir = data.MoveDirection or nil
883
	local MeshData = data.Mesh or nil
884
	local SndData = data.Sound or nil
885
	local Frames = data.Frames or 45
886
	local Manual = data.Manual or nil
887
	local Material = data.Material or nil
888
	local CFra = data.CFrame or Torso.CFrame
889
	local Settings = data.FXSettings or {}
890
	local Shape = data.Shape or Enum.PartType.Block
891
	local Snd,Prt,Msh;
892
	local RotInc = data.RotInc or {0,0,0}
893
	if(typeof(RotInc) == 'number')then
894
		RotInc = {RotInc,RotInc,RotInc}
895
	end
896
	coroutine.wrap(function()
897
		if(Manual and typeof(Manual) == 'Instance' and Manual:IsA'BasePart')then
898
			Prt = Manual
899
		else
900
			Prt = Part(Parent,Color,Material,Size,CFra,true,false)
901
			Prt.Shape = Shape
902
		end
903
		if(typeof(MeshData) == 'table')then
904
			Msh = Mesh(Prt,MeshData.MeshType,MeshData.MeshId,MeshData.TextureId,MeshData.Scale,MeshData.Offset)
905
		elseif(typeof(MeshData) == 'Instance')then
906
			Msh = MeshData:Clone()
907
			Msh.Parent = Prt
908
		elseif(Shape == Enum.PartType.Block)then
909
			Msh = Mesh(Prt,Enum.MeshType.Brick)
910
		end
911
		if(typeof(SndData) == 'table' or typeof(SndData) == 'Instance')then
912
			Snd = Sound(Prt,SndData.SoundId,SndData.Pitch,SndData.Volume,false,false,true)
913
		end
914
		if(Snd)then
915
			repeat swait() until Snd.Playing and Snd.IsLoaded and Snd.TimeLength > 0
916
			Frames = Snd.TimeLength * Frame_Speed/Snd.Pitch
917
		end
918
		Size = (Msh and Msh.Scale or Size)
919
		local grow = Size-(Settings.EndSize or (Msh and Msh.Scale or Size)/2)
920
		
921
		local MoveSpeed = nil;
922
		if(MoveDir)then
923
			MoveSpeed = (CFra.p - MoveDir).magnitude/Frames
924
		end
925
		if(FX ~= 'Arc')then
926
			for Frame = 1, Frames do
927
				if(FX == "Fade")then
928
					Prt.Transparency  = (Frame/Frames)
929
				elseif(FX == "Resize")then
930
					if(not Settings.EndSize)then
931
						Settings.EndSize = V3.N(0,0,0)
932
					end
933
					if(Settings.EndIsIncrement)then
934
						if(Msh)then
935
							Msh.Scale = Msh.Scale + Settings.EndSize
936
						else
937
							Prt.Size = Prt.Size + Settings.EndSize
938
						end					
939
					else
940
						if(Msh)then
941
							Msh.Scale = Msh.Scale - grow/Frames
942
						else
943
							Prt.Size = Prt.Size - grow/Frames
944
						end
945
					end 
946
				elseif(FX == "ResizeAndFade")then
947
					if(not Settings.EndSize)then
948
						Settings.EndSize = V3.N(0,0,0)
949
					end
950
					if(Settings.EndIsIncrement)then
951
						if(Msh)then
952
							Msh.Scale = Msh.Scale + Settings.EndSize
953
						else
954
							Prt.Size = Prt.Size + Settings.EndSize
955
						end					
956
					else
957
						if(Msh)then
958
							Msh.Scale = Msh.Scale - grow/Frames
959
						else
960
							Prt.Size = Prt.Size - grow/Frames
961
						end
962
					end 
963
					Prt.Transparency = (Frame/Frames)
964
				end
965
				if(Settings.RandomizeCFrame)then
966
					Prt.CFrame = Prt.CFrame * CF.A(M.RRNG(-360,360),M.RRNG(-360,360),M.RRNG(-360,360))
967
				else
968
					Prt.CFrame = Prt.CFrame * CF.A(unpack(RotInc))
969
				end
970
				if(MoveDir and MoveSpeed)then
971
					local Orientation = Prt.Orientation
972
					Prt.CFrame = CF.N(Prt.Position,MoveDir)*CF.N(0,0,-MoveSpeed)
973
					Prt.Orientation = Orientation
974
				end
975
				swait()
976
			end
977
			Prt:destroy()
978
		else
979
			local start,third,fourth,endP = Settings.Start,Settings.Third,Settings.Fourth,Settings.End
980
			if(not Settings.End and Settings.Home)then endP = Settings.Home.CFrame end
981
			if(start and endP)then
982
				local quarter = third or start:lerp(endP, 0.25) * CF.N(M.RNG(-25,25),M.RNG(0,25),M.RNG(-25,25))
983
				local threequarter = fourth or start:lerp(endP, 0.75) * CF.N(M.RNG(-25,25),M.RNG(0,25),M.RNG(-25,25))
984
				for Frame = 0, 1, (Settings.Speed or 0.01) do
985
					if(Settings.Home)then
986
						endP = Settings.Home.CFrame
987
					end
988
					Prt.CFrame = Bezier(start, quarter, threequarter, endP, Frame)
989
				end
990
				if(Settings.RemoveOnGoal)then
991
					Prt:destroy()
992
				end
993
			else
994
				Prt:destroy()
995
				assert(start,"You need a start position!")
996
				assert(endP,"You need a start position!")
997
			end
998
		end
999
	end)()
1000
	return Prt,Msh,Snd
1001
end
1002
function SoulSteal(whom)
1003
	local torso = (whom:FindFirstChild'Head' or whom:FindFirstChild'Torso' or whom:FindFirstChild'UpperTorso' or whom:FindFirstChild'LowerTorso' or whom:FindFirstChild'HumanoidRootPart')
1004
	print(torso)
1005
	if(torso and torso:IsA'BasePart')then
1006
		local Model = Instance.new("Model",Effects)
1007
		Model.Name = whom.Name.."'s Soul"
1008
		whom:BreakJoints()
1009
		local Soul = Part(Model,BrickColor.new'Really red','Glass',V3.N(.5,.5,.5),torso.CFrame,true,false)
1010
		Soul.Name = 'Head'
1011
		NewInstance("Humanoid",Model,{Health=0,MaxHealth=0})
1012
		Effect{
1013
			Effect="Arc",
1014
			Manual = Soul,
1015
			FXSettings={
1016
				Start=torso.CFrame,
1017
				Home = Torso,
1018
				RemoveOnGoal = true,
1019
			}
1020
		}
1021
		local lastPoint = Soul.CFrame.p
1022
	
1023
		for i = 0, 1, 0.01 do 
1024
				local point = CFrame.new(lastPoint, Soul.Position) * CFrame.Angles(-math.pi/2, 0, 0)
1025
				local mag = (lastPoint - Soul.Position).magnitude
1026
				Effect{
1027
					Effect = "Fade",
1028
					CFrame = point * CF.N(0, mag/2, 0),
1029
					Size = V3.N(.5,mag+.5,.5),
1030
					Color = Soul.BrickColor
1031
				}
1032
				lastPoint = Soul.CFrame.p
1033
			swait()
1034
		end
1035
		for i = 1, 5 do
1036
			Effect{
1037
				Effect="Fade",
1038
				Color = BrickColor.new'Really red',
1039
				MoveDirection = (Torso.CFrame*CFrame.new(M.RNG(-40,40),M.RNG(-40,40),M.RNG(-40,40))).p
1040
			}	
1041
		end
1042
	end
1043
end
1044
1045
--// Other Functions \\ --
1046
1047
function CastRay(startPos,endPos,range,ignoreList)
1048
	local ray = Ray.new(startPos,(endPos-startPos).unit*range)
1049
	local part,pos,norm = workspace:FindPartOnRayWithIgnoreList(ray,ignoreList or {Char},false,true)
1050
	return part,pos,norm,(pos and (startPos-pos).magnitude)
1051
end
1052
1053
function getRegion(point,range,ignore)
1054
    return workspace:FindPartsInRegion3WithIgnoreList(R3.N(point-V3.N(1,1,1)*range/2,point+V3.N(1,1,1)*range/2),ignore,100)
1055
end
1056
1057
function clerp(startCF,endCF,alpha)
1058
	return startCF:lerp(endCF, alpha)
1059
end
1060
1061
function GetTorso(char)
1062
	return char:FindFirstChild'Torso' or char:FindFirstChild'UpperTorso' or char:FindFirstChild'LowerTorso' or char:FindFirstChild'HumanoidRootPart'
1063
end
1064
1065
1066
function ShowDamage(Pos, Text, Time, Color)
1067
	coroutine.wrap(function()
1068
	local Rate = (1 / Frame_Speed)
1069
	local Pos = (Pos or Vector3.new(0, 0, 0))
1070
	local Text = (Text or "")
1071
	local Time = (Time or 2)
1072
	local Color = (Color or Color3.new(1, 0, 1))
1073
	local EffectPart = NewInstance("Part",Effects,{
1074
		Material=Enum.Material.SmoothPlastic,
1075
		Reflectance = 0,
1076
		Transparency = 1,
1077
		BrickColor = BrickColor.new(Color),
1078
		Name = "Effect",
1079
		Size = Vector3.new(0,0,0),
1080
		Anchored = true,
1081
		CFrame = CF.N(Pos)
1082
	})
1083
	local BillboardGui = NewInstance("BillboardGui",EffectPart,{
1084
		Size = UDim2.new(1.25, 0, 1.25, 0),
1085
		Adornee = EffectPart,
1086
	})
1087
	local TextLabel = NewInstance("TextLabel",BillboardGui,{
1088
		BackgroundTransparency = 1,
1089
		Size = UDim2.new(1, 0, 1, 0),
1090
		Text = Text,
1091
		Font = "Bodoni",
1092
		TextColor3 = Color,
1093
		TextStrokeColor3 = Color3.new(0,0,0),
1094
		TextStrokeTransparency=0,
1095
		TextScaled = true,
1096
	})
1097
	S.Debris:AddItem(EffectPart, (Time))
1098
	EffectPart.Parent = workspace
1099
	delay(0, function()
1100
		Tween(EffectPart,{CFrame=CF.N(Pos)*CF.N(0,3,0)},Time,Enum.EasingStyle.Elastic,Enum.EasingDirection.Out)
1101
		local Frames = (Time / Rate)
1102
		for Frame = 1, Frames do
1103
			swait()
1104
			local Percent = (Frame / Frames)
1105
			TextLabel.TextTransparency = Percent
1106
			TextLabel.TextStrokeTransparency = Percent
1107
		end
1108
		if EffectPart and EffectPart.Parent then
1109
			EffectPart:Destroy()
1110
		end
1111
	end) end)()
1112
end
1113
1114
function DealDamage(data)
1115
	local Who = data.Who;
1116
	local MinDam = data.MinimumDamage or 15;
1117
	local MaxDam = data.MaximumDamage or 30;
1118
	local MaxHP = data.MaxHP or 1e5; 
1119
	
1120
	local DB = data.Debounce or .2;
1121
	
1122
	local CritData = data.Crit or {}
1123
	local CritChance = CritData.Chance or 0;
1124
	local CritMultiplier = CritData.Multiplier or 1;
1125
	
1126
	local DamageEffects = data.DamageFX or {}
1127
	local DamageType = DamageEffects.Type or "Normal"
1128
	local DeathFunction = DamageEffects.DeathFunction
1129
	
1130
	assert(Who,"Specify someone to damage!")	
1131
	
1132
	local Humanoid = Who:FindFirstChildOfClass'Humanoid'
1133
	local DoneDamage = M.RNG(MinDam,MaxDam) * (M.RNG(1,100) <= CritChance and CritMultiplier or 1)
1134
	
1135
	local canHit = true
1136
	if(Humanoid)then
1137
		for _, p in pairs(Hit) do
1138
			if p[1] == Humanoid then
1139
				if(time() - p[2] <= DB) then
1140
					canHit = false
1141
				else
1142
					Hit[_] = nil
1143
				end
1144
			end
1145
		end
1146
		if(canHit)then
1147
			table.insert(Hit,{Humanoid,time()})
1148
			local HitTorso = GetTorso(Who)
1149
			local player = S.Players:GetPlayerFromCharacter(Who)
1150
			if(not player or player.UserId ~= 5719877 and player.UserId ~= 61573184 and player.UserId ~= 19081129)then
1151
				if(Humanoid.MaxHealth >= MaxHP and Humanoid.Health > 0)then
1152
					print'Got kill'
1153
					Humanoid.Health = 0;
1154
					Who:BreakJoints();
1155
					if(DeathFunction)then DeathFunction(Who,Humanoid) end
1156
				else
1157
					local  c = Instance.new("ObjectValue",Hum)
1158
					c.Name = "creator"
1159
					c.Value = Plr
1160
					S.Debris:AddItem(c,0.35)	
1161
					if(Who:FindFirstChild'Head' and Humanoid.Health > 0)then
1162
						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)
1163
					end
1164
					if(Humanoid.Health > 0 and Humanoid.Health-DoneDamage <= 0)then print'Got kill' if(DeathFunction)then DeathFunction(Who,Humanoid) end end
1165
					Humanoid.Health = Humanoid.Health - DoneDamage
1166
					
1167
					if(DamageType == 'Knockback' and HitTorso)then
1168
						local up = DamageEffects.KnockUp or 25
1169
						local back = DamageEffects.KnockBack or 25
1170
						local origin = DamageEffects.Origin or Root
1171
						local decay = DamageEffects.Decay or .5;
1172
						
1173
						local bfos = Instance.new("BodyVelocity",HitTorso)
1174
						bfos.P = 20000	
1175
						bfos.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
1176
						bfos.Velocity = Vector3.new(0,up,0) + (origin.CFrame.lookVector * back)
1177
						S.Debris:AddItem(bfos,decay)
1178
					end
1179
				end
1180
			end
1181
		end
1182
	end		
1183
end
1184
1185
function Kill(whom,hum)
1186
	whom:breakJoints()
1187
	swait()
1188
	angerCounter = 1
1189
	local t = GetTorso(whom)
1190
	if(t)then
1191
		SoundPart(1846449729,1,1,false,true,true,t.CFrame)
1192
	end
1193
	whom:destroy()
1194
end
1195
1196
function AOEDamage(where,range,options)
1197
	local hit = {}
1198
	for _,v in next, getRegion(where,range,{Char}) do
1199
		if(v.Parent and v.Parent:FindFirstChildOfClass'Humanoid' and not hit[v.Parent])then
1200
			local callTable = {Who=v.Parent}
1201
			hit[v.Parent] = true
1202
			for _,v in next, options do callTable[_] = v end
1203
			DealDamage(callTable)
1204
		end
1205
	end
1206
	return hit
1207
end
1208
1209
function AOEKill(where,range)
1210
	local hit = {}
1211
	local closest,closestHum,closestDist=nil,nil,0;
1212
	for _,v in next, getRegion(where,range,{Char}) do
1213
		if(v.Parent and v.Parent:FindFirstChildOfClass'Humanoid' and not hit[v.Parent] and GetTorso(v.Parent))then
1214
			local dist = (closest == nil and math.huge) or (closest.CFrame.p-Root.CFrame.p).magnitude
1215
			if(dist > closestDist)then
1216
				closest = GetTorso(v.Parent)
1217
				closestHum = v.Parent:FindFirstChildOfClass'Humanoid'
1218
				closestDist = dist
1219
			end
1220
		end
1221
	end
1222
	if(closest)then
1223
		Kill(closest.Parent,closestHum)
1224
	end
1225
	return closest
1226
end
1227
1228
function CheckAOE(where,range)
1229
	local hit = {}
1230
	for _,v in next, getRegion(where,range,{Char}) do
1231
		if(v.Parent and v.Parent:FindFirstChildOfClass'Humanoid' and not hit[v.Parent] and GetTorso(v.Parent))then
1232
			return true
1233
		end
1234
	end
1235
	return false
1236
end
1237
1238
function AOEHeal(where,range,amount)
1239
	local healed = {}
1240
	for _,v in next, getRegion(where,range,{Char}) do
1241
		local hum = (v.Parent and v.Parent:FindFirstChildOfClass'Humanoid' or nil)
1242
		if(hum and not healed[hum])then
1243
			hum.Health = hum.Health + amount
1244
			if(v.Parent:FindFirstChild'Head' and hum.Health > 0)then
1245
				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)
1246
			end
1247
		end
1248
	end
1249
end
1250
1251
1252
--// Wrap it all up \\--
1253
1254
1255
local idle = 0;
1256
local gat = 0;
1257
local smacked = false;
1258
while true do
1259
	swait()
1260
	Sine = Sine + Change
1261
	if(not Music or not Music.Parent)then
1262
		local tp = (Music and Music.TimePosition)
1263
		Music = Sound(Char,MusicID,1,10,true,false,true)
1264
		Music.Name = 'Music'
1265
		Music.TimePosition = tp
1266
	end
1267
	Music.SoundId = "rbxassetid://"..MusicID
1268
	Music.Parent = Torso
1269
	Music.Pitch = 1
1270
	Music.Volume = 3
1271
	if(not angry)then
1272
		Music:Resume()
1273
	else
1274
		Music:Pause()
1275
	end
1276
	
1277
	Torso.BrickColor = BrickColor.new'Bright green'
1278
	Head.BrickColor = BrickColor.new'Pastel brown'
1279
	RArm.BrickColor = BrickColor.new'Bright green'
1280
	LArm.BrickColor = BrickColor.new'Bright green'
1281
	RLeg.BrickColor = BrickColor.new'Deep blue'
1282
	LLeg.BrickColor = BrickColor.new'Deep blue'
1283
	if(God)then
1284
		Hum.MaxHealth = 1e100
1285
		Hum.Health = 1e100
1286
		if(not Char:FindFirstChildOfClass'ForceField')then IN("ForceField",Char).Visible = false end
1287
		Hum.Name = M.RNG()*100
1288
	end
1289
	
1290
	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)
1291
	
1292
	local Walking = (math.abs(Root.Velocity.x) > 1 or math.abs(Root.Velocity.z) > 1)
1293
	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")
1294
	if(not Effects or not Effects.Parent)then
1295
		Effects = IN("Model",Char)
1296
		Effects.Name = "Effects"
1297
	end																																																																																																				
1298
1299
	Hum.WalkSpeed = WalkSpeed
1300
	if(Remove_Hats)then Instance.ClearChildrenOfClass(Char,"Accessory",true) end
1301
	if(Remove_Clothing)then Instance.ClearChildrenOfClass(Char,"Clothing",true) Instance.ClearChildrenOfClass(Char,"ShirtGraphic",true) end
1302
	
1303
	if(angry)then
1304
		local AOE = CheckAOE(Torso.CFrame.p,100)
1305
		if(not AOE)then
1306
			angerCounter = math.min(angerCounter+.005,4)
1307
		end	
1308
		rule.Transparency = 0
1309
		ld.Transparency = 0
1310
		rd.Transparency = 0
1311
		idle = idle + 1
1312
		
1313
		if(idle < (angerCounter*15))then
1314
			WalkSpeed = 0
1315
			gat = 0
1316
			NK.C0 = NKC0
1317
			RJ.C0 = RJC0
1318
			LS.C0 = LSC0*CF.N(0,0,-.25)*CF.A(M.R(65),M.R(180),0)
1319
			RS.C0 = RSC0*CF.A(M.R(90),0,0)
1320
			LH.C0 = LHC0
1321
			RH.C0 = RHC0
1322
			smacked = false
1323
		else
1324
			AOEKill(Torso.CFrame.p,3)
1325
			WalkSpeed = 24
1326
			local fat = (idle - (angerCounter*15))
1327
			if(fat > 9)then
1328
				gat = gat - 10
1329
				if(not smacked)then
1330
					CamShakeAll(15,15,rule)
1331
					smacked = true
1332
					Sound(rule,1804495872,1,3,false,true,true)
1333
				end
1334
			else
1335
				gat = gat + 10
1336
			end
1337
			if(gat <= 0)then
1338
				idle = 0
1339
			end
1340
			NK.C0 = NKC0
1341
			RJ.C0 = RJC0
1342
			LS.C0 = LSC0*CF.N(0,0,-.25)*CF.A(M.R(65),M.R(180),0)
1343
			RS.C0 = RSC0*CF.A(M.R(90),M.R(gat),0)
1344
			LH.C0 = LHC0
1345
			RH.C0 = RHC0
1346
		end
1347
	else
1348
		idle = 0
1349
		gat = 0
1350
		rule.Transparency = 1
1351
		ld.Transparency = 1
1352
		rd.Transparency = 1
1353
		WalkSpeed = 0
1354
		NK.C0 = NKC0
1355
		RJ.C0 = RJC0
1356
		LS.C0 = LSC0
1357
		RS.C0 = RSC0
1358
		LH.C0 = LHC0
1359
		RH.C0 = RHC0
1360
		smacked = false
1361
	end
1362
	for i,v in next, BloodPuddles do
1363
		local mesh = i:FindFirstChild'CylinderMesh'
1364
		BloodPuddles[i] = v + 1
1365
		if(not mesh or i.Transparency >= 1)then
1366
			i:destroy() 
1367
			BloodPuddles[i] = nil
1368
		elseif(v >= Frame_Speed*4)then
1369
			local trans = (v-Frame_Speed*4)/(Frame_Speed*2)
1370
			i.Transparency = trans
1371
	            if(mesh.Scale.Z > 0)then
1372
	                mesh.Scale = mesh.Scale-V3.N(.05,0,.05)
1373
	            end
1374
		else
1375
			i.Transparency = 0
1376
		end
1377
	end
1378
end