View difference between Paste ID: DW7sfWa5 and BgPSg5Wg
SHOW: | | - or go back to the newest paste.
1
--https://github.com/Mokiros/roblox-FE-compatibility
2
if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
3
local Player,game,owner = owner,game
4
local RealPlayer = Player
5
do
6
	print("FE Compatibility code V2 by Mokiros")
7
	local RealPlayer = RealPlayer
8
	script.Parent = RealPlayer.Character
9
10
	--Fake event to make stuff like Mouse.KeyDown work
11
	local Disconnect_Function = function(this)
12
		this[1].Functions[this[2]] = nil
13
	end
14
	local Disconnect_Metatable = {__index={disconnect=Disconnect_Function,Disconnect=Disconnect_Function}}
15
	local FakeEvent_Metatable = {__index={
16
		Connect = function(this,f)
17
			local i = tostring(math.random(0,10000))
18
			while this.Functions[i] do
19
				i = tostring(math.random(0,10000))
20
			end
21
			this.Functions[i] = f
22
			return setmetatable({this,i},Disconnect_Metatable)
23
		end
24
	}}
25
	FakeEvent_Metatable.__index.connect = FakeEvent_Metatable.__index.Connect
26
	local function fakeEvent()
27
		return setmetatable({Functions={}},FakeEvent_Metatable)
28
	end
29
30
	--Creating fake input objects with fake variables
31
    local FakeMouse = {Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent(),Button2Up=fakeEvent(),Button2Down=fakeEvent()}
32
    FakeMouse.keyUp = FakeMouse.KeyUp
33
    FakeMouse.keyDown = FakeMouse.KeyDown
34
	local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
35
	local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
36
		CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
37
	end}
38
	--Merged 2 functions into one by checking amount of arguments
39
	CAS.UnbindAction = CAS.BindAction
40
41
	--This function will trigger the events that have been :Connect()'ed
42
	local function TriggerEvent(self,ev,...)
43
		for _,f in pairs(self[ev].Functions) do
44
			f(...)
45
		end
46
	end
47
	FakeMouse.TriggerEvent = TriggerEvent
48
	UIS.TriggerEvent = TriggerEvent
49
50
	--Client communication
51
	local Event = Instance.new("RemoteEvent")
52
	Event.Name = "UserInput_Event"
53
	Event.OnServerEvent:Connect(function(plr,io)
54
	    if plr~=RealPlayer then return end
55
		FakeMouse.Target = io.Target
56
		FakeMouse.Hit = io.Hit
57
		if not io.isMouse then
58
			local b = io.UserInputState == Enum.UserInputState.Begin
59
			if io.UserInputType == Enum.UserInputType.MouseButton1 then
60
				return FakeMouse:TriggerEvent(b and "Button1Down" or "Button1Up")
61
			end
62
			if io.UserInputType == Enum.UserInputType.MouseButton2 then
63
				return FakeMouse:TriggerEvent(b and "Button2Down" or "Button2Up")
64
			end
65
			for _,t in pairs(CAS.Actions) do
66
				for _,k in pairs(t.Keys) do
67
					if k==io.KeyCode then
68
						t.Function(t.Name,io.UserInputState,io)
69
					end
70
				end
71
			end
72
			FakeMouse:TriggerEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
73
			UIS:TriggerEvent(b and "InputBegan" or "InputEnded",io,false)
74
	    end
75
	end)
76
	Event.Parent = NLS([==[local Event = script:WaitForChild("UserInput_Event")
77
	local Mouse = owner:GetMouse()
78
	local UIS = game:GetService("UserInputService")
79
	local input = function(io,RobloxHandled)
80
		if RobloxHandled then return end
81
		--Since InputObject is a client-side instance, we create and pass table instead
82
		Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState,Hit=Mouse.Hit,Target=Mouse.Target})
83
	end
84
	UIS.InputBegan:Connect(input)
85
	UIS.InputEnded:Connect(input)
86
87
	local h,t
88
	--Give the server mouse data every second frame, but only if the values changed
89
	--If player is not moving their mouse, client won't fire events
90
	local HB = game:GetService("RunService").Heartbeat
91
	while true do
92
		if h~=Mouse.Hit or t~=Mouse.Target then
93
			h,t=Mouse.Hit,Mouse.Target
94
			Event:FireServer({isMouse=true,Target=t,Hit=h})
95
		end
96
		--Wait 2 frames
97
		for i=1,2 do
98
			HB:Wait()
99
		end
100
	end]==],script)
101
102
	----Sandboxed game object that allows the usage of client-side methods and services
103
	--Real game object
104
	local RealGame = game
105
106
	--Metatable for fake service
107
	local FakeService_Metatable = {
108
		__index = function(self,k)
109
			local s = rawget(self,"_RealService")
110
			if s then
111
				return typeof(s[k])=="function"
112
				and function(_,...)return s[k](s,...)end or s[k]
113
			end
114
		end,
115
		__newindex = function(self,k,v)
116
			local s = rawget(self,"_RealService")
117
			if s then s[k]=v end
118
		end
119
	}
120
	local function FakeService(t,RealService)
121
		t._RealService = typeof(RealService)=="string" and RealGame:GetService(RealService) or RealService
122
		return setmetatable(t,FakeService_Metatable)
123
	end
124
125
	--Fake game object
126
	local FakeGame = {
127
		GetService = function(self,s)
128
			return rawget(self,s) or RealGame:GetService(s)
129
		end,
130
		Players = FakeService({
131
			LocalPlayer = FakeService({GetMouse=function(self)return FakeMouse end},Player)
132
		},"Players"),
133
		UserInputService = FakeService(UIS,"UserInputService"),
134
		ContextActionService = FakeService(CAS,"ContextActionService"),
135
		RunService = FakeService({
136
			_btrs = {},
137
			RenderStepped = RealGame:GetService("RunService").Heartbeat,
138
			BindToRenderStep = function(self,name,_,fun)
139
				self._btrs[name] = self.Heartbeat:Connect(fun)
140
			end,
141
			UnbindFromRenderStep = function(self,name)
142
				self._btrs[name]:Disconnect()
143
			end,
144
		},"RunService")
145
	}
146
	rawset(FakeGame.Players,"localPlayer",FakeGame.Players.LocalPlayer)
147
	FakeGame.service = FakeGame.GetService
148
	FakeService(FakeGame,game)
149
	--Changing owner to fake player object to support owner:GetMouse()
150
	game,owner = FakeGame,FakeGame.Players.LocalPlayer
151
end
152
153
warn'any options for magic'
154
plr = game.Players.LocalPlayer
155
char = plr.Character
156
hum = char.Humanoid
157
local cam = game.Workspace.CurrentCamera
158
t = char.Torso
159
h = char.Head
160
ra = char["Right Arm"]
161
la = char["Left Arm"]
162
rl = char["Right Leg"]
163
ll = char["Left Leg"]
164
tors = char.Torso
165
lleg = char["Left Leg"]
166
root = char.HumanoidRootPart
167
hed = char.Head
168
rleg = char["Right Leg"]
169
rarm = char["Right Arm"]
170
larm = char["Left Arm"]
171
vt = Vector3.new
172
bc = BrickColor.new
173
br = BrickColor.random
174
it = Instance.new
175
cf = CFrame.new
176
177
178
local Create = LoadLibrary("RbxUtility").Create
179
180
CFuncs = {	
181
	["Part"] = {
182
		Create = function(Parent, Material, Reflectance, Transparency, BColor, Name, Size)
183
			local Part = Create("Part"){
184
				Parent = Parent,
185
				Reflectance = Reflectance,
186
				Transparency = Transparency,
187
				CanCollide = false,
188
				Locked = true,
189
				BrickColor = BrickColor.new(tostring(BColor)),
190
				Name = Name,
191
				Size = Size,
192
				Material = Material,
193
			}
194
			RemoveOutlines(Part)
195
			return Part
196
		end;
197
	};
198
	
199
	["Mesh"] = {
200
		Create = function(Mesh, Part, MeshType, MeshId, OffSet, Scale)
201
			local Msh = Create(Mesh){
202
				Parent = Part,
203
				Offset = OffSet,
204
				Scale = Scale,
205
			}
206
			if Mesh == "SpecialMesh" then
207
				Msh.MeshType = MeshType
208
				Msh.MeshId = MeshId
209
			end
210
			return Msh
211
		end;
212
	};
213
	
214
	["Mesh"] = {
215
		Create = function(Mesh, Part, MeshType, MeshId, OffSet, Scale)
216
			local Msh = Create(Mesh){
217
				Parent = Part,
218
				Offset = OffSet,
219
				Scale = Scale,
220
			}
221
			if Mesh == "SpecialMesh" then
222
				Msh.MeshType = MeshType
223
				Msh.MeshId = MeshId
224
			end
225
			return Msh
226
		end;
227
	};
228
	
229
	["Weld"] = {
230
		Create = function(Parent, Part0, Part1, C0, C1)
231
			local Weld = Create("Weld"){
232
				Parent = Parent,
233
				Part0 = Part0,
234
				Part1 = Part1,
235
				C0 = C0,
236
				C1 = C1,
237
			}
238
			return Weld
239
		end;
240
	};
241
242
	["Sound"] = {
243
		Create = function(id, par, vol, pit) 
244
			coroutine.resume(coroutine.create(function()
245
				local S = Create("Sound"){
246
					Volume = vol,
247
					Pitch = pit or 1,
248
					SoundId = id,
249
					Parent = par or workspace,
250
				}
251
				wait() 
252
				S:play() 
253
				game:GetService("Debris"):AddItem(S, 10)
254
			end))
255
		end;
256
	};
257
	
258
	["ParticleEmitter"] = {
259
		Create = function(Parent, Color1, Color2, LightEmission, Size, Texture, Transparency, ZOffset, Accel, Drag, LockedToPart, VelocityInheritance, EmissionDirection, Enabled, LifeTime, Rate, Rotation, RotSpeed, Speed, VelocitySpread)
260
			local fp = Create("ParticleEmitter"){
261
				Parent = Parent,
262
				Color = ColorSequence.new(Color1, Color2),
263
				LightEmission = LightEmission,
264
				Size = Size,
265
				Texture = Texture,
266
				Transparency = Transparency,
267
				ZOffset = ZOffset,
268
				Acceleration = Accel,
269
				Drag = Drag,
270
				LockedToPart = LockedToPart,
271
				VelocityInheritance = VelocityInheritance,
272
				EmissionDirection = EmissionDirection,
273
				Enabled = Enabled,
274
				Lifetime = LifeTime,
275
				Rate = Rate,
276
				Rotation = Rotation,
277
				RotSpeed = RotSpeed,
278
				Speed = Speed,
279
				VelocitySpread = VelocitySpread,
280
			}
281
			return fp
282
		end;
283
	};
284
285
	CreateTemplate = {
286
	
287
	};
288
}
289
290
291
292
New = function(Object, Parent, Name, Data)
293
	local Object = Instance.new(Object)
294
	for Index, Value in pairs(Data or {}) do
295
		Object[Index] = Value
296
	end
297
	Object.Parent = Parent
298
	Object.Name = Name
299
	return Object
300
end
301
local m = Instance.new("Model",char)
302
303
function CreatePart(parent,transparency,reflectance,material,brickcolor)
304
local p = Instance.new("Part")
305
p.Parent = parent
306
p.Size = Vector3.new(1,1,1)
307
p.Transparency = transparency
308
p.Reflectance = reflectance
309
p.CanCollide = false
310
p.Locked = true
311
p.BrickColor = brickcolor
312
p.Material = material
313
return p
314
end
315
316
function CreateMesh(parent,meshtype,x1,y1,z1)
317
local mesh = Instance.new("SpecialMesh",parent)
318
mesh.MeshType = meshtype
319
mesh.Scale = Vector3.new(x1,y1,z1)
320
return mesh
321
end
322
323
function CreateSpecialGlowMesh(parent,meshid,x1,y1,z1)
324
local mesh = Instance.new("SpecialMesh",parent)
325
mesh.MeshType = "FileMesh"
326
mesh.MeshId = meshid
327
mesh.TextureId = "http://www.roblox.com/asset/?id=269748808"
328
mesh.Scale = Vector3.new(x1,y1,z1)
329
mesh.VertexColor = Vector3.new(parent.BrickColor.r, parent.BrickColor.g, parent.BrickColor.b)
330
return mesh
331
end
332
333
function CreateWeld(parent,part0,part1,C1X,C1Y,C1Z,C1Xa,C1Ya,C1Za,C0X,C0Y,C0Z,C0Xa,C0Ya,C0Za)
334
local weld = Instance.new("Weld")
335
weld.Parent = parent
336
weld.Part0 = part0
337
weld.Part1 = part1
338
weld.C1 = CFrame.new(C1X,C1Y,C1Z)*CFrame.Angles(C1Xa,C1Ya,C1Za)
339
weld.C0 = CFrame.new(C0X,C0Y,C0Z)*CFrame.Angles(C0Xa,C0Ya,C0Za)
340
return weld
341
end
342
343
344
local sorb = CreatePart(m,1,1,"SmoothPlastic",BrickColor.random())
345
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))
346
local sorb2 = CreatePart(m,1,1,"SmoothPlastic",BrickColor.random())
347
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))
348
349
Player=game:GetService("Players").LocalPlayer
350
Character=Player.Character 
351
PlayerGui=Player.PlayerGui 
352
Backpack=Player.Backpack 
353
Torso=Character.Torso 
354
Head=Character.Head 
355
Humanoid=Character.Humanoid
356
m=Instance.new('Model',Character)
357
LeftArm=Character["Left Arm"] 
358
LeftLeg=Character["Left Leg"] 
359
RightArm=Character["Right Arm"] 
360
RightLeg=Character["Right Leg"] 
361
LS=Torso["Left Shoulder"] 
362
LH=Torso["Left Hip"] 
363
RS=Torso["Right Shoulder"] 
364
RH=Torso["Right Hip"] 
365
Face = Head.face
366
Neck=Torso.Neck
367
it=Instance.new
368
attacktype=1
369
vt=Vector3.new
370
cf=CFrame.new
371
euler=CFrame.fromEulerAnglesXYZ
372
angles=CFrame.Angles
373
cloaked=false
374
necko=cf(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
375
necko2=cf(0, -0.5, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
376
LHC0=cf(-1,-1,0,-0,-0,-1,0,1,0,1,0,0)
377
LHC1=cf(-0.5,1,0,-0,-0,-1,0,1,0,1,0,0)
378
RHC0=cf(1,-1,0,0,0,1,0,1,0,-1,-0,-0)
379
RHC1=cf(0.5,1,0,0,0,1,0,1,0,-1,-0,-0)
380
RootPart=Character.HumanoidRootPart
381
RootJoint=RootPart.RootJoint
382
RootCF=euler(-1.57,0,3.14)
383
attack = false 
384
attackdebounce = false 
385
deb=false
386
equipped=true
387
hand=false
388
MMouse=nil
389
combo=0
390
mana=0
391
trispeed=.2
392
attackmode='none'
393
local idle=0
394
local Anim="Idle"
395
local Effects={}
396
local gun=false
397
local shoot=false
398
local sine = 0
399
local change = 1
400
player=nil 
401
402
mouse=Player:GetMouse()
403
--save shoulders 
404
RSH, LSH=nil, nil 
405
--welds 
406
RW, LW=Instance.new("Weld"), Instance.new("Weld") 
407
RW.Name="Right Shoulder" LW.Name="Left Shoulder"
408
LH=Torso["Left Hip"]
409
RH=Torso["Right Hip"]
410
TorsoColor=Torso.BrickColor
411
function NoOutline(Part)
412
Part.TopSurface,Part.BottomSurface,Part.LeftSurface,Part.RightSurface,Part.FrontSurface,Part.BackSurface = 10,10,10,10,10,10
413
end
414
player=Player 
415
ch=Character
416
RSH=ch.Torso["Right Shoulder"] 
417
LSH=ch.Torso["Left Shoulder"] 
418
-- 
419
RSH.Parent=nil 
420
LSH.Parent=nil 
421
-- 
422
RW.Name="Right Shoulder"
423
RW.Part0=ch.Torso 
424
RW.C0=cf(1.5, 0.5, 0) --* CFrame.fromEulerAnglesXYZ(1.3, 0, -0.5) 
425
RW.C1=cf(0, 0.5, 0) 
426
RW.Part1=ch["Right Arm"] 
427
RW.Parent=ch.Torso 
428
-- 
429
LW.Name="Left Shoulder"
430
LW.Part0=ch.Torso 
431
LW.C0=cf(-1.5, 0.5, 0) --* CFrame.fromEulerAnglesXYZ(1.7, 0, 0.8) 
432
LW.C1=cf(0, 0.5, 0) 
433
LW.Part1=ch["Left Arm"] 
434
LW.Parent=ch.Torso 
435
436
local Stats=Instance.new("BoolValue")
437
Stats.Name="Stats"
438
Stats.Parent=Character
439
local Atk=Instance.new("NumberValue")
440
Atk.Name="Damage"
441
Atk.Parent=Stats
442
Atk.Value=1
443
local Def=Instance.new("NumberValue")
444
Def.Name="Defense"
445
Def.Parent=Stats
446
Def.Value=1
447
local Speed=Instance.new("NumberValue")
448
Speed.Name="Speed"
449
Speed.Parent=Stats
450
Speed.Value=1
451
local Mvmt=Instance.new("NumberValue")
452
Mvmt.Name="Movement"
453
Mvmt.Parent=Stats
454
Mvmt.Value=1
455
456
local donum=0
457
 
458
459
function part(formfactor,parent,reflectance,transparency,brickcolor,name,size)
460
local fp=it("Part")
461
fp.formFactor=formfactor 
462
fp.Parent=parent
463
fp.Reflectance=reflectance
464
fp.Transparency=transparency
465
fp.CanCollide=false 
466
fp.Locked=true
467
fp.BrickColor=brickcolor
468
fp.Name=name
469
fp.Size=size
470
fp.Position=Torso.Position 
471
NoOutline(fp)
472
fp.Material="SmoothPlastic"
473
fp:BreakJoints()
474
return fp 
475
end 
476
 
477
function mesh(Mesh,part,meshtype,meshid,offset,scale)
478
local mesh=it(Mesh) 
479
mesh.Parent=part
480
if Mesh=="SpecialMesh" then
481
mesh.MeshType=meshtype
482
if meshid~="nil" then
483
mesh.MeshId="http://www.roblox.com/asset/?id="..meshid
484
end
485
end
486
mesh.Offset=offset
487
mesh.Scale=scale
488
return mesh
489
end
490
 
491
function weld(parent,part0,part1,c0)
492
local weld=it("Weld") 
493
weld.Parent=parent
494
weld.Part0=part0 
495
weld.Part1=part1 
496
weld.C0=c0
497
return weld
498
end
499
 
500
local Color1=Torso.BrickColor
501
502
local bodvel=Instance.new("BodyVelocity")
503
local bg=Instance.new("BodyGyro")
504
505
function swait(num)
506
if num==0 or num==nil then
507
game:service'RunService'.Stepped:wait(0)
508
else
509
for i=0,num do
510
game:service'RunService'.Stepped:wait(0)
511
end
512
end
513
end
514
 
515
 
516
so = function(id,par,vol,pit) 
517
coroutine.resume(coroutine.create(function()
518
local sou = Instance.new("Sound",par or workspace)
519
sou.Volume=vol
520
sou.Pitch=pit or 1
521
sou.SoundId=id
522
swait() 
523
sou:play() 
524
game:GetService("Debris"):AddItem(sou,6)
525
end))
526
end
527
 
528
function clerp(a,b,t) 
529
local qa = {QuaternionFromCFrame(a)}
530
local qb = {QuaternionFromCFrame(b)} 
531
local ax, ay, az = a.x, a.y, a.z 
532
local bx, by, bz = b.x, b.y, b.z
533
local _t = 1-t
534
return QuaternionToCFrame(_t*ax + t*bx, _t*ay + t*by, _t*az + t*bz,QuaternionSlerp(qa, qb, t)) 
535
end 
536
 
537
function QuaternionFromCFrame(cf) 
538
local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components() 
539
local trace = m00 + m11 + m22 
540
if trace > 0 then 
541
local s = math.sqrt(1 + trace) 
542
local recip = 0.5/s 
543
return (m21-m12)*recip, (m02-m20)*recip, (m10-m01)*recip, s*0.5 
544
else 
545
local i = 0 
546
if m11 > m00 then
547
i = 1
548
end
549
if m22 > (i == 0 and m00 or m11) then 
550
i = 2 
551
end 
552
if i == 0 then 
553
local s = math.sqrt(m00-m11-m22+1) 
554
local recip = 0.5/s 
555
return 0.5*s, (m10+m01)*recip, (m20+m02)*recip, (m21-m12)*recip 
556
elseif i == 1 then 
557
local s = math.sqrt(m11-m22-m00+1) 
558
local recip = 0.5/s 
559
return (m01+m10)*recip, 0.5*s, (m21+m12)*recip, (m02-m20)*recip 
560
elseif i == 2 then 
561
local s = math.sqrt(m22-m00-m11+1) 
562
local recip = 0.5/s return (m02+m20)*recip, (m12+m21)*recip, 0.5*s, (m10-m01)*recip 
563
end 
564
end 
565
end
566
 
567
function QuaternionToCFrame(px, py, pz, x, y, z, w) 
568
local xs, ys, zs = x + x, y + y, z + z 
569
local wx, wy, wz = w*xs, w*ys, w*zs 
570
local xx = x*xs 
571
local xy = x*ys 
572
local xz = x*zs 
573
local yy = y*ys 
574
local yz = y*zs 
575
local zz = z*zs 
576
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)) 
577
end
578
 
579
function QuaternionSlerp(a, b, t) 
580
local cosTheta = a[1]*b[1] + a[2]*b[2] + a[3]*b[3] + a[4]*b[4] 
581
local startInterp, finishInterp; 
582
if cosTheta >= 0.0001 then 
583
if (1 - cosTheta) > 0.0001 then 
584
local theta = math.acos(cosTheta) 
585
local invSinTheta = 1/math.sin(theta) 
586
startInterp = math.sin((1-t)*theta)*invSinTheta 
587
finishInterp = math.sin(t*theta)*invSinTheta  
588
else 
589
startInterp = 1-t 
590
finishInterp = t 
591
end 
592
else 
593
if (1+cosTheta) > 0.0001 then 
594
local theta = math.acos(-cosTheta) 
595
local invSinTheta = 1/math.sin(theta) 
596
startInterp = math.sin((t-1)*theta)*invSinTheta 
597
finishInterp = math.sin(t*theta)*invSinTheta 
598
else 
599
startInterp = t-1 
600
finishInterp = t 
601
end 
602
end 
603
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 
604
end
605
606
local function CFrameFromTopBack(at, top, back)
607
local right = top:Cross(back)
608
return CFrame.new(at.x, at.y, at.z,
609
right.x, top.x, back.x,
610
right.y, top.y, back.y,
611
right.z, top.z, back.z)
612
end
613
614
function Triangle(a, b, c)
615
local edg1 = (c-a):Dot((b-a).unit)
616
local edg2 = (a-b):Dot((c-b).unit)
617
local edg3 = (b-c):Dot((a-c).unit)
618
if edg1 <= (b-a).magnitude and edg1 >= 0 then
619
a, b, c = a, b, c
620
elseif edg2 <= (c-b).magnitude and edg2 >= 0 then
621
a, b, c = b, c, a
622
elseif edg3 <= (a-c).magnitude and edg3 >= 0 then
623
a, b, c = c, a, b
624
else
625
assert(false, "unreachable")
626
end
627
 
628
local len1 = (c-a):Dot((b-a).unit)
629
local len2 = (b-a).magnitude - len1
630
local width = (a + (b-a).unit*len1 - c).magnitude
631
 
632
local maincf = CFrameFromTopBack(a, (b-a):Cross(c-b).unit, -(b-a).unit)
633
 
634
local list = {}
635
 
636
if len1 > 0.01 then
637
local w1 = Instance.new('WedgePart', m)
638
game:GetService("Debris"):AddItem(w1,5)
639
w1.Material = "SmoothPlastic"
640
w1.FormFactor = 'Custom'
641
w1.BrickColor = BrickColor.new("Really red")
642
w1.Transparency = 0
643
w1.Reflectance = 0
644
w1.Material = "SmoothPlastic"
645
w1.CanCollide = false
646
local l1 = Instance.new("PointLight",w1)
647
l1.Color = Color3.new(170,0,0)
648
NoOutline(w1)
649
local sz = Vector3.new(0.2, width, len1)
650
w1.Size = sz
651
local sp = Instance.new("SpecialMesh",w1)
652
sp.MeshType = "Wedge"
653
sp.Scale = Vector3.new(0,1,1) * sz/w1.Size
654
w1:BreakJoints()
655
w1.Anchored = true
656
w1.Parent = workspace
657
w1.Transparency = 0.7
658
table.insert(Effects,{w1,"Disappear",.01})
659
w1.CFrame = maincf*CFrame.Angles(math.pi,0,math.pi/2)*CFrame.new(0,width/2,len1/2)
660
table.insert(list,w1)
661
end
662
 
663
if len2 > 0.01 then
664
local w2 = Instance.new('WedgePart', m)
665
game:GetService("Debris"):AddItem(w2,5)
666
w2.Material = "SmoothPlastic"
667
w2.FormFactor = 'Custom'
668
w2.BrickColor = BrickColor.new("Really red")
669
w2.Transparency = 0
670
w2.Reflectance = 0
671
w2.Material = "SmoothPlastic"
672
w2.CanCollide = false
673
local l2 = Instance.new("PointLight",w2)
674
l2.Color = Color3.new(170,0,0)
675
NoOutline(w2)
676
local sz = Vector3.new(0.2, width, len2)
677
w2.Size = sz
678
local sp = Instance.new("SpecialMesh",w2)
679
sp.MeshType = "Wedge"
680
sp.Scale = Vector3.new(0,1,1) * sz/w2.Size
681
w2:BreakJoints()
682
w2.Anchored = true
683
w2.Parent = workspace
684
w2.Transparency = 0.7
685
table.insert(Effects,{w2,"Disappear",.01})
686
w2.CFrame = maincf*CFrame.Angles(math.pi,math.pi,-math.pi/2)*CFrame.new(0,width/2,-len1 - len2/2)
687
table.insert(list,w2)
688
end
689
return unpack(list)
690
end
691
 
692
693
Damagefunc=function(hit,minim,maxim,knockback,Type,Property,Delay,KnockbackType,decreaseblock)
694
        if hit.Parent==nil then
695
                return
696
        end
697
        h=hit.Parent:FindFirstChild("Humanoid")
698
        for _,v in pairs(hit.Parent:children()) do
699
        if v:IsA("Humanoid") then
700
        h=v
701
        end
702
        end
703
        if hit.Parent.Parent:FindFirstChild("Torso")~=nil then
704
        h=hit.Parent.Parent:FindFirstChild("Humanoid")
705
        end
706
        if hit.Parent.className=="Hat" then
707
        hit=hit.Parent.Parent:findFirstChild("Head")
708
        end
709
        if h~=nil and hit.Parent.Name~=Character.Name and hit.Parent:FindFirstChild("Torso")~=nil then
710
        if hit.Parent:findFirstChild("DebounceHit")~=nil then if hit.Parent.DebounceHit.Value==true then return end end
711
        --[[                if game.Players:GetPlayerFromCharacter(hit.Parent)~=nil then
712
                        return
713
                end]]
714
--                        hs(hit,1.2) 
715
                        c=Instance.new("ObjectValue")
716
                        c.Name="creator"
717
                        c.Value=game:service("Players").LocalPlayer
718
                        c.Parent=h
719
                        game:GetService("Debris"):AddItem(c,.5)
720
                Damage=math.random(minim,maxim)
721
--                h:TakeDamage(Damage)
722
                blocked=false
723
                block=hit.Parent:findFirstChild("Block")
724
                if block~=nil then
725
                print(block.className)
726
                if block.className=="NumberValue" then
727
                if block.Value>0 then
728
                blocked=true
729
                if decreaseblock==nil then
730
                block.Value=block.Value-1
731
                end
732
                end
733
                end
734
                if block.className=="IntValue" then
735
                if block.Value>0 then
736
                blocked=true
737
                if decreaseblock~=nil then
738
                block.Value=block.Value-1
739
                end
740
                end
741
                end
742
                end
743
                if blocked==false then
744
--                h:TakeDamage(Damage)
745
                h.Health=h.Health-Damage
746
                showDamage(hit.Parent,Damage,.5,BrickColor.new("Really red"))
747
                else
748
                h.Health=h.Health-(Damage/2)
749
                showDamage(hit.Parent,Damage/2,.5,BrickColor.new("Bright blue"))
750
                end
751
                if Type=="Knockdown" then
752
                hum=hit.Parent.Humanoid
753
hum.PlatformStand=true
754
coroutine.resume(coroutine.create(function(HHumanoid)
755
swait(1)
756
HHumanoid.PlatformStand=false
757
end),hum)
758
                local angle=(hit.Position-(Property.Position+Vector3.new(0,0,0))).unit
759
--hit.CFrame=CFrame.new(hit.Position,Vector3.new(angle.x,hit.Position.y,angle.z))*CFrame.fromEulerAnglesXYZ(math.pi/4,0,0)
760
local bodvol=Instance.new("BodyVelocity")
761
bodvol.velocity=angle*knockback
762
bodvol.P=5000
763
bodvol.maxForce=Vector3.new(8e+003, 8e+003, 8e+003)
764
bodvol.Parent=hit
765
rl=Instance.new("BodyAngularVelocity")
766
rl.P=3000
767
rl.maxTorque=Vector3.new(500000,500000,500000)*50000000000000
768
rl.angularvelocity=Vector3.new(math.random(-10,10),math.random(-10,10),math.random(-10,10))
769
rl.Parent=hit
770
game:GetService("Debris"):AddItem(bodvol,.5)
771
game:GetService("Debris"):AddItem(rl,.5)
772
                elseif Type=="Normal" then
773
                vp=Instance.new("BodyVelocity")
774
                vp.P=500
775
                vp.maxForce=Vector3.new(math.huge,0,math.huge)
776
--                vp.velocity=Character.Torso.CFrame.lookVector*Knockback
777
                if KnockbackType==1 then
778
                vp.velocity=Property.CFrame.lookVector*knockback+Property.Velocity/1.05
779
                elseif KnockbackType==2 then
780
                vp.velocity=Property.CFrame.lookVector*knockback
781
                end
782
                if knockback>0 then
783
                        vp.Parent=hit.Parent.Torso
784
                end
785
                game:GetService("Debris"):AddItem(vp,.5)
786
                elseif Type=="Up" then
787
                local bodyVelocity=Instance.new("BodyVelocity")
788
                bodyVelocity.velocity=vt(0,60,0)
789
                bodyVelocity.P=5000
790
                bodyVelocity.maxForce=Vector3.new(8e+003, 8e+003, 8e+003)
791
                bodyVelocity.Parent=hit
792
                game:GetService("Debris"):AddItem(bodyVelocity,1)
793
                rl=Instance.new("BodyAngularVelocity")
794
                rl.P=3000
795
                rl.maxTorque=Vector3.new(500000,500000,500000)*50000000000000
796
                rl.angularvelocity=Vector3.new(math.random(-30,30),math.random(-30,30),math.random(-30,30))
797
                rl.Parent=hit
798
                game:GetService("Debris"):AddItem(rl,.5)
799
                elseif Type=="Snare" then
800
                bp=Instance.new("BodyPosition")
801
                bp.P=2000
802
                bp.D=100
803
                bp.maxForce=Vector3.new(math.huge,math.huge,math.huge)
804
                bp.position=hit.Parent.Torso.Position
805
                bp.Parent=hit.Parent.Torso
806
                game:GetService("Debris"):AddItem(bp,1)
807
                elseif Type=="Target" then
808
                if Targetting==false then
809
                ZTarget=hit.Parent.Torso
810
                coroutine.resume(coroutine.create(function(Part) 
811
                so("http://www.roblox.com/asset/?id=15666462",Part,1,1.5) 
812
                swait(5)
813
                so("http://www.roblox.com/asset/?id=15666462",Part,1,1.5) 
814
                end),ZTarget)
815
                TargHum=ZTarget.Parent:findFirstChild("Humanoid")
816
                targetgui=Instance.new("BillboardGui")
817
                targetgui.Parent=ZTarget
818
                targetgui.Size=UDim2.new(10,100,10,100)
819
                targ=Instance.new("ImageLabel")
820
                targ.Parent=targetgui
821
                targ.BackgroundTransparency=1
822
                targ.Image="rbxassetid://4834067"
823
                targ.Size=UDim2.new(1,0,1,0)
824
                cam.CameraType="Scriptable"
825
                cam.CoordinateFrame=CFrame.new(Head.CFrame.p,ZTarget.Position)
826
                dir=Vector3.new(cam.CoordinateFrame.lookVector.x,0,cam.CoordinateFrame.lookVector.z)
827
                workspace.CurrentCamera.CoordinateFrame=CFrame.new(Head.CFrame.p,ZTarget.Position)
828
                Targetting=true
829
                RocketTarget=ZTarget
830
                for i=1,Property do
831
                --while Targetting==true and Humanoid.Health>0 and Character.Parent~=nil do
832
                if Humanoid.Health>0 and Character.Parent~=nil and TargHum.Health>0 and TargHum.Parent~=nil and Targetting==true then
833
                swait()
834
                end
835
                --workspace.CurrentCamera.CoordinateFrame=CFrame.new(Head.CFrame.p,Head.CFrame.p+rmdir*100)
836
                cam.CoordinateFrame=CFrame.new(Head.CFrame.p,ZTarget.Position)
837
                dir=Vector3.new(cam.CoordinateFrame.lookVector.x,0,cam.CoordinateFrame.lookVector.z)
838
                cam.CoordinateFrame=CFrame.new(Head.CFrame.p,ZTarget.Position)*cf(0,5,10)*euler(-0.3,0,0)
839
                end
840
                Targetting=false
841
                RocketTarget=nil
842
                targetgui.Parent=nil
843
                cam.CameraType="Custom"
844
                end
845
                end
846
                        debounce=Instance.new("BoolValue")
847
                        debounce.Name="DebounceHit"
848
                        debounce.Parent=hit.Parent
849
                        debounce.Value=true
850
                        game:GetService("Debris"):AddItem(debounce,Delay)
851
                        c=Instance.new("ObjectValue")
852
                        c.Name="creator"
853
                        c.Value=Player
854
                        c.Parent=h
855
                        game:GetService("Debris"):AddItem(c,.5)
856
                CRIT=false
857
                hitDeb=true
858
                AttackPos=6
859
        end
860
end
861
 
862
showDamage=function(Char,Dealt,du,Color)
863
        m=Instance.new("Model")
864
        m.Name=tostring(Dealt)
865
        h=Instance.new("Humanoid")
866
        h.Health=0
867
        h.MaxHealth=0
868
        h.Parent=m
869
        c=Instance.new("Part")
870
        c.Transparency=0
871
        c.BrickColor=Color
872
c.Transparency = 1
873
        c.Name="Head"
874
        c.TopSurface=0
875
        c.BottomSurface=0
876
        c.formFactor="Plate"
877
        c.Size=Vector3.new(1,.4,1)
878
879
local txt = Instance.new("BillboardGui", c)
880
txt.Adornee = c
881
txt.Name = "_status"
882
txt.Size = UDim2.new(2, 0, 1.2, 0)
883
txt.StudsOffset = Vector3.new(-9, 8, 0)
884
local text = Instance.new("TextLabel", txt)
885
text.Size = UDim2.new(10, 0, 7, 0)
886
text.FontSize = "Size12"
887
text.TextScaled = true
888
text.TextTransparency = 0.5
889
text.BackgroundTransparency = 1 
890
text.TextTransparency = 0.5
891
text.TextStrokeTransparency = 0.5
892
text.Font = "SciFi"
893
text.TextStrokeColor3 = Color3.new(0,0,0)
894
v=Instance.new("Part")
895
v.Name = "ColorBrick"
896
v.Parent=c
897
v.FormFactor="Symmetric"
898
v.Anchored=true
899
v.CanCollide=false
900
v.BottomSurface="Smooth"
901
v.TopSurface="Smooth"
902
v.Size=Vector3.new(10,5,3)
903
v.Transparency=1
904
v.CFrame=c.CFrame
905
v.BrickColor=BrickColor.random()
906
v.Transparency=1
907
text.TextColor3 = t.BrickColor.Color
908
v.Shape="Block"
909
text.Text = tostring(Dealt)
910
        ms=Instance.new("CylinderMesh")
911
        ms.Scale=Vector3.new(.8,.8,.8)
912
--[[local hitsounds={"199149137","199149186","199149221","199149235","199149269","199149297"}
913
  local rndm=math.random(1,#hitsounds)
914
  local r=rndm
915
CFuncs["Sound"].Create("http://www.roblox.com/asset/?id="..hitsounds[r],c,1.25,1)]]--
916
        if CRIT==true then
917
                ms.Scale=Vector3.new(1,1.25,1)
918
        end
919
        ms.Parent=c
920
        c.Reflectance=0
921
        Instance.new("BodyGyro").Parent=c
922
        c.Parent=m
923
        if Char:findFirstChild("Head")~=nil then
924
        c.CFrame=CFrame.new(Char["Head"].CFrame.p+Vector3.new(0,1.5,0))
925
        elseif Char.Parent:findFirstChild("Head")~=nil then
926
        c.CFrame=CFrame.new(Char.Parent["Head"].CFrame.p+Vector3.new(0,1.5,0))
927
        end
928
        f=Instance.new("BodyPosition")
929
        f.P=2000
930
        f.D=100
931
        f.maxForce=Vector3.new(math.huge,math.huge,math.huge)
932
        f.position=c.Position+Vector3.new(0,3,0)
933
        f.Parent=c
934
        game:GetService("Debris"):AddItem(m,.5+du)
935
        c.CanCollide=false
936
        m.Parent=workspace
937
        c.CanCollide=false
938
end
939
940
function rayCast(Pos, Dir, Max, Ignore)  -- Origin Position , Direction, MaxDistance , IgnoreDescendants
941
return game:service("Workspace"):FindPartOnRay(Ray.new(Pos, Dir.unit * (Max or 999.999)), Ignore) 
942
end 
943
944
function SkullEffect(brickcolor,cframe,x1,y1,z1,delay)
945
local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5))
946
prt.Anchored=true
947
prt.CFrame=cframe
948
local msh=mesh("SpecialMesh",prt,"FileMesh","http://www.roblox.com/asset/?id=4770583",vt(0,0,0),vt(x1,y1,z1))
949
--http://www.roblox.com/asset/?id=4770560
950
game:GetService("Debris"):AddItem(prt,2)
951
CF=prt.CFrame
952
coroutine.resume(coroutine.create(function(Part,Mesh,TehCF) 
953
for i=0,1,0.2 do
954
wait()
955
Part.CFrame=CF*cf(0,0,-0.4)
956
end
957
for i=0,1,delay do
958
wait()
959
--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)
960
Mesh.Scale=Mesh.Scale
961
end
962
for i=0,1,0.1 do
963
wait()
964
Part.Transparency=i
965
end
966
Part.Parent=nil
967
end),prt,msh,CF)
968
end
969
 
970
function MagicBlock(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay)
971
local prt=part(3,char,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5))
972
prt.Anchored=true
973
prt.Material = "Neon"
974
prt.CFrame=cframe
975
prt.CFrame=prt.CFrame*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50))
976
msh=mesh("BlockMesh",prt,"","",vt(0,0,0),vt(x1,y1,z1))
977
game:GetService("Debris"):AddItem(prt,5)
978
coroutine.resume(coroutine.create(function(Part,Mesh) 
979
for i=0,1,delay do
980
swait()
981
Part.CFrame=Part.CFrame*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50))
982
Part.Transparency=i
983
Mesh.Scale=Mesh.Scale+vt(x3,y3,z3)
984
end
985
Part.Parent=nil
986
end),prt,msh)
987
end
988
989
function MagicBlockSteady(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay,rottype)
990
local prt=part(3,char,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5))
991
prt.Anchored=true
992
prt.Material = "Neon"
993
prt.CFrame=cframe
994
msh=mesh("BlockMesh",prt,"","",vt(0,0,0),vt(x1,y1,z1))
995
game:GetService("Debris"):AddItem(prt,5)
996
coroutine.resume(coroutine.create(function(Part,Mesh) 
997
	local rtype = rottype
998
for i=0,1,delay do
999
swait()
1000
if rtype == 1 then
1001
prt.CFrame = prt.CFrame*CFrame.Angles(0,0,0.1)
1002
elseif rtype == 2 then
1003
prt.CFrame = prt.CFrame*CFrame.Angles(0,0,-0.1)
1004
end
1005
Part.Transparency=i
1006
Mesh.Scale=Mesh.Scale+vt(x3,y3,z3)
1007
end
1008
Part.Parent=nil
1009
end),prt,msh)
1010
end
1011
1012
function MagicSphere(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay)
1013
local prt=part(3,char,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5))
1014
prt.Anchored=true
1015
prt.CFrame=cframe
1016
prt.CFrame=prt.CFrame*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50))
1017
msh=mesh("SpecialMesh",prt,"Sphere","",vt(0,0,0),vt(x1,y1,z1))
1018
game:GetService("Debris"):AddItem(prt,5)
1019
coroutine.resume(coroutine.create(function(Part,Mesh) 
1020
for i=0,1,delay do
1021
wait()
1022
Part.Transparency=i
1023
Mesh.Scale=Mesh.Scale+vt(x3,y3,z3)
1024
end
1025
Part.Parent=nil
1026
end),prt,msh)
1027
end
1028
1029
function MagicBlockSteady(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay,rottype)
1030
local prt=part(3,char,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5))
1031
prt.Anchored=true
1032
prt.Material = "Neon"
1033
prt.CFrame=cframe
1034
msh=mesh("BlockMesh",prt,"","",vt(0,0,0),vt(x1,y1,z1))
1035
game:GetService("Debris"):AddItem(prt,5)
1036
coroutine.resume(coroutine.create(function(Part,Mesh) 
1037
	local rtype = rottype
1038
for i=0,1,delay do
1039
swait()
1040
if rtype == 1 then
1041
prt.CFrame = prt.CFrame*CFrame.Angles(0,0,0.1)
1042
elseif rtype == 2 then
1043
prt.CFrame = prt.CFrame*CFrame.Angles(0,0,-0.1)
1044
end
1045
Part.Transparency=i
1046
Mesh.Scale=Mesh.Scale+vt(x3,y3,z3)
1047
end
1048
Part.Parent=nil
1049
end),prt,msh)
1050
end
1051
1052
function MagicShock(brickcolor,cframe,x1,y1,x3,y3,delay,rottype)
1053
local prt=part(3,char,1,1,brickcolor,"Effect",vt(0.5,0.5,0.5))
1054
prt.Anchored=true
1055
prt.Material = "Neon"
1056
prt.CFrame=cframe
1057
local dec = decal(prt.Color,"http://www.roblox.com/asset/?id=874580939","Front",prt)
1058
local dec2 = decal(prt.Color,"http://www.roblox.com/asset/?id=874580939","Front",prt)
1059
msh=mesh("BlockMesh",prt,"","",vt(0,0,0),vt(x1,y1,0.01))
1060
game:GetService("Debris"):AddItem(prt,5)
1061
coroutine.resume(coroutine.create(function(Part,Mesh) 
1062
	local rtype = rottype
1063
for i=0,1,delay do
1064
swait()
1065
if rtype == 1 then
1066
prt.CFrame = prt.CFrame*CFrame.Angles(0,0,0.1)
1067
elseif rtype == 2 then
1068
prt.CFrame = prt.CFrame*CFrame.Angles(0,0,-0.1)
1069
end
1070
dec.Transparency=i
1071
dec2.Transparency=i
1072
Mesh.Scale=Mesh.Scale+vt(x3,y3,0)
1073
end
1074
Part.Parent=nil
1075
end),prt,msh)
1076
end
1077
1078
function MagicShockAlt(brickcolor,cframe,x1,y1,x3,y3,delay,rottype)
1079
local prt=part(3,char,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5))
1080
prt.Anchored=true
1081
prt.Material = "Neon"
1082
prt.CFrame=cframe
1083
msh=mesh("BlockMesh",prt,"","",vt(0,0,0),vt(x1,y1,0.01))
1084
game:GetService("Debris"):AddItem(prt,5)
1085
coroutine.resume(coroutine.create(function(Part,Mesh) 
1086
	local rtype = rottype
1087
for i=0,1,delay do
1088
swait()
1089
if rtype == 1 then
1090
prt.CFrame = prt.CFrame*CFrame.Angles(0,0,0.1)
1091
elseif rtype == 2 then
1092
prt.CFrame = prt.CFrame*CFrame.Angles(0,0,-0.1)
1093
end
1094
prt.Transparency=i
1095
Mesh.Scale=Mesh.Scale+vt(x3,y3,0)
1096
end
1097
Part.Parent=nil
1098
end),prt,msh)
1099
end
1100
1101
function MagicShockAltCircle(brickcolor,cframe,x1,z1,x3,z3,delay,rottype)
1102
local prt=part(3,char,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5))
1103
prt.Anchored=true
1104
prt.Material = "Neon"
1105
prt.CFrame=cframe
1106
msh=mesh("BlockMesh",prt,"","",vt(0,0,0),vt(x1,1,z1))
1107
game:GetService("Debris"):AddItem(prt,5)
1108
coroutine.resume(coroutine.create(function(Part,Mesh) 
1109
	local rtype = rottype
1110
for i=0,1,delay do
1111
swait()
1112
if rtype == 1 then
1113
prt.CFrame = prt.CFrame*CFrame.Angles(0,0.1,0)
1114
elseif rtype == 2 then
1115
prt.CFrame = prt.CFrame*CFrame.Angles(0,-0.1,0)
1116
end
1117
prt.Transparency=i
1118
Mesh.Scale=Mesh.Scale+vt(x3,0,z3)
1119
end
1120
Part.Parent=nil
1121
end),prt,msh)
1122
end
1123
1124
function MagicShockTrailAlt(brickcolor,cframe,x1,y1,z1,x3,y3,delay,rottype)
1125
local prt=part(3,char,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5))
1126
prt.Anchored=true
1127
prt.Material = "Neon"
1128
prt.CFrame=cframe
1129
msh=mesh("BlockMesh",prt,"","",vt(0,0,0),vt(x1,y1,z1))
1130
game:GetService("Debris"):AddItem(prt,5)
1131
coroutine.resume(coroutine.create(function(Part,Mesh) 
1132
	local rtype = rottype
1133
for i=0,1,delay do
1134
swait()
1135
if rtype == 1 then
1136
prt.CFrame = prt.CFrame*CFrame.Angles(0,0,0.1)
1137
elseif rtype == 2 then
1138
prt.CFrame = prt.CFrame*CFrame.Angles(0,0,-0.1)
1139
end
1140
prt.Transparency=i
1141
Mesh.Scale=Mesh.Scale+vt(x3,y3,0)
1142
end
1143
Part.Parent=nil
1144
end),prt,msh)
1145
end
1146
 
1147
function MagicBlock2(brickcolor,cframe,Parent,x1,y1,z1,x3,y3,z3,delay)
1148
local prt=part(3,char,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5))
1149
prt.Anchored=false
1150
prt.CFrame=cframe
1151
msh=mesh("BlockMesh",prt,"","",vt(0,0,0),vt(x1,y1,z1))
1152
local wld=weld(prt,prt,Parent,cframe)
1153
game:GetService("Debris"):AddItem(prt,5)
1154
coroutine.resume(coroutine.create(function(Part,Mesh,Weld) 
1155
for i=0,1,delay do
1156
wait()
1157
Weld.C0=euler(math.random(-50,50),math.random(-50,50),math.random(-50,50))*cframe
1158
--Part.CFrame=Part.CFrame*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50))
1159
Part.Transparency=i
1160
Mesh.Scale=Mesh.Scale+vt(x3,y3,z3)
1161
end
1162
Part.Parent=nil
1163
end),prt,msh,wld)
1164
end
1165
 
1166
function MagicBlock3(brickcolor,cframe,Parent,x1,y1,z1,x3,y3,z3,delay)
1167
local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5))
1168
prt.Anchored=false
1169
prt.CFrame=cframe
1170
msh=mesh("BlockMesh",prt,"","",vt(0,0,0),vt(x1,y1,z1))
1171
local wld=weld(prt,prt,Parent,euler(0,0,0)*cf(0,0,0))
1172
game:GetService("Debris"):AddItem(prt,5)
1173
coroutine.resume(coroutine.create(function(Part,Mesh,Weld) 
1174
for i=0,1,delay do
1175
wait()
1176
Weld.C0=euler(i*20,0,0)
1177
--Part.CFrame=Part.CFrame*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50))
1178
Part.Transparency=i
1179
Mesh.Scale=Mesh.Scale+vt(x3,y3,z3)
1180
end
1181
Part.Parent=nil
1182
end),prt,msh,wld)
1183
end
1184
 
1185
function MagicCircle2(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay)
1186
local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5))
1187
prt.Anchored=true
1188
prt.CFrame=cframe
1189
local msh=mesh("CylinderMesh",prt,"","",vt(0,0,0),vt(x1,y1,z1))
1190
game:GetService("Debris"):AddItem(prt,2)
1191
coroutine.resume(coroutine.create(function(Part,Mesh) 
1192
for i=0,1,delay do
1193
wait()
1194
Part.CFrame=Part.CFrame
1195
Mesh.Scale=Mesh.Scale+vt(x3,y3,z3)
1196
local prt2=part(3,workspace,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5))
1197
prt2.Anchored=true
1198
prt2.CFrame=cframe*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50))
1199
local msh2=mesh("SpecialMesh",prt2,"Sphere","",vt(0,0,0),vt(0.5,0.5,0.5))
1200
game:GetService("Debris"):AddItem(prt2,2)
1201
coroutine.resume(coroutine.create(function(Part,Mesh) 
1202
for i=0,1,0.1 do
1203
wait()
1204
Part.CFrame=Part.CFrame*cf(0,0.5,0)
1205
end
1206
Part.Parent=nil
1207
end),prt2,msh2)
1208
end
1209
for i=0,1,delay*2 do
1210
wait()
1211
Part.CFrame=Part.CFrame
1212
Mesh.Scale=vt((x1+x3)-(x1+x3)*i,(y1+y3)-(y1+y3)*i,(z1+z3)-(z1+z3)*i)
1213
end
1214
Part.Parent=nil
1215
end),prt,msh)
1216
end
1217
 
1218
function MagicCircle(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay)
1219
local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5))
1220
prt.Anchored=true
1221
prt.CFrame=cframe
1222
local msh=mesh("SpecialMesh",prt,"Sphere","",vt(0,0,0),vt(x1,y1,z1))
1223
game:GetService("Debris"):AddItem(prt,2)
1224
coroutine.resume(coroutine.create(function(Part,Mesh) 
1225
for i=0,1,delay do
1226
wait()
1227
Part.CFrame=Part.CFrame
1228
Part.Transparency=i
1229
Mesh.Scale=Mesh.Scale+vt(x3,y3,z3)
1230
end
1231
Part.Parent=nil
1232
end),prt,msh)
1233
end
1234
 
1235
function BreakEffect(brickcolor,cframe,x1,y1,z1)
1236
local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5))
1237
prt.Anchored=true
1238
prt.CFrame=cframe*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50))
1239
local msh=mesh("SpecialMesh",prt,"Sphere","",vt(0,0,0),vt(x1,y1,z1))
1240
game:GetService("Debris"):AddItem(prt,2)
1241
coroutine.resume(coroutine.create(function(Part,CF,Numbb,randnumb) 
1242
CF=Part.CFrame
1243
Numbb=0
1244
randnumb=math.random()/10
1245
rand1=math.random()/10
1246
for i=0,1,rand1 do
1247
wait()
1248
CF=CF*cf(0,math.random()/2,0)
1249
--Part.CFrame=Part.CFrame*euler(0.5,0,0)*cf(0,1,0)
1250
Part.CFrame=CF*euler(Numbb,0,0)
1251
Part.Transparency=i
1252
Numbb=Numbb+randnumb
1253
end
1254
Part.Parent=nil
1255
end),prt,CF,Numbb,randnumb)
1256
end
1257
 
1258
function MagicWaveThing(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay)
1259
local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5))
1260
prt.Anchored=true
1261
prt.CFrame=cframe
1262
msh=mesh("SpecialMesh",prt,"FileMesh","http://www.roblox.com/asset/?id=1051557",vt(0,0,0),vt(x1,y1,z1))
1263
game:GetService("Debris"):AddItem(prt,5)
1264
coroutine.resume(coroutine.create(function(Part,Mesh) 
1265
for i=0,1,delay do
1266
wait()
1267
Part.CFrame=Part.CFrame*euler(0,0.7,0)
1268
Part.Transparency=i
1269
Mesh.Scale=Mesh.Scale+vt(x3,y3,z3)
1270
end
1271
Part.Parent=nil
1272
end),prt,msh)
1273
end
1274
 
1275
function WaveEffect(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay)
1276
local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5))
1277
prt.Anchored=true
1278
prt.CFrame=cframe
1279
msh=mesh("SpecialMesh",prt,"FileMesh","http://www.roblox.com/asset/?id=20329976",vt(0,0,0),vt(x1,y1,z1))
1280
game:GetService("Debris"):AddItem(prt,2)
1281
coroutine.resume(coroutine.create(function(Part,Mesh) 
1282
for i=0,1,delay do
1283
wait()
1284
Part.CFrame=Part.CFrame*cf(0,y3/2,0)
1285
Part.Transparency=i
1286
Mesh.Scale=Mesh.Scale+vt(x3,y3,z3)
1287
end
1288
Part.Parent=nil
1289
end),prt,msh)
1290
end
1291
 
1292
function StravEffect(brickcolor,cframe,x,y,z,x1,y1,z1,delay)
1293
local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5))
1294
prt.Anchored=true
1295
prt.CFrame=cframe*cf(x,y,z)
1296
msh=mesh("SpecialMesh",prt,"FileMesh","rbxassetid://168892363",vt(0,0,0),vt(x1,y1,z1))
1297
game:GetService("Debris"):AddItem(prt,5)
1298
coroutine.resume(coroutine.create(function(Part,Mesh,ex,why,zee) 
1299
local num=math.random()
1300
local num2=math.random(-3,2)+math.random()
1301
local numm=0
1302
for i=0,1,delay*2 do
1303
swait()
1304
Part.CFrame=cframe*euler(0,numm*num*10,0)*cf(ex,why,zee)*cf(-i*10,num2,0)
1305
Part.Transparency=i
1306
numm=numm+0.01
1307
end
1308
Part.Parent=nil
1309
Mesh.Parent=nil
1310
end),prt,msh,x,y,z)
1311
end
1312
1313
function dmgstart(dmg,what)
1314
	hitcon = what.Touched:connect(function(hit)
1315
		local hum = hit.Parent:FindFirstChild("Humanoid")
1316
		if hum and not hum:IsDescendantOf(Character) then
1317
			hum:TakeDamage(dmg)
1318
		end
1319
	end)
1320
end
1321
1322
function dmgstop()
1323
	hitcon:disconnect()
1324
end
1325
1326
function Cloak()
1327
Face.Parent=nil
1328
cloaked=true
1329
        for _,v in pairs(Torso.Parent:children()) do
1330
                if v.className=="Part" and v.Name~="HumanoidRootPart" then
1331
                coroutine.resume(coroutine.create(function() 
1332
                for i=0,1,0.2 do
1333
                wait()
1334
                v.Transparency=i
1335
                end
1336
                v.Transparency=1
1337
                end))
1338
                end
1339
                if v.className=="Hat" then
1340
                hatp=v.Handle
1341
                coroutine.resume(coroutine.create(function(derp) 
1342
                for i=0,1,0.2 do
1343
                wait()
1344
                derp.Transparency=i
1345
                end
1346
                derp.Transparency=1
1347
                end),hatp)
1348
                end
1349
        end
1350
        for _,v in pairs(m:children()) do
1351
                if v.className=="Part" then
1352
                coroutine.resume(coroutine.create(function() 
1353
                for i=0,1,0.2 do
1354
                wait()
1355
                v.Transparency=i
1356
                end
1357
                v.Transparency=1
1358
                end))
1359
                end
1360
        end
1361
end
1362
 
1363
function UnCloak()
1364
so("http://roblox.com/asset/?id=2767090",Torso,1,1.1) 
1365
Face.Parent=Head 
1366
cloaked=false
1367
        for _,v in pairs(Torso.Parent:children()) do
1368
                if v.className=="Part" and v.Name~="HumanoidRootPart" then
1369
                coroutine.resume(coroutine.create(function() 
1370
                for i=0,1,0.1 do
1371
                wait()
1372
                v.Transparency=v.Transparency-0.1
1373
                end
1374
                v.Transparency=0
1375
                end))
1376
                end
1377
                if v.className=="Hat" then
1378
                hatp=v.Handle
1379
                coroutine.resume(coroutine.create(function(derp) 
1380
                for i=0,1,0.1 do
1381
                wait()
1382
                derp.Transparency=derp.Transparency-0.1
1383
                end
1384
                derp.Transparency=0
1385
                end),hatp)
1386
                end
1387
        end
1388
        for _,v in pairs(m:children()) do
1389
                if v.className=="Part" and v.Name~="hitbox" and v.Name~='tip' then
1390
                coroutine.resume(coroutine.create(function() 
1391
                for i=0,1,0.1 do
1392
                wait()
1393
                v.Transparency=v.Transparency-0.1
1394
                end
1395
                v.Transparency=0
1396
                end))
1397
                v.Transparency=0
1398
                end
1399
        end
1400
end
1401
1402
local jumped = false
1403
function jump()
1404
	attack = true
1405
	jumped = true
1406
	hum.WalkSpeed = 0
1407
	MagicBlock(bc("White"),root.CFrame,15,15,15,-0.25,-0.25,-0.25,0.015)
1408
	CFuncs["Sound"].Create("rbxassetid://169445572", root, 1, 1)
1409
	CFuncs["Sound"].Create("rbxassetid://169380495", root, 1, 0.7)
1410
	for i = 0,15,0.1 do
1411
		swait()
1412
		MagicBlock(bc("White"),sorb2.CFrame,3,3,3,0.05,0.05,0.05,0.05)
1413
		MagicBlock(bc("White"),sorb.CFrame,3,3,3,0.05,0.05,0.05,0.05)
1414
		RH.C0=clerp(RH.C0,cf(1,0.45,-0.75)*angles(math.rad(0),math.rad(90),math.rad(0))*angles(math.rad(-2.5),math.rad(0),math.rad(50)),.05)
1415
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(15)),.05)
1416
            RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,-1.5)* angles(math.rad(50),math.rad(0),math.rad(0)),0.05)
1417
            Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(5),math.rad(0),math.rad(0)),.05)
1418
             RW.C0 = clerp(RW.C0, CFrame.new(1.45, 0.5, 0) * angles(math.rad(50), math.rad(0), math.rad(20)), 0.05)
1419
             LW.C0 = clerp(LW.C0, CFrame.new(-1.45, 0.5, 0) * angles(math.rad(50), math.rad(0), math.rad(-20)), 0.05)
1420
	end
1421
	local bv = Instance.new("BodyVelocity")
1422
  bv.maxForce = Vector3.new(1e9, 1e9, 1e9)
1423
  bv.velocity = Vector3.new(0,500,0)
1424
  bv.Parent = root
1425
game:GetService("Debris"):AddItem(bv, 0.5)
1426
local rng = Instance.new("Part", char)
1427
        rng.Anchored = true
1428
        rng.BrickColor = BrickColor.new("White")
1429
        rng.CanCollide = false
1430
        rng.FormFactor = 3
1431
        rng.Name = "Ring"
1432
        rng.Size = Vector3.new(1, 1, 1)
1433
        rng.Transparency = 0
1434
        rng.TopSurface = 0
1435
        rng.BottomSurface = 0
1436
        rng.Position = root.Position
1437
        rng.CFrame = rng.CFrame * CFrame.Angles(math.rad(90), math.rad(0), math.rad(0))
1438
        local rngm = Instance.new("SpecialMesh", rng)
1439
        rngm.MeshId = "http://www.roblox.com/asset/?id=3270017"
1440
local rng2 = rng:Clone()
1441
rng2.Parent = char
1442
local rng2m = rng2.Mesh
1443
local rng3 = rng:Clone()
1444
rng3.Parent = char
1445
local rng3m = rng3.Mesh
1446
local rng4 = rng:Clone()
1447
rng4.Parent = char
1448
local rng4m = rng4.Mesh
1449
local rng5 = rng:Clone()
1450
rng5.Parent = char
1451
local rng5m = rng5.Mesh
1452
	CFuncs["Sound"].Create("rbxassetid://324867021", rng, 10, 1)
1453
	wait()
1454
	local scaler = 10
1455
	local scaler2 = 10
1456
	game:GetService("Debris"):AddItem(bv, 2.4)
1457
	hum.WalkSpeed = 50
1458
	MagicBlock(bc("White"),root.CFrame,15,15,15,10,10,10,0.015)
1459
	for i = 0,10,0.1 do
1460
		swait()
1461
		rng.Transparency = rng.Transparency + 0.01
1462
		rng2.Transparency = rng2.Transparency + 0.01
1463
		rng3.Transparency = rng3.Transparency + 0.01
1464
		rng4.Transparency = rng4.Transparency + 0.01
1465
		rng5.Transparency = rng5.Transparency + 0.01
1466
		scaler = scaler - 0.125
1467
		scaler2 = scaler2 - 0.1
1468
		rng2m.Scale = rng2m.Scale + Vector3.new(scaler/1.25, scaler/1.25, 20)
1469
		rng3m.Scale = rng3m.Scale + Vector3.new(scaler/1.5, scaler/1.5, 30)
1470
		rng4m.Scale = rng4m.Scale + Vector3.new(scaler/1.75, scaler/1.75, 40)
1471
		rng5m.Scale = rng5m.Scale + Vector3.new(scaler/2, scaler/2, 50)
1472
		 rngm.Scale = rngm.Scale + Vector3.new(scaler2, scaler2, 0)
1473
		RH.C0=clerp(RH.C0,cf(1,-0.25,-0.5)*angles(math.rad(0),math.rad(90),math.rad(0))*angles(math.rad(-2.5),math.rad(0),math.rad(5)),.5)
1474
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(5)),.5)
1475
            RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(-5),math.rad(0),math.rad(0)),0.5)
1476
            Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(-5),math.rad(0),math.rad(0)),.5)
1477
             RW.C0 = clerp(RW.C0, CFrame.new(1.45, 0.5, 0) * angles(math.rad(-20), math.rad(0), math.rad(50)), 0.5)
1478
             LW.C0 = clerp(LW.C0, CFrame.new(-1.45, 0.5, 0) * angles(math.rad(-20), math.rad(0), math.rad(-50)), 0.5)
1479
	end
1480
	game:GetService("Debris"):AddItem(rng, 0.1)
1481
	game:GetService("Debris"):AddItem(rng2, 0.1)
1482
	game:GetService("Debris"):AddItem(rng3, 0.1)
1483
	game:GetService("Debris"):AddItem(rng4, 0.1)
1484
	game:GetService("Debris"):AddItem(rng5, 0.1)
1485
	hum.WalkSpeed = 16
1486
	attack = false
1487
	jumped = false
1488
end
1489
1490
function dash()
1491
	attack = true
1492
	jumped = true
1493
	hum.WalkSpeed = 0
1494
	local bv = Instance.new("BodyVelocity")
1495
  bv.maxForce = Vector3.new(1e9, 1e9, 1e9)
1496
  bv.velocity = root.CFrame.lookVector*150
1497
  bv.Parent = root
1498
game:GetService("Debris"):AddItem(bv, 1)
1499
local rng = Instance.new("Part", char)
1500
        rng.Anchored = true
1501
        rng.BrickColor = BrickColor.new("White")
1502
        rng.CanCollide = false
1503
        rng.FormFactor = 3
1504
        rng.Name = "Ring"
1505
        rng.Size = Vector3.new(1, 1, 1)
1506
        rng.Transparency = 0
1507
        rng.TopSurface = 0
1508
        rng.BottomSurface = 0
1509
        rng.CFrame = root.CFrame
1510
        local rngm = Instance.new("SpecialMesh", rng)
1511
        rngm.MeshId = "http://www.roblox.com/asset/?id=3270017"
1512
local rng2 = rng:Clone()
1513
rng2.Parent = char
1514
rng2.CFrame = root.CFrame + root.CFrame.lookVector*10
1515
local rng2m = rng2.Mesh
1516
local rng3 = rng:Clone()
1517
rng3.Parent = char
1518
rng3.CFrame = root.CFrame + root.CFrame.lookVector*20
1519
local rng3m = rng3.Mesh
1520
local rng4 = rng:Clone()
1521
rng4.Parent = char
1522
rng4.CFrame = root.CFrame + root.CFrame.lookVector*30
1523
local rng4m = rng4.Mesh
1524
local rng5 = rng:Clone()
1525
rng5.Parent = char
1526
rng5.CFrame = root.CFrame + root.CFrame.lookVector*40
1527
local rng5m = rng5.Mesh
1528
	CFuncs["Sound"].Create("rbxassetid://324867021", root, 1, 1)
1529
	wait()
1530
	local scaler = 10/5
1531
	local scaler2 = 10/5
1532
	local hit = larm.Touched:connect(function(hit) 
1533
	Damagefunc(hit,25,34,math.random(10,20),"Normal",root,.2,1)
1534
end)
1535
	for i = 0,10,0.1 do
1536
		swait()
1537
		MagicBlock(bc("White"),sorb2.CFrame,3,3,3,0.05,0.05,0.05,0.05)
1538
		rng.Transparency = rng.Transparency + 0.01
1539
		rng2.Transparency = rng2.Transparency + 0.01
1540
		rng3.Transparency = rng3.Transparency + 0.01
1541
		rng4.Transparency = rng4.Transparency + 0.01
1542
		rng5.Transparency = rng5.Transparency + 0.01
1543
		scaler = scaler - 0.125/5
1544
		scaler2 = scaler2 - 0.1/5
1545
		rng2m.Scale = rng2m.Scale + Vector3.new(scaler2/1.25, scaler2/1.25, 0)
1546
		rng3m.Scale = rng3m.Scale + Vector3.new(scaler2/1.5, scaler2/1.5, 0)
1547
		rng4m.Scale = rng4m.Scale + Vector3.new(scaler2/1.75, scaler2/1.75, 0)
1548
		rng5m.Scale = rng5m.Scale + Vector3.new(scaler2/2, scaler2/2, 0)
1549
		 rngm.Scale = rngm.Scale + Vector3.new(scaler2, scaler2, 0)
1550
		RH.C0=clerp(RH.C0,cf(1,-0.25,-0.5)*angles(math.rad(0),math.rad(90),math.rad(0))*angles(math.rad(-2.5),math.rad(0),math.rad(-25)),.5)
1551
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(5)),.5)
1552
            RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(20),math.rad(0),math.rad(-80)),0.5)
1553
            Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(5),math.rad(0),math.rad(80)),.5)
1554
             RW.C0 = clerp(RW.C0, CFrame.new(1.45, 0.5, 0) * angles(math.rad(-20), math.rad(0), math.rad(50)), 0.5)
1555
             LW.C0 = clerp(LW.C0, CFrame.new(-1.45, 0.5, 0) * angles(math.rad(-20), math.rad(0), math.rad(-110)), 0.5)
1556
	end
1557
	game:GetService("Debris"):AddItem(rng, 0.1)
1558
	game:GetService("Debris"):AddItem(rng2, 0.1)
1559
	game:GetService("Debris"):AddItem(rng3, 0.1)
1560
	game:GetService("Debris"):AddItem(rng4, 0.1)
1561
	game:GetService("Debris"):AddItem(rng5, 0.1)
1562
	hum.WalkSpeed = 16
1563
	hit:disconnect()
1564
	attack = false
1565
	jumped = false
1566
end
1567
1568
function boom()
1569
	attack = true
1570
	jumped = true
1571
	hum.WalkSpeed = 0
1572
	MagicBlock(bc("White"),sorb.CFrame,15,15,15,-0.25,-0.25,-0.25,0.015)
1573
	CFuncs["Sound"].Create("rbxassetid://169445572", root, 1, 1)
1574
	CFuncs["Sound"].Create("rbxassetid://169380495", root, 1, 0.7)
1575
	for i = 0,15,0.1 do
1576
		swait()
1577
		MagicBlock(bc("White"),sorb.CFrame,3,3,3,0.05,0.05,0.05,0.05)
1578
		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)),.05)
1579
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)),.05)
1580
            RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(0),math.rad(0),math.rad(-80)),0.05)
1581
            Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(5),math.rad(0),math.rad(80)),.05)
1582
             RW.C0 = clerp(RW.C0, CFrame.new(1.45, 0.5, 0) * angles(math.rad(50), math.rad(0), math.rad(20)), 0.05)
1583
             LW.C0 = clerp(LW.C0, CFrame.new(-1.45, 0.5, 0) * angles(math.rad(50), math.rad(0), math.rad(-90)), 0.05)
1584
	end
1585
local rng = Instance.new("Part", char)
1586
        rng.Anchored = true
1587
        rng.BrickColor = BrickColor.new("White")
1588
        rng.CanCollide = false
1589
        rng.FormFactor = 3
1590
        rng.Name = "Ring"
1591
        rng.Size = Vector3.new(1, 1, 1)
1592
        rng.Transparency = 0
1593
        rng.TopSurface = 0
1594
        rng.BottomSurface = 0
1595
        rng.Position = root.Position
1596
        rng.CFrame = rng.CFrame * CFrame.Angles(math.rad(90), math.rad(0), math.rad(0))
1597
        local rngm = Instance.new("SpecialMesh", rng)
1598
        rngm.MeshId = "http://www.roblox.com/asset/?id=3270017"
1599
local rng2 = rng:Clone()
1600
rng2.Parent = char
1601
local rng2m = rng2.Mesh
1602
local rng3 = rng:Clone()
1603
rng3.Parent = char
1604
local rng3m = rng3.Mesh
1605
local rng4 = rng:Clone()
1606
rng4.Parent = char
1607
local rng4m = rng4.Mesh
1608
local rng5 = rng:Clone()
1609
rng5.Parent = char
1610
local rng5m = rng5.Mesh
1611
local hit = rng5.Touched:connect(function(hit) 
1612
	Damagefunc(hit,10,25,math.random(10,20),"Normal",root,.2,1)
1613
end)
1614
MagicBlock(bc("White"),root.CFrame,15,15,15,5,5,5,0.015)
1615
    CFuncs["Sound"].Create("rbxassetid://187137517", rng, 10, 1)
1616
	CFuncs["Sound"].Create("rbxassetid://597291504", rng, 5, 0.85)
1617
	CFuncs["Sound"].Create("rbxassetid://144699494", rng, 10, 1)
1618
	wait()
1619
	local scaler = 10
1620
	local scaler2 = 10
1621
	for i = 0,10,0.1 do
1622
		swait()
1623
		rng.Transparency = rng.Transparency + 0.01
1624
		rng2.Transparency = rng2.Transparency + 0.01
1625
		rng3.Transparency = rng3.Transparency + 0.01
1626
		rng4.Transparency = rng4.Transparency + 0.01
1627
		rng5.Transparency = rng5.Transparency + 0.01
1628
		scaler = scaler - 0.125
1629
		scaler2 = scaler2 - 0.1
1630
		rng2m.Scale = rng2m.Scale + Vector3.new(scaler2/1.75, scaler2/1.75, 4)
1631
		rng3m.Scale = rng3m.Scale + Vector3.new(scaler2/1.5, scaler2/1.5, 3)
1632
		rng4m.Scale = rng4m.Scale + Vector3.new(scaler2/1.25, scaler2/1.25, 2)
1633
		rng5m.Scale = rng5m.Scale + Vector3.new(scaler2, scaler2, 1)
1634
		rng5.Size = rng5m.Scale
1635
		rng5.CFrame = rng.CFrame
1636
		 rngm.Scale = rngm.Scale + Vector3.new(scaler2/2, scaler2/2, 5)
1637
		RH.C0=clerp(RH.C0,cf(1,-0.25,-0.5)*angles(math.rad(0),math.rad(90),math.rad(0))*angles(math.rad(-30),math.rad(0),math.rad(0)),.5)
1638
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)),.5)
1639
            RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,-1)* angles(math.rad(30),math.rad(0),math.rad(80)),0.5)
1640
            Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(5),math.rad(0),math.rad(-80)),.5)
1641
             RW.C0 = clerp(RW.C0, CFrame.new(1.45, 0.5, 0) * angles(math.rad(0), math.rad(0), math.rad(40)), 0.5)
1642
             LW.C0 = clerp(LW.C0, CFrame.new(-1.45, 0.5, 0) * angles(math.rad(50), math.rad(0), math.rad(-50)), 0.5)
1643
	end
1644
	hit:disconnect()
1645
	game:GetService("Debris"):AddItem(rng, 1)
1646
	game:GetService("Debris"):AddItem(rng2, 1)
1647
	game:GetService("Debris"):AddItem(rng3, 1)
1648
	game:GetService("Debris"):AddItem(rng4, 1)
1649
	game:GetService("Debris"):AddItem(rng5, 1)
1650
	hum.WalkSpeed = 16
1651
	attack = false
1652
	jumped = false
1653
end
1654
1655
function shooty()
1656
	attack = true
1657
	MagicBlock(bc("White"),sorb.CFrame,15,15,15,-0.25,-0.25,-0.25,0.015)
1658
	CFuncs["Sound"].Create("rbxassetid://169445572", root, 1, 1)
1659
	CFuncs["Sound"].Create("rbxassetid://169380495", root, 1, 0.7)
1660
	for i = 0,15,0.1 do
1661
		swait()
1662
		MagicBlock(bc("White"),sorb.CFrame,3,3,3,0.05,0.05,0.05,0.05)
1663
            RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(0),math.rad(0),math.rad(-80)),0.05)
1664
            Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(5),math.rad(0),math.rad(80)),.05)
1665
             RW.C0 = clerp(RW.C0, CFrame.new(1.45, 0.5, 0) * angles(math.rad(50), math.rad(0), math.rad(20)), 0.05)
1666
             LW.C0 = clerp(LW.C0, CFrame.new(-1.45, 0.5, 0) * angles(math.rad(50), math.rad(0), math.rad(-90)), 0.05)
1667
	end
1668
	CFuncs["Sound"].Create("rbxassetid://187137517", root, 1, 1)
1669
							local a = Instance.new("Part",Character)
1670
	a.Name = "Direction"	
1671
	a.Anchored = true
1672
	a.BrickColor = bc("Bright red")
1673
a.Material = "Neon"
1674
a.Transparency = 1
1675
	a.CanCollide = false
1676
	local ray = Ray.new(
1677
	    root.CFrame.p,                           -- origin
1678
	    (mouse.Hit.p - root.CFrame.p).unit * 500 -- direction
1679
	) 
1680
	local ignore = Character
1681
	local hit, position, normal = workspace:FindPartOnRay(ray, ignore)
1682
	a.BottomSurface = 10
1683
	a.TopSurface = 10
1684
	local distance = (root.CFrame.p - position).magnitude
1685
	a.Size = Vector3.new(0.1, 0.1, 0.1)
1686
	a.CFrame = CFrame.new(root.CFrame.p, position) * CFrame.new(0, 0, 0)
1687
				 local lb = Instance.new("Part")
1688
  lb.Parent = char
1689
    lb.BrickColor = bc("White")
1690
     lb.CanCollide = false
1691
lb.Material = "Neon"
1692
     lb.Anchored = true
1693
lb.TopSurface = 0
1694
        lb.BottomSurface = 0
1695
     lb.Transparency = 0
1696
     lb.Size = vt(0.5,0.5,0.5)
1697
     lb.CFrame = sorb.CFrame
1698
lb.Anchored = false
1699
local thingery = Instance.new("SpecialMesh",lb)
1700
     thingery.MeshType = "Sphere"
1701
thingery.Scale = vt(25,25,25)
1702
game:GetService("Debris"):AddItem(lb, 10)
1703
  local bv = Instance.new("BodyVelocity")
1704
  bv.maxForce = Vector3.new(1e9, 1e9, 1e9)
1705
  bv.velocity = a.CFrame.lookVector*150
1706
  bv.Parent = lb
1707
game:GetService("Debris"):AddItem(a, 0.1)
1708
wait(0.05)
1709
local hitted = false
1710
lb.Touched:connect(function(hit) 
1711
	if hitted == false then
1712
		hitted = true
1713
		lb.Anchored = true
1714
		lb.Transparency = 1
1715
		local rng = Instance.new("Part", char)
1716
        rng.Anchored = true
1717
        rng.BrickColor = BrickColor.new("White")
1718
        rng.CanCollide = false
1719
        rng.FormFactor = 3
1720
        rng.Name = "Ring"
1721
        rng.Size = Vector3.new(1, 1, 1)
1722
        rng.Transparency = 0
1723
        rng.TopSurface = 0
1724
        rng.BottomSurface = 0
1725
        rng.CFrame = lb.CFrame
1726
        rng.CFrame = rng.CFrame * CFrame.Angles(math.rad(math.random(-360,360)), math.rad(math.random(-360,360)), math.rad(math.random(-360,360)))
1727
        local rngm = Instance.new("SpecialMesh", rng)
1728
        rngm.MeshId = "http://www.roblox.com/asset/?id=3270017"
1729
local rng2 = rng:Clone()
1730
rng2.Parent = char
1731
local rng2m = rng2.Mesh
1732
local rng3 = rng:Clone()
1733
rng3.Parent = char
1734
local rng3m = rng3.Mesh
1735
local rng4 = rng:Clone()
1736
rng4.Parent = char
1737
local rng4m = rng4.Mesh
1738
local rng5 = rng:Clone()
1739
rng5.Parent = char
1740
rng5.CFrame = rng5.CFrame * CFrame.Angles(math.rad(math.random(-360,360)), math.rad(math.random(-360,360)), math.rad(math.random(-360,360)))
1741
local rng5m = rng5.Mesh
1742
rng2.CFrame = rng2.CFrame * CFrame.Angles(math.rad(math.random(-360,360)), math.rad(math.random(-360,360)), math.rad(math.random(-360,360)))
1743
rng3.CFrame = rng3.CFrame * CFrame.Angles(math.rad(math.random(-360,360)), math.rad(math.random(-360,360)), math.rad(math.random(-360,360)))
1744
rng4.CFrame = rng4.CFrame * CFrame.Angles(math.rad(math.random(-360,360)), math.rad(math.random(-360,360)), math.rad(math.random(-360,360)))
1745
MagicBlock(bc("White"),lb.CFrame,15,15,15,5,5,5,0.015)
1746
local rng6 = rng:Clone()
1747
rng6.Material = "Neon"
1748
rng6.Parent = char
1749
local rng6m = rng6.Mesh
1750
rng6m.Scale = vt(1,1,1)
1751
rng6m.MeshType = "Sphere"
1752
local hita = rng6.Touched:connect(function(hit) 
1753
	Damagefunc(hit,10,25,math.random(10,20),"Normal",root,.2,1)
1754
end)
1755
    CFuncs["Sound"].Create("rbxassetid://187137517", rng, 5, 1)
1756
	CFuncs["Sound"].Create("rbxassetid://597291504", rng, 5, 0.75)
1757
	CFuncs["Sound"].Create("rbxassetid://144699494", rng, 5, 1)
1758
	local scaler = 5
1759
	local scaler2 = 5
1760
	for i = 0,20,0.1 do
1761
		swait()
1762
		rng.Transparency = rng.Transparency + 0.005
1763
		rng2.Transparency = rng2.Transparency + 0.005
1764
		rng3.Transparency = rng3.Transparency + 0.005
1765
		rng4.Transparency = rng4.Transparency + 0.005
1766
		rng5.Transparency = rng5.Transparency + 0.005
1767
		rng6.Transparency = rng6.Transparency + 0.005
1768
		scaler = scaler - 0.005/2
1769
		scaler2 = scaler2 - 0.05/2
1770
		rng6.Size = rng6.Size + Vector3.new(scaler2/3, scaler2/3, scaler2/3)
1771
		rng6.CFrame = rng.CFrame
1772
		rng2m.Scale = rng2m.Scale + Vector3.new(scaler2/1.5, scaler2/1.5, 0)
1773
		rng3m.Scale = rng3m.Scale + Vector3.new(scaler2/1.5, scaler2/1.5, 0)
1774
		rng4m.Scale = rng4m.Scale + Vector3.new(scaler2/2, scaler2/2, 0)
1775
		rng5m.Scale = rng5m.Scale + Vector3.new(scaler2, scaler2, 0)
1776
		 rngm.Scale = rngm.Scale + Vector3.new(scaler2, scaler2, 0)
1777
	end
1778
	hita:disconnect()
1779
	game:GetService("Debris"):AddItem(rng, 1)
1780
	game:GetService("Debris"):AddItem(rng2, 1)
1781
	game:GetService("Debris"):AddItem(rng3, 1)
1782
	game:GetService("Debris"):AddItem(rng4, 1)
1783
	game:GetService("Debris"):AddItem(rng5, 1)
1784
	game:GetService("Debris"):AddItem(rng6, 1)
1785
	end
1786
end)
1787
	for i = 0,2,0.1 do
1788
		swait()
1789
		MagicBlock(bc("White"),sorb.CFrame,3,3,3,0.05,0.05,0.05,0.05)
1790
            RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(20),math.rad(0),math.rad(80)),0.5)
1791
            Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(5),math.rad(0),math.rad(-80)),.5)
1792
             RW.C0 = clerp(RW.C0, CFrame.new(1.45, 0.5, 0) * angles(math.rad(50), math.rad(0), math.rad(20)), 0.5)
1793
             LW.C0 = clerp(LW.C0, CFrame.new(-1.45, 0.5, 0) * angles(math.rad(50), math.rad(0), math.rad(-90)), 0.5)
1794
	end
1795
	attack = false
1796
end
1797
1798
function superpunch()
1799
	attack = true
1800
	jumped = true
1801
	hum.WalkSpeed = 0
1802
	MagicBlock(bc("White"),sorb.CFrame,15,15,15,-0.25,-0.25,-0.25,0.015)
1803
	CFuncs["Sound"].Create("rbxassetid://169445572", root, 1, 1)
1804
	CFuncs["Sound"].Create("rbxassetid://169380495", root, 1, 0.7)
1805
	for i = 0,15,0.1 do
1806
		swait()
1807
		MagicBlock(bc("White"),sorb.CFrame,3,3,3,0.05,0.05,0.05,0.05)
1808
		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)),.05)
1809
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)),.05)
1810
            RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(0),math.rad(0),math.rad(-80)),0.05)
1811
            Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(5),math.rad(0),math.rad(80)),.05)
1812
             RW.C0 = clerp(RW.C0, CFrame.new(1.45, 0.5, 0) * angles(math.rad(50), math.rad(0), math.rad(-20)), 0.05)
1813
             LW.C0 = clerp(LW.C0, CFrame.new(-1.45, 0.5, 0) * angles(math.rad(50), math.rad(0), math.rad(-90)), 0.05)
1814
	end
1815
local rng = Instance.new("Part", char)
1816
        rng.Anchored = true
1817
        rng.BrickColor = BrickColor.new("White")
1818
        rng.CanCollide = false
1819
        rng.FormFactor = 3
1820
        rng.Name = "Ring"
1821
        rng.Size = Vector3.new(1, 1, 1)
1822
        rng.Transparency = 0
1823
        rng.TopSurface = 0
1824
        rng.BottomSurface = 0
1825
        rng.CFrame = root.CFrame 
1826
        local rngm = Instance.new("SpecialMesh", rng)
1827
        rngm.MeshId = "http://www.roblox.com/asset/?id=3270017"
1828
local rng2 = rng:Clone()
1829
rng2.Parent = char
1830
local rng2m = rng2.Mesh
1831
local rng3 = rng:Clone()
1832
rng3.Parent = char
1833
local rng3m = rng3.Mesh
1834
local rng4 = rng:Clone()
1835
rng4.Parent = char
1836
local rng4m = rng4.Mesh
1837
local rng5 = rng:Clone()
1838
rng5.Parent = char
1839
local rng5m = rng5.Mesh
1840
local rng6 = rng:Clone()
1841
rng6.Material = "Neon"
1842
rng6.Parent = char
1843
local rng6m = rng6.Mesh
1844
rng6m.Scale = vt(1,1,1)
1845
rng6m.MeshType = "Sphere"
1846
local hita = rng6.Touched:connect(function(hit) 
1847
	Damagefunc(hit,10,25,math.random(10,20),"Normal",root,.2,1)
1848
end)
1849
rng2.CFrame = root.CFrame 
1850
rng3.CFrame = root.CFrame 
1851
rng4.CFrame = root.CFrame 
1852
rng5.CFrame = root.CFrame 
1853
rng6.CFrame = root.CFrame 
1854
    CFuncs["Sound"].Create("rbxassetid://260430117", rng, 5, 1)
1855
	CFuncs["Sound"].Create("rbxassetid://187137517", rng, 5, 0.85)
1856
	CFuncs["Sound"].Create("rbxassetid://169628396", rng, 5, 1)
1857
	CFuncs["Sound"].Create("rbxassetid://137994058", rng, 5, 1)
1858
	CFuncs["Sound"].Create("rbxassetid://138186576", rng, 5, 1)
1859
	wait()
1860
	local scaler = 10/5
1861
	local scaler2 = 10/5 
1862
	MagicBlock(bc("White"),root.CFrame,15,15,15,5,5,5,0.015)
1863
	for i = 0,10,0.1 do
1864
		swait()
1865
		MagicBlock(bc("White"),rng6.CFrame,5,5,5,5,5,5,0.1)
1866
		rng.CFrame = rng.CFrame + rng.CFrame.lookVector*scaler2
1867
		rng2.CFrame = rng2.CFrame + rng2.CFrame.lookVector*scaler2/1.25
1868
		rng3.CFrame = rng3.CFrame + rng3.CFrame.lookVector*scaler2/1.5
1869
		rng4.CFrame = rng4.CFrame + rng4.CFrame.lookVector*scaler2/1.75
1870
		rng5.CFrame = rng5.CFrame + rng5.CFrame.lookVector*scaler2/2
1871
		rng6.Size = rng6.Size + Vector3.new(scaler2/3, scaler2/3, scaler2/3)
1872
		rng6.CFrame = rng.CFrame
1873
		rng.Transparency = rng.Transparency + 0.01
1874
		rng2.Transparency = rng2.Transparency + 0.01
1875
		rng3.Transparency = rng3.Transparency + 0.01
1876
		rng4.Transparency = rng4.Transparency + 0.01
1877
		rng5.Transparency = rng5.Transparency + 0.01
1878
		rng6.Transparency = rng6.Transparency + 0.01
1879
		scaler = scaler - 0.125/5
1880
		scaler2 = scaler2 - 0.1/5
1881
		rng2m.Scale = rng2m.Scale + Vector3.new(scaler2/2.5, scaler2/2.5, 1.5)
1882
		rng3m.Scale = rng3m.Scale + Vector3.new(scaler2/2, scaler2/2, 1)
1883
		rng4m.Scale = rng4m.Scale + Vector3.new(scaler2/1.5, scaler2/1.5, 0.5)
1884
		rng5m.Scale = rng5m.Scale + Vector3.new(scaler2, scaler2, 0)
1885
		 rngm.Scale = rngm.Scale + Vector3.new(scaler2/3, scaler2/3, 2)
1886
            RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(20),math.rad(0),math.rad(80)),0.5)
1887
            Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(5),math.rad(0),math.rad(-80)),.5)
1888
             RW.C0 = clerp(RW.C0, CFrame.new(1.45, 0.5, 0) * angles(math.rad(50), math.rad(0), math.rad(20)), 0.5)
1889
             LW.C0 = clerp(LW.C0, CFrame.new(-1.45, 0.5, 0) * angles(math.rad(50), math.rad(0), math.rad(-90)), 0.5)
1890
	end
1891
	hita:disconnect()
1892
	game:GetService("Debris"):AddItem(rng, 1)
1893
	game:GetService("Debris"):AddItem(rng2, 1)
1894
	game:GetService("Debris"):AddItem(rng3, 1)
1895
	game:GetService("Debris"):AddItem(rng4, 1)
1896
	game:GetService("Debris"):AddItem(rng5, 1)
1897
	hum.WalkSpeed = 16
1898
	attack = false
1899
	jumped = false
1900
end
1901
1902
1903
mouse.KeyDown:connect(function(k)
1904
        if k == "z" and attack == false and RootPart.Velocity.y == 0  and hitfloor~=nil then
1905
                jump()
1906
        end
1907
        if k == "x" and attack == false then
1908
                dash()
1909
        end
1910
        if k == "c" and attack == false and RootPart.Velocity.y == 0  and hitfloor~=nil then
1911
                boom()
1912
        end
1913
        if k == "v" and attack == false then
1914
                shooty()
1915
        end
1916
        if k == "b" and attack == false then
1917
                superpunch()
1918
        end
1919
end)
1920
Humanoid.Animator.Parent = nil
1921
idleanim=.4
1922
while true do
1923
swait()
1924
  sine = sine + change
1925
local torvel=(RootPart.Velocity*Vector3.new(1,0,1)).magnitude 
1926
local velderp=RootPart.Velocity.y
1927
hitfloor,posfloor=rayCast(RootPart.Position,(CFrame.new(RootPart.Position,RootPart.Position - Vector3.new(0,1,0))).lookVector,4,Character)
1928
if equipped==true or equipped==false then
1929
if attack==false then
1930
idle=idle+1
1931
else
1932
idle=0
1933
end
1934
if idle>=500 then
1935
if attack==false then
1936
--Sheath()
1937
end
1938
end
1939
if RootPart.Velocity.y > 1 and hitfloor==nil then 
1940
Anim="Jump"
1941
if attack==false then
1942
Neck.C0=clerp(Neck.C0,necko*euler(-0.2,0,0),.3)
1943
Neck.C1=clerp(Neck.C1,necko2*euler(0,0,0),.3)
1944
RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,0.25)*angles(math.rad(-5),math.rad(0),math.rad(0)),.3)
1945
RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(-.5,0,0.5)*angles(math.rad(-25),math.rad(0),math.rad(0)),.3)
1946
RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
1947
LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(-.5,0,-0.5),.3)
1948
LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
1949
RH.C0=clerp(RH.C0,cf(1,-1,-.3)*euler(-0.5,1.57,0)*euler(-.2,0,0),.2)
1950
LH.C0=clerp(LH.C0,cf(-1,-1,-.3)*euler(-0.5,-1.57,0)*euler(-.2,0,0),.2)
1951
end
1952
elseif RootPart.Velocity.y < -1 and hitfloor==nil then 
1953
Anim="Fall"
1954
if attack==false then
1955
Neck.C0=clerp(Neck.C0,necko*euler(0.4,0,0),.3)
1956
Neck.C1=clerp(Neck.C1,necko2*euler(0,0,0),.3)
1957
RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,0.25)*angles(math.rad(5),math.rad(0),math.rad(0)),.3)
1958
LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(0.3,0,-0.2),.3)
1959
LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
1960
RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(0.3,0,0.2)*angles(math.rad(-25),math.rad(0),math.rad(0)),.3)
1961
RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
1962
RH.C0=clerp(RH.C0,cf(1,-1,0)*euler(0.4,1.57,0),.2)
1963
LH.C0=clerp(LH.C0,cf(-1,-1,0)*euler(-0.2,-1.57,0),.2)
1964
end
1965
elseif torvel<1 and hitfloor~=nil then
1966
Anim="Idle"
1967
if jumped == false then
1968
RH.C0=clerp(RH.C0,cf(1,-1 - 0.15 * math.cos(sine / 25),0)*angles(math.rad(0),math.rad(90),math.rad(0))*angles(math.rad(-2.5 - 2.5 * math.cos(sine / 32)),math.rad(0),math.rad(0 + 7.5 * math.cos(sine / 32))),.3)
1969
LH.C0=clerp(LH.C0,cf(-1,-1 - 0.15 * math.cos(sine / 25),0)*angles(math.rad(0),math.rad(-90),math.rad(0))*angles(math.rad(-2.5 - 2.5 * math.cos(sine / 32)),math.rad(0),math.rad(0 + 7.5 * math.cos(sine / 32))),.3)
1970
end
1971
if attack==false then
1972
RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,0 + 0.15 * math.cos(sine / 25))*angles(math.rad(0),math.rad(0),math.rad(0)),.3)
1973
Torso.Neck.C0=clerp(Torso.Neck.C0,necko*angles(math.rad(0 - 5 * math.cos(sine / 25)),math.rad(0),math.rad(0)),.3)
1974
RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*angles(math.rad(0),math.rad(0),math.rad(5 + 2.5 * math.cos(sine / 25))),.3)
1975
LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*angles(math.rad(0),math.rad(0),math.rad(-5 - 2.5 * math.cos(sine / 25))),.3)
1976
end
1977
elseif torvel>2 and torvel<22 and hitfloor~=nil then
1978
Anim="Walk"
1979
if jumped == false then
1980
RH.C0=clerp(RH.C0,cf(1,-1 - 0.05 * math.cos(sine / 4),-0.25 - 0.15 * math.cos(sine / 4))*angles(math.rad(0),math.rad(90),math.rad(0))*angles(math.rad(0),math.rad(0),math.rad(0 + 25 * math.cos(sine / 8))),.3)
1981
LH.C0=clerp(LH.C0,cf(-1,-1 - 0.05 * math.cos(sine / 4),-0.25 - 0.15 * math.cos(sine / 4))*angles(math.rad(0),math.rad(-90),math.rad(0))*angles(math.rad(0),math.rad(0),math.rad(0 + 25 * math.cos(sine / 8))),.3)
1982
end
1983
if attack==false then
1984
RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,0 - 0.05 * math.cos(sine / 4))*angles(math.rad(15),math.rad(0),math.rad(0)),.3)
1985
Torso.Neck.C0=clerp(Torso.Neck.C0,necko*angles(math.rad(-5),math.rad(0),math.rad(0)),.3)
1986
RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*angles(math.rad(0 - 25 * math.cos(sine / 8)),math.rad(0),math.rad(10 + 1.25 * math.cos(sine / 16))),.3)
1987
LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*angles(math.rad(0 + 25 * math.cos(sine / 8)),math.rad(0),math.rad(-10 - 1.25 * math.cos(sine / 16))),.3)
1988
end
1989
elseif torvel>=22 and hitfloor~=nil then
1990
Anim="Run"
1991
if jumped == false then
1992
RH.C0=clerp(RH.C0,cf(1,-1 - 0.05 * math.cos(sine / 32),0)*angles(math.rad(0),math.rad(90),math.rad(0))*angles(math.rad(0),math.rad(0),math.rad(0 + 75 * math.cos(sine / 3))),.3)
1993
LH.C0=clerp(LH.C0,cf(-1,-1 - 0.05 * math.cos(sine / 32),0)*angles(math.rad(0),math.rad(-90),math.rad(0))*angles(math.rad(0),math.rad(0),math.rad(0 + 75 * math.cos(sine / 3))),.3)
1994
end
1995
if attack==false then
1996
	          RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,-0.25 + 0.05 * math.cos(sine / 32))* angles(math.rad(35),math.rad(0),math.rad(0)),.3)
1997
Torso.Neck.C0=clerp(Torso.Neck.C0,necko*angles(math.rad(-5),math.rad(0),math.rad(0)),.3)
1998
RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*angles(math.rad(-50),math.rad(-60),math.rad(25)),.3)
1999
LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*angles(math.rad(-50),math.rad(0),math.rad(-25)),.3)
2000
end
2001
end
2002
end
2003
end