View difference between Paste ID: kmcXDtbS and zWy20LuD
SHOW: | | - or go back to the newest paste.
1-
Player=game:GetService("Players").LocalPlayer
1+
if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
2
local Player,Mouse,mouse,UserInputService,ContextActionService = owner
3
do
4
    print("FE Compatibility code by Mokiros | Translated to FE by iPxter")
5
    print("Original by Shackluster, Edit by prostoRobot")
6
    script.Parent = Player.Character
7
 
8
    --RemoteEvent for communicating
9
    local Event = Instance.new("RemoteEvent")
10
    Event.Name = "UserInput_Event"
11
 
12
    --Fake event to make stuff like Mouse.KeyDown work
13
    local function fakeEvent()
14
        local t = {_fakeEvent=true,Connect=function(self,f)self.Function=f end}
15
        t.connect = t.Connect
16
        return t
17
    end
18
 
19
    --Creating fake input objects with fake variables
20
    local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
21
    local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
22
    local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
23
        CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
24
    end}
25
    --Merged 2 functions into one by checking amount of arguments
26
    CAS.UnbindAction = CAS.BindAction
27
 
28
    --This function will trigger the events that have been :Connect()'ed
29
    local function te(self,ev,...)
30
        local t = m[ev]
31
        if t and t._fakeEvent and t.Function then
32
            t.Function(...)
33
        end
34
    end
35
    m.TrigEvent = te
36
    UIS.TrigEvent = te
37
 
38
    Event.OnServerEvent:Connect(function(plr,io)
39
        if plr~=Player then return end
40
        if io.isMouse then
41
            m.Target = io.Target
42
            m.Hit = io.Hit
43
        else
44
            local b = io.UserInputState == Enum.UserInputState.Begin
45
            if io.UserInputType == Enum.UserInputType.MouseButton1 then
46
                return m:TrigEvent(b and "Button1Down" or "Button1Up")
47
            end
48
            for _,t in pairs(CAS.Actions) do
49
                for _,k in pairs(t.Keys) do
50
                    if k==io.KeyCode then
51
                        t.Function(t.Name,io.UserInputState,io)
52
                    end
53-
mouse=Player:GetMouse()
53+
54
            end
55
            m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
56
            UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
57
        end
58
    end)
59
    Event.Parent = NLS([==[
60
    local Player = game:GetService("Players").LocalPlayer
61
    local Event = script:WaitForChild("UserInput_Event")
62
 
63
    local UIS = game:GetService("UserInputService")
64
    local input = function(io,a)
65
        if a then return end
66
        --Since InputObject is a client-side instance, we create and pass table instead
67
        Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState})
68
    end
69
    UIS.InputBegan:Connect(input)
70
    UIS.InputEnded:Connect(input)
71
 
72
    local Mouse = Player:GetMouse()
73
    local h,t
74
    --Give the server mouse data 30 times every second, but only if the values changed
75
    --If player is not moving their mouse, client won't fire events
76
    while wait(1/30) do
77
        if h~=Mouse.Hit or t~=Mouse.Target then
78
            h,t=Mouse.Hit,Mouse.Target
79
            Event:FireServer({isMouse=true,Target=t,Hit=h})
80
        end
81
    end]==],Player.Character)
82
    Mouse,mouse,UserInputService,ContextActionService = m,m,UIS,CAS
83
end
84
85
-- start
86
Player=owner
87-
        Player=game:GetService('Players').LocalPlayer
87+
88
PlayerGui=Player.PlayerGui
89-
        Mouse=Player:GetMouse()
89+
90
Torso=Character.Torso
91
Head=Character.Head
92
Humanoid=Character.Humanoid
93
m=Instance.new('Model',Character)
94
LeftArm=Character["Left Arm"]
95
LeftLeg=Character["Left Leg"]
96
RightArm=Character["Right Arm"]
97
RightLeg=Character["Right Leg"]
98
LS=Torso["Left Shoulder"]
99
LH=Torso["Left Hip"]
100
RS=Torso["Right Shoulder"]
101
RH=Torso["Right Hip"]
102
Face = Head.face
103
Neck=Torso.Neck
104
it=Instance.new
105
attacktype=1
106
vt=Vector3.new
107
cf=CFrame.new
108
euler=CFrame.fromEulerAnglesXYZ
109
angles=CFrame.Angles
110
cloaked=false
111
necko=cf(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
112
necko2=cf(0, -0.5, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
113
LHC0=cf(-1,-1,0,-0,-0,-1,0,1,0,1,0,0)
114
LHC1=cf(-0.5,1,0,-0,-0,-1,0,1,0,1,0,0)
115
RHC0=cf(1,-1,0,0,0,1,0,1,0,-1,-0,-0)
116
RHC1=cf(0.5,1,0,0,0,1,0,1,0,-1,-0,-0)
117
RootPart=Character.HumanoidRootPart
118
RootJoint=RootPart.RootJoint
119
RootCF=euler(-1.57,0,3.14)
120
attack = false
121
attackdebounce = false
122
deb=false
123
equipped=true
124
hand=false
125
MMouse=nil
126
combo=0
127
mana=0
128
trispeed=.2
129
attackmode='none'
130
local idle=0
131
local Anim="Idle"
132
local Effects={}
133
local gun=false
134
local shoot=false
135
player=nil
136
mana=0
137
 
138
--save shoulders
139
RSH, LSH=nil, nil
140
--welds
141
RW, LW=Instance.new("Weld"), Instance.new("Weld")
142
RW.Name="Right Shoulder" LW.Name="Left Shoulder"
143
LH=Torso["Left Hip"]
144
RH=Torso["Right Hip"]
145
TorsoColor=Torso.BrickColor
146
function NoOutline(Part)
147
Part.TopSurface,Part.BottomSurface,Part.LeftSurface,Part.RightSurface,Part.FrontSurface,Part.BackSurface = 10,10,10,10,10,10
148
end
149
player=Player
150
ch=Character
151
RSH=ch.Torso["Right Shoulder"]
152
LSH=ch.Torso["Left Shoulder"]
153
-- 
154
RSH.Parent=nil
155
LSH.Parent=nil
156
-- 
157
RW.Name="Right Shoulder"
158
RW.Part0=ch.Torso
159
RW.C0=cf(1.5, 0.5, 0) --* CFrame.fromEulerAnglesXYZ(1.3, 0, -0.5)
160
RW.C1=cf(0, 0.5, 0)
161
RW.Part1=ch["Right Arm"]
162
RW.Parent=ch.Torso
163
-- 
164
LW.Name="Left Shoulder"
165
LW.Part0=ch.Torso
166
LW.C0=cf(-1.5, 0.5, 0) --* CFrame.fromEulerAnglesXYZ(1.7, 0, 0.8)
167
LW.C1=cf(0, 0.5, 0)
168
LW.Part1=ch["Left Arm"]
169
LW.Parent=ch.Torso
170
 
171
        Player=owner
172
        Character=Player.Character
173
        m=Instance.new('Model',Character)
174
 
175
 
176
        local function weldBetween(a, b)
177
            local weldd = Instance.new("ManualWeld")
178
            weldd.Part0 = a
179
            weldd.Part1 = b
180
            weldd.C0 = CFrame.new()
181
            weldd.C1 = b.CFrame:inverse() * a.CFrame
182
            weldd.Parent = a
183
            return weldd
184
        end
185
       
186
        function swait(num)
187
    if num==0 or num==nil then
188
    game:service'RunService'.Stepped:wait(0)
189
    else
190
    for i=0,num do
191
    game:service'RunService'.Stepped:wait(0)
192
    end
193
    end
194
            end
195
       
196
        function nooutline(part)
197
                part.TopSurface,part.BottomSurface,part.LeftSurface,part.RightSurface,part.FrontSurface,part.BackSurface = 10,10,10,10,10,10
198
        end
199
       
200
        function part(formfactor,parent,material,reflectance,transparency,brickcolor,name,size)
201
                local fp=it("Part")
202
                fp.formFactor=formfactor
203
                fp.Parent=parent
204
                fp.Reflectance=reflectance
205
                fp.Transparency=transparency
206
                fp.CanCollide=false
207
                fp.Locked=true
208
                fp.BrickColor=BrickColor.new(tostring(brickcolor))
209
                fp.Name=name
210
                fp.Size=size
211
                fp.Position=Character.Torso.Position
212
                nooutline(fp)
213
                fp.Material=material
214
                fp:BreakJoints()
215
                return fp
216
        end
217
       
218
        function mesh(Mesh,part,meshtype,meshid,offset,scale)
219
                local mesh=it(Mesh)
220
                mesh.Parent=part
221
                if Mesh=="SpecialMesh" then
222
                        mesh.MeshType=meshtype
223
                        mesh.MeshId=meshid
224
                end
225
                mesh.Offset=offset
226
                mesh.Scale=scale
227
                return mesh
228
        end
229
       
230
        function weld(parent,part0,part1,c0,c1)
231
                local weld=it("Weld")
232
                weld.Parent=parent
233
                weld.Part0=part0
234
                weld.Part1=part1
235
                weld.C0=c0
236
                weld.C1=c1
237
                return weld
238
        end
239
       
240
       
241
local function CFrameFromTopBack(at, top, back)
242
local right = top:Cross(back)
243
return CFrame.new(at.x, at.y, at.z,
244
right.x, top.x, back.x,
245
right.y, top.y, back.y,
246
right.z, top.z, back.z)
247
end
248
 
249
function Triangle(a, b, c)
250
local edg1 = (c-a):Dot((b-a).unit)
251
local edg2 = (a-b):Dot((c-b).unit)
252
local edg3 = (b-c):Dot((a-c).unit)
253
if edg1 <= (b-a).magnitude and edg1 >= 0 then
254
a, b, c = a, b, c
255
elseif edg2 <= (c-b).magnitude and edg2 >= 0 then
256
a, b, c = b, c, a
257
elseif edg3 <= (a-c).magnitude and edg3 >= 0 then
258
a, b, c = c, a, b
259
else
260
assert(false, "unreachable")
261
end
262
 
263
local len1 = (c-a):Dot((b-a).unit)
264
local len2 = (b-a).magnitude - len1
265
local width = (a + (b-a).unit*len1 - c).magnitude
266
 
267
local maincf = CFrameFromTopBack(a, (b-a):Cross(c-b).unit, -(b-a).unit)
268
 
269
local list = {}
270
 
271
local TrailColor = ("Dark grey")
272
 
273
if len1 > 0.01 then
274
local w1 = Instance.new('WedgePart', m)
275
game:GetService("Debris"):AddItem(w1,5)
276
w1.Material = "SmoothPlastic"
277
w1.FormFactor = 'Custom'
278
w1.BrickColor = BrickColor.new(TrailColor)
279
w1.Transparency = 0
280
w1.Reflectance = 0
281
w1.Material = "SmoothPlastic"
282
w1.CanCollide = false
283
NoOutline(w1)
284
local sz = Vector3.new(0.2, width, len1)
285
w1.Size = sz
286
local sp = Instance.new("SpecialMesh",w1)
287
sp.MeshType = "Wedge"
288
sp.Scale = Vector3.new(0,1,1) * sz/w1.Size
289
w1:BreakJoints()
290
w1.Anchored = true
291
w1.Parent = workspace
292
w1.Transparency = 0.7
293
table.insert(Effects,{w1,"Disappear",.01})
294
w1.CFrame = maincf*CFrame.Angles(math.pi,0,math.pi/2)*CFrame.new(0,width/2,len1/2)
295
table.insert(list,w1)
296
end
297
 
298
if len2 > 0.01 then
299
local w2 = Instance.new('WedgePart', m)
300
game:GetService("Debris"):AddItem(w2,5)
301
w2.Material = "SmoothPlastic"
302
w2.FormFactor = 'Custom'
303
w2.BrickColor = BrickColor.new(TrailColor)
304
w2.Transparency = 0
305
w2.Reflectance = 0
306
w2.Material = "SmoothPlastic"
307
w2.CanCollide = false
308
NoOutline(w2)
309
local sz = Vector3.new(0.2, width, len2)
310
w2.Size = sz
311
local sp = Instance.new("SpecialMesh",w2)
312
sp.MeshType = "Wedge"
313
sp.Scale = Vector3.new(0,1,1) * sz/w2.Size
314
w2:BreakJoints()
315
w2.Anchored = true
316
w2.Parent = workspace
317
w2.Transparency = 0.7
318
table.insert(Effects,{w2,"Disappear",.01})
319
w2.CFrame = maincf*CFrame.Angles(math.pi,math.pi,-math.pi/2)*CFrame.new(0,width/2,-len1 - len2/2)
320
table.insert(list,w2)
321
end
322
return unpack(list)
323
end
324
       
325
       
326
so = function(id,par,vol,pit)
327
coroutine.resume(coroutine.create(function()
328
local sou = Instance.new("Sound",par or workspace)
329
sou.Volume=vol
330
sou.Pitch=pit or 1
331
sou.SoundId=id
332
swait()
333
sou:play()
334
game:GetService("Debris"):AddItem(sou,6)
335
end))
336
end
337
 
338
function clerp(a,b,t)
339
local qa = {QuaternionFromCFrame(a)}
340
local qb = {QuaternionFromCFrame(b)}
341
local ax, ay, az = a.x, a.y, a.z
342
local bx, by, bz = b.x, b.y, b.z
343
local _t = 1-t
344
return QuaternionToCFrame(_t*ax + t*bx, _t*ay + t*by, _t*az + t*bz,QuaternionSlerp(qa, qb, t))
345
end
346
 
347
function QuaternionFromCFrame(cf)
348
local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
349
local trace = m00 + m11 + m22
350
if trace > 0 then
351
local s = math.sqrt(1 + trace)
352
local recip = 0.5/s
353
return (m21-m12)*recip, (m02-m20)*recip, (m10-m01)*recip, s*0.5
354
else
355
local i = 0
356
if m11 > m00 then
357
i = 1
358
end
359
if m22 > (i == 0 and m00 or m11) then
360
i = 2
361
end
362
if i == 0 then
363
local s = math.sqrt(m00-m11-m22+1)
364-
                        c.Value=game:service("Players").LocalPlayer
364+
365
return 0.5*s, (m10+m01)*recip, (m20+m02)*recip, (m21-m12)*recip
366
elseif i == 1 then
367
local s = math.sqrt(m11-m22-m00+1)
368
local recip = 0.5/s
369
return (m01+m10)*recip, 0.5*s, (m21+m12)*recip, (m02-m20)*recip
370
elseif i == 2 then
371
local s = math.sqrt(m22-m00-m11+1)
372
local recip = 0.5/s return (m02+m20)*recip, (m12+m21)*recip, 0.5*s, (m10-m01)*recip
373
end
374
end
375
end
376
 
377
function QuaternionToCFrame(px, py, pz, x, y, z, w)
378
local xs, ys, zs = x + x, y + y, z + z
379
local wx, wy, wz = w*xs, w*ys, w*zs
380
local xx = x*xs
381
local xy = x*ys
382
local xz = x*zs
383
local yy = y*ys
384
local yz = y*zs
385
local zz = z*zs
386
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))
387
end
388
 
389
function QuaternionSlerp(a, b, t)
390
local cosTheta = a[1]*b[1] + a[2]*b[2] + a[3]*b[3] + a[4]*b[4]
391
local startInterp, finishInterp;
392
if cosTheta >= 0.0001 then
393
if (1 - cosTheta) > 0.0001 then
394
local theta = math.acos(cosTheta)
395
local invSinTheta = 1/math.sin(theta)
396
startInterp = math.sin((1-t)*theta)*invSinTheta
397
finishInterp = math.sin(t*theta)*invSinTheta  
398
else
399
startInterp = 1-t
400
finishInterp = t
401
end
402
else
403
if (1+cosTheta) > 0.0001 then
404
local theta = math.acos(-cosTheta)
405
local invSinTheta = 1/math.sin(theta)
406
startInterp = math.sin((t-1)*theta)*invSinTheta
407
finishInterp = math.sin(t*theta)*invSinTheta
408
else
409
startInterp = t-1
410
finishInterp = t
411
end
412
end
413
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
414
end
415
 
416
--Example: Torso.Weld.C0 = clerp(Torso.Weld.C0, CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), 0.4)
417
 
418
 
419
function rayCast(Pos, Dir, Max, Ignore)  -- Origin Position , Direction, MaxDistance , IgnoreDescendants
420
return game:service("Workspace"):FindPartOnRay(Ray.new(Pos, Dir.unit * (Max or 999.999)), Ignore)
421
end
422
 
423
Damagefunc=function(hit,minim,maxim,knockback,Type,Property,Delay,KnockbackType,decreaseblock)
424
        if hit.Parent==nil then
425
                return
426
        end
427
        h=hit.Parent:FindFirstChild("Humanoid")
428
        for _,v in pairs(hit.Parent:children()) do
429
        if v:IsA("Humanoid") then
430
        h=v
431
        end
432
        end
433
        if hit.Parent.Parent:FindFirstChild("Torso")~=nil then
434
        h=hit.Parent.Parent:FindFirstChild("Humanoid")
435
        end
436
        if hit.Parent.className=="Hat" then
437
        hit=hit.Parent.Parent:findFirstChild("Head")
438
        end
439
        if h~=nil and hit.Parent.Name~=Character.Name and hit.Parent:FindFirstChild("Torso")~=nil then
440
        if hit.Parent:findFirstChild("DebounceHit")~=nil then if hit.Parent.DebounceHit.Value==true then return end end
441
        --[[                if game.Players:GetPlayerFromCharacter(hit.Parent)~=nil then
442
                        return
443
                end]]
444
--                        hs(hit,1.2)
445
                        c=Instance.new("ObjectValue")
446
                        c.Name="creator"
447
                        c.Value=owner
448
                        c.Parent=h
449
                        game:GetService("Debris"):AddItem(c,.5)
450
                Damage=math.random(minim,maxim)
451
--                h:TakeDamage(Damage)
452
                blocked=false
453
                block=hit.Parent:findFirstChild("Block")
454
                if block~=nil then
455
                print(block.className)
456
                if block.className=="NumberValue" then
457
                if block.Value>0 then
458
                blocked=true
459
                if decreaseblock==nil then
460
                block.Value=block.Value-1
461
                end
462
                end
463
                end
464
                if block.className=="IntValue" then
465
                if block.Value>0 then
466
                blocked=true
467
                if decreaseblock~=nil then
468
                block.Value=block.Value-1
469
                end
470
                end
471
                end
472
                end
473
                if blocked==false then
474
--                h:TakeDamage(Damage)
475
                h.Health=h.Health-Damage
476
                showDamage(hit.Parent,Damage,.5,BrickColor.new("New Yeller"))
477
                else
478
                h.Health=h.Health-(Damage/2)
479
                showDamage(hit.Parent,Damage/2,.5,BrickColor.new("Bright blue"))
480
                end
481
                if Type=="Knockdown" then
482
                hum=hit.Parent.Humanoid
483
hum.PlatformStand=true
484
coroutine.resume(coroutine.create(function(HHumanoid)
485
swait(1)
486
HHumanoid.PlatformStand=false
487
end),hum)
488
                local angle=(hit.Position-(Property.Position+Vector3.new(0,0,0))).unit
489
--hit.CFrame=CFrame.new(hit.Position,Vector3.new(angle.x,hit.Position.y,angle.z))*CFrame.fromEulerAnglesXYZ(math.pi/4,0,0)
490
local bodvol=Instance.new("BodyVelocity")
491
bodvol.velocity=angle*knockback
492
bodvol.P=5000
493
bodvol.maxForce=Vector3.new(8e+003, 8e+003, 8e+003)
494
bodvol.Parent=hit
495
rl=Instance.new("BodyAngularVelocity")
496
rl.P=3000
497
rl.maxTorque=Vector3.new(500000,500000,500000)*50000000000000
498
rl.angularvelocity=Vector3.new(math.random(-10,10),math.random(-10,10),math.random(-10,10))
499
rl.Parent=hit
500
game:GetService("Debris"):AddItem(bodvol,.5)
501
game:GetService("Debris"):AddItem(rl,.5)
502
                elseif Type=="Normal" then
503
                vp=Instance.new("BodyVelocity")
504
                vp.P=500
505
                vp.maxForce=Vector3.new(math.huge,0,math.huge)
506
--                vp.velocity=Character.Torso.CFrame.lookVector*Knockback
507
                if KnockbackType==1 then
508
                vp.velocity=Property.CFrame.lookVector*knockback+Property.Velocity/1.05
509
                elseif KnockbackType==2 then
510
                vp.velocity=Property.CFrame.lookVector*knockback
511
                end
512
                if knockback>0 then
513
                        vp.Parent=hit.Parent.Torso
514
                end
515
                game:GetService("Debris"):AddItem(vp,.5)
516
                elseif Type=="Up" then
517
                local bodyVelocity=Instance.new("BodyVelocity")
518
                bodyVelocity.velocity=vt(0,60,0)
519
                bodyVelocity.P=5000
520
                bodyVelocity.maxForce=Vector3.new(8e+003, 8e+003, 8e+003)
521
                bodyVelocity.Parent=hit
522
                game:GetService("Debris"):AddItem(bodyVelocity,1)
523
                rl=Instance.new("BodyAngularVelocity")
524
                rl.P=3000
525
                rl.maxTorque=Vector3.new(500000,500000,500000)*50000000000000
526
                rl.angularvelocity=Vector3.new(math.random(-30,30),math.random(-30,30),math.random(-30,30))
527
                rl.Parent=hit
528
                game:GetService("Debris"):AddItem(rl,.5)
529
                elseif Type=="Snare" then
530
                bp=Instance.new("BodyPosition")
531
                bp.P=2000
532
                bp.D=100
533
                bp.maxForce=Vector3.new(math.huge,math.huge,math.huge)
534
                bp.position=hit.Parent.Torso.Position
535
                bp.Parent=hit.Parent.Torso
536
                game:GetService("Debris"):AddItem(bp,1)
537
                elseif Type=="Target" then
538
                if Targetting==false then
539
                ZTarget=hit.Parent.Torso
540
                coroutine.resume(coroutine.create(function(Part)
541
                so("http://www.roblox.com/asset/?id=15666462",Part,1,1.5)
542
                swait(5)
543
                so("http://www.roblox.com/asset/?id=15666462",Part,1,1.5)
544
                end),ZTarget)
545
                TargHum=ZTarget.Parent:findFirstChild("Humanoid")
546
                targetgui=Instance.new("BillboardGui")
547
                targetgui.Parent=ZTarget
548
                targetgui.Size=UDim2.new(10,100,10,100)
549
                targ=Instance.new("ImageLabel")
550
                targ.Parent=targetgui
551
                targ.BackgroundTransparency=1
552
                targ.Image="rbxassetid://4834067"
553
                targ.Size=UDim2.new(1,0,1,0)
554
                cam.CameraType="Scriptable"
555
                cam.CoordinateFrame=CFrame.new(Head.CFrame.p,ZTarget.Position)
556
                dir=Vector3.new(cam.CoordinateFrame.lookVector.x,0,cam.CoordinateFrame.lookVector.z)
557
                workspace.CurrentCamera.CoordinateFrame=CFrame.new(Head.CFrame.p,ZTarget.Position)
558
                Targetting=true
559
                RocketTarget=ZTarget
560
                for i=1,Property do
561
                --while Targetting==true and Humanoid.Health>0 and Character.Parent~=nil do
562
                if Humanoid.Health>0 and Character.Parent~=nil and TargHum.Health>0 and TargHum.Parent~=nil and Targetting==true then
563
                swait()
564
                end
565
                --workspace.CurrentCamera.CoordinateFrame=CFrame.new(Head.CFrame.p,Head.CFrame.p+rmdir*100)
566
                cam.CoordinateFrame=CFrame.new(Head.CFrame.p,ZTarget.Position)
567
                dir=Vector3.new(cam.CoordinateFrame.lookVector.x,0,cam.CoordinateFrame.lookVector.z)
568
                cam.CoordinateFrame=CFrame.new(Head.CFrame.p,ZTarget.Position)*cf(0,5,10)*euler(-0.3,0,0)
569
                end
570
                Targetting=false
571
                RocketTarget=nil
572
                targetgui.Parent=nil
573
                cam.CameraType="Custom"
574
                end
575
                end
576
                        debounce=Instance.new("BoolValue")
577
                        debounce.Name="DebounceHit"
578
                        debounce.Parent=hit.Parent
579
                        debounce.Value=true
580
                        game:GetService("Debris"):AddItem(debounce,Delay)
581
                        c=Instance.new("ObjectValue")
582
                        c.Name="creator"
583
                        c.Value=Player
584
                        c.Parent=h
585
                        game:GetService("Debris"):AddItem(c,.5)
586
                CRIT=false
587
                hitDeb=true
588
                AttackPos=6
589
        end
590
end
591
 
592
showDamage=function(Char,Dealt,du,Color)
593
        m=Instance.new("Model")
594
        m.Name=tostring(Dealt)
595
        h=Instance.new("Humanoid")
596
        h.Health=0
597
        h.MaxHealth=0
598
        h.Parent=m
599
        c=Instance.new("Part")
600
        c.Transparency=0
601
        c.BrickColor=Color
602
        c.Name="Head"
603
        c.TopSurface=0
604
        c.BottomSurface=0
605
        c.formFactor="Plate"
606
        c.Size=Vector3.new(1,.4,1)
607
        ms=Instance.new("CylinderMesh")
608
        ms.Scale=Vector3.new(.8,.8,.8)
609
        if CRIT==true then
610
                ms.Scale=Vector3.new(1,1.25,1)
611
        end
612
        ms.Parent=c
613
        c.Reflectance=0
614
        Instance.new("BodyGyro").Parent=c
615
        c.Parent=m
616
        if Char:findFirstChild("Head")~=nil then
617
        c.CFrame=CFrame.new(Char["Head"].CFrame.p+Vector3.new(0,1.5,0))
618
        elseif Char.Parent:findFirstChild("Head")~=nil then
619
        c.CFrame=CFrame.new(Char.Parent["Head"].CFrame.p+Vector3.new(0,1.5,0))
620
        end
621
        f=Instance.new("BodyPosition")
622
        f.P=2000
623
        f.D=100
624
        f.maxForce=Vector3.new(math.huge,math.huge,math.huge)
625
        f.position=c.Position+Vector3.new(0,3,0)
626
        f.Parent=c
627
        game:GetService("Debris"):AddItem(m,.5+du)
628
        c.CanCollide=false
629
        m.Parent=workspace
630
        c.CanCollide=false
631
end
632
 
633
VestHandle=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Handle",Vector3.new(2.01999998, 1.39999998, 1.01999998))
634
handleweld=weld(m,Character["Torso"],VestHandle,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(1.52587891e-005, 0.300115585, 3.05175781e-005, 0.999999642, 0, 0, 0, 1, 0, 0, 0, 0.999999642))
635
Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"White","Part",Vector3.new(1, 0.76000005, 0.600000024))
636
Partweld=weld(m,VestHandle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.509597778, -0.490081787, 0.200000286, -0.999999642, 0, 0, 0, 0, 0.999999642, 0, 1, 0))
637
mesh("SpecialMesh",Part,Enum.MeshType.FileMesh,"http://www.roblox.com/asset/?id=104516854",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1))
638
Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(1.01999998, 0.600000024, 0.800000012))
639
Partweld=weld(m,VestHandle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.000152587891, -0.999994516, -0.200134277, -4.47035475e-008, 0, 0.999999642, 0, 1, 0, -0.999999642, 0, -4.4703544e-008))
640
mesh("SpecialMesh",Part,Enum.MeshType.Wedge,"",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1))
641
Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(0.200000003, 0.620000005, 1.01999998))
642
Partweld=weld(m,VestHandle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0.700012207, -1.00999117, 1.52587891e-005, 0.999999046, 0, 0, 0, 1, 0, 0, 0, 0.999999046))
643
Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(0.200000003, 0.620000005, 1.01999998))
644
Partweld=weld(m,VestHandle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.699127197, -1.00999379, 0.000549316406, 0.999997914, 6.38506317e-005, -2.78951497e-015, -6.38804122e-005, 1.00000012, 2.10474918e-015, 2.78942159e-015, 1.39239913e-015, 0.999997854))
645
Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Bright red","Part",Vector3.new(0.200000003, 0.400000036, 1.19999993))
646
Partweld=weld(m,VestHandle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.609390259, 0.811340332, -0.0999908447, 3.08029073e-018, -2.69585922e-014, -0.999999642, -0.999999642, -6.39334685e-005, -1.35697087e-018, -6.39334467e-005, 1, -2.6958582e-014))
647
mesh("SpecialMesh",Part,Enum.MeshType.FileMesh,"http://www.roblox.com/asset/?id=12891705",Vector3.new(0, 0, 0),Vector3.new(0.200000003, 0.200000003, 0.200000003))
648
Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Bright red","Part",Vector3.new(0.200000003, 0.400000036, 1.19999993))
649
Partweld=weld(m,VestHandle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.609359741, -0.788131714, -0.0999910831, 3.06354694e-018, -2.34616979e-014, -0.999999642, -0.999999642, -6.39629943e-005, -1.56279636e-018, -6.39629725e-005, 1, -2.34616895e-014))
650
mesh("SpecialMesh",Part,Enum.MeshType.FileMesh,"http://www.roblox.com/asset/?id=12891705",Vector3.new(0, 0, 0),Vector3.new(0.200000003, 0.200000003, 0.200000003))
651
Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Bright red","Part",Vector3.new(0.200000003, 0.400000036, 1.19999993))
652
Partweld=weld(m,VestHandle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.609375, 0.0116882324, -0.0999908447, 3.06355067e-018, -2.34617301e-014, -0.999999642, -0.999999642, -6.39631544e-005, -1.56279822e-018, -6.39631326e-005, 1, -2.34617217e-014))
653
mesh("SpecialMesh",Part,Enum.MeshType.FileMesh,"http://www.roblox.com/asset/?id=12891705",Vector3.new(0, 0, 0),Vector3.new(0.200000003, 0.200000003, 0.200000003))
654
Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Bright red","Part",Vector3.new(0.200000003, 0.400000036, 1.19999993))
655
Partweld=weld(m,VestHandle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.609313965, -0.388046265, -0.0999908447, 3.0635486e-018, -2.34617301e-014, -0.999998927, -0.999998927, -6.39631544e-005, -1.56279719e-018, -6.39630889e-005, 1, -2.34617047e-014))
656
mesh("SpecialMesh",Part,Enum.MeshType.FileMesh,"http://www.roblox.com/asset/?id=12891705",Vector3.new(0, 0, 0),Vector3.new(0.200000003, 0.200000003, 0.200000003))
657
Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Bright red","Part",Vector3.new(0.200000003, 0.400000036, 1.19999993))
658
Partweld=weld(m,VestHandle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.609329224, 0.411483765, -0.0999908447, 3.08028867e-018, -2.69585922e-014, -0.999998927, -0.999998927, -6.39334685e-005, -1.35696984e-018, -6.3933403e-005, 1, -2.69585617e-014))
659
mesh("SpecialMesh",Part,Enum.MeshType.FileMesh,"http://www.roblox.com/asset/?id=12891705",Vector3.new(0, 0, 0),Vector3.new(0.200000003, 0.200000003, 0.200000003))
660
Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(1.01999998, 0.200000003, 0.200000003))
661
Partweld=weld(m,VestHandle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0.000305175781, -0.800010204, 0.89906311, -4.47035724e-008, 6.26018334e-015, 0.999997854, -8.34552054e-008, 1.00000012, -5.15634779e-015, -0.999997914, -5.35364961e-008, -4.47035653e-008))
662
mesh("SpecialMesh",Part,Enum.MeshType.Wedge,"",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1))
663
Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(1.01999998, 0.600000024, 0.800000012))
664
Partweld=weld(m,VestHandle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0.000228881836, -0.99998498, -0.199783325, -4.47038211e-008, -2.85946115e-012, -0.999997854, -6.3955762e-005, 1.00000012, 1.77753083e-015, 0.999997914, 6.39259815e-005, -4.47038175e-008))
665
mesh("SpecialMesh",Part,Enum.MeshType.Wedge,"",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1))
666
Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Mid gray","Part",Vector3.new(0.400000006, 3.79999971, 0.200000003))
667
Partweld=weld(m,VestHandle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.356018066, -0.311279297, -0.609542847, 0.865768671, 0.500441432, 0, -0.5004403, 0.865770638, 3.55271241e-015, 3.55271241e-015, 3.02253882e-015, 0.999997854))
668
mesh("CylinderMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1))
669
Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(1.01999998, 0.200000003, 0.200000003))
670
Partweld=weld(m,VestHandle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0.000122070313, -0.799995899, 0.900177002, 1.49011559e-008, 0, -0.999995232, 0, 1, 0, 0.999995232, 0, 1.49011559e-008))
671
mesh("SpecialMesh",Part,Enum.MeshType.Wedge,"",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1))
672
FlagLogo=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","FlagLogo",Vector3.new(3, 1.99999988, 0.200000003))
673
FlagLogoweld=weld(m,VestHandle,FlagLogo,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(1.14234924, -3.41108704, -0.610244751, 0.865850091, 0.500302911, -3.55240239e-015, -0.500302792, 0.865850449, 9.79956736e-019, 3.07633938e-015, 1.77642947e-015, 0.999999642))
674
Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Mid gray","Part",Vector3.new(0.400000006, 0.200000003, 0.400000036))
675
Partweld=weld(m,VestHandle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.356628418, -2.31108093, -0.620269775, 0.865850091, 0.500302911, 7.10581953e-015, -0.500302792, 0.865850449, 9.79956736e-019, 6.15238443e-015, 3.55382075e-015, 0.999999642))
676
mesh("CylinderMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1))
677
Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Mid gray","Part",Vector3.new(0.400000036, 0.200000003, 0.400000036))
678
Partweld=weld(m,VestHandle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.354736328, -4.51108551, -0.620117188, 0.865849495, 0.500302911, 1.77640292e-014, -0.500302434, 0.865850449, 9.79956115e-019, 9.22842142e-015, 5.33121097e-015, 0.999998927))
679
mesh("CylinderMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1))
680
Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Mid gray","Part",Vector3.new(0.400000006, 1.99999964, 0.200000003))
681
Partweld=weld(m,VestHandle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.356216431, -3.41107178, -0.610137939, 0.865848899, 0.500302911, 1.77639292e-014, -0.500302076, 0.865850449, 9.79955495e-019, 1.53807173e-014, 8.88612016e-015, 0.999998212))
682
mesh("CylinderMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1))
683
Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Mid gray","Part",Vector3.new(0.400000006, 0.200000003, 0.400000036))
684
Partweld=weld(m,VestHandle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.356292725, 1.6887207, -0.619628906, 0.865768075, 0.500441432, 0, -0.500439942, 0.865770638, 3.55270987e-015, 3.55270987e-015, 3.02253882e-015, 0.999997139))
685
mesh("CylinderMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1))
686
Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Bright red","Part",Vector3.new(0.200000003, 0.400000036, 1.19999993))
687
Partweld=weld(m,VestHandle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0.589828491, 0.808547974, -0.0999956131, -3.90798369e-014, 8.06646416e-017, -0.999997854, -0.999997914, -6.36497934e-005, 3.90798369e-014, -6.36795739e-005, 1.00000012, 3.58011901e-015))
688
mesh("SpecialMesh",Part,Enum.MeshType.FileMesh,"http://www.roblox.com/asset/?id=12891705",Vector3.new(0, 0, 0),Vector3.new(0.200000003, 0.200000003, 0.200000003))
689
Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"White","Part",Vector3.new(1, 0.76000005, 0.600000024))
690
Partweld=weld(m,VestHandle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.509597778, -0.490081787, -0.399998188, -0.999999642, 0, 0, 0, 0, 0.999999642, 0, 1, 0))
691
mesh("SpecialMesh",Part,Enum.MeshType.FileMesh,"http://www.roblox.com/asset/?id=104516854",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1))
692
handle=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Handle",Vector3.new(0.200000003, 0.200000003, 1.4000001))
693
handleweld=weld(m,Character["Right Arm"],handle,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(3.05175781e-005, -1.10011411, -1.52587891e-005, 0.999999404, -4.47034765e-008, 0, -4.47034836e-008, -0.999999285, 0, 0, 0, -1))
694
mesh("SpecialMesh",handle,Enum.MeshType.FileMesh,"http://www.roblox.com/asset/?id=74322546",Vector3.new(0, 0, 0),Vector3.new(1.5, 1.5, 1.5))
695
local Decal1 = Instance.new("Decal",FlagLogo)
696
Decal1.Texture = "http://www.roblox.com/asset/?id=147337085"
697
Decal1.Face = "Front"
698
local Decal2 = Instance.new("Decal",FlagLogo)
699
Decal2.Texture = "http://www.roblox.com/asset/?id=147337085"
700
Decal2.Face = "Back"
701
Humanoid.WalkSpeed = 50
702
 
703
function ALLAHUAKBAR()
704
attack = true
705
local speak = {"ALLAHUAKBAR"}
706
local colors = {"Red","Red","Red"} -- The only 3 colors, adding more will error.
707
local chat = game:GetService("Chat")
708
chat:Chat(Head,speak[math.random(1,#speak)], colors[math.random(1,3)] )
709
for i = 0,1,0.05 do
710
swait()
711
RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(0),math.rad(0),math.rad(50)),.3)
712
Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(0),math.rad(0),math.rad(-50)),.3)
713
RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(90), math.rad(0), math.rad(50)), 0.3)
714
LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(0), math.rad(0), math.rad(-20)), 0.3)
715
RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(0),math.rad(90),math.rad(0))*angles(math.rad(-5),math.rad(0),math.rad(0)),.3)
716
LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-90),math.rad(0))*angles(math.rad(-5),math.rad(0),math.rad(0)),.3)
717
end
718
for i = 0,1,0.05 do
719
swait()
720
RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(0),math.rad(0),math.rad(50)),.3)
721
Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(0),math.rad(0),math.rad(-50)),.3)
722
RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(80), math.rad(0), math.rad(50)), 0.3)
723
LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(0), math.rad(0), math.rad(-20)), 0.3)
724
RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(0),math.rad(90),math.rad(0))*angles(math.rad(-5),math.rad(0),math.rad(0)),.3)
725
LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-90),math.rad(0))*angles(math.rad(-5),math.rad(0),math.rad(0)),.3)
726
end
727
for i = 1,20 do
728
--so("http://roblox.com/asset/?id=197815953",workspace,1,1)
729
so("rbxassetid://134854740",Torso,1,1.3)
730
so("rbxassetid://247893371",workspace,1,1)
731
so("rbxassetid://137994058",Torso,1,1)
732
so("rbxassetid://165969964",Torso,1,1)
733
local S = Instance.new("Explosion",workspace)
734
S.Position = Torso.Position
735
S.BlastPressure = 5
736
S.BlastRadius = 50
737
S.ExplosionType = 2
738
end
739
attack = false
740
end
741
 
742
mouse.Button1Down:connect(function()
743
ALLAHUAKBAR()
744
end)
745
 
746
mouse.KeyDown:connect(function(k)
747
        k=k:lower()
748
       
749
end)
750
 
751
 
752
local sine = 0
753
local change = 1
754
local val = 0
755
 
756
while true do
757
swait()
758
sine = sine + change
759
local torvel=(RootPart.Velocity*Vector3.new(1,0,1)).magnitude
760
local velderp=RootPart.Velocity.y
761
hitfloor,posfloor=rayCast(RootPart.Position,(CFrame.new(RootPart.Position,RootPart.Position - Vector3.new(0,1,0))).lookVector,4,Character)
762
if equipped==true or equipped==false then
763
if attack==false then
764
idle=idle+1
765
else
766
idle=0
767
end
768
if idle>=500 then
769
if attack==false then
770
--Sheath()
771
end
772
end
773
if RootPart.Velocity.y > 1 and hitfloor==nil then
774
Anim="Jump"
775
if attack==false then
776
RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(0),math.rad(0),math.rad(0)),.3)
777
Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(-20),math.rad(0),math.rad(0)),.3)
778
RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(20), math.rad(0), math.rad(10)), 0.3)
779
LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(0), math.rad(0), math.rad(-10)), 0.3)
780
RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(0),math.rad(90),math.rad(0))*angles(math.rad(-2),math.rad(0),math.rad(0)),.3)
781
LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-90),math.rad(0))*angles(math.rad(-2),math.rad(0),math.rad(0)),.3)
782
end
783
elseif RootPart.Velocity.y < -1 and hitfloor==nil then
784
Anim="Fall"
785
if attack==false then
786
RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(20),math.rad(0),math.rad(0)),.3)
787
Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(10),math.rad(0),math.rad(0)),.3)
788
RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(20), math.rad(0), math.rad(30)), 0.3)
789
LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(0), math.rad(0), math.rad(-30)), 0.3)
790
RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(0),math.rad(90),math.rad(0))*angles(math.rad(-10),math.rad(0),math.rad(0)),.3)
791
LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-90),math.rad(0))*angles(math.rad(-10),math.rad(0),math.rad(0)),.3)
792
end
793
elseif torvel<1 and hitfloor~=nil then
794
Anim="Idle"
795
if attack==false then
796
RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(0),math.rad(0),math.rad(10)),.3)
797
Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(0),math.rad(0),math.rad(-10)),.3)
798
RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(20), math.rad(0), math.rad(20)), 0.3)
799
LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(0), math.rad(0), math.rad(-20)), 0.3)
800
RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(0),math.rad(90),math.rad(0))*angles(math.rad(-5),math.rad(0),math.rad(0)),.3)
801
LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-90),math.rad(0))*angles(math.rad(-5),math.rad(0),math.rad(0)),.3)
802
end
803
elseif torvel>2 and hitfloor~=nil then
804
Anim="Walk"
805
if attack==false then
806
change=3
807
RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(20),math.rad(0),math.rad(0)),.3)
808
Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(-20),math.rad(0),math.rad(0)),.3)
809
RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(50*math.cos(sine/20)), math.rad(0), math.rad(10)), 0.3)
810
LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(-50*math.cos(sine/20)), math.rad(0), math.rad(-10)), 0.3)
811
RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(0),math.rad(90),math.rad(0))*angles(math.rad(0),math.rad(0),math.rad(0)),.3)
812
LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-90),math.rad(0))*angles(math.rad(0),math.rad(0),math.rad(0)),.3)
813
end
814
end
815
end
816
if #Effects>0 then
817
--table.insert(Effects,{prt,"Block1",delay})
818
for e=1,#Effects do
819
if Effects[e]~=nil then
820
--for j=1,#Effects[e] do
821
local Thing=Effects[e]
822
if Thing~=nil then
823
local Part=Thing[1]
824
local Mode=Thing[2]
825
local Delay=Thing[3]
826
local IncX=Thing[4]
827
local IncY=Thing[5]
828
local IncZ=Thing[6]
829
if Thing[1].Transparency<=1 then
830
if Thing[2]=="Block1" then
831
Thing[1].CFrame=Thing[1].CFrame*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50))
832
Mesh=Thing[1].Mesh
833
Mesh.Scale=Mesh.Scale+vt(Thing[4],Thing[5],Thing[6])
834
Thing[1].Transparency=Thing[1].Transparency+Thing[3]
835
elseif Thing[2]=="Cylinder" then
836
Mesh=Thing[1].Mesh
837
Mesh.Scale=Mesh.Scale+vt(Thing[4],Thing[5],Thing[6])
838
Thing[1].Transparency=Thing[1].Transparency+Thing[3]
839
elseif Thing[2]=="Blood" then
840
Mesh=Thing[7]
841
Thing[1].CFrame=Thing[1].CFrame*cf(0,.5,0)
842
Mesh.Scale=Mesh.Scale+vt(Thing[4],Thing[5],Thing[6])
843
Thing[1].Transparency=Thing[1].Transparency+Thing[3]
844
elseif Thing[2]=="Elec" then
845
Mesh=Thing[1].Mesh
846
Mesh.Scale=Mesh.Scale+vt(Thing[7],Thing[8],Thing[9])
847
Thing[1].Transparency=Thing[1].Transparency+Thing[3]
848
elseif Thing[2]=="Disappear" then
849
Thing[1].Transparency=Thing[1].Transparency+Thing[3]
850
end
851
else
852
Part.Parent=nil
853
table.remove(Effects,e)
854
end
855
end
856
--end
857
end
858
end
859
end
860
end