View difference between Paste ID: Nvxt5P1z and 5JBsGxWi
SHOW: | | - or go back to the newest paste.
1
-- This script has been converted to FE by iPxter
2-
plr = game.Players.LocalPlayer
2+
3
4
if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
5
local Player,Mouse,mouse,UserInputService,ContextActionService = owner
6
do
7
	print("FE Compatibility code by Mokiros | Translated to FE by iPxter")
8
	script.Parent = Player.Character
9
10
	--RemoteEvent for communicating
11
	local Event = Instance.new("RemoteEvent")
12
	Event.Name = "UserInput_Event"
13
14
	--Fake event to make stuff like Mouse.KeyDown work
15
	local function fakeEvent()
16
		local t = {_fakeEvent=true,Connect=function(self,f)self.Function=f end}
17
		t.connect = t.Connect
18
		return t
19
	end
20
21
	--Creating fake input objects with fake variables
22
    local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
23
	local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
24
	local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
25
		CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
26
	end}
27
	--Merged 2 functions into one by checking amount of arguments
28
	CAS.UnbindAction = CAS.BindAction
29
30
	--This function will trigger the events that have been :Connect()'ed
31
	local function te(self,ev,...)
32
		local t = m[ev]
33
		if t and t._fakeEvent and t.Function then
34
			t.Function(...)
35
		end
36
	end
37
	m.TrigEvent = te
38
	UIS.TrigEvent = te
39
40
	Event.OnServerEvent:Connect(function(plr,io)
41
	    if plr~=Player then return end
42
		if io.isMouse then
43
			m.Target = io.Target
44
			m.Hit = io.Hit
45
		else
46
			local b = io.UserInputState == Enum.UserInputState.Begin
47
			if io.UserInputType == Enum.UserInputType.MouseButton1 then
48
				return m:TrigEvent(b and "Button1Down" or "Button1Up")
49
			end
50
			for _,t in pairs(CAS.Actions) do
51
				for _,k in pairs(t.Keys) do
52
					if k==io.KeyCode then
53
						t.Function(t.Name,io.UserInputState,io)
54
					end
55
				end
56
			end
57
			m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
58
			UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
59
	    end
60
	end)
61
	Event.Parent = NLS([==[
62
	local Player = game:GetService("Players").LocalPlayer
63
	local Event = script:WaitForChild("UserInput_Event")
64
65
	local UIS = game:GetService("UserInputService")
66
	local input = function(io,a)
67
		if a then return end
68
		--Since InputObject is a client-side instance, we create and pass table instead
69
		Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState})
70
	end
71
	UIS.InputBegan:Connect(input)
72
	UIS.InputEnded:Connect(input)
73
74
	local Mouse = Player:GetMouse()
75
	local h,t
76
	--Give the server mouse data 30 times every second, but only if the values changed
77
	--If player is not moving their mouse, client won't fire events
78
	while wait(1/30) do
79
		if h~=Mouse.Hit or t~=Mouse.Target then
80
			h,t=Mouse.Hit,Mouse.Target
81
			Event:FireServer({isMouse=true,Target=t,Hit=h})
82
		end
83
	end]==],Player.Character)
84
	Mouse,mouse,UserInputService,ContextActionService = m,m,UIS,CAS
85
end
86
87
88
warn'Corrupt Vectorist II, The Dimensiona.'
89
plr = owner
90
char = plr.Character
91
hum = char.Humanoid
92
local cam = game.Workspace.CurrentCamera
93
t = char.Torso
94
h = char.Head
95
ra = char["Right Arm"]
96
la = char["Left Arm"]
97
rl = char["Right Leg"]
98
ll = char["Left Leg"]
99
tors = char.Torso
100
lleg = char["Left Leg"]
101
root = char.HumanoidRootPart
102
hed = char.Head
103
rleg = char["Right Leg"]
104
rarm = char["Right Arm"]
105
larm = char["Left Arm"]
106
vt = Vector3.new
107
bc = BrickColor.new
108
br = BrickColor.random
109
it = Instance.new
110
cf = CFrame.new
111
112
function CameraShake(Times, Power)
113
coroutine.resume(coroutine.create(function()
114
FV = Instance.new("BoolValue", Character)
115
FV.Name = "CameraShake"
116
for ShakeNum=1,Times do
117
swait()
118
local ef=Power
119
  if ef>=1 then
120
   Humanoid.CameraOffset = Vector3.new(math.random(-ef,ef),math.random(-ef,ef),math.random(-ef,ef))
121
  else
122
   ef=Power*10
123
   Humanoid.CameraOffset = Vector3.new(math.random(-ef,ef)/10,math.random(-ef,ef)/10,math.random(-ef,ef)/10)
124
  end	
125
end
126
Humanoid.CameraOffset = Vector3.new(0,0,0)
127
FV:Destroy()
128
end))
129
end
130
131
CamShake=function(Part,Distan,Power,Times) 
132
local de=Part.Position
133
for i,v in pairs(workspace:children()) do
134
 if v:IsA("Model") and v:findFirstChild("Humanoid") then
135
for _,c in pairs(v:children()) do
136
if c.ClassName=="Part" and (c.Position - de).magnitude < Distan then
137
local Noob=v.Humanoid
138
if Noob~=nil then
139
if Noob:FindFirstChild("CamShake")==nil then-- and Noob == Character then
140
--[[local ss=script.CamShake:clone()
141
ss.Parent=Noob
142
ss.Power.Value=Power
143
ss.Times.Value=Times
144
ss.Disabled=false]]
145
CameraShake(Times, Power)
146
end
147
end
148
end
149
end
150
end
151
end
152
end
153
154
function chatfunc(text,color)
155
local chat = coroutine.wrap(function()
156
if Character:FindFirstChild("TalkingBillBoard")~= nil then
157
Character:FindFirstChild("TalkingBillBoard"):destroy()
158
end
159
local naeeym2 = Instance.new("BillboardGui",Character)
160
naeeym2.Size = UDim2.new(0,100,0,40)
161
naeeym2.StudsOffset = Vector3.new(0,3,0)
162
naeeym2.Adornee = Character.Head
163
naeeym2.Name = "TalkingBillBoard"
164
local tecks2 = Instance.new("TextLabel",naeeym2)
165
tecks2.BackgroundTransparency = 1
166
tecks2.BorderSizePixel = 0
167
tecks2.Text = ""
168
tecks2.Font = "SciFi"
169
tecks2.TextSize = 30
170
tecks2.TextStrokeTransparency = 0
171
tecks2.TextColor3 = color
172
tecks2.TextStrokeColor3 = Color3.new(0,0,0)
173
tecks2.Size = UDim2.new(1,0,0.5,0)
174
local tecks3 = Instance.new("TextLabel",naeeym2)
175
tecks3.BackgroundTransparency = 1
176
tecks3.BorderSizePixel = 0
177
tecks3.Text = ""
178
tecks3.Font = "SciFi"
179
tecks3.TextSize = 30
180
tecks3.TextStrokeTransparency = 0
181
tecks3.TextColor3 = Color3.new(0,0,0)
182
tecks3.TextStrokeColor3 = color
183
tecks3.Size = UDim2.new(1,0,0.5,0)
184
for i = 1,string.len(text),1 do
185
CFuncs["Sound"].Create("rbxassetid://274118116", char, 0.25, 0.115)
186
tecks2.Text = string.sub(text,1,i)
187
tecks3.Text = string.sub(text,1,i)
188
wait(0.01)
189
end
190
wait(1)
191
local randomrot = math.random(1,2)
192
if randomrot == 1 then
193
for i = 1, 50 do
194
swait()
195
tecks2.Rotation = tecks2.Rotation - .75
196
tecks2.TextStrokeTransparency = tecks2.TextStrokeTransparency +.04
197
tecks2.TextTransparency = tecks2.TextTransparency + .04
198
tecks3.Rotation = tecks2.Rotation + .75
199
tecks3.TextStrokeTransparency = tecks2.TextStrokeTransparency +.04
200
tecks3.TextTransparency = tecks2.TextTransparency + .04
201
end
202
elseif randomrot == 2 then
203
	for i = 1, 50 do
204
swait()
205
tecks2.Rotation = tecks2.Rotation + .75
206
tecks2.TextStrokeTransparency = tecks2.TextStrokeTransparency +.04
207
tecks2.TextTransparency = tecks2.TextTransparency + .04
208
tecks3.Rotation = tecks2.Rotation - .75
209
tecks3.TextStrokeTransparency = tecks2.TextStrokeTransparency +.04
210
tecks3.TextTransparency = tecks2.TextTransparency + .04
211
end
212
end
213
naeeym2:Destroy()
214
end)
215
chat()
216
end
217
218
219
local Create = LoadLibrary("RbxUtility").Create
220
221
CFuncs = {	
222
	["Part"] = {
223
		Create = function(Parent, Material, Reflectance, Transparency, BColor, Name, Size)
224
			local Part = Create("Part"){
225
				Parent = Parent,
226
				Reflectance = Reflectance,
227
				Transparency = Transparency,
228
				CanCollide = false,
229
				Locked = true,
230
				BrickColor = BrickColor.new(tostring(BColor)),
231
				Name = Name,
232
				Size = Size,
233
				Material = Material,
234
			}
235
			RemoveOutlines(Part)
236
			return Part
237
		end;
238
	};
239
	
240
	["Mesh"] = {
241
		Create = function(Mesh, Part, MeshType, MeshId, OffSet, Scale)
242
			local Msh = Create(Mesh){
243
				Parent = Part,
244
				Offset = OffSet,
245
				Scale = Scale,
246
			}
247
			if Mesh == "SpecialMesh" then
248
				Msh.MeshType = MeshType
249
				Msh.MeshId = MeshId
250
			end
251
			return Msh
252
		end;
253
	};
254
	
255
	["Mesh"] = {
256
		Create = function(Mesh, Part, MeshType, MeshId, OffSet, Scale)
257
			local Msh = Create(Mesh){
258
				Parent = Part,
259
				Offset = OffSet,
260
				Scale = Scale,
261
			}
262
			if Mesh == "SpecialMesh" then
263
				Msh.MeshType = MeshType
264
				Msh.MeshId = MeshId
265
			end
266
			return Msh
267
		end;
268
	};
269
	
270
	["Weld"] = {
271
		Create = function(Parent, Part0, Part1, C0, C1)
272
			local Weld = Create("Weld"){
273
				Parent = Parent,
274
				Part0 = Part0,
275
				Part1 = Part1,
276
				C0 = C0,
277
				C1 = C1,
278
			}
279
			return Weld
280
		end;
281
	};
282
283
	["Sound"] = {
284
		Create = function(id, par, vol, pit) 
285
			coroutine.resume(coroutine.create(function()
286
				local S = Create("Sound"){
287
					Volume = vol,
288
					Pitch = pit or 1,
289
					SoundId = id,
290
					Parent = par or workspace,
291
				}
292
				wait() 
293
				S:play() 
294
				game:GetService("Debris"):AddItem(S, 10)
295
			end))
296
		end;
297
	};
298
299
["LongSound"] = {
300
		Create = function(id, par, vol, pit) 
301
			coroutine.resume(coroutine.create(function()
302
				local S = Create("Sound"){
303
					Volume = vol,
304
					Pitch = pit or 1,
305
					SoundId = id,
306
					Parent = par or workspace,
307
				}
308
				wait() 
309
				S:play() 
310
				game:GetService("Debris"):AddItem(S, 30)
311
			end))
312
		end;
313
	};
314
	
315
	["ParticleEmitter"] = {
316
		Create = function(Parent, Color1, Color2, LightEmission, Size, Texture, Transparency, ZOffset, Accel, Drag, LockedToPart, VelocityInheritance, EmissionDirection, Enabled, LifeTime, Rate, Rotation, RotSpeed, Speed, VelocitySpread)
317
			local fp = Create("ParticleEmitter"){
318
				Parent = Parent,
319
				Color = ColorSequence.new(Color1, Color2),
320
				LightEmission = LightEmission,
321
				Size = Size,
322
				Texture = Texture,
323
				Transparency = Transparency,
324
				ZOffset = ZOffset,
325
				Acceleration = Accel,
326
				Drag = Drag,
327
				LockedToPart = LockedToPart,
328
				VelocityInheritance = VelocityInheritance,
329
				EmissionDirection = EmissionDirection,
330
				Enabled = Enabled,
331
				Lifetime = LifeTime,
332
				Rate = Rate,
333
				Rotation = Rotation,
334
				RotSpeed = RotSpeed,
335
				Speed = Speed,
336
				VelocitySpread = VelocitySpread,
337
			}
338
			return fp
339
		end;
340
	};
341
342
	CreateTemplate = {
343
	
344
	};
345
}
346
347
348
349
New = function(Object, Parent, Name, Data)
350
	local Object = Instance.new(Object)
351
	for Index, Value in pairs(Data or {}) do
352
		Object[Index] = Value
353
	end
354
	Object.Parent = Parent
355
	Object.Name = Name
356
	return Object
357
end
358
local halocolor = BrickColor.new("Dark indigo")
359
local wepcolor = BrickColor.new("Really black")
360
local m = Instance.new("Model",char)
361
362
function CreateParta(parent,transparency,reflectance,material,brickcolor)
363
local p = Instance.new("Part")
364
p.TopSurface = 0
365-
Player=game:GetService("Players").LocalPlayer
365+
366
p.Parent = parent
367
p.Size = Vector3.new(1,1,1)
368
p.Transparency = transparency
369
p.Reflectance = reflectance
370
p.CanCollide = false
371
p.Locked = true
372
p.BrickColor = brickcolor
373
p.Material = material
374
return p
375
end
376
377
function CreateMesh(parent,meshtype,x1,y1,z1)
378
local mesh = Instance.new("SpecialMesh",parent)
379
mesh.MeshType = meshtype
380
mesh.Scale = Vector3.new(x1,y1,z1)
381
return mesh
382
end
383
384
function CreateSpecialGlowMesh(parent,meshid,x1,y1,z1)
385
local mesh = Instance.new("SpecialMesh",parent)
386
mesh.MeshType = "FileMesh"
387
mesh.MeshId = meshid
388
mesh.TextureId = "http://www.roblox.com/asset/?id=269748808"
389
mesh.Scale = Vector3.new(x1,y1,z1)
390
mesh.VertexColor = Vector3.new(parent.BrickColor.r, parent.BrickColor.g, parent.BrickColor.b)
391
return mesh
392
end
393
394
function CreateWeld(parent,part0,part1,C1X,C1Y,C1Z,C1Xa,C1Ya,C1Za,C0X,C0Y,C0Z,C0Xa,C0Ya,C0Za)
395
local weld = Instance.new("Weld")
396
weld.Parent = parent
397
weld.Part0 = part0
398
weld.Part1 = part1
399
weld.C1 = CFrame.new(C1X,C1Y,C1Z)*CFrame.Angles(C1Xa,C1Ya,C1Za)
400
weld.C0 = CFrame.new(C0X,C0Y,C0Z)*CFrame.Angles(C0Xa,C0Ya,C0Za)
401
return weld
402
end
403
404
405
local sorb = CreateParta(m,1,1,"SmoothPlastic",BrickColor.random())
406
CreateWeld(sorb,rarm,sorb,0,2,0,math.rad(0),math.rad(0),math.rad(0),0,0,0,math.rad(0),math.rad(0),math.rad(0))
407
local sorb2 = CreateParta(m,1,1,"SmoothPlastic",BrickColor.random())
408
CreateWeld(sorb2,larm,sorb2,0,2,0,math.rad(0),math.rad(0),math.rad(0),0,0,0,math.rad(0),math.rad(0),math.rad(0))
409
410
function RemoveOutlines(part)
411
  part.TopSurface, part.BottomSurface, part.LeftSurface, part.RightSurface, part.FrontSurface, part.BackSurface = 10, 10, 10, 10, 10, 10
412
end
413
function CreatePart(Parent, Material, Reflectance, Transparency, BColor, Name, Size)
414
  local Part = Create("Part")({
415
    Parent = Parent,
416
    Reflectance = Reflectance,
417
    Transparency = Transparency,
418-
mouse=Player:GetMouse()
418+
419
    Locked = true,
420
    BrickColor = BrickColor.new(tostring(BColor)),
421
    Name = Name,
422
    Size = Size,
423
    Material = Material
424
  })
425
  Part.CustomPhysicalProperties = PhysicalProperties.new(0.001, 0.001, 0.001, 0.001, 0.001)
426
  RemoveOutlines(Part)
427
  return Part
428
end
429
function CreateMesh(Mesh, Part, MeshType, MeshId, OffSet, Scale)
430
  local Msh = Create(Mesh)({
431
    Parent = Part,
432
    Offset = OffSet,
433
    Scale = Scale
434
  })
435
  if Mesh == "SpecialMesh" then
436
    Msh.MeshType = MeshType
437
    Msh.MeshId = MeshId
438
  end
439
  return Msh
440
end
441
function CreateWeld(Parent, Part0, Part1, C0, C1)
442
  local Weld = Create("Weld")({
443
    Parent = Parent,
444
    Part0 = Part0,
445
    Part1 = Part1,
446
    C0 = C0,
447
    C1 = C1
448
  })
449
  return Weld
450
end
451
452
Player=owner
453
Character=Player.Character 
454
PlayerGui=Player.PlayerGui 
455
Backpack=Player.Backpack 
456
Torso=Character.Torso 
457
Head=Character.Head 
458
Humanoid=Character.Humanoid
459
m=Instance.new('Model',Character)
460
LeftArm=Character["Left Arm"] 
461
LeftLeg=Character["Left Leg"] 
462
RightArm=Character["Right Arm"] 
463
RightLeg=Character["Right Leg"] 
464
LS=Torso["Left Shoulder"] 
465
LH=Torso["Left Hip"] 
466
RS=Torso["Right Shoulder"] 
467
RH=Torso["Right Hip"] 
468
Face = Head.face
469
Neck=Torso.Neck
470
it=Instance.new
471
attacktype=1
472
vt=Vector3.new
473
cf=CFrame.new
474
euler=CFrame.fromEulerAnglesXYZ
475
angles=CFrame.Angles
476
cloaked=false
477
necko=cf(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
478
necko2=cf(0, -0.5, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
479
LHC0=cf(-1,-1,0,-0,-0,-1,0,1,0,1,0,0)
480
LHC1=cf(-0.5,1,0,-0,-0,-1,0,1,0,1,0,0)
481
RHC0=cf(1,-1,0,0,0,1,0,1,0,-1,-0,-0)
482
RHC1=cf(0.5,1,0,0,0,1,0,1,0,-1,-0,-0)
483
RootPart=Character.HumanoidRootPart
484
RootJoint=RootPart.RootJoint
485
RootCF=euler(-1.57,0,3.14)
486
attack = false 
487
attackdebounce = false 
488
deb=false
489
equipped=true
490
hand=false
491
MMouse=nil
492
combo=0
493
mana=0
494
trispeed=.2
495
attackmode='none'
496
local idle=0
497
local Anim="Idle"
498
local Effects={}
499
local gun=false
500
local shoot=false
501
local sine = 0
502
local change = 1
503
player=nil 
504
505
--save shoulders 
506
RSH, LSH=nil, nil 
507
--welds 
508
RW, LW=Instance.new("Weld"), Instance.new("Weld") 
509
RW.Name="Right Shoulder" LW.Name="Left Shoulder"
510
LH=Torso["Left Hip"]
511
RH=Torso["Right Hip"]
512
TorsoColor=Torso.BrickColor
513
function NoOutline(Part)
514
Part.TopSurface,Part.BottomSurface,Part.LeftSurface,Part.RightSurface,Part.FrontSurface,Part.BackSurface = 10,10,10,10,10,10
515
end
516
player=Player 
517
ch=Character
518
RSH=ch.Torso["Right Shoulder"] 
519
LSH=ch.Torso["Left Shoulder"] 
520
-- 
521
RSH.Parent=nil 
522
LSH.Parent=nil 
523
-- 
524
RW.Name="Right Shoulder"
525
RW.Part0=ch.Torso 
526
RW.C0=cf(1.5, 0.5, 0) --* CFrame.fromEulerAnglesXYZ(1.3, 0, -0.5) 
527
RW.C1=cf(0, 0.5, 0) 
528
RW.Part1=ch["Right Arm"] 
529
RW.Parent=ch.Torso 
530
-- 
531
LW.Name="Left Shoulder"
532
LW.Part0=ch.Torso 
533
LW.C0=cf(-1.5, 0.5, 0) --* CFrame.fromEulerAnglesXYZ(1.7, 0, 0.8) 
534
LW.C1=cf(0, 0.5, 0) 
535
LW.Part1=ch["Left Arm"] 
536
LW.Parent=ch.Torso 
537
538
local Stats=Instance.new("BoolValue")
539
Stats.Name="Stats"
540
Stats.Parent=Character
541
local Atk=Instance.new("NumberValue")
542
Atk.Name="Damage"
543
Atk.Parent=Stats
544
Atk.Value=1
545
local Def=Instance.new("NumberValue")
546
Def.Name="Defense"
547
Def.Parent=Stats
548
Def.Value=1
549
local Speed=Instance.new("NumberValue")
550
Speed.Name="Speed"
551
Speed.Parent=Stats
552
Speed.Value=1
553
local Mvmt=Instance.new("NumberValue")
554
Mvmt.Name="Movement"
555
Mvmt.Parent=Stats
556
Mvmt.Value=1
557
558
local donum=0
559
 
560
561
function part(formfactor,parent,reflectance,transparency,brickcolor,name,size)
562
local fp=it("Part")
563
fp.formFactor=formfactor 
564
fp.Parent=parent
565
fp.Reflectance=reflectance
566
fp.Transparency=transparency
567
fp.CanCollide=false 
568
fp.Locked=true
569
fp.BrickColor=brickcolor
570
fp.Name=name
571
fp.Size=size
572
fp.Position=Torso.Position 
573
NoOutline(fp)
574
fp.Material="SmoothPlastic"
575
fp:BreakJoints()
576
return fp 
577
end 
578
 
579
function mesh(Mesh,part,meshtype,meshid,offset,scale)
580
local mesh=it(Mesh) 
581
mesh.Parent=part
582
if Mesh=="SpecialMesh" then
583
mesh.MeshType=meshtype
584
if meshid~="nil" then
585
mesh.MeshId="http://www.roblox.com/asset/?id="..meshid
586
end
587
end
588
mesh.Offset=offset
589
mesh.Scale=scale
590
return mesh
591
end
592
 
593
function weld(parent,part0,part1,c0)
594
local weld=it("Weld") 
595
weld.Parent=parent
596
weld.Part0=part0 
597
weld.Part1=part1 
598
weld.C0=c0
599
return weld
600
end
601
 
602
local Color1=Torso.BrickColor
603
604
local bodvel=Instance.new("BodyVelocity")
605
local bg=Instance.new("BodyGyro")
606
607
function swait(num)
608
if num==0 or num==nil then
609
game:service'RunService'.Stepped:wait(0)
610
else
611
for i=0,num do
612
game:service'RunService'.Stepped:wait(0)
613
end
614
end
615
end
616
 
617
 
618
so = function(id,par,vol,pit) 
619
coroutine.resume(coroutine.create(function()
620
local sou = Instance.new("Sound",par or workspace)
621
sou.Volume=vol
622
sou.Pitch=pit or 1
623
sou.SoundId=id
624
swait() 
625
sou:play() 
626
game:GetService("Debris"):AddItem(sou,6)
627
end))
628
end
629
 
630
function clerp(a,b,t) 
631
local qa = {QuaternionFromCFrame(a)}
632
local qb = {QuaternionFromCFrame(b)} 
633
local ax, ay, az = a.x, a.y, a.z 
634
local bx, by, bz = b.x, b.y, b.z
635
local _t = 1-t
636
return QuaternionToCFrame(_t*ax + t*bx, _t*ay + t*by, _t*az + t*bz,QuaternionSlerp(qa, qb, t)) 
637
end 
638
 
639
function QuaternionFromCFrame(cf) 
640
local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components() 
641
local trace = m00 + m11 + m22 
642
if trace > 0 then 
643
local s = math.sqrt(1 + trace) 
644
local recip = 0.5/s 
645
return (m21-m12)*recip, (m02-m20)*recip, (m10-m01)*recip, s*0.5 
646
else 
647
local i = 0 
648
if m11 > m00 then
649
i = 1
650
end
651
if m22 > (i == 0 and m00 or m11) then 
652
i = 2 
653
end 
654
if i == 0 then 
655
local s = math.sqrt(m00-m11-m22+1) 
656
local recip = 0.5/s 
657
return 0.5*s, (m10+m01)*recip, (m20+m02)*recip, (m21-m12)*recip 
658
elseif i == 1 then 
659
local s = math.sqrt(m11-m22-m00+1) 
660
local recip = 0.5/s 
661
return (m01+m10)*recip, 0.5*s, (m21+m12)*recip, (m02-m20)*recip 
662
elseif i == 2 then 
663
local s = math.sqrt(m22-m00-m11+1) 
664
local recip = 0.5/s return (m02+m20)*recip, (m12+m21)*recip, 0.5*s, (m10-m01)*recip 
665
end 
666
end 
667
end
668
 
669
function QuaternionToCFrame(px, py, pz, x, y, z, w) 
670
local xs, ys, zs = x + x, y + y, z + z 
671
local wx, wy, wz = w*xs, w*ys, w*zs 
672
local xx = x*xs 
673
local xy = x*ys 
674
local xz = x*zs 
675
local yy = y*ys 
676
local yz = y*zs 
677
local zz = z*zs 
678
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)) 
679
end
680
 
681
function QuaternionSlerp(a, b, t) 
682
local cosTheta = a[1]*b[1] + a[2]*b[2] + a[3]*b[3] + a[4]*b[4] 
683
local startInterp, finishInterp; 
684
if cosTheta >= 0.0001 then 
685
if (1 - cosTheta) > 0.0001 then 
686
local theta = math.acos(cosTheta) 
687
local invSinTheta = 1/math.sin(theta) 
688
startInterp = math.sin((1-t)*theta)*invSinTheta 
689
finishInterp = math.sin(t*theta)*invSinTheta  
690
else 
691
startInterp = 1-t 
692
finishInterp = t 
693
end 
694
else 
695
if (1+cosTheta) > 0.0001 then 
696
local theta = math.acos(-cosTheta) 
697
local invSinTheta = 1/math.sin(theta) 
698
startInterp = math.sin((t-1)*theta)*invSinTheta 
699
finishInterp = math.sin(t*theta)*invSinTheta 
700
else 
701
startInterp = t-1 
702
finishInterp = t 
703
end 
704
end 
705
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 
706
end
707
708
local function CFrameFromTopBack(at, top, back)
709
local right = top:Cross(back)
710
return CFrame.new(at.x, at.y, at.z,
711
right.x, top.x, back.x,
712
right.y, top.y, back.y,
713
right.z, top.z, back.z)
714
end
715
716
function Triangle(a, b, c)
717
local edg1 = (c-a):Dot((b-a).unit)
718
local edg2 = (a-b):Dot((c-b).unit)
719
local edg3 = (b-c):Dot((a-c).unit)
720
if edg1 <= (b-a).magnitude and edg1 >= 0 then
721
a, b, c = a, b, c
722
elseif edg2 <= (c-b).magnitude and edg2 >= 0 then
723
a, b, c = b, c, a
724
elseif edg3 <= (a-c).magnitude and edg3 >= 0 then
725-
      Value = game:service("Players").LocalPlayer,
725+
726
else
727
assert(false, "unreachable")
728
end
729
 
730
local len1 = (c-a):Dot((b-a).unit)
731
local len2 = (b-a).magnitude - len1
732
local width = (a + (b-a).unit*len1 - c).magnitude
733
 
734
local maincf = CFrameFromTopBack(a, (b-a):Cross(c-b).unit, -(b-a).unit)
735
 
736
local list = {}
737
 
738
if len1 > 0.01 then
739
local w1 = Instance.new('WedgePart', m)
740
game:GetService("Debris"):AddItem(w1,5)
741
w1.Material = "SmoothPlastic"
742
w1.FormFactor = 'Custom'
743
w1.BrickColor = BrickColor.new("Really red")
744
w1.Transparency = 0
745
w1.Reflectance = 0
746
w1.Material = "SmoothPlastic"
747
w1.CanCollide = false
748
local l1 = Instance.new("PointLight",w1)
749
l1.Color = Color3.new(170,0,0)
750
NoOutline(w1)
751
local sz = Vector3.new(0.2, width, len1)
752
w1.Size = sz
753
local sp = Instance.new("SpecialMesh",w1)
754
sp.MeshType = "Wedge"
755
sp.Scale = Vector3.new(0,1,1) * sz/w1.Size
756
w1:BreakJoints()
757
w1.Anchored = true
758
w1.Parent = workspace
759
w1.Transparency = 0.7
760
table.insert(Effects,{w1,"Disappear",.01})
761
w1.CFrame = maincf*CFrame.Angles(math.pi,0,math.pi/2)*CFrame.new(0,width/2,len1/2)
762
table.insert(list,w1)
763
end
764
 
765
if len2 > 0.01 then
766
local w2 = Instance.new('WedgePart', m)
767
game:GetService("Debris"):AddItem(w2,5)
768
w2.Material = "SmoothPlastic"
769
w2.FormFactor = 'Custom'
770
w2.BrickColor = BrickColor.new("Really red")
771
w2.Transparency = 0
772
w2.Reflectance = 0
773
w2.Material = "SmoothPlastic"
774
w2.CanCollide = false
775
local l2 = Instance.new("PointLight",w2)
776
l2.Color = Color3.new(170,0,0)
777
NoOutline(w2)
778
local sz = Vector3.new(0.2, width, len2)
779
w2.Size = sz
780
local sp = Instance.new("SpecialMesh",w2)
781
sp.MeshType = "Wedge"
782
sp.Scale = Vector3.new(0,1,1) * sz/w2.Size
783
w2:BreakJoints()
784
w2.Anchored = true
785
w2.Parent = workspace
786
w2.Transparency = 0.7
787
table.insert(Effects,{w2,"Disappear",.01})
788
w2.CFrame = maincf*CFrame.Angles(math.pi,math.pi,-math.pi/2)*CFrame.new(0,width/2,-len1 - len2/2)
789
table.insert(list,w2)
790
end
791
return unpack(list)
792
end
793
 
794
795
function Damagefunc(Part, hit, minim, maxim, knockback, Type, Property, Delay, HitSound, HitPitch)
796
  if hit.Parent == nil then
797
    return
798
  end
799
  local h = hit.Parent:FindFirstChild("Humanoid")
800
  for _, v in pairs(hit.Parent:children()) do
801
    if v:IsA("Humanoid") then
802
      h = v
803
    end
804
  end
805
  if h ~= nil and hit.Parent.Name ~= Character.Name and hit.Parent:FindFirstChild("Torso") ~= nil then
806
    if hit.Parent:findFirstChild("DebounceHit") ~= nil and hit.Parent.DebounceHit.Value == true then
807
      return
808
    end
809
    local c = Create("ObjectValue")({
810
      Name = "creator",
811
      Value = owner,
812
      Parent = h
813
    })
814
    game:GetService("Debris"):AddItem(c, 0.5)
815
    if HitSound ~= nil and HitPitch ~= nil then
816
      CFuncs.Sound.Create(HitSound, hit, 1, HitPitch)
817
    end
818
    local Damage = math.random(minim, maxim)
819
    local blocked = false
820
    local block = hit.Parent:findFirstChild("Block")
821
    if block ~= nil and block.className == "IntValue" and block.Value > 0 then
822
      blocked = true
823
      block.Value = block.Value - 1
824
      print(block.Value)
825
    end
826
    if blocked == false then
827
      HitHealth = h.Health
828
      h.Health = h.Health - Damage
829
      if HitHealth ~= h.Health and HitHealth ~= 0 and 0 >= h.Health and h.Parent.Name ~= "Hologram" then
830
        print("gained kill")
831
      end
832
      ShowDamage(Part.CFrame * CFrame.new(0, 0, Part.Size.Z / 2).p + Vector3.new(0, 1.5, 0), -Damage, 1.5, Part.BrickColor.Color)
833
    else
834
      h.Health = h.Health - Damage / 2
835
      ShowDamage(Part.CFrame * CFrame.new(0, 0, Part.Size.Z / 2).p + Vector3.new(0, 1.5, 0), -Damage, 1.5, Part.BrickColor.Color)
836
    end
837
    if Type == "Knockdown" then
838
      local hum = hit.Parent.Humanoid
839
      hum.PlatformStand = true
840
      coroutine.resume(coroutine.create(function(HHumanoid)
841
        swait(1)
842
        HHumanoid.PlatformStand = false
843
      end), hum)
844
      local angle = hit.Position - (Property.Position + Vector3.new(0, 0, 0)).unit
845
      local bodvol = Create("BodyVelocity")({
846
        velocity = angle * knockback,
847
        P = 5000,
848
        maxForce = Vector3.new(8000, 8000, 8000),
849
        Parent = hit
850
      })
851
      local rl = Create("BodyAngularVelocity")({
852
        P = 3000,
853
        maxTorque = Vector3.new(500000, 500000, 500000) * 50000000000000,
854
        angularvelocity = Vector3.new(math.random(-10, 10), math.random(-10, 10), math.random(-10, 10)),
855
        Parent = hit
856
      })
857
      game:GetService("Debris"):AddItem(bodvol, 0.5)
858
      game:GetService("Debris"):AddItem(rl, 0.5)
859
    elseif Type == "Normal" then
860
      local vp = Create("BodyVelocity")({
861
        P = 500,
862
        maxForce = Vector3.new(math.huge, 0, math.huge),
863
        velocity = Property.CFrame.lookVector * knockback + Property.Velocity / 1.05
864
      })
865
      if knockback > 0 then
866
        vp.Parent = hit.Parent.Torso
867
      end
868
      game:GetService("Debris"):AddItem(vp, 0.5)
869
    elseif Type == "Up" then
870
      local bodyVelocity = Create("BodyVelocity")({
871
        velocity = Vector3.new(0, 20, 0),
872
        P = 5000,
873
        maxForce = Vector3.new(8000, 8000, 8000),
874
        Parent = hit
875
      })
876
      game:GetService("Debris"):AddItem(bodyVelocity, 0.5)
877
      local bodyVelocity = Create("BodyVelocity")({
878
        velocity = Vector3.new(0, 20, 0),
879
        P = 5000,
880
        maxForce = Vector3.new(8000, 8000, 8000),
881
        Parent = hit
882
      })
883
      game:GetService("Debris"):AddItem(bodyVelocity, 1)
884
    elseif Type == "Leech" then
885
      local hum = hit.Parent.Humanoid
886
      if hum ~= nil then
887
        for i = 0, 2 do
888
          Effects.Sphere.Create(BrickColor.new("Bright red"), hit.Parent.Torso.CFrame * cn(0, 0, 0) * angles(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50)), 1, 15, 1, 0, 5, 0, 0.02)
889
        end
890
        Humanoid.Health = Humanoid.Health + 10
891
      end
892
    elseif Type == "UpKnock" then
893
      local hum = hit.Parent.Humanoid
894
      hum.PlatformStand = true
895
      if hum ~= nil then
896
        hitr = true
897
      end
898
      coroutine.resume(coroutine.create(function(HHumanoid)
899
        swait(5)
900
        HHumanoid.PlatformStand = false
901
        hitr = false
902
      end), hum)
903
      local bodyVelocity = Create("BodyVelocity")({
904
        velocity = Vector3.new(0, 20, 0),
905
        P = 5000,
906
        maxForce = Vector3.new(8000, 8000, 8000),
907
        Parent = hit
908
      })
909
      game:GetService("Debris"):AddItem(bodyVelocity, 0.5)
910
      local bodyVelocity = Create("BodyVelocity")({
911
        velocity = Vector3.new(0, 20, 0),
912
        P = 5000,
913
        maxForce = Vector3.new(8000, 8000, 8000),
914
        Parent = hit
915
      })
916
      game:GetService("Debris"):AddItem(bodyVelocity, 1)
917
    elseif Type == "Snare" then
918
      local bp = Create("BodyPosition")({
919
        P = 2000,
920
        D = 100,
921
        maxForce = Vector3.new(math.huge, math.huge, math.huge),
922
        position = hit.Parent.Torso.Position,
923
        Parent = hit.Parent.Torso
924
      })
925
      game:GetService("Debris"):AddItem(bp, 1)
926
    elseif Type == "Slashnare" then
927
      Effects.Block.Create(BrickColor.new("Pastel Blue"), hit.Parent.Torso.CFrame * cn(0, 0, 0), 15*4, 15*4, 15*4, 3*4, 3*4, 3*4, 0.07)
928
      for i = 1, math.random(4, 5) do
929
        Effects.Sphere.Create(BrickColor.new("Teal"), hit.Parent.Torso.CFrame * cn(math.random(-5, 5), math.random(-5, 5), math.random(-5, 5)) * angles(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50)), 1, 15, 1, 0, 5, 0, 0.02)
930
      end
931
      local bp = Create("BodyPosition")({
932
        P = 2000,
933
        D = 100,
934
        maxForce = Vector3.new(math.huge, math.huge, math.huge),
935
        position = hit.Parent.Torso.Position,
936
        Parent = hit.Parent.Torso
937
      })
938
      game:GetService("Debris"):AddItem(bp, 1)
939
    elseif Type == "Spike" then
940
      CreateBigIceSword(hit.Parent.Torso.CFrame)
941
      local bp = Create("BodyPosition")({
942
        P = 2000,
943
        D = 100,
944
        maxForce = Vector3.new(math.huge, math.huge, math.huge),
945
        position = hit.Parent.Torso.Position,
946
        Parent = hit.Parent.Torso
947
      })
948
      game:GetService("Debris"):AddItem(bp, 1)
949
    elseif Type == "Freeze" then
950
      local BodPos = Create("BodyPosition")({
951
        P = 50000,
952
        D = 1000,
953
        maxForce = Vector3.new(math.huge, math.huge, math.huge),
954
        position = hit.Parent.Torso.Position,
955
        Parent = hit.Parent.Torso
956
      })
957
      local BodGy = Create("BodyGyro")({
958
        maxTorque = Vector3.new(400000, 400000, 400000) * math.huge,
959
        P = 20000,
960
        Parent = hit.Parent.Torso,
961
        cframe = hit.Parent.Torso.CFrame
962
      })
963
      hit.Parent.Torso.Anchored = true
964
      coroutine.resume(coroutine.create(function(Part)
965
        swait(1.5)
966
        Part.Anchored = false
967
      end), hit.Parent.Torso)
968
      game:GetService("Debris"):AddItem(BodPos, 3)
969
      game:GetService("Debris"):AddItem(BodGy, 3)
970
    end
971
    local debounce = Create("BoolValue")({
972
      Name = "DebounceHit",
973
      Parent = hit.Parent,
974
      Value = true
975
    })
976
    game:GetService("Debris"):AddItem(debounce, Delay)
977
    c = Instance.new("ObjectValue")
978
    c.Name = "creator"
979
    c.Value = Player
980
    c.Parent = h
981
    game:GetService("Debris"):AddItem(c, 0.5)
982
  end
983
end
984
function ShowDamage(Pos, Text, Time, Color)
985
  local Rate = 0.1
986
  local Pos = Pos or Vector3.new(0, 0, 0)
987
  local Text = Text or ""
988
  local Time = Time or 2
989
  local Color = Color or Color3.new(1, 0, 1)
990
  local EffectPart = CreatePart(workspace, "SmoothPlastic", 0, 1, BrickColor.new(Color), "Effect", Vector3.new(0, 0, 0))
991
  EffectPart.Anchored = true
992
  local BillboardGui = Create("BillboardGui")({
993
    Size = UDim2.new(3, 0, 3, 0),
994
    Adornee = EffectPart,
995
    Parent = EffectPart
996
  })
997
  local TextLabel = Create("TextLabel")({
998
    BackgroundTransparency = 1,
999
    Size = UDim2.new(1, 0, 1, 0),
1000
    Text = Text,
1001
    TextColor3 = Color3.new(1,1,1),
1002
    TextStrokeColor3 = Color3.new(0,0,0),
1003
    TextStrokeTransparency = 0.25,
1004
    TextScaled = true,
1005
    Font = Enum.Font.Fantasy,
1006
    TextSize = 24,
1007
    Parent = BillboardGui
1008
  })
1009
  game.Debris:AddItem(EffectPart, Time + 0.1)
1010
  EffectPart.Parent = game:GetService("Workspace")
1011
  delay(0, function()
1012
    local Frames = Time / Rate
1013
    for Frame = 1, Frames do
1014
      swait(Rate)
1015
      local Percent = Frame / Frames
1016
      EffectPart.CFrame = CFrame.new(Pos) + Vector3.new(0, Percent*2, 0)
1017
      TextLabel.TextTransparency = Percent
1018
      TextLabel.TextStrokeTransparency = Percent
1019
    end
1020
    if EffectPart and EffectPart.Parent then
1021
      EffectPart:Destroy()
1022
    end
1023
  end)
1024
end
1025
function MagniDamage(Part, magni, mindam, maxdam, knock, Type)
1026
  for _, c in pairs(workspace:children()) do
1027
    local hum = c:findFirstChild("Humanoid")
1028
    if hum ~= nil then
1029
      local head = c:findFirstChild("Torso")
1030
      if head ~= nil then
1031
        local targ = head.Position - Part.Position
1032
        local mag = targ.magnitude
1033
        if magni >= mag and c.Name ~= Player.Name then
1034
          Damagefunc(head, head, mindam, maxdam, knock, Type, RootPart, 0.1, "rbxassetid://231917784", 1)
1035
        end
1036
      end
1037
    end
1038
  end
1039
end
1040
1041
function MagniDamageWithEffect(Part, magni, mindam, maxdam, knock, Type)
1042
  for _, c in pairs(workspace:children()) do
1043
    local hum = c:findFirstChild("Humanoid")
1044
    if hum ~= nil then
1045
      local head = c:findFirstChild("Torso")
1046
      if head ~= nil then
1047
        local targ = head.Position - Part.Position
1048
        local mag = targ.magnitude
1049
        if magni >= mag and c.Name ~= Player.Name then
1050
	MagicBlock(BrickColor.new("Dark indigo"),head.CFrame,5,5,5,1,1,1,0.05)
1051
          Damagefunc(head, head, mindam, maxdam, knock, Type, RootPart, 0.1, "rbxassetid://231917784", 1)
1052
        end
1053
      end
1054
    end
1055
  end
1056
end
1057
1058
function rayCast(Pos, Dir, Max, Ignore)  -- Origin Position , Direction, MaxDistance , IgnoreDescendants
1059
return game:service("Workspace"):FindPartOnRay(Ray.new(Pos, Dir.unit * (Max or 999.999)), Ignore) 
1060
end 
1061
1062
function SkullEffect(brickcolor,cframe,x1,y1,z1,delay)
1063
local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5))
1064
prt.Anchored=true
1065
prt.CFrame=cframe
1066
local msh=mesh("SpecialMesh",prt,"FileMesh","http://www.roblox.com/asset/?id=4770583",vt(0,0,0),vt(x1,y1,z1))
1067
--http://www.roblox.com/asset/?id=4770560
1068
game:GetService("Debris"):AddItem(prt,2)
1069
CF=prt.CFrame
1070
coroutine.resume(coroutine.create(function(Part,Mesh,TehCF) 
1071
for i=0,1,0.2 do
1072
wait()
1073
Part.CFrame=CF*cf(0,0,-0.4)
1074
end
1075
for i=0,1,delay do
1076
wait()
1077
--Part.CFrame=CF*cf((math.random(-1,0)+math.random())/5,(math.random(-1,0)+math.random())/5,(math.random(-1,0)+math.random())/5)
1078
Mesh.Scale=Mesh.Scale
1079
end
1080
for i=0,1,0.1 do
1081
wait()
1082
Part.Transparency=i
1083
end
1084
Part.Parent=nil
1085
end),prt,msh,CF)
1086
end
1087
 
1088
function MagicBlock(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay)
1089
local prt=part(3,char,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5))
1090
prt.Anchored=true
1091
prt.Material = "Neon"
1092
prt.CFrame=cframe
1093
prt.CFrame=prt.CFrame*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50))
1094
msh=mesh("BlockMesh",prt,"","",vt(0,0,0),vt(x1,y1,z1))
1095
game:GetService("Debris"):AddItem(prt,5)
1096
coroutine.resume(coroutine.create(function(Part,Mesh) 
1097
for i=0,1,delay do
1098
swait()
1099
Part.CFrame=Part.CFrame*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50))
1100
Part.Transparency=i
1101
Mesh.Scale=Mesh.Scale+vt(x3,y3,z3)
1102
end
1103
Part.Parent=nil
1104
end),prt,msh)
1105
end
1106
1107
function MagicBlockSteady(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay,rottype)
1108
local prt=part(3,char,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5))
1109
prt.Anchored=true
1110
prt.Material = "Neon"
1111
prt.CFrame=cframe
1112
msh=mesh("BlockMesh",prt,"","",vt(0,0,0),vt(x1,y1,z1))
1113
game:GetService("Debris"):AddItem(prt,5)
1114
coroutine.resume(coroutine.create(function(Part,Mesh) 
1115
	local rtype = rottype
1116
for i=0,1,delay do
1117
swait()
1118
if rtype == 1 then
1119
prt.CFrame = prt.CFrame*CFrame.Angles(0,0,0.1)
1120
elseif rtype == 2 then
1121
prt.CFrame = prt.CFrame*CFrame.Angles(0,0,-0.1)
1122
end
1123
Part.Transparency=i
1124
Mesh.Scale=Mesh.Scale+vt(x3,y3,z3)
1125
end
1126
Part.Parent=nil
1127
end),prt,msh)
1128
end
1129
1130
function MagicSphere(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay)
1131
local prt=part(3,char,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5))
1132
prt.Anchored=true
1133
prt.CFrame=cframe
1134
prt.CFrame=prt.CFrame*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50))
1135
msh=mesh("SpecialMesh",prt,"Sphere","",vt(0,0,0),vt(x1,y1,z1))
1136
game:GetService("Debris"):AddItem(prt,5)
1137
coroutine.resume(coroutine.create(function(Part,Mesh) 
1138
for i=0,1,delay do
1139
wait()
1140
Part.Transparency=i
1141
Mesh.Scale=Mesh.Scale+vt(x3,y3,z3)
1142
end
1143
Part.Parent=nil
1144
end),prt,msh)
1145
end
1146
1147
function MagicBlockSteady(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay,rottype)
1148
local prt=part(3,char,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5))
1149
prt.Anchored=true
1150
prt.Material = "Neon"
1151
prt.CFrame=cframe
1152
msh=mesh("BlockMesh",prt,"","",vt(0,0,0),vt(x1,y1,z1))
1153
game:GetService("Debris"):AddItem(prt,5)
1154
coroutine.resume(coroutine.create(function(Part,Mesh) 
1155
	local rtype = rottype
1156
for i=0,1,delay do
1157
swait()
1158
if rtype == 1 then
1159
prt.CFrame = prt.CFrame*CFrame.Angles(0,0,0.1)
1160
elseif rtype == 2 then
1161
prt.CFrame = prt.CFrame*CFrame.Angles(0,0,-0.1)
1162
end
1163
Part.Transparency=i
1164
Mesh.Scale=Mesh.Scale+vt(x3,y3,z3)
1165
end
1166
Part.Parent=nil
1167
end),prt,msh)
1168
end
1169
1170
function MagicShock(brickcolor,cframe,x1,y1,x3,y3,delay,rottype)
1171
local prt=part(3,char,1,1,brickcolor,"Effect",vt(0.5,0.5,0.5))
1172
prt.Anchored=true
1173
prt.Material = "Neon"
1174
prt.CFrame=cframe
1175
local dec = decal(prt.Color,"http://www.roblox.com/asset/?id=874580939","Front",prt)
1176
local dec2 = decal(prt.Color,"http://www.roblox.com/asset/?id=874580939","Front",prt)
1177
msh=mesh("BlockMesh",prt,"","",vt(0,0,0),vt(x1,y1,0.01))
1178
game:GetService("Debris"):AddItem(prt,5)
1179
coroutine.resume(coroutine.create(function(Part,Mesh) 
1180
	local rtype = rottype
1181
for i=0,1,delay do
1182
swait()
1183
if rtype == 1 then
1184
prt.CFrame = prt.CFrame*CFrame.Angles(0,0,0.1)
1185
elseif rtype == 2 then
1186
prt.CFrame = prt.CFrame*CFrame.Angles(0,0,-0.1)
1187
end
1188
dec.Transparency=i
1189
dec2.Transparency=i
1190
Mesh.Scale=Mesh.Scale+vt(x3,y3,0)
1191
end
1192
Part.Parent=nil
1193
end),prt,msh)
1194
end
1195
1196
function MagicShockAlt(brickcolor,cframe,x1,y1,x3,y3,delay,rottype)
1197
local prt=part(3,char,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5))
1198
prt.Anchored=true
1199
prt.Material = "Neon"
1200
prt.CFrame=cframe
1201
msh=mesh("BlockMesh",prt,"","",vt(0,0,0),vt(x1,y1,0.01))
1202
game:GetService("Debris"):AddItem(prt,5)
1203
coroutine.resume(coroutine.create(function(Part,Mesh) 
1204
	local rtype = rottype
1205
for i=0,1,delay do
1206
swait()
1207
if rtype == 1 then
1208
prt.CFrame = prt.CFrame*CFrame.Angles(0,0,0.1)
1209
elseif rtype == 2 then
1210
prt.CFrame = prt.CFrame*CFrame.Angles(0,0,-0.1)
1211
end
1212
prt.Transparency=i
1213
Mesh.Scale=Mesh.Scale+vt(x3,y3,0)
1214
end
1215
Part.Parent=nil
1216
end),prt,msh)
1217
end
1218
1219
function MagicShockAltCircle(brickcolor,cframe,x1,z1,x3,z3,delay,rottype)
1220
local prt=part(3,char,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5))
1221
prt.Anchored=true
1222
prt.Material = "Neon"
1223
prt.CFrame=cframe
1224
msh=mesh("BlockMesh",prt,"","",vt(0,0,0),vt(x1,1,z1))
1225
game:GetService("Debris"):AddItem(prt,5)
1226
coroutine.resume(coroutine.create(function(Part,Mesh) 
1227
	local rtype = rottype
1228
for i=0,1,delay do
1229
swait()
1230
if rtype == 1 then
1231
prt.CFrame = prt.CFrame*CFrame.Angles(0,0.1,0)
1232
elseif rtype == 2 then
1233
prt.CFrame = prt.CFrame*CFrame.Angles(0,-0.1,0)
1234
end
1235
prt.Transparency=i
1236
Mesh.Scale=Mesh.Scale+vt(x3,0,z3)
1237
end
1238
Part.Parent=nil
1239
end),prt,msh)
1240
end
1241
1242
function MagicShockTrailAlt(brickcolor,cframe,x1,y1,z1,x3,y3,delay,rottype)
1243
local prt=part(3,char,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5))
1244
prt.Anchored=true
1245
prt.Material = "Neon"
1246
prt.CFrame=cframe
1247
msh=mesh("BlockMesh",prt,"","",vt(0,0,0),vt(x1,y1,z1))
1248
game:GetService("Debris"):AddItem(prt,5)
1249
coroutine.resume(coroutine.create(function(Part,Mesh) 
1250
	local rtype = rottype
1251
for i=0,1,delay do
1252
swait()
1253
if rtype == 1 then
1254
prt.CFrame = prt.CFrame*CFrame.Angles(0,0,0.1)
1255
elseif rtype == 2 then
1256
prt.CFrame = prt.CFrame*CFrame.Angles(0,0,-0.1)
1257
end
1258
prt.Transparency=i
1259
Mesh.Scale=Mesh.Scale+vt(x3,y3,0)
1260
end
1261
Part.Parent=nil
1262
end),prt,msh)
1263
end
1264
1265
function MagicShockTrailAlt2(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay,rottype)
1266
local prt=part(3,char,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5))
1267
prt.Anchored=true
1268
prt.Material = "Neon"
1269
prt.CFrame=cframe
1270
msh=mesh("BlockMesh",prt,"","",vt(0,0,0),vt(x1,y1,z1))
1271
game:GetService("Debris"):AddItem(prt,5)
1272
coroutine.resume(coroutine.create(function(Part,Mesh) 
1273
	local rtype = rottype
1274
for i=0,1,delay do
1275
swait()
1276
if rtype == 1 then
1277
prt.CFrame = prt.CFrame*CFrame.Angles(0,0,0.1)
1278
elseif rtype == 2 then
1279
prt.CFrame = prt.CFrame*CFrame.Angles(0,0,-0.1)
1280
end
1281
prt.Transparency=i
1282
Mesh.Scale=Mesh.Scale+vt(x3,y3,z3)
1283
end
1284
Part.Parent=nil
1285
end),prt,msh)
1286
end
1287
 
1288
function MagicBlock2(brickcolor,cframe,Parent,x1,y1,z1,x3,y3,z3,delay)
1289
local prt=part(3,char,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5))
1290
prt.Anchored=false
1291
prt.CFrame=cframe
1292
msh=mesh("BlockMesh",prt,"","",vt(0,0,0),vt(x1,y1,z1))
1293
local wld=weld(prt,prt,Parent,cframe)
1294
game:GetService("Debris"):AddItem(prt,5)
1295
coroutine.resume(coroutine.create(function(Part,Mesh,Weld) 
1296
for i=0,1,delay do
1297
wait()
1298
Weld.C0=euler(math.random(-50,50),math.random(-50,50),math.random(-50,50))*cframe
1299
--Part.CFrame=Part.CFrame*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50))
1300
Part.Transparency=i
1301
Mesh.Scale=Mesh.Scale+vt(x3,y3,z3)
1302
end
1303
Part.Parent=nil
1304
end),prt,msh,wld)
1305
end
1306
 
1307
function MagicBlock3(brickcolor,cframe,Parent,x1,y1,z1,x3,y3,z3,delay)
1308
local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5))
1309
prt.Anchored=false
1310
prt.CFrame=cframe
1311
msh=mesh("BlockMesh",prt,"","",vt(0,0,0),vt(x1,y1,z1))
1312
local wld=weld(prt,prt,Parent,euler(0,0,0)*cf(0,0,0))
1313
game:GetService("Debris"):AddItem(prt,5)
1314
coroutine.resume(coroutine.create(function(Part,Mesh,Weld) 
1315
for i=0,1,delay do
1316
wait()
1317
Weld.C0=euler(i*20,0,0)
1318
--Part.CFrame=Part.CFrame*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50))
1319
Part.Transparency=i
1320
Mesh.Scale=Mesh.Scale+vt(x3,y3,z3)
1321
end
1322
Part.Parent=nil
1323
end),prt,msh,wld)
1324
end
1325
 
1326
function MagicCircle2(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay)
1327
local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5))
1328
prt.Anchored=true
1329
prt.CFrame=cframe
1330
local msh=mesh("CylinderMesh",prt,"","",vt(0,0,0),vt(x1,y1,z1))
1331
game:GetService("Debris"):AddItem(prt,2)
1332
coroutine.resume(coroutine.create(function(Part,Mesh) 
1333
for i=0,1,delay do
1334
wait()
1335
Part.CFrame=Part.CFrame
1336
Mesh.Scale=Mesh.Scale+vt(x3,y3,z3)
1337
local prt2=part(3,workspace,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5))
1338
prt2.Anchored=true
1339
prt2.CFrame=cframe*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50))
1340
local msh2=mesh("SpecialMesh",prt2,"Sphere","",vt(0,0,0),vt(0.5,0.5,0.5))
1341
game:GetService("Debris"):AddItem(prt2,2)
1342
coroutine.resume(coroutine.create(function(Part,Mesh) 
1343
for i=0,1,0.1 do
1344
wait()
1345
Part.CFrame=Part.CFrame*cf(0,0.5,0)
1346
end
1347
Part.Parent=nil
1348
end),prt2,msh2)
1349
end
1350
for i=0,1,delay*2 do
1351
wait()
1352
Part.CFrame=Part.CFrame
1353
Mesh.Scale=vt((x1+x3)-(x1+x3)*i,(y1+y3)-(y1+y3)*i,(z1+z3)-(z1+z3)*i)
1354
end
1355
Part.Parent=nil
1356
end),prt,msh)
1357
end
1358
 
1359
function MagicCircle(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay)
1360
local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5))
1361
prt.Anchored=true
1362
prt.CFrame=cframe
1363
local msh=mesh("SpecialMesh",prt,"Sphere","",vt(0,0,0),vt(x1,y1,z1))
1364
game:GetService("Debris"):AddItem(prt,2)
1365
coroutine.resume(coroutine.create(function(Part,Mesh) 
1366
for i=0,1,delay do
1367
wait()
1368
Part.CFrame=Part.CFrame
1369
Part.Transparency=i
1370
Mesh.Scale=Mesh.Scale+vt(x3,y3,z3)
1371
end
1372
Part.Parent=nil
1373
end),prt,msh)
1374
end
1375
 
1376
function BreakEffect(brickcolor,cframe,x1,y1,z1)
1377
local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5))
1378
prt.Anchored=true
1379
prt.CFrame=cframe*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50))
1380
local msh=mesh("SpecialMesh",prt,"Sphere","",vt(0,0,0),vt(x1,y1,z1))
1381
game:GetService("Debris"):AddItem(prt,2)
1382
coroutine.resume(coroutine.create(function(Part,CF,Numbb,randnumb) 
1383
CF=Part.CFrame
1384
Numbb=0
1385
randnumb=math.random()/10
1386
rand1=math.random()/10
1387
for i=0,1,rand1 do
1388
wait()
1389
CF=CF*cf(0,math.random()/2,0)
1390
--Part.CFrame=Part.CFrame*euler(0.5,0,0)*cf(0,1,0)
1391
Part.CFrame=CF*euler(Numbb,0,0)
1392
Part.Transparency=i
1393
Numbb=Numbb+randnumb
1394
end
1395
Part.Parent=nil
1396
end),prt,CF,Numbb,randnumb)
1397
end
1398
 
1399
function MagicWaveThing(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay)
1400
local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5))
1401
prt.Anchored=true
1402
prt.CFrame=cframe
1403
msh=mesh("SpecialMesh",prt,"FileMesh","http://www.roblox.com/asset/?id=1051557",vt(0,0,0),vt(x1,y1,z1))
1404
game:GetService("Debris"):AddItem(prt,5)
1405
coroutine.resume(coroutine.create(function(Part,Mesh) 
1406
for i=0,1,delay do
1407
wait()
1408
Part.CFrame=Part.CFrame*euler(0,0.7,0)
1409
Part.Transparency=i
1410
Mesh.Scale=Mesh.Scale+vt(x3,y3,z3)
1411
end
1412
Part.Parent=nil
1413
end),prt,msh)
1414
end
1415
 
1416
function WaveEffect(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay)
1417
local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5))
1418
prt.Anchored=true
1419
prt.CFrame=cframe
1420
msh=mesh("SpecialMesh",prt,"FileMesh","http://www.roblox.com/asset/?id=20329976",vt(0,0,0),vt(x1,y1,z1))
1421
game:GetService("Debris"):AddItem(prt,2)
1422
coroutine.resume(coroutine.create(function(Part,Mesh) 
1423
for i=0,1,delay do
1424
wait()
1425
Part.CFrame=Part.CFrame*cf(0,y3/2,0)
1426
Part.Transparency=i
1427
Mesh.Scale=Mesh.Scale+vt(x3,y3,z3)
1428
end
1429
Part.Parent=nil
1430
end),prt,msh)
1431
end
1432
 
1433
function StravEffect(brickcolor,cframe,x,y,z,x1,y1,z1,delay)
1434
local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5))
1435
prt.Anchored=true
1436
prt.CFrame=cframe*cf(x,y,z)
1437
msh=mesh("SpecialMesh",prt,"FileMesh","rbxassetid://168892363",vt(0,0,0),vt(x1,y1,z1))
1438
game:GetService("Debris"):AddItem(prt,5)
1439
coroutine.resume(coroutine.create(function(Part,Mesh,ex,why,zee) 
1440
local num=math.random()
1441
local num2=math.random(-3,2)+math.random()
1442
local numm=0
1443
for i=0,1,delay*2 do
1444
swait()
1445
Part.CFrame=cframe*euler(0,numm*num*10,0)*cf(ex,why,zee)*cf(-i*10,num2,0)
1446
Part.Transparency=i
1447
numm=numm+0.01
1448
end
1449
Part.Parent=nil
1450
Mesh.Parent=nil
1451
end),prt,msh,x,y,z)
1452
end
1453
1454
function dmgstart(dmg,what)
1455
	hitcon = what.Touched:connect(function(hit)
1456
		local hum = hit.Parent:FindFirstChild("Humanoid")
1457
		if hum and not hum:IsDescendantOf(Character) then
1458
			hum:TakeDamage(dmg)
1459
		end
1460
	end)
1461
end
1462
1463
function dmgstop()
1464
	hitcon:disconnect()
1465
end
1466
1467
function Cloak()
1468
Face.Parent=nil
1469
cloaked=true
1470
        for _,v in pairs(Torso.Parent:children()) do
1471
                if v.className=="Part" and v.Name~="HumanoidRootPart" then
1472
                coroutine.resume(coroutine.create(function() 
1473
                for i=0,1,0.2 do
1474
                wait()
1475
                v.Transparency=i
1476
                end
1477
                v.Transparency=1
1478
                end))
1479
                end
1480
                if v.className=="Hat" then
1481
                hatp=v.Handle
1482
                coroutine.resume(coroutine.create(function(derp) 
1483
                for i=0,1,0.2 do
1484
                wait()
1485
                derp.Transparency=i
1486
                end
1487
                derp.Transparency=1
1488
                end),hatp)
1489
                end
1490
        end
1491
        for _,v in pairs(m:children()) do
1492
                if v.className=="Part" then
1493
                coroutine.resume(coroutine.create(function() 
1494
                for i=0,1,0.2 do
1495
                wait()
1496
                v.Transparency=i
1497
                end
1498
                v.Transparency=1
1499
                end))
1500
                end
1501
        end
1502
end
1503
 
1504
function UnCloak()
1505
so("http://roblox.com/asset/?id=2767090",Torso,1,1.1) 
1506
Face.Parent=Head 
1507
cloaked=false
1508
        for _,v in pairs(Torso.Parent:children()) do
1509
                if v.className=="Part" and v.Name~="HumanoidRootPart" then
1510
                coroutine.resume(coroutine.create(function() 
1511
                for i=0,1,0.1 do
1512
                wait()
1513
                v.Transparency=v.Transparency-0.1
1514
                end
1515
                v.Transparency=0
1516
                end))
1517
                end
1518
                if v.className=="Hat" then
1519
                hatp=v.Handle
1520
                coroutine.resume(coroutine.create(function(derp) 
1521
                for i=0,1,0.1 do
1522
                wait()
1523
                derp.Transparency=derp.Transparency-0.1
1524
                end
1525
                derp.Transparency=0
1526
                end),hatp)
1527
                end
1528
        end
1529
        for _,v in pairs(m:children()) do
1530
                if v.className=="Part" and v.Name~="hitbox" and v.Name~='tip' then
1531
                coroutine.resume(coroutine.create(function() 
1532
                for i=0,1,0.1 do
1533
                wait()
1534
                v.Transparency=v.Transparency-0.1
1535
                end
1536
                v.Transparency=0
1537
                end))
1538
                v.Transparency=0
1539
                end
1540
        end
1541
end
1542
1543
local origcolor = BrickColor.new("Dark indigo")
1544
---- This section of explosions.
1545
function Explode(rad,par,pitch,vol,mindam,maxdam)
1546
	local expart = Instance.new("Part",char)
1547
	local expart2 = Instance.new("Part",char)
1548
	local rin = Instance.new("Part",char)
1549
	local rin2 = Instance.new("Part",char)
1550
	local partMesh = Instance.new("SpecialMesh",expart)
1551
	partMesh.MeshType = "Sphere"
1552
	local partMesh2 = Instance.new("SpecialMesh",expart2)
1553
	partMesh2.MeshType = "Sphere"
1554
	local partMesh3 = Instance.new("SpecialMesh",rin)
1555
	partMesh3.MeshType = "Brick"
1556
	local partMesh4 = Instance.new("SpecialMesh",rin2)
1557
	partMesh4.MeshType = "Brick"
1558
	CFuncs["Sound"].Create("rbxassetid://165970126", expart,vol, pitch)
1559
	partMesh.Scale = vt(rad,rad,rad)
1560
	expart.Size = vt(1,1,1)
1561
	expart.Transparency = 1
1562
	expart.Anchored = true
1563
	expart.Material = "Neon"
1564
	expart.BrickColor = bc("White")
1565
	expart.CFrame = par.CFrame
1566
	partMesh2.Scale = vt(rad,rad,rad)
1567
	expart2.Size = vt(1.15,1.15,1.15)
1568
	expart2.Transparency = 0.75
1569
	expart2.Anchored = true
1570
	expart2.Material = "Glass"
1571
	expart2.BrickColor = par.BrickColor
1572
	expart2.CFrame = par.CFrame
1573
	rin.Size = vt(1.15,1.15,1.15)
1574
	rin.Transparency = 1
1575
	rin.Anchored = true
1576
	rin.Material = "Neon"
1577
	rin.BrickColor = par.BrickColor
1578
	rin.CFrame = par.CFrame*CFrame.Angles(math.rad(math.random(-360,360)),math.rad(math.random(-360,360)),math.rad(math.random(-360,360)))
1579
	rin2.Size = vt(1.15,1.15,1.15)
1580
	rin2.Transparency = 1
1581
	rin2.Anchored = true
1582
	rin2.Material = "Neon"
1583
	rin2.BrickColor = par.BrickColor
1584
	rin2.CFrame = par.CFrame*CFrame.Angles(math.rad(math.random(-360,360)),math.rad(math.random(-360,360)),math.rad(math.random(-360,360)))
1585
	partMesh3.Scale = vt(0,1,0)
1586
	partMesh4.Scale = vt(0,1,0)
1587
local dec2 = Instance.new("Decal", rin)
1588
dec2.Face = "Top"
1589
dec2.Texture = "http://www.roblox.com/asset/?id=874580939"
1590
dec2.Parent = rin
1591
local dec2b = dec2:Clone()
1592
dec2b.Face = "Bottom"
1593
dec2b.Parent = rin
1594
1595
local dec2a = Instance.new("Decal", rin2)
1596
dec2a.Face = "Top"
1597
dec2a.Texture = "http://www.roblox.com/asset/?id=874580939"
1598
dec2a.Parent = rin2
1599
local dec2ab = dec2a:Clone()
1600
dec2ab.Face = "Bottom"
1601
dec2ab.Parent = rin2
1602
expart.CanCollide = false
1603
expart2.CanCollide = false
1604
rin.CanCollide = false
1605
rin2.CanCollide = false
1606
MagniDamage(par, rad*5, mindam, maxdam, 0, "Normal")
1607
        local value = 1*rad/6.5
1608
	for i = 0, 199 do
1609
                partMesh.Scale = partMesh.Scale + vt(value,value,value)
1610
		expart.CFrame = expart.CFrame
1611
                partMesh2.Scale = partMesh2.Scale + vt(value,value,value)
1612
		expart2.CFrame = expart.CFrame
1613
                value = value - 0.035*rad/30
1614
                if value < 7.5 then
1615
	partMesh3.Scale = partMesh3.Scale + vt(rad/5,0,rad/5)
1616
		rin.CFrame = rin.CFrame*CFrame.Angles(0,math.rad(1),0)
1617
	partMesh4.Scale = partMesh4.Scale + vt(rad/7.5,0,rad/7.5)
1618
		rin2.CFrame = rin2.CFrame*CFrame.Angles(0,math.rad(-1),0)
1619
		end
1620
                if value < 0 then
1621
dec2.Transparency = dec2.Transparency + 0.025
1622
dec2a.Transparency = dec2a.Transparency + 0.025
1623
dec2b.Transparency = dec2b.Transparency + 0.025
1624
dec2ab.Transparency = dec2ab.Transparency + 0.025
1625
		expart.Transparency = expart.Transparency + 0.025
1626
		expart2.Transparency = expart2.Transparency + 0.025
1627
		rin.Transparency = rin.Transparency + 0.025
1628
		rin2.Transparency = rin2.Transparency + 0.025
1629
                end
1630
		swait()
1631
	end
1632
game:GetService("Debris"):AddItem(expart, 1)
1633
game:GetService("Debris"):AddItem(expart2, 1)
1634
game:GetService("Debris"):AddItem(rin, 1)
1635
game:GetService("Debris"):AddItem(rin2, 1)
1636
end
1637
1638
function ExplodeShort(rad,par,pitch,vol,mindam,maxdam)
1639
	local expart = Instance.new("Part",char)
1640
	local expart2 = Instance.new("Part",char)
1641
	local partMesh = Instance.new("SpecialMesh",expart)
1642
	partMesh.MeshType = "Sphere"
1643
	local partMesh2 = Instance.new("SpecialMesh",expart2)
1644
	partMesh2.MeshType = "Sphere"
1645
	CFuncs["Sound"].Create("http://www.roblox.com/asset/?id=142070127", expart,vol, pitch)
1646
	partMesh.Scale = vt(rad,rad,rad)
1647
	expart.Size = vt(1,1,1)
1648
	expart.Transparency = 0
1649
	expart.Anchored = true
1650
	expart.Material = "Neon"
1651
	expart.BrickColor = bc("White")
1652
	expart.CFrame = par.CFrame
1653
	partMesh2.Scale = vt(rad,rad,rad)
1654
	expart2.Size = vt(1.15,1.15,1.15)
1655
	expart2.Transparency = 0.5
1656
	expart2.Anchored = true
1657
	expart2.Material = "Neon"
1658
	expart2.BrickColor = par.BrickColor
1659
	expart2.CFrame = par.CFrame
1660
expart.CanCollide = false
1661
expart2.CanCollide = false
1662
MagniDamage(par, rad*2.5, mindam, maxdam, 0, "Normal")
1663
        local value = 1*rad/6.5
1664
	for i = 0, 75 do
1665
                partMesh.Scale = partMesh.Scale + vt(value,value,value)
1666
		expart.CFrame = expart.CFrame
1667
                partMesh2.Scale = partMesh2.Scale + vt(value,value,value)
1668
		expart2.CFrame = expart.CFrame
1669
                value = value - 0.035*rad/5
1670
                if value < 0 then
1671
value = 0
1672
		expart.Transparency = expart.Transparency + 0.05
1673
		expart2.Transparency = expart2.Transparency + 0.05
1674
                end
1675
		swait()
1676
	end
1677
game:GetService("Debris"):AddItem(expart, 1)
1678
game:GetService("Debris"):AddItem(expart2, 1)
1679
end
1680
1681
function AreaDanger(rad,par,mindam,maxdam)
1682
	local expart = Instance.new("Part",char)
1683
	local partMesh = Instance.new("SpecialMesh",expart)
1684
	CFuncs["Sound"].Create("rbxassetid://231917784", expart,1.5,1.15)
1685
	partMesh.MeshType = "Sphere"
1686
	partMesh.Scale = vt(rad,rad,rad)
1687
	expart.Size = vt(1,1,1)
1688
	expart.Transparency = 0.5
1689
	expart.Anchored = true
1690
	expart.Material = "Neon"
1691
	expart.CanCollide = false
1692
	expart.BrickColor = par.BrickColor
1693
	expart.CFrame = par.CFrame
1694
        local value = 1*rad/5
1695
MagicBlock(origcolor,expart.CFrame,0,0,0,rad/2,rad/2,rad/2,0.1)
1696
	for i = 0, 14 do
1697
		wait()
1698
                partMesh.Scale = partMesh.Scale + vt(value,value,value)
1699
		expart.CFrame = expart.CFrame
1700
                value = value - 0.035*rad
1701
                if value < 0 then
1702
	value = 0
1703
end
1704
	end
1705
	wait(0.25)
1706
CFuncs["Sound"].Create("rbxassetid://588738544", expart,1.5,1)
1707
wait(0.5)
1708
CFuncs["Sound"].Create("rbxassetid://588737825", expart,1.5,1)
1709
CFuncs["Sound"].Create("rbxassetid://231917784", expart,1.5,0.75)
1710
MagniDamageWithEffect(par, rad, mindam, maxdam, 0, "Normal")
1711
MagicBlock(origcolor,expart.CFrame,rad*2,rad*2,rad*2,0.1,0.1,0.1,0.025)
1712
for i = 0, 14 do
1713
		wait()
1714
                partMesh.Scale = partMesh.Scale + vt(value,value,value)
1715
		expart.CFrame = expart.CFrame
1716
                value = value - 0.035*rad/2
1717
end
1718
expart.Transparency = 1
1719
game:GetService("Debris"):AddItem(expart, 5)
1720
end
1721
1722
function Swarmsplosions(negrad,rad,par,mindam,maxdam)
1723
		CFuncs["Sound"].Create("rbxassetid://588737825", par, 2.5, 2)
1724
	CFuncs["Sound"].Create("rbxassetid://231917784", par, 2.5,1)
1725
	CFuncs["Sound"].Create("rbxassetid://231917744", par, 2.5,1)
1726
	CFuncs["Sound"].Create("rbxassetid://233856106", par, 2.5, 1)
1727
			MagniDamageWithEffect(par, 25, 5,10, 0, "Normal")
1728
			MagicBlock(origcolor,par.CFrame,5,5,5,5,5,5,0.025)
1729
	for i = 0, 24 do
1730
		MagicShockTrailAlt2(origcolor,par.CFrame*CFrame.Angles(math.rad(math.random(-360,360)),math.rad(math.random(-360,360)),math.rad(math.random(-360,360))),10/5,10/5,5,-0.05/5,-0.05/5,25,0.005,math.random(1,2))
1731
	end
1732
	for i = 0, 24 do
1733
	local expart = Instance.new("Part",char)
1734
	expart.Transparency = 1
1735
	expart.Anchored = true
1736
	expart.CanCollide = false
1737
	expart.CFrame = par.CFrame*CFrame.new(math.random(negrad,rad),math.random(negrad,rad),math.random(negrad,rad))
1738
CFuncs["Sound"].Create("rbxassetid://588737825", expart,1,2)
1739
CFuncs["Sound"].Create("rbxassetid://231917784", expart,1.5,1.15)
1740
MagniDamage(expart, rad/2, mindam, maxdam, 0, "Normal")
1741
MagicBlock(origcolor,expart.CFrame,rad,rad,rad,0.1,0.1,0.1,0.025)
1742
for i = 0, 9 do
1743
		MagicShockTrailAlt2(origcolor,expart.CFrame*CFrame.Angles(math.rad(math.random(-360,360)),math.rad(math.random(-360,360)),math.rad(math.random(-360,360))),10/5,10/5,5,-0.05/5,-0.05/5,5,0.05,math.random(1,2))
1744
	end
1745
game:GetService("Debris"):AddItem(expart, 2)
1746
wait(0.1)
1747
	end
1748
end
1749
1750
function EXterPlosion(par)
1751
		CFuncs["Sound"].Create("rbxassetid://919941001", par, 10, 1)
1752
	CFuncs["Sound"].Create("rbxassetid://138213851", par, 5,0.85)
1753
	CFuncs["Sound"].Create("rbxassetid://157878578", par, 5,0.2)
1754
	CFuncs["Sound"].Create("rbxassetid://233856106", par, 2.5, 1)
1755
			MagniDamageWithEffect(par, 500, 80,99, 0, "Normal")
1756
			MagicBlock(origcolor,par.CFrame,5,5,5,5,5,5,0.005)
1757
			MagicBlock(origcolor,par.CFrame,0,0,0,150,150,150,0.1)
1758
	for i = 0, 24 do
1759
		MagicShockTrailAlt2(origcolor,par.CFrame*CFrame.Angles(math.rad(math.random(-360,360)),math.rad(math.random(-360,360)),math.rad(math.random(-360,360))),10*5,10*5,5,-0.05*10,-0.05*10,500,0.1,math.random(1,2))
1760
	end
1761
	for i = 0, 24 do
1762
		MagicShockTrailAlt2(origcolor,par.CFrame*CFrame.Angles(math.rad(math.random(-360,360)),math.rad(math.random(-360,360)),math.rad(math.random(-360,360))),10*5,10*5,5,-0.05*5,-0.05*5,50,0.005,math.random(1,2))
1763
	end
1764
end
1765
----
1766
function bullit()
1767
	attack = true
1768
	for i = 0,1,0.1 do
1769
		swait()
1770
		MagicBlock(origcolor,sorb.CFrame,3,3,3,0.05,0.05,0.05,0.05)
1771
            RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(0),math.rad(0),math.rad(-80)),0.3)
1772
            Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(5),math.rad(0),math.rad(80)),.3)
1773
             RW.C0 = clerp(RW.C0, CFrame.new(1.45, 0.5, 0) * angles(math.rad(50), math.rad(0), math.rad(20)), 0.3)
1774
             LW.C0 = clerp(LW.C0, CFrame.new(-1.45, 0.5, 0) * angles(math.rad(50), math.rad(0), math.rad(-90)), 0.3)
1775
	end
1776
	CFuncs["Sound"].Create("rbxassetid://558640653", sorb, 1.5, 1)
1777
							local a = Instance.new("Part",Character)
1778
	a.Name = "Direction"	
1779
	a.Anchored = true
1780
	a.BrickColor = bc("Bright red")
1781
a.Material = "Neon"
1782
a.Transparency = 1
1783
	a.CanCollide = false
1784
	local ray = Ray.new(
1785
	    sorb.CFrame.p,                           -- origin
1786
	    (mouse.Hit.p - sorb.CFrame.p).unit * 500 -- direction
1787
	) 
1788
	local ignore = Character
1789
	local hit, position, normal = workspace:FindPartOnRay(ray, ignore)
1790
	a.BottomSurface = 10
1791
	a.TopSurface = 10
1792
	local distance = (root.CFrame.p - position).magnitude
1793
	a.Size = Vector3.new(0.1, 0.1, 0.1)
1794
	a.CFrame = CFrame.new(sorb.CFrame.p, position) * CFrame.new(0, 0, 0)
1795
				 local lb = Instance.new("Part")
1796
  lb.Parent = char
1797
    lb.BrickColor = origcolor
1798
     lb.CanCollide = false
1799
lb.Material = "Glass"
1800
     lb.Anchored = true
1801
lb.TopSurface = 0
1802
        lb.BottomSurface = 0
1803
     lb.Transparency = 0.75
1804
     lb.Size = vt(0.5,0.5,0.5)
1805
     lb.CFrame = a.CFrame
1806
lb.Anchored = false
1807
local thingery = Instance.new("SpecialMesh",lb)
1808
     thingery.MeshType = "Sphere"
1809
thingery.Scale = vt(20,20,20)
1810
game:GetService("Debris"):AddItem(lb, 10)
1811
  local bv = Instance.new("BodyVelocity")
1812
  bv.maxForce = Vector3.new(1e9, 1e9, 1e9)
1813
  bv.velocity = a.CFrame.lookVector*150
1814
  bv.Parent = lb
1815
local hitted = false
1816
game:GetService("Debris"):AddItem(a, 0.1)
1817
wait(0.01)
1818
lb.Touched:connect(function(hit) 
1819
	if hitted == false then
1820
		hitted = true
1821
		lb.Anchored = true
1822
		lb.Transparency = 1
1823
Explode(7.5,lb,1,1,10,15)
1824
	end
1825
end)
1826
	for i = 0,2,0.1 do
1827
		swait()
1828
		MagicBlock(origcolor,sorb.CFrame,3,3,3,0.05,0.05,0.05,0.05)
1829
            RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(20),math.rad(0),math.rad(80)),0.5)
1830
            Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(5),math.rad(0),math.rad(-80)),.5)
1831
             RW.C0 = clerp(RW.C0, CFrame.new(1.45, 0.5, 0) * angles(math.rad(50), math.rad(0), math.rad(20)), 0.5)
1832
             LW.C0 = clerp(LW.C0, CFrame.new(-1.45, 0.5, 0) * angles(math.rad(50), math.rad(0), math.rad(-90)), 0.5)
1833
	end
1834
	attack = false
1835
end
1836
1837
1838
function RingEffect(pos,startsize,size,col)
1839
local lb = Instance.new("Part")
1840
  lb.Parent = char
1841
    lb.BrickColor = col
1842
     lb.CanCollide = false
1843
lb.Material = "Neon"
1844
     lb.Anchored = true
1845
lb.TopSurface = 0
1846
        lb.BottomSurface = 0
1847
     lb.Transparency = 1
1848
     lb.Size = vt(1,1,1)
1849
     lb.CFrame = pos
1850
local thingery = Instance.new("SpecialMesh",lb)
1851
     thingery.MeshType = "Brick"
1852
thingery.Scale = vt(startsize,0.1,startsize)
1853
local dec2 = Instance.new("Texture", lb)
1854
dec2.Face = "Top"
1855
dec2.Texture = "http://www.roblox.com/asset/?id=874580939"
1856
dec2.Color3 = lb.Color
1857
dec2.Parent = lb
1858
dec2.StudsPerTileU = startsize
1859
dec2.StudsPerTileV = startsize
1860
local dec2b = dec2:Clone()
1861
dec2b.Face = "Bottom"
1862
dec2b.Parent = lb
1863
local randomrot = math.random(1,2)
1864
coroutine.resume(coroutine.create(function()
1865
for i = 0, 19 do
1866
swait()
1867
if randomrot == 1 then
1868
lb.CFrame = lb.CFrame*CFrame.new(0,math.rad(5),0)
1869
elseif randomrot == 2 then
1870
lb.CFrame = lb.CFrame*CFrame.new(0,math.rad(-5),0)
1871
end
1872
dec2.Transparency = dec2.Transparency + 0.05
1873
dec2b.Transparency = dec2b.Transparency + 0.05
1874
dec2.StudsPerTileU = dec2.StudsPerTileU + size
1875
dec2.StudsPerTileV = dec2.StudsPerTileV + size
1876
dec2b.StudsPerTileU = dec2b.StudsPerTileU + size
1877
dec2b.StudsPerTileV = dec2b.StudsPerTileV + size
1878
thingery.Scale = thingery.Scale + vt(size,0,size)
1879
end
1880
lb:Destroy()
1881
end))
1882
end
1883
1884
function SlowRingEffect(pos,startsize,size,col)
1885
local lb = Instance.new("Part")
1886
  lb.Parent = char
1887
    lb.BrickColor = col
1888
     lb.CanCollide = false
1889
lb.Material = "Neon"
1890
     lb.Anchored = true
1891
lb.TopSurface = 0
1892
        lb.BottomSurface = 0
1893
     lb.Transparency = 1
1894
     lb.Size = vt(1,1,1)
1895
     lb.CFrame = pos
1896
local thingery = Instance.new("SpecialMesh",lb)
1897
     thingery.MeshType = "Brick"
1898
thingery.Scale = vt(startsize,0.1,startsize)
1899
local dec2 = Instance.new("Decal", lb)
1900
dec2.Face = "Top"
1901
dec2.Texture = "http://www.roblox.com/asset/?id=874580939"
1902
dec2.Color3 = lb.Color
1903
dec2.Parent = lb
1904
local dec2b = dec2:Clone()
1905
dec2b.Face = "Bottom"
1906
dec2b.Parent = lb
1907
local randomrot = math.random(1,2)
1908
coroutine.resume(coroutine.create(function()
1909
for i = 0, 49 do
1910
swait()
1911
if randomrot == 1 then
1912
lb.CFrame = lb.CFrame*CFrame.new(0,math.rad(5),0)
1913
elseif randomrot == 2 then
1914
lb.CFrame = lb.CFrame*CFrame.new(0,math.rad(-5),0)
1915
end
1916
dec2.Transparency = dec2.Transparency + 0.02
1917
dec2b.Transparency = dec2b.Transparency + 0.02
1918
thingery.Scale = thingery.Scale + vt(size,0,size)
1919
end
1920
lb:Destroy()
1921
end))
1922
end
1923
1924
1925
function groundringaa(pos)
1926
local rng = Instance.new("Part", char)
1927
        rng.Anchored = true
1928
        rng.BrickColor = origcolor
1929
        rng.CanCollide = false
1930
        rng.FormFactor = 3
1931
        rng.Name = "Ring"
1932
        rng.Size = Vector3.new(1, 1, 1)
1933
        rng.Transparency = 1
1934
        rng.TopSurface = 0
1935
        rng.BottomSurface = 0
1936
        rng.CFrame = pos
1937
        local rngm = Instance.new("SpecialMesh", rng)
1938
        rngm.MeshId = "http://www.roblox.com/asset/?id=3270017"
1939
rngm.Scale = Vector3.new(100,100,5)
1940
local scaler2 = -10/2
1941
coroutine.resume(coroutine.create(function()
1942
for i = 0,10,0.1 do
1943
swait()
1944
scaler2 = scaler2 + 0.1/2
1945
rng.Transparency = rng.Transparency - 0.01
1946
rngm.Scale = rngm.Scale + Vector3.new(scaler2/2.5, scaler2/2.5, 0)
1947
end
1948
rng:Destroy()
1949
end))
1950
end
1951
1952
function groundringbb(pos)
1953
local rng = Instance.new("Part", char)
1954
        rng.Anchored = true
1955
        rng.BrickColor = origcolor
1956
        rng.CanCollide = false
1957
        rng.FormFactor = 3
1958
        rng.Name = "Ring"
1959
        rng.Size = Vector3.new(1, 1, 1)
1960
        rng.Transparency = 0
1961
        rng.TopSurface = 0
1962
        rng.BottomSurface = 0
1963
        rng.CFrame = pos.CFrame - Vector3.new(0,2.5,0)
1964
rng.CFrame = rng.CFrame *CFrame.Angles(math.rad(90),0,0)
1965
        local rngm = Instance.new("SpecialMesh", rng)
1966
        rngm.MeshId = "http://www.roblox.com/asset/?id=3270017"
1967
rngm.Scale = Vector3.new(0,0,5)
1968
local scaler2 = 10
1969
coroutine.resume(coroutine.create(function()
1970
for i = 0,10*2,0.1 do
1971
swait()
1972
scaler2 = scaler2 - 0.1/2
1973
rng.Transparency = rng.Transparency + 0.005
1974
rngm.Scale = rngm.Scale + Vector3.new(scaler2/2.5, scaler2/2.5, scaler2)
1975
end
1976
rng:Destroy()
1977
end))
1978
end
1979
1980
function groundglowaa(pos)
1981
local rng = Instance.new("Part", char)
1982
        rng.Anchored = true
1983
        rng.BrickColor = origcolor
1984
        rng.CanCollide = false
1985
        rng.FormFactor = 3
1986
rng.Material = "Neon"
1987
        rng.Name = "Ring"
1988
        rng.Size = Vector3.new(1, 1, 1)
1989
        rng.Transparency = 0
1990
        rng.TopSurface = 0
1991
        rng.BottomSurface = 0
1992
        rng.CFrame = pos.CFrame - Vector3.new(0,2.5,0)
1993
rng.CFrame = rng.CFrame *CFrame.Angles(math.rad(90),0,0)
1994
        local rngm = Instance.new("SpecialMesh", rng)
1995
        rngm.MeshType = "Sphere"
1996
rngm.Scale = Vector3.new(0,0,25)
1997
local scaler2 = 10*2
1998
coroutine.resume(coroutine.create(function()
1999
for i = 0,10*2,0.1 do
2000
swait()
2001
scaler2 = scaler2 - 0.1*2/2
2002
rng.Transparency = rng.Transparency + 0.005
2003
rngm.Scale = rngm.Scale + Vector3.new(scaler2/2.5, scaler2/2.5, 0)
2004
end
2005
rng:Destroy()
2006
end))
2007
end
2008
2009
function bemaa(pos)
2010
local rng = Instance.new("Part", char)
2011
        rng.Anchored = true
2012
        rng.BrickColor = origcolor
2013
        rng.CanCollide = false
2014
        rng.FormFactor = 3
2015
rng.Material = "Neon"
2016
        rng.Name = "Ring"
2017
        rng.Size = Vector3.new(1, 1, 1)
2018
        rng.Transparency = 0
2019
        rng.TopSurface = 0
2020
        rng.BottomSurface = 0
2021
        rng.CFrame = pos.CFrame - Vector3.new(0,2.5,0)
2022
rng.CFrame = rng.CFrame *CFrame.Angles(math.rad(90),0,0)
2023
        local rngm = Instance.new("SpecialMesh", rng)
2024
        rngm.MeshType = "Sphere"
2025
rngm.Scale = Vector3.new(0,0,10000)
2026
local scaler2 = 1
2027
coroutine.resume(coroutine.create(function()
2028
for i = 0,99,0.1 do
2029
swait()
2030
scaler2 = scaler2 - 0.0025
2031
rng.Transparency = rng.Transparency + 0.0025
2032
rngm.Scale = rngm.Scale + Vector3.new(scaler2/5, scaler2/5, 0)
2033
end
2034
rng:Destroy()
2035
end))
2036
end
2037
2038
function bemaashake(pos)
2039
local rng = Instance.new("Part", char)
2040
        rng.Anchored = true
2041
        rng.BrickColor = origcolor
2042
        rng.CanCollide = false
2043
        rng.FormFactor = 3
2044
rng.Material = "Neon"
2045
        rng.Name = "Ring"
2046
        rng.Size = Vector3.new(1, 1, 1)
2047
        rng.Transparency = 0
2048
        rng.TopSurface = 0
2049
        rng.BottomSurface = 0
2050
        rng.CFrame = pos.CFrame - Vector3.new(0,2.5,0)
2051
rng.CFrame = rng.CFrame *CFrame.Angles(math.rad(90),0,0)
2052
        local rngm = Instance.new("SpecialMesh", rng)
2053
        rngm.MeshType = "Sphere"
2054
local oof = Instance.new("Part",char)
2055
oof.Parent = rng
2056
oof.CFrame = rng.CFrame
2057
oof.CanCollide = false
2058
oof.Anchored = true
2059
oof.Transparency = 1
2060
rngm.Scale = Vector3.new(0,0,10000)
2061
local scaler2 = 1*10
2062
coroutine.resume(coroutine.create(function()
2063
for i = 0,99,0.1 do
2064
swait()
2065
scaler2 = scaler2 - 0.0025*10
2066
rng.CFrame = oof.CFrame + Vector3.new(math.random(-1,1),0,math.random(-1,1))
2067
rng.Transparency = rng.Transparency + 0.0025
2068
rngm.Scale = rngm.Scale + Vector3.new(scaler2/5, scaler2/5, 0)
2069
end
2070
rng:Destroy()
2071
end))
2072
end
2073
2074
function groundringlarge(pos)
2075
local rng = Instance.new("Part", char)
2076
        rng.Anchored = true
2077
        rng.BrickColor = origcolor
2078
        rng.CanCollide = false
2079
        rng.FormFactor = 3
2080
        rng.Name = "Ring"
2081
        rng.Size = Vector3.new(1, 1, 1)
2082
        rng.Transparency = 0
2083
        rng.TopSurface = 0
2084
        rng.BottomSurface = 0
2085
        rng.CFrame = pos.CFrame - Vector3.new(0,2.5,0)
2086
rng.CFrame = rng.CFrame *CFrame.Angles(math.rad(90),0,0)
2087
        local rngm = Instance.new("SpecialMesh", rng)
2088
        rngm.MeshId = "http://www.roblox.com/asset/?id=3270017"
2089
rngm.Scale = Vector3.new(0,0,5)
2090
local scaler2 = 10*10
2091
coroutine.resume(coroutine.create(function()
2092
for i = 0,10*2,0.1 do
2093
swait()
2094
scaler2 = scaler2 - 0.1*10/2
2095
rng.Transparency = rng.Transparency + 0.005
2096
rngm.Scale = rngm.Scale + Vector3.new(scaler2/2.5, scaler2/2.5, scaler2)
2097
end
2098
rng:Destroy()
2099
end))
2100
end
2101
2102
function sphere(bonuspeed,type,pos,scale,value,color)
2103
local type = type
2104
local rng = Instance.new("Part", char)
2105
        rng.Anchored = true
2106
        rng.BrickColor = color
2107
        rng.CanCollide = false
2108
        rng.FormFactor = 3
2109
        rng.Name = "Ring"
2110
        rng.Material = "Neon"
2111
        rng.Size = Vector3.new(1, 1, 1)
2112
        rng.Transparency = 0
2113
        rng.TopSurface = 0
2114
        rng.BottomSurface = 0
2115
        rng.CFrame = pos
2116
        local rngm = Instance.new("SpecialMesh", rng)
2117
        rngm.MeshType = "Sphere"
2118
rngm.Scale = scale
2119
local scaler2 = 1
2120
if type == "Add" then
2121
scaler2 = 1*value
2122
elseif type == "Divide" then
2123
scaler2 = 1/value
2124
end
2125
coroutine.resume(coroutine.create(function()
2126
for i = 0,10/bonuspeed,0.1 do
2127
swait()
2128
if type == "Add" then
2129
scaler2 = scaler2 - 0.01*value/bonuspeed
2130
elseif type == "Divide" then
2131
scaler2 = scaler2 - 0.01/value*bonuspeed
2132
end
2133
rng.Transparency = rng.Transparency + 0.01*bonuspeed
2134
rngm.Scale = rngm.Scale + Vector3.new(scaler2*bonuspeed, scaler2*bonuspeed, scaler2*bonuspeed)
2135
end
2136
rng:Destroy()
2137
end))
2138
end
2139
2140
function Transition()
2141
attack = true
2142
attack = false
2143
end
2144
2145
--Transition()
2146
2147
function FaceMouse()
2148
  Cam = workspace.CurrentCamera
2149
  return {
2150
    CFrame.new(char.Torso.Position, Vector3.new(mouse.Hit.p.x, char.Torso.Position.y, mouse.Hit.p.z)),
2151
    Vector3.new(mouse.Hit.p.x, mouse.Hit.p.y, mouse.Hit.p.z)
2152
  }
2153
end
2154
2155
function outerbeam()
2156
attack = true
2157
hum.WalkSpeed = 5
2158
local trail = Instance.new("ParticleEmitter",sorb2)
2159
trail.LightEmission = 1
2160
trail.Color = ColorSequence.new(origcolor.Color)
2161
trail.Rate = 5000
2162
trail.Lifetime = NumberRange.new(0.5)
2163
trail.Size = NumberSequence.new({NumberSequenceKeypoint.new(0,0,0),NumberSequenceKeypoint.new(1,2,0)})
2164
trail.Transparency = NumberSequence.new({NumberSequenceKeypoint.new(0,0,0),NumberSequenceKeypoint.new(1,1,0)})
2165
trail.Speed = NumberRange.new(0,0)
2166
trail.EmissionDirection = "Front"
2167
trail.Rotation = NumberRange.new(-500,500)
2168
trail.RotSpeed = NumberRange.new(-500,500)
2169
local trail2 = Instance.new("ParticleEmitter",sorb2)
2170
trail2.LightEmission = 1
2171
trail2.Texture = "rbxassetid://254287058"
2172
trail2.Color = ColorSequence.new(origcolor.Color)
2173
trail2.Rate = 25
2174
trail2.Lifetime = NumberRange.new(1)
2175
trail2.Size = NumberSequence.new({NumberSequenceKeypoint.new(0,4,0),NumberSequenceKeypoint.new(1,0,0)})
2176
trail2.Transparency = NumberSequence.new({NumberSequenceKeypoint.new(0,1,0),NumberSequenceKeypoint.new(1,0,0)})
2177
trail2.Speed = NumberRange.new(0,0)
2178
trail2.EmissionDirection = "Front"
2179
trail2.Rotation = NumberRange.new(-1000,1000)
2180
trail2.RotSpeed = NumberRange.new(-1000,1000)
2181
CFuncs["Sound"].Create("rbxassetid://1256695951", sorb2, 1, 1.15)
2182
	for i = 0,10,0.1 do
2183
		swait()
2184
RingEffect(sorb2.CFrame*CFrame.Angles(math.rad(math.random(-360,360)),math.rad(math.random(-360,360)),math.rad(math.random(-360,360))),5,-0.25,BrickColor.new("White"))
2185
RingEffect(sorb2.CFrame*CFrame.Angles(math.rad(math.random(-360,360)),math.rad(math.random(-360,360)),math.rad(math.random(-360,360))),5,0.1,BrickColor.new("Alder"))
2186
		MagicBlock(BrickColor.new("White"),sorb2.CFrame,1.5,1.5,1.5,0.05,0.05,0.05,0.05)
2187
            RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(0),math.rad(0),math.rad(-80)),0.2)
2188
            Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(5),math.rad(0),math.rad(80)),.2)
2189
             RW.C0 = clerp(RW.C0, CFrame.new(1.45, 0.5, 0) * angles(math.rad(-30), math.rad(0), math.rad(20)), 0.2)
2190
             LW.C0 = clerp(LW.C0, CFrame.new(-1.45, 0.5, 0) * angles(math.rad(90), math.rad(0), math.rad(-80)), 0.2)
2191
RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(0),math.rad(90),math.rad(0))*angles(math.rad(-2.5),math.rad(0),math.rad(0)),.1)
2192
LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-90),math.rad(0))*angles(math.rad(-2.5),math.rad(0),math.rad(0)),.1)
2193
root.CFrame = FaceMouse()[1]
2194
	end
2195
for i = 0, 4 do
2196
wait(0.25)
2197
RingEffect(sorb2.CFrame*CFrame.Angles(math.rad(math.random(-360,360)),math.rad(math.random(-360,360)),math.rad(math.random(-360,360))),5,-0.25,BrickColor.new("White"))
2198
RingEffect(sorb2.CFrame*CFrame.Angles(math.rad(math.random(-360,360)),math.rad(math.random(-360,360)),math.rad(math.random(-360,360))),5,0.1,BrickColor.new("Alder"))
2199
		MagicBlock(BrickColor.new("White"),sorb2.CFrame,1.5,1.5,1.5,0.05,0.05,0.05,0.05)
2200
root.CFrame = FaceMouse()[1]
2201
CFuncs["Sound"].Create("rbxassetid://1256695105", sorb2, 1, 1.25)
2202
local a = Instance.new("Part",Character)
2203
	a.Name = "Direction"	
2204
	a.Anchored = true
2205
	a.BrickColor = bc("Bright red")
2206
a.Material = "Neon"
2207
a.Transparency = 1
2208
	a.CanCollide = false
2209
	local ray = Ray.new(
2210
	    sorb2.CFrame.p,                           -- origin
2211
	    (mouse.Hit.p - sorb2.CFrame.p).unit * 500 -- direction
2212
	) 
2213
	local ignore = Character
2214
	local hit, position, normal = workspace:FindPartOnRay(ray, ignore)
2215
	a.BottomSurface = 10
2216
	a.TopSurface = 10
2217
	local distance = (root.CFrame.p - position).magnitude
2218
	a.Size = Vector3.new(0.1, 0.1, 0.1)
2219
	a.CFrame = CFrame.new(sorb2.CFrame.p, position) * CFrame.new(0, 0, 0)
2220
				 local lb = Instance.new("Part")
2221
  lb.Parent = char
2222
    lb.BrickColor = BrickColor.new("White")
2223
     lb.CanCollide = false
2224
lb.Material = "Neon"
2225
     lb.Anchored = true
2226
lb.TopSurface = 0
2227
        lb.BottomSurface = 0
2228
     lb.Transparency = 0.5
2229
     lb.Size = vt(1,1,1)
2230
     lb.CFrame = a.CFrame
2231
lb.Anchored = false
2232
local thingery = Instance.new("SpecialMesh",lb)
2233
     thingery.MeshType = "Sphere"
2234
thingery.Scale = vt(2,2,2)
2235
game:GetService("Debris"):AddItem(lb, 10)
2236
  local bv = Instance.new("BodyVelocity")
2237
  bv.maxForce = Vector3.new(1e9, 1e9, 1e9)
2238
  bv.velocity = a.CFrame.lookVector*250
2239
  bv.Parent = lb
2240
local traile = Instance.new("ParticleEmitter",lb)
2241
traile.LightEmission = 1
2242
traile.Texture = "rbxassetid://254287058"
2243
traile.Color = ColorSequence.new(origcolor.Color)
2244
traile.Rate = 2500
2245
traile.Lifetime = NumberRange.new(0.5)
2246
traile.Size = NumberSequence.new({NumberSequenceKeypoint.new(0,1.5,0),NumberSequenceKeypoint.new(1,0,0)})
2247
traile.Transparency = NumberSequence.new({NumberSequenceKeypoint.new(0,1,0),NumberSequenceKeypoint.new(1,0,0)})
2248
traile.Speed = NumberRange.new(0,0)
2249
traile.EmissionDirection = "Front"
2250
traile.Rotation = NumberRange.new(-1000,1000)
2251
traile.RotSpeed = NumberRange.new(-1000,1000)
2252
local trailq = Instance.new("ParticleEmitter",lb)
2253
trailq.LightEmission = 1
2254
trailq.Color = ColorSequence.new(Color3.new(1,1,1))
2255
trailq.Rate = 5000
2256
trailq.Lifetime = NumberRange.new(0.1)
2257
trailq.Size = NumberSequence.new({NumberSequenceKeypoint.new(0,0,0),NumberSequenceKeypoint.new(1,10,0)})
2258
trailq.Transparency = NumberSequence.new({NumberSequenceKeypoint.new(0,0.75,0),NumberSequenceKeypoint.new(1,1,0)})
2259
trailq.Speed = NumberRange.new(0,1)
2260
trailq.VelocitySpread = 100000
2261
trailq.LockedToPart = true
2262
trailq.EmissionDirection = "Front"
2263
trailq.Rotation = NumberRange.new(-500,500)
2264
trailq.RotSpeed = NumberRange.new(-500,500)
2265
local hitted = false
2266
game:GetService("Debris"):AddItem(a, 0.1)
2267
wait(0.01)
2268
lb.Touched:connect(function(hit) 
2269
	if hitted == false then
2270
		hitted = true
2271
		lb.Anchored = true
2272
traile.Enabled = false
2273
trailq.Enabled = false
2274
		lb.Transparency = 1
2275
CFuncs["Sound"].Create("rbxassetid://142070127", lb, 2.5, 1)
2276
sphere(2.25,"Add",lb.CFrame,vt(0,0,0),0.55,origcolor)
2277
sphere(2.25,"Add",lb.CFrame,vt(0,0,0),0.4,BrickColor.new("White"))
2278
MagniDamage(lb, 25, 16,24, 0, "Normal")
2279
for i = 0, 9 do
2280
RingEffect(lb.CFrame*CFrame.Angles(math.rad(math.random(-360,360)),math.rad(math.random(-360,360)),math.rad(math.random(-360,360))),5,3,BrickColor.new("White"))
2281
RingEffect(lb.CFrame*CFrame.Angles(math.rad(math.random(-360,360)),math.rad(math.random(-360,360)),math.rad(math.random(-360,360))),5,6,BrickColor.new("Alder"))
2282
end
2283
--Explode(7.5,lb,1,1,10,15)
2284
	end
2285
end)
2286
end
2287
trail.Enabled = false
2288
game:GetService("Debris"):AddItem(trail, 2)
2289
trail2.Enabled = false
2290
game:GetService("Debris"):AddItem(trail2, 3)
2291
hum.WalkSpeed = 16
2292
attack = false
2293
end
2294
2295
function inpulse()
2296
attack = true
2297
hum.WalkSpeed = 0
2298
CFuncs["Sound"].Create("rbxassetid://569564686", root, 1.5, 1)
2299
CFuncs["Sound"].Create("rbxassetid://1256698605", root, 0.5, 0.5)
2300
	for i = 0,5,0.1 do
2301
		swait()
2302
MagicBlock(origcolor,sorb.CFrame,1,1,1,0.05,0.05,0.05,0.05)
2303
MagicBlock(origcolor,sorb2.CFrame,1,1,1,0.05,0.05,0.05,0.05)
2304
RingEffect(sorb.CFrame*CFrame.Angles(math.rad(math.random(-360,360)),math.rad(math.random(-360,360)),math.rad(math.random(-360,360))),2,-0.05,BrickColor.new("Really black"))
2305
RingEffect(sorb2.CFrame*CFrame.Angles(math.rad(math.random(-360,360)),math.rad(math.random(-360,360)),math.rad(math.random(-360,360))),2,-0.05,BrickColor.new("Really black"))
2306
RingEffect(root.CFrame*CFrame.Angles(0,math.rad(math.random(-360,360)),0),75,math.random(-1,1),origcolor)
2307
            RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(0),math.rad(0),math.rad(0)),0.1)
2308
            Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(-5),math.rad(0),math.rad(0)),.2)
2309
             RW.C0 = clerp(RW.C0, CFrame.new(1.45, 0.5, 0) * angles(math.rad(90), math.rad(0), math.rad(100)), 0.2)
2310
             LW.C0 = clerp(LW.C0, CFrame.new(-1.45, 0.5, 0) * angles(math.rad(90), math.rad(0), math.rad(-100)), 0.2)
2311
RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(0),math.rad(90),math.rad(0))*angles(math.rad(-2.5),math.rad(0),math.rad(0)),.1)
2312
LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-90),math.rad(0))*angles(math.rad(-2.5),math.rad(0),math.rad(0)),.1)
2313
	end
2314
CFuncs["Sound"].Create("rbxassetid://621522790", root, 4, 1)
2315
CFuncs["Sound"].Create("rbxassetid://533243953", root, 6, 1)
2316
CFuncs["Sound"].Create("rbxassetid://621522959", root, 0.25, 1)
2317
sphere(1,"Add",root.CFrame,vt(60,60,60),-1.25,BrickColor.new("Really black"))
2318
sphere(1,"Add",root.CFrame,vt(55,55,55),-1.25,origcolor)
2319
MagniDamage(root, 45, 10,28, 0, "Normal")
2320
for i = 0, 9 do
2321
RingEffect(root.CFrame*CFrame.Angles(math.rad(math.random(-360,360)),math.rad(math.random(-360,360)),math.rad(math.random(-360,360))),math.random(100,150),math.random(-8,-3),BrickColor.new("Really black"))
2322
RingEffect(root.CFrame*CFrame.Angles(math.rad(math.random(-360,360)),math.rad(math.random(-360,360)),math.rad(math.random(-360,360))),math.random(100,150),math.random(1,2),BrickColor.new("Really black"))
2323
end
2324
	for i = 0,4,0.1 do
2325
		swait()
2326
            RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(0),math.rad(0),math.rad(0)),0.1)
2327
            Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(5),math.rad(0),math.rad(0)),.2)
2328
             RW.C0 = clerp(RW.C0, CFrame.new(1.25, 0.5, -0.5) * angles(math.rad(80), math.rad(0), math.rad(-40)), 0.2)
2329
             LW.C0 = clerp(LW.C0, CFrame.new(-1.25, 0.5, -0.5) * angles(math.rad(80), math.rad(0), math.rad(40)), 0.2)
2330
RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(0),math.rad(90),math.rad(0))*angles(math.rad(-2.5),math.rad(0),math.rad(0)),.1)
2331
LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-90),math.rad(0))*angles(math.rad(-2.5),math.rad(0),math.rad(0)),.1)
2332
	end
2333
hum.WalkSpeed = 16
2334
attack = false
2335
end
2336
2337
function tele()
2338
attack = true
2339
hum.WalkSpeed = 0
2340
CFuncs["Sound"].Create("rbxassetid://569564686", root, 1.5, 1)
2341
	for i = 0,3,0.1 do
2342
MagicBlock(origcolor,sorb.CFrame,1,1,1,0.05,0.05,0.05,0.05)
2343
MagicBlock(origcolor,sorb2.CFrame,1,1,1,0.05,0.05,0.05,0.05)
2344
RingEffect(sorb.CFrame*CFrame.Angles(math.rad(math.random(-360,360)),math.rad(math.random(-360,360)),math.rad(math.random(-360,360))),2,-0.05,BrickColor.new("White"))
2345
RingEffect(sorb2.CFrame*CFrame.Angles(math.rad(math.random(-360,360)),math.rad(math.random(-360,360)),math.rad(math.random(-360,360))),2,-0.05,BrickColor.new("White"))
2346
		swait()
2347
            RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(0),math.rad(0),math.rad(0)),0.1)
2348
            Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(5),math.rad(0),math.rad(0)),.2)
2349
             RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(100), math.rad(0), math.rad(20)), 0.2)
2350
             LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(100), math.rad(0), math.rad(-20)), 0.2)
2351
RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(0),math.rad(90),math.rad(0))*angles(math.rad(-2.5),math.rad(0),math.rad(0)),.1)
2352
LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-90),math.rad(0))*angles(math.rad(-2.5),math.rad(0),math.rad(0)),.1)
2353
root.CFrame = FaceMouse()[1]
2354
	end
2355
CFuncs["Sound"].Create("rbxassetid://1256698605", root, 1, 1)
2356
sphere(2,"Add",root.CFrame,vt(60/1.5,60/1.5,60/1.5),-0.5,origcolor)
2357
sphere(2,"Add",root.CFrame,vt(55/1.5,55/1.5,55/1.5),-0.5,BrickColor.new("White"))
2358
for i = 0, 9 do
2359
RingEffect(root.CFrame*CFrame.Angles(math.rad(math.random(-360,360)),math.rad(math.random(-360,360)),math.rad(math.random(-360,360))),math.random(50,75),math.random(-4,-2),BrickColor.new("White"))
2360
end
2361
wait(0.3325)
2362
root.CFrame = root.CFrame + root.CFrame.lookVector*200
2363
CFuncs["Sound"].Create("rbxassetid://533243953", root, 1, 1)
2364
CFuncs["Sound"].Create("rbxassetid://1256695105", root, 1, 1.25)
2365
sphere(2,"Add",root.CFrame,vt(0,0,0),0.75,origcolor)
2366
sphere(2,"Add",root.CFrame,vt(0,0,0),0.5,BrickColor.new("White"))
2367
MagniDamage(root, 28, 15,35, 0, "Normal")
2368
for i = 0, 9 do
2369
RingEffect(root.CFrame*CFrame.Angles(math.rad(math.random(-360,360)),math.rad(math.random(-360,360)),math.rad(math.random(-360,360))),math.random(25,30),math.random(4,7),BrickColor.new("White"))
2370
end
2371
hum.WalkSpeed = 16
2372
attack = false
2373
end
2374
2375
mouse.KeyDown:connect(function(k)
2376
        if k == "z" and attack == false then
2377
                outerbeam()
2378
        end
2379
        if k == "x" and attack == false then
2380
                inpulse()
2381
        end
2382
        if k == "c" and attack == false then
2383
                tele()
2384
        end
2385
end)
2386
Humanoid.Animator.Parent = nil
2387
idleanim=.4
2388
while true do
2389
swait()
2390
  sine = sine + change
2391
local torvel=(RootPart.Velocity*Vector3.new(1,0,1)).magnitude 
2392
local velderp=RootPart.Velocity.y
2393
hitfloor,posfloor=rayCast(RootPart.Position,(CFrame.new(RootPart.Position,RootPart.Position - Vector3.new(0,1,0))).lookVector,4,Character)
2394
if equipped==true or equipped==false then
2395
if attack==false then
2396
idle=idle+1
2397
else
2398
idle=0
2399
end
2400
if idle>=500 then
2401
if attack==false then
2402
--Sheath()
2403
end
2404
end
2405
if RootPart.Velocity.y > 1 and hitfloor==nil then 
2406
Anim="Jump"
2407
if attack==false then
2408
RH.C0=clerp(RH.C0,cf(1,-1 - 0.05 * math.cos(sine / 25),0)*angles(math.rad(0),math.rad(90),math.rad(0))*angles(math.rad(-5),math.rad(0),math.rad(-20)),.1)
2409
LH.C0=clerp(LH.C0,cf(-1,-1 - 0.05 * math.cos(sine / 25),0)*angles(math.rad(0),math.rad(-90),math.rad(0))*angles(math.rad(-5),math.rad(0),math.rad(20)),.1)
2410
RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,0 + 0.05 * math.cos(sine / 25))*angles(math.rad(-10),math.rad(0),math.rad(0)),.1)
2411
Torso.Neck.C0=clerp(Torso.Neck.C0,necko*angles(math.rad(-2.5),math.rad(0),math.rad(0)),.1)
2412
RW.C0=clerp(RW.C0,cf(1.45,0.5 + 0.1 * math.cos(sine / 25),0)*angles(math.rad(-5),math.rad(0),math.rad(25)),.1)
2413
LW.C0=clerp(LW.C0,cf(-1.45,0.5 + 0.1 * math.cos(sine / 25),0)*angles(math.rad(-5),math.rad(0),math.rad(-25)),.1)
2414
end
2415
elseif RootPart.Velocity.y < -1 and hitfloor==nil then 
2416
Anim="Fall"
2417
if attack==false then
2418
RH.C0=clerp(RH.C0,cf(1,-1 - 0.05 * math.cos(sine / 25),0)*angles(math.rad(0),math.rad(90),math.rad(0))*angles(math.rad(-5),math.rad(0),math.rad(-20)),.1)
2419
LH.C0=clerp(LH.C0,cf(-1,-1 - 0.05 * math.cos(sine / 25),0)*angles(math.rad(0),math.rad(-90),math.rad(0))*angles(math.rad(-5),math.rad(0),math.rad(20)),.1)
2420
RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,0 + 0.05 * math.cos(sine / 25))*angles(math.rad(0),math.rad(0),math.rad(0)),.1)
2421
Torso.Neck.C0=clerp(Torso.Neck.C0,necko*angles(math.rad(0),math.rad(0),math.rad(0)),.1)
2422
RW.C0=clerp(RW.C0,cf(1.45,0.5 + 0.1 * math.cos(sine / 25),0)*angles(math.rad(-20),math.rad(0),math.rad(50)),.1)
2423
LW.C0=clerp(LW.C0,cf(-1.45,0.5 + 0.1 * math.cos(sine / 25),0)*angles(math.rad(-20),math.rad(0),math.rad(-50)),.1)
2424
end
2425
elseif torvel<1 and hitfloor~=nil then
2426
Anim="Idle"
2427
if attack==false then
2428
RH.C0=clerp(RH.C0,cf(1,-1 - 0.05 * math.cos(sine / 28),0)*angles(math.rad(0),math.rad(90),math.rad(0))*angles(math.rad(-2.5),math.rad(0),math.rad(2 + 1 * math.cos(sine / 34))),.1)
2429
LH.C0=clerp(LH.C0,cf(-1,-1 - 0.05 * math.cos(sine / 28),0)*angles(math.rad(0),math.rad(-90),math.rad(0))*angles(math.rad(-2.5),math.rad(0),math.rad(0 + 1 * math.cos(sine / 34))),.1)
2430
RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,0 + 0.05 * math.cos(sine / 28))*angles(math.rad(0 - 1 * math.cos(sine / 34)),math.rad(0),math.rad(-20)),.1)
2431
Torso.Neck.C0=clerp(Torso.Neck.C0,necko*angles(math.rad(5 - 2.5 * math.cos(sine / 28)),math.rad(0),math.rad(20)),.1)
2432
RW.C0=clerp(RW.C0,cf(0.85,0.5 + 0.1 * math.cos(sine / 28),-0.65)*angles(math.rad(30 - 1 * math.cos(sine / 34)),math.rad(0),math.rad(-100 - 2.5 * math.cos(sine / 28))),.1)
2433
LW.C0=clerp(LW.C0,cf(-0.85,0.5 + 0.1 * math.cos(sine / 28),-0.65)*angles(math.rad(40 - 1 * math.cos(sine / 34)),math.rad(0),math.rad(90 + 2.5 * math.cos(sine / 28))),.1)
2434
end
2435
elseif torvel>2 and torvel<22 and hitfloor~=nil then
2436
Anim="Walk"
2437
if attack==false then
2438
RH.C0=clerp(RH.C0,cf(1,-0.85 - 0.15 * math.cos(sine / 3),-0.15 - 0.15 * math.cos(sine / 3))*angles(math.rad(0),math.rad(90),math.rad(0))*angles(math.rad(0),math.rad(0),math.rad(0 + 55 * math.cos(sine / 6))),.1)
2439
LH.C0=clerp(LH.C0,cf(-1,-0.85 + 0.15 * math.cos(sine / 3),-0.15 + 0.15 * math.cos(sine / 3))*angles(math.rad(0),math.rad(-90),math.rad(0))*angles(math.rad(0),math.rad(0),math.rad(0 + 55 * math.cos(sine / 6))),.1)
2440
RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,-0.15 - 0.1 * math.cos(sine / 3))*angles(math.rad(5),math.rad(0),math.rad(0 - 5 * math.cos(sine / 6))),.1)
2441
Torso.Neck.C0=clerp(Torso.Neck.C0,necko*angles(math.rad(10 + 2.5 * math.cos(sine / 100)),math.rad(0),math.rad(0 + 5 * math.cos(sine / 6))),.1)
2442
RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*angles(math.rad(0 - 75 * math.cos(sine / 6)),math.rad(0),math.rad(10 - 10 * math.cos(sine / 3))),.1)
2443
LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*angles(math.rad(0 + 75 * math.cos(sine / 6)),math.rad(0),math.rad(-10 + 10 * math.cos(sine / 3))),.1)
2444
end
2445
elseif torvel>=22 and hitfloor~=nil then
2446
Anim="Run"
2447
if attack==false then
2448
RH.C0=clerp(RH.C0,cf(1,-0.75 - 0.25 * math.cos(sine / 3),-0.25 - 0.25 * math.cos(sine / 3))*angles(math.rad(0),math.rad(90),math.rad(0))*angles(math.rad(0),math.rad(0),math.rad(0 + 95 * math.cos(sine / 6))),.1)
2449
LH.C0=clerp(LH.C0,cf(-1,-0.75 + 0.25 * math.cos(sine / 3),-0.25 + 0.25 * math.cos(sine / 3))*angles(math.rad(0),math.rad(-90),math.rad(0))*angles(math.rad(0),math.rad(0),math.rad(0 + 95 * math.cos(sine / 6))),.1)
2450
RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,-0.125 + 0.125 * math.cos(sine / 3))*angles(math.rad(20),math.rad(0),math.rad(0 - 15 * math.cos(sine / 6))),.1)
2451
Torso.Neck.C0=clerp(Torso.Neck.C0,necko*angles(math.rad(-10 + 2.5 * math.cos(sine / 100)),math.rad(0),math.rad(0 + 15 * math.cos(sine / 6))),.1)
2452
RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*angles(math.rad(0 - 125 * math.cos(sine / 6)),math.rad(0),math.rad(5 - 10 * math.cos(sine / 3))),.1)
2453
LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*angles(math.rad(0 + 125 * math.cos(sine / 6)),math.rad(0),math.rad(-5 + 10 * math.cos(sine / 3))),.1)
2454
end
2455
end
2456
end
2457
end