View difference between Paste ID: mWh0KyA0 and QSgiDKCu
SHOW: | | - or go back to the newest paste.
1
if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
2
local Player,game,owner = owner,game
3
local RealPlayer = Player
4
do
5
    local rp = RealPlayer
6
    script.Parent = rp.Character
7
   
8
    --RemoteEvent for communicating
9
    local Event = Instance.new("RemoteEvent")
10
    Event.Name = "UserInput_Event"
11
 
12
    --Fake event to make stuff like Mouse.KeyDown work
13
    local function fakeEvent()
14
        local t = {_fakeEvent=true,Functions={},Connect=function(self,f)table.insert(self.Functions,f) end}
15
        t.connect = t.Connect
16
        return t
17
    end
18
 
19
    --Creating fake input objects with fake variables
20
    local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
21
    local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
22
    local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
23
        CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
24
    end}
25
    --Merged 2 functions into one by checking amount of arguments
26
    CAS.UnbindAction = CAS.BindAction
27
 
28
    --This function will trigger the events that have been :Connect()'ed
29
    local function te(self,ev,...)
30
        local t = m[ev]
31
        if t and t._fakeEvent then
32
            for _,f in pairs(t.Functions) do
33
                f(...)
34
            end
35
        end
36
    end
37
    m.TrigEvent = te
38
    UIS.TrigEvent = te
39
 
40
    Event.OnServerEvent:Connect(function(plr,io)
41
        if plr~=rp then return end
42
        m.Target = io.Target
43
        m.Hit = io.Hit
44
        if not io.isMouse then
45
            local b = io.UserInputState == Enum.UserInputState.Begin
46
            if io.UserInputType == Enum.UserInputType.MouseButton1 then
47
                return m:TrigEvent(b and "Button1Down" or "Button1Up")
48
            end
49
            for _,t in pairs(CAS.Actions) do
50
                for _,k in pairs(t.Keys) do
51
                    if k==io.KeyCode then
52
                        t.Function(t.Name,io.UserInputState,io)
53
                    end
54
                end
55
            end
56
            m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
57
            UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
58
        end
59
    end)
60
    Event.Parent = NLS([==[
61
    local Player = game:GetService("Players").LocalPlayer
62
    local Event = script:WaitForChild("UserInput_Event")
63
 
64
    local Mouse = Player:GetMouse()
65
    Mouse = Player:GetMouse()
66
    local UIS = game:GetService("UserInputService")
67
    local input = function(io,a)
68
        if a then return end
69
        --Since InputObject is a client-side instance, we create and pass table instead
70
        Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState,Hit=Mouse.Hit,Target=Mouse.Target})
71
    end
72
    UIS.InputBegan:Connect(input)
73
    UIS.InputEnded:Connect(input)
74
 
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
 
85
    ----Sandboxed game object that allows the usage of client-side methods and services
86
    --Real game object
87
    local _rg = game
88
 
89
    --Metatable for fake service
90
    local fsmt = {
91
        __index = function(self,k)
92
            local s = rawget(self,"_RealService")
93
            if s then return s[k] end
94
        end,
95
        __newindex = function(self,k,v)
96
            local s = rawget(self,"_RealService")
97
            if s then s[k]=v end
98
        end,
99
        __call = function(self,...)
100
            local s = rawget(self,"_RealService")
101
            if s then return s(...) end
102
        end
103
    }
104
    local function FakeService(t,RealService)
105
        t._RealService = typeof(RealService)=="string" and _rg:GetService(RealService) or RealService
106
        return setmetatable(t,fsmt)
107
    end
108
 
109
    --Fake game object
110
    local g = {
111
        GetService = function(self,s)
112
            return self[s]
113
        end,
114
        Players = FakeService({
115
            LocalPlayer = FakeService({GetMouse=function(self)return m end},Player)
116
        },"Players"),
117
        UserInputService = FakeService(UIS,"UserInputService"),
118
        ContextActionService = FakeService(CAS,"ContextActionService"),
119
    }
120
    rawset(g.Players,"localPlayer",g.Players.LocalPlayer)
121
    g.service = g.GetService
122
   
123
    g.RunService = FakeService({
124
        RenderStepped = _rg:GetService("RunService").Heartbeat,
125
        BindToRenderStep = function(self,name,_,fun)
126
 
127
        end,
128
        UnbindFromRenderStep = function(self,name)
129
            self._btrs[name]:Disconnect()
130
        end,
131
    },"RunService")
132
 
133
    setmetatable(g,{
134
        __index=function(self,s)
135
            return _rg:GetService(s) or typeof(_rg[s])=="function"
136
            and function(_,...)return _rg[s](_rg,...)end or _rg[s]
137
        end,
138
        __newindex = fsmt.__newindex,
139
        __call = fsmt.__call
140
    })
141
    --Changing owner to fake player object to support owner:GetMouse()
142
    game,owner = g,g.Players.LocalPlayer
143
end
144
145
--// Initializing \\--
146
local S = setmetatable({},{__index = function(s,i) return game:service(i) end})
147
local Plrs = S.Players
148
local Plr = Plrs.LocalPlayer
149
local Char = Plr.Character
150
local Hum = Char:FindFirstChildOfClass'Humanoid'
151
local RArm = Char["Right Arm"]
152
local LArm = Char["Left Arm"]
153
local RLeg = Char["Right Leg"]
154
local LLeg = Char["Left Leg"]	
155
local Root = Char:FindFirstChild'HumanoidRootPart'
156
local Torso = Char.Torso
157
local Head = Char.Head
158
local NeutralAnims = true
159
local Attack = false
160
local BloodPuddles = {}
161
local Effects = {}
162
local Debounces = {Debounces={}}
163
local Mouse = Plr:GetMouse()
164
local Hit = {}
165
local Sine = 0
166
local Idle = 0
167
local Change = 1
168
local FLArm,FRArm,FRArmW,FLArmW
169
local Stunned = {}
170
local VoidSB = (game.PlaceId == 843468296) -- You can change the 843468296 to 0 if you dont care about potential lag on Void SB
171
--// Debounce System \\--
172
173
174
function Debounces:New(name,cooldown)
175
	local aaaaa = {Usable=true,Cooldown=cooldown or 2,CoolingDown=false,LastUse=0}
176
	setmetatable(aaaaa,{__index = Debounces})
177
	Debounces.Debounces[name] = aaaaa
178
	return aaaaa
179
end
180
181
function Debounces:Use(overrideUsable)
182
	assert(self.Usable ~= nil and self.LastUse ~= nil and self.CoolingDown ~= nil,"Expected ':' not '.' calling member function Use")
183
	if(self.Usable or overrideUsable)then
184
		self.Usable = false
185
		self.CoolingDown = true
186
		local LastUse = time()
187
		self.LastUse = LastUse
188
		delay(self.Cooldown or 2,function()
189
			if(self.LastUse == LastUse)then
190
				self.CoolingDown = false
191
				self.Usable = true
192
			end
193
		end)
194
	end
195
end
196
197
function Debounces:Get(name)
198
	assert(typeof(name) == 'string',("bad argument #1 to 'get' (string expected, got %s)"):format(typeof(name) == nil and "no value" or typeof(name)))
199
	for i,v in next, Debounces.Debounces do
200
		if(i == name)then
201
			return v;
202
		end
203
	end
204
end
205
206
function Debounces:GetProgressPercentage()
207
	assert(self.Usable ~= nil and self.LastUse ~= nil and self.CoolingDown ~= nil,"Expected ':' not '.' calling member function Use")
208
	if(self.CoolingDown and not self.Usable)then
209
		return math.max(
210
			math.floor(
211
				(
212
					(time()-self.LastUse)/self.Cooldown or 2
213
				)*100
214
			)
215
		)
216
	else
217
		return 100
218
	end
219
end
220
221
--// Shortcut Variables \\--
222
local CF = {N=CFrame.new,A=CFrame.Angles,fEA=CFrame.fromEulerAnglesXYZ}
223
local C3 = {N=Color3.new,RGB=Color3.fromRGB,HSV=Color3.fromHSV,tHSV=Color3.toHSV}
224
local V3 = {N=Vector3.new,FNI=Vector3.FromNormalId,A=Vector3.FromAxis}
225
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}
226
local R3 = {N=Region3.new}
227
local De = S.Debris
228
local WS = workspace
229
local Lght = S.Lighting
230
local RepS = S.ReplicatedStorage
231
local IN = Instance.new
232
233
--// Extended ROBLOX tables \\--
234
local Instance = setmetatable({AllChildren = function(where,callback,recursive) local children = (recursive and where:GetDescendants() or where:GetChildren()) for _,v in next, children do callback(v) end end,  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})
235
--// Customization \\--
236
237
local Frame_Speed = 60 -- The frame speed for swait. 1 is automatically divided by this
238
local Remove_Hats = false
239
local Remove_Clothing = false
240
local PlayerSize = 1
241
local DamageColor = BrickColor.new'Really red'
242
local BloodID = "rbxassetid://284205403"
243
local BloodColor = BrickColor.new'Crimson'
244
local BloodMaterial = Enum.Material.SmoothPlastic
245
246
wait()
247
local Player = Plr
248
local CF = {N=CFrame.new,A=CFrame.Angles,fEA=CFrame.fromEulerAnglesXYZ}
249
local C3 = {N=Color3.new,RGB=Color3.fromRGB,HSV=Color3.fromHSV,tHSV=Color3.toHSV}
250
local V3 = {N=Vector3.new,FNI=Vector3.FromNormalId,A=Vector3.FromAxis}
251
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}
252
local R3 = {N=Region3.new}
253
local De = S.Debris
254
local WS = workspace
255
local Lght = S.Lighting
256
local RepS = S.ReplicatedStorage
257
local IN = Instance.new
258
CF = CFrame.new
259
angles = CFrame.Angles
260
attack = false
261
timetofly = true
262
Euler = CFrame.fromEulerAnglesXYZ
263
Rad = math.rad
264
IT = Instance.new
265
BrickC = BrickColor.new
266
Cos = math.cos
267
Acos = math.acos
268
Sin = math.sin
269
Asin = math.asin
270
Abs = math.abs
271
Mrandom = math.random
272
Floor = math.floor
273
random = math.random
274
radian = math.rad
275
Vec3 = Vector3.new
276
cFrame = CFrame.new
277
Euler = CFrame.fromEulerAnglesXYZ
278
local Lght = S.Lighting
279
local RepS = S.ReplicatedStorage
280
local IN = Instance.new
281
local Character = Player.Character
282
local plr = Plr
283
local Humanoid = Character.Humanoid
284
local char = plr.Character
285
local hum = char.Humanoid
286
local ra = char["Right Arm"]
287
local la= char["Left Arm"]
288
local rl= char["Right Leg"]
289
local ll = char["Left Leg"]
290
local hed = char.Head
291
local root = char.HumanoidRootPart
292
local rootj = root.RootJoint
293
local tors = char.Torso
294
local LeftArm = Character["Left Arm"]
295
local RightArm = Character["Right Arm"]
296
local LeftLeg = Character["Left Leg"]
297
local RightLeg = Character["Right Leg"]
298
local Head = Character.Head
299
local Torso = Character.Torso
300
local mouse = plr:GetMouse()
301
local RootCF = CFrame.fromEulerAnglesXYZ(-1.57, 0, 3.14)
302
local RHCF = CFrame.fromEulerAnglesXYZ(0, 1.6, 0)
303
local LHCF = CFrame.fromEulerAnglesXYZ(0, -1.6, 0)
304
local cam = game.Workspace.CurrentCamera
305
-------------------------------------------------------
306
necko = CF(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
307
RSH, LSH = nil, nil 
308
RW = Instance.new("Weld") 
309
LW = Instance.new("Weld")
310
RH = tors["Right Hip"]
311
LH = tors["Left Hip"]
312
RSH = tors["Right Shoulder"] 
313
LSH = tors["Left Shoulder"] 
314
RSH.Parent = nil 
315
LSH.Parent = nil 
316
RW.Name = "RW"
317
RW.Part0 = tors 
318
RW.C0 = CF(1.5, 0.5, 0)
319
RW.C1 = CF(0, 0.5, 0) 
320
RW.Part1 = ra
321
RW.Parent = tors 
322
LW.Name = "LW"
323
LW.Part0 = tors 
324
LW.C0 = CF(-1.5, 0.5, 0)
325
LW.C1 = CF(0, 0.5, 0) 
326
LW.Part1 = la
327
LW.Parent = tors
328
Effects = {}
329
330
--// Weapon and GUI creation, and Character Customization \\--
331
332
if(Remove_Hats)then Instance.ClearChildrenOfClass(Char,"Accessory",true) end
333
if(Remove_Clothing)then Instance.ClearChildrenOfClass(Char,"Clothing",true) Instance.ClearChildrenOfClass(Char,"ShirtGraphic",true) end
334
local Effects = IN("Folder",Char)
335
Effects.Name = "Effects"
336
337
New = function(Object, Parent, Name, Data)
338
	local Object = Instance.new(Object)
339
	for Index, Value in pairs(Data or {}) do
340
		Object[Index] = Value
341
	end
342
	Object.Parent = Parent
343
	Object.Name = Name
344
	return Object
345
end
346
	
347
pcall(function() Char.ReaperShadowHead.Eye1.BrickColor = BrickColor.new'Really red' Char.ReaperShadowHead.Eye1.Material = 'Glass' end)
348
pcall(function() Char.ReaperShadowHead.Eye2.BrickColor = BrickColor.new'Really red' Char.ReaperShadowHead.Eye2.Material = 'Glass' end)
349
pcall(function() Char.LeftWing.BrickColor = BrickColor.new'Really red' Char.LeftWing.Transparency = 0.5 end)
350
351
352
if(PlayerSize ~= 1)then
353
	for _,v in next, Char:GetDescendats() do
354
		if(v:IsA'BasePart')then
355
			v.Size = v.Size * PlayerSize
356
		end
357
	end
358
end
359
360
--// Instance Creation Functions \\--
361
362
function Sound(parent,id,pitch,volume,looped,effect,autoPlay)
363
	local Sound = IN("Sound")
364
	Sound.SoundId = "rbxassetid://".. tostring(id or 0)
365
	Sound.Pitch = pitch or 1
366
	Sound.Volume = volume or 1
367
	Sound.Looped = looped or false
368
	if(autoPlay)then
369
		coroutine.wrap(function()
370
			repeat wait() until Sound.IsLoaded
371
			Sound.Playing = autoPlay or false
372
		end)()
373
	end
374
	if(not looped and effect)then
375
		Sound.Ended:connect(function()
376
			Sound.Volume = 0
377
			Sound:destroy()
378
		end)
379
	elseif(effect)then
380
		warn("Sound can't be looped and a sound effect!")
381
	end
382
	Sound.Parent =parent or Torso
383
	return Sound
384
end
385
function Part(parent,color,material,size,cframe,anchored,cancollide)
386
	local part = IN("Part")
387
	part[typeof(color) == 'BrickColor' and 'BrickColor' or 'Color'] = color or C3.N(0,0,0)
388
	part.Material = material or Enum.Material.SmoothPlastic
389
	part.TopSurface,part.BottomSurface=10,10
390
	part.Size = size or V3.N(1,1,1)
391
	part.CFrame = cframe or CF.N(0,0,0)
392
	part.CanCollide = cancollide or false
393
	part.Anchored = anchored or false
394
	part.Parent = parent or Char
395
	return part
396
end
397
398
function Mesh(parent,meshtype,meshid,textid,scale,offset)
399
	local part = IN("SpecialMesh")
400
	part.MeshId = meshid or ""
401
	part.TextureId = textid or ""
402
	part.Scale = scale or V3.N(1,1,1)
403
	part.Offset = offset or V3.N(0,0,0)
404
	part.MeshType = meshtype or Enum.MeshType.Sphere
405
	part.Parent = parent
406
	return part
407
end
408
409
NewInstance = function(instance,parent,properties)
410
	local inst = Instance.new(instance,parent)
411
	if(properties)then
412
		for i,v in next, properties do
413
			pcall(function() inst[i] = v end)
414
		end
415
	end
416
	return inst;
417
end
418
419
--// Stop animations \\--
420
for _,v in next, Hum:GetPlayingAnimationTracks() do
421
	v:Stop();
422
end
423
424
pcall(game.Destroy,Char:FindFirstChild'Animate')
425
pcall(game.Destroy,Hum:FindFirstChild'Animator')
426
427
--// Artificial HB \\--
428
429
local ArtificialHB = IN("BindableEvent", script)
430
ArtificialHB.Name = "Heartbeat"
431
432
script:WaitForChild("Heartbeat")
433
434
local tf = 0
435
local allowframeloss = false
436
local tossremainder = false
437
local lastframe = tick()
438
local frame = 1/Frame_Speed
439
ArtificialHB:Fire()
440
441
game:GetService("RunService").Heartbeat:connect(function(s, p)
442
	tf = tf + s
443
	if tf >= frame then
444
		if allowframeloss then
445
			script.Heartbeat:Fire()
446
			lastframe = tick()
447
		else
448
			for i = 1, math.floor(tf / frame) do
449
				ArtificialHB:Fire()
450
			end
451
			lastframe = tick()
452
		end
453
		if tossremainder then
454
			tf = 0
455
		else
456
			tf = tf - frame * math.floor(tf / frame)
457
		end
458
	end
459
end)
460
461
function swait(num)
462
	if num == 0 or num == nil then
463
		ArtificialHB.Event:wait()
464
	else
465
		for i = 0, num do
466
			ArtificialHB.Event:wait()
467
		end
468
	end
469
end
470
471
472
--// Effect Function(s) \\--
473
474
function FakeWeld(p0,p1)
475
	local attachment0 = Instance.new('Attachment',p0)
476
	local attachment1 = Instance.new('Attachment',p1)
477
	return NewInstance("HingeConstraint",p0,{Attachment0=attachment0,Attachment1=attachment1,LimitsEnabled=true,UpperAngle=0,LowerAngle=0})
478
end
479
480
function Fragment(v)
481
	v:ClearAllChildren()
482
	local Fragments = NewInstance("Folder",v.Parent,{Name='Fragmentation'})
483
	v.Archivable = true
484
	-- X
485
	v.Size = Vector3.new(v.Size.x/2,v.Size.y,v.Size.z)
486
	v.Name = v.Name.."Fragment"
487
	
488
	local a = v:Clone()
489
	a.Parent = Fragments
490
	a.CFrame = CF.N(-.5,1,1) * a.CFrame
491
	v.CFrame = CF.N(.5,1,1) * v.CFrame
492
	-- Y
493
	v.Size = Vector3.new(v.Size.x,v.Size.y/2,v.Size.z)
494
	
495
	local a = v:Clone()
496
	a.Parent = Fragments
497
	a.CFrame = CF.N(1,-.5,1) * a.CFrame
498
	v.CFrame = CF.N(1,.5,1) * v.CFrame
499
	-- Z
500
	v.Size = Vector3.new(v.Size.x,v.Size.y,v.Size.z/2)
501
	
502
	local a = v:Clone()
503
	a.Parent = Fragments
504
	a.CFrame = CF.N(1,1,-.5) * a.CFrame
505
	v.CFrame = CF.N(1,1,.5) * v.CFrame
506
	
507
	v.Parent = Fragments
508
	return Fragments
509
end
510
511
local blood = NewInstance("ParticleEmitter",nil,{
512
	Color = ColorSequence.new(BloodColor.Color),
513
	LightEmission=.1,
514
	LightInfluence=1,
515
	ZOffset=.9,
516
	Size=NumberSequence.new{NumberSequenceKeypoint.new(0,.2,0),NumberSequenceKeypoint.new(1,3,0)},
517
	Texture="rbxassetid://284205403",
518
	Transparency=NumberSequence.new{NumberSequenceKeypoint.new(0,0,0),NumberSequenceKeypoint.new(1,1,0)},
519
	Acceleration = V3.N(0,-15,0),
520
	Lifetime = NumberRange.new(1,2),
521
	Rate=50,
522
	Speed = NumberRange.new(5,15),
523
	SpreadAngle = Vector2.new(15,15),
524
	Enabled = false,
525
	EmissionDirection = 'Back',
526
})
527
528
local blood2 = NewInstance("ParticleEmitter",nil,{
529
	Color = ColorSequence.new(BloodColor.Color),
530
	LightEmission=.1,
531
	LightInfluence=1,
532
	ZOffset=.9,
533
	Size=NumberSequence.new{NumberSequenceKeypoint.new(0,.2,0),NumberSequenceKeypoint.new(1,3,0)},
534
	Texture=BloodID,
535
	Transparency=NumberSequence.new{NumberSequenceKeypoint.new(0,0,0),NumberSequenceKeypoint.new(1,1,0)},
536
	Acceleration = V3.N(0,-125,0),
537
	Lifetime = NumberRange.new(1,2),
538
	Rate=50,
539
	Speed = NumberRange.new(5,15),
540
	SpreadAngle = Vector2.new(15,15),
541
	Enabled = false,
542
	EmissionDirection = 'Back',
543
})
544
545
local blood3 = NewInstance("ParticleEmitter",nil,{
546
	Color = ColorSequence.new(BloodColor.Color),
547
	Size=NumberSequence.new{NumberSequenceKeypoint.new(0,.2),NumberSequenceKeypoint.new(1,.2)},
548
	Texture=BloodID,
549
	Lifetime = NumberRange.new(.4),
550
	Rate=50,
551
	LockedToPart=true,
552
	Speed = NumberRange.new(0,2),
553
	Enabled = false,
554
}) 
555
556
function Blood(size,cframe,amount)
557
	local part = Instance.new("Part",Effects)
558
	part.Transparency = 1
559
	part.Size = size
560
	part.Anchored = true
561
	part.CanCollide = false
562
	part.CFrame = cframe
563
	S.Debris:AddItem(part,6)
564
	local prtcl = blood:Clone()
565
	prtcl.Parent = part
566
	prtcl:Emit(amount)
567
	return part, prtcl
568
end
569
570
function Blood2(size,cframe)
571
	local part = Instance.new("Part",Effects)
572
	part.Transparency = 1
573
	part.Size = size
574
	part.Anchored = false
575
	part.CanCollide = false
576
	part.CFrame = cframe
577
	local prtcl = blood:Clone()
578
	prtcl.Enabled = true
579
	prtcl.Parent = part
580
	return part, prtcl
581
end
582
583
function Blood3(size,cframe,amount)
584
	local part = Instance.new("Part",Effects)
585
	part.Transparency = 1
586
	part.Size = size
587
	part.Anchored = true
588
	part.CanCollide = false
589
	part.CFrame = cframe
590
	S.Debris:AddItem(part,6)
591
	local prtcl = blood2:Clone()
592
	prtcl.Parent = part
593
	prtcl:Emit(amount)
594
	return part, prtcl
595
end
596
597
function Blood4(size,cframe)
598
	local part = Instance.new("Part",Effects)
599
	part.Transparency = 1
600
	part.Size = size
601
	part.Anchored = false
602
	part.CanCollide = false
603
	part.CFrame = cframe
604
	local prtcl = blood2:Clone()
605
	prtcl.Enabled = true
606
	prtcl.Parent = part
607
	return part, prtcl
608
end
609
610
611
function BloodDrop(pos,dir,maxsize)
612
	if(game.PlaceId ~= 843468296)then
613
		local owo = NewInstance("Part",Effects,{Transparency=0,Material=BloodMaterial,BrickColor=BloodColor,Shape=Enum.PartType.Ball,Size=V3.N(.2,.2,.2), CanCollide = false})
614
		owo.CFrame=CF.N(pos,dir)
615
		local bv = Instance.new("BodyVelocity",owo) 
616
		bv.maxForce = Vector3.new(1e9, 1e9, 1e9)
617
		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
618
		bv.Name = "MOVE"
619
		--[[local prt = blood3:Clone()
620
		prt.Parent = owo
621
		prt.Enabled = true]]
622
		delay(.01, function() bv:destroy() end)
623
		local touch;
624
		touch = owo.Touched:connect(function(hit)
625
			if(hit.Anchored==true and hit.CanCollide and not hit.Parent:FindFirstChildOfClass'Humanoid' and not hit.Parent.Parent:FindFirstChildOfClass'Humanoid')then
626
				touch:disconnect()
627
				BloodPuddle(owo.Position+V3.N(0,1,0),100,maxsize,owo)
628
				owo:destroy()
629
			end
630
		end)
631
	end
632
end
633
634
function BloodPuddle(position,range,maxSize,where)
635
	local hit, pos, norm = workspace:FindPartOnRayWithIgnoreList(Ray.new(
636
		position,CF.N(position,position+V3.N(0,-1,0)).lookVector * range			
637
	),{where,Char},false,true)
638
	if(hit and not hit.Parent:FindFirstChildOfClass'Humanoid' and not hit.Parent.Parent:FindFirstChildOfClass'Humanoid')then
639
		if(hit.Name == 'BloodPuddle')then
640
			local dist = (position - hit.Position).magnitude
641
			if (hit.Size.Z <= 5 and hit.Size.Z < maxSize) or (hit.Size.Z > 5 and hit.Size.Z < maxSize and dist < hit.Size.Z/3) then
642
				--hit.CylinderMesh.Scale = hit.CylinderMesh.Scale + V3.N(.1,0,.1)
643
				hit.Size = hit.Size + V3.N(.1,0,.1)
644
			end
645
			if(hit.Size.Z < 2)then
646
				pcall(function() hit.Sound:Play() end)
647
			end
648
		else
649
			local Puddle = NewInstance('Part',workspace,{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'})
650
			local Cyl = NewInstance('CylinderMesh',Puddle,{Name='CylinderMesh'})
651
			Sound(Puddle,685857471,1,2,false,false,true)
652
			coroutine.wrap(function()
653
				swait(75)
654
				repeat
655
					swait()
656
					Puddle.Size = Puddle.Size - V3.N(.02,0,.02)
657
				until Puddle.Size.Z < 0.51
658
				Puddle:destroy()
659
			end)()
660
		end
661
	end
662
end
663
664
function recurse(root,callback,i)
665
	i= i or 0
666
	for _,v in pairs(root:GetChildren()) do
667
		i = i + 1
668
		callback(i,v)
669
		
670
		if #v:GetChildren() > 0 then
671
			i = recurse(v,callback,i)
672
		end
673
	end
674
	
675
	return i
676
end
677
678
function ragdollJoint(character, part0, part1, attachmentName, className, properties) -- thanks mustardfat im too lazy
679
	if character:FindFirstChild("RagdollConstraint"..part1.Name) == nil then
680
	for i,v in pairs(character:GetChildren()) do
681
		if v:IsA("MeshPart") and (v.MeshId == 'http://www.roblox.com/asset/?id=553602991' or v.MeshId == 'http://www.roblox.com/asset/?id=553602977' or v.MeshId == 'http://www.roblox.com/asset/?id=553602987') then
682
			v.Size = Vector3.new(1,1,1)
683
		end
684
	end
685
	if part1:FindFirstChildOfClass('Motor6D') then
686
		part1:FindFirstChildOfClass('Motor6D'):Remove()
687
	end
688
	if attachmentName ~= "NeckAttachment" then
689
		attachmentName = attachmentName.."RigAttachment"
690
	end
691
	local constraint = Instance.new(className.."Constraint")
692
	constraint.Attachment0 = part0:FindFirstChild(attachmentName)
693
	constraint.Attachment1 = part1:FindFirstChild(attachmentName)
694
	constraint.Name = "RagdollConstraint"..part1.Name
695
	if character:FindFirstChildOfClass('Humanoid').Health > 0 then
696
	local collidepart = Instance.new('Part',part1)
697
	collidepart.Size = part1.Size/2
698
	if string.find(string.lower(part1.Name),"upper") then
699
		if string.find(string.lower(part1.Name),"leg") then
700
			collidepart.Size = part1.Size/3
701
		else
702
			collidepart.Size = part1.Size/2.5
703
		end
704
	end
705
	collidepart.CanCollide = true
706
	collidepart.Name = "RagdollJoint"
707
	collidepart.Anchored = false
708
	collidepart.Transparency = 1
709
	collidepart.CFrame = part1.CFrame
710
	collidepart:BreakJoints()
711
	local attachment0 = Instance.new('Attachment',part1)
712
	local attachment1 = Instance.new('Attachment',collidepart)
713
	if attachment0 and attachment1 then
714
		local constraint = Instance.new("HingeConstraint")
715
		constraint.Attachment0 = attachment0
716
		constraint.Attachment1 = attachment1
717
		constraint.LimitsEnabled = true
718
		constraint.UpperAngle = 0
719
		constraint.LowerAngle = 0
720
		constraint.Parent = character
721
	end
722
	if string.find(string.lower(part1.Name),"upper") then
723
		if string.find(string.lower(part1.Name),"leg") then
724
			attachment0.Position = Vector3.new(0,0.01,0)
725
		else
726
			attachment0.Position = Vector3.new(0,0.25,0)
727
		end
728
	else
729
		attachment0.Position = Vector3.new(0,-0.1,0)
730
	end
731
	end
732
	for _,propertyData in next,properties or {} do
733
		constraint[propertyData[1]] = propertyData[2]
734
	end
735
	constraint.Parent = character
736
	return constraint
737
	end
738
end
739
740
741
function getAttachment0(character,attachmentName)
742
	for _,child in next,character:children() do
743
		local attachment = child:FindFirstChild(attachmentName)
744
		if attachment then
745
			return attachment
746
		end
747
	end
748
end
749
750
751
function Ragdoll(who,half,snapped)
752
	pcall(function()
753
		who:breakJoints()
754
		local who = who
755
		local hhh = who:FindFirstChildOfClass'Humanoid'
756
		local t = GetTorso(who)
757
		pcall(function()
758
			who.HumanoidRootPart:destroy()
759
		end)
760
		hhh.Health = 0
761
		Stunned[who] = true
762
		if(hhh.RigType == Enum.HumanoidRigType.R6)then
763
			local RA,LA,RL,LL,HD = who:FindFirstChild'Right Arm',who:FindFirstChild'Left Arm',who:FindFirstChild'Right Leg',who:FindFirstChild'Left Leg',who:FindFirstChild'Head'			
764
			pcall(function()
765
				if(hhh.Health > 0)then  local CollideRA = NewInstance('Part',who,{Size=RA.Size/1.5,Anchored=false,Transparency=1,Name='Collision'})
766
				FakeWeld(RA,CollideRA) end
767
				local RAJ = NewInstance("Attachment",t,{Position=V3.N(1.5,.5,0),Orientation=V3.N()})
768
				local RAJ2 = NewInstance("Attachment",RA,{Position=V3.N(0,.5,0),Orientation=V3.N()})
769
				local RAC = NewInstance('BallSocketConstraint',t,{Radius=.15,LimitsEnabled=true,Enabled=true,Restitution=0,UpperAngle=90,Attachment0=RAJ,Attachment1=RAJ2})
770
			end)
771
			pcall(function()
772
				local LAJ = NewInstance("Attachment",t,{Position=V3.N(-1.5,.5,0),Orientation=V3.N()})
773
				local LAJ2 = NewInstance("Attachment",LA,{Position=V3.N(0,.5,0),Orientation=V3.N()})
774
775
				local LAC = NewInstance('BallSocketConstraint',t,{Radius=.15,LimitsEnabled=true,Enabled=true,Restitution=0,UpperAngle=90,Attachment0=LAJ,Attachment1=LAJ2})
776
777
				if(hhh.Health > 0)then local CollideLA = NewInstance('Part',who,{Size=LA.Size/1.5,Anchored=false,Transparency=1,Name='Collision'})
778
				FakeWeld(LA,CollideLA) end
779
			end)
780
			pcall(function()
781
				if(HD)then 
782
					local NJ = NewInstance('Attachment',t,{Position=V3.N(0,1,0),Orientation=V3.N()})
783
					local NJ2 = NewInstance('Attachment',HD,{Position=V3.N(0,-.5,0),Orientation=V3.N()})
784
					local NJ3 = NewInstance('Attachment',HD,{Position=V3.N(0,.5,0),Orientation=V3.N()})
785
					local HC = NewInstance('HingeConstraint',t,{LimitsEnabled=true,UpperAngle=50,LowerAngle=-50,Attachment0=NJ,Attachment1=NJ2})
786
	
787
					if(snapped)then
788
						NJ.Orientation = V3.N(0,90,0)
789
					end
790
					if(hhh.Health > 0)then 
791
						local CollideHD = NewInstance('Part',who,{Size=HD.Size/1.5,Anchored=false,Transparency=1,Name='Collision'})
792
						FakeWeld(HD,CollideHD)
793
					end
794
				end
795
			end)
796
			if(not half)then
797
				local RLJ = NewInstance("Attachment",t,{Position=V3.N(.5,-1,0),Orientation=V3.N()})
798
				local RLJ2 = NewInstance("Attachment",RL,{Position=V3.N(0,1,0),Orientation=V3.N()})
799
				local LLJ = NewInstance("Attachment",t,{Position=V3.N(-.5,-1,0),Orientation=V3.N()})
800
				local LLJ2 = NewInstance("Attachment",LL,{Position=V3.N(0,1,0),Orientation=V3.N()})
801
				local RLC = NewInstance('BallSocketConstraint',t,{Radius=.15,LimitsEnabled=true,Enabled=true,Restitution=0,UpperAngle=90,Attachment0=RLJ,Attachment1=RLJ2})
802
				local LLC = NewInstance('BallSocketConstraint',t,{Radius=.15,LimitsEnabled=true,Enabled=true,Restitution=0,UpperAngle=90,Attachment0=LLJ,Attachment1=LLJ2})
803
				if(hhh.Health > 0)then local CollideRL = NewInstance('Part',who,{Size=RL.Size/1.5,Anchored=false,Transparency=1,Name='Collision'})
804
				local CollideLL = NewInstance('Part',who,{Size=LL.Size/1.5,Anchored=false,Transparency=1,Name='Collision'})
805
806
				FakeWeld(RL,CollideRL)
807
				FakeWeld(LL,CollideLL) end
808
			end
809
			for _,v in next, who:children() do
810
				if(v:IsA'BasePart')then
811
					v.CanCollide = true
812
				end
813
			end
814
		else
815
			local character = who
816
			
817
			if(half)then
818
				pcall(function()
819
					character.UpperTorso.WaistRigAttachment:Destroy()
820
				end)
821
			end
822
823
			local handProperties = {
824
				{"LimitsEnabled", true};
825
				{"UpperAngle",0};
826
				{"LowerAngle",0};
827
			}
828
			local footProperties = {
829
				{"LimitsEnabled", true};
830
				{"UpperAngle", 15};
831
				{"LowerAngle", -45};
832
			}
833
			local shinProperties = {
834
				{"LimitsEnabled", true};
835
				{"UpperAngle", 0};
836
				{"LowerAngle", -75};
837
			}
838
			if character:FindFirstChild('RightLowerArm') and character:FindFirstChild('RightHand') then
839
				ragdollJoint(character,character.RightLowerArm, character.RightHand, "RightWrist", "Hinge", handProperties)
840
			end
841
			if character:FindFirstChild('UpperTorso') and character:FindFirstChild('RightUpperArm') then
842
				ragdollJoint(character, character.UpperTorso, character["RightUpperArm"], "RightShoulder", "BallSocket")
843
			end
844
			if character:FindFirstChild('RightUpperArm') and character:FindFirstChild('RightLowerArm') then
845
				ragdollJoint(character, character.RightUpperArm, character.RightLowerArm, "RightElbow", "BallSocket")
846
			end
847
			if character:FindFirstChild('LeftLowerArm') and character:FindFirstChild('LeftHand') then
848
				ragdollJoint(character,character.LeftLowerArm, character.LeftHand, "LeftWrist", "Hinge", handProperties)
849
			end
850
			if character:FindFirstChild('UpperTorso') and character:FindFirstChild('LeftUpperArm') then
851
				ragdollJoint(character, character.UpperTorso, character["LeftUpperArm"], "LeftShoulder", "BallSocket")
852
			end
853
			if character:FindFirstChild('LeftUpperArm') and character:FindFirstChild('LeftLowerArm') then
854
				ragdollJoint(character, character.LeftUpperArm, character.LeftLowerArm, "LeftElbow", "BallSocket")
855
			end
856
			if character:FindFirstChild('RightUpperLeg') and character:FindFirstChild('RightLowerLeg') then
857
				ragdollJoint(character,character.RightUpperLeg, character.RightLowerLeg, "RightKnee", "Hinge", shinProperties)
858
			end
859
			if character:FindFirstChild('RightLowerLeg') and character:FindFirstChild('RightFoot') then
860
				ragdollJoint(character,character.RightLowerLeg, character.RightFoot, "RightAnkle", "Hinge", footProperties)
861
			end
862
			if character:FindFirstChild('LowerTorso') and character:FindFirstChild('RightUpperLeg') then
863
				ragdollJoint(character,character.LowerTorso, character.RightUpperLeg, "RightHip", "BallSocket")
864
			end
865
			if character:FindFirstChild('LeftUpperLeg') and character:FindFirstChild('LeftLowerLeg') then
866
				ragdollJoint(character,character.LeftUpperLeg, character.LeftLowerLeg, "LeftKnee", "Hinge", shinProperties)
867
			end
868
			if character:FindFirstChild('LeftLowerLeg') and character:FindFirstChild('LeftFoot') then
869
				ragdollJoint(character,character.LeftLowerLeg, character.LeftFoot, "LeftAnkle", "Hinge", footProperties)
870
			end
871
			if character:FindFirstChild('LowerTorso') and character:FindFirstChild('LeftUpperLeg') then
872
				ragdollJoint(character,character.LowerTorso, character.LeftUpperLeg, "LeftHip", "BallSocket")
873
			end
874
			if character:FindFirstChild('UpperTorso') and character:FindFirstChild('LowerTorso') then
875
				ragdollJoint(character,character.LowerTorso, character.UpperTorso, "Waist", "BallSocket", {
876
					{"LimitsEnabled",true};
877
					{"UpperAngle",5};
878
					{"Radius",5};
879
				})
880
			end
881
			if character:FindFirstChild('UpperTorso') and character:FindFirstChild('Head') then
882
				ragdollJoint(character,character.UpperTorso, character.Head, "Neck", "Hinge", {
883
					{"LimitsEnabled",true};
884
					{"UpperAngle",50};
885
					{"LowerAngle",-50};
886
				})
887
			end
888
			local NeckA = ragdollJoint(character,character.UpperTorso, character.Head, "Neck", "Hinge", {
889
				{"LimitsEnabled",true};
890
				{"UpperAngle",50};
891
				{"LowerAngle",-50};
892
			})
893
894
			recurse(character, function(_,v)
895
				if v:IsA("Attachment") then
896
					v.Axis = Vector3.new(0, 1, 0)
897
					v.SecondaryAxis = Vector3.new(0, 0, 1)
898
					v.Rotation = Vector3.new(0, 0, 0)
899
					if(v.Parent == character.Head and snapped)then
900
						v.Orientation = V3.N(0,-90,0)
901
					end
902
				end
903
			end)
904
		end
905
	end)
906
end
907
908
909
function Bezier(startpos, pos2, pos3, endpos, t)
910
	local A = startpos:lerp(pos2, t)
911
	local B  = pos2:lerp(pos3, t)
912
	local C = pos3:lerp(endpos, t)
913
	local lerp1 = A:lerp(B, t)
914
	local lerp2 = B:lerp(C, t)
915
	local cubic = lerp1:lerp(lerp2, t)
916
	return cubic
917
end
918
919
function Effect(data)
920
	local FX = data.Effect or 'Resize-AndFade'
921
	local Parent = data.Parent or Effects
922
	local Color = data.Color or C3.N(0,0,0)
923
	local Size = data.Size or V3.N(1,1,1)
924
	local MoveDir = data.MoveDirection or nil
925
	local MeshData = data.Mesh or nil
926
	local SndData = data.Sound or nil
927
	local Frames = data.Frames or 45
928
	local Manual = data.Manual or nil
929
	local Material = data.Material or nil
930
	local CFra = data.CFrame or Torso.CFrame
931
	local Settings = data.FXSettings or {}
932
	local Snd,Prt,Msh;
933
	if(Manual and typeof(Manual) == 'Instance' and Manual:IsA'BasePart')then
934
		Prt = Manual
935
	else
936
		Prt = Part(Parent,Color,Material,Size,CFra,true,false)
937
	end
938
	if(typeof(MeshData) == 'table')then
939
		Msh = Mesh(Prt,MeshData.MeshType,MeshData.MeshId,MeshData.TextureId,MeshData.Scale,MeshData.Offset)
940
	elseif(typeof(MeshData) == 'Instance')then
941
		Msh = MeshData:Clone()
942
		Msh.Parent = Prt
943
	end
944
	if(typeof(SndData) == 'table' or typeof(SndData) == 'Instance')then
945
		Snd = Sound(Prt,SndData.SoundId,SndData.Pitch,SndData.Volume,false,false,true)
946
	end
947
	if(Snd)then
948
		repeat wait() until Snd.Playing and Snd.IsLoaded and Snd.TimeLength > 0
949
		Frames = Snd.TimeLength * Frame_Speed/Snd.Pitch
950
	end
951
	local MoveSpeed = nil;
952
	if(MoveDir)then
953
		MoveSpeed = (CFra.p - MoveDir).magnitude/Frames
954
	end
955
	local Inc = M.RNG()-M.RNG()
956
	local Thingie = 0
957
	local Thingie2 = M.RNG(50,100)/100
958
959
	coroutine.wrap(function()
960
		if(FX ~= 'Arc')then
961
			for i = 1, Frames do
962
				if(FX == 'Resize-AndFade')then
963
					if(not Settings.EndSize)then
964
						Settings.EndSize = V3.N(0,0,0)
965
					end
966
					local grow = (typeof(Settings.EndSize) == 'Vector3' and Settings.EndSize-Size or typeof(Settings.EndSize) == 'number' and V3.N(Settings.EndSize))
967
					if(Settings.EndIsIncrement)then
968
						Prt.Size = Prt.Size - Settings.EndSize					
969
					else
970
						Prt.Size = Prt.Size - grow/Frames
971
					end 
972
					Prt.Transparency = (i/Frames)
973
				elseif(FX == 'Resize+AndFade')then
974
					if(not Settings.EndSize)then
975
						Settings.EndSize = Size*2
976
					end
977
					local grow = (typeof(Settings.EndSize) == 'Vector3' and Settings.EndSize-Size or typeof(Settings.EndSize) == 'number' and V3.N(Settings.EndSize))
978
					if(Settings.EndIsIncrement)then
979
						Prt.Size = Prt.Size + Settings.EndSize					
980
					else
981
						Prt.Size = Prt.Size + grow/Frames
982
					end 
983
					Prt.Transparency = (i/Frames)
984
				elseif(FX == 'Fade')then
985
					Prt.Transparency = (i/Frames)
986
				end
987
				if(Settings.RandomizeCFrame)then
988
					Prt.CFrame = Prt.CFrame * CF.A(M.RRNG(-360,360),M.RRNG(-360,360),M.RRNG(-360,360))
989
				end
990
				if(MoveDir and MoveSpeed)then
991
					local Orientation = Prt.Orientation
992
					Prt.CFrame = CF.N(Prt.Position,MoveDir)*CF.N(0,0,-MoveSpeed)
993
					Prt.Orientation = Orientation
994
				end
995
				if(swait and typeof(swait) == 'function')then
996
					swait()
997
				else
998
					wait()
999
				end
1000
			end
1001
			Prt:destroy() 
1002
		else
1003
			local start,third,fourth,endP = Settings.Start,Settings.Third,Settings.Fourth,Settings.End
1004
			if(not Settings.End and Settings.Home)then endP = Settings.Home.CFrame end
1005
			local quarter = third or start:lerp(endP, 0.25) * CF.N(M.RNG(-25,25),M.RNG(0,25),M.RNG(-25,25))
1006
			local threequarter = fourth or start:lerp(endP, 0.75) * CF.N(M.RNG(-25,25),M.RNG(0,25),M.RNG(-25,25))
1007
			assert(start ~= nil,"You need to specify a start point!")
1008
			assert(endP ~= nil,"You need to specify an end point!")
1009
			for i = 0, 1, Settings.Speed or 0.01 do
1010
				if(Settings.Home)then
1011
					endP = Settings.Home.CFrame
1012
				end
1013
				Prt.CFrame = Bezier(start, quarter, threequarter, endP, i)
1014
				if(swait and typeof(swait) == 'function')then
1015
					swait()
1016
				else
1017
					wait()
1018
				end
1019
			end
1020
			if(Settings.RemoveOnGoal)then
1021
				Prt:destroy()
1022
			end
1023
		end
1024
	end)()
1025
	return Prt,Msh,Snd
1026
end	
1027
1028
1029
function SoulSteal(character)
1030
	local torso = (character:FindFirstChild'Head' or character:FindFirstChild'Torso' or character:FindFirstChild'UpperTorso' or character:FindFirstChild'LowerTorso' or character:FindFirstChild'HumanoidRootPart')
1031
	print(torso)
1032
	if(torso and torso:IsA'BasePart')then
1033
		local Model = Instance.new("Model",Effects)
1034
		Model.Name = character.Name.."'s Soul"
1035
		character:BreakJoints()
1036
		local Soul = Part(Model,BrickColor.new'Really red','Glass',V3.N(.5,.5,.5),torso.CFrame,true,false)
1037
		Soul.Name = 'Head'
1038
		NewInstance("Humanoid",Model,{Health=0,MaxHealth=0})
1039
		Effect{
1040
			Effect="Arc",
1041
			Manual = Soul,
1042
			FXSettings={
1043
				Start=torso.CFrame,
1044
				Home = Torso,
1045
				RemoveOnGoal = true,
1046
			}
1047
		}
1048
		local lastPoint = Soul.CFrame.p
1049
	
1050
		for i = 0, 1, 0.01 do 
1051
				local point = CFrame.new(lastPoint, Soul.Position) * CFrame.Angles(-math.pi/2, 0, 0)
1052
				local mag = (lastPoint - Soul.Position).magnitude
1053
				Effect{
1054
					Effect = "Fade",
1055
					CFrame = point * CF.N(0, mag/2, 0),
1056
					Size = V3.N(.5,mag+.5,.5),
1057
					Color = Soul.BrickColor
1058
				}
1059
				lastPoint = Soul.CFrame.p
1060
			swait()
1061
		end
1062
		for i = 1, 5 do
1063
			Effect{
1064
				Effect="Fade",
1065
				Color = BrickColor.new'Really red',
1066
				MoveDirection = (Torso.CFrame*CFrame.new(M.RNG(-40,40),M.RNG(-40,40),M.RNG(-40,40))).p
1067
			}	
1068
		end
1069
	end
1070
end
1071
1072
--// Other Functions \\ --
1073
1074
function getRegion(point,range,ignore)
1075
    return workspace:FindPartsInRegion3WithIgnoreList(R3.N(point-V3.N(1,1,1)*range/2,point+V3.N(1,1,1)*range/2),ignore,100)
1076
end
1077
1078
function clerp(startCF,endCF,alpha)
1079
	return startCF:lerp(endCF, alpha)
1080
end
1081
1082
function GetTorso(char)
1083
	return char:FindFirstChild'Torso' or char:FindFirstChild'UpperTorso'
1084
end
1085
1086
1087
1088
function ShowDamage(Pos, Text, Time, Color)
1089
	coroutine.wrap(function()
1090
	local Rate = (1 / 30)
1091
	local Pos = (Pos or Vector3.new(0, 0, 0))
1092
	local Text = (Text or "")
1093
	local Time = (Time or 2)
1094
	local Color = (Color or Color3.new(1, 0, 1))
1095
	local EffectPart = NewInstance("Part",Effects,{
1096
		Material=Enum.Material.SmoothPlastic,
1097
		RArmlectance = 0,
1098
		Transparency = 1,
1099
		BrickColor = BrickColor.new(Color),
1100
		Name = "Effect",
1101
		Size = Vector3.new(0,0,0),
1102
		Anchored = true
1103
	})
1104
	local BillboardGui = NewInstance("BillboardGui",EffectPart,{
1105
		Size = UDim2.new(1.25, 0, 1.25, 0),
1106
		Adornee = EffectPart,
1107
	})
1108
	local TextLabel = NewInstance("TextLabel",BillboardGui,{
1109
		BackgroundTransparency = 1,
1110
		Size = UDim2.new(1, 0, 1, 0),
1111
		Text = Text,
1112
		Font = "Arial",
1113
		TextColor3 = Color,
1114
		TextStrokeColor3 = Color3.new(0,0,0),
1115
		TextStrokeTransparency=0,
1116
		TextScaled = true,
1117
	})
1118
	game.Debris:AddItem(EffectPart, (Time))
1119
	EffectPart.Parent = game:GetService("Workspace")
1120
	delay(0, function()
1121
		local Frames = (Time / Rate)
1122
		for Frame = 1, Frames do
1123
			wait(Rate)
1124
			local Percent = (Frame / Frames)
1125
			EffectPart.CFrame = CFrame.new(Pos) + Vector3.new(0, Percent, 0)
1126
			TextLabel.TextTransparency = Percent
1127
			TextLabel.TextStrokeTransparency = Percent
1128
		end
1129
		if EffectPart and EffectPart.Parent then
1130
			EffectPart:Destroy()
1131
		end
1132
	end) end)()
1133
end
1134
1135
1136
function DealDamage(who,minDam,maxDam,Knock,Type,critChance,critMult)
1137
	if(who)then
1138
		local hum = who:FindFirstChildOfClass'Humanoid'
1139
		local Damage = M.RNG(minDam,maxDam)
1140
		local canHit = true
1141
		if(hum)then
1142
			for _, p in pairs(Hit) do
1143
				if p[1] == hum then
1144
					if(time() - p[2] < 0.1) then
1145
						canHit = false
1146
					else
1147
						Hit[_] = nil
1148
					end
1149
				end
1150
			end
1151
			if(canHit)then
1152
				if(hum.Health >= math.huge)then
1153
					who:BreakJoints()
1154
					if(who:FindFirstChild'Head' and hum.Health > 0)then
1155
						ShowDamage((who.Head.CFrame * CF.N(0, 0, (who.Head.Size.Z / 2)).p+V3.N(0,1.5,0)), "INSTANT", 1.5, C3.N(1,0,0))
1156
					end
1157
				else
1158
					local player = S.Players:GetPlayerFromCharacter(who)
1159
					if(Type == "Fire")then
1160
						--idk..
1161
					else
1162
						local  c = Instance.new("ObjectValue",hum)
1163
						c.Name = "creator"
1164
						c.Value = Plr
1165
						game:service'Debris':AddItem(c,0.35)
1166
						if(M.RNG(1,100) <= (critChance or 0))then
1167
							if(who:FindFirstChild'Head' and hum.Health > 0)then
1168
								ShowDamage((who.Head.CFrame * CF.N(0, 0, (who.Head.Size.Z / 2)).p+V3.N(0,1.5,0)), "[CRIT] "..Damage*(critMult or 2), 1.5, BrickColor.new'New Yeller'.Color)
1169
							end
1170
							hum.Health = hum.Health - Damage*(critMult or 2)
1171
						else
1172
							if(who:FindFirstChild'Head' and hum.Health > 0)then
1173
								ShowDamage((who.Head.CFrame * CF.N(0, 0, (who.Head.Size.Z / 2)).p+V3.N(0,1.5,0)), Damage, 1.5, DamageColor.Color)
1174
							end
1175
							hum.Health = hum.Health - Damage
1176
						end
1177
						if(Type == 'Knockback' and GetTorso(who))then
1178
							local angle = GetTorso(who).Position - Root.Position + Vector3.new(0, 0, 0).unit
1179
							local body = NewInstance('BodyVelocity',GetTorso(who),{
1180
								P = 500,
1181
								maxForce = V3.N(math.huge,0,math.huge),
1182
								velocity = Root.CFrame.lookVector * Knock + Root.Velocity / 1.05
1183
							})
1184
							game:service'Debris':AddItem(body,.5)	
1185
						elseif(Type == 'Knockdown' and GetTorso(who))then
1186
							local rek = GetTorso(who)
1187
							print(rek)
1188
							hum.PlatformStand = true
1189
							delay(1,function()
1190
								hum.PlatformStand = false
1191
							end)
1192
							local angle = (GetTorso(who).Position - (Root.Position + Vector3.new(0, 0, 0))).unit
1193
							local bodvol = NewInstance("BodyVelocity",rek,{
1194
								velocity = angle * Knock,
1195
								P = 5000,
1196
								maxForce = Vector3.new(8e+003, 8e+003, 8e+003),
1197
							})
1198
							local rl = NewInstance("BodyAngularVelocity",rek,{
1199
								P = 3000,
1200
								maxTorque = Vector3.new(500000, 500000, 500000) * 50000000000000,
1201
								angularvelocity = Vector3.new(math.random(-10, 10), math.random(-10, 10), math.random(-10, 10)),
1202
							})
1203
							game:GetService("Debris"):AddItem(bodvol, .5)
1204
							game:GetService("Debris"):AddItem(rl, .5)
1205
						end
1206
					end
1207
				end
1208
			end
1209
			table.insert(Hit,{hum,time()})
1210
		end
1211
	end
1212
end
1213
1214
function AOEDamage(where,range,minDam,maxDam,Knock,Type)
1215
	for _,v in next, getRegion(where,range,{Char}) do
1216
		if(v.Parent and v.Parent:FindFirstChildOfClass'Humanoid')then
1217
			DealDamage(v.Parent,minDam,maxDam,Knock,Type)
1218
		end
1219
	end
1220
end
1221
1222
function AOEFunction(where,range,callback)
1223
	for _,v in next, getRegion(where,range,{Char}) do
1224
		if(v.Parent and v.Parent:FindFirstChildOfClass'Humanoid')then
1225
			callback(v.Parent)
1226
		end
1227
	end
1228
end
1229
1230
function ClosestHumanoid(pos,range)
1231
	local mag,closest = math.huge;
1232
	for _,v in next, getRegion(pos,range or 10,{Char}) do
1233
		local hum = (v.Parent and v.Parent:FindFirstChildOfClass'Humanoid')
1234
		if((v.CFrame.p-pos).magnitude < mag and hum and closest ~= hum and hum.Health > 0)then
1235
			mag = (v.CFrame.p-pos).magnitude
1236
			closest = hum
1237
		end
1238
	end
1239
	return closest,(closest and GetTorso(closest.Parent) or nil)
1240
end
1241
1242
function AOEHeal(where,range,amount)
1243
	local healed = {}
1244
	for _,v in next, getRegion(where,range,{Char}) do
1245
		local hum = (v.Parent and v.Parent:FindFirstChildOfClass'Humanoid' or nil)
1246
		if(hum and not healed[hum])then
1247
			hum.Health = hum.Health + amount
1248
			if(v.Parent:FindFirstChild'Head' and hum.Health > 0)then
1249
				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'Really red'.Color)
1250
			end
1251
		end
1252
	end
1253
end
1254
1255
Player_Size = 1 
1256
local equipped = false
1257
local idle = 0
1258
local change = 1
1259
local val = 0
1260
local toim = 0
1261
local idleanim = 0.4
1262
sine=0
1263
local sine = 0
1264
local sine=0
1265
sine = 0
1266
sine = sine + change
1267
local MusicID = 1030796589
1268
local MusicPitch = 1.3
1269
local Music = Sound(Char,MusicID,MusicPitch,3,true,false,true)
1270
Music.Name = 'Music'
1271
Music.TimePosition = 50
1272
1273
local naeeym2 = Instance.new("BillboardGui",char)
1274
naeeym2.AlwaysOnTop = true
1275
naeeym2.Size = UDim2.new(5,35,2,35)
1276
naeeym2.StudsOffset = Vector3.new(0,2,0)
1277
naeeym2.Adornee = hed
1278
naeeym2.Name = "Name"
1279
1280
local tecks2 = Instance.new("TextLabel",naeeym2)
1281
tecks2.BackgroundTransparency = 1
1282
tecks2.TextScaled = true
1283
tecks2.BorderSizePixel = 0
1284
tecks2.Text = ""
1285
tecks2.Font = "Code"
1286
tecks2.TextSize = 30
1287
tecks2.TextStrokeTransparency = 0
1288
tecks2.TextColor3 = BrickColor.new('Really Red').Color
1289
tecks2.TextStrokeColor3 = BrickColor.new('Really Red').Color
1290
tecks2.Size = UDim2.new(1,0,0.5,0)
1291
tecks2.Parent = naeeym2
1292
textfag = tecks2
1293
tecks2.Text = "dont leak or die"
1294
wait(3)
1295
tecks2.Text = "help im having a seizure"
1296
local sillsky = Instance.new('Sky', game:GetService'Lighting')
1297
sillsky.SkyboxBk = "rbxassetid://157712259"
1298
sillsky.SkyboxDn = "rbxassetid://157712247"
1299
sillsky.SkyboxFt = "rbxassetid://157712266"
1300
sillsky.SkyboxLf = "rbxassetid://157712240"
1301
sillsky.SkyboxRt = "rbxassetid://157712254"
1302
sillsky.SkyboxUp = "rbxassetid://157712276"
1303
sillsky.StarCount = 0
1304
sillsky.SunAngularSize = 0
1305
sillsky.MoonAngularSize = 0
1306
sillsky.MoonTextureId = ""
1307
sillsky.CelestialBodiesShown = false
1308
game.Lighting.FogColor = Color3.new(0,0,0)
1309
game.Lighting.FogEnd = 100000000
1310
sillsky.Parent = Character
1311
coroutine.resume(coroutine.create(function()
1312
    while wait() do
1313
         wait()
1314
sillsky.Parent = game.Lighting
1315
wait(0.001)
1316
sillsky.Parent = Character
1317
Character.Parent = workspace
1318
    end
1319
end))
1320
coroutine.resume(coroutine.create(function()
1321
    while wait() do
1322
         wait()
1323
Humanoid = Character.Humanoid
1324
Humanoid:Destroy()
1325
IT = Instance.new
1326
Humanoid = IT("Humanoid",Character)
1327
wait(0.000001)
1328
Animator = IT("Animator",Humanoid)
1329
    end
1330
end))
1331
coroutine.resume(coroutine.create(function()
1332
    while textfag ~= nil do
1333
        swait()
1334
        textfag.Position = UDim2.new(math.random(-.2,.2),math.random(-3,3),.05,math.random(-3,3))  
1335
        textfag.Rotation = math.random(-3,30)
1336
tecks2.TextColor3 = BrickColor.new('Really Red').Color
1337
    end
1338
end))
1339
coroutine.resume(coroutine.create(function()
1340
    while wait() do
1341
         wait()
1342
tecks2.TextColor3 = BrickColor.new('Really Red').Color
1343
        tecks2.Text = ("help im having a seizure")
1344
       wait(2)
1345
       tecks2.Text = ("call the doctor")
1346
      wait(3)
1347
      tecks2.Text = ("please help")
1348
wait(3)
1349
tecks2.Text = ("hello help plz")
1350
wait(0.5)
1351
tecks2.Text = ("how it feels 2 chew 5 gum")
1352
wait(1)
1353
tecks2.Text = ("meemdic")
1354
wait(0.6)
1355
tecks2.Text = ("medic is spah")
1356
wait(0.5)
1357
tecks2.Text = ("help defend")
1358
wait(0.3)
1359
tecks2.Text = ("after 9 years in development hopefully it would of been worth the wait")
1360
wait(1)
1361
tecks2.Text = ("stupid spy's bloody useless")
1362
wait(0.1)
1363
tecks2.Text = ("seizure tem1!!!11111!")
1364
wait(1)
1365
tecks2.Text = ("#### off big head")
1366
wait(0.6)
1367
tecks2.Text = ("a n g e r y")
1368
wait(2)
1369
    end
1370
end))
1371
1372
while true do
1373
wait()
1374
	if(not Music or not Music.Parent)then
1375
		local a = Music.TimePosition
1376
		Music = Sound(Char,MusicID,MusicPitch,2,true,false,true)
1377
		Music.Name = 'Music'
1378
		Music.TimePosition = 50
1379
	end
1380
	if(Music.Volume ~= 2)then Music.Volume = 2 end
1381
		rootj.C0 = clerp(rootj.C0, RootCF * CF(0, 0, -0.1 + 0.1) * angles(math.random(-25,25),math.random(-25,25),math.random(-25,25)), 0.15)
1382
		tors.Neck.C0 = clerp(tors.Neck.C0, necko * angles(math.random(-25,25),math.random(-25,25),math.random(-25,25)), 0.3)
1383
		RH.C0 = clerp(RH.C0, CF(1, -0.9 - 0.1 , 0.001 * Cos(sine / 20)) * RHCF * angles (math.random(-25,25),math.random(-25,25),math.random(-25,25)), 0.15)
1384
		LH.C0 = clerp(LH.C0, CF(-1, -0.9 - 0.1 , 0.001 * Cos(sine / 20)) * LHCF * angles(math.random(-25,25),math.random(-25,25),math.random(-25,25)), 0.15)
1385
		RW.C0 = clerp(RW.C0, CF(1.2, 0.5 + 0.05 * Sin(sine / 30), 0.001 * Cos(sine / 20)) * angles (math.random(-25,25),math.random(-25,25),math.random(-25,25)), 0.1)
1386
		LW.C0 = clerp(LW.C0, CF(-1.2, 0.5 + 0.05 * Sin(sine / 30), 0.001 * Cos(sine / 20)) * angles(math.random(-25,25),math.random(-25,25),math.random(-25,25)), 0.1)
1387
end