View difference between Paste ID: VRcTD38b and 993XwNS2
SHOW: | | - or go back to the newest paste.
1
wait(1)
2-
local Player = game:GetService("Players").StarzoZero  --<=== Replace With Your Name
2+
local Player = game:GetService("Players").Guest537561 --<=== Replace With Your Name
3
4
5
local Mouse,mouse,UserInputService,ContextActionService
6
do
7
	script.Parent = Player.Character
8
	local CAS = {Actions={}}
9
	local Event = Instance.new("RemoteEvent")
10
	Event.Name = "UserInput_Event"
11
	Event.Parent = Player.Character
12
	local fakeEvent = function()
13
		local t = {_fakeEvent=true}
14
		t.Connect = function(self,f)self.Function=f end
15
		t.connect = t.Connect
16
		return t
17
	end
18
    local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
19
	local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
20
	function CAS:BindAction(name,fun,touch,...)
21
		CAS.Actions[name] = {Name=name,Function=fun,Keys={...}}
22
	end
23
	function CAS:UnbindAction(name)
24
		CAS.Actions[name] = nil
25
	end
26
	local function te(self,ev,...)
27
		local t = m[ev]
28
		if t and t._fakeEvent and t.Function then
29
			t.Function(...)
30
		end
31
	end
32
	m.TrigEvent = te
33
	UIS.TrigEvent = te
34
	Event.OnServerEvent:Connect(function(plr,io)
35
	    if plr~=Player then return end
36
		if io.isMouse then
37
			m.Target = io.Target
38
			m.Hit = io.Hit
39
		elseif io.UserInputType == Enum.UserInputType.MouseButton1 then
40
	        if io.UserInputState == Enum.UserInputState.Begin then
41
				m:TrigEvent("Button1Down")
42
			else
43
				m:TrigEvent("Button1Up")
44
			end
45
		else
46
			for n,t in pairs(CAS.Actions) do
47
				for _,k in pairs(t.Keys) do
48
					if k==io.KeyCode then
49
						t.Function(t.Name,io.UserInputState,io)
50
					end
51
				end
52
			end
53
	        if io.UserInputState == Enum.UserInputState.Begin then
54
	            m:TrigEvent("KeyDown",io.KeyCode.Name:lower())
55
				UIS:TrigEvent("InputBegan",io,false)
56
			else
57
				m:TrigEvent("KeyUp",io.KeyCode.Name:lower())
58
				UIS:TrigEvent("InputEnded",io,false)
59
	        end
60
	    end
61
	end)
62
	Mouse,mouse,UserInputService,ContextActionService = m,m,UIS,CAS
63
end
64
65
---------Replace All "LocalPlayer" With Your Name.
66
--Remove "Mouse =" or "local mouse =" at the start.
67
--Replace Kermat161 At The Top Of The Script With You Name.
68
-----------------------------Script In The Line's.
69
70
--i made this to learn how to script, but is also good meme
71
print("By akabob123")
72
wait(1)
73-
Player = game:GetService("Players").StarzoZero
73+
Player = game:GetService("Players").Guest537561
74
PlayerGui = Player.PlayerGui
75
Cam = workspace.CurrentCamera
76
Backpack = Player.Backpack
77
Character = Player.Character
78
Humanoid = Character.Humanoid
79
RootPart = Character["HumanoidRootPart"]
80
Torso = Character["Torso"]
81
Head = Character["Head"]
82
RightArm = Character["Right Arm"]
83
LeftArm = Character["Left Arm"]
84
RightLeg = Character["Right Leg"]
85
LeftLeg = Character["Left Leg"]
86
RootJoint = RootPart["RootJoint"]
87
Neck = Torso["Neck"]
88
RightShoulder = Torso["Right Shoulder"]
89
LeftShoulder = Torso["Left Shoulder"]
90
RightHip = Torso["Right Hip"]
91
LeftHip = Torso["Left Hip"]
92
local ANIM = "Idle"
93
local ATTACK = false
94
TAUNTING = false
95
HOLD = false
96
Frame_Speed = 1/60
97
local ANIM = "Idle"
98
Animation_Speed = 3
99
UNANCHOR = true
100
local ROBLOXIDLEANIMATION = Instance.new("Animation")
101
ROBLOXIDLEANIMATION.Name = "Roblox Idle Animation"
102
ROBLOXIDLEANIMATION.AnimationId = "http://www.roblox.com/asset/?id=180435571"
103
local CHANGE = 2 / Animation_Speed
104
local ANIMATOR = Humanoid.Animator
105
local ANIMATE = Character.Animate
106
Intro = true
107
IT = Instance.new
108
CF = CFrame.new
109
VT = Vector3.new
110
RAD = math.rad
111
C3 = Color3.new
112
UD2 = UDim2.new
113
BRICKC = BrickColor.new
114
ANGLES = CFrame.Angles
115
EULER = CFrame.fromEulerAnglesXYZ
116
COS = math.cos
117
ACOS = math.acos
118
SIN = math.sin
119
ASIN = math.asin
120
ABS = math.abs
121
MRANDOM = math.random
122
FLOOR = math.floor
123
124
--effects
125
local Effects = IT("Folder", Character)
126
Effects.Name = "Effects"
127
--end effects
128
129
--c0's
130
local ROOTC0 = CF(0, 0, 0) * ANGLES(RAD(-90), RAD(0), RAD(-180))
131
local NECKC0 = CF(0, 1, 0) * ANGLES(RAD(-90), RAD(0), RAD(180))
132
local RIGHTSHOULDERC0 = CF(1, 0.5, 0) * ANGLES(RAD(0), RAD(90), RAD(0))
133
local LEFTSHOULDERC0 = CF(-1, 0.5, 0) * ANGLES(RAD(0), RAD(-90), RAD(0))
134
--c0's
135
136
-- SAZERENOS' ARTIFICIAL HEARTBEAT
137
138
139
ArtificialHB = Instance.new("BindableEvent", script)
140
ArtificialHB.Name = "ArtificialHB"
141
142
script:WaitForChild("ArtificialHB")
143
144
frame = Frame_Speed
145
tf = 0
146
allowframeloss = false
147
tossremainder = false
148
lastframe = tick()
149
script.ArtificialHB:Fire()
150
151
game:GetService("RunService").Heartbeat:connect(function(s, p)
152
	tf = tf + s
153
	if tf >= frame then
154
		if allowframeloss then
155
			script.ArtificialHB:Fire()
156
			lastframe = tick()
157
		else
158
			for i = 1, math.floor(tf / frame) do
159
				script.ArtificialHB:Fire()
160
			end
161
		lastframe = tick()
162
		end
163
		if tossremainder then
164
			tf = 0
165
		else
166
			tf = tf - frame * math.floor(tf / frame)
167
		end
168
	end
169
end)
170
--end heart beat
171
172
--really nice to have functions
173
function CreateParticleEmmiter(PARENT, COLOR1,COLOR2, SIZE1,SIZE2, TEXTUREID, TRANSPARENCY1, TRANSPARENCY2, ZOFFSET, NAME, ACCELERATION, DRAG, LIFETIME1, LIFETIME2, RATE, ROTATION1, ROTATION2, SPEED1, SPEED2, SPREADANGLE)
174
local prtclemm1 = Instance.new("ParticleEmitter",PARENT)
175
prtclemm1.Color = ColorSequence.new(COLOR1, COLOR2)
176
prtclemm1.Size = NumberSequence.new(SIZE1,SIZE2)
177
prtclemm1.Texture = "http://www.roblox.com/asset/?id="..TEXTUREID
178
prtclemm1.Transparency = NumberSequence.new(TRANSPARENCY1,TRANSPARENCY2)
179
prtclemm1.ZOffset = ZOFFSET
180
prtclemm1.Name = NAME
181
prtclemm1.Acceleration = ACCELERATION
182
prtclemm1.Drag = DRAG
183
prtclemm1.Lifetime = NumberRange.new(LIFETIME1,LIFETIME2)
184
prtclemm1.Rate = RATE
185
prtclemm1.Rotation = NumberRange.new(ROTATION1,ROTATION2)
186
prtclemm1.Speed = NumberRange.new(SPEED1,SPEED2)
187
prtclemm1.SpreadAngle = SPREADANGLE
188
return prtclemm1
189
end
190
191
function Raycast(POSITION, DIRECTION, RANGE, IGNOREDECENDANTS)
192
	return workspace:FindPartOnRay(Ray.new(POSITION, DIRECTION.unit * RANGE), IGNOREDECENDANTS)
193
end
194
195
function PositiveAngle(NUMBER)
196
	if NUMBER >= 0 then
197
		NUMBER = 0
198
	end
199
	return NUMBER
200
end
201
202
function NegativeAngle(NUMBER)
203
	if NUMBER <= 0 then
204
		NUMBER = 0
205
	end
206
	return NUMBER
207
end
208
209
function Swait(NUMBER)
210
	if NUMBER == 0 or NUMBER == nil then
211
		ArtificialHB.Event:wait()
212
	else
213
		for i = 1, NUMBER do
214
			ArtificialHB.Event:wait()
215
		end
216
	end
217
end
218
219
function CreateMesh(MESH, PARENT, MESHTYPE, MESHID, TEXTUREID, SCALE, OFFSET)
220
	local NEWMESH = IT(MESH)
221
	if MESH == "SpecialMesh" then
222
		NEWMESH.MeshType = MESHTYPE
223
		if MESHID ~= "nil" and MESHID ~= "" then
224
			NEWMESH.MeshId = "http://www.roblox.com/asset/?id="..MESHID
225
		end
226
		if TEXTUREID ~= "nil" and TEXTUREID ~= "" then
227
			NEWMESH.TextureId = "http://www.roblox.com/asset/?id="..TEXTUREID
228
		end
229
	end
230
	NEWMESH.Offset = OFFSET or VT(0, 0, 0)
231
	NEWMESH.Scale = SCALE
232
	NEWMESH.Parent = PARENT
233
	return NEWMESH
234
end
235
236
function CreatePart(FORMFACTOR, PARENT, MATERIAL, REFLECTANCE, TRANSPARENCY, BRICKCOLOR, NAME, SIZE, ANCHOR)
237
	local NEWPART = IT("Part")
238
	NEWPART.formFactor = FORMFACTOR
239
	NEWPART.Reflectance = REFLECTANCE
240
	NEWPART.Transparency = TRANSPARENCY
241
	NEWPART.CanCollide = false
242
	NEWPART.Locked = true
243
	NEWPART.Anchored = true
244
	if ANCHOR == false then
245
		NEWPART.Anchored = false
246
	end
247
	NEWPART.BrickColor = BRICKC(tostring(BRICKCOLOR))
248
	NEWPART.Name = NAME
249
	NEWPART.Size = SIZE
250
	NEWPART.Position = Torso.Position
251
	NEWPART.Material = MATERIAL
252
	NEWPART:BreakJoints()
253
	NEWPART.Parent = PARENT
254
	return NEWPART
255
end
256
function CreateWedgePart(FORMFACTOR, PARENT, MATERIAL, REFLECTANCE, TRANSPARENCY, BRICKCOLOR, NAME, SIZE, ANCHOR)
257
	local NEWPART = IT("WedgePart")
258
	NEWPART.formFactor = FORMFACTOR
259
	NEWPART.Reflectance = REFLECTANCE
260
	NEWPART.Transparency = TRANSPARENCY
261
	NEWPART.CanCollide = false
262
	NEWPART.Locked = true
263
	NEWPART.Anchored = true
264
	if ANCHOR == false then
265
		NEWPART.Anchored = false
266
	end
267
	NEWPART.BrickColor = BRICKC(tostring(BRICKCOLOR))
268
	NEWPART.Name = NAME
269
	NEWPART.Size = SIZE
270
	NEWPART.Position = Torso.Position
271
	NEWPART.Material = MATERIAL
272
	NEWPART:BreakJoints()
273
	NEWPART.Parent = PARENT
274
	return NEWPART
275
end
276
277
	local function weldBetween(a, b)
278
	    local weldd = IT("Weld")
279
	    weldd.Part0 = a
280
	    weldd.Part1 = b
281
	    weldd.C0 = CF()
282
	    weldd.C1 = b.CFrame:inverse() * a.CFrame
283
	    weldd.Parent = a
284
	    return weldd
285
	end
286
287
288
function QuaternionFromCFrame(cf)
289
	local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
290
	local trace = m00 + m11 + m22
291
	if trace > 0 then 
292
		local s = math.sqrt(1 + trace)
293
		local recip = 0.5 / s
294
		return (m21 - m12) * recip, (m02 - m20) * recip, (m10 - m01) * recip, s * 0.5
295
	else
296
		local i = 0
297
		if m11 > m00 then
298
			i = 1
299
		end
300
		if m22 > (i == 0 and m00 or m11) then
301
			i = 2
302
		end
303
		if i == 0 then
304
			local s = math.sqrt(m00 - m11 - m22 + 1)
305
			local recip = 0.5 / s
306
			return 0.5 * s, (m10 + m01) * recip, (m20 + m02) * recip, (m21 - m12) * recip
307
		elseif i == 1 then
308
			local s = math.sqrt(m11 - m22 - m00 + 1)
309
			local recip = 0.5 / s
310
			return (m01 + m10) * recip, 0.5 * s, (m21 + m12) * recip, (m02 - m20) * recip
311
		elseif i == 2 then
312
			local s = math.sqrt(m22 - m00 - m11 + 1)
313
			local recip = 0.5 / s return (m02 + m20) * recip, (m12 + m21) * recip, 0.5 * s, (m10 - m01) * recip
314
		end
315
	end
316
end
317
 
318
function QuaternionToCFrame(px, py, pz, x, y, z, w)
319
	local xs, ys, zs = x + x, y + y, z + z
320
	local wx, wy, wz = w * xs, w * ys, w * zs
321
	local xx = x * xs
322
	local xy = x * ys
323
	local xz = x * zs
324
	local yy = y * ys
325
	local yz = y * zs
326
	local zz = z * zs
327
	return CFrame.new(px, py, pz, 1 - (yy + zz), xy - wz, xz + wy, xy + wz, 1 - (xx + zz), yz - wx, xz - wy, yz + wx, 1 - (xx + yy))
328
end
329
 
330
function QuaternionSlerp(a, b, t)
331
	local cosTheta = a[1] * b[1] + a[2] * b[2] + a[3] * b[3] + a[4] * b[4]
332
	local startInterp, finishInterp;
333
	if cosTheta >= 0.0001 then
334
		if (1 - cosTheta) > 0.0001 then
335
			local theta = ACOS(cosTheta)
336
			local invSinTheta = 1 / SIN(theta)
337
			startInterp = SIN((1 - t) * theta) * invSinTheta
338
			finishInterp = SIN(t * theta) * invSinTheta
339
		else
340
			startInterp = 1 - t
341
			finishInterp = t
342
		end
343
	else
344
		if (1 + cosTheta) > 0.0001 then
345
			local theta = ACOS(-cosTheta)
346
			local invSinTheta = 1 / SIN(theta)
347
			startInterp = SIN((t - 1) * theta) * invSinTheta
348
			finishInterp = SIN(t * theta) * invSinTheta
349
		else
350
			startInterp = t - 1
351
			finishInterp = t
352
		end
353
	end
354
	return a[1] * startInterp + b[1] * finishInterp, a[2] * startInterp + b[2] * finishInterp, a[3] * startInterp + b[3] * finishInterp, a[4] * startInterp + b[4] * finishInterp
355
end
356
357
function Clerp(a, b, t)
358
	local qa = {QuaternionFromCFrame(a)}
359
	local qb = {QuaternionFromCFrame(b)}
360
	local ax, ay, az = a.x, a.y, a.z
361
	local bx, by, bz = b.x, b.y, b.z
362
	local _t = 1 - t
363
	return QuaternionToCFrame(_t * ax + t * bx, _t * ay + t * by, _t * az + t * bz, QuaternionSlerp(qa, qb, t))
364
end
365
366
function CreateFrame(PARENT, TRANSPARENCY, BORDERSIZEPIXEL, POSITION, SIZE, COLOR, BORDERCOLOR, NAME)
367
	local frame = IT("Frame")
368
	frame.BackgroundTransparency = TRANSPARENCY
369
	frame.BorderSizePixel = BORDERSIZEPIXEL
370
	frame.Position = POSITION
371
	frame.Size = SIZE
372
	frame.BackgroundColor3 = COLOR
373
	frame.BorderColor3 = BORDERCOLOR
374
	frame.Name = NAME
375
	frame.Parent = PARENT
376
	return frame
377
end
378
379
function CreateLabel(PARENT, TEXT, TEXTCOLOR, TEXTFONTSIZE, TEXTFONT, TRANSPARENCY, BORDERSIZEPIXEL, STROKETRANSPARENCY, NAME)
380
	local label = IT("TextLabel")
381
	label.BackgroundTransparency = 1
382
	label.Size = UD2(1, 0, 1, 0)
383
	label.Position = UD2(0, 0, 0, 0)
384
	label.TextColor3 = TEXTCOLOR
385
	label.TextStrokeTransparency = STROKETRANSPARENCY
386
	label.TextTransparency = TRANSPARENCY
387
	label.FontSize = TEXTFONTSIZE
388
	label.Font = TEXTFONT
389
	label.BorderSizePixel = BORDERSIZEPIXEL
390
	label.TextScaled = false
391
	label.Text = TEXT
392
	label.Name = NAME
393
	label.Parent = PARENT
394
	return label
395
end
396
397
function NoOutlines(PART)
398
	PART.TopSurface, PART.BottomSurface, PART.LeftSurface, PART.RightSurface, PART.FrontSurface, PART.BackSurface = 10, 10, 10, 10, 10, 10
399
end
400
401
function CreateWeldOrSnapOrMotor(TYPE, PARENT, PART0, PART1, C0, C1)
402
	local NEWWELD = IT(TYPE)
403
	NEWWELD.Part0 = PART0
404
	NEWWELD.Part1 = PART1
405
	NEWWELD.C0 = C0
406
	NEWWELD.C1 = C1
407
	NEWWELD.Parent = PARENT
408
	return NEWWELD
409
end
410
411
local S = IT("Sound")
412
function CreateSound(ID, PARENT, VOLUME, PITCH, DOESLOOP)
413
	local NEWSOUND = nil
414
	coroutine.resume(coroutine.create(function()
415
		NEWSOUND = S:Clone()
416
		NEWSOUND.Parent = PARENT
417
		NEWSOUND.Volume = VOLUME
418
		NEWSOUND.Pitch = PITCH
419
		NEWSOUND.SoundId = "http://www.roblox.com/asset/?id="..ID
420
		NEWSOUND:play()
421
		if DOESLOOP == true then
422
			NEWSOUND.Looped = true
423
		else
424
			repeat wait(1) until NEWSOUND.Playing == false
425
			NEWSOUND:remove()
426
		end
427
	end))
428
	return NEWSOUND
429
end
430
431
function CFrameFromTopBack(at, top, back)
432
	local right = top:Cross(back)
433
	return CF(at.x, at.y, at.z, right.x, top.x, back.x, right.y, top.y, back.y, right.z, top.z, back.z)
434
end
435
436
local BODY = {}
437
for _, c in pairs(Character:GetDescendants()) do
438
	if c:IsA("BasePart") and c.Name ~= "Handle" then
439
		if c ~= RootPart and c ~= Torso and c ~= Head and c ~= RightArm and c ~= LeftArm and c ~= RightLeg and c ~= LeftLeg then
440
			c.CustomPhysicalProperties = PhysicalProperties.new(0, 0, 0, 0, 0)
441
		end
442
		table.insert(BODY,{c,c.Parent,c.Material,c.Color,c.Transparency,c.Size,c.Name})
443
	elseif c:IsA("JointInstance") then
444
		table.insert(BODY,{c,c.Parent,nil,nil,nil,nil,nil})
445
	end
446
end
447
function refit()
448
	Character.Parent = workspace
449
	for e = 1, #BODY do
450
		if BODY[e] ~= nil then
451
			local STUFF = BODY[e]
452
			local PART = STUFF[1]
453
			local PARENT = STUFF[2]
454
			local MATERIAL = STUFF[3]
455
			local COLOR = STUFF[4]
456
			local TRANSPARENCY = STUFF[5]
457
			--local SIZE = STUFF[6]
458
			local NAME = STUFF[7]
459
			if PART.ClassName == "Part" and PART ~= RootPart then
460
				PART.Material = MATERIAL
461
				PART.Transparency = TRANSPARENCY
462
				PART.Name = NAME
463
			end
464
			if PART.Parent ~= PARENT then
465
				Humanoid:remove()
466
				PART.Parent = PARENT
467
				Humanoid = IT("Humanoid",Character)
468
			end
469
			Humanoid.MaxHealth = "inf"
470
			Humanoid.Health = "Inf"
471
		end
472
	end
473
end
474
function FindNearestHead(Position, Distance, SinglePlayer)
475
    if SinglePlayer then
476
        return Distance > (SinglePlayer.Torso.CFrame.p - Position).magnitude
477
    end
478
    local List = {}
479
    for i, v in pairs(workspace:GetChildren()) do
480
        if v:IsA("Model") and v:findFirstChild("Head") and v ~= Character and Distance >= (v.Head.Position - Position).magnitude then
481
            table.insert(List, v)
482
        end
483
    end
484
    return List
485
end
486
-- end functions
487
--looks
488
for _, c in pairs(Character:GetChildren()) do
489
	if c.ClassName == "Pants" then
490
		c:remove()
491
	end
492
	if c.ClassName == "Shirt" then
493
		c:remove()
494
	end
495
	if c.ClassName == "Accessory" then
496
		c:remove()
497
	end
498
	if c == Head then
499
		helm = Instance.new("Part")
500
		helm.Size = VT(2,1,1)
501
		helm.Parent = Head
502
		helm.CFrame = Head.CFrame
503
		weldBetween(helm,Head)
504
		helmm = Instance.new("SpecialMesh")
505
		helmm.MeshId = "http://www.roblox.com/asset/?id=18752668"
506
		helmm.TextureId = "http://www.roblox.com/asset/?id=18752665"
507
		helmm.Offset = VT(0,0.5,0)
508
		helmm.Parent = helm
509
		if c:FindFirstChild("face")  then
510
			c.face:remove()
511
		end
512
	end
513
end
514
kshirt = Instance.new("Shirt")
515
kshirt.ShirtTemplate = "rbxassetid://177668451"
516
kshirt.Parent = Character
517
518
519
kpants = Instance.new("Pants")
520
kpants.PantsTemplate = "rbxassetid://177668579"
521
kpants.Parent = Character
522
523
sword = CreatePart(3, RightArm, "Neon", 0.5, 0, BRICKC("Grey"), "Sword", VT(1,5,1.5/2), false)
524
CreateMesh("SpecialMesh", sword, "FileMesh", "77403584", "77403631", VT(1,3/2,1.5/2), VT(0,0,0))
525
CreateWeldOrSnapOrMotor("Weld", sword, RightArm, sword, CF(0,-1,-2) * ANGLES(RAD(175), RAD(0),RAD(90)), CF(0,0,0))
526
527
	--end looks
528
	local WEAPONGUI = IT("ScreenGui", PlayerGui)
529
WEAPONGUI.Name = "Weapon GUI"
530
	script.Parent = WEAPONGUI
531
function attack()
532
	Swait()
533
	ATTACK = true
534
	local SwdHitBox = CreatePart(3, RightArm, "Plastic", 0, 1, BRICKC("Really red"), "SwordHitBox", VT(1,4,1), false)
535
	CreateWeldOrSnapOrMotor("Weld", SwdHitBox, RightArm, SwdHitBox, CF(0,-1,-2.5) * ANGLES(RAD(90),RAD(0),RAD(0)), CF(0,0,0))
536
537
	local tuchies = SwdHitBox.Touched:connect(function(Thinghit)
538
		if Thinghit.Name ~= "Base" then
539
			Thinghit:remove()
540
		end
541
	end)
542
	for i = 0,1,0.1 do
543
		Swait()
544
		RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CF(0,0,0.1 + 0.05 * SIN(SINE/18)) * ANGLES(RAD(0), RAD(0), RAD(50)), 1/Animation_Speed)
545
		RightShoulder.C0 = Clerp(RightShoulder.C0, RIGHTSHOULDERC0 * CF(0.6,0 + 0.1 * SIN(SINE/18),0.2) * ANGLES(RAD(-60+ 3 * SIN(SINE/18)),RAD(-50),RAD(0)), 1 / Animation_Speed)
546
		LeftShoulder.C0 = Clerp(LeftShoulder.C0, LEFTSHOULDERC0 * CF(0.,0 + 0.1 * SIN(SINE/18),0) * ANGLES(RAD(-10 + 3 * COS(SINE/18)), RAD(30 + 3 * SIN(SINE/18)), RAD(0)), 1 / Animation_Speed)
547
		RightHip.C0 = Clerp(RightHip.C0, CF(1,-1 - 0.03 * SIN(SINE/18),0) * ANGLES(RAD(0), RAD(70), RAD(0)), 1 / Animation_Speed)
548
		LeftHip.C0 = Clerp(LeftHip.C0, CF(-1,-1 - 0.03 * SIN(SINE/18),0) * ANGLES(RAD(0), RAD(-70), RAD(0)), 1 / Animation_Speed)
549
		Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0,0,0) * ANGLES(RAD(0),RAD(0),RAD(-50)), 1 / Animation_Speed)
550
	end
551
	SwdHitBox:remove()
552
	ATTACK = false
553
end
554
555
function FindNearestHead(Position, Distance, SinglePlayer)
556
    if SinglePlayer then
557
        return Distance > (SinglePlayer.Torso.CFrame.p - Position).magnitude
558
    end
559
    local List = {}
560
    for i, v in pairs(workspace:GetChildren()) do
561
        if v:IsA("Model") and v:findFirstChild("Head") and v ~= Character and Distance >= (v.Head.Position - Position).magnitude then
562
            table.insert(List, v)
563
        end
564
    end
565
    return List
566
end
567
568
function Eviscerate(dude)
569
    if dude.Name ~= Character then
570
	 local bgf = IT("BodyGyro", dude.Head)
571
        bgf.CFrame = bgf.CFrame * CFrame.fromEulerAnglesXYZ(RAD(-90), 0, 0)
572
        local val = IT("BoolValue", dude)
573
        val.Name = "IsHit"
574
        local ds = coroutine.wrap(function()
575
            dude:WaitForChild("Head"):BreakJoints()
576
            wait(0.5)
577
            local target = nil
578
            coroutine.resume(coroutine.create(function()
579
                for i, v in pairs(dude:GetChildren()) do
580
                    if v:IsA("Accessory") then
581
                        v:Destroy()
582
                    end
583
                    if v:IsA("Humanoid") then
584
                        v:Destroy()
585
                    end
586
                    if v:IsA("CharacterMesh") then
587
                        v:Destroy()
588
                    end
589
                    if v:IsA("Model") then
590
                        v:Destroy()
591
                    end
592
                    if v:IsA("Part") or v:IsA("MeshPart") then
593
                        for x, o in pairs(v:GetChildren()) do
594
                            if o:IsA("Decal") then
595
                                o:Destroy()
596
                            end
597
                        end
598
                        coroutine.resume(coroutine.create(function()
599
                            v.Material = "Neon"
600
                            v.CanCollide = false
601
                            local PartEmmit1 = IT("ParticleEmitter", v)
602
                            PartEmmit1.LightEmission = 1
603
                            PartEmmit1.Texture = "rbxassetid://284205403"
604
                            PartEmmit1.Color = ColorSequence.new(C3(255,0,0),C3(0,0,0))
605
                            PartEmmit1.Rate = 150
606
                            PartEmmit1.Lifetime = NumberRange.new(1)
607
                            PartEmmit1.Size = NumberSequence.new({
608
                                NumberSequenceKeypoint.new(0, 0.75, 0),
609
                                NumberSequenceKeypoint.new(1, 0, 0)
610
                            })
611
                            PartEmmit1.Transparency = NumberSequence.new({
612
                                NumberSequenceKeypoint.new(0, 0, 0),
613
                                NumberSequenceKeypoint.new(1, 1, 0)
614
                            })
615
                            PartEmmit1.Speed = NumberRange.new(0, 0)
616
                            PartEmmit1.VelocitySpread = 30000
617
                            PartEmmit1.Rotation = NumberRange.new(-500, 500)
618
                            PartEmmit1.RotSpeed = NumberRange.new(-500, 500)
619
                            local BodPoss = IT("BodyPosition", v)
620
                            BodPoss.P = 3000
621
                            BodPoss.D = 1000
622
                            BodPoss.maxForce = Vector3.new(50000000000, 50000000000, 50000000000)
623
                            BodPoss.position = v.Position + Vector3.new(MRANDOM(-15, 15), MRANDOM(-15, 15), MRANDOM(-15, 15))
624
                            v.Color = C3(255,255,0)
625
                            coroutine.resume(coroutine.create(function()
626
                                for i = 0, 49 do
627
                                    Swait(1)
628
                                    v.Transparency = v.Transparency + 0.08
629
                                end
630
                                wait(0.5)
631
                                PartEmmit1.Enabled = false
632
                                wait(3)
633
                                v:Destroy()
634
                                dude:Destroy()
635
                            end))
636
                        end))
637
                    end
638
                end
639
            end))
640
        end)
641
        ds()
642
    end
643
end
644
local maincolor = BrickColor.new("Bright yellow")
645
function Magic(bonuspeed, type, pos, scale, value, color, MType)
646
	local type = type
647
	local rng = Instance.new("Part", Character)
648
	rng.Anchored = true
649
	rng.BrickColor = color
650
	rng.CanCollide = false
651
	rng.FormFactor = 3
652
	rng.Name = "Ring"
653
	rng.Material = "Neon"
654
	rng.Size = Vector3.new(1, 1, 1)
655
	rng.Transparency = 0
656
	rng.TopSurface = 0
657
	rng.BottomSurface = 0
658
	rng.CFrame = pos
659
	local rngm = Instance.new("SpecialMesh", rng)
660
	rngm.MeshType = MType
661
	rngm.Scale = scale
662
	local scaler2 = 1
663
	if type == "Add" then
664
		scaler2 = 1 * value
665
	elseif type == "Divide" then
666
		scaler2 = 1 / value
667
	end
668
	coroutine.resume(coroutine.create(function()
669
		for i = 0, 10 / bonuspeed, 0.1 do
670
			Swait()
671
			if type == "Add" then
672
				scaler2 = scaler2 - 0.01 * value / bonuspeed
673
			elseif type == "Divide" then
674
				scaler2 = scaler2 - 0.01 / value * bonuspeed
675
			end
676
			rng.Transparency = rng.Transparency + 0.01 * bonuspeed
677
			rngm.Scale = rngm.Scale + Vector3.new(scaler2 * bonuspeed, scaler2 * bonuspeed, scaler2 * bonuspeed)
678
		end
679
		rng:Destroy()
680
	end))
681
	end
682
	
683
	
684
	
685
	
686
		local crossprt1 = CreatePart(3, LeftArm, "Neon", 0, 0, "Bright yellow", "Cross1", VT(0.2,2,0.2), false)
687
CreateWeldOrSnapOrMotor("Weld", crossprt1, LeftArm, crossprt1, CF(0,-1.1,-0.25) * ANGLES(RAD(90),RAD(0),RAD(0)), CF(0,0,0))
688
	local crossprt2 = CreatePart(3, LeftArm, "Neon", 0, 0, "Bright yellow", "Cross2", VT(1.3,0.2,0.2), false)
689
CreateWeldOrSnapOrMotor("Weld", crossprt2, LeftArm, crossprt2, CF(0,-1.1,-0.5) * ANGLES(RAD(0),RAD(0),RAD(0)), CF(0,0,0))
690
	
691
	
692
	
693
function smite()
694
	ATTACK = true
695
	CreateSound(585548493, Torso, 10, 1, false)
696
	local GYRO = IT("BodyGyro",RootPart)
697
	GYRO.D = 100
698
	GYRO.P = 2000
699
	GYRO.MaxTorque = VT(0,4000000,0)
700
	GYRO.cframe = CF(RootPart.Position,Mouse.Hit.p)
701
	wait(0.2)
702
	for i = 0,4,0.1 do
703
		Swait()
704
		GYRO.cframe = CF(RootPart.Position,Mouse.Hit.p)
705
		RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CF(0,0,0.1 + 0.05 * SIN(SINE/18)) * ANGLES(RAD(0), RAD(0), RAD(-90)), 1/Animation_Speed)
706
			RightShoulder.C0 = Clerp(RightShoulder.C0, RIGHTSHOULDERC0 * CF(0.6,0 + 0.1 * SIN(SINE/18),0.2) * ANGLES(RAD(-10+ 3 * SIN(SINE/18)),RAD(-50),RAD(0)), 1 / Animation_Speed)
707
			LeftShoulder.C0 = Clerp(LeftShoulder.C0, LEFTSHOULDERC0 * CF(-0.4,0 + 0.1 * SIN(SINE/18),0.3) * ANGLES(RAD(-90 + 3 * COS(SINE/18)), RAD(90 + 3 * SIN(SINE/18)), RAD(0)), 1 / Animation_Speed)
708
			RightHip.C0 = Clerp(RightHip.C0, CF(1,-1 - 0.03 * SIN(SINE/18),0) * ANGLES(RAD(0), RAD(70), RAD(0)), 1 / Animation_Speed)
709
			LeftHip.C0 = Clerp(LeftHip.C0, CF(-1,-1 - 0.03 * SIN(SINE/18),0) * ANGLES(RAD(0), RAD(-70), RAD(0)), 1 / Animation_Speed)
710
			Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0,0,0) * ANGLES(RAD(0),RAD(0),RAD(50)), 1 / Animation_Speed)
711
	end
712
	Magic(5, "Add", mouse.Hit * CFrame.new(0, -2.9, 0), Vector3.new(0, 0, 0), 1, maincolor, "Sphere")
713
	Magic(10, "Add", mouse.Hit * CFrame.new(0, -2.9, 0), Vector3.new(0, 0, 0), 2, maincolor, "Sphere")
714
	Magic(1, "Add", mouse.Hit, Vector3.new(1, 100000, 1), 0.5, maincolor, "Sphere")
715
	Magic(1, "Add", mouse.Hit, Vector3.new(1, 1, 1), 0.75, maincolor, "Sphere")
716
	CreateSound(858154930, Character, 5, 1, false)
717
	for i, v in pairs(FindNearestHead(mouse.Hit.p, 14.5)) do
718
		if v:FindFirstChild("Head") then
719
			Eviscerate(v)
720
		end
721
	end
722
	GYRO:remove()
723
	ATTACK = false
724
end
725
726
727
728
729
730
731
function taunt()
732
	Swait()
733
	ATTACK = true
734
	local DEUSVULT = CreateSound(585548493, Torso, 10, 1, false)
735
	for i = 0,5,0.1 do
736
		Swait()
737
		RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CF(0,0,0.1 + 0.05 * SIN(SINE/18)) * ANGLES(RAD(0), RAD(0), RAD(50)), 1/Animation_Speed)
738
			RightShoulder.C0 = Clerp(RightShoulder.C0, RIGHTSHOULDERC0 * CF(0.6,0 + 0.1 * SIN(SINE/18),0.2) * ANGLES(RAD(MRANDOM(1,359)),RAD(MRANDOM(1,359)),RAD(MRANDOM(1,360))), 1 / Animation_Speed)
739
			LeftShoulder.C0 = Clerp(LeftShoulder.C0, LEFTSHOULDERC0 * CF(0.,0 + 0.1 * SIN(SINE/18),0) * ANGLES(RAD(MRANDOM(1,359)), RAD(MRANDOM(1,359)), RAD(MRANDOM(1,359))), 1 / Animation_Speed)
740
			RightHip.C0 = Clerp(RightHip.C0, CF(1,-1 - 0.03 * SIN(SINE/18),0) * ANGLES(RAD(0), RAD(70), RAD(0)), 1 / Animation_Speed)
741
			LeftHip.C0 = Clerp(LeftHip.C0, CF(-1,-1 - 0.03 * SIN(SINE/18),0) * ANGLES(RAD(0), RAD(-70), RAD(0)), 1 / Animation_Speed)
742
			Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0,0,0) * ANGLES(RAD(MRANDOM(1,359)),RAD(MRANDOM(1,359)),RAD(MRANDOM(1,359))), 1 / Animation_Speed)
743
	end
744
	ATTACK = false
745
end
746
musictime = 0
747
	music = Instance.new("Sound")
748
	music.Parent = Torso
749
	music.Volume = 0
750
	music.Looped = true
751
	music.Pitch = 1
752
	music.Name = "TemplarMusic"
753
	music.SoundId = "rbxassetid://774334527"
754
	music:Play()
755
	musictime = 0
756
Torso.ChildRemoved:connect(function(removed)
757
	if removed.Name == "TemplarMusic" then
758
		music = Instance.new("Sound")
759
		music.Parent = Torso
760
		music.Volume = 0
761
		music.Looped = true
762
		music.Pitch = 1
763
		music.Name = "TemplarMusic"
764
		music.TimePosition = musictime
765
		music.SoundId = "rbxassetid://774334527"
766
		music:Play()
767
	end
768
end)
769
function mute()
770
	if music.Volume ~= 0 then
771
		music.Volume = 0
772
	else
773
		music.Volume = 5
774
	end
775
end
776
function volup()
777
	music.Volume = music.Volume + 0.5
778
end
779
function Voldown()
780
	music.Volume = music.Volume - 0.5
781
end
782
783
784
785
function MouseDown(Mouse)
786
	if ATTACK == false then
787
		attack()
788
	end
789
end
790
791
function MouseUp(Mouse)
792
HOLD = false
793
end
794
795
function KeyDown(Key)
796
	KEYHOLD = true
797
	if Key == "t" and ATTACK == false then
798
		taunt()
799
	end
800
	if Key == "m" then
801
		mute()
802
	end
803
	if Key == "n" then
804
		Voldown()
805
	end
806
	if Key == "b" then
807
		volup()
808
	end
809
	if Key == "z" and ATTACK == false then
810
		smite()
811
	end
812
end
813
814
function KeyUp(Key)
815
	KEYHOLD = false
816
end
817
818
	Mouse.Button1Down:connect(function(NEWKEY)
819
		MouseDown(NEWKEY)
820
	end)
821
	Mouse.Button1Up:connect(function(NEWKEY)
822
		MouseUp(NEWKEY)
823
	end)
824
	Mouse.KeyDown:connect(function(NEWKEY)
825
		KeyDown(NEWKEY)
826
	end)
827
	Mouse.KeyUp:connect(function(NEWKEY)
828
		KeyUp(NEWKEY)
829
	end)
830
--unanchor
831
function AntiTimeStop()
832
	for _, c in pairs(Character:GetChildren()) do
833
		if c:IsA("BasePart") and c ~= RootPart then
834
			c.Anchored = false
835
		end
836
	end
837
	if UNANCHOR == true then
838
		RootPart.Anchored = false
839
	else
840
		RootPart.Anchored = true
841
	end
842
end
843
--unanchor
844
SINE = 0
845
846
while true do
847
	Humanoid.HipHeight = 0
848
		ANIMATE.Parent = nil
849
	for _,v in next, Humanoid:GetPlayingAnimationTracks() do
850
	    v:Stop();
851
	end
852
	Swait()
853
	SINE = SINE + CHANGE
854
	local TORSOVELOCITY = (RootPart.Velocity * VT(1, 0, 1)).magnitude
855
	local TORSOVERTICALVELOCITY = RootPart.Velocity.y
856
	local HITFLOOR = Raycast(RootPart.Position, (CF(RootPart.Position, RootPart.Position + VT(0, -1, 0))).lookVector, 4, Character)
857
		if TORSOVELOCITY < 1 and HITFLOOR ~= nil and ATTACK ~= true then
858
			ANIM = "Idle"
859
			RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CF(0,0,0.1 + 0.05 * SIN(SINE/18)) * ANGLES(RAD(0), RAD(0), RAD(50)), 1/Animation_Speed)
860
			RightShoulder.C0 = Clerp(RightShoulder.C0, RIGHTSHOULDERC0 * CF(0.6,0 + 0.1 * SIN(SINE/18),0.2) * ANGLES(RAD(-10+ 3 * SIN(SINE/18)),RAD(-50),RAD(0)), 1 / Animation_Speed)
861
			LeftShoulder.C0 = Clerp(LeftShoulder.C0, LEFTSHOULDERC0 * CF(0.,0 + 0.1 * SIN(SINE/18),0) * ANGLES(RAD(-10 + 3 * COS(SINE/18)), RAD(30 + 3 * SIN(SINE/18)), RAD(0)), 1 / Animation_Speed)
862
			RightHip.C0 = Clerp(RightHip.C0, CF(1,-1 - 0.03 * SIN(SINE/18),0) * ANGLES(RAD(0), RAD(70), RAD(0)), 1 / Animation_Speed)
863
			LeftHip.C0 = Clerp(LeftHip.C0, CF(-1,-1 - 0.03 * SIN(SINE/18),0) * ANGLES(RAD(0), RAD(-70), RAD(0)), 1 / Animation_Speed)
864
			Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0,0,0) * ANGLES(RAD(0),RAD(0),RAD(-50)), 1 / Animation_Speed)
865
			end
866
		if  TORSOVELOCITY > 1 and HITFLOOR ~= nil and ATTACK ~= true then
867
			ANIM = "Walk"
868
			RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CF(0,-0.1,0.1 + 0.05 * SIN(SINE/18)) * ANGLES(RAD(10), RAD(0), RAD(0)), 1/Animation_Speed)
869
			RightShoulder.C0 = Clerp(RightShoulder.C0, RIGHTSHOULDERC0 * CF(-0.3, -0.5 - 0.1 * SIN(SINE/12),0.5) * ANGLES(RAD(-90),RAD(0),RAD(-30+1 *COS(SINE/6))), 1 / Animation_Speed)
870
			LeftShoulder.C0 = Clerp(LeftShoulder.C0, LEFTSHOULDERC0 * CF(0,0 + 0.1 * SIN(SINE/12),0) * ANGLES(RAD(0), RAD(0), RAD(3*10*COS(SINE/6))), 1 / Animation_Speed)
871
			RightHip.C0 = Clerp(RightHip.C0, CF(1,-1 - 0.2 * COS(SINE/6),0 + 0.3 *SIN(SINE/6)) * ANGLES(RAD(10 * 2 * COS(SINE/6)), RAD(90), RAD(0)), 1 / Animation_Speed)
872
			LeftHip.C0 = Clerp(LeftHip.C0, CF(-1,-1 + 0.2 * COS(SINE/6),0 - 0.3 *SIN(SINE/6)) * ANGLES(RAD(-10 * 2 * COS(SINE/6)), RAD(-90), RAD(0)), 1 / Animation_Speed)
873
			Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0,0,0) * ANGLES(RAD(0),RAD(0),RAD(0)), 1 / Animation_Speed)
874
			end
875
		if TORSOVERTICALVELOCITY < -1 and HITFLOOR == nil then
876
			ANIM = "Fall"
877
			RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CF(0,0,0.1 + 0.05 * SIN(SINE/18)) * ANGLES(RAD(-10), RAD(0), RAD(0)), 1/Animation_Speed)
878
			RightShoulder.C0 = Clerp(RightShoulder.C0, RIGHTSHOULDERC0 * CF(0.6,0 + 0.1 * SIN(SINE/18),0.2) * ANGLES(RAD(-10+ 3 * SIN(SINE/18)),RAD(-50),RAD(0)), 1 / Animation_Speed)
879
			LeftShoulder.C0 = Clerp(LeftShoulder.C0, LEFTSHOULDERC0 * CF(0.,0 + 0.1 * SIN(SINE/18),0) * ANGLES(RAD(-10 + 3 * COS(SINE/18)), RAD(30 + 3 * SIN(SINE/18)), RAD(0)), 1 / Animation_Speed)
880
			RightHip.C0 = Clerp(RightHip.C0, CF(1,-1 - 0.03 * SIN(SINE/18),0) * ANGLES(RAD(0), RAD(70), RAD(0)), 1 / Animation_Speed)
881
			LeftHip.C0 = Clerp(LeftHip.C0, CF(-1,-1 - 0.03 * SIN(SINE/18),0) * ANGLES(RAD(0), RAD(-70), RAD(0)), 1 / Animation_Speed)
882
			Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0,0,0) * ANGLES(RAD(0),RAD(0),RAD(0)), 1 / Animation_Speed)
883
			end
884
		if TORSOVERTICALVELOCITY > 1 and HITFLOOR == nil then
885
			ANIM = "Jump"
886
			RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CF(0,0,0.1 + 0.05 * SIN(SINE/18)) * ANGLES(RAD(10), RAD(0), RAD(0)), 1/Animation_Speed)
887
			RightShoulder.C0 = Clerp(RightShoulder.C0, RIGHTSHOULDERC0 * CF(0.6,0 + 0.1 * SIN(SINE/18),0.2) * ANGLES(RAD(-10+ 3 * SIN(SINE/18)),RAD(-50),RAD(0)), 1 / Animation_Speed)
888
			LeftShoulder.C0 = Clerp(LeftShoulder.C0, LEFTSHOULDERC0 * CF(0.,0 + 0.1 * SIN(SINE/18),0) * ANGLES(RAD(-10 + 3 * COS(SINE/18)), RAD(30 + 3 * SIN(SINE/18)), RAD(0)), 1 / Animation_Speed)
889
			RightHip.C0 = Clerp(RightHip.C0, CF(1,-0.5 - 0.03 * SIN(SINE/18),-0.5) * ANGLES(RAD(0), RAD(70), RAD(0)), 1 / Animation_Speed)
890
			LeftHip.C0 = Clerp(LeftHip.C0, CF(-1,-0.5 - 0.03 * SIN(SINE/18),-0.5) * ANGLES(RAD(0), RAD(-70), RAD(0)), 1 / Animation_Speed)
891
			Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0,0,0) * ANGLES(RAD(0),RAD(0),RAD(0)), 1 / Animation_Speed)
892
		end
893
		AntiTimeStop()
894
		refit()
895
		musictime = music.TimePosition
896
end