View difference between Paste ID: 0Kihpems and BebbcbhC
SHOW: | | - or go back to the newest paste.
1
--Sans?
2
3
4
Player = game:GetService("Players").LocalPlayer
5
pls = game:GetService'Players'
6
rs = game:GetService'RunService'
7
uinps = game:GetService'UserInputService'
8
lp = pls.LocalPlayer
9
c = lp.Character
10
human = c.Humanoid
11
PlayerGui = Player.PlayerGui
12
Cam = workspace.CurrentCamera
13
Backpack = Player.Backpack
14
Character = Player.Character
15
Humanoid = Character.Humanoid
16
Mouse = Player:GetMouse()
17
RootPart = Character["HumanoidRootPart"]
18
Torso = Character["Torso"]
19
Head = Character["Head"]
20
RightArm = Character["Right Arm"]
21
LeftArm = Character["Left Arm"]
22
RightLeg = Character["Right Leg"]
23
LeftLeg = Character["Left Leg"]
24
RootJoint = RootPart["RootJoint"]
25
Neck = Torso["Neck"]
26
RightShoulder = Torso["Right Shoulder"]
27
LeftShoulder = Torso["Left Shoulder"]
28
RightHip = Torso["Right Hip"]
29
LeftHip = Torso["Left Hip"]
30
local sick = Instance.new("Sound",Character)
31
sick.SoundId = "rbxassetid://531711813"
32
sick.Looped = true
33
sick.Pitch = 1
34
sick.Volume = 1
35
Head:ClearAllChildren()
36
 
37
        numLerp = function(start, goal, alpha)
38
                return(((goal - start) * alpha) + start)
39
        end
40
 
41
        CFrameZero = function()
42
                return CFrame.new(Vector3.new())
43
        end
44
 
45
        rad = function(value)
46
                return math.rad(value)
47
        end
48
 
49
        CFAngles = function(Vector)
50
                return CFrame.Angles(rad(Vector.x),rad(Vector.y),rad(Vector.z))
51
        end
52
 
53
54
 
55
        AnimStat = {
56
                lerpSpeed = .2;
57
                lerpSpeed2 = .35;
58
                lerpTween = 0;
59
        }
60
 
61
        Joints = {
62
                c.HumanoidRootPart.RootJoint;
63
                c.Torso.Neck;
64
                c.Torso['Left Shoulder'];
65
                c.Torso['Right Shoulder'];
66
                c.Torso['Left Hip'];
67
                c.Torso['Right Hip'];
68
        }
69
 
70
        JointTargets = {
71
                CFrameZero();
72
                CFrameZero();
73
                CFrameZero();
74
                CFrameZero();
75
                CFrameZero();
76
                CFrameZero();
77
        }
78
 
79
80
81
local tor = Instance.new("CharacterMesh")
82
tor.Parent = Character
83
tor.Name = "Bones"
84
tor.BodyPart = "Torso"
85
tor.MeshId = "36780113"
86
tor.OverlayTextureId = "36780292"
87
 
88
local tor = Instance.new("CharacterMesh")
89
tor.Parent = Character
90
tor.Name = "Bones"
91
tor.BodyPart = "LeftLeg"
92
tor.MeshId = "36780079"
93
tor.OverlayTextureId = "36780292"
94
 
95
local tor = Instance.new("CharacterMesh")
96
tor.Parent = Character
97
tor.Name = "Bones"
98
tor.BodyPart = "RightLeg"
99
tor.MeshId = "36780195"
100
tor.OverlayTextureId = "36780292"
101
 
102
local tor = Instance.new("CharacterMesh")
103
tor.Parent = Character
104
tor.Name = "Bones"
105
tor.BodyPart = "RightArm"
106
tor.MeshId = "36780156"
107
tor.OverlayTextureId = "36780292"
108
 
109
local tor = Instance.new("CharacterMesh")
110
tor.Parent = Character
111
tor.Name = "Bones"
112
tor.BodyPart = "LeftArm"
113
tor.MeshId = "36780032"
114
tor.OverlayTextureId = "36780292"
115
 
116
local tor = Instance.new("SpecialMesh")
117
tor.Scale = Vector3.new(1,1,1)
118
tor.MeshType = "FileMesh"
119
tor.MeshId = "http://www.roblox.com/asset/?id=36869983"
120
tor.TextureId = "rbxassetid://36869975"
121
tor.Parent = Head
122
123
        prepareCharacter = function()
124
                local transPoints = {
125
                        NumberSequenceKeypoint.new(0,.819,.0375),
126
                        NumberSequenceKeypoint.new(.207,.594,.0187),
127
                        NumberSequenceKeypoint.new(.4,.55,.031),
128
                        NumberSequenceKeypoint.new(.57,.619,.05),
129
                        NumberSequenceKeypoint.new(.76,.8,.0375),
130
                        NumberSequenceKeypoint.new(1,1,0),
131
                }
132
                local sizePoints = {
133
                        NumberSequenceKeypoint.new(0,.687,0),
134
                        NumberSequenceKeypoint.new(.111,.875,0),
135
                        NumberSequenceKeypoint.new(.327,1.19,0),
136
                        NumberSequenceKeypoint.new(.646,1.56,0),
137
                        NumberSequenceKeypoint.new(.805,1.37,0),
138
                        NumberSequenceKeypoint.new(.905,1.06,0),
139
                        NumberSequenceKeypoint.new(.968,.938,0),
140
                        NumberSequenceKeypoint.new(.984,1.13,0),
141
                        NumberSequenceKeypoint.new(1,1.62,0),
142
                }
143
                local Size = NumberSequence.new(sizePoints)
144
                local Transparency = NumberSequence.new(transPoints)
145
                rayModel = Instance.new("Model",c)
146
                efxBlock = Instance.new("Part",c)
147
                efxBlock.BrickColor = BrickColor.new("Cyan")
148
                efxBlock.Material = "Neon"
149
                efxBlock.FormFactor = "Custom"
150
                efxBlock.Transparency = .3
151
                efxBlock.Size = Vector3.new(.3,.3,.3)
152
                local mesh = Instance.new("SpecialMesh",efxBlock)
153
                mesh.MeshType = Enum.MeshType.Sphere
154
                mesh.Scale = Vector3.new(1,1,1)
155
                light = Instance.new("PointLight",c.Head)
156
                light.Range = 10
157
                light.Color = Color3.new(0,200/255,1)
158
                light.Shadows = false
159
                local particles = Instance.new("ParticleEmitter",efxBlock)
160
                particles.Color = ColorSequence.new(Color3.new(0,0,225/255),Color3.new(20/255,190/255,205/255))
161
                particles.LightEmission = .95
162
                particles.Size = Size
163
                particles.Name = "Fire"
164
                particles.Transparency = Transparency
165
                particles.LockedToPart = true
166
                particles.VelocityInheritance = .5
167
                particles.LockedToPart = true
168
                particles.Rate = 70
169
                particles.Texture = "rbxassetid://56561915"
170
                particles.Lifetime = NumberRange.new(2,2)
171
                particles.RotSpeed = NumberRange.new(100,100)
172
                particles.Speed = NumberRange.new(7,7)
173
                script.Parent = efxBlock
174
                fire = particles
175
                local offset = Vector3.new(-0.11, .23, -0.5)
176
                local weld = Instance.new("Weld",c.Head)
177
                weld.Part0 = c.Head
178
                weld.Part1 = efxBlock
179
                weld.C0 = CFrame.new(offset) * CFrame.Angles(math.rad(-40),math.rad(10),math.rad(40))
180
                efxBlock.Parent = c
181
                local music = Instance.new("Sound",c)
182
                music.SoundId = "rbxassetid://316012176"
183
                music.Looped = true
184
                music.Volume = 0
185
                fight = music
186
                local music2 = Instance.new("Sound",c)
187
                music2.SoundId = "rbxassetid://316014309"
188
                music2.Looped = true
189
                music2.Volume = 0
190
                sans = music2
191-
                pointGyro = Instance.new("BodyGyro",c.HumanoidRootPart)
191+
             end
192-
                pointGyro.P = 1e7
192+
193-
                pointGyro.D = 1e3
193+
prepareCharacter()
194-
                pointGyro.MaxTorque = Vector3.new(0,1e7,0)
194+
195-
                animator = c.Humanoid:FindFirstChild("Animator")
195+
196-
                if animator then
196+
197-
                        animator:Destroy()
197+
198-
                end
198+
199-
                c.Torso.roblox:Destroy()
199+
200-
                for i,v in pairs (c.Head:children()) do
200+
201-
                        if v.ClassName == "Sound" then
201+
202-
                                v:Destroy()
202+
203-
                        end
203+
204-
                end
204+
205-
                for i = 1,#Joints do
205+
206-
                        Joints[i].C1 = CFrame.new(Vector3.new())
206+
207-
                end
207+
208-
                human.WalkSpeed = 0
208+
209-
                human.JumpPower = 0
209+
210
else
211
for i=0,num do
212-
        uinps.InputBegan:connect(function(InputObject)
212+
213-
                if InputObject.KeyCode == Enum.KeyCode.K and Debounces.isTyping == false then
213+
214-
                        Debounces.isPassive = not Debounces.isPassive
214+
215-
                end
215+
216-
        end)
216+
217
    local filteredMessages = { ['____'] = '___' };
218-
        setJointCFrames = function(table)
218+
219-
                for i = 1,#table do
219+
220-
                        JointTargets[i] = table[i]
220+
221-
                end
221+
222-
                AnimationCycles = 0
222+
223
                if (filteredMessages [objText] and filteredMessages [objText] ~= objText) then
224
                    obj.Text = filteredMessages [objText];
225-
        setLerp = function(speed)
225+
226-
                AnimStat.lerpSpeed = speed
226+
227
                   
228
                    local filtered = game:service 'Chat':FilterStringForBroadcast (objText, game:service 'Players'.localPlayer);
229-
        setTween = function(tween)
229+
230-
                AnimStat.lerpTween = tween
230+
231
                    filteredMessages [filtered] = filtered;
232
                   
233-
        takeDamage = function(position,damage,distance,platformStand)
233+
234-
                for i,v in pairs (pls:children()) do
234+
235-
                        if v.ClassName == "Player" and v:FindFirstChild("Character") then
235+
236-
                                local torso = v.Character:FindFirstChild("Torso")
236+
237-
                                if torso and (torso.Position - position).magnitude < distance then
237+
238-
                                        v.Character.Humanoid:TakeDamage(damage)
238+
239-
                                        if platformStand == true then
239+
240-
                                                v.Character.PlatformStand = platformStand
240+
241-
                                        end
241+
242-
                                end
242+
243-
                        end
243+
244-
                end
244+
245
                obj:getPropertyChangedSignal ('Parent'):connect (function () onPropertyChanged (obj) end);
246
                obj:getPropertyChangedSignal ('Text'):connect (function() onPropertyChanged (obj) end);
247
            end;
248-
        prepareCharacter()
248+
249
            return obj;
250
        end;
251
    };
252
end;
253
plr = game.Players.LocalPlayer
254
mouse = plr:GetMouse()
255
part = nil
256
bp = nil
257
particles = nil
258
base = Instance.new("ScreenGui",plr.PlayerGui)
259
bbg = Instance.new("BillboardGui",plr.Character.Head)
260
bbg.Size = UDim2.new(0,200,0,50)
261
bbg.StudsOffset = Vector3.new(0,1.5,3)
262
bbgTl = Instance.new("TextLabel",bbg)
263
bbgTl.BackgroundTransparency = 1
264
bbgTl.Size = UDim2.new(10,0,1,0)
265
bbgTl.Position = UDim2.new(-4.5,0,0,0)
266
bbgTl.Font = "Cartoon"
267
bbgTl.Text = " "
268
bbgTl.TextSize = 42
269
bbgTl.TextStrokeColor3 = Color3.new(0,0,0)
270
bbgTl.TextStrokeTransparency = 0
271
bbgTl.TextWrapped = true
272
plr.Chatted:connect(function(msg)
273
    bbgTl.Text = msg
274
    wait(5)
275
    if bbgTl.Text == msg then
276
        bbgTl.Text = " "
277
while true do
278
bbgTl.TextColor3 = Color3.new (math.random(), math.random(), math.random(), math.random(), math.random(), math.random(), math.random(), math.random(), math.random(), math.random(), math.random())
279
wait(.1)
280
end
281
    end
282
end)
283
function thread(f)
284
  coroutine.resume(coroutine.create(f))
285
end
286
function clerp(a, b, t) 
287
	local qa = {
288
		QuaternionFromCFrame(a)
289
	}
290
	local qb = {
291
		QuaternionFromCFrame(b)
292
	} 
293
	local ax, ay, az = a.x, a.y, a.z 
294
	local bx, by, bz = b.x, b.y, b.z
295
	local _t = 1 - t
296
	return QuaternionToCFrame(_t * ax + t * bx, _t * ay + t * by, _t * az + t * bz, QuaternionSlerp(qa, qb, t)) 
297
end
298
function QuaternionFromCFrame(cf)
299
  local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
300
  local trace = m00 + m11 + m22
301
  if trace > 0 then
302
    local s = math.sqrt(1 + trace)
303
    local recip = 0.5 / s
304
    return (m21 - m12) * recip, (m02 - m20) * recip, (m10 - m01) * recip, s * 0.5
305
  else
306
    local i = 0
307
    if m00 < m11 then
308
      i = 1
309
    end
310
    if m22 > (i == 0 and m00 or m11) then
311
      i = 2
312
    end
313
    if i == 0 then
314
      local s = math.sqrt(m00 - m11 - m22 + 1)
315
      local recip = 0.5 / s
316
      return 0.5 * s, (m10 + m01) * recip, (m20 + m02) * recip, (m21 - m12) * recip
317
    elseif i == 1 then
318
      local s = math.sqrt(m11 - m22 - m00 + 1)
319
      local recip = 0.5 / s
320
      return (m01 + m10) * recip, 0.5 * s, (m21 + m12) * recip, (m02 - m20) * recip
321
    elseif i == 2 then
322
      local s = math.sqrt(m22 - m00 - m11 + 1)
323
      local recip = 0.5 / s
324
      return (m02 + m20) * recip, (m12 + m21) * recip, 0.5 * s, (m10 - m01) * recip
325
    end
326
  end
327
end
328
function QuaternionToCFrame(px, py, pz, x, y, z, w)
329
  local xs, ys, zs = x + x, y + y, z + z
330
  local wx, wy, wz = w * xs, w * ys, w * zs
331
  local xx = x * xs
332
  local xy = x * ys
333
  local xz = x * zs
334
  local yy = y * ys
335
  local yz = y * zs
336
  local zz = z * zs
337
  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))
338
end
339
function QuaternionSlerp(a, b, t)
340
  local cosTheta = a[1] * b[1] + a[2] * b[2] + a[3] * b[3] + a[4] * b[4]
341
  local startInterp, finishInterp
342
  if cosTheta >= 1.0E-4 then
343
    if 1 - cosTheta > 1.0E-4 then
344
      local theta = math.acos(cosTheta)
345
      local invSinTheta = 1 / math.sin(theta)
346
      startInterp = math.sin((1 - t) * theta) * invSinTheta
347
      finishInterp = math.sin(t * theta) * invSinTheta
348
    else
349
      startInterp = 1 - t
350
      finishInterp = t
351
    end
352
  elseif 1 + cosTheta > 1.0E-4 then
353
    local theta = math.acos(-cosTheta)
354
    local invSinTheta = 1 / math.sin(theta)
355
    startInterp = math.sin((t - 1) * theta) * invSinTheta
356
    finishInterp = math.sin(t * theta) * invSinTheta
357
  else
358
    startInterp = t - 1
359
    finishInterp = t
360
  end
361
  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
362
end
363
function rayCast(Position, Direction, Range, Ignore)
364
  return game:service("Workspace"):FindPartOnRay(Ray.new(Position, Direction.unit * (Range or 999.999)), Ignore)
365
end
366
367
wait()
368
local plr = game:service'Players'.LocalPlayer
369
local char = plr.Character
370
local hum = char.Humanoid
371
local ra = char["Right Arm"]
372
local la= char["Left Arm"]
373
local rl= char["Right Leg"]
374
local ll = char["Left Leg"]
375
local hed = char.Head
376
local root = char.HumanoidRootPart
377
local rootj = root.RootJoint
378
local tors = char.Torso
379
local mouse = plr:GetMouse()
380
local RootCF = CFrame.fromEulerAnglesXYZ(-1.57, 0, 3.14)
381
local RHCF = CFrame.fromEulerAnglesXYZ(0, 1.6, 0)
382
local LHCF = CFrame.fromEulerAnglesXYZ(0, -1.6, 0)
383
local maincolor = BrickColor.new("Magenta")
384
cf = CFrame.new
385
angles = CFrame.Angles
386
attack = false
387
euler=CFrame.fromEulerAnglesXYZ
388
equipped = false
389
necko=cf(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
390
RSH, LSH = nil, nil 
391
RW = Instance.new("Weld") 
392
LW = Instance.new("Weld")
393
RH = tors["Right Hip"]
394
LH = tors["Left Hip"]
395
RSH = tors["Right Shoulder"] 
396
LSH = tors["Left Shoulder"] 
397
RSH.Parent = nil 
398
LSH.Parent = nil 
399
RW.Name = "RW"
400
RW.Part0 = tors 
401
RW.C0 = CFrame.new(1.5, 0.5, 0)
402
RW.C1 = CFrame.new(0, 0.5, 0) 
403
RW.Part1 = ra
404
RW.Parent = tors 
405
LW.Name = "LW"
406
LW.Part0 = tors 
407
LW.C0 = CFrame.new(-1.5, 0.5, 0)
408
LW.C1 = CFrame.new(0, 0.5, 0) 
409
LW.Part1 = la
410
LW.Parent = tors
411
print('User is '..plr.Name)
412
Effects = {}
413
414
	
415
ArtificialHB = Instance.new("BindableEvent", script)
416
ArtificialHB.Name = "Heartbeat"
417
418
script:WaitForChild("Heartbeat")
419
420
frame = 1 / 60
421
tf = 0
422
allowframeloss = false
423
tossremainder = false
424
lastframe = tick()
425
script.Heartbeat:Fire()
426
427
game:GetService("RunService").Heartbeat:connect(function(s, p)
428
	tf = tf + s
429
	if tf >= frame then
430
		if allowframeloss then
431
			script.Heartbeat:Fire()
432
			lastframe = tick()
433
		else
434
			for i = 1, math.floor(tf / frame) do
435
				script.Heartbeat:Fire()
436
			end
437
			lastframe = tick()
438
		end
439
		if tossremainder then
440
			tf = 0
441
		else
442
			tf = tf - frame * math.floor(tf / frame)
443
		end
444
	end
445
end)
446
local RbxUtility = LoadLibrary("RbxUtility")
447
local Create = RbxUtility.Create
448
449
function Damage(Part, hit, minim, maxim, knockback, Type, Property, Delay, HitSound, HitPitch)
450
	if hit.Parent == nil then
451
		return
452
	end
453
	local h = hit.Parent:FindFirstChildOfClass("Humanoid")
454
	for _, v in pairs(hit.Parent:children()) do
455
		if v:IsA("Humanoid") then
456
			h = v
457
		end
458
	end
459
         if h ~= nil and hit.Parent.Name ~= char.Name and hit.Parent:FindFirstChild("UpperTorso") ~= nil then
460
         warn'No R15 allowed'
461
         hit.Parent:FindFirstChild("Head"):BreakJoints()
462
         end
463
464
	if h ~= nil and hit.Parent.Name ~= char.Name and hit.Parent:FindFirstChild("Torso") ~= nil then
465
		if hit.Parent:findFirstChild("DebounceHit") ~= nil then
466
			if hit.Parent.DebounceHit.Value == true then
467
				return
468
			end
469
		end
470
         if insta == true then
471
         hit.Parent:FindFirstChild("Head"):BreakJoints()
472
         end
473
		local c = Create("ObjectValue"){
474
			Name = "creator",
475
			Value = game:service("Players").LocalPlayer,
476
			Parent = h,
477
		}
478
		game:GetService("Debris"):AddItem(c, .5)
479
		if HitSound ~= nil and HitPitch ~= nil then
480
			CFuncs.Sound.Create(HitSound, hit, 1, HitPitch) 
481
		end
482
		local Damage = math.random(minim, maxim)
483
		local blocked = false
484
		local block = hit.Parent:findFirstChild("Block")
485
		if block ~= nil then
486
			if block.className == "IntValue" then
487
				if block.Value > 0 then
488
					blocked = true
489
					block.Value = block.Value - 1
490
					print(block.Value)
491
				end
492
			end
493
		end
494
		if blocked == false then
495
			h.Health = h.Health - Damage
496
			ShowDamage((Part.CFrame * CFrame.new(0, 0, (Part.Size.Z / 2)).p + Vector3.new(0, 1.5, 0)), -Damage, 1.5, tors.BrickColor.Color)
497
		else
498
			h.Health = h.Health - (Damage / 2)
499
			ShowDamage((Part.CFrame * CFrame.new(0, 0, (Part.Size.Z / 2)).p + Vector3.new(0, 1.5, 0)), -Damage, 1.5, tors.BrickColor.Color)
500
		end
501
		if Type == "Knockdown" then
502
			local hum = hit.Parent.Humanoid
503
			hum.PlatformStand = true
504
			coroutine.resume(coroutine.create(function(HHumanoid)
505
				swait(1)
506
				HHumanoid.PlatformStand = false
507
			end), hum)
508
			local angle = (hit.Position - (Property.Position + Vector3.new(0, 0, 0))).unit
509
			local bodvol = Create("BodyVelocity"){
510
				velocity = angle * knockback,
511
				P = 5000,
512
				maxForce = Vector3.new(8e+003, 8e+003, 8e+003),
513
				Parent = hit,
514
			}
515
			local rl = Create("BodyAngularVelocity"){
516
				P = 3000,
517
				maxTorque = Vector3.new(500000, 500000, 500000) * 50000000000000,
518
				angularvelocity = Vector3.new(math.random(-10, 10), math.random(-10, 10), math.random(-10, 10)),
519
				Parent = hit,
520
			}
521
			game:GetService("Debris"):AddItem(bodvol, .5)
522
			game:GetService("Debris"):AddItem(rl, .5)
523
		elseif Type == "Normal" then
524
			local vp = Create("BodyVelocity"){
525
				P = 500,
526
				maxForce = Vector3.new(math.huge, 0, math.huge),
527
				velocity = Property.CFrame.lookVector * knockback + Property.Velocity / 1.05,
528
			}
529
			if knockback > 0 then
530
				vp.Parent = hit.Parent.Torso
531
			end
532
			game:GetService("Debris"):AddItem(vp, .5)
533
		elseif Type == "Up" then
534
			local bodyVelocity = Create("BodyVelocity"){
535
				velocity = Vector3.new(0, 20, 0),
536
				P = 5000,
537
				maxForce = Vector3.new(8e+003, 8e+003, 8e+003),
538
				Parent = hit,
539
			}
540
			game:GetService("Debris"):AddItem(bodyVelocity, .5)
541
		elseif Type == "DarkUp" then
542
			coroutine.resume(coroutine.create(function()
543
				for i = 0, 1, 0.1 do
544
					swait()
545
					Effects.Block.Create(BrickColor.new("Black"), hit.Parent.Torso.CFrame, 5, 5, 5, 1, 1, 1, .08, 1)
546
				end
547
			end))
548
			local bodyVelocity = Create("BodyVelocity"){
549
				velocity = Vector3.new(0, 20, 0),
550
				P = 5000,
551
				maxForce = Vector3.new(8e+003, 8e+003, 8e+003),
552
				Parent = hit,
553
			}
554
			game:GetService("Debris"):AddItem(bodyVelocity, 1)
555
		elseif Type == "Snare" then
556
			local bp = Create("BodyPosition"){
557
				P = 2000,
558
				D = 100,
559
				maxForce = Vector3.new(math.huge, math.huge, math.huge),
560
				position = hit.Parent.Torso.Position,
561
				Parent = hit.Parent.Torso,
562
			}
563
			game:GetService("Debris"):AddItem(bp, 1)
564
		elseif Type == "Freeze" then
565
			local BodPos = Create("BodyPosition"){
566
				P = 50000,
567
				D = 1000,
568
				maxForce = Vector3.new(math.huge, math.huge, math.huge),
569
				position = hit.Parent.Torso.Position,
570
				Parent = hit.Parent.Torso,
571
			}
572
			local BodGy = Create("BodyGyro") {
573
				maxTorque = Vector3.new(4e+005, 4e+005, 4e+005) * math.huge ,
574
				P = 20e+003,
575
				Parent = hit.Parent.Torso,
576
				cframe = hit.Parent.Torso.CFrame,
577
			}
578
			hit.Parent.Torso.Anchored = true
579
			coroutine.resume(coroutine.create(function(Part) 
580
				swait(1.5)
581
				Part.Anchored = false
582
			end), hit.Parent.Torso)
583
			game:GetService("Debris"):AddItem(BodPos, 3)
584
			game:GetService("Debris"):AddItem(BodGy, 3)
585
		end
586
		local debounce = Create("BoolValue"){
587
			Name = "DebounceHit",
588
			Parent = hit.Parent,
589
			Value = true,
590
		}
591
		game:GetService("Debris"):AddItem(debounce, Delay)
592
		c = Create("ObjectValue"){
593
			Name = "creator",
594
			Value = Player,
595
			Parent = h,
596
		}
597
		game:GetService("Debris"):AddItem(c, .5)
598
	end
599
end
600
601
function ShowDamage(Pos, Text, Time, Color)
602
	local Rate = (1 / 30)
603
	local Pos = (Pos or Vector3.new(0, 0, 0))
604
	local Text = (Text or "")
605
	local Time = (Time or 2)
606
	local Color = (Color or Color3.new(1, 0, 1))
607
	local EffectPart = CFuncs.Part.Create(workspace, "SmoothPlastic", 0, 1, BrickColor.new(Color), "Effect", Vector3.new(0, 0, 0))
608
	EffectPart.Anchored = true
609
	local BillboardGui = Create("BillboardGui"){
610
		Size = UDim2.new(3, 0, 3, 0),
611
		Adornee = EffectPart,
612
		Parent = EffectPart,
613
	}
614
	local TextLabel = Create("TextLabel"){
615
		BackgroundTransparency = 1,
616
		Size = UDim2.new(1, 0, 1, 0),
617
		Text = Text,
618
		Font = "Highway",
619
		TextColor3 = Color,
620
		TextScaled = true,
621
		Parent = BillboardGui,
622
	}
623
	game.Debris:AddItem(EffectPart, (Time))
624
	EffectPart.Parent = game:GetService("Workspace")
625
	delay(0, function()
626
		local Frames = (Time / Rate)
627
		for Frame = 1, Frames do
628
			wait(Rate)
629
			local Percent = (Frame / Frames)
630
			EffectPart.CFrame = CFrame.new(Pos) + Vector3.new(0, Percent, 0)
631
			TextLabel.TextTransparency = Percent
632
		end
633
		if EffectPart and EffectPart.Parent then
634
			EffectPart:Destroy()
635
		end
636
	end)
637
end
638
function MagnitudeDamage(Part, Magnitude, MinimumDamage, MaximumDamage, KnockBack, Type, HitSound, HitPitch)
639
	for _, c in pairs(workspace:children()) do
640
		local hum = c:findFirstChild("Humanoid")
641
		if hum ~= nil then
642
			local head = c:findFirstChild("Torso") or c:findFirstChild("UpperTorso") or c:FindFirstChild('LowerTorso')
643
			if head ~= nil then
644
				local targ = head.Position - Part.Position
645
				local mag = targ.magnitude
646
				if mag <= Magnitude and c.Name ~= plr.Name then 
647
					Damage(head, head, MinimumDamage, MaximumDamage, KnockBack, Type, root, .1, "rbxassetid://" .. HitSound, HitPitch)
648
				end
649
			end
650
		end
651
	end
652
end
653
CFuncs = {
654
  Part = {
655
    Create = function(Parent, Material, Reflectance, Transparency, BColor, Name, Size)
656
      local Part = Create("Part")({
657
        Parent = Parent,
658
        Reflectance = Reflectance,
659
        Transparency = Transparency,
660
        CanCollide = false,
661
        Locked = true,
662
        BrickColor = BrickColor.new(tostring(BColor)),
663
        Name = Name,
664
        Size = Size,
665
        Material = Material
666
      })
667
      RemoveOutlines(Part)
668
      return Part
669
    end
670
  },
671
  Mesh = {
672
    Create = function(Mesh, Part, MeshType, MeshId, OffSet, Scale)
673
      local Msh = Create(Mesh)({
674
        Parent = Part,
675
        Offset = OffSet,
676
        Scale = Scale
677
      })
678
      if Mesh == "SpecialMesh" then
679
        Msh.MeshType = MeshType
680
        Msh.MeshId = MeshId
681
      end
682
      return Msh
683
    end
684
  },
685
  Mesh = {
686
    Create = function(Mesh, Part, MeshType, MeshId, OffSet, Scale)
687
      local Msh = Create(Mesh)({
688
        Parent = Part,
689
        Offset = OffSet,
690
        Scale = Scale
691
      })
692
      if Mesh == "SpecialMesh" then
693
        Msh.MeshType = MeshType
694
        Msh.MeshId = MeshId
695
      end
696
      return Msh
697
    end
698
  },
699
  Weld = {
700
    Create = function(Parent, Part0, Part1, C0, C1)
701
      local Weld = Create("Weld")({
702
        Parent = Parent,
703
        Part0 = Part0,
704
        Part1 = Part1,
705
        C0 = C0,
706
        C1 = C1
707
      })
708
      return Weld
709
    end
710
  },
711
  Sound = {
712
    Create = function(id, par, vol, pit)
713
      coroutine.resume(coroutine.create(function()
714
        local S = Create("Sound")({
715
          Volume = vol,
716
          Pitch = pit or 1,
717
          SoundId = id,
718
          Parent = par or workspace
719
        })
720
        wait()
721
        S:play()
722
        game:GetService("Debris"):AddItem(S, 6)
723
      end))
724
    end
725
  },
726
  ParticleEmitter = {
727
    Create = function(Parent, Color1, Color2, LightEmission, Size, Texture, Transparency, ZOffset, Accel, Drag, LockedToPart, VelocityInheritance, EmissionDirection, Enabled, LifeTime, Rate, Rotation, RotSpeed, Speed, VelocitySpread)
728
      local fp = Create("ParticleEmitter")({
729
        Parent = Parent,
730
        Color = ColorSequence.new(Color1, Color2),
731
        LightEmission = LightEmission,
732
        Size = Size,
733
        Texture = Texture,
734
        Transparency = Transparency,
735
        ZOffset = ZOffset,
736
        Acceleration = Accel,
737
        Drag = Drag,
738
        LockedToPart = LockedToPart,
739
        VelocityInheritance = VelocityInheritance,
740
        EmissionDirection = EmissionDirection,
741
        Enabled = Enabled,
742
        Lifetime = LifeTime,
743
        Rate = Rate,
744
        Rotation = Rotation,
745
        RotSpeed = RotSpeed,
746
        Speed = Speed,
747
        VelocitySpread = VelocitySpread
748
      })
749
      return fp
750
    end
751
  }
752
}
753
function RemoveOutlines(part)
754
  part.TopSurface, part.BottomSurface, part.LeftSurface, part.RightSurface, part.FrontSurface, part.BackSurface = 10, 10, 10, 10, 10, 10
755
end
756
function CreatePart(FormFactor, Parent, Material, Reflectance, Transparency, BColor, Name, Size)
757
  local Part = Create("Part")({
758
    formFactor = FormFactor,
759
    Parent = Parent,
760
    Reflectance = Reflectance,
761
    Transparency = Transparency,
762
    CanCollide = false,
763
    Locked = true,
764
    BrickColor = BrickColor.new(tostring(BColor)),
765
    Name = Name,
766
    Size = Size,
767
    Material = Material
768
  })
769
  RemoveOutlines(Part)
770
  return Part
771
end
772
function CreateMesh(Mesh, Part, MeshType, MeshId, OffSet, Scale)
773
  local Msh = Create(Mesh)({
774
    Parent = Part,
775
    Offset = OffSet,
776
    Scale = Scale
777
  })
778
  if Mesh == "SpecialMesh" then
779
    Msh.MeshType = MeshType
780
    Msh.MeshId = MeshId
781
  end
782
  return Msh
783
end
784
function CreateWeld(Parent, Part0, Part1, C0, C1)
785
  local Weld = Create("Weld")({
786
    Parent = Parent,
787
    Part0 = Part0,
788
    Part1 = Part1,
789
    C0 = C0,
790
    C1 = C1
791
  })
792
  return Weld
793
end
794
EffectModel = Instance.new("Model", char)
795
Effects = {
796
  Block = {
797
    Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay, Type)
798
      local prt = CFuncs.Part.Create(EffectModel, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new())
799
      prt.Anchored = true
800
      prt.CFrame = cframe
801
      local msh = CFuncs.Mesh.Create("BlockMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
802
      game:GetService("Debris"):AddItem(prt, 10)
803
      if Type == 1 or Type == nil then
804
        table.insert(Effects, {
805
          prt,
806
          "Block1",
807
          delay,
808
          x3,
809
          y3,
810
          z3,
811
          msh
812
        })
813
      elseif Type == 2 then
814
        table.insert(Effects, {
815
          prt,
816
          "Block2",
817
          delay,
818
          x3,
819
          y3,
820
          z3,
821
          msh
822
        })
823
      else
824
        table.insert(Effects, {
825
          prt,
826
          "Block3",
827
          delay,
828
          x3,
829
          y3,
830
          z3,
831
          msh
832
        })
833
      end
834
    end
835
  },
836
  Sphere = {
837
    Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
838
      local prt = CFuncs.Part.Create(EffectModel, "Neon", 0, 0, brickcolor, "Effect", Vector3.new())
839
      prt.Anchored = true
840
      prt.CFrame = cframe
841
      local msh = CFuncs.Mesh.Create("SpecialMesh", prt, "Sphere", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
842
      game:GetService("Debris"):AddItem(prt, 10)
843
      table.insert(Effects, {
844
        prt,
845
        "Cylinder",
846
        delay,
847
        x3,
848
        y3,
849
        z3,
850
        msh
851
      })
852
    end
853
  },
854
  Cylinder = {
855
    Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
856
      local prt = CFuncs.Part.Create(EffectModel, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new())
857
      prt.Anchored = true
858
      prt.CFrame = cframe
859
      local msh = CFuncs.Mesh.Create("CylinderMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
860
      game:GetService("Debris"):AddItem(prt, 10)
861
      table.insert(Effects, {
862
        prt,
863
        "Cylinder",
864
        delay,
865
        x3,
866
        y3,
867
        z3,
868
        msh
869
      })
870
    end
871
  },
872
  Wave = {
873
    Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
874
      local prt = CFuncs.Part.Create(EffectModel, "Neon", 0, 0, brickcolor, "Effect", Vector3.new())
875
      prt.Anchored = true
876
      prt.CFrame = cframe
877
      local msh = CFuncs.Mesh.Create("SpecialMesh", prt, "FileMesh", "rbxassetid://431164262", Vector3.new(0, 0, 0), Vector3.new(x1 / 60, y1 / 60, z1 / 60))
878
      game:GetService("Debris"):AddItem(prt, 10)
879
      table.insert(Effects, {
880
        prt,
881
        "Cylinder",
882
        delay,
883
        x3 / 60,
884
        y3 / 60,
885
        z3 / 60,
886
        msh
887
      })
888
    end
889
  },
890
  Ring = {
891
    Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
892
      local prt = CFuncs.Part.Create(EffectModel, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new())
893
      prt.Anchored = true
894
      prt.CFrame = cframe
895
      local msh = CFuncs.Mesh.Create("SpecialMesh", prt, "FileMesh", "rbxassetid://3270017", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
896
      game:GetService("Debris"):AddItem(prt, 10)
897
      table.insert(Effects, {
898
        prt,
899
        "Cylinder",
900
        delay,
901
        x3,
902
        y3,
903
        z3,
904
        msh
905
      })
906
    end
907
  },
908
  Break = {
909
    Create = function(brickcolor, cframe, x1, y1, z1)
910
      local prt = CFuncs.Part.Create(EffectModel, "Neon", 0, 0, brickcolor, "Effect", Vector3.new(0.5, 0.5, 0.5))
911
      prt.Anchored = true
912
      prt.CFrame = cframe * CFrame.fromEulerAnglesXYZ(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50))
913
      local msh = CFuncs.Mesh.Create("SpecialMesh", prt, "Sphere", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
914
      local num = math.random(10, 50) / 1000
915
      game:GetService("Debris"):AddItem(prt, 10)
916
      table.insert(Effects, {
917
        prt,
918
        "Shatter",
919
        num,
920
        prt.CFrame,
921
        math.random() - math.random(),
922
        0,
923
        math.random(50, 100) / 100
924
      })
925
    end
926
  }
927
}
928
function BlockEffect(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay, Type)
929
  local prt = CreatePart(3, workspace, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new())
930
  prt.Anchored = true
931
  prt.CFrame = cframe
932
  local msh = CreateMesh("BlockMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
933
  game:GetService("Debris"):AddItem(prt, 10)
934
  if Type == 1 or Type == nil then
935
    table.insert(Effects, {
936
      prt,
937
      "Block1",
938
      delay,
939
      x3,
940
      y3,
941
      z3,
942
      msh
943
    })
944
  elseif Type == 2 then
945
    table.insert(Effects, {
946
      prt,
947
      "Block2",
948
      delay,
949
      x3,
950
      y3,
951
      z3,
952
      msh
953
    })
954
  elseif Type == 3 then
955
    table.insert(Effects, {
956
      prt,
957
      "Block3",
958
      delay,
959
      x3,
960
      y3,
961
      z3,
962
      msh
963
    })
964
  end
965
end
966
function SphereEffect(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
967
  local prt = CreatePart(3, workspace, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new())
968
  prt.Anchored = true
969
  prt.CFrame = cframe
970
  local msh = CreateMesh("SpecialMesh", prt, "Sphere", "nil", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
971
  game:GetService("Debris"):AddItem(prt, 10)
972
  table.insert(Effects, {
973
    prt,
974
    "Cylinder",
975
    delay,
976
    x3,
977
    y3,
978
    z3,
979
    msh
980
  })
981
end
982
function RingEffect(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
983
  local prt = CreatePart(3, workspace, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new(0.5, 0.5, 0.5))
984
  prt.Anchored = true
985
  prt.CFrame = cframe * CFrame.new(x1, y1, z1)
986
  local msh = CreateMesh("SpecialMesh", prt, "FileMesh", "264766957", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
987
  game:GetService("Debris"):AddItem(prt, 10)
988
  table.insert(Effects, {
989
    prt,
990
    "Cylinder",
991
    delay,
992
    x3,
993
    y3,
994
    z3,
995
    msh
996
  })
997
end
998
function CylinderEffect(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
999
  local prt = CreatePart(3, workspace, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new())
1000
  prt.Anchored = true
1001
  prt.CFrame = cframe
1002
  local msh = CreateMesh("CylinderMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
1003
  game:GetService("Debris"):AddItem(prt, 10)
1004
  table.insert(Effects, {
1005
    prt,
1006
    "Cylinder",
1007
    delay,
1008
    x3,
1009
    y3,
1010
    z3,
1011
    msh
1012
  })
1013
end
1014
function WaveEffect(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
1015
  local prt = CreatePart(3, workspace, "Neon", 0, 0, brickcolor, "Effect", Vector3.new())
1016
  prt.Anchored = true
1017
  prt.CFrame = cframe
1018
  local msh = CreateMesh("SpecialMesh", prt, "FileMesh", "264766957", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
1019
  game:GetService("Debris"):AddItem(prt, 10)
1020
  table.insert(Effects, {
1021
    prt,
1022
    "Cylinder",
1023
    delay,
1024
    x3,
1025
    y3,
1026
    z3,
1027
    msh
1028
  })
1029
end
1030
function SpecialEffect(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
1031
  local prt = CreatePart(3, workspace, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new())
1032
  prt.Anchored = true
1033
  prt.CFrame = cframe
1034
  local msh = CreateMesh("SpecialMesh", prt, "FileMesh", "24388358", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
1035
  game:GetService("Debris"):AddItem(prt, 10)
1036
  table.insert(Effects, {
1037
    prt,
1038
    "Cylinder",
1039
    delay,
1040
    x3,
1041
    y3,
1042
    z3,
1043
    msh
1044
  })
1045
end
1046
function BreakEffect(brickcolor, cframe, x1, y1, z1)
1047
  local prt = CreatePart(3, workspace, "Neon", 0, 0, brickcolor, "Effect", Vector3.new(0.5, 0.5, 0.5))
1048
  prt.Anchored = true
1049
  prt.CFrame = cframe * CFrame.fromEulerAnglesXYZ(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50))
1050
  local msh = CreateMesh("SpecialMesh", prt, "Sphere", "nil", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
1051
  local num = math.random(10, 50) / 1000
1052
  game:GetService("Debris"):AddItem(prt, 10)
1053
  table.insert(Effects, {
1054
    prt,
1055
    "Shatter",
1056
    num,
1057
    prt.CFrame,
1058
    math.random() - math.random(),
1059
    0,
1060
    math.random(50, 100) / 100
1061
  })
1062
end
1063
function part(formfactor,parent,reflectance,transparency,brickcolor,name,size)
1064
local fp=Instance.new("Part")
1065
fp.formFactor=formfactor 
1066
fp.Parent=parent
1067
fp.Reflectance=reflectance
1068
fp.Transparency=transparency
1069
fp.CanCollide=false 
1070
fp.Locked=true
1071
fp.BrickColor=brickcolor
1072
fp.Name=name
1073
fp.Size=size
1074
fp.Position=tors.Position 
1075
RemoveOutlines(fp)
1076
fp.Material="SmoothPlastic"
1077
fp:BreakJoints()
1078
return fp 
1079
end 
1080
 
1081
function mesh(Mesh,part,meshtype,meshid,offset,scale)
1082
local mesh=Instance.new(Mesh) 
1083
mesh.Parent=part
1084
if Mesh=="SpecialMesh" then
1085
mesh.MeshType=meshtype
1086
if meshid~="nil" then
1087
mesh.MeshId="http://www.roblox.com/asset/?id="..meshid
1088
end
1089
end
1090
mesh.Offset=offset
1091
mesh.Scale=scale
1092
return mesh
1093
end
1094
function MagicBlock(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay)
1095
local prt=part(3,char,0,0,brickcolor,"Effect",Vector3.new(0.5,0.5,0.5))
1096
prt.Anchored=true
1097
prt.Material = "Neon"
1098
prt.CFrame=cframe
1099
prt.CFrame=prt.CFrame*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50))
1100
msh=mesh("BlockMesh",prt,"","",Vector3.new(0,0,0),Vector3.new(x1,y1,z1))
1101
game:GetService("Debris"):AddItem(prt,5)
1102
coroutine.resume(coroutine.create(function(Part,Mesh) 
1103
for i=0,1,delay do
1104
swait()
1105
Part.CFrame=Part.CFrame*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50))
1106
Part.Transparency=i
1107
Mesh.Scale=Mesh.Scale+Vector3.new(x3,y3,z3)
1108
end
1109
Part.Parent=nil
1110
end),prt,msh)
1111
end
1112
function MagicShockTrailAlt2(origcolor2,cframe,x1,y1,z1,x3,y3,z3,delay,rottype)
1113
local prt=part(3,char,0,0,origcolor2,"Effect",Vector3.new(0.5,0.5,0.5))
1114
prt.Anchored=true
1115
prt.Material = "Neon"
1116
prt.CFrame=cframe
1117
msh=mesh("BlockMesh",prt,"","",Vector3.new(0,0,0),Vector3.new(x1,y1,z1))
1118
game:GetService("Debris"):AddItem(prt,5)
1119
coroutine.resume(coroutine.create(function(Part,Mesh) 
1120
	local rtype = rottype
1121
for i=0,1,delay do
1122
swait()
1123
if rtype == 1 then
1124
prt.CFrame = prt.CFrame*CFrame.Angles(0,0,0.1)
1125
elseif rtype == 2 then
1126
prt.CFrame = prt.CFrame*CFrame.Angles(0,0,-0.1)
1127
end
1128
prt.Transparency=i
1129
Mesh.Scale=Mesh.Scale+Vector3.new(x3,y3,z3)
1130
end
1131
Part.Parent=nil
1132
end),prt,msh)
1133
end
1134
1135
1136
1137
New = function(Object, Parent, Name, Data)
1138
	local Object = Instance.new(Object)
1139
	for Index, Value in pairs(Data or {}) do
1140
		Object[Index] = Value
1141
	end
1142
	Object.Parent = Parent
1143
	Object.Name = Name
1144
	return Object
1145
end
1146
1147
RubiksCube = New("Model",char,"RubiksCube",{})
1148
1149
local NewInstance = function(instance,parent,properties)
1150
	local inst = Instance.new(instance,parent)
1151
	if(properties)then
1152
		for i,v in next, properties do
1153
			pcall(function() inst[i] = v end)
1154
		end
1155
	end
1156
	return inst;
1157
end
1158
local HW = NewInstance('Weld',char,{Part0=tors,Part1=Handle,C0 = CFrame.new(0,-1,0)*CFrame.Angles(math.rad(-65),0,math.rad(-90))})
1159
1160
function intro()
1161
	attack = true
1162
	for i = 0,2,0.1 do
1163
		swait()
1164
			rootj.C0 = clerp(rootj.C0,RootCF*cf(0,0,0)* angles(math.rad(0),math.rad(0),math.rad(55)),.3)
1165
tors.Neck.C0 = clerp(tors.Neck.C0,necko *angles(math.rad(0),math.rad(0),math.rad(-65)),.3)
1166
RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(0), math.rad(0), math.rad(76)), 0.3)
1167
LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(-20), math.rad(0), math.rad(-30)), 0.3)
1168
	end
1169
end
1170
1171
local mouse = game.Players.LocalPlayer:GetMouse()
1172
local running = false
1173
1174
function getTool()	
1175
	for _, kid in ipairs(script.Parent:GetChildren()) do
1176
		if kid.className == "Tool" then return kid end
1177
	end
1178
	return nil
1179
end
1180
1181
1182
mouse.KeyDown:connect(function (key) -- Run function
1183
	key = string.lower(key)
1184
	if string.byte(key) == 48 then
1185
		running = true
1186
		local keyConnection = mouse.KeyUp:connect(function (key)
1187
			if string.byte(key) == 48 then
1188
				running = false
1189
			end
1190
		end)
1191
		for i = 1,5 do
1192
			game.Workspace.CurrentCamera.FieldOfView = (100+(i*2))
1193
			wait()
1194
		end
1195
		game.Players.LocalPlayer.Character.Humanoid.WalkSpeed = 35
1196
		repeat wait () until running == false
1197
		keyConnection:disconnect()
1198
		game.Players.LocalPlayer.Character.Humanoid.WalkSpeed = 16
1199
		for i = 1,5 do
1200
			game.Workspace.CurrentCamera.FieldOfView = (110-(i*2))
1201
			wait()
1202
		end
1203
	end
1204
end)
1205
local idle=0
1206
local sine = 0
1207
local change = 1
1208
local val = 0
1209
toim = 0
1210
hum.Animator.Parent = nil
1211
idleanim=.4
1212
while true do
1213
swait()
1214
sine = sine + change
1215
local torvel=(root.Velocity*Vector3.new(1,0,1)).magnitude 
1216
local velderp=root.Velocity.y
1217
hitfloor,posfloor=rayCast(root.Position,(CFrame.new(root.Position,root.Position - Vector3.new(0,1,0))).lookVector,4,char)
1218
if equipped==true or equipped==false then
1219
if attack==false then
1220
idle=idle+1
1221
else
1222
idle=0
1223
end
1224
if root.Velocity.y > 1 and hitfloor==nil then 
1225
Anim="Jump"
1226
if attack==false then
1227
rootj.C0 = clerp(rootj.C0,RootCF*cf(0,0,0)* angles(math.rad(0),math.rad(0),math.rad(0)),.3)
1228
tors.Neck.C0 = clerp(tors.Neck.C0,necko *angles(math.rad(-10),math.rad(0),math.rad(0)),.3)
1229
RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(30), math.rad(0), math.rad(20)), 0.3)
1230
LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(-20), math.rad(0), math.rad(-30)), 0.3)
1231
RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(0),math.rad(90),math.rad(-20)),.3)
1232
LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-60),math.rad(0)),.3)
1233
end
1234
elseif root.Velocity.y < -1 and hitfloor==nil then 
1235
Anim="Fall"
1236
if attack==false then
1237
RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(0),math.rad(90),math.rad(-20)),.3)
1238
LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-60),math.rad(0)),.3)
1239
rootj.C0 = clerp(rootj.C0,RootCF*cf(0,0,0)* angles(math.rad(0),math.rad(0),math.rad(0)),.3)
1240
tors.Neck.C0 = clerp(tors.Neck.C0,necko *angles(math.rad(40),math.rad(0),math.rad(0)),.3)
1241
RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(30), math.rad(0), math.rad(20)), 0.3)
1242
LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(-20), math.rad(0), math.rad(-30)), 0.3)
1243
end
1244
elseif torvel<1 and hitfloor~=nil then
1245
Anim="Idle"
1246
change = 2
1247
1248
if attack==false then
1249
rootj.C0=clerp(rootj.C0,RootCF*cf(0,0,-0.1+0.1*math.cos(sine/20))*angles(math.rad(0),math.rad(0),math.rad(0)),0.15)
1250
tors.Neck.C0=clerp(tors.Neck.C0,necko*angles(math.rad(25),math.rad(0),math.rad(0)),.3)
1251
RH.C0=clerp(RH.C0,cf(1,-0.9-0.1*math.cos(sine/20),0)*angles(math.rad(-2.5),math.rad(90),math.rad(-0))*angles(math.rad(-7.5),math.rad(0),math.rad(0)),0.15)
1252
LH.C0=clerp(LH.C0,cf(-1,-0.9-0.1*math.cos(sine/20),0)*angles(math.rad(-2.5),math.rad(-90),math.rad(-0))*angles(math.rad(-7.5),math.rad(0),math.rad(0)),0.15)
1253
RW.C0 = clerp(RW.C0, CFrame.new(1, 0.5+0.04*math.sin(sine/25), -0.35) * angles(math.rad(65 - 1), math.rad(-7), math.rad(-35)), 0.3)
1254
LW.C0 = clerp(LW.C0, CFrame.new(-1, 0.5+0.04*math.sin(sine/25), -0.35) * angles(math.rad(90 - 1), math.rad(-7), math.rad(55)), 0.1)
1255
HW.C0=euler(0,2.57*math.cos(sine/60)/1,0)*cf(0,2.1+1.7,0)* angles(math.rad(55 - 1), math.rad(-7), math.rad(55), 0.1)
1256
end
1257
1258
elseif torvel>2 and torvel<22 and hitfloor~=nil then
1259
Anim="Walk"
1260
change = 1
1261
if attack==false then
1262
rootj.C0=clerp(rootj.C0,RootCF*cf(0,0,-0.175+0.025*math.cos(sine/3.5)+ -math.sin(sine/3.5)/7)*angles(math.rad(5-2.5*math.cos(sine/3.5)),math.rad(0),math.rad(10*math.cos(sine/7))),0.15)
1263
tors.Neck.C0 = clerp(tors.Neck.C0, necko * cf(0, 0, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), 0.3)
1264
RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(40) * math.cos(sine / 7), math.rad(0), math.rad(5)), 0.3)
1265
LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(-40) * math.cos(sine / 7), math.rad(0), math.rad(-5)), 0.3)
1266
RH.C0=clerp(RH.C0,cf(1,-0.925-0.5*math.cos(sine/7)/2,0.5*math.cos(sine/7)/2)*angles(math.rad(-5-15*math.cos(sine/7))+ -math.sin(sine/7)/1.5,math.rad(90-10*math.cos(sine/7)),math.rad(0)),0.15)
1267
LH.C0=clerp(LH.C0,cf(-1,-0.925+0.5*math.cos(sine/7)/2,-0.5*math.cos(sine/7)/2)*angles(math.rad(-5+15*math.cos(sine/7))+ math.sin(sine/7)/1.5,math.rad(-90-10*math.cos(sine/7)),math.rad(0)),0.15)
1268
HW.C0=euler(0,2.57*math.cos(sine/60)/1,0)*cf(0,2.1+1.7,0)* angles(math.rad(55 - 1), math.rad(-7), math.rad(55*math.cos(sine/60)), 0.1)
1269
end
1270
elseif torvel>=22 and hitfloor~=nil then
1271
Anim="Run"
1272
change = 2
1273
rootj.C0=clerp(rootj.C0,RootCF*cf(0,0,-0.175+0.025*math.cos(sine/3.5)+ -math.sin(sine/3.5)/7)*angles(math.rad(25),math.rad(0),math.rad(10*math.cos(sine/7))),0.15)
1274
tors.Neck.C0 = clerp(tors.Neck.C0, necko * cf(0, 0, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), 0.3)
1275
RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(55), math.rad(-55), math.rad(90)), 0.3)
1276
LW.C0=clerp(LW.C0,cf(-0.85,0.5 + 0.1 * math.cos(sine / 60),-0.65)*angles(math.rad(40),math.rad(0),math.rad(90 + 2.5)),.3)
1277
RH.C0=clerp(RH.C0,cf(1,-0.925-0.5*math.cos(sine/7)/2,0.5*math.cos(sine/7)/1)*angles(math.rad(-5-15*math.cos(sine/7))+ -math.sin(sine/7)/1,math.rad(90-10*math.cos(sine/7)),math.rad(0)),0.15)
1278
LH.C0=clerp(LH.C0,cf(-1,-0.925+0.5*math.cos(sine/7)/2,-0.5*math.cos(sine/7)/1)*angles(math.rad(-5+15*math.cos(sine/7))+ math.sin(sine/7)/1,math.rad(-90-10*math.cos(sine/7)),math.rad(0)),0.15)
1279
HW.C0=clerp(HW.C0,cf(0,-1,0)*angles(math.rad(-65),math.rad(0),math.rad(-90)),0.15)
1280
1281
end
1282
end
1283
if 0 < #Effects then
1284
    for e = 1, #Effects do
1285
      if Effects[e] ~= nil then
1286
        local Thing = Effects[e]
1287
        if Thing ~= nil then
1288
          local Part = Thing[1]
1289
          local Mode = Thing[2]
1290
          local Delay = Thing[3]
1291
          local IncX = Thing[4]
1292
          local IncY = Thing[5]
1293
          local IncZ = Thing[6]
1294
          if 1 >= Thing[1].Transparency then
1295
            if Thing[2] == "Block1" then
1296
              Thing[1].CFrame = Thing[1].CFrame * CFrame.fromEulerAnglesXYZ(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50))
1297
              local Mesh = Thing[1].Mesh
1298
              Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
1299
              Thing[1].Transparency = Thing[1].Transparency + Thing[3]
1300
            elseif Thing[2] == "Block2" then
1301
              Thing[1].CFrame = Thing[1].CFrame + Vector3.new(0, 0, 0)
1302
              local Mesh = Thing[7]
1303
              Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
1304
              Thing[1].Transparency = Thing[1].Transparency + Thing[3]
1305
            elseif Thing[2] == "Block3" then
1306
              Thing[1].CFrame = Thing[1].CFrame * CFrame.fromEulerAnglesXYZ(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50)) + Vector3.new(0, 0.15, 0)
1307
              local Mesh = Thing[7]
1308
              Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
1309
              Thing[1].Transparency = Thing[1].Transparency + Thing[3]
1310
            elseif Thing[2] == "Cylinder" then
1311
              local Mesh = Thing[1].Mesh
1312
              Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
1313
              Thing[1].Transparency = Thing[1].Transparency + Thing[3]
1314
            elseif Thing[2] == "Blood" then
1315
              local Mesh = Thing[7]
1316
              Thing[1].CFrame = Thing[1].CFrame * Vector3.new(0, 0.5, 0)
1317
              Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
1318
              Thing[1].Transparency = Thing[1].Transparency + Thing[3]
1319
            elseif Thing[2] == "Elec" then
1320
              local Mesh = Thing[1].Mesh
1321
              Mesh.Scale = Mesh.Scale + Vector3.new(Thing[7], Thing[8], Thing[9])
1322
              Thing[1].Transparency = Thing[1].Transparency + Thing[3]
1323
            elseif Thing[2] == "Disappear" then
1324
              Thing[1].Transparency = Thing[1].Transparency + Thing[3]
1325
            elseif Thing[2] == "Shatter" then
1326
              Thing[1].Transparency = Thing[1].Transparency + Thing[3]
1327
              Thing[4] = Thing[4] * CFrame.new(0, Thing[7], 0)
1328
              Thing[1].CFrame = Thing[4] * CFrame.fromEulerAnglesXYZ(Thing[6], 0, 0)
1329
              Thing[6] = Thing[6] + Thing[5]
1330
            end
1331
1332
          end
1333
        end
1334
      end
1335
    end
1336
  end
1337
end
1338
 
1339
--Mkay. Bye!
1340
--Wazzup...
1341
--Nop. Not the end.
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
--JUST FREACKING GO DOWN. YEET.
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
ParticleSettings = {
1400
    Lifetime = 1,
1401
    Texture = 'rbxassetid://1209757190',
1402
    --Color1 is for UpperBody and Accessories, Color2 is for Lower Body
1403
    Color1 = ColorSequence.new(BrickColor.new('Pastel yellow').Color,BrickColor.new('Institutional white').Color),
1404
    Color2 = ColorSequence.new(BrickColor.new('Institutional white').Color,BrickColor.new('New Yeller').Color),
1405
    AllBody = true,
1406
    UpperBodyOnly = false,
1407
    LowerBodyOnly = false,
1408
    Accessories = true,
1409
    Extras = true,
1410
    }
1411
m = game:service'Players'.LocalPlayer:GetMouse()
1412
local p=game:service("Players").LocalPlayer
1413
Instance.new("ForceField", game.Players.LocalPlayer.Character). Visible = false
1414
local char=p.Character
1415
script.Parent=char
1416
local tor=char.Torso
1417
local hed=char.Head
1418
local larm=char:FindFirstChild("Left Arm")
1419
local rarm=char:FindFirstChild("Right Arm")
1420
local lleg=char:FindFirstChild("Left Leg")
1421
local rleg=char:FindFirstChild("Right Leg")
1422
local hum=char.Humanoid
1423
local cam=workspace.CurrentCamera
1424
local root=char.HumanoidRootPart
1425
local mouse=p:GetMouse()
1426
local hb=game:service("RunService").Heartbeat
1427
local rs=game:service("RunService").Stepped
1428
hum.MaxHealth= math.huge
1429
hum.Health=hum.MaxHealth
1430
local hair4 = Instance.new("Part",char)
1431
hair4.Material="Neon"
1432
hair4.CanCollide=false
1433
hair4.Size=Vector3.new(.5,2,0)
1434
hair4.BrickColor=BrickColor.Red()
1435
hair4.Transparency=1
1436
 
1437
 
1438
 
1439
local w = Instance.new("Weld",hair4)
1440
w.Part1=hair4
1441
w.Part0=tor
1442
w.C0=CFrame.new(-0.7,0,0.15)
1443
 
1444
local hair3 = Instance.new("Part",char)
1445
hair3.Material="Neon"
1446
hair3.CanCollide=false
1447
hair3.Size=Vector3.new(.5,2,0)
1448
hair3.BrickColor=BrickColor.Red()
1449
hair3.Transparency=1
1450
 
1451
 
1452
 
1453
local w = Instance.new("Weld",hair3)
1454
w.Part1=hair3
1455
w.Part0=tor
1456
w.C0=CFrame.new(0.7,0,0.15)
1457
1458
local bladee = Instance.new("ParticleEmitter",hair4)
1459
bladee.Texture = "http://www.roblox.com/asset/?id=298984512"
1460
bladee.LightEmission = 0.625
1461
bladee.EmissionDirection = "Left"
1462
bladee.LockedToPart = true
1463
bladee.Color = ParticleSettings.Color2
1464
bladee.Rate = 100000
1465
bladee.Lifetime = NumberRange.new(.5)
1466
bladee.Size = NumberSequence.new({NumberSequenceKeypoint.new(0,2,0),NumberSequenceKeypoint.new(1,0,0)})
1467
bladee.Speed = NumberRange.new(5)
1468
bladee.Acceleration = Vector3.new(-30,40,0)
1469
 
1470
local bladee3 = Instance.new("ParticleEmitter",hair3)
1471
bladee3.Texture = "http://www.roblox.com/asset/?id=298984512"
1472
bladee3.LightEmission = 0.625
1473
bladee3.EmissionDirection = "Right"
1474
bladee3.LockedToPart = true
1475
bladee3.Color = ParticleSettings.Color2
1476
bladee3.Rate = 100000
1477
bladee3.Lifetime = NumberRange.new(.5)
1478
bladee3.Size = NumberSequence.new({NumberSequenceKeypoint.new(0,2,0),NumberSequenceKeypoint.new(1,0,0)})
1479
bladee3.Speed = NumberRange.new(5)
1480
bladee3.Acceleration = Vector3.new(30,40,0)
1481
m.KeyDown:connect(function(k)
1482
    if k == "e" then
1483
    if (hum ~= nil) then
1484
        hum.Sit = true
1485
end
1486
    end
1487
    end)
1488
1489
--Okay... It iz teh end.
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
--OH FU**! WHY ISN'T IT THE END YET? >:(
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
 --end ;~;