View difference between Paste ID: 9AnrtdEm and ikviRRnD
SHOW: | | - or go back to the newest paste.
1
--https://github.com/Mokiros/roblox-FE-compatibility
2
if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
3
local Player,game,owner = owner,game
4
local RealPlayer = Player
5
do
6
	print("FE Compatibility code V2 by Mokiros")
7
	local RealPlayer = RealPlayer
8
	script.Parent = RealPlayer.Character
9
10
	--Fake event to make stuff like Mouse.KeyDown work
11
	local Disconnect_Function = function(this)
12
		this[1].Functions[this[2]] = nil
13
	end
14
	local Disconnect_Metatable = {__index={disconnect=Disconnect_Function,Disconnect=Disconnect_Function}}
15
	local FakeEvent_Metatable = {__index={
16
		Connect = function(this,f)
17
			local i = tostring(math.random(0,10000))
18
			while this.Functions[i] do
19
				i = tostring(math.random(0,10000))
20
			end
21
			this.Functions[i] = f
22
			return setmetatable({this,i},Disconnect_Metatable)
23
		end
24
	}}
25
	FakeEvent_Metatable.__index.connect = FakeEvent_Metatable.__index.Connect
26
	local function fakeEvent()
27
		return setmetatable({Functions={}},FakeEvent_Metatable)
28
	end
29
30
	--Creating fake input objects with fake variables
31
    local FakeMouse = {Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent(),Button2Up=fakeEvent(),Button2Down=fakeEvent()}
32
    FakeMouse.keyUp = FakeMouse.KeyUp
33
    FakeMouse.keyDown = FakeMouse.KeyDown
34
	local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
35
	local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
36
		CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
37
	end}
38
	--Merged 2 functions into one by checking amount of arguments
39
	CAS.UnbindAction = CAS.BindAction
40
41
	--This function will trigger the events that have been :Connect()'ed
42
	local function TriggerEvent(self,ev,...)
43
		for _,f in pairs(self[ev].Functions) do
44
			f(...)
45
		end
46
	end
47
	FakeMouse.TriggerEvent = TriggerEvent
48
	UIS.TriggerEvent = TriggerEvent
49
50
	--Client communication
51
	local Event = Instance.new("RemoteEvent")
52
	Event.Name = "UserInput_Event"
53
	Event.OnServerEvent:Connect(function(plr,io)
54
	    if plr~=RealPlayer then return end
55
		FakeMouse.Target = io.Target
56
		FakeMouse.Hit = io.Hit
57
		if not io.isMouse then
58
			local b = io.UserInputState == Enum.UserInputState.Begin
59
			if io.UserInputType == Enum.UserInputType.MouseButton1 then
60
				return FakeMouse:TriggerEvent(b and "Button1Down" or "Button1Up")
61
			end
62
			if io.UserInputType == Enum.UserInputType.MouseButton2 then
63
				return FakeMouse:TriggerEvent(b and "Button2Down" or "Button2Up")
64
			end
65
			for _,t in pairs(CAS.Actions) do
66
				for _,k in pairs(t.Keys) do
67
					if k==io.KeyCode then
68
						t.Function(t.Name,io.UserInputState,io)
69
					end
70
				end
71
			end
72
			FakeMouse:TriggerEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
73
			UIS:TriggerEvent(b and "InputBegan" or "InputEnded",io,false)
74
	    end
75
	end)
76
	Event.Parent = NLS([==[local Event = script:WaitForChild("UserInput_Event")
77
	local Mouse = owner:GetMouse()
78
	local UIS = game:GetService("UserInputService")
79
	local input = function(io,RobloxHandled)
80
		if RobloxHandled then return end
81
		--Since InputObject is a client-side instance, we create and pass table instead
82
		Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState,Hit=Mouse.Hit,Target=Mouse.Target})
83
	end
84
	UIS.InputBegan:Connect(input)
85
	UIS.InputEnded:Connect(input)
86
	local h,t
87
	--Give the server mouse data every second frame, but only if the values changed
88
	--If player is not moving their mouse, client won't fire events
89
	local HB = game:GetService("RunService").Heartbeat
90
	while true do
91
		if h~=Mouse.Hit or t~=Mouse.Target then
92
			h,t=Mouse.Hit,Mouse.Target
93
			Event:FireServer({isMouse=true,Target=t,Hit=h})
94
		end
95
		--Wait 2 frames
96
		for i=1,2 do
97
			HB:Wait()
98
		end
99
	end]==],script)
100
101
	----Sandboxed game object that allows the usage of client-side methods and services
102
	--Real game object
103
	local RealGame = game
104
105
	--Metatable for fake service
106
	local FakeService_Metatable = {
107
		__index = function(self,k)
108
			local s = rawget(self,"_RealService")
109
			if s then
110
				return typeof(s[k])=="function"
111
				and function(_,...)return s[k](s,...)end or s[k]
112
			end
113
		end,
114
		__newindex = function(self,k,v)
115
			local s = rawget(self,"_RealService")
116
			if s then s[k]=v end
117
		end
118
	}
119
	local function FakeService(t,RealService)
120
		t._RealService = typeof(RealService)=="string" and RealGame:GetService(RealService) or RealService
121
		return setmetatable(t,FakeService_Metatable)
122
	end
123
124
	--Fake game object
125
	local FakeGame = {
126
		GetService = function(self,s)
127
			return rawget(self,s) or RealGame:GetService(s)
128
		end,
129
		Players = FakeService({
130
			LocalPlayer = FakeService({GetMouse=function(self)return FakeMouse end},Player)
131
		},"Players"),
132
		UserInputService = FakeService(UIS,"UserInputService"),
133
		ContextActionService = FakeService(CAS,"ContextActionService"),
134
		RunService = FakeService({
135
			_btrs = {},
136
			RenderStepped = RealGame:GetService("RunService").Heartbeat,
137
			BindToRenderStep = function(self,name,_,fun)
138
				self._btrs[name] = self.Heartbeat:Connect(fun)
139
			end,
140
			UnbindFromRenderStep = function(self,name)
141
				self._btrs[name]:Disconnect()
142
			end,
143
		},"RunService")
144
	}
145
	rawset(FakeGame.Players,"localPlayer",FakeGame.Players.LocalPlayer)
146
	FakeGame.service = FakeGame.GetService
147
	FakeService(FakeGame,game)
148
	--Changing owner to fake player object to support owner:GetMouse()
149
	game,owner = FakeGame,FakeGame.Players.LocalPlayer
150
end
151
-- The Murderer
152
-- Created by Nebula_Zorua
153
-- Youtube channel: https://www.youtube.com/channel/UCo9oU9dCw8jnuVLuy4_SATA
154
-- Discord account: Nebula the Zorua#6666
155
156
-- Credit to Shackluster for the inspiration for this
157
-- I might update this in the future.
158
159
--[[
160
	CONTROLS:
161
		Left Mouse Button Click - Attack
162
		Left Mouse Button Click - Get knife back once thrown (You must be near the thrown knife)
163
		T - Throw (You cant attack until you get it back with the above control)
164
		; - Machete
165
	TO BECOME BLOODLUSTFUL:
166
		Kill 12 people/dummies quickly. You must keep killing to keep the bloodlust.
167
		Once you're bloodlustful, you charge forward when you attack
168
]]
169
170
--[[
171
TO EDITORS/RESKINNERS:
172
	You can edit BloodColor, BloodMaterial, and BloodlustBlood to change the color of the blood, material of the blood, and the 
173
	number of blood you need to become bloodlustful. You get 30 blood with each kill. 
174
]]
175
176
wait()
177
script.Parent = nil
178
local S = setmetatable({},{
179
	__index = function(self,index)
180
		local service = game:GetService(index)
181
		if(service)then
182
			self[index] = service
183
			return service
184
		end
185
	end
186
})
187
188
189
local plr = S.Players.LocalPlayer
190
local char = plr.Character
191
local hum = char.Humanoid
192
local rarm = char["Right Arm"]
193
local larm= char["Left Arm"]
194
local rleg= char["Right Leg"]
195
local lleg = char["Left Leg"]	
196
local root = char:FindFirstChild'HumanoidRootPart'
197
local torso = char.Torso
198
local head = char.Head
199
local sine = 0;
200
local lastTwitch = 0;
201
local combo = 1;
202
local ThrownKnife = false
203
local KnifePosition = CFrame.new(0,0,0)
204
local lastClick = time()
205
local change = 1;
206
local runService = S.RunService
207
local mouse = plr:GetMouse()
208
local Attack = false
209
local neutralAnims = true
210
local WalkSine = 0
211
local Debounces = {Debounces={}}
212
local Hit = {}
213
local BloodPuddles = {}
214
local Bloodied = 0
215
local Teamed = {}
216
local WalkSpeed = 6
217
hum.WalkSpeed = WalkSpeed
218
local BloodColor = BrickColor.new'Maroon'
219
local BloodMaterial = Enum.Material.Granite
220
local BloodTime = time()
221
local Twitch = false
222
local BloodlustBlood = 350
223
hum.DisplayDistanceType = "None"
224
hum.MaxHealth = 3000
225
hum.Health = 3000
226
227
function Debounces:New(name,cooldown)
228
	local aaaaa = {Usable=true,Cooldown=cooldown or 2,CoolingDown=false,LastUse=0}
229
	setmetatable(aaaaa,{__index = Debounces})
230
	Debounces.Debounces[name] = aaaaa
231
	return aaaaa
232
end
233
234
function Debounces:Use(overrideUsable)
235
	assert(self.Usable ~= nil and self.LastUse ~= nil and self.CoolingDown ~= nil,"Expected ':' not '.' calling member function Use")
236
	if(self.Usable or overrideUsable)then
237
		self.Usable = false
238
		self.CoolingDown = true
239
		local LastUse = time()
240
		self.LastUse = LastUse
241
		delay(self.Cooldown or 2,function()
242
			if(self.LastUse == LastUse)then
243
				self.CoolingDown = false
244
				self.Usable = true
245
			end
246
		end)
247
	end
248
end
249
250
function Debounces:Get(name)
251
	assert(typeof(name) == 'string',("bad argument #1 to 'get' (string expected, got %s)"):format(typeof(name) == nil and "no value" or typeof(name)))
252
	for i,v in next, Debounces.Debounces do
253
		if(i == name)then
254
			return v;
255
		end
256
	end
257
end
258
259
function Debounces:GetProgressPercentage()
260
	assert(self.Usable ~= nil and self.LastUse ~= nil and self.CoolingDown ~= nil,"Expected ':' not '.' calling member function Use")
261
	if(self.CoolingDown and not self.Usable)then
262
		return math.max(
263
			math.floor(
264
				(
265
					(time()-self.LastUse)/self.Cooldown or 2
266
				)*100
267
			)
268
		)
269
	else
270
		return 100
271
	end
272
end
273
274
local CF = {N=CFrame.new,A=CFrame.Angles,fEA=CFrame.fromEulerAnglesXYZ}
275
local V3 = {N=Vector3.new}
276
local M = {C=math.cos,R=math.rad,S=math.sin,P=math.pi,RNG=math.random,MRS=math.randomseed,H=math.huge}
277
278
local Hold = CF.N(0,-1,-1)*CF.A(M.R(-90),M.R(90),0)
279
local BeheadHold =  CF.A(0,0,0)
280
local Effects,Sounds = {},{};
281
--Stop animations
282
for _,v in next, hum:GetPlayingAnimationTracks() do
283
	v:Stop();
284
end
285
286
pcall(game.Destroy,char:FindFirstChild'Animate')
287
pcall(game.Destroy,hum:FindFirstChild'Animator')
288
289
-- Sounds
290
Sounds['Wet'] = {Id=256738023,Loop=false,Pitch=1}
291
Sounds['Swoosh1'] = {Id=320557353,Loop=false,Pitch=1,Volume=6}
292
Sounds['Swoosh2'] = {Id=320557382,Loop=false,Pitch=1,Volume=6}
293
Sounds['Swoosh3'] = {Id=320557413,Loop=false,Pitch=1,Volume=6}
294
Sounds['Swoosh4'] = {Id=320557453,Loop=false,Pitch=1,Volume=6}
295
Sounds['Swoosh5'] = {Id=320557487,Loop=false,Pitch=1,Volume=6}
296
Sounds['Swoosh6'] = {Id=320557537,Loop=false,Pitch=1,Volume=6}
297
Sounds['Swoosh7'] = {Id=320557563,Loop=false,Pitch=1,Volume=6}
298
Sounds['Swoosh8'] = {Id=320557518,Loop=false,Pitch=1,Volume=6}
299
Sounds['SmallBoom'] = {Id=341336485,Loop=false,Volume=5,Pitch=1}
300
Sounds['ChaosBuster'] = {Id=333534812,Loop=false,Volume=5,Pitch=0.75}
301
Sounds['Magic'] = {Id=315743350,Loop=false,Volume=5,Pitch=1}
302
Sounds['ShrekRemix'] = {Id=163306929,Loop=true,Pitch=1,Volume = 4}
303
Sounds['CreoDimension'] = {Id=927529620,Loop=true,Pitch=1,Volume=4}
304
Sounds['BlackBlizzard'] = {Id=657626121,Loop=true,Pitch=1,Volume=4}
305
Sounds['ColbreakzFantasy'] = {Id=876981900,Loop=true,Pitch=1,Volume=4}
306
Sounds['NeflCrystals'] = {Id=340106355,Loop=true,Pitch=1,Volume=4}
307
Sounds['EvilMortyRemix'] = {Id=1057401232,Loop=true,Pitch=1,Volume=10}
308
Sounds['Psycho'] = {Id=583415095,Loop=true,Pitch=1,Volume=10}
309
-- Functions
310
local NewInstance = function(instance,parent,properties)
311
	local inst = Instance.new(instance,parent)
312
	if(properties)then
313
		for i,v in next, properties do
314
			pcall(function() inst[i] = v end)
315
		end
316
	end
317
	return inst;
318
end
319
320
ArtificialHB = NewInstance("BindableEvent", script,{
321
	Parent = script,
322
	Name = "Heartbeat",
323
})
324
325
script:WaitForChild("Heartbeat")
326
327
frame = 1 / 60
328
tf = 0
329
allowframeloss = false
330
tossremainder = false
331
lastframe = tick()
332
script.Heartbeat:Fire()
333
334
game:GetService("RunService").Heartbeat:connect(function(s, p)
335
	tf = tf + s
336
	if tf >= frame then
337
		if allowframeloss then
338
			script.Heartbeat:Fire()
339
			lastframe = tick()
340
		else
341
			for i = 1, math.floor(tf / frame) do
342
				script.Heartbeat:Fire()
343
			end
344
			lastframe = tick()
345
		end
346
		if tossremainder then
347
			tf = 0
348
		else
349
			tf = tf - frame * math.floor(tf / frame)
350
		end
351
	end
352
end)
353
354
function swait(num)
355
	if num == 0 or num == nil then
356
		ArtificialHB.Event:wait()
357
	else
358
		for i = 0, num do
359
			ArtificialHB.Event:wait()
360
		end
361
	end
362
end
363
364
365
function clerp(startCF,endCF,alpha)
366
	return startCF:lerp(endCF, alpha)
367
end
368
local sndFromData = function(data,parent)
369
	assert(typeof(data) == 'table',"sndFromData's first argument must be a table!")
370
	local snd = NewInstance("Sound",parent or char,{SoundId = "rbxassetid://"..data.Id,Looped=data.Loop or false,Pitch = data.Pitch or 1,Volume = data.Volume or 1})
371
	return snd;
372
end
373
374
local FX = function(ID,vol,pitch,parent)
375
	local snd = NewInstance("Sound",parent or torso, {Pitch=pitch or 1, Volume = vol or 1,SoundId = "rbxassetid://"..ID})
376
	snd:Play()
377
	repeat wait() until snd.IsLoaded and snd.IsPlaying
378
	delay(snd.TimePosition+.5,function()
379
		snd:Stop()
380
		snd:Destroy()
381
	end)
382
end
383
function UnbindLoops()
384
	pcall(runService.UnbindFromRenderStep,runService,"N_Effects")
385
	pcall(runService.UnbindFromRenderStep,runService,"N_Animations")
386
end;
387
388
UnbindLoops() -- Just so if the loops already exist from previously running a script using this template, there's no errors
389
390
-- Model
391
392
local Music = sndFromData(Sounds.Psycho,torso)
393
Music:Play()
394
Music.MaxDistance = 500
395
396
local Handle = NewInstance('Part',char,{CanCollide=false,Size=V3.N(0.46,3.82,0.37),Name='Handle'})
397
local Mesh = NewInstance('SpecialMesh',Handle,{MeshId='rbxassetid://471401475',TextureId='rbxassetid://471401476',Scale=V3.N(.01,.01,.01)})
398
local Decal = NewInstance('Decal',Handle,{Transparency=1,Texture='rbxassetid://116830967'})
399
-- Joints and Lerp
400
local LS = NewInstance('Motor',char,{Part0=torso,Part1=larm,C0 = CF.N(-1.5,0.5,0),C1 = CF.N(0,.5,0)})
401
local RS = NewInstance('Motor',char,{Part0=torso,Part1=rarm,C0 = CF.N(1.5,0.5,0),C1 = CF.N(0,.5,0)})
402
local NK = NewInstance('Motor',char,{Part0=torso,Part1=head,C0 = CF.N(0,1.5,0)})
403
local LH = NewInstance('Motor',char,{Part0=torso,Part1=lleg,C0 = CF.N(-.5,-1,0),C1 = CF.N(0,1,0)})
404
local RH = NewInstance('Motor',char,{Part0=torso,Part1=rleg,C0 = CF.N(.5,-1,0),C1 = CF.N(0,1,0)})
405
local RJ = NewInstance('Motor',char,{Part0=root,Part1=torso})
406
local HW = NewInstance('Motor',char,{Part0=rarm,Part1=Handle,C0 = CF.N(0,-1,-1)*CF.A(M.R(-90),M.R(90),0)})
407
408
-- watevr
409
410
-- Default C0s
411
local LSD=LS.C0
412
local RSD=RS.C0	
413
local HD=NK.C0
414
local TD=RJ.C0
415
local LHD=LH.C0
416
local RHD=RH.C0
417
418
-- Check State
419
function CheckState(rPart)
420
	if(rPart.Velocity.y > .35 and hum:GetState() == Enum.HumanoidStateType.Freefall)then
421
		return 'Jump';		
422
	elseif(rPart.Velocity.y < -.35 and hum:GetState() == Enum.HumanoidStateType.Freefall)then
423
		return 'Fall';
424
	elseif(math.abs(rPart.Velocity.x) > 2 or math.abs(rPart.Velocity.z) > 2 and hum:GetState() ~= Enum.HumanoidStateType.Freefall)then
425
		return 'Walk';
426
	end
427
	return 'Idle';
428
end
429
430
-- Effect Functions
431
function SphereFX(duration,color,scale,pos,endScale)
432
	local rng = Instance.new("Part", char)
433
	rng.Anchored = true
434
	rng.BrickColor = color
435
	rng.CanCollide = false
436
	rng.FormFactor = 3
437
	rng.Name = "Ring"
438
	rng.Size = Vector3.new(1,1,1)
439
	rng.Transparency = 0
440
	rng.TopSurface = 0
441
	rng.BottomSurface = 0
442
	rng.CFrame = pos
443
	local rngm = Instance.new("SpecialMesh", rng)
444
	rngm.MeshType = "Sphere"
445
	rngm.Scale = scale
446
	table.insert(Effects, {Frame = 0, Effect="Sphere", Duration = duration or 30, Part=rng, Mesh = rngm, Scale = scale, EndScale = endScale or scale*2, Position = pos})
447
	return rng
448
end
449
450
function BlastFX(duration,color,scale,pos,endScale)
451
	local rng = Instance.new("Part", char)
452
	rng.Anchored = true
453
	rng.BrickColor = color
454
	rng.CanCollide = false
455
	rng.FormFactor = 3
456
	rng.Name = "Ring"
457
	rng.Size = Vector3.new(1,1,1)
458
	rng.Transparency = 0
459
	rng.TopSurface = 0
460
	rng.BottomSurface = 0
461
	rng.CFrame = pos
462
	local rngm = Instance.new("SpecialMesh", rng)
463
	rngm.MeshType = "FileMesh"
464
	rngm.MeshId = 'rbxassetid://20329976'
465
	rngm.Scale = scale
466
	table.insert(Effects, {Frame = 0, Effect="Sphere", Duration = duration or 30, Part=rng, Mesh = rngm, Scale = scale, EndScale = endScale or scale*2, Position = pos})
467
	return rng
468
end
469
470
function BlockFX(duration,color,scale,pos,endScale)
471
	local rng = Instance.new("Part", char)
472
	rng.Anchored = true
473
	rng.BrickColor = color
474
	rng.CanCollide = false
475
	rng.FormFactor = 3
476
	rng.Name = "Ring"
477
	rng.Size = Vector3.new(1,1,1)
478
	rng.Transparency = 0
479
	rng.TopSurface = 0
480
	rng.BottomSurface = 0
481
	rng.CFrame = pos
482
	local rngm = Instance.new("BlockMesh", rng)
483
	rngm.Scale = scale
484
	table.insert(Effects, {Frame = 0, Effect="Block", Duration = duration or 30, Part=rng, Mesh = rngm, Scale = scale, EndScale = endScale or scale*2, Position = pos})
485
	return rng
486
end
487
488
function LaserFX(duration,color,cframe,scale,endScale)
489
	local rng = Instance.new("Part", char)
490
	rng.Anchored = true
491
	rng.BrickColor = color
492
	rng.CanCollide = false
493
	rng.FormFactor = 3
494
	rng.Material = Enum.Material.Neon
495
	rng.Name = "Laser"
496
	rng.Size = Vector3.new(.5,.5,.5)
497
	rng.Transparency = 0
498
	rng.TopSurface = 0
499
	rng.BottomSurface = 0
500
	rng.CFrame = cframe
501
	local rngm = Instance.new("CylinderMesh", rng)
502
	rngm.Scale = scale
503
	table.insert(Effects, {Frame = 0, Effect="Sphere", Duration = duration or 30, Part=rng, Mesh = rngm, Scale = scale, EndScale = endScale or scale*2, Position = cframe})
504
	return rng
505
end
506
507
function BloodDrop(pos,dir,maxsize)
508
	local owo = NewInstance("Part",char,{Material=BloodMaterial,BrickColor=BloodColor,Shape=Enum.PartType.Ball,Size=V3.N(.25,.25,.25), CanCollide = false})
509
	owo.CFrame=CF.N(pos,dir)
510
	local bv = Instance.new("BodyVelocity",owo) 
511
	bv.maxForce = Vector3.new(1e9, 1e9, 1e9)
512
	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
513
	bv.Name = "MOVE"
514
	game:service'Debris':AddItem(bv,0.05)
515
	local touch 
516
	touch = owo.Touched:connect(function(hit)
517
		if(hit.Anchored==true)then
518
			touch:disconnect()
519
			BloodPuddle(owo.Position+V3.N(0,1,0),10,maxsize,owo)
520
			owo:destroy()
521
		end
522
	end)
523
end
524
function BloodPuddle(position,range,maxSize,where)
525
	local hit, pos, norm = workspace:FindPartOnRayWithIgnoreList(Ray.new(
526
		position,CF.N(position,position+V3.N(0,-1,0)).lookVector * range			
527
	),{where,char},false,true)
528
	if(hit)then
529
		if(BloodPuddles[hit])then
530
			BloodPuddles[hit].Frame = 0
531
			if(hit:FindFirstChild'CylinderMesh' and hit.CylinderMesh.Scale.Z < BloodPuddles[hit].MaxSize)then
532
				hit.CylinderMesh.Scale = hit.CylinderMesh.Scale + V3.N(.1,0,.1)
533
			end
534
		else
535
			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'})
536
			local Cyl = NewInstance('CylinderMesh',Puddle,{Name='CylinderMesh'})
537
			BloodPuddles[Puddle] = {MaxSize=maxSize or 7,Frame=0}
538
		end
539
	end
540
end
541
542
function ShatterFX(duration,color,scale,cframe)
543
	local rng = Instance.new("Part", char)
544
	rng.Anchored = true
545
	rng.BrickColor = color
546
	rng.CanCollide = false
547
	rng.FormFactor = 3
548
	rng.Name = "Ring"
549
	rng.Size = Vector3.new(1,1,1)
550
	rng.Transparency = 0
551
	rng.TopSurface = 0
552
	rng.BottomSurface = 0
553
	rng.CFrame = cframe * CF.fEA(M.RNG(-50, 50), M.RNG(-50, 50), M.RNG(-50, 50))
554
	local rngm = Instance.new("SpecialMesh", rng)
555
	rngm.Scale = scale
556
	rngm.MeshType = "Sphere"
557
	table.insert(Effects, {Frame = 0, Effect="Shatter", Duration = duration or 30, Part=rng, Mesh = rngm, Scale = scale,Position=rng.CFrame})
558
end
559
560
function RingFX(duration,color,scale,pos,endScale)
561
	local type = type
562
	local rng = Instance.new("Part", char)
563
	rng.Anchored = true
564
	rng.BrickColor = color
565
	rng.CanCollide = false
566
	rng.FormFactor = 3
567
	rng.Name = "Ring"
568
	rng.Size = Vector3.new(1,1,1)
569
	rng.Transparency = 0
570
	rng.TopSurface = 0
571
	rng.BottomSurface = 0
572
	rng.CFrame = pos
573
	local rngm = Instance.new("SpecialMesh", rng)
574
	rngm.MeshId = "rbxassetid://3270017"
575
	rngm.Scale = scale
576
	table.insert(Effects, {Frame = 0, Effect="Sphere", Duration = duration or 30, Part=rng, Mesh = rngm, Scale = scale, EndScale = endScale or scale*2, Position = pos})
577
	return rng
578
end
579
580
function Shoot(StartCF,EndCF,Spread,Speed,Num,Color,Drop,MinDamage,MaxDamage)
581
	local Spread = V3.N(M.RNG(-Spread,Spread),M.RNG(-Spread,Spread),M.RNG(-Spread,Spread))
582
	local Start = StartCF.p
583
	local End = EndCF.p
584
	local SpreadPos = End + Spread
585
	local Look = CF.N((Start + SpreadPos) / 2, SpreadPos)
586
	local Count = Num
587
	spawn(function()
588
		repeat
589
			wait()
590
			local hit, pos = workspace:findPartOnRay(Ray.new(
591
				Start,(Look.lookVector).unit * Speed		
592
			),char,false,true)
593
			local dist = (Start-pos).magnitude
594
			local yScale = dist * (Speed / (Speed/2))
595
			local aa = CF.N((Start + pos) / 2, pos) * CFrame.Angles(1.57, 0, 0)
596
			LaserFX(25,Color,aa,Vector3.new(1,yScale,1),Vector3.new(-1,yScale,-1))
597
			Start = Start + Look.lookVector	* Speed
598
			Look = Look * CF.A(M.R(Drop or -1),0,0)
599
			Count = Count - 1
600
			
601
			if(hit)then
602
				Count = 0
603
				MagniDamage(pos,10,MinDamage,MaxDamage,0,'Normal')
604
			end
605
			if(Count <= 0)then
606
				local sphere = SphereFX(25,Color,Vector3.new(5,5,5),CF.N(pos),Vector3.new(15,15,15))
607
				local ring = RingFX(25,Color,Vector3.new(6,6,6),CF.N(pos) * CF.A(0,M.R(90),0)  * CF.A(M.R(M.RNG(-360,360)),M.R(M.RNG(-360,360)),M.R(M.RNG(-360,360))),Vector3.new(16,16,16))
608
			end
609
		until Count <= 0
610
	end)
611
end
612
613
-- Effect Loop
614
615
runService:BindToRenderStep("N_Effects",Enum.RenderPriority.Character.Value + 2,function()
616
	for _,data in next, Effects do
617
		local frame,effect,duration = data.Frame,data.Effect,data.Duration
618
		local transparency = (frame / duration)
619
		local opacity = 1 - transparency
620
		if(frame > duration)then
621
			Effects[_] = nil
622
		end
623
		frame = frame + 1
624
		data.Frame = frame	
625
		if(effect == 'Sphere')then
626
			local Part,Mesh,Scale,CF,eScale = data.Part,data.Mesh,data.Scale,data.Position,data.EndScale 
627
			Mesh.Scale = Mesh.Scale:lerp(eScale, transparency/6)
628
			Part.Transparency = transparency
629
			if(frame > duration)then
630
				Part:destroy()
631
			end
632
		elseif(effect == 'Shatter')then	
633
			local Part,Mesh,Scale,Position,Thingie,Thingie2,Inc = data.Part,
634
																data.Mesh,
635
																data.Scale,
636
																data.Position,
637
																(data.Thingie or 0),
638
																(data.Thingie2 or M.RNG(50, 100) / 100),
639
																(data.Inc or M.RNG() - M.RNG())
640
			Part.Transparency = transparency
641
			Position = Position * CF.N(0,Thingie2,0)
642
			Part.CFrame = Position * CF.fEA(Thingie,0,0)
643
			Thingie = Thingie + Inc
644
			
645
			data.Position = Position
646
			data.Thingie = Thingie
647
			data.Thingie2 = Thingie2
648
			data.Inc = Inc
649
		elseif(effect == 'Block')then
650
			local Part,Mesh,Scale,CF,eScale = data.Part,data.Mesh,data.Scale,data.Position,data.EndScale 
651
			Mesh.Scale = Mesh.Scale:lerp(eScale, transparency/6)
652
			Part.Transparency = transparency
653
			Part.CFrame = CF * CFrame.Angles(M.R(M.RNG(-360,360)),M.R(M.RNG(-360,360)),M.R(M.RNG(-360,360)))
654
			if(frame > duration)then
655
				Part:destroy()
656
			end
657
		end
658
	end
659
	for puddle,data in next, BloodPuddles do
660
		if(puddle.Transparency > 0.9)then
661
			BloodPuddles[puddle] = nil
662
			puddle:destroy()
663
		end
664
		data.Frame = data.Frame + 1
665
		if(data.Frame > 105)then
666
			local trans = (data.Frame-105)/30
667
			puddle.Transparency = trans
668
			if(puddle:FindFirstChild'CylinderMesh' and puddle.CylinderMesh.Scale.Z > 0)then
669
				puddle.CylinderMesh.Scale = puddle.CylinderMesh.Scale-V3.N(.1,0,.1)
670
			end
671
		else
672
			puddle.Transparency = 0
673
		end
674
	end
675
end)
676
677
678
-- Nametag
679
local naeeym2 = Instance.new("BillboardGui",char)
680
naeeym2.AlwaysOnTop = true
681
naeeym2.Size = UDim2.new(5,35,2,35)
682
naeeym2.StudsOffset = Vector3.new(0,1,0)
683
naeeym2.Adornee = head
684
naeeym2.Name = "Name"
685
naeeym2.PlayerToHideFrom = plr
686
local tecks2 = Instance.new("TextLabel",naeeym2)
687
tecks2.BackgroundTransparency = 1
688
tecks2.TextScaled = true
689
tecks2.BorderSizePixel = 0
690
tecks2.Text = "Psychopathic Murderer"
691
tecks2.Font = "Antique"
692
tecks2.TextSize = 30
693
tecks2.TextStrokeTransparency = 0
694
tecks2.TextColor3 = Color3.new(0.8,0,0)
695
tecks2.TextStrokeColor3 = Color3.new(0,0,0)
696
tecks2.Size = UDim2.new(1,0,0.5,0)
697
tecks2.Parent = naeeym2
698
699
coroutine.wrap(function()
700
	while true do
701
		swait(15)
702
		hum.Health = hum.Health + 15
703
		local chance = 200
704
		if(Bloodied/4 > 25)then
705
			chance = Bloodied/4
706
		elseif(Bloodied/2 ~= 0)then
707
			chance = 25
708
		end
709
		local name = M.RNG(1,45)
710
		if(name == 1)then
711
			tecks2.Text = "M#rd@r3r"
712
		elseif(name == 2)then
713
			tecks2.Text = "Murder"
714
		elseif(name == 3)then
715
			tecks2.Text = "Murderrrrrrrr"
716
		elseif(M.RNG(1,chance) == math.ceil(chance/2))then
717
			tecks2.Text = "Hahahaahahhahahahahahahahaaha"
718
		else
719
			tecks2.Text = "Murderer"
720
		end
721
		if(tecks2.Text~="Hahahaahahhahahahahahahahaaha")then
722
			if(Bloodied > BloodlustBlood)then
723
				tecks2.Text = "Bloodlustful "..tecks2.Text
724
			else
725
				tecks2.Text = "Psychopathic "..tecks2.Text
726
			end
727
		end
728
		if(Twitch)then
729
			tecks2.Text = tecks2.Text:gsub("",string.char(M.RNG(1,127)))
730
		end
731
	end
732
end)()
733
-- Animation Loop
734
runService:BindToRenderStep("N_Animations",Enum.RenderPriority.Character.Value + 1,function()
735
	sine=sine+change
736
	if(not ThrownKnife)then Decal.Transparency = 1-(Bloodied/150) end
737
	local twitchVal = M.RNG(1,400)
738
	if(Bloodied >= BloodlustBlood)then
739
		local twitchVal = M.RNG(1,100)
740
	end
741
	if(twitchVal == 1 and not Twitch and time()-lastTwitch > 1.5)then
742
		Twitch = true
743
		lastTwitch = time()
744
	end
745
	if(time()-lastTwitch > M.RNG(50,100)/100)then
746
		Twitch = false
747
	end
748
	if(Decal.Transparency <= 0.7)then
749
		if(time()-BloodTime > .25)then
750
			if(not ThrownKnife)then
751
				BloodDrop((Handle.CFrame*CF.N(0,1.5,0)).p,(CF.N(Handle.CFrame.p)*CF.N(0,-25,0)).p,8)
752
				BloodTime = time()
753
				Bloodied = Bloodied-1
754
			end
755
		end
756
	end
757
	if(Bloodied > BloodlustBlood)then
758
		if(not Twitch)then
759
			Music.Pitch = 0.85
760
		end
761
		WalkSpeed = 16
762
	else
763
		if(not Twitch)then
764
			Music.Pitch = 1
765
		end
766
		WalkSpeed = 6
767
	end
768
	hum.WalkSpeed = WalkSpeed
769
770
	if(Twitch)then
771
		Music.Pitch = 0.65
772
		NK.C1 = clerp(NK.C1,CF.A(-M.R(15+M.RNG(0,25)),-M.R(25+M.RNG(-15,15)/15),0),.5)
773
	else
774
		NK.C1 = clerp(NK.C1,CF.N(),.3)
775
	end
776
777
	local wsVal = 5 / (hum.WalkSpeed / 16)
778
	if(CheckState(root) == 'Walk')then
779
		-- Walk anim
780
		change = 2/3
781
		RH.C1 = clerp(RH.C1,CF.N(0,.975-.1*M.S(sine/wsVal),-.1*M.C(sine/9))	*CF.A(M.R(25+35*M.C(sine/wsVal)),0,0),.6)
782
		LH.C1 = clerp(LH.C1,CF.N(0,.975+.1*M.S(sine/wsVal),.1*M.C(sine/9))*CF.A(M.R(25+35*-M.C(sine/wsVal)),0,0),.6)
783
	else
784
		RH.C1 = clerp(RH.C1,CF.N(0,1,0),.3)
785
		LH.C1 = clerp(LH.C1,CF.N(0,1,0),.3)
786
	end
787
	if(neutralAnims)then
788
		if(CheckState(root) == 'Idle')then
789
			-- Idle anim
790
			NK.C0 = clerp(NK.C0,HD*CF.N(0,.1,-.25)*CF.A(M.R(-25),0,0),.1)
791
			RH.C0 = clerp(RH.C0,CF.N(.5,-1-.1*M.C(time()),0),.1)
792
			LH.C0 = clerp(LH.C0,CF.N(-.5,-1-.1*M.C(time()),0),.1)
793
			RJ.C0 = clerp(RJ.C0,CF.N(0,0+.1*M.C(time()),0),.1)
794
			LS.C0 = clerp(LS.C0,CF.N(-1.5,.5,0)*CF.A(0,0,M.R(-12)-.1*M.C(time())),.1)
795
			RS.C0 = clerp(RS.C0,CF.N(1.5,.5,0)*CF.A(0,0,M.R(6+6*M.C(time()))),.1)
796
		elseif(CheckState(root) == 'Walk')then
797
			NK.C0 = clerp(NK.C0,HD*CF.N(0,.1,-.25)*CF.A(M.R(-25),0,0),.1)
798
			RJ.C0 = clerp(RJ.C0,CF.N(0,0+.1*M.C(sine/(wsVal/2)),0),.3)
799
			RH.C0 = clerp(RH.C0,RHD*CF.N(0,0-.1*M.C(sine/(wsVal/2)),0),.3)
800
			LH.C0 = clerp(LH.C0,LHD*CF.N(0,0-.1*M.C(sine/(wsVal/2)),0),.3)
801
			RS.C0 = clerp(RS.C0,RSD*CF.A(M.R(0+25*M.C(sine/wsVal)),0,0),.3)
802
			LS.C0 = clerp(LS.C0,LSD*CF.A(M.R(0+25*-M.C(sine/wsVal)),0,0),.3)
803
		elseif(CheckState(root) == 'Jump')then
804
			RJ.C0 = clerp(RJ.C0,CFrame.new(3.20309751e-13, 0.00628912123, 1.38760515e-06, 0.999999225, 5.09317033e-11, 0, -4.38656264e-11, 0.999980271, -0.00628618058, 0, 0.00628617639, 0.999979496),0.1)
805
			LH.C0 = clerp(LH.C0,CFrame.new(-0.496501386, -0.990816772, 0.0216115266, 0.999877751, -4.38656264e-11, 0.0156119959, -9.81397825e-05, 0.999980271, 0.0062854127, -0.0156116877, -0.00628618058, 0.999858022),0.1)
806
			RH.C0 = clerp(RH.C0,CFrame.new(0.951985836, -0.878642321, 0.00768248737, 0.807899356, 0.589113057, 0.0156119959, -0.58925271, 0.80792439, 0.0062854127, -0.0089104902, -0.0142773949, 0.999858022),0.1)
807
			LS.C0 = clerp(LS.C0,CFrame.new(-1.46314824, 0.504732132, -0.0780580789, 0.996319413, 0.084279716, 0.0156119959, -0.0843861476, 0.996413291, 0.0062854127, -0.0150262676, -0.00757971918, 0.999858022),0.1)
808
			RS.C0 = clerp(RS.C0,CFrame.new(1.41746354, 0.490631759, 0.0355827622, 0.983217537, -0.181765735, 0.0156119959, 0.181687862, 0.98333621, 0.0062854127, -0.0164943133, -0.0033434222, 0.999858022),0.1)
809
			NK.C0 = clerp(NK.C0,HD*CF.N(0,.1,-.25)*CF.A(M.R(-25),0,0),.1)
810
		elseif(CheckState(root) == 'Fall')then
811
			RJ.C0 = clerp(RJ.C0,CFrame.new(3.20309751e-13, 0.00628912123, 1.38760515e-06, 0.999999225, 5.09317033e-11, 0, -4.38656264e-11, 0.999980271, -0.00628618058, 0, 0.00628617639, 0.999979496),0.1)
812
			LH.C0 = clerp(LH.C0,CFrame.new(-0.496501386, -0.990816772, 0.0216115266, 0.999877751, -4.38656264e-11, 0.0156119959, -9.81397825e-05, 0.999980271, 0.0062854127, -0.0156116877, -0.00628618058, 0.999858022),0.1)
813
			RH.C0 = clerp(RH.C0,CFrame.new(0.951985836, -0.878642321, 0.00768248737, 0.807899356, 0.589113057, 0.0156119959, -0.58925271, 0.80792439, 0.0062854127, -0.0089104902, -0.0142773949, 0.999858022),0.1)
814
			LS.C0 = clerp(LS.C0,CFrame.new(-1.39294851, 0.589963198, 0.0808894783, 0.976439953, 0.21526964, 0.0149493031, -0.210034028, 0.932227492, 0.294682175, 0.0494999699, -0.29087922, 0.955478072),0.1)
815
			RS.C0 = clerp(RS.C0,CFrame.new(1.29713261, 0.551729858, 0.0523524433, 0.920970082, -0.389345646, 0.0149465948, 0.368037164, 0.88187921, 0.294682831, -0.127914533, -0.265893161, 0.955477953),0.1)
816
			NK.C0 = clerp(NK.C0,HD*CF.N(0,.1,-.25)*CF.A(M.R(-25),0,0),.1)
817
		end
818
	end
819
end)
820
821
-- Died event
822
823
hum.Died:connect(function() -- When the player dies
824
	UnbindLoops() -- Unbind all of the loops used
825
end)
826
827
828
-- Everything else
829
830
831
function GetTorso(char)
832
	return char:FindFirstChild'Torso' or char:FindFirstChild'UpperTorso' or char:FindFirstChild'LowerTorso' or char:FindFirstChild'HumanoidRootPart'
833
end
834
835
function Projectile(what)
836
	what.Archivable = true
837
	local projectile = what:Clone()
838
	projectile.Parent = char
839
	projectile.Transparency = 0
840
	projectile.Name = "Projectile"
841
	projectile.CFrame = CFrame.new(head.CFrame.p,mouse.Hit.p)*CFrame.Angles(math.rad(0),math.rad(90),math.rad(-90))
842
	projectile.Anchored = true
843
	projectile.Velocity = Vector3.new(0,0,0)
844
	projectile.RotVelocity = Vector3.new(0,0,0)
845
	projectile.Anchored = false
846
	--character.Head.Position).unit
847
	local Velocity = (mouse.Hit.p-head.CFrame.p).unit
848
	projectile.Velocity = Velocity*160
849
	local force = Instance.new("BodyForce")
850
	force.force = Vector3.new(0, 196.2, 0) * projectile:GetMass() * .8
851
	force.Parent = projectile
852
	local touchie
853
	coroutine.wrap(function()
854
		repeat wait() KnifePosition = projectile.CFrame until not projectile or not projectile.Parent or not ThrownKnife
855
		projectile:destroy()
856
		print'knifu'
857
		ThrownKnife = false
858
		Attack = false
859
		Handle.Transparency = 0
860
		KnifePosition = CF.N(0,0,0)
861
	end)()
862
	touchie = projectile.Touched:connect(function(h)
863
		if(not char:IsAncestorOf(h))then
864
			force:destroy()
865
			projectile.Velocity = V3.N(0,0,0)
866
			touchie:disconnect()
867
			local rag = Ragdoll(h.Parent)
868
			swait()
869
			local name = (h.Name == 'Head' and 'FakeHead' or h.Name)
870
			local asd = CF.N((projectile.CFrame.p + h.CFrame.p) * .5)
871
			
872
			if(not h.Parent and rag and rag:FindFirstChild(name,true))then h = rag:FindFirstChild(name,true)  end
873
			local C0 = projectile.CFrame:inverse() * asd
874
			if(not h.Anchored)then
875
				local w = NewInstance('Weld',char,{Part0=projectile,Part1=h,C0 = C0,C1=h.CFrame:inverse() * asd})
876
			else
877
				projectile.Anchored = true
878
			end
879
			if(rag)then
880
				Bloodied = Bloodied + 30
881
				local bloodie = NewInstance('Part',rag,{Anchored = false,CanCollide=false,Size=V3.N(.02,.02,.02),Transparency=1})
882
				local w = NewInstance('Weld',rag,{Part0=bloodie,Part1=h,C0 = C0,C1=h.CFrame:inverse() * asd})
883
				coroutine.wrap(function() repeat wait(M.RNG(2,10)/100)
884
					local spread = V3.N(M.RNG(-85,85)/100,M.RNG(-85,85)/100,M.RNG(-85,85)/100)
885
					BloodDrop(bloodie.CFrame*CF.N(0,.02,0).p,bloodie.CFrame * CF.N(0,100,0).p+spread,10)
886
				until not bloodie or not bloodie.Parent or not rag or not rag.Parent end)()
887
				repeat wait() until not ThrownKnife
888
				delay(5, function()
889
					if(rag)then
890
						rag:destroy()
891
					end
892
				end)
893
			end
894
		end
895
	end)
896
end
897
function Decapitate(target)
898
	if(target and target ~= char and GetTorso(target) and target:FindFirstChildOfClass'Humanoid' and target:FindFirstChildOfClass'Humanoid'.Name ~= 'Corpse' and target:FindFirstChildOfClass'Humanoid'.Health > 0 and target:FindFirstChild'Head')then
899
		--BloodPuddle(start,direction,range,maxSize)
900
		Bloodied = Bloodied + 60
901
		target.Archivable = true
902
		local Clone = target:Clone()
903
		target:destroy()	
904
		Clone.Parent = workspace
905
		local FakeHead = Clone.Head:Clone()
906
		Clone.Head:destroy()
907
		Clone:FindFirstChildOfClass'Humanoid'.PlatformStand = true
908
		Clone.Name = 'Ragdoll of '..target.Name
909
		FakeHead.Name = 'FakeHead'
910
		FakeHead.Parent = Clone
911
		Clone:FindFirstChildOfClass'Humanoid'.Name = 'Corpse'
912
		local head = FakeHead
913
		local torso = GetTorso(Clone)
914
		local cut = FX(756072587)
915
		local bv = Instance.new("BodyVelocity",torso) 
916
		bv.maxForce = Vector3.new(1e9, 1e9, 1e9)
917
		bv.velocity = CF.N(Handle.Position,torso.Position).lookVector*20
918
		bv.Name = "MOVE"
919
		game:service'Debris':AddItem(bv,0.2)
920
		local bv = Instance.new("BodyVelocity",FakeHead) 
921
		bv.maxForce = Vector3.new(1e9, 1e9, 1e9)
922
		bv.velocity = CF.N(Handle.Position,FakeHead.Position).lookVector*20
923
		bv.Name = "MOVE"
924
		game:service'Debris':AddItem(bv,0.2)
925
		
926
		game:service'Debris':AddItem(Clone,10)
927
		for i = 1, 500 do
928
			wait(M.RNG(2,10)/100)
929
			BloodDrop(torso.CFrame * CF.N(0,torso.Size.Y/2,0).p,(torso.CFrame * CF.N(0,torso.Size.Y,0)).p,10)
930
			BloodDrop(head.CFrame * CF.N(0,-.25,0).p,(head.CFrame * CF.N(0,-.7,0)).p,5)
931
			if not head or not torso or not Clone or not Clone.Parent or not Clone.Parent.Parent then break end
932
		end
933
	end
934
end
935
936
function Ragdoll(target,bloodPos)
937
	if(target and target ~= char and GetTorso(target) and target:FindFirstChildOfClass'Humanoid' and target:FindFirstChildOfClass'Humanoid'.Name ~= 'Corpse' and target:FindFirstChildOfClass'Humanoid'.Health > 0 and target:FindFirstChild'Head')then
938
		--BloodPuddle(start,direction,range,maxSize)
939
		target.Archivable = true
940
		local Clone = target:Clone()
941
		local torso = GetTorso(Clone)
942
		target:destroy()	
943
		Clone.Parent = workspace
944
		Clone:FindFirstChildOfClass'Humanoid'.PlatformStand = true
945
		Clone.Name = 'Ragdoll of '..target.Name
946
		Clone:FindFirstChildOfClass'Humanoid'.Name = 'Corpse'
947
		local fHead = Clone.Head:Clone()
948
		Clone.Head:destroy()
949
		fHead.Name = 'FakeHead'
950
		fHead.Parent = Clone
951
		NewInstance("Motor6D",torso,{Name='Neck',Part0=torso,Part1=fHead,C0 = HD})
952
		return Clone;
953
	end
954
end
955
956
function DealDamage(who,minDam,maxDam,Knock,Type)
957
	if(who)then
958
		local hum = who:FindFirstChildOfClass'Humanoid'
959
		local Damage = M.RNG(minDam,maxDam)
960
		local canHit = true
961
		if(hum)then
962
			for _, p in pairs(Hit) do
963
				if p[1] == hum then
964
					if(time() - p[2] < 0.1) then
965
						canHit = false
966
					else
967
						Hit[_] = nil
968
					end
969
				end
970
			end
971
			if(canHit)then
972
				if(hum.Health >= math.huge)then
973
					who:BreakJoints()
974
				else
975
					local player = S.Players:GetPlayerFromCharacter(who)
976
					if(not player or not Teamed[player])then
977
						if(Type == "Fire")then
978
							--idk..
979
						else
980
							local  c = Instance.new("ObjectValue",hum)
981
							c.Name = "creator"
982
							c.Value = plr
983
							game:service'Debris':AddItem(c,0.35)
984
							hum.Health = hum.Health - Damage
985
							if(Type == 'Knockback' and GetTorso(who))then
986
								local angle = GetTorso(who).Position - root.Position + Vector3.new(0, 0, 0).unit
987
								local body = NewInstance('BodyVelocity',GetTorso(who),{
988
									P = 500,
989
									maxForce = V3.N(math.huge,0,math.huge),
990
									velocity = root.CFrame.lookVector * Knock + root.Velocity / 1.05
991
								})
992
								game:service'Debris':AddItem(body,.5)	
993
							elseif(Type == 'Knockdown' and GetTorso(who))then
994
								local rek = GetTorso(who)
995
								print(rek)
996
								hum.PlatformStand = true
997
								delay(1,function()
998
									hum.PlatformStand = false
999
								end)
1000
								local angle = (GetTorso(who).Position - (root.Position + Vector3.new(0, 0, 0))).unit
1001
								local bodvol = NewInstance("BodyVelocity",rek,{
1002
									velocity = angle * Knock,
1003
									P = 5000,
1004
									maxForce = Vector3.new(8e+003, 8e+003, 8e+003),
1005
								})
1006
								local rl = NewInstance("BodyAngularVelocity",rek,{
1007
									P = 3000,
1008
									maxTorque = Vector3.new(500000, 500000, 500000) * 50000000000000,
1009
									angularvelocity = Vector3.new(math.random(-10, 10), math.random(-10, 10), math.random(-10, 10)),
1010
								})
1011
								game:GetService("Debris"):AddItem(bodvol, .5)
1012
								game:GetService("Debris"):AddItem(rl, .5)
1013
							end
1014
						end
1015
					end
1016
				end
1017
				table.insert(Hit,{hum,time()})
1018
			end
1019
		end
1020
	end
1021
end
1022
1023
function MagniDamage(pos,radius,mindamage,maxdamage,knockback,damagetype)
1024
	local Recursive
1025
	Recursive = function(whom)	
1026
		for _,c in next, whom:children() do
1027
			local hum = c:FindFirstChildOfClass'Humanoid'
1028
			local hed = c:FindFirstChild'Torso' or c:FindFirstChild'UpperTorso' or c:FindFirstChild'LowerTorso'
1029
			if(hum and hed)then
1030
				local mag = (hed.CFrame.p - pos).magnitude
1031
				if(mag <= radius and c ~= char)then
1032
					DealDamage(c,mindamage,maxdamage,knockback,damagetype)
1033
				end
1034
			end
1035
			Recursive(c)
1036
		end
1037
	end
1038
	Recursive(workspace)
1039
end
1040
1041
function MagniHeal(pos,radius,heal,needsTeamed)
1042
	for _,v in next, workspace:GetDescendants() do
1043
		local player = S.Players:GetPlayerFromCharacter(v)
1044
		local hum = v:FindFirstChildOfClass'Humanoid'
1045
		if(hum and v:IsA'Model')then
1046
			if(not needsTeamed or player and (not plr.Neutral and player.TeamColor == plr.TeamColor))then
1047
				local pp = v.PrimaryPart or v:FindFirstChild'Torso' or v:FindFirstChild'UpperTorso' or v:FindFirstChild'LowerTorso'
1048
				if(pp and (pp.CFrame.p-pos).magnitude <= radius)then
1049
					hum.Health = hum.Health + heal
1050
				end
1051
			end
1052
		end
1053
	end	
1054
end
1055
1056
1057
Debounces:New('how2use',1) -- name, cooldown
1058
1059
function TestDebounce()
1060
	if(Debounces:Get('how2use').Usable)then
1061
		-- code
1062
		Debounces:Get('how2use'):Use() -- use it up
1063
	end
1064
end
1065
1066
function Throw()
1067
	Attack = true
1068
	neutralAnims = false	
1069
	for i = 0, 0.5, 0.01 do
1070
		swait()
1071
		RJ.C0 = clerp(RJ.C0,CFrame.new(3.20297608e-13, 0.00628888281, 1.38610631e-06, 0.999999225, 5.09317033e-11, 0, -4.38656264e-11, 0.999980271, -0.00628618058, 0, 0.00628617639, 0.999979496),i)
1072
		LH.C0 = clerp(LH.C0,CFrame.new(-0.496501386, -0.990817726, 0.0216115303, 0.999877751, -4.38656264e-11, 0.0156119959, -9.81397825e-05, 0.999980271, 0.0062854127, -0.0156116877, -0.00628618058, 0.999858022),i)
1073
		RH.C0 = clerp(RH.C0,CFrame.new(0.498532087, -0.990986288, 0.0154690417, 0.999877751, -4.38656264e-11, 0.0156119959, -9.81397825e-05, 0.999980271, 0.0062854127, -0.0156116877, -0.00628618058, 0.999858022),i)
1074
		LS.C0 = clerp(LS.C0,CFrame.new(-1.46255744, 0.505245924, -0.00366198737, 0.996415496, 0.083136864, 0.0156119959, -0.0832431838, 0.996509492, 0.0062854127, -0.0150349522, -0.007562479, 0.999858022),i)
1075
		RS.C0 = clerp(RS.C0,CFrame.new(1.45461845, 0.798322797, -0.0251020491, 0.992853343, 0.114112578, -0.0349269882, 0.119324632, -0.944872856, 0.304921478, 0.00179381669, -0.306909949, -0.951736629),i)
1076
		NK.C0 = clerp(NK.C0,HD*CF.N(0,.1,-.25)*CF.A(M.R(-25),0,0),i)
1077
	end
1078
	wait(.25)
1079
	for i = 0, 0.5, 0.1 do
1080
		swait()
1081
		RJ.C0 = clerp(RJ.C0,CFrame.new(3.20297608e-13, 0.00628888281, 1.38610631e-06, 0.999999225, 5.09317033e-11, 0, -4.38656264e-11, 0.999980271, -0.00628618058, 0, 0.00628617639, 0.999979496),i)
1082
		LH.C0 = clerp(LH.C0,CFrame.new(-0.496501386, -0.990817726, 0.0216115303, 0.999877751, -4.38656264e-11, 0.0156119959, -9.81397825e-05, 0.999980271, 0.0062854127, -0.0156116877, -0.00628618058, 0.999858022),i)
1083
		RH.C0 = clerp(RH.C0,CFrame.new(0.498532087, -0.990986288, 0.0154690417, 0.999877751, -4.38656264e-11, 0.0156119959, -9.81397825e-05, 0.999980271, 0.0062854127, -0.0156116877, -0.00628618058, 0.999858022),i)
1084
		LS.C0 = clerp(LS.C0,CFrame.new(-1.46255744, 0.505245924, -0.00366198737, 0.996415496, 0.083136864, 0.0156119959, -0.0832431838, 0.996509492, 0.0062854127, -0.0150349522, -0.007562479, 0.999858022),i)
1085
		RS.C0 = clerp(RS.C0,CFrame.new(1.47101879, 0.662136793, -0.0487503409, 0.99285394, -0.0636505187, 0.100939959, 0.119318806, 0.516643643, -0.847845852, 0.00181584992, 0.853831172, 0.520546317),i)
1086
		NK.C0 = clerp(NK.C0,HD*CF.N(0,.1,-.25)*CF.A(M.R(-25),0,0),i)
1087
	end
1088
	ThrownKnife = true
1089
	Handle.Transparency = 1
1090
	Projectile(Handle)
1091
	Decal.Transparency = 1
1092
	wait(.5)
1093
	neutralAnims = true
1094
end
1095
1096
function ClickCombo()
1097
	Attack = true
1098
	neutralAnims = false
1099
	for i = 0, 1, 0.1 do
1100
		swait()
1101
		RJ.C0 = clerp(RJ.C0,CFrame.new(-0.0288643427, 0.00628663553, 0.0650177076, 0.795387626, -0.00380940945, -0.606089413, 0, 0.99998033, -0.0062851035, 0.606101394, 0.00499909231, 0.79537189),0.3)
1102
		LH.C0 = clerp(LH.C0,CFrame.new(-0.636930108, -0.990812421, 0.0222794991, 0.785828114, 0, 0.618445039, -0.00388699071, 0.99998033, 0.00493901037, -0.61843282, -0.0062851035, 0.785812557),0.3)
1103
		RH.C0 = clerp(RH.C0,CFrame.new(0.52050519, -0.991459012, -0.0594233908, 0.785828114, 0, 0.618445039, -0.00388699071, 0.99998033, 0.00493901037, -0.61843282, -0.0062851035, 0.785812557),0.3)
1104
		LS.C0 = clerp(LS.C0,CFrame.new(-1.3529017, 0.445256352, -0.140841246, 0.946949303, 0.32137382, 0.00244083256, -0.0499903522, 0.154793665, -0.986681402, -0.317471415, 0.934215069, 0.162647352),0.3)
1105
		RS.C0 = clerp(RS.C0,CFrame.new(1.27564776, 0.466243029, 0.284559131, 0.129886121, -0.885094404, -0.446920156, 0.991494656, 0.112184346, 0.0659796819, -0.00826080143, -0.451688766, 0.892137289),0.3)
1106
		NK.C0 = clerp(NK.C0,CFrame.new(-0.0194674022, 1.49851632, -0.0826113448, 0.795387626, -0.0348471925, 0.605098784, -0.00380940945, 0.998038769, 0.0624837019, -0.606089413, -0.0520038158, 0.793694794),0.3)	
1107
	end
1108
	local swoosh = coroutine.wrap(FX)(1306070008,1,M.RNG(95,125)/100)
1109
	Handle.CanCollide = true
1110
	local touched = Handle.Touched:connect(function(t)
1111
		Decapitate(t.Parent)
1112
	end)
1113
	for i = 0, 1, 0.05 do
1114
		swait()
1115
		if((root.Velocity * V3.N(1, 0, 1)).magnitude > 0.3 and WalkSpeed == 16)then
1116
			root.CFrame = root.CFrame*CF.N(0,0,-1)
1117
		end
1118
		RJ.C0 = clerp(RJ.C0,CFrame.new(-0.0220096968, 0.00628673984, -0.0231647622, 0.894043028, 0.00281593157, 0.447972536, 0, 0.99998033, -0.00628582342, -0.447981387, 0.00561979692, 0.894025445),0.3)
1119
		LH.C0 = clerp(LH.C0,CFrame.new(-0.526260316, -0.99155879, -0.0964359194, 0.900927901, 0, -0.433968931, 0.00272785197, 0.99998033, 0.00566307362, 0.433960348, -0.00628582342, 0.900910139),0.3)
1120
		RH.C0 = clerp(RH.C0,CFrame.new(0.494664222, -0.99110806, -0.00358221633, 0.900927901, 0, -0.433968931, 0.00272785197, 0.99998033, 0.00566307362, 0.433960348, -0.00628582342, 0.900910139),0.3)
1121
		LS.C0 = clerp(LS.C0,CFrame.new(-1.35400736, 0.608840644, 0.230960667, 0.920430303, 0.226487458, 0.318608999, -0.244053409, 0.969633698, 0.0157693904, -0.305362433, -0.092272222, 0.947755098),0.3)
1122
		RS.C0 = clerp(RS.C0,CFrame.new(1.13865554, 0.477464586, -0.481917799, 0.129889846, 0.658138037, 0.7416085, 0.99149406, -0.0799742565, -0.102683425, -0.0082702823, 0.748637795, -0.662927747),0.3)
1123
		NK.C0 = clerp(NK.C0,CFrame.new(0.0115462095, 1.49914026, 0.0166844055, 0.894043028, 0.0257562418, -0.447240323, 0.00281593157, 0.998003125, 0.0631033778, 0.447972536, -0.0576765276, 0.892185211),0.3)
1124
		HW.C0 = clerp(HW.C0,CFrame.new(0.0201188885, -1.41869056, -0.559928358, -1.8030405e-06, -3.1888485e-06, 1.00000012, -0.698006153, -0.716091871, -3.54647636e-06, 0.716091871, -0.698006153, -9.38773155e-07)*BeheadHold,0.3)
1125
	end
1126
	wait(.1)
1127
	Handle.CanCollide = false
1128
	touched:disconnect()
1129
	coroutine.wrap(function()
1130
		for i = 0, 1, 0.1 do
1131
			swait()
1132
			HW.C0 = Hold
1133
		end
1134
	end)()
1135
	neutralAnims = true
1136
	Attack = false
1137
end
1138
function AttemptGetKnife()
1139
	if((torso.CFrame.p-KnifePosition.p).magnitude < 6)then
1140
		ThrownKnife = false
1141
	end
1142
end
1143
mouse.Button1Down:connect(function()
1144
	if(not ThrownKnife)then 
1145
		if(Attack)then return end
1146
		ClickCombo() 
1147
	else
1148
		AttemptGetKnife()
1149
	end
1150
end)
1151
mouse.KeyDown:connect(function(k)
1152
	if(Attack)then return end	
1153
	if(k == "t")then
1154
		Throw()
1155
	elseif(k == 'm')then
1156
		if(Music.Volume ~= 0)then
1157
			Music.Volume =0
1158
		else
1159
			Music.Volume = Sounds.Psycho.Volume
1160
		end
1161
	elseif(k == ';')then
1162
		if(Mesh.MeshId ~= 'http://www.roblox.com/asset/?id=123248347')then
1163
			Mesh.MeshId = 'http://www.roblox.com/asset/?id=123248347'
1164
			Mesh.TextureId = 'http://www.roblox.com/asset/?id=123248449'
1165
			Mesh.Scale = V3.N(.4,.4,.4)
1166
			Hold = CF.N(0,-1,-1.35)*CF.A(M.R(-90),0,0)
1167
			BeheadHold = CF.N(0,.5,0)*CF.A(0,M.R(-90),0)
1168
		else
1169
			Mesh.MeshId='rbxassetid://471401475'
1170
			Mesh.TextureId='rbxassetid://471401476'
1171
			Mesh.Scale = V3.N(.01,.01,.01)
1172
			Hold = CF.N(0,-1,-1)*CF.A(M.R(-90),M.R(90),0)
1173
			BeheadHold = CF.A(0,0,0)
1174
		end
1175
		HW.C0 = Hold
1176
	end
1177
end)