View difference between Paste ID: JsHJuSbh and K8VvT8h3
SHOW: | | - or go back to the newest paste.
1
local p = game.Players.LocalPlayer
2
local char = p.Character
3
local hed = char.Head
4
local LocalPlayer = p
5
6
local naeeym = Instance.new("BillboardGui",char)
7
naeeym.Size = UDim2.new(0,100,0,40)
8
naeeym.StudsOffset = Vector3.new(0,5,0)
9
naeeym.Adornee = char.Head
10
local tecks = Instance.new("TextLabel",naeeym)
11
tecks.BackgroundTransparency = 1
12
tecks.BorderSizePixel = 0
13
tecks.Text = "Demoman"
14
tecks.Font = "ArialBold"
15
tecks.FontSize = "Size36"
16
tecks.TextStrokeTransparency = 0
17
tecks.TextStrokeColor3 = Color3.new(0,0,0)
18
tecks.TextColor3 = Color3.new(0,191,255)
19
tecks.Size = UDim2.new(1,0,0.5,0)
20
21
p = game.Players.LocalPlayer
22
char = p.Character
23
torso = char.Torso
24
hed = char.Head
25
neck = char.Torso.Neck
26
hum = char.Humanoid
27
hum.MaxHealth = math.huge
28
local msg = game:GetService("Chat")
29
torso.BrickColor = BrickColor.new("Pastel brown")
30
hed.BrickColor = BrickColor.new("Pastel brown")
31
char["Right Arm"].BrickColor = BrickColor.new("Pastel brown")
32
char["Left Arm"].BrickColor = BrickColor.new("Pastel brown")
33
char["Left Leg"].BrickColor = BrickColor.new("Pastel brown") 
34
char["Right Leg"].BrickColor = BrickColor.new("Pastel brown")
35
ypcall(function()
36
shirt = Instance.new("Shirt", char)
37
shirt.Name = "Shirt"
38
pants = Instance.new("Pants", char)
39
pants.Name = "Pants"
40
char.Shirt.ShirtTemplate = "rbxassetid://781793593"
41
char.Pants.PantsTemplate = "rbxassetid://697014169"
42
end) 
43
--[[
44
Made by Fenrier.
45
]]
46
Player=game:GetService("Players").LocalPlayer
47
Character=Player.Character
48
PlayerGui=Player.PlayerGui
49
Backpack=Player.Backpack
50
Torso=Character.Torso
51
Head=Character.Head
52
Humanoid=Character.Humanoid
53
LeftArm=Character["Left Arm"]
54
LeftLeg=Character["Left Leg"]
55
RightArm=Character["Right Arm"]
56
RightLeg=Character["Right Leg"]
57
LS=Torso["Left Shoulder"]
58
LH=Torso["Left Hip"]
59
RS=Torso["Right Shoulder"]
60
RH=Torso["Right Hip"]
61
Neck=Torso.Neck
62
it=Instance.new
63
vt=Vector3.new
64
cf=CFrame.new
65
euler=CFrame.fromEulerAnglesXYZ
66
angles=CFrame.Angles
67
necko=cf(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
68
necko2=cf(0, -0.5, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
69
LHC0=cf(-1,-1,0,-0,-0,-1,0,1,0,1,0,0)
70
LHC1=cf(-0.5,1,0,-0,-0,-1,0,1,0,1,0,0)
71
RHC0=cf(1,-1,0,0,0,1,0,1,0,-1,-0,-0)
72
RHC1=cf(0.5,1,0,0,0,1,0,1,0,-1,-0,-0)
73
RootPart=Character.HumanoidRootPart
74
RootJoint=RootPart.RootJoint
75
RootCF=euler(-1.57,0,3.14)
76
attack = false
77
attackdebounce = false
78
MMouse=nil
79
combo=0
80
mana=0
81
local idle=0
82
local Anim="Idle"
83
local Effects={}
84
local gun=false
85
local shoot=false
86
--player
87
player=nil
88
--save shoulders
89
RSH, LSH=nil, nil
90
--welds
91
RW, LW=Instance.new("Weld"), Instance.new("Weld")
92
RW.Name="Right Shoulder" LW.Name="Left Shoulder"
93
LH=Torso["Left Hip"]
94
RH=Torso["Right Hip"]
95
TorsoColor=Torso.BrickColor
96
 
97
function swait(num)
98
if num==0 or num==nil then
99
--if Stagger.Value==false or Stun.Value<=100 then
100
game:service'RunService'.Stepped:wait(0)
101
--end
102
else
103
for i=0,num do
104
game:service'RunService'.Stepped:wait(0)
105
--[[if Stagger.Value==true or Stun.Value>=100 then
106
break
107
end]]
108
end
109
end
110
end
111
 
112
if Character:findFirstChild("Ignis",true) ~= nil then
113
Character:findFirstChild("Ignis",true).Parent = nil
114
end
115
if Player.PlayerGui:findFirstChild("WeaponGUI",true) ~= nil then
116
Player.PlayerGui:findFirstChild("WeaponGUI",true).Parent = nil
117
end
118
if Character:findFirstChild("Stats",true) ~= nil then
119
Character:findFirstChild("Stats",true).Parent = nil
120
end
121
local Stats=Instance.new("BoolValue")
122
Stats.Name="Stats"
123
Stats.Parent=Character
124
local Atk=Instance.new("NumberValue")
125
Atk.Name="Damage"
126
Atk.Parent=Stats
127
Atk.Value=1
128
local Def=Instance.new("NumberValue")
129
Def.Name="Defense"
130
Def.Parent=Stats
131
Def.Value=1
132
local Speed=Instance.new("NumberValue")
133
Speed.Name="Speed"
134
Speed.Parent=Stats
135
Speed.Value=1
136
local Mvmt=Instance.new("NumberValue")
137
Mvmt.Name="Movement"
138
Mvmt.Parent=Stats
139
Mvmt.Value=1
140
local Block=Instance.new("BoolValue")
141
Block.Name="Block"
142
Block.Parent=Stats
143
Block.Value=false
144
local Stun=Instance.new("NumberValue")
145
Stun.Name="Stun"
146
Stun.Parent=Stats
147
Stun.Value=0
148
local Stunned=Instance.new("BoolValue")
149
Stunned.Name="Stunned"
150
Stunned.Parent=Stats
151
Stunned.Value=false
152
local Stagger=Instance.new("BoolValue")
153
Stagger.Name="Stagger"
154
Stagger.Parent=Stats
155
Stagger.Value=false
156
local StaggerHit=Instance.new("BoolValue")
157
StaggerHit.Name="StaggerHit"
158
StaggerHit.Parent=Stats
159
StaggerHit.Value=false
160
local RecentEnemy=Instance.new("ObjectValue")
161
RecentEnemy.Name="RecentEnemy"
162
RecentEnemy.Parent=Stats
163
RecentEnemy.Value=nil
164
 
165
function NoOutline(Part)
166
Part.TopSurface,Part.BottomSurface,Part.LeftSurface,Part.RightSurface,Part.FrontSurface,Part.BackSurface = 10,10,10,10,10,10
167
end
168
 
169
function part(formfactor,parent,reflectance,transparency,brickcolor,name,size)
170
local fp=it("Part")
171
fp.formFactor=formfactor
172
fp.Parent=parent
173
fp.Reflectance=reflectance
174
fp.Transparency=transparency
175
fp.CanCollide=false
176
fp.Locked=true
177
fp.BrickColor=brickcolor
178
fp.Name=name
179
fp.Size=size
180
fp.Position=Torso.Position
181
NoOutline(fp)
182
fp.Material="SmoothPlastic"
183
fp:BreakJoints()
184
return fp
185
end
186
 
187
function mesh(Mesh,part,meshtype,meshid,offset,scale)
188
local mesh=it(Mesh)
189
mesh.Parent=part
190
if Mesh=="SpecialMesh" then
191
mesh.MeshType=meshtype
192
if meshid~="nil" then
193
mesh.MeshId="http://www.roblox.com/asset/?id="..meshid
194
end
195
end
196
mesh.Offset=offset
197
mesh.Scale=scale
198
return mesh
199
end
200
 
201
function weld(parent,part0,part1,c0)
202
local weld=it("Weld")
203
weld.Parent=parent
204
weld.Part0=part0
205
weld.Part1=part1
206
weld.C0=c0
207
return weld
208
end
209
 
210
local Color1=Torso.BrickColor
211
 
212
local fengui=it("GuiMain")
213
fengui.Parent=Player.PlayerGui
214
fengui.Name="WeaponGUI"
215
local fenframe=it("Frame")
216
fenframe.Parent=fengui
217
fenframe.BackgroundColor3=Color3.new(255,255,255)
218
fenframe.BackgroundTransparency=1
219
fenframe.BorderColor3=Color3.new(17,17,17)
220
fenframe.Size=UDim2.new(0.0500000007, 0, 0.100000001, 0)
221
fenframe.Position=UDim2.new(0.4,0,0.1,0)
222
local fenbarmana1=it("TextLabel")
223
fenbarmana1.Parent=fenframe
224
fenbarmana1.Text=" "
225
fenbarmana1.BackgroundTransparency=0
226
fenbarmana1.BackgroundColor3=Color3.new(0,0,0)
227
fenbarmana1.SizeConstraint="RelativeXY"
228
fenbarmana1.TextXAlignment="Center"
229
fenbarmana1.TextYAlignment="Center"
230
fenbarmana1.Position=UDim2.new(0,0,0,0)
231
fenbarmana1.Size=UDim2.new(4,0,0.2,0)
232
local fenbarmana2=it("TextLabel")
233
fenbarmana2.Parent=fenframe
234
fenbarmana2.Text=" "
235
fenbarmana2.BackgroundTransparency=0
236
fenbarmana2.BackgroundColor3=BrickColor.new("Really red").Color
237
fenbarmana2.SizeConstraint="RelativeXY"
238
fenbarmana2.TextXAlignment="Center"
239
fenbarmana2.TextYAlignment="Center"
240
fenbarmana2.Position=UDim2.new(0,0,0,0)
241
fenbarmana2.Size=UDim2.new(4*mana/100,0,0.2,0)
242
local fenbarmana3=it("TextLabel")
243
fenbarmana3.Parent=fenframe
244
fenbarmana3.Text=" "
245
fenbarmana3.BackgroundTransparency=0
246
fenbarmana3.BackgroundColor3=Color3.new(Col1,Col2,Col3)
247
fenbarmana3.SizeConstraint="RelativeXY"
248
fenbarmana3.TextXAlignment="Center"
249
fenbarmana3.TextYAlignment="Center"
250
fenbarmana3.Position=UDim2.new(0,0,0,0)
251
fenbarmana3.Size=UDim2.new(0,0,0.2,0)
252
local fenbarmana4=it("TextLabel")
253
fenbarmana4.Parent=fenframe
254
fenbarmana4.Text="Mana("..mana..")"
255
fenbarmana4.BackgroundTransparency=1
256
fenbarmana4.BackgroundColor3=Color3.new(0,0,0)
257
fenbarmana4.SizeConstraint="RelativeXY"
258
fenbarmana4.TextXAlignment="Center"
259
fenbarmana4.TextYAlignment="Center"
260
fenbarmana4.Position=UDim2.new(0,0,-0.3,0)
261
fenbarmana4.Size=UDim2.new(4,0,0.2,0)
262
fenbarmana4.FontSize="Size9"
263
fenbarmana4.TextStrokeTransparency=0
264
fenbarmana4.TextColor=BrickColor.new("White")
265
 
266
local modelzorz=Instance.new("Model")
267
modelzorz.Parent=Character
268
modelzorz.Name="Ignis"
269
 
270
local prt1=part(3,modelzorz,0,0,TorsoColor,"Part01",vt())
271
local prt2=part(3,modelzorz,0,0,BrickColor.new("Black"),"Part02",vt())
272
local prt3=part(3,modelzorz,0.5,0,BrickColor.new("Reddish brown"),"Part03",vt())
273
local prt4=part(3,modelzorz,0.5,0,BrickColor.new("Reddish brown"),"Part04",vt())
274
local prt8=part(3,modelzorz,0.5,0,BrickColor.new("Reddish brown"),"Part08",vt())
275
local prt9=part(3,modelzorz,0.5,0,BrickColor.new("Reddish brown"),"Part09",vt())
276
local prt10=part(3,modelzorz,0.5,0,BrickColor.new("Reddish brown"),"Part10",vt())
277
local prt11=part(3,modelzorz,0.5,0,BrickColor.new("Reddish brown"),"Part11",vt())
278
local prt12=part(3,modelzorz,0.5,0,BrickColor.new("Reddish brown"),"Part12",vt())
279
local gprt1=part(3,modelzorz,0,0.9,BrickColor.new("Dusty Rose"),"Gun Part01",vt())
280
local gprt2=part(3,modelzorz,0.2,0,BrickColor.new("Dusty Rose"),"Gun Part02",vt())
281
local gprt3=part(3,modelzorz,0.2,0,BrickColor.new("Dusty Rose"),"Gun Part03",vt())
282
local gprt4=part(3,modelzorz,0.2,0,BrickColor.new("Dusty Rose"),"Gun Part04",vt())
283
local gprt5=part(3,modelzorz,0.2,0,BrickColor.new("Dusty Rose"),"Gun Part05",vt())
284
local gprt6=part(3,modelzorz,0.2,0,BrickColor.new("Dusty Rose"),"Gun Part06",vt())
285
local gprt7=part(3,modelzorz,0,0,BrickColor.new("Really black"),"Gun Part07",vt())
286
local gprt8=part(3,modelzorz,0.2,0,BrickColor.new("Dusty Rose"),"Gun Part08",vt())
287
local gprt9=part(3,modelzorz,0,0,BrickColor.new("Really black"),"Gun Part09",vt())
288
local gprt10=part(3,modelzorz,0.2,0,BrickColor.new("Dusty Rose"),"Gun Part10",vt())
289
local gprt11=part(3,modelzorz,0,0,BrickColor.new("Black"),"Gun Part11",vt())
290
local gprt12=part(3,modelzorz,0,0,BrickColor.new("Really red"),"Gun Part12",vt())
291
local gprt13=part(3,modelzorz,0,0,BrickColor.new("Black"),"Gun Part13",vt())
292
local gprt14=part(3,modelzorz,0,0,BrickColor.new("Black"),"Gun Part14",vt())
293
local gprt15=part(3,modelzorz,0,0,BrickColor.new("Really red"),"Gun Part15",vt())
294
local gprt16=part(3,modelzorz,0,.2,BrickColor.new("Really red"),"Gun Part16",vt())
295
 
296
local msh1=mesh("SpecialMesh",prt1,"Head","nil",vt(0,0,0),vt(2.5,6,2.5))
297
local msh2=mesh("BlockMesh",prt2,"","",vt(0,0,0),vt(1.5,7,1.5))
298
local msh3=mesh("BlockMesh",prt3,"","",vt(0,0,0),vt(1.6,3,1.6))
299
local msh4=mesh("BlockMesh",prt4,"","",vt(0,0,0),vt(1.6,9,1))
300
local msh8=mesh("BlockMesh",prt8,"","",vt(0,0,0),vt(1.6,4,1))
301
local msh9=mesh("BlockMesh",prt9,"","",vt(0,0,0),vt(1.6,20,2))
302
local msh10=mesh("SpecialMesh",prt10,"Wedge","nil",vt(0,0,0),vt(1.6,3,2))
303
local msh11=mesh("BlockMesh",prt11,"","",vt(0,0,0),vt(1.6,17.5,1.5))
304
local msh12=mesh("SpecialMesh",prt12,"Wedge","nil",vt(0,0,0),vt(1.6,2.1,1.5))
305
local gmsh1=mesh("BlockMesh",gprt1,"","",vt(0,0,0),vt(1,1,1))
306
local gmsh2=mesh("BlockMesh",gprt2,"","",vt(0,0,0),vt(2,4,2))
307
local gmsh3=mesh("SpecialMesh",gprt3,"Wedge","nil",vt(0,0,0),vt(2,2,1))
308
local gmsh4=mesh("BlockMesh",gprt4,"","",vt(0,0,0),vt(1.99,6,2))
309
local gmsh5=mesh("SpecialMesh",gprt5,"Wedge","nil",vt(0,0,0),vt(1.99,2,2))
310
local gmsh6=mesh("BlockMesh",gprt6,"","",vt(0,0,0),vt(2.1,8.6,2))
311
local gmsh7=mesh("BlockMesh",gprt7,"","",vt(0,0,0),vt(2,8.5,1.99))
312
local gmsh8=mesh("CylinderMesh",gprt8,"","",vt(0,0,0),vt(2,2,2))
313
local gmsh9=mesh("CylinderMesh",gprt9,"","",vt(0,0,0),vt(1.5,2.01,1.5))
314
local gmsh10=mesh("SpecialMesh",gprt10,"Wedge","nil",vt(0,0,0),vt(2,2,2))
315
local gmsh11=mesh("BlockMesh",gprt11,"","",vt(0,0,0),vt(2.2,2,1))
316
local gmsh12=mesh("BlockMesh",gprt12,"","",vt(0,0,0),vt(2.21,1.8,.8))
317
local gmsh13=mesh("BlockMesh",gprt13,"","",vt(0,0,0),vt(2.22,.5,1))
318
local gmsh14=mesh("BlockMesh",gprt14,"","",vt(0,0,0),vt(2.2,6,1))
319
local gmsh15=mesh("BlockMesh",gprt15,"","",vt(0,0,0),vt(2.21,5,.9))
320
 
321
local wld1=weld(prt1,prt1,Torso,euler(0,1.57,-2.1)*cf(-1.8,-1.7,-.5))
322
local wld2=weld(prt2,prt2,prt1,euler(0,0,0)*cf(0,0,0))
323
local wld3=weld(prt3,prt3,prt2,euler(0,0,0)*cf(0,-1,0))
324
local wld4=weld(prt4,prt4,prt3,euler(0,0,0)*cf(0,-1.2,-.1))
325
local wld8=weld(prt8,prt8,prt4,euler(1.57,0,0)*cf(0,0,-0.5))
326
local wld9=weld(prt9,prt9,prt4,euler(0,0,0)*cf(0,-3,0))
327
local wld10=weld(prt10,prt10,prt9,euler(0,3.14,0)*cf(0,-2.3,0))
328
local wld11=weld(prt11,prt11,prt4,euler(0,0,0)*cf(0,-2.85,-.36))
329
local wld12=weld(prt12,prt12,prt11,euler(0,3.14,0)*cf(0,-1.95,0))
330
local gwld1=weld(gprt1,gprt1,LeftLeg,euler(2.3,0,0)*cf(.6,-.8,.3))
331
--local gwld1=weld(gprt1,gprt1,LeftArm,euler(1.57,0,0)*cf(0,.9,0))
332
local gwld2=weld(gprt2,gprt2,gprt1,euler(.7,0,0)*cf(0,0,0))
333
local gwld3=weld(gprt3,gprt3,gprt2,euler(1.57,3.14,0)*cf(0,.5,0))
334
local gwld4=weld(gprt4,gprt4,gprt2,euler(0.87,0,0)*cf(0,-.6,.3))
335
local gwld5=weld(gprt5,gprt5,gprt4,euler(0,3.14,0)*cf(0,-.8,0))
336
local gwld6=weld(gprt6,gprt6,gprt4,euler(0,0,0)*cf(0,-.25,-.1))
337
local gwld7=weld(gprt7,gprt7,gprt4,euler(0,0,0)*cf(0,-.25,-.1))
338
local gwld8=weld(gprt8,gprt8,gprt7,euler(0,0,0)*cf(0,-.9,0))
339
local gwld9=weld(gprt9,gprt9,gprt8,euler(0,0,0)*cf(0,0,0))
340
local gwld10=weld(gprt10,gprt10,gprt6,euler(0,0,3.14)*cf(0,1.05,0))
341
local gwld11=weld(gprt11,gprt11,gprt6,euler(0,0,0)*cf(0,.5,0.1))
342
local gwld12=weld(gprt12,gprt12,gprt11,euler(0,0,0)*cf(0,0,0))
343
local gwld13=weld(gprt13,gprt13,gprt11,euler(0,0,0)*cf(0,0,0))
344
local gwld14=weld(gprt14,gprt14,gprt6,euler(0,0,0)*cf(0,-.1,-.11))
345
local gwld15=weld(gprt15,gprt15,gprt14,euler(0,0,0)*cf(0,.05,0))
346
local gwld16=weld(gprt16,gprt16,gprt11,euler(-1.57,0,0)*cf(0,0,0))
347
 
348
num=0
349
num2=0
350
for i=1,10 do
351
local prt5=part(3,modelzorz,0.5,0,BrickColor.new("Reddish brown"),"Part05",vt())
352
local msh5=mesh("BlockMesh",prt5,"","",vt(0,0,0),vt(1.61,2,1.61))
353
local wld5=weld(prt5,prt5,prt4,cf(0,0,1.05)*euler(1.57+num,0,0))
354
if i>=3 and i<=9 then
355
local prt6=part(3,modelzorz,0.5,0,BrickColor.new("Reddish brown"),"Part06",vt())
356
local msh6=mesh("BlockMesh",prt6,"","",vt(0,0,0),vt(1.6,1.5,2))
357
local wld6=weld(prt6,prt6,prt5,cf(0,0.1,.3))
358
local prt7=part(3,modelzorz,0.5,0,BrickColor.new("Reddish brown"),"Part07",vt())
359
local msh7=mesh("SpecialMesh",prt7,"FileMesh","9756362",vt(0,0,0),vt(.3,.3,.6))
360
local wld7=weld(prt7,prt7,prt6,euler(0,0,0.785)*cf(0,0,0.2))
361
end
362
num=num+0.348
363
end
364
 
365
num=0
366
for i=1,4 do
367
local gprt11=part(3,modelzorz,0,0,BrickColor.new("Black"),"Gun Part11",vt())
368
local gmsh11=mesh("CylinderMesh",gprt11,"","",vt(0,0,0),vt(.6,2.2,.6))
369
local gwld11=weld(gprt11,gprt11,gprt6,euler(0,0,1.57)*cf(0,-.5-num,0.1))
370
num=num-.2
371
end
372
 
373
local hitbox=part(3,nil,0,1,BrickColor.new("Black"),"Hitbox",vt(1,1,1))
374
--hitbox.Anchored=false
375
local hitbox2=part(3,nil,0,1,BrickColor.new("Black"),"Hitbox",vt(1,1,1))
376
hitbox2.Anchored=true
377
 
378
if (script.Parent.className~="HopperBin") then
379
Tool=Instance.new("HopperBin")
380
Tool.Parent=Backpack
381
Tool.Name="Ignis"
382
script.Parent=Tool
383
end
384
Bin=script.Parent
385
 
386
local bodvel=Instance.new("BodyVelocity")
387
local bg=Instance.new("BodyGyro")
388
 
389
so = function(id,par,vol,pit)
390
coroutine.resume(coroutine.create(function()
391
local sou = Instance.new("Sound",par or workspace)
392
sou.Volume=vol
393
sou.Pitch=pit or 1
394
sou.SoundId=id
395
swait()
396
sou:play()
397
game:GetService("Debris"):AddItem(sou,6)
398
end))
399
end
400
 
401
function clerp(a,b,t)
402
local qa = {QuaternionFromCFrame(a)}
403
local qb = {QuaternionFromCFrame(b)}
404
local ax, ay, az = a.x, a.y, a.z
405
local bx, by, bz = b.x, b.y, b.z
406
local _t = 1-t
407
return QuaternionToCFrame(_t*ax + t*bx, _t*ay + t*by, _t*az + t*bz,QuaternionSlerp(qa, qb, t))
408
end
409
 
410
function QuaternionFromCFrame(cf)
411
local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
412
local trace = m00 + m11 + m22
413
if trace > 0 then
414
local s = math.sqrt(1 + trace)
415
local recip = 0.5/s
416
return (m21-m12)*recip, (m02-m20)*recip, (m10-m01)*recip, s*0.5
417
else
418
local i = 0
419
if m11 > m00 then
420
i = 1
421
end
422
if m22 > (i == 0 and m00 or m11) then
423
i = 2
424
end
425
if i == 0 then
426
local s = math.sqrt(m00-m11-m22+1)
427
local recip = 0.5/s
428
return 0.5*s, (m10+m01)*recip, (m20+m02)*recip, (m21-m12)*recip
429
elseif i == 1 then
430
local s = math.sqrt(m11-m22-m00+1)
431
local recip = 0.5/s
432
return (m01+m10)*recip, 0.5*s, (m21+m12)*recip, (m02-m20)*recip
433
elseif i == 2 then
434
local s = math.sqrt(m22-m00-m11+1)
435
local recip = 0.5/s return (m02+m20)*recip, (m12+m21)*recip, 0.5*s, (m10-m01)*recip
436
end
437
end
438
end
439
 
440
function QuaternionToCFrame(px, py, pz, x, y, z, w)
441
local xs, ys, zs = x + x, y + y, z + z
442
local wx, wy, wz = w*xs, w*ys, w*zs
443
local xx = x*xs
444
local xy = x*ys
445
local xz = x*zs
446
local yy = y*ys
447
local yz = y*zs
448
local zz = z*zs
449
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))
450
end
451
 
452
function QuaternionSlerp(a, b, t)
453
local cosTheta = a[1]*b[1] + a[2]*b[2] + a[3]*b[3] + a[4]*b[4]
454
local startInterp, finishInterp;
455
if cosTheta >= 0.0001 then
456
if (1 - cosTheta) > 0.0001 then
457
local theta = math.acos(cosTheta)
458
local invSinTheta = 1/math.sin(theta)
459
startInterp = math.sin((1-t)*theta)*invSinTheta
460
finishInterp = math.sin(t*theta)*invSinTheta  
461
else
462
startInterp = 1-t
463
finishInterp = t
464
end
465
else
466
if (1+cosTheta) > 0.0001 then
467
local theta = math.acos(-cosTheta)
468
local invSinTheta = 1/math.sin(theta)
469
startInterp = math.sin((t-1)*theta)*invSinTheta
470
finishInterp = math.sin(t*theta)*invSinTheta
471
else
472
startInterp = t-1
473
finishInterp = t
474
end
475
end
476
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
477
end
478
 
479
function hideanim()
480
equipped=false
481
for i=0,1,0.5 do
482
swait()
483
wld1.C0=clerp(wld1.C0,euler(0,-1.57,-1)*euler(.4,0,0)*cf(0,1,0),.4)
484
gwld1.C0=clerp(gwld1.C0,euler(2,0,0)*cf(0,1,0),.4)
485
Neck.C0=clerp(Neck.C0,necko*euler(-.2,0,-.4),.4)
486
RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,0),.4)
487
RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(2,0,.2),.4)
488
RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.4)
489
LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(.2,0,.2),.4)
490
LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.4)
491
end
492
for i=0,1,0.2 do
493
swait()
494
wld1.C0=clerp(wld1.C0,euler(0,-1.57,-1)*euler(.4,0,0)*cf(0,1,0),.4)
495
gwld1.C0=clerp(gwld1.C0,euler(2,0,0)*cf(0,1,0),.4)
496
Neck.C0=clerp(Neck.C0,necko*euler(-.2,0,-.4),.4)
497
RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,0),.4)
498
RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(3.4,0,.2),.4)
499
RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.4)
500
LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(.2,0,.2),.4)
501
LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.4)
502
RH.C0=clerp(RH.C0,RHC0,.4)
503
RH.C1=clerp(RH.C1,RHC1,.4)
504
LH.C0=clerp(LH.C0,LHC0,.4)
505
LH.C1=clerp(LH.C1,LHC1,.4)
506
end
507
Mvmt.Value=Mvmt.Value+.1
508
wld1.Part1=Torso
509
wld1.C0=euler(0,1.57,-2.1)*cf(-1.8,-1.7,-.5)
510
gwld1.Part1=LeftLeg
511
gwld1.C0=euler(2.3,0,0)*cf(.6,-.8,.3)
512
for i=0,1,0.3 do
513
swait()
514
Neck.C0=clerp(Neck.C0,necko*euler(0,0,0),.4)
515
RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,0),.4)
516
RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(0,0,0),.4)
517
RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.4)
518
LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(0,0,0),.4)
519
LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.4)
520
end
521
end
522
 
523
function equipanim()
524
equipped=true
525
for i=0,1,0.5 do
526
swait()
527
Neck.C0=clerp(Neck.C0,necko*euler(-.2,0,-.4),.4)
528
RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,0),.4)
529
RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(2,0,.2),.4)
530
RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.4)
531
LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(.2,0,.2),.4)
532
LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.4)
533
end
534
for i=0,1,0.2 do
535
swait()
536
Neck.C0=clerp(Neck.C0,necko*euler(-.2,0,-.4),.4)
537
RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,0),.4)
538
RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(3.4,0,.2),.4)
539
RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.4)
540
LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(.2,0,.2),.4)
541
LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.4)
542
end
543
Mvmt.Value=Mvmt.Value-.1
544
wld1.Part1=RightArm
545
wld1.C0=euler(0,-1.57,-1)*euler(.4,0,0)*cf(0,1,0)
546
gwld1.Part1=LeftArm
547
--gwld1.C0=euler(1.57,0,0)*cf(0,1,0)
548
gwld1.C0=euler(2,0,0)*cf(0,1,0)
549
--[[for i=0,2,0.5 do
550
swait()
551
wld1.C0=clerp(wld1.C0,euler(1.57,0,3.14)*cf(0,1,0),.3)
552
gwld1.C0=clerp(gwld1.C0,euler(1.57,0,0)*cf(0,1,0),.4)
553
Neck.C0=clerp(Neck.C0,necko*euler(-.1,0,-.2),.4)
554
RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,0),.4)
555
RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(1.5,0,.2),.4)
556
RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.4)
557
LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(0,0,0),.4)
558
LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.4)
559
end]]
560
end
561
 
562
function StaggerAnim()
563
attack=true
564
for i=1,math.random(2,4) do
565
ClangEffect(BrickColor.new("New Yeller"),cf(hitbox.Position)*euler(math.random(-50,50)/100,math.random(-50,50),math.random(-50,50)/100),0,.1,.2,math.random(150,300)/1000)
566
end
567
for i=0,1,0.35 do
568
swait()
569
Torso.Velocity=RootPart.CFrame.lookVector*-40
570
wld1.C0=clerp(wld1.C0,euler(1.57,0,3.14)*cf(0,1,.2),.3)
571
Neck.C0=clerp(Neck.C0,necko*euler(0,0,.5)*euler(.1,0,0),.3)
572
RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(-.2,0,-.4),.3)
573
RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(-.2,0,.7)*euler(0,-.7,0),.3)
574
RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
575
LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(-.2,0,-.4)*euler(0,.4,0),.3)
576
LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
577
RH.C0=clerp(RH.C0,cf(1,-.8,0)*euler(0,1.57,0)*euler(-.5,0,.6),.3)
578
LH.C0=clerp(LH.C0,cf(-1,-1,0)*euler(0,-1.57,0)*euler(0,.2,.2),.3)
579
end
580
for i=0,1,0.2 do
581
swait()
582
Torso.Velocity=RootPart.CFrame.lookVector*-40
583
wld1.C0=clerp(wld1.C0,euler(1.57,0,3.14)*cf(0,1,.2),.3)
584
Neck.C0=clerp(Neck.C0,necko*euler(0,0,.5)*euler(.1,0,0),.4)
585
RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,-.2)*euler(-.5,0,-.4),.4)
586
RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(-.2,0,.7)*euler(0,-.7,0),.4)
587
RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.4)
588
LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(-.2,0,-.4)*euler(0,.4,0),.4)
589
LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.4)
590
RH.C0=clerp(RH.C0,cf(1,-.8,0)*euler(0,1.57,0)*euler(-.5,0,.6),.4)
591
LH.C0=clerp(LH.C0,cf(-1,-1,0)*euler(0,-1.57,0)*euler(0,.2,.5),.4)
592
end
593
for i=0,1,0.1 do
594
swait()
595
wld1.C0=clerp(wld1.C0,euler(1.57,0,3.14)*cf(0,1,.2),.3)
596
Neck.C0=clerp(Neck.C0,necko*euler(0,0,.4)*euler(.5,0,0),.3)
597
RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,-1.8)*euler(-.2,0,-.4),.3)
598
RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(-.3,0,.4)*euler(0,-.4,0),.3)
599
RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
600
LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(-.3,0,-.2)*euler(0,.4,0),.3)
601
LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
602
RH.C0=clerp(RH.C0,cf(1,-.8,0)*euler(0,1.57,0)*euler(-.5,0,1.2),.3)
603
LH.C0=clerp(LH.C0,cf(-1,0,-1)*euler(0,-1.57,0)*euler(0,.2,.2),.3)
604
end
605
swait(15)
606
combo=0
607
attack=false
608
end
609
 
610
function StaggerHitt()
611
attack=true
612
for i=1,math.random(2,4) do
613
ClangEffect(BrickColor.new("New Yeller"),cf(hitbox.Position)*euler(math.random(-50,50)/100,math.random(-50,50),math.random(-50,50)/100),0,.1,.2,math.random(150,300)/1000)
614
end
615
for i=0,1,0.1 do
616
swait()
617
wld1.C0=clerp(wld1.C0,euler(1.57,0,3.14)*cf(0,1,.2),.3)
618
Neck.C0=clerp(Neck.C0,necko*euler(0,0,.7)*euler(.1,0,0),.3)
619
RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(-.2,0,-.6),.3)
620
RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(-.4,0,.9)*euler(0,-.7,0),.3)
621
RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
622
LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(-.2,0,-.4)*euler(0,.4,0),.3)
623
LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
624
RH.C0=clerp(RH.C0,cf(1,-.8,0)*euler(0,1.57,0)*euler(-.2,0,-.4),.3)
625
LH.C0=clerp(LH.C0,cf(-1,-1,0)*euler(0,-1.57,0)*euler(0,.2,.2),.3)
626
end
627
attack=false
628
end
629
 
630
function StunAnim()
631
attack=true
632
Stunned.Value=true
633
for i=0,1,0.3 do
634
swait()
635
Humanoid.WalkSpeed=0
636
wld1.C0=clerp(wld1.C0,euler(1.57,0,3.14)*cf(0,1,.2),.3)
637
Neck.C0=clerp(Neck.C0,necko*euler(-.2,0,-.5),.2)
638
RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(.2,0,-3),.2)
639
RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(-.2,0,1.3),.2)
640
RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.2)
641
LW.C0=clerp(LW.C0,cf(-1.2,0.5,-.4)*euler(1,0,.4)*euler(0,-.1,0),.2)
642
LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.2)
643
RH.C0=clerp(RH.C0,cf(1,-.6,0)*euler(0,1.57,0)*euler(-.5,0,.3),.25)
644
LH.C0=clerp(LH.C0,cf(-1,-.8,0)*euler(0,-1.57,0)*euler(-.2,0,0),.25)
645
end
646
for i=0,1,0.3 do
647
swait()
648
Humanoid.WalkSpeed=0
649
wld1.C0=clerp(wld1.C0,euler(1.57,0,3.14)*cf(0,1,.2),.3)
650
Neck.C0=clerp(Neck.C0,necko*euler(-.3,0,-.5),.2)
651
RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,-.5)*euler(.8,0,-3),.2)
652
RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(-.8,0,1.3),.2)
653
RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.2)
654
LW.C0=clerp(LW.C0,cf(-1.2,0.5,-.4)*euler(1.2,0,.8)*euler(0,-.1,0),.2)
655
LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.2)
656
RH.C0=clerp(RH.C0,cf(1,-.6,0)*euler(0,1.57,0)*euler(-.5,0,.6),.25)
657
LH.C0=clerp(LH.C0,cf(-1,-.8,0)*euler(0,-1.57,0)*euler(.1,0,.7),.25)
658
end
659
for i=0,1,0.3 do
660
swait()
661
Humanoid.WalkSpeed=0
662
wld1.C0=clerp(wld1.C0,euler(1.57,0,3.14)*cf(0,1,.2),.3)
663
Neck.C0=clerp(Neck.C0,necko*euler(-.3,0,-1),.2)
664
RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,-2)*euler(1.57,0,-3),.2)
665
RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(-.8,0,1.3),.2)
666
RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.2)
667
LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(1.2,0,-.8)*euler(0,-.1,0),.2)
668
LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.2)
669
RH.C0=clerp(RH.C0,cf(1,-.6,0)*euler(0,1.57,0)*euler(-.2,0,.6),.25)
670
LH.C0=clerp(LH.C0,cf(-1,-.8,0)*euler(0,-1.57,0)*euler(-.1,0,.3),.25)
671
end
672
gairo=Instance.new("BodyGyro")
673
gairo.Parent=RootPart
674
gairo.maxTorque=Vector3.new(4e+005,4e+005,4e+005)*math.huge
675
gairo.P=20e+003
676
gairo.cframe=RootPart.CFrame
677
v=Instance.new("BodyVelocity",RootPart)
678
v.Name="BodVel"
679
v.P=2000
680
v.maxForce=Vector3.new(500000000,50000000,500000000)
681
v.velocity=vt(0,-50,0)
682
for i=0,1,0.1 do
683
swait()
684
Humanoid.WalkSpeed=0
685
v.velocity=vt(0,-50,0)
686
wld1.C0=clerp(wld1.C0,euler(1.57,0,3.14)*cf(0,1,.2),.3)
687
Neck.C0=clerp(Neck.C0,necko*euler(0,0,-1.57),.3)
688
RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,-2.5)*euler(1.57,0,-3.14),.3)
689
RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(-1.57,0,1.5)*euler(.2,0,0),.3)
690
RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
691
LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(1.5,0,-1.57)*euler(0,0,0),.3)
692
LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
693
RH.C0=clerp(RH.C0,cf(1,-1,0)*euler(0,1.57,0)*euler(-.3,.5,0),.3)
694
LH.C0=clerp(LH.C0,cf(-1,-1,0)*euler(0,-1.57,0)*euler(-.1,.2,0),.3)
695
end
696
for i=1,70 do
697
swait()
698
Humanoid.WalkSpeed=0
699
v.velocity=vt(0,-50,0)
700
end
701
v.velocity=vt(0,0,0)
702
for i=0,1,0.2 do
703
swait()
704
wld1.C0=clerp(wld1.C0,euler(1.57,0,3.14)*cf(0,1,.2),.3)
705
Neck.C0=clerp(Neck.C0,necko*euler(.2,0,0),.3)
706
RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,-2)*euler(1,0,-4),.3)
707
RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(-1.57,0,1)*euler(.2,-1,0),.3)
708
RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
709
LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(1.2,0,.2)*euler(0,0,0),.3)
710
LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
711
RH.C0=clerp(RH.C0,cf(1,-1,0)*euler(0,1.57,0)*euler(-.3,.5,.4),.3)
712
LH.C0=clerp(LH.C0,cf(-1,-1,-1)*euler(0,-1.57,0)*euler(-.1,.2,1),.3)
713
end
714
gairo.Parent=nil
715
v.Parent=nil
716
combo=0
717
Stunned.Value=false
718
attack=false
719
end
720
 
721
function attackone()
722
attack=true
723
for i=0,1,0.2 do
724
swait()
725
wld1.C0=clerp(wld1.C0,euler(2.9,0,3.14)*cf(0,1,.2),.4)
726
Neck.C0=clerp(Neck.C0,necko*euler(.2,0,.5),.4)
727
RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,-.5),.4)
728
RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(2,0,1),.4)
729
RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.4)
730
LW.C0=clerp(LW.C0,cf(-1.3,0.5,-.3)*euler(.4,0,.2)*euler(0,-.2,0),.4)
731
LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.4)
732
RH.C0=clerp(RH.C0,cf(1,-1,0)*euler(0,1.57,0)*euler(0,.5,0),.4)
733
LH.C0=clerp(LH.C0,cf(-1,-1,0)*euler(0,-1.57,0)*euler(0,.5,0),.4)
734
if Stagger.Value==true or Stun.Value>=100 or StaggerHit.Value==true then
735
break
736
end
737
end
738
con1=hitbox.Touched:connect(function(hit) Damagefunc(hit,10,15,math.random(5,10),"Normal",RootPart,.5,1,math.random(3,10),nil,true) end)
739
hitbox.Parent=modelzorz
740
hitbox.Size=vt(.5,7,1)
741
hitbox.CFrame=prt9.CFrame*cf(0,-1,.4)
742
blcf=nil
743
scfr=nil
744
for i=0,1,0.3 do
745
swait()
746
local blcf = prt9.CFrame*cf(0,-1,0)
747
if scfr and (prt9.Position-scfr.p).magnitude > .1 then
748
local h = 7
749
local a,b = Triangle((scfr*CFrame.new(0,h/2,0)).p,(scfr*CFrame.new(0,-h/2,0)).p,(blcf*CFrame.new(0,h/2,0)).p)
750
if a then game.Debris:AddItem(a,1) end if b then game.Debris:AddItem(b,1) end
751
local a,b = Triangle((blcf*CFrame.new(0,h/2,0)).p,(blcf*CFrame.new(0,-h/2,0)).p,(scfr*CFrame.new(0,-h/2,0)).p)
752
if a then game.Debris:AddItem(a,1) end if b then game.Debris:AddItem(b,1) end
753
scfr = blcf
754
elseif not scfr then
755
scfr = blcf
756
end
757
hitbox.CFrame=prt9.CFrame*cf(0,-1,.4)
758
wld1.C0=clerp(wld1.C0,euler(1.2,0,3.14)*cf(0,1,0),.4)
759
--wld1.C0=clerp(wld1.C0,euler(2,0,3.14)*cf(0,1,.2),.4)
760
Neck.C0=clerp(Neck.C0,necko*euler(0,0,-.5)*euler(.2,0,0),.4)
761
RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,.5),.4)
762
RW.C0=clerp(RW.C0,cf(1.2,0.5,-.3)*euler(.2,0,-.2)*euler(0,-.5,0),.4)
763
RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.4)
764
LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(-.4,0,-.2),.4)
765
LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.4)
766
RH.C0=clerp(RH.C0,cf(1,-1,0)*euler(0,1.57,0)*euler(0,-.5,0),.4)
767
LH.C0=clerp(LH.C0,cf(-1,-1,0)*euler(0,-1.57,0)*euler(0,-.5,0),.4)
768
if Stagger.Value==true or Stun.Value>=100 or StaggerHit.Value==true then
769
break
770
end
771
end
772
for i=0,1,0.2 do
773
swait()
774
local blcf = prt9.CFrame*cf(0,-1,0)
775
if scfr and (prt9.Position-scfr.p).magnitude > .1 then
776
local h = 7
777
local a,b = Triangle((scfr*CFrame.new(0,h/2,0)).p,(scfr*CFrame.new(0,-h/2,0)).p,(blcf*CFrame.new(0,h/2,0)).p)
778
if a then game.Debris:AddItem(a,1) end if b then game.Debris:AddItem(b,1) end
779
local a,b = Triangle((blcf*CFrame.new(0,h/2,0)).p,(blcf*CFrame.new(0,-h/2,0)).p,(scfr*CFrame.new(0,-h/2,0)).p)
780
if a then game.Debris:AddItem(a,1) end if b then game.Debris:AddItem(b,1) end
781
scfr = blcf
782
elseif not scfr then
783
scfr = blcf
784
end
785
hitbox.CFrame=prt9.CFrame*cf(0,-1,.4)
786
wld1.C0=clerp(wld1.C0,euler(1.5,0,3.14)*euler(0,0,.3)*cf(0,1,0),.4)
787
--wld1.C0=clerp(wld1.C0,euler(2,0,3.14)*cf(0,1,.2),.4)
788
Neck.C0=clerp(Neck.C0,necko*euler(0,0,-.5)*euler(.2,0,0),.4)
789
RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,.5),.4)
790
RW.C0=clerp(RW.C0,cf(1,0.5,-.5)*euler(.6,0,-1)*euler(0,-.7,0),.4)
791
RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.4)
792
LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(-.4,0,-.2),.4)
793
LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.4)
794
RH.C0=clerp(RH.C0,cf(1,-1,0)*euler(0,1.57,0)*euler(0,-.5,0),.4)
795
LH.C0=clerp(LH.C0,cf(-1,-1,0)*euler(0,-1.57,0)*euler(0,-.5,0),.4)
796
if Stagger.Value==true or Stun.Value>=100 or StaggerHit.Value==true then
797
break
798
end
799
end
800
con1:disconnect()
801
hitbox.Parent=nil
802
attack=false
803
end
804
 
805
function attacktwo()
806
attack=true
807
for i=0,1,0.2 do
808
swait()
809
wld1.C0=clerp(wld1.C0,euler(1.5,0,3.14)*cf(0,1,0),.4)
810
Neck.C0=clerp(Neck.C0,necko*euler(0,0,-.7)*euler(.2,0,0),.4)
811
RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,.7),.4)
812
RW.C0=clerp(RW.C0,cf(1,0.5,-.5)*euler(1.57,0,-1)*euler(0,1.2,0),.4)
813
RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.4)
814
LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(-.8,0,-.4),.4)
815
LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.4)
816
RH.C0=clerp(RH.C0,cf(.8,-1,.2)*euler(0,1.57,0)*euler(0,-.7,0),.4)
817
LH.C0=clerp(LH.C0,cf(-.8,-1,.2)*euler(0,-1.57,0)*euler(0,-.7,0),.4)
818
if Stagger.Value==true or Stun.Value>=100 or StaggerHit.Value==true then
819
break
820
end
821
end
822
con1=hitbox.Touched:connect(function(hit) Damagefunc(hit,10,15,math.random(5,10),"Normal",RootPart,.5,1,math.random(3,10),nil,true) end)
823
hitbox.Parent=modelzorz
824
hitbox.Size=vt(.5,7,1)
825
hitbox.CFrame=prt9.CFrame*cf(0,-1,.4)
826
blcf=nil
827
scfr=nil
828
for i=0,1,0.3 do
829
swait()
830
local blcf = prt9.CFrame*cf(0,-1,0)
831
if scfr and (prt9.Position-scfr.p).magnitude > .1 then
832
local h = 7
833
local a,b = Triangle((scfr*CFrame.new(0,h/2,0)).p,(scfr*CFrame.new(0,-h/2,0)).p,(blcf*CFrame.new(0,h/2,0)).p)
834
if a then game.Debris:AddItem(a,1) end if b then game.Debris:AddItem(b,1) end
835
local a,b = Triangle((blcf*CFrame.new(0,h/2,0)).p,(blcf*CFrame.new(0,-h/2,0)).p,(scfr*CFrame.new(0,-h/2,0)).p)
836
if a then game.Debris:AddItem(a,1) end if b then game.Debris:AddItem(b,1) end
837
scfr = blcf
838
elseif not scfr then
839
scfr = blcf
840
end
841
hitbox.CFrame=prt9.CFrame*cf(0,-1,.4)
842
wld1.C0=clerp(wld1.C0,euler(.5,0,3.14)*cf(0,1,.2),.4)
843
Neck.C0=clerp(Neck.C0,necko*euler(0,0,.5)*euler(0,0,0),.4)
844
RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,-.5),.4)
845
RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(1.3,0,1)*euler(0,1.6,0),.4)
846
RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.4)
847
LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(-.2,0,-.2),.4)
848
LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.4)
849
RH.C0=clerp(RH.C0,cf(1,-1,0)*euler(0,1.57,0)*euler(0,.5,0),.4)
850
LH.C0=clerp(LH.C0,cf(-1,-1,0)*euler(0,-1.57,0)*euler(0,.5,0),.4)
851
if Stagger.Value==true or Stun.Value>=100 or StaggerHit.Value==true then
852
break
853
end
854
end
855
for i=0,1,0.2 do
856
swait()
857
local blcf = prt9.CFrame*cf(0,-1,0)
858
if scfr and (prt9.Position-scfr.p).magnitude > .1 then
859
local h = 7
860
local a,b = Triangle((scfr*CFrame.new(0,h/2,0)).p,(scfr*CFrame.new(0,-h/2,0)).p,(blcf*CFrame.new(0,h/2,0)).p)
861
if a then game.Debris:AddItem(a,1) end if b then game.Debris:AddItem(b,1) end
862
local a,b = Triangle((blcf*CFrame.new(0,h/2,0)).p,(blcf*CFrame.new(0,-h/2,0)).p,(scfr*CFrame.new(0,-h/2,0)).p)
863
if a then game.Debris:AddItem(a,1) end if b then game.Debris:AddItem(b,1) end
864
scfr = blcf
865
elseif not scfr then
866
scfr = blcf
867
end
868
hitbox.CFrame=prt9.CFrame*cf(0,-1,.4)
869
wld1.C0=clerp(wld1.C0,euler(.3,0,3.14)*cf(0,1,.2),.4)
870
Neck.C0=clerp(Neck.C0,necko*euler(0,0,.5)*euler(.1,0,0),.4)
871
RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,-.5),.4)
872
RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(1,0,.8)*euler(0,1.3,0),.4)
873
RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.4)
874
LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(-.2,0,-.2),.4)
875
LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.4)
876
RH.C0=clerp(RH.C0,cf(1,-1,0)*euler(0,1.57,0)*euler(0,.5,0),.4)
877
LH.C0=clerp(LH.C0,cf(-1,-1,0)*euler(0,-1.57,0)*euler(0,.5,0),.4)
878
if Stagger.Value==true or Stun.Value>=100 or StaggerHit.Value==true then
879
break
880
end
881
end
882
con1:disconnect()
883
hitbox.Parent=nil
884
attack=false
885
end
886
 
887
function attackthree()
888
attack=true
889
for i=0,1,0.15 do
890
swait()
891
wld1.C0=clerp(wld1.C0,euler(2.9,0,3.14)*cf(0,1,.2),.4)
892
gwld1.C0=clerp(gwld1.C0,euler(1.57,0,0)*cf(0,1,0),.4)
893
Neck.C0=clerp(Neck.C0,necko*euler(0,0,1.57),.4)
894
RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,-.2)*euler(0,0,-1.57),.4)
895
RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(1.3,0,.5),.4)
896
RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.4)
897
LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(1.57,0,-1.57),.4)
898
LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.4)
899
RH.C0=clerp(RH.C0,cf(.5,-1,-.2)*euler(0,1.57,0)*euler(-.4,1.57,0),.4)
900
LH.C0=clerp(LH.C0,cf(-.5,-1,.2)*euler(0,-1.57,0)*euler(.2,1.57,0),.4)
901
if Stagger.Value==true or Stun.Value>=100 or StaggerHit.Value==true then
902
break
903
end
904
end
905
for i=1,2 do
906
LW.C0=cf(-1.5,0.5,0)*euler(1.57,0,-1.57)
907
Shootcombo()
908
for i=0,1,0.3 do
909
swait()
910
gwld6.C0=clerp(gwld6.C0,euler(0,0,0)*cf(0,.5,-.1),.6)
911
LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(1.57,0,-1.57)*euler(.5,0,0),.5)
912
LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.5)
913
if Stagger.Value==true or Stun.Value>=100 or StaggerHit.Value==true then
914
break
915
end
916
end
917
for i=0,1,0.2 do
918
swait()
919
gwld6.C0=clerp(gwld6.C0,euler(0,0,0)*cf(0,-.25,-.1),.4)
920
LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(1.57,0,-1.57),.4)
921
LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.4)
922
if Stagger.Value==true or Stun.Value>=100 or StaggerHit.Value==true then
923
break
924
end
925
end
926
if Stagger.Value==true or Stun.Value>=100 or StaggerHit.Value==true then
927
break
928
end
929
end
930
attack=false
931
end
932
 
933
function attackfour()
934
attack=true
935
for i=0,1,0.2 do
936
swait()
937
wld1.C0=clerp(wld1.C0,euler(1.57,0,3.14)*cf(0,1,.2),.4)
938
Neck.C0=clerp(Neck.C0,necko*euler(0,0,.2),.4)
939
RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,-.3),.4)
940
RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(1,0,1.2)*euler(0,-2,0),.4)
941
RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.4)
942
LW.C0=clerp(LW.C0,cf(-1.4,0.5,-.2)*euler(.7,0,.1)*euler(0,-.4,0),.4)
943
LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.4)
944
RH.C0=clerp(RH.C0,cf(1,-1,0)*euler(0,1.57,0)*euler(0,.3,0),.4)
945
LH.C0=clerp(LH.C0,cf(-1,-1,0)*euler(0,-1.57,0)*euler(0,.3,0),.4)
946
if Stagger.Value==true or Stun.Value>=100 or StaggerHit.Value==true then
947
break
948
end
949
end
950
con1=hitbox.Touched:connect(function(hit) Damagefunc(hit,15,20,math.random(5,10),"Normal",RootPart,.5,2,math.random(10,20),nil,true) end)
951
hitbox.Parent=modelzorz
952
hitbox.Size=vt(.5,7,1)
953
hitbox.CFrame=prt9.CFrame*cf(0,-1,.4)
954
blcf=nil
955
scfr=nil
956
for i=0,1,0.1 do
957
swait()
958
Torso.Velocity=RootPart.CFrame.lookVector*40
959
local blcf = prt9.CFrame*cf(0,-1,0)
960
if scfr and (prt9.Position-scfr.p).magnitude > .1 then
961
local h = 7
962
local a,b = Triangle((scfr*CFrame.new(0,h/2,0)).p,(scfr*CFrame.new(0,-h/2,0)).p,(blcf*CFrame.new(0,h/2,0)).p)
963
if a then game.Debris:AddItem(a,1) end if b then game.Debris:AddItem(b,1) end
964
local a,b = Triangle((blcf*CFrame.new(0,h/2,0)).p,(blcf*CFrame.new(0,-h/2,0)).p,(scfr*CFrame.new(0,-h/2,0)).p)
965
if a then game.Debris:AddItem(a,1) end if b then game.Debris:AddItem(b,1) end
966
scfr = blcf
967
elseif not scfr then
968
scfr = blcf
969
end
970
hitbox.CFrame=prt9.CFrame*cf(0,-1,.4)
971
wld1.C0=clerp(wld1.C0,euler(.5,0,3.14)*cf(0,1,.2),.35)
972
Neck.C0=clerp(Neck.C0,necko*euler(.2,0,-.6),.35)
973
RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,.6),.35)
974
RW.C0=clerp(RW.C0,cf(1,0.5,-0.5)*euler(1.2,0,-1.2)*euler(0,-1.2,0),.35)
975
RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.35)
976
LW.C0=clerp(LW.C0,cf(-1.4,0.5,-.2)*euler(-.4,0,-.7)*euler(0,0,0),.35)
977
LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.35)
978
RH.C0=clerp(RH.C0,cf(1,-1,0)*euler(0,1.57,0)*euler(0,-.6,0),.35)
979
LH.C0=clerp(LH.C0,cf(-1,-1,0)*euler(0,-1.57,0)*euler(0,-.6,0),.35)
980
if Stagger.Value==true or Stun.Value>=100 or StaggerHit.Value==true then
981
break
982
end
983
end
984
con1:disconnect()
985
hitbox.Parent=nil
986
attack=false
987
end
988
 
989
function Punishment()
990
attack=true
991
local ref=part(3,workspace,0,1,BrickColor.new("Black"),"Effect",vt())
992
ref.Anchored=true
993
ref.CFrame=RootPart.CFrame*cf(0,0,-2)
994
game:GetService("Debris"):AddItem(ref,1)
995
for _,c in pairs(workspace:children()) do
996
local hum=c:findFirstChild("Humanoid")
997
if hum~=nil then
998
local head=c:findFirstChild("HumanoidRootPart")
999
if head~=nil then
1000
if GetDist(head,ref,3)==true then
1001
if head.Parent:findFirstChild("Stats")~=nil then
1002
if head.Parent.Stats.Stunned.Value==true then
1003
Mvmt.Value=Mvmt.Value-1
1004
for i=0,1,0.3 do
1005
swait()
1006
wld1.C0=clerp(wld1.C0,euler(-2,0,3.14)*cf(0,1,.2),.4)
1007
gwld1.C0=clerp(gwld1.C0,euler(1.57,0,0)*cf(0,1,0),.4)
1008
Neck.C0=clerp(Neck.C0,necko*euler(0,0,-1.57)*euler(.2,0,0),.4)
1009
RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,1.57),.4)
1010
RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(1.57,0,1.57)*euler(2,0,0),.4)
1011
RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.4)
1012
LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(-.2,0,-.4),.4)
1013
LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.4)
1014
RH.C0=clerp(RH.C0,cf(.5,-1,.2)*euler(0,1.57,0)*euler(0,-1.57,0),.4)
1015
LH.C0=clerp(LH.C0,cf(-.5,-1,-.2)*euler(0,-1.57,0)*euler(0,-1.57,0),.4)
1016
end
1017
for i=0,1,0.18 do
1018
swait()
1019
wld1.C0=clerp(wld1.C0,euler(-1.57,0,3.14)*cf(0,1,.2),.4)
1020
gwld1.C0=clerp(gwld1.C0,euler(1.57,0,0)*cf(0,1,0),.4)
1021
Neck.C0=clerp(Neck.C0,necko*euler(0,0,-1.57)*euler(.2,0,0),.4)
1022
RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,1.57),.4)
1023
RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(1.57,0,1.57),.4)
1024
RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.4)
1025
LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(-.2,0,-.4),.4)
1026
LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.4)
1027
RH.C0=clerp(RH.C0,cf(.5,-1,.2)*euler(0,1.57,0)*euler(0,-1.57,0),.4)
1028
LH.C0=clerp(LH.C0,cf(-.5,-1,-.2)*euler(0,-1.57,0)*euler(0,-1.57,0),.4)
1029
end
1030
DecreaseStat(head.Parent,"Defense",.3,300)
1031
Damagefunc(head,10,20,math.random(5,10),"Normal",RootPart,.2,2,0,nil,nil,false)
1032
for i=0,1,0.05 do
1033
swait()
1034
MagicBlock(BrickColor.new("Really red"),cf(head.Parent.Torso.Position),1,1,1,2,2,2,.1,1)
1035
wld1.C0=clerp(wld1.C0,euler(-1.17,0,3.14)*cf(0,1,.2),.2)
1036
RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,1.57),.2)
1037
RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(1.57,0,1.57)*euler(-.4,0,0),.2)
1038
LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(-.2,0,-.4),.4)
1039
RH.C0=clerp(RH.C0,cf(.5,-1,.2)*euler(0,1.57,0)*euler(0,-1.57,0),.4)
1040
LH.C0=clerp(LH.C0,cf(-.5,-1,-.2)*euler(0,-1.57,0)*euler(0,-1.57,0),.4)
1041
end
1042
Neck.C0=necko*euler(0,0,-1.57)*euler(.2,0,0)
1043
swait(10)
1044
Mvmt.Value=Mvmt.Value+1
1045
end
1046
end
1047
end
1048
end
1049
end
1050
end
1051
attack=false
1052
end
1053
 
1054
function GunStance()
1055
attack=true
1056
gun=true
1057
Mvmt.Value=Mvmt.Value-.4
1058
for i=0,1,0.1 do
1059
swait()
1060
wld1.C0=clerp(wld1.C0,euler(2.9,0,3.14)*cf(0,1,.2),.2)
1061
gwld6.C0=clerp(gwld6.C0,euler(0,0,0)*cf(0,-.25,-.1),.4)
1062
--gwld1.C0=clerp(gwld1.C0,euler(1.57,0,0)*cf(0,1,0),.4)
1063
gwld1.C0=euler(1.57-8*i,0,0)*cf(0,1,0)
1064
Neck.C0=clerp(Neck.C0,necko*euler(0,0,1.57)*euler(-.4,0,0),.2)
1065
RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,-.2)*euler(0,0,-1.57),.2)
1066
RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(1.3,0,1),.2)
1067
RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.2)
1068
LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(1.57,0,-1.57)*euler(1,0,0),.2)
1069
LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.2)
1070
RH.C0=clerp(RH.C0,cf(.5,-1,-.2)*euler(0,1.57,0)*euler(-.4,1.57,0),.2)
1071
LH.C0=clerp(LH.C0,cf(-.5,-1,.2)*euler(0,-1.57,0)*euler(.2,1.57,0),.2)
1072
end
1073
RootJoint.C0=RootCF*cf(0,0,-.2)*euler(0,0,-1.57)
1074
LW.C0=cf(-1.5,0.5,0)*euler(1.57,0,-1.57)
1075
gairo=Instance.new("BodyGyro")
1076
gairo.Parent=RootPart
1077
gairo.maxTorque=Vector3.new(4e+005,4e+005,4e+005)*math.huge
1078
gairo.P=20e+003
1079
gairo.cframe=RootPart.CFrame
1080
local offset=nil
1081
while gun==true do
1082
swait()
1083
local gunpos=vt(MMouse.Hit.p.x,Head.Position.Y,MMouse.Hit.p.z)
1084
offset=(Torso.Position.y-MMouse.Hit.p.y)/60
1085
mag=(Torso.Position-MMouse.Hit.p).magnitude/80
1086
offset=offset/mag
1087
gairo.cframe=cf(Head.Position,gunpos)
1088
gwld1.C0=clerp(gwld1.C0,euler(1.57,0,0)*cf(0,1,0),.3)
1089
Neck.C0=clerp(Neck.C0,necko*euler(0,0,1.57),.3)
1090
LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(offset,0,0),.2)
1091
end
1092
Mvmt.Value=Mvmt.Value+.4
1093
if shoot==true then
1094
for i=0,1,0.1 do
1095
swait()
1096
gwld6.C0=clerp(gwld6.C0,euler(0,0,0)*cf(0,.5,-.1),.6)
1097
gwld1.C0=clerp(gwld1.C0,euler(1.57,0,0)*cf(0,1,0),.2)
1098
Neck.C0=clerp(Neck.C0,necko*euler(0,0,1.57)*euler(0,0,0),.2)
1099
LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(1.57,0,-1.57)*euler(1,0,0),.2)
1100
LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.2)
1101
end
1102
end
1103
gairo.Parent=nil
1104
shoot=false
1105
attack=false
1106
end
1107
 
1108
function Shootcombo()
1109
table.insert(Effects,{gprt16.CFrame.lookVector,"Shoot",30,gprt8.Position,5,10,0,1})
1110
end
1111
 
1112
function Shoot1()
1113
table.insert(Effects,{gprt16.CFrame.lookVector,"Shoot",100,gprt8.Position,10,20,math.random(10,20),2})
1114
end
1115
 
1116
function DecreaseStat(Model,Stat,Amount,Duration)
1117
if Model:findFirstChild("Stats")~=nil then
1118
if Model.Stats[Stat]~=nil then
1119
Model.Stats[Stat].Value=Model.Stats[Stat].Value-Amount
1120
table.insert(Effects,{Model,"DecreaseStat",Stat,Amount,Duration})
1121
end
1122
end
1123
end
1124
 
1125
function GetDist(Part1,Part2,magni)
1126
local targ=Part1.Position-Part2.Position
1127
local mag=targ.magnitude
1128
if mag<=magni then
1129
return true
1130
else
1131
return false
1132
end
1133
end
1134
 
1135
function MagniDamage(Part,magni,mindam,maxdam,knock,Type)
1136
for _,c in pairs(workspace:children()) do
1137
local hum=c:findFirstChild("Humanoid")
1138
if hum~=nil then
1139
local head=c:findFirstChild("Torso")
1140
if head~=nil then
1141
local targ=head.Position-Part.Position
1142
local mag=targ.magnitude
1143
if mag<=magni and c.Name~=Player.Name then
1144
Damagefunc(head,mindam,maxdam,knock,Type,RootPart,.2,1,3)
1145
end
1146
end
1147
end
1148
end
1149
end
1150
 
1151
function rayCast(Pos, Dir, Max, Ignore)  -- Origin Position , Direction, MaxDistance , IgnoreDescendants
1152
return game:service("Workspace"):FindPartOnRay(Ray.new(Pos, Dir.unit * (Max or 999.999)), Ignore)
1153
end
1154
 
1155
local Point=Torso.CFrame*cf(0,Torso.Size.Y,0)
1156
LastPoint=Point
1157
function effect(Color,Ref,LP,P1,returnn)
1158
if LP==nil or P1==nil then return end
1159
local effectsmsh=Instance.new("CylinderMesh")
1160
effectsmsh.Scale=Vector3.new(0.2,1,0.2)
1161
effectsmsh.Name="Mesh"
1162
local effectsg=Instance.new("Part")
1163
NoOutline(effectsg)
1164
effectsg.formFactor=3
1165
effectsg.CanCollide=false
1166
effectsg.Name="Eff"
1167
effectsg.Locked=true
1168
effectsg.Anchored=true
1169
effectsg.Size=Vector3.new(0.5,1,0.5)
1170
effectsg.Parent=workspace
1171
effectsmsh.Parent=effectsg
1172
effectsg.BrickColor=BrickColor.new(Color)
1173
effectsg.Reflectance=Ref
1174
local point1=P1
1175
local mg=(LP.p - point1.p).magnitude
1176
effectsg.Size=Vector3.new(0.5,mg,0.5)
1177
effectsg.CFrame=cf((LP.p+point1.p)/2,point1.p) * CFrame.Angles(math.rad(90),0,0)
1178
effectsmsh.Scale=Vector3.new(0.2,1,0.2)
1179
game:GetService("Debris"):AddItem(effectsg,2)
1180
if returnn then return effectsg end
1181
if not returnn then
1182
table.insert(Effects,{effectsg,"Cylinder",0.2,0.01,0,0.01,effectsmsh})
1183
end
1184
end
1185
 
1186
local function CFrameFromTopBack(at, top, back)
1187
local right = top:Cross(back)
1188
return CFrame.new(at.x, at.y, at.z,
1189
right.x, top.x, back.x,
1190
right.y, top.y, back.y,
1191
right.z, top.z, back.z)
1192
end
1193
 
1194
function Triangle(a, b, c)
1195
local edg1 = (c-a):Dot((b-a).unit)
1196
local edg2 = (a-b):Dot((c-b).unit)
1197
local edg3 = (b-c):Dot((a-c).unit)
1198
if edg1 <= (b-a).magnitude and edg1 >= 0 then
1199
a, b, c = a, b, c
1200
elseif edg2 <= (c-b).magnitude and edg2 >= 0 then
1201
a, b, c = b, c, a
1202
elseif edg3 <= (a-c).magnitude and edg3 >= 0 then
1203
a, b, c = c, a, b
1204
else
1205
assert(false, "unreachable")
1206
end
1207
 
1208
local len1 = (c-a):Dot((b-a).unit)
1209
local len2 = (b-a).magnitude - len1
1210
local width = (a + (b-a).unit*len1 - c).magnitude
1211
 
1212
local maincf = CFrameFromTopBack(a, (b-a):Cross(c-b).unit, -(b-a).unit)
1213
 
1214
local list = {}
1215
 
1216
if len1 > 0.01 then
1217
local w1 = Instance.new('WedgePart', m)
1218
game:GetService("Debris"):AddItem(w1,5)
1219
w1.Material = "SmoothPlastic"
1220
w1.FormFactor = 'Custom'
1221
w1.BrickColor = BrickColor.new("Bright red")
1222
w1.Transparency = 0
1223
w1.Reflectance = 0
1224
w1.Material = "SmoothPlastic"
1225
w1.CanCollide = false
1226
NoOutline(w1)
1227
local sz = Vector3.new(0.2, width, len1)
1228
w1.Size = sz
1229
local sp = Instance.new("SpecialMesh",w1)
1230
sp.MeshType = "Wedge"
1231
sp.Scale = Vector3.new(0,1,1) * sz/w1.Size
1232
w1:BreakJoints()
1233
w1.Anchored = true
1234
w1.Parent = workspace
1235
w1.Transparency = 0.7
1236
table.insert(Effects,{w1,"Disappear",.05})
1237
w1.CFrame = maincf*CFrame.Angles(math.pi,0,math.pi/2)*CFrame.new(0,width/2,len1/2)
1238
table.insert(list,w1)
1239
end
1240
 
1241
if len2 > 0.01 then
1242
local w2 = Instance.new('WedgePart', m)
1243
game:GetService("Debris"):AddItem(w2,5)
1244
w2.Material = "SmoothPlastic"
1245
w2.FormFactor = 'Custom'
1246
w2.BrickColor = BrickColor.new("Bright red")
1247
w2.Transparency = 0
1248
w2.Reflectance = 0
1249
w2.Material = "SmoothPlastic"
1250
w2.CanCollide = false
1251
NoOutline(w2)
1252
local sz = Vector3.new(0.2, width, len2)
1253
w2.Size = sz
1254
local sp = Instance.new("SpecialMesh",w2)
1255
sp.MeshType = "Wedge"
1256
sp.Scale = Vector3.new(0,1,1) * sz/w2.Size
1257
w2:BreakJoints()
1258
w2.Anchored = true
1259
w2.Parent = workspace
1260
w2.Transparency = 0.7
1261
table.insert(Effects,{w2,"Disappear",.05})
1262
w2.CFrame = maincf*CFrame.Angles(math.pi,math.pi,-math.pi/2)*CFrame.new(0,width/2,-len1 - len2/2)
1263
table.insert(list,w2)
1264
end
1265
return unpack(list)
1266
end
1267
 
1268
function MagicBlock(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay,Type,parent)
1269
local prt=part(3,workspace,0,0,brickcolor,"Effect",vt())
1270
prt.Anchored=true
1271
prt.CFrame=cframe
1272
msh=mesh("BlockMesh",prt,"","",vt(0,0,0),vt(x1,y1,z1))
1273
game:GetService("Debris"):AddItem(prt,5)
1274
if Type==1 or Type==nil then
1275
table.insert(Effects,{prt,"Block1",delay,x3,y3,z3,msh})
1276
elseif Type==2 then
1277
table.insert(Effects,{prt,"Block2",delay,x3,y3,z3,msh})
1278
end
1279
end
1280
 
1281
function MagicCircle(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay)
1282
local prt=part(3,workspace,0,0,brickcolor,"Effect",vt())
1283
prt.Anchored=true
1284
prt.CFrame=cframe
1285
local msh=mesh("SpecialMesh",prt,"Sphere","nil",vt(0,0,0),vt(x1,y1,z1))
1286
game:GetService("Debris"):AddItem(prt,2)
1287
table.insert(Effects,{prt,"Cylinder",delay,x3,y3,z3,msh})
1288
end
1289
 
1290
function MagicCylinder(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay)
1291
local prt=part(3,workspace,0,0,brickcolor,"Effect",vt())
1292
prt.Anchored=true
1293
prt.CFrame=cframe
1294
local msh=mesh("CylinderMesh",prt,"","",vt(0,0,0),vt(x1,y1,z1))
1295
game:GetService("Debris"):AddItem(prt,2)
1296
table.insert(Effects,{prt,"Cylinder",delay,x3,y3,z3,msh})
1297
end
1298
 
1299
function MagicHead(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay)
1300
local prt=part(3,workspace,0,0,brickcolor,"Effect",vt())
1301
prt.Anchored=true
1302
prt.CFrame=cframe
1303
local msh=mesh("SpecialMesh",prt,"Head","nil",vt(0,0,0),vt(x1,y1,z1))
1304
game:GetService("Debris"):AddItem(prt,2)
1305
table.insert(Effects,{prt,"Cylinder",delay,x3,y3,z3,msh})
1306
end
1307
 
1308
function ClangEffect(brickcolor,cframe,duration,decrease,size,power)
1309
local prt=part(3,workspace,0,1,brickcolor,"Effect",vt())
1310
prt.Anchored=true
1311
prt.CFrame=cframe
1312
local msh=mesh("BlockMesh",prt,"","",vt(0,0,0),vt(5,5,5))
1313
game:GetService("Debris"):AddItem(prt,2)
1314
table.insert(Effects,{prt,"CylinderClang",duration,decrease,size,power,prt.CFrame,nil})
1315
end
1316
 
1317
function MagicWave(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay)
1318
local prt=part(3,workspace,0,0,brickcolor,"Effect",vt())
1319
prt.Anchored=true
1320
prt.CFrame=cframe
1321
local msh=mesh("SpecialMesh",prt,"FileMesh","http://www.roblox.com/asset/?id=20329976",vt(0,0,0),vt(x1,y1,z1))
1322
game:GetService("Debris"):AddItem(prt,5)
1323
table.insert(Effects,{prt,"Cylinder",delay,x3,y3,z3,msh})
1324
end
1325
 
1326
Damagefunc=function(hit,minim,maxim,knockback,Type,Property,Delay,KnockbackType,incstun,stagger,staghit,ranged)
1327
if hit.Parent==nil then
1328
return
1329
end
1330
if hit.Name=="Hitbox" and hit.Parent~=modelzorz then
1331
StaggerHit.Value=true
1332
end
1333
h=hit.Parent:FindFirstChild("Humanoid")
1334
for _,v in pairs(hit.Parent:children()) do
1335
if v:IsA("Humanoid") then
1336
h=v
1337
end
1338
end
1339
if hit.Parent.Parent:FindFirstChild("Torso")~=nil then
1340
h=hit.Parent.Parent:FindFirstChild("Humanoid")
1341
end
1342
if hit.Parent.className=="Hat" then
1343
hit=hit.Parent.Parent:findFirstChild("Head")
1344
end
1345
if h~=nil and hit.Parent.Name~=Character.Name and hit.Parent:FindFirstChild("Torso")~=nil then
1346
if hit.Parent:findFirstChild("DebounceHit")~=nil then if hit.Parent.DebounceHit.Value==true then return end end
1347
c=Instance.new("ObjectValue")
1348
c.Name="creator"
1349
c.Value=game:service("Players").LocalPlayer
1350
c.Parent=h
1351
RecentEnemy.Value=hit.Parent
1352
game:GetService("Debris"):AddItem(c,.5)
1353
minim=minim*Atk.Value
1354
maxim=maxim*Atk.Value
1355
Damage=math.random(minim,maxim)
1356
blocked=false
1357
enblock=nil
1358
Stats=hit.Parent:findFirstChild("Stats")
1359
if Stats~=nil then
1360
enblock=Stats:findFirstChild("Block")
1361
if Stats:findFirstChild("Defense")~=nil then
1362
Damage=Damage/Stats.Defense.Value
1363
if Damage<=3 and staghit==true then
1364
if ranged~=true then
1365
StaggerHit.Value=true
1366
end
1367
end
1368
end
1369
if Stats:findFirstChild("Stun")~=nil then
1370
Stats.Stun.Value=Stats.Stun.Value+incstun
1371
end
1372
if Stats:findFirstChild("Stagger")~=nil then
1373
if stagger==true then
1374
Stats.Stagger.Value=true
1375
end
1376
end
1377
end
1378
if enblock~=nil then
1379
if enblock.Value==true then
1380
blocked=true
1381
end
1382
end
1383
if blocked==true then
1384
showDamage(hit.Parent,"Block",.5,BrickColor.new("Bright blue"))
1385
if ranged~=true then
1386
enblock.Value=false
1387
Stagger.Value=true
1388
end
1389
else
1390
Damage=math.floor(Damage)
1391
h.Health=h.Health-Damage
1392
showDamage(hit.Parent,Damage,.5,BrickColor:Red())
1393
if Type=="NormalDecreaseMvmt1" then
1394
DecreaseStat(hit.Parent,"Movement",.1,200)
1395
end
1396
if Type=="Knockdown" then
1397
hum=hit.Parent.Humanoid
1398
hum.PlatformStand=true
1399
coroutine.resume(coroutine.create(function(HHumanoid)
1400
swait(1)
1401
HHumanoid.PlatformStand=false
1402
end),hum)
1403
local angle=(hit.Position-(Property.Position+Vector3.new(0,0,0))).unit
1404
--hit.CFrame=cf(hit.Position,Vector3.new(angle.x,hit.Position.y,angle.z))*CFrame.fromEulerAnglesXYZ(math.pi/4,0,0)
1405
local bodvol=Instance.new("BodyVelocity")
1406
bodvol.velocity=angle*knockback
1407
bodvol.P=5000
1408
bodvol.maxForce=Vector3.new(8e+003, 8e+003, 8e+003)
1409
bodvol.Parent=hit
1410
rl=Instance.new("BodyAngularVelocity")
1411
rl.P=3000
1412
rl.maxTorque=Vector3.new(500000,500000,500000)*50000000000000
1413
rl.angularvelocity=Vector3.new(math.random(-10,10),math.random(-10,10),math.random(-10,10))
1414
rl.Parent=hit
1415
game:GetService("Debris"):AddItem(bodvol,.5)
1416
game:GetService("Debris"):AddItem(rl,.5)
1417
elseif Type=="Knockdown2" then
1418
hum=hit.Parent.Humanoid
1419
local angle=(hit.Position-(Property.Position+Vector3.new(0,0,0))).unit
1420
local bodvol=Instance.new("BodyVelocity")
1421
bodvol.velocity=angle*knockback
1422
bodvol.P=5000
1423
bodvol.maxForce=Vector3.new(8e+003, 8e+003, 8e+003)
1424
bodvol.Parent=hit
1425
game:GetService("Debris"):AddItem(bodvol,.5)
1426
elseif Type=="Normal" or Type=="NormalDecreaseMvmt1" then
1427
vp=Instance.new("BodyVelocity")
1428
vp.P=500
1429
vp.maxForce=Vector3.new(math.huge,0,math.huge)
1430
if KnockbackType==1 then
1431
vp.velocity=Property.CFrame.lookVector*knockback+Property.Velocity/1.05
1432
elseif KnockbackType==2 then
1433
vp.velocity=Property.CFrame.lookVector*knockback
1434
end
1435
game:GetService("Debris"):AddItem(vp,.5)
1436
if knockback>0 then
1437
vp.Parent=hit.Parent.Torso
1438
end
1439
end
1440
end
1441
debounce=Instance.new("BoolValue")
1442
debounce.Name="DebounceHit"
1443
debounce.Parent=hit.Parent
1444
debounce.Value=true
1445
game:GetService("Debris"):AddItem(debounce,Delay)
1446
c=Instance.new("ObjectValue")
1447
c.Name="creator"
1448
c.Value=Player
1449
c.Parent=h
1450
game:GetService("Debris"):AddItem(c,.5)
1451
CRIT=false
1452
end
1453
end
1454
 
1455
showDamage=function(Char,Dealt,du,Color)
1456
        m=Instance.new("Model")
1457
        m.Name=tostring(Dealt)
1458
        h=Instance.new("Humanoid")
1459
        h.Health=0
1460
        h.MaxHealth=0
1461
        h.Parent=m
1462
        c=Instance.new("Part")
1463
        c.Transparency=0
1464
        c.BrickColor=Color
1465
        c.Name="Head"
1466
        c.TopSurface=0
1467
        c.BottomSurface=0
1468
        c.formFactor="Plate"
1469
        c.Size=Vector3.new(1,.4,1)
1470
        ms=Instance.new("CylinderMesh")
1471
        ms.Scale=Vector3.new(.8,.8,.8)
1472
        if CRIT==true then
1473
                ms.Scale=Vector3.new(1,1.25,1)
1474
        end
1475
        ms.Parent=c
1476
        c.Reflectance=0
1477
        Instance.new("BodyGyro").Parent=c
1478
        c.Parent=m
1479
        if Char:findFirstChild("Head")~=nil then
1480
        c.CFrame=cf(Char["Head"].CFrame.p+Vector3.new(0,1.5,0))
1481
        elseif Char.Parent:findFirstChild("Head")~=nil then
1482
        c.CFrame=cf(Char.Parent["Head"].CFrame.p+Vector3.new(0,1.5,0))
1483
        end
1484
        f=Instance.new("BodyPosition")
1485
        f.P=2000
1486
        f.D=100
1487
        f.maxForce=Vector3.new(math.huge,math.huge,math.huge)
1488
        f.position=c.Position+Vector3.new(0,3,0)
1489
        f.Parent=c
1490
        game:GetService("Debris"):AddItem(m,.5+du)
1491
        c.CanCollide=false
1492
        m.Parent=workspace
1493
        c.CanCollide=false
1494
end
1495
 
1496
combo=0
1497
function ob1d(mouse)
1498
if gun==true and mana>=10 then
1499
mana=mana-10
1500
shoot=true
1501
Shoot1()
1502
gun=false
1503
end
1504
if attack==true or equipped==false then return end
1505
hold=true
1506
if combo==0 then
1507
combo=1
1508
attackone()
1509
elseif combo==1 then
1510
combo=2
1511
attacktwo()
1512
elseif combo==2 then
1513
combo=3
1514
attackthree()
1515
elseif combo==3 then
1516
combo=0
1517
attackfour()
1518
end
1519
coroutine.resume(coroutine.create(function()
1520
for i=1,50 do
1521
if attack==false then
1522
swait()
1523
end
1524
end
1525
if attack==false then
1526
combo=0
1527
end
1528
end))
1529
end
1530
 
1531
function ob1u(mouse)
1532
hold = false
1533
end
1534
 
1535
buttonhold = false
1536
 
1537
eul=0
1538
equipped=false
1539
function key(key)
1540
if key=="g" then
1541
if gun==true then
1542
gun=false
1543
end
1544
end
1545
if attack==true then return end
1546
if key=="f" then
1547
attack=true
1548
if equipped==false then
1549
equipped=true
1550
RSH=ch.Torso["Right Shoulder"]
1551
LSH=ch.Torso["Left Shoulder"]
1552
--
1553
RSH.Parent=nil
1554
LSH.Parent=nil
1555
--
1556
RW.Name="Right Shoulder"
1557
RW.Part0=ch.Torso
1558
RW.C0=cf(1.5, 0.5, 0) --* CFrame.fromEulerAnglesXYZ(1.3, 0, -0.5)
1559
RW.C1=cf(0, 0.5, 0)
1560
RW.Part1=ch["Right Arm"]
1561
RW.Parent=ch.Torso
1562
--
1563
LW.Name="Left Shoulder"
1564
LW.Part0=ch.Torso
1565
LW.C0=cf(-1.5, 0.5, 0) --* CFrame.fromEulerAnglesXYZ(1.7, 0, 0.8)
1566
LW.C1=cf(0, 0.5, 0)
1567
LW.Part1=ch["Left Arm"]
1568
LW.Parent=ch.Torso
1569
--
1570
equipanim()
1571
else
1572
equipped=false
1573
hideanim()
1574
swait(0)
1575
RW.Parent=nil
1576
LW.Parent=nil
1577
RSH.Parent=player.Character.Torso
1578
LSH.Parent=player.Character.Torso
1579
end
1580
attack=false
1581
end
1582
if equipped==false then return end
1583
if key=="g" then
1584
if gun==false then
1585
GunStance()
1586
end
1587
end
1588
if key=="q" then
1589
Punishment()
1590
end
1591
if key=="h" then
1592
mana=100
1593
end
1594
if key=="j" then
1595
test()
1596
end
1597
if attack==false then
1598
RecentEnemy.Value=nil
1599
end
1600
end
1601
 
1602
function key2(key)
1603
 
1604
 
1605
end
1606
 
1607
function s(mouse)
1608
mouse.Button1Down:connect(function() ob1d(mouse) end)
1609
mouse.Button1Up:connect(function() ob1u(mouse) end)
1610
mouse.KeyDown:connect(key)
1611
mouse.KeyUp:connect(key2)
1612
 
1613
player=Player
1614
ch=Character
1615
MMouse=mouse
1616
end
1617
 
1618
function ds(mouse)
1619
end
1620
 
1621
Bin.Selected:connect(s)
1622
Bin.Deselected:connect(ds)
1623
print("Vulca loaded.")
1624
 
1625
local mananum=0
1626
local donum=0
1627
local stunnum=0
1628
local staggeranim=false
1629
local stunanim=false
1630
local Point=nil
1631
local LastPoint=nil
1632
while true do
1633
hitbox2.Parent=hitbox.Parent
1634
hitbox2.Size=hitbox.Size
1635
hitbox2.CFrame=hitbox.CFrame
1636
game:service'RunService'.RenderStepped:wait(0)
1637
if Stagger.Value==true and staggeranim==false then
1638
coroutine.resume(coroutine.create(function()
1639
staggeranim=true
1640
while attack==true do
1641
swait()
1642
end
1643
StaggerAnim()
1644
StaggerHit.Value=false
1645
Stagger.Value=false
1646
staggeranim=false
1647
end))
1648
end
1649
if StaggerHit.Value==true and staggeranim==false then
1650
coroutine.resume(coroutine.create(function()
1651
staggeranim=true
1652
while attack==true do
1653
swait()
1654
end
1655
StaggerHitt()
1656
StaggerHit.Value=false
1657
Stagger.Value=false
1658
staggeranim=false
1659
end))
1660
end
1661
if Mvmt.Value<0 or Stagger.Value==true or Stun.Value>=100 or StaggerHit.Value==true then
1662
Humanoid.WalkSpeed=0
1663
else
1664
Humanoid.WalkSpeed=16*Mvmt.Value
1665
end
1666
if Stun.Value>=100 and stunanim==false then
1667
coroutine.resume(coroutine.create(function()
1668
stunanim=true
1669
while attack==true do
1670
swait()
1671
end
1672
StunAnim()
1673
Stun.Value=0
1674
stunanim=false
1675
end))
1676
end
1677
if stunnum>=10 then
1678
if Stun.Value>0 then
1679
Stun.Value=Stun.Value-1
1680
end
1681
stunnum=0
1682
end
1683
stunnum=stunnum+1
1684
if donum>=.5 then
1685
handidle=true
1686
elseif donum<=0 then
1687
handidle=false
1688
end
1689
if handidle==false then
1690
donum=donum+0.003
1691
else
1692
donum=donum-0.003
1693
end
1694
local torvel=(RootPart.Velocity*Vector3.new(1,0,1)).magnitude
1695
local velderp=RootPart.Velocity.y
1696
hitfloor,posfloor=rayCast(RootPart.Position,(CFrame.new(RootPart.Position,RootPart.Position - Vector3.new(0,1,0))).lookVector,4,Character)
1697
if equipped==true then
1698
if attack==false then
1699
idle=idle+1
1700
else
1701
idle=0
1702
end
1703
if idle>=500 then
1704
if attack==false then
1705
--Sheath()
1706
end
1707
end
1708
if RootPart.Velocity.y > 1 and hitfloor==nil then
1709
Anim="Jump"
1710
if attack==false then
1711
wld1.C0=clerp(wld1.C0,euler(2.9,0,3.14)*cf(0,1,.2),.2)
1712
Neck.C0=clerp(Neck.C0,necko*euler(-0.2,0,0),.2)
1713
Neck.C1=clerp(Neck.C1,necko2*euler(0,0,0),.2)
1714
RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,0),.2)
1715
RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(1,0,0.5),.2)
1716
RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.2)
1717
LW.C0=clerp(LW.C0,cf(-1.2,0.5,-.4)*euler(1,0,.8)*euler(0,-.7,0),.2)
1718
LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.2)
1719
RH.C0=clerp(RH.C0,cf(1,-1,-.3)*euler(-0.5,1.57,0)*euler(-.2,0,0),.2)
1720
LH.C0=clerp(LH.C0,cf(-1,-1,-.3)*euler(-0.5,-1.57,0)*euler(-.2,0,0),.2)
1721
end
1722
elseif RootPart.Velocity.y < -1 and hitfloor==nil then
1723
Anim="Fall"
1724
if attack==false then
1725
wld1.C0=clerp(wld1.C0,euler(2.9,0,3.14)*cf(0,1,.2),.2)
1726
Neck.C0=clerp(Neck.C0,necko*euler(0.4,0,0),.2)
1727
Neck.C1=clerp(Neck.C1,necko2*euler(0,0,0),.2)
1728
RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,0),.2)
1729
RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(2,0,1),.2)
1730
RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.2)
1731
LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(-0.3,0,-0.2),.2)
1732
LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.2)
1733
RH.C0=clerp(RH.C0,cf(1,-1,0)*euler(0.4,1.57,0),.2)
1734
LH.C0=clerp(LH.C0,cf(-1,-1,0)*euler(-0.2,-1.57,0),.2)
1735
end
1736
elseif torvel<1 and hitfloor~=nil then
1737
Anim="Idle"
1738
if attack==false then
1739
--wld1.C0=clerp(wld1.C0,euler(1.57,0,3.14)*cf(0,1,0),.15)
1740
wld1.C0=clerp(wld1.C0,euler(2.9+(donum/3),0,3.14)*cf(0,1,.2),.15)
1741
gwld6.C0=clerp(gwld6.C0,euler(0,0,0)*cf(0,-.25,-.1),.15)
1742
gwld1.C0=clerp(gwld1.C0,euler(1.57,0,0)*cf(0,1,0),.15)
1743
Neck.C0=clerp(Neck.C0,necko*euler(.2-(donum/5),0,0),.15)
1744
RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,0),.15)
1745
RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(1.3+(donum/3),0,.5-(donum/3)),.15)
1746
RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.15)
1747
LW.C0=clerp(LW.C0,cf(-1.2,0.5,-.4)*euler(.7+(donum/3),0,.4+(donum/3))*euler(0,-.4,0),.15)
1748
LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.15)
1749
RH.C0=clerp(RH.C0,RHC0,.2)
1750
RH.C1=clerp(RH.C1,RHC1,.2)
1751
LH.C0=clerp(LH.C0,LHC0,.2)
1752
LH.C1=clerp(LH.C1,LHC1,.2)
1753
end
1754
elseif torvel>2 and torvel<22 and hitfloor~=nil then
1755
Anim="Walk"
1756
if attack==false then
1757
gwld6.C0=clerp(gwld6.C0,euler(0,0,0)*cf(0,-.25,-.1),.2)
1758
wld1.C0=clerp(wld1.C0,euler(2.9+(donum/3),0,3.14)*euler(0,.5,0)*cf(0,1,.2),.2)
1759
Neck.C0=clerp(Neck.C0,necko*euler(0,0,.5),.2)
1760
RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0.1,0,-.5),.2)
1761
RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(1-(donum/3),0,.8-(donum/3)),.2)
1762
RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.2)
1763
LW.C0=clerp(LW.C0,cf(-1.2,0.5,-.4)*euler(.5+(donum/3),0,.8+(donum/3))*euler(0,-.7,0),.2)
1764
LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.2)
1765
RH.C0=clerp(RH.C0,cf(1,-1,0)*euler(0,1.57,0)*euler(0,.6,0),.2)
1766
LH.C0=clerp(LH.C0,cf(-1,-1,0)*euler(0,-1.57,0)*euler(0,.5,0),.2)
1767
end
1768
elseif torvel>=22 and hitfloor~=nil then
1769
Anim="Run"
1770
if attack==false then
1771
gwld6.C0=clerp(gwld6.C0,euler(0,0,0)*cf(0,-.25,-.1),.2)
1772
wld1.C0=clerp(wld1.C0,euler(2.9+(donum/3),0,3.14)*cf(0,1,.2),.2)
1773
Neck.C0=clerp(Neck.C0,necko*euler(0,0,.5),.2)
1774
RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0.1,0,-.5),.2)
1775
RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(1-(donum/3),0,.8-(donum/3)),.2)
1776
RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.2)
1777
LW.C0=clerp(LW.C0,cf(-1.2,0.5,-.4)*euler(.5+(donum/3),0,.8+(donum/3))*euler(0,-.7,0),.2)
1778
LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.2)
1779
RH.C0=clerp(RH.C0,cf(1,-1,0)*euler(0,1.57,0)*euler(0,.6,0),.2)
1780
LH.C0=clerp(LH.C0,cf(-1,-1,0)*euler(0,-1.57,0)*euler(0,.5,0),.2)
1781
end
1782
end
1783
end
1784
if #Effects>0 then
1785
--table.insert(Effects,{prt,"Block1",delay})
1786
for e=1,#Effects do
1787
if Effects[e]~=nil then
1788
--for j=1,#Effects[e] do
1789
local Thing=Effects[e]
1790
if Thing~=nil then
1791
local Part=Thing[1]
1792
local Mode=Thing[2]
1793
local Delay=Thing[3]
1794
local IncX=Thing[4]
1795
local IncY=Thing[5]
1796
local IncZ=Thing[6]
1797
if Thing[2]=="DecreaseStat" then
1798
Thing[5]=Thing[5]-1
1799
if Thing[5]<=0 then
1800
if Thing[1]:findFirstChild("Stats")~=nil then
1801
Thing[1].Stats[Thing[3]].Value=Thing[1].Stats[Thing[3]].Value+Thing[4]
1802
end
1803
table.remove(Effects,e)
1804
end
1805
end
1806
if Thing[2]=="Shoot" then
1807
local Look=Thing[1]
1808
local hit,pos = rayCast(Thing[4],Look,20,modelzorz)
1809
local mag=(Thing[4]-pos).magnitude
1810
MagicHead(BrickColor.new("Really red"),CFrame.new((Thing[4]+pos)/2,pos)*angles(1.57,0,0),1,mag*5,1,.5,0,.5,0.1)
1811
Thing[4]=Thing[4]+(Look*20)
1812
Thing[3]=Thing[3]-1
1813
if hit~=nil then
1814
Thing[3]=0
1815
if Thing[8]==1 then
1816
Damagefunc(hit,Thing[5],Thing[6],Thing[7],"Normal",RootPart,0,2,math.random(1,5),nil,nil,true)
1817
elseif Thing[8]==2 then
1818
Damagefunc(hit,Thing[5],Thing[6],Thing[7],"NormalDecreaseMvmt1",RootPart,0,2,math.random(1,5),nil,nil,true)
1819
end
1820
ref=part(3,workspace,0,1,BrickColor.new("Really red"),"Reference",vt())
1821
ref.Anchored=true
1822
ref.CFrame=cf(pos)
1823
MagicCircle(BrickColor.new("Really red"),cf(pos),5,5,5,1,1,1,0.03)
1824
game:GetService("Debris"):AddItem(ref,1)
1825
end
1826
if Thing[3]<=0 then
1827
table.remove(Effects,e)
1828
end
1829
end
1830
if Thing[2]=="CylinderClang" then
1831
if Thing[3]<=1 then
1832
Thing[1].CFrame=Thing[1].CFrame*CFrame.new(0,2.5*Thing[5],0)*CFrame.fromEulerAnglesXYZ(Thing[6],0,0)
1833
Thing[7]=Thing[1].CFrame
1834
effect("New Yeller",0,Thing[8],Thing[7])
1835
Thing[8]=Thing[7]
1836
Thing[3]=Thing[3]+Thing[4]
1837
else
1838
Part.Parent=nil
1839
table.remove(Effects,e)
1840
end
1841
--[[Mesh=Thing[7]
1842
Mesh.Scale=Mesh.Scale+vt(Thing[4],Thing[5],Thing[6])
1843
Thing[1].Transparency=Thing[1].Transparency+Thing[3]]
1844
end
1845
if Thing[2]~="Shoot" and Thing[2]~="DecreaseStat" then
1846
if Thing[1].Transparency<=1 then
1847
if Thing[2]=="Block1" then
1848
Thing[1].CFrame=Thing[1].CFrame*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50))
1849
Mesh=Thing[7]
1850
Mesh.Scale=Mesh.Scale+vt(Thing[4],Thing[5],Thing[6])
1851
Thing[1].Transparency=Thing[1].Transparency+Thing[3]
1852
elseif Thing[2]=="Block2" then
1853
Thing[1].CFrame=Thing[1].CFrame
1854
Mesh=Thing[7]
1855
Mesh.Scale=Mesh.Scale+vt(Thing[4],Thing[5],Thing[6])
1856
Thing[1].Transparency=Thing[1].Transparency+Thing[3]
1857
elseif Thing[2]=="Cylinder" then
1858
Mesh=Thing[7]
1859
Mesh.Scale=Mesh.Scale+vt(Thing[4],Thing[5],Thing[6])
1860
Thing[1].Transparency=Thing[1].Transparency+Thing[3]
1861
elseif Thing[2]=="Blood" then
1862
Mesh=Thing[7]
1863
Thing[1].CFrame=Thing[1].CFrame*cf(0,.5,0)
1864
Mesh.Scale=Mesh.Scale+vt(Thing[4],Thing[5],Thing[6])
1865
Thing[1].Transparency=Thing[1].Transparency+Thing[3]
1866
elseif Thing[2]=="Elec" then
1867
Mesh=Thing[7]
1868
Mesh.Scale=Mesh.Scale+vt(Thing[7],Thing[8],Thing[9])
1869
Thing[1].Transparency=Thing[1].Transparency+Thing[3]
1870
elseif Thing[2]=="Disappear" then
1871
Thing[1].Transparency=Thing[1].Transparency+Thing[3]
1872
end
1873
else
1874
Part.Parent=nil
1875
table.remove(Effects,e)
1876
end
1877
end
1878
end
1879
--end
1880
end
1881
end
1882
end
1883
fenbarmana2:TweenSize(UDim2.new(4*mana/100,0,0.2,0),nil,1,0.4,true)
1884
fenbarmana4.Text="Mana("..mana..")"
1885
gmsh15.Scale=vt(2.21,5*mana/100,.9)
1886
gwld15.C0=euler(0,0,0)*cf(0,0,0)*cf(0,.5/(100/(100-mana)),0)
1887
if mana>=100 then
1888
mana=100
1889
else
1890
if mananum<=8 then
1891
mananum=mananum+1
1892
else
1893
mananum=0
1894
mana=mana+1
1895
end
1896
end
1897
end
1898
 
1899
 
1900
--[[
1901
Copyrighted (C) Fenrier 2014
1902
]]