View difference between Paste ID: nX3WbZPR and 4VpjHrQE
SHOW: | | - or go back to the newest paste.
1-
local p = game.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-
local mouse = p:GetMouse()
3+
do
4
	print("FE Compatibility code by Mokiros")
5
	script.Parent = Player.Character
6
7
	--RemoteEvent for communicating
8
	local Event = Instance.new("RemoteEvent")
9
	Event.Name = "UserInput_Event"
10
11
	--Fake event to make stuff like Mouse.KeyDown work
12
	local function fakeEvent()
13
		local t = {_fakeEvent=true,Connect=function(self,f)self.Function=f end}
14
		t.connect = t.Connect
15
		return t
16
	end
17
18-
local rs = game:GetService("RunService").RenderStepped
18+
	--Creating fake input objects with fake variables
19
    local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
20
	local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
21
	local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
22
		CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
23
	end}
24
	--Merged 2 functions into one by checking amount of arguments
25
	CAS.UnbindAction = CAS.BindAction
26
27
	--This function will trigger the events that have been :Connect()'ed
28
	local function te(self,ev,...)
29
		local t = m[ev]
30
		if t and t._fakeEvent and t.Function then
31
			t.Function(...)
32
		end
33
	end
34
	m.TrigEvent = te
35
	UIS.TrigEvent = te
36
37
	Event.OnServerEvent:Connect(function(plr,io)
38
	    if plr~=Player then return end
39
		if io.isMouse then
40
			m.Target = io.Target
41
			m.Hit = io.Hit
42
		else
43
			local b = io.UserInputState == Enum.UserInputState.Begin
44
			if io.UserInputType == Enum.UserInputType.MouseButton1 then
45
				return m:TrigEvent(b and "Button1Down" or "Button1Up")
46
			end
47
			for _,t in pairs(CAS.Actions) do
48
				for _,k in pairs(t.Keys) do
49
					if k==io.KeyCode then
50
						t.Function(t.Name,io.UserInputState,io)
51
					end
52
				end
53
			end
54
			m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
55
			UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
56
	    end
57
	end)
58
	Event.Parent = NLS([==[
59
	local Player = game:GetService("Players").LocalPlayer
60
	local Event = script:WaitForChild("UserInput_Event")
61
62
	local UIS = game:GetService("UserInputService")
63
	local input = function(io,a)
64
		if a then return end
65
		--Since InputObject is a client-side instance, we create and pass table instead
66
		Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState})
67
	end
68
	UIS.InputBegan:Connect(input)
69
	UIS.InputEnded:Connect(input)
70
71
	local Mouse = Player:GetMouse()
72
	local h,t
73
	--Give the server mouse data 30 times every second, but only if the values changed
74
	--If player is not moving their mouse, client won't fire events
75
	while wait(1/30) do
76
		if h~=Mouse.Hit or t~=Mouse.Target then
77
			h,t=Mouse.Hit,Mouse.Target
78
			Event:FireServer({isMouse=true,Target=t,Hit=h})
79
		end
80
	end]==],Player.Character)
81
	Mouse,mouse,UserInputService,ContextActionService = m,m,UIS,CAS
82
end
83
84
local p = owner
85
local char = p.Character
86
local larm = char["Left Arm"]
87
local rarm = char["Right Arm"]
88
local lleg = char["Left Leg"]
89
local rleg = char["Right Leg"]
90
local hed = char.Head
91
local Torso = char.Torso
92
local hum = char.Humanoid
93
local cam = game.Workspace.CurrentCamera
94
local root = char.HumanoidRootPart
95
local deb = false
96
local shot = 0
97
local potential = false
98
local debris=game:service"Debris"
99
local l = game:GetService("Lighting")
100
ptz = {0.8, 0.85, 0.9, 0.95, 1, 1.05, 1.1}
101
math.randomseed(os.time())
102
for i,v in pairs(char:children()) do
103
    if v:IsA("Accessory") then
104
        v:Destroy()
105
    end
106
end
107
char["Body Colors"].HeadColor = BrickColor.new("1003")
108
char["Body Colors"].LeftArmColor = BrickColor.new("1003")
109
char["Body Colors"].RightArmColor = BrickColor.new("1003")
110
char["Body Colors"].TorsoColor = BrickColor.new("1003")
111
char["Body Colors"].RightLegColor = BrickColor.new("1003")
112
char["Body Colors"].LeftLegColor = BrickColor.new("1003")
113
Player=game:GetService("Players").LocalPlayer
114
Character=Player.Character 
115
PlayerGui=Player.PlayerGui 
116
Backpack=Player.Backpack 
117
Torso=Character.Torso 
118
Head=Character.Head 
119
Humanoid=Character.Humanoid
120
Mouse=Player:GetMouse()
121
RootPart = Character.HumanoidRootPart
122
RootJoint = RootPart.RootJoint
123
LeftArm=Character["Left Arm"] 
124
LeftLeg=Character["Left Leg"] 
125
RightArm=Character["Right Arm"] 
126
RightLeg=Character["Right Leg"] 
127
LS=Torso["Left Shoulder"] 
128
LH=Torso["Left Hip"] 
129
RS=Torso["Right Shoulder"] 
130
RH=Torso["Right Hip"] 
131
Neck=Torso.Neck
132
it=Instance.new
133
vt=Vector3.new
134
cf=CFrame.new
135
euler=CFrame.fromEulerAnglesXYZ
136
angles=CFrame.Angles
137
local decreaseatk=0
138
local decreasedef=0
139
local decreasemvmt=0
140
local Anim="Idle"
141
local Effects={}
142
local armorparts={}
143
local armorwelds={}
144
local weaponparts={}
145
local weaponwelds={}
146
local necko=euler(0,0,0)*cf(0,1,0)
147
local attack=false
148
local jump=false
149
local start=false
150
local move=10
151
local hitfloor,posfloor=nil,nil
152
local run=Instance.new("NumberValue")
153
run.Name="DecreaseMvmt"
154
run.Value=-1.2
155
local bName="Sthomas"
156
local MainColor=BrickColor.new("Black")
157
local SubColor=BrickColor.new("Bright blue")
158
--[[if script:findFirstChild("SiegmundHealth")~=nil then
159
for _,c in pairs(game.Players:children()) do
160
d=script.SiegmundHealth:Clone()
161
d.Parent=c.PlayerGui
162
end
163
end]]
164
165
166
167
168
function NoOutline(Part)
169
Part.TopSurface,Part.BottomSurface,Part.LeftSurface,Part.RightSurface,Part.FrontSurface,Part.BackSurface = 10,10,10,10,10,10
170
end
171
Character.Animate:Remove()
172
173
Character.Humanoid.Animator:Remove()
174
local Create = LoadLibrary("RbxUtility").Create
175
176
ArtificialHB = Create("BindableEvent", script){
177
	Parent = script,
178
	Name = "Heartbeat",
179
}
180
181
script:WaitForChild("Heartbeat")
182
183
frame = 1 / 30
184
tf = 0
185
allowframeloss = false
186
tossremainder = false
187
lastframe = tick()
188
script.Heartbeat:Fire()
189
190
game:GetService("RunService").Heartbeat:connect(function(s, p)
191
	tf = tf + s
192
	if tf >= frame then
193
		if allowframeloss then
194
			script.Heartbeat:Fire()
195
			lastframe = tick()
196
		else
197
			for i = 1, math.floor(tf / frame) do
198
				script.Heartbeat:Fire()
199
			end
200
			lastframe = tick()
201
		end
202
		if tossremainder then
203
			tf = 0
204
		else
205
			tf = tf - frame * math.floor(tf / frame)
206
		end
207
	end
208
end)
209
210
function swait(num)
211
	if num == 0 or num == nil then
212
		ArtificialHB.Event:wait()
213
	else
214
		for i = 0, num do
215
			ArtificialHB.Event:wait()
216
		end
217
	end
218
end
219
220
--[[frame,t,lastframe = 1/30,0,tick()
221
allowframeloss = false --if set to true will fire every frame it possibly can. This will result in multiple events happening at the same time whenever delta returns frame*2 or greater.
222
tossremainder = false --if set to true t will be set to 0 after Fire()-ing.
223
224
swait = function(dt)
225
	if dt == nil then
226
		dt = frame
227
	elseif dt < frame then
228
		dt = frame
229
	elseif dt > frame then
230
		--round this out into frames
231
		dt = math.floor(dt/frame)
232
	end
233
	local timetomeet = tick() + dt
234
end]] --maybe later
235
236
--30hz Pacemaker
237
238
script:WaitForChild("Heartbeat")
239
240
frame = 1/30
241
tf = 0
242
allowframeloss = false --if set to true will fire every frame it possibly can. This will result in multiple events happening at the same time whenever delta returns frame*2 or greater.
243
tossremainder = false --if set to true t will be set to 0 after Fire()-ing.
244
lastframe = tick()
245
script.Heartbeat:Fire() --ayy lmao
246
247
game:GetService("RunService").Heartbeat:connect(function(s,p) --herp derp
248
	tf = tf + s
249
	if tf >= frame then
250
		if allowframeloss then
251
			script.Heartbeat:Fire()
252
			lastframe=tick()
253
		else
254
			--print("FIRED "..math.floor(t/frame).." FRAME(S)","REMAINDER "..(t - frame*(math.floor(t/frame))))
255
			for i=1, math.floor(tf/frame) do
256
				script.Heartbeat:Fire()
257
			end
258
			lastframe=tick()
259
		end
260
		if tossremainder then
261
			tf = 0
262
		else
263
			tf = tf - frame * math.floor(tf/frame)
264
		end
265
	end
266
end)
267
268
function clerp(a,b,t) 
269
local qa = {QuaternionFromCFrame(a)}
270
local qb = {QuaternionFromCFrame(b)} 
271
local ax, ay, az = a.x, a.y, a.z 
272
local bx, by, bz = b.x, b.y, b.z
273
local _t = 1-t
274
return QuaternionToCFrame(_t*ax + t*bx, _t*ay + t*by, _t*az + t*bz,QuaternionSlerp(qa, qb, t)) 
275
end 
276
277
function QuaternionFromCFrame(cf) 
278
local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components() 
279
local trace = m00 + m11 + m22 
280
if trace > 0 then 
281
local s = math.sqrt(1 + trace) 
282
local recip = 0.5/s 
283
return (m21-m12)*recip, (m02-m20)*recip, (m10-m01)*recip, s*0.5 
284
else 
285
local i = 0 
286
if m11 > m00 then
287
i = 1
288
end
289
if m22 > (i == 0 and m00 or m11) then 
290
i = 2 
291
end 
292
if i == 0 then 
293
local s = math.sqrt(m00-m11-m22+1) 
294
local recip = 0.5/s 
295
return 0.5*s, (m10+m01)*recip, (m20+m02)*recip, (m21-m12)*recip 
296
elseif i == 1 then 
297
local s = math.sqrt(m11-m22-m00+1) 
298
local recip = 0.5/s 
299
return (m01+m10)*recip, 0.5*s, (m21+m12)*recip, (m02-m20)*recip 
300
elseif i == 2 then 
301
local s = math.sqrt(m22-m00-m11+1) 
302
local recip = 0.5/s return (m02+m20)*recip, (m12+m21)*recip, 0.5*s, (m10-m01)*recip 
303
end 
304
end 
305
end
306
307
function QuaternionToCFrame(px, py, pz, x, y, z, w) 
308
local xs, ys, zs = x + x, y + y, z + z 
309
local wx, wy, wz = w*xs, w*ys, w*zs 
310
local xx = x*xs 
311
local xy = x*ys 
312
local xz = x*zs 
313
local yy = y*ys 
314
local yz = y*zs 
315
local zz = z*zs 
316
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)) 
317
end
318
319
function QuaternionSlerp(a, b, t) 
320
local cosTheta = a[1]*b[1] + a[2]*b[2] + a[3]*b[3] + a[4]*b[4] 
321
local startInterp, finishInterp; 
322
if cosTheta >= 0.0001 then 
323
if (1 - cosTheta) > 0.0001 then 
324
local theta = math.acos(cosTheta) 
325
local invSinTheta = 1/math.sin(theta) 
326
startInterp = math.sin((1-t)*theta)*invSinTheta 
327
finishInterp = math.sin(t*theta)*invSinTheta  
328
else 
329
startInterp = 1-t 
330
finishInterp = t 
331
end 
332
else 
333
if (1+cosTheta) > 0.0001 then 
334
local theta = math.acos(-cosTheta) 
335
local invSinTheta = 1/math.sin(theta) 
336
startInterp = math.sin((t-1)*theta)*invSinTheta 
337
finishInterp = math.sin(t*theta)*invSinTheta 
338
else 
339
startInterp = t-1 
340
finishInterp = t 
341
end 
342
end 
343
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 
344
end
345
346
function part(formfactor,parent,reflectance,transparency,brickcolor,name,size)
347
local fp=it("Part")
348
fp.formFactor=formfactor 
349
fp.Parent=parent
350
fp.Reflectance=reflectance
351
fp.Transparency=transparency
352
fp.CanCollide=false 
353
fp.Locked=true
354
fp.BrickColor=brickcolor
355
fp.Name=name
356
fp.Size=size
357
NoOutline(fp)
358
fp.Material="SmoothPlastic"
359
fp:BreakJoints()
360
return fp 
361
end 
362
363
function mesh(Mesh,part,meshtype,meshid,offset,scale)
364
local mesh=it(Mesh) 
365
mesh.Parent=part
366
if Mesh=="SpecialMesh" then
367
mesh.MeshType=meshtype
368
if meshid~="nil" then
369
mesh.MeshId="http://www.roblox.com/asset/?id="..meshid
370
end
371
end
372
mesh.Offset=offset
373
mesh.Scale=scale
374
return mesh
375
end
376
377
function weld(parent,part0,part1,c0)
378
local weld=it("Motor") 
379
weld.Parent=parent
380
weld.Part0=part0 
381
weld.Part1=part1 
382
weld.C0=c0
383
return weld
384
end
385
386
function gui(GuiType,parent,text,backtrans,backcol,pos,size,image)
387
local gui=it(GuiType) 
388
gui.Parent=parent
389
gui.BackgroundTransparency=backtrans
390
gui.BackgroundColor3=backcol
391
gui.SizeConstraint="RelativeXY" 
392
gui.Position=pos
393
gui.Size=size
394
if GuiType=="TextLabel" then
395
gui.Text=text
396
gui.TextXAlignment="Center" 
397
gui.TextYAlignment="Center" 
398
gui.Font="SourceSans"
399
gui.FontSize="Size14"
400
gui.TextWrapped=false
401
gui.TextStrokeTransparency=0
402
gui.TextColor=BrickColor.new("White")
403
elseif GuiType=="ImageLabel" then
404
gui.Image="rbxassetid://"..image
405
gui.ImageColor3=backcol
406
end
407
return gui
408
end
409
410
local Characte=Instance.new("Model")
411
Characte.Parent=Character
412
Characte.Name=bName
413
414
415
--local Torso=part(0,Character,0,0,MainColor,"Torso",vt(2,2,1))
416
local Torsoc=part(0,Character,0,0,SubColor,"Torso Copy",vt(2,2,1))
417
--local LeftArm=part(0,Character,0,0,MainColor,"Left Arm",vt(1,2,1))
418
local LeftArmc=part(0,Character,0,0,SubColor,"Left Arm Copy",vt(1,2,1))
419
--local RightArm=part(0,Character,0,0,MainColor,"Right Arm",vt(1,2,1))
420
local RightArmc=part(0,Character,0,0,SubColor,"Right Arm Copy",vt(1,2,1))
421
--local LeftLeg=part(0,Character,0,0,MainColor,"Left Leg",vt(1,2,1))
422
local LeftLegc=part(0,Character,0,0,SubColor,"Left Leg Copy",vt(1,2,1))
423
--local RightLeg=part(0,Character,0,0,MainColor,"Right Leg",vt(1,2,1))
424
local RightLegc=part(0,Character,0,0,SubColor,"Right Leg Copy",vt(1,2,1))
425
426
427
--local Head=part(0,Character,0,0,BrickColor.new("Pastel brown"),"Head",vt(2,1,1))
428
--[[local Torso=part(0,Character,0,0,MainColor,"Torso",vt(2,2,1))
429
local Torsoc=part(0,Character,0,0,SubColor,"Torso Copy",vt(2,2,1))
430
local LeftArm=part(0,Character,0,0,SubColor,"Left Arm",vt(1,2,1))
431
local LeftArmc=part(0,Character,0,0,MainColor,"Left Arm Copy",vt(1,2,1))
432
local RightArm=part(0,Character,0,0,SubColor,"Right Arm",vt(1,2,1))
433
local RightArmc=part(0,Character,0,0,MainColor,"Right Arm Copy",vt(1,2,1))
434
local LeftLeg=part(0,Character,0,0,SubColor,"Left Leg",vt(1,2,1))
435
local LeftLegc=part(0,Character,0,0,MainColor,"Left Leg Copy",vt(1,2,1))
436
local RightLeg=part(0,Character,0,0,SubColor,"Right Leg",vt(1,2,1))
437
local RightLegc=part(0,Character,0,0,MainColor,"Right Leg Copy",vt(1,2,1))]]
438
--local RootPart=part(0,Character,0,1,MainColor,"HumanoidRootPart",vt(2,2,1))
439
local Cape=part(0,Character,0,0,BrickColor.new("Bright blue"),"Hat",vt())
440
Head.CanCollide=true
441
Torso.CanCollide=true
442
LeftArm.CanCollide=true
443
RightArm.CanCollide=true
444
LeftLeg.CanCollide=true
445
RightLeg.CanCollide=true
446
RootPart.CanCollide=false
447
Head.face:Remove()
448
face=Instance.new("Decal",Head)
449
face.Face="Front"
450
--face.Texture="http://www.roblox.com/asset/?id="
451
face.Texture="http://www.roblox.com/asset/?id="
452
453
local HMesh=mesh("SpecialMesh",Head,"Head","nil",vt(0,0,0),vt(1.25,1.25,1.25))
454
local TMsh=mesh("SpecialMesh",Torso,"FileMesh","rbxasset://fonts/leftarm.mesh",vt(0,0,0),vt(1.8,1,.8))
455
local LAMsh=mesh("SpecialMesh",LeftArm,"FileMesh","rbxasset://fonts/leftarm.mesh",vt(0,0,0),vt(.8,.8,.8))
456
local RAMsh=mesh("SpecialMesh",RightArm,"FileMesh","rbxasset://fonts/leftarm.mesh",vt(0,0,0),vt(.8,.8,.8))
457
local LLMsh=mesh("SpecialMesh",LeftLeg,"FileMesh","rbxasset://fonts/leftarm.mesh",vt(0,0,0),vt(.8,1,.8))
458
local RLMsh=mesh("SpecialMesh",RightLeg,"FileMesh","rbxasset://fonts/leftarm.mesh",vt(0,0,0),vt(.8,1,.8))
459
local TcMsh=mesh("SpecialMesh",Torsoc,"FileMesh","rbxasset://fonts/leftarm.mesh",vt(0,0,0),vt(-2,-1,-1))
460
local LAcMsh=mesh("SpecialMesh",LeftArmc,"FileMesh","rbxasset://fonts/leftarm.mesh",vt(0,0,0),vt(-1,-1,-1))
461
local RAcMsh=mesh("SpecialMesh",RightArmc,"FileMesh","rbxasset://fonts/leftarm.mesh",vt(0,0,0),vt(-1,-1,-1))
462
local LLcMsh=mesh("SpecialMesh",LeftLegc,"FileMesh","rbxasset://fonts/leftarm.mesh",vt(0,0,0),vt(-1,-1.2,-1))
463
local RLcMsh=mesh("SpecialMesh",RightLegc,"FileMesh","rbxasset://fonts/leftarm.mesh",vt(0,0,0),vt(-1,-1.2,-1))
464
TMsh.MeshId="rbxasset://fonts/leftarm.mesh"
465
LAMsh.MeshId="rbxasset://fonts/leftarm.mesh"
466
RAMsh.MeshId="rbxasset://fonts/leftarm.mesh"
467
LLMsh.MeshId="rbxasset://fonts/leftarm.mesh"
468
RLMsh.MeshId="rbxasset://fonts/leftarm.mesh"
469
TcMsh.MeshId="rbxasset://fonts/leftarm.mesh"
470
LAcMsh.MeshId="rbxasset://fonts/leftarm.mesh"
471
RAcMsh.MeshId="rbxasset://fonts/leftarm.mesh"
472
LLcMsh.MeshId="rbxasset://fonts/leftarm.mesh"
473
RLcMsh.MeshId="rbxasset://fonts/leftarm.mesh"
474
local Cmsh=mesh("SpecialMesh",Cape,"FileMesh","http://www.roblox.com/asset/?id=250281794",vt(0,0,0),vt(1,1,1))
475
476
--[[local Neck=weld(Torso,Torso,Head,cf(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0))
477
Neck.C1=cf(0, -0.5, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)]]
478
local Neck=weld(Torso,Torso,Head,euler(0,0,0)*cf(0,1,0))
479
Neck.C1=cf(0,-.5,0)
480
local RW=weld(Torso,Torso,RightArm,cf(1.5,.5,0))
481
RW.C1=cf(0,.5,0)
482
local RWc=weld(Torso,RightArm,RightArmc,cf(0,0,0))
483
local LW=weld(Torso,Torso,LeftArm,cf(-1.5,.5,0))
484
LW.C1=cf(0,.5,0)
485
local LWc=weld(Torso,LeftArm,LeftArmc,cf(0,0,0))
486
local RH=weld(Torso,Torso,RightLeg,cf(.5,-1,0))
487
RH.C1=cf(0,1,0)
488
local RHc=weld(Torso,RightLeg,RightLegc,cf(0,0,0))
489
local LH=weld(Torso,Torso,LeftLeg,cf(-.5,-1,0))
490
LH.C1=cf(0,1,0)
491
local LHc=weld(Torso,LeftLeg,LeftLegc,cf(0,0,0))
492
local RootJoint=weld(Torso,Torso,RootPart,cf(0,0,0))
493
local RootJointc=weld(Torso,Torso,Torsoc,cf(0,0,0))
494
--local Cwld=weld(Torso,Cape,Head,euler(0,0,0)*cf(0,2,-.3))
495
local Cwld=weld(Torso,Cape,Torso,euler(0,0,0)*cf(0,.5,-.3))
496
--Torso.CFrame=cf(math.random(-5000,5000)/100,math.random(-5000,5000)/100,math.random(-5000,5000)/100)
497
--Torso.CFrame=cf(0,0,0)
498
--Torso.CFrame=workspace.Map.BossSpawn.CFrame*cf(0,5,0)
499
500
local hitbox=part(3,nil,0,1,BrickColor.new("Black"),"Hitbox",vt(1,1,1))
501
--hitbox.Anchored=true
502
local hitbox2=part(3,nil,0,1,BrickColor.new("Black"),"Hitbox",vt(1,1,1))
503
hitbox2.Anchored=true
504
local hitboxCF=cf(0,0,0)
505
506
--[[local Humanoid=Instance.new("Humanoid")
507
Humanoid.Parent=Character
508
TehHealth=700
509
--TehHealth=2000
510
Humanoid.MaxHealth=TehHealth
511
Humanoid.Health=TehHealth
512
coroutine.resume(coroutine.create(function()
513
	for i=1,20 do
514
		wait()
515
		Humanoid.Health=Humanoid.MaxHealth
516
	end
517
	Humanoid:TakeDamage(1)
518
end))]]
519
local Stats=Instance.new("BoolValue")
520
Stats.Name="Stats"
521
Stats.Parent=Character
522
local Atk=Instance.new("NumberValue")
523
Atk.Name="Damage"
524
Atk.Parent=Stats
525
Atk.Value=1
526
local Def=Instance.new("NumberValue")
527
Def.Name="Defense"
528
Def.Parent=Stats
529
Def.Value=1
530
local Mvmt=Instance.new("NumberValue")
531
Mvmt.Name="Movement"
532
Mvmt.Parent=Stats
533
Mvmt.Value=1
534
local Block=Instance.new("BoolValue")
535
Block.Name="Block"
536
Block.Parent=Stats
537
Block.Value=false
538
local Stun=Instance.new("NumberValue")
539
Stun.Name="Stun"
540
Stun.Parent=Stats
541
Stun.Value=0
542
local StunT=Instance.new("NumberValue")
543
StunT.Name="StunThreshold"
544
StunT.Parent=Stats
545
StunT.Value=100
546
local Rooted=Instance.new("BoolValue")
547
Rooted.Name="Rooted"
548
Rooted.Parent=Stats
549
Rooted.Value=false
550
local Stunned=Instance.new("BoolValue")
551
Stunned.Name="Stunned"
552
Stunned.Parent=Stats
553
Stunned.Value=false
554
local Stagger=Instance.new("BoolValue")
555
Stagger.Name="Stagger"
556
Stagger.Parent=Stats
557
Stagger.Value=false
558
local StaggerHit=Instance.new("BoolValue")
559
StaggerHit.Name="StaggerHit"
560
StaggerHit.Parent=Stats
561
StaggerHit.Value=false
562
local RecentEnemy=Instance.new("ObjectValue")
563
RecentEnemy.Name="RecentEnemy"
564
RecentEnemy.Parent=Stats
565
RecentEnemy.Value=nil
566
local Decrease=Instance.new("BoolValue")
567
Decrease.Name="Decrease"
568
Decrease.Parent=Stats
569
Decrease.Value=false
570
local mana=Instance.new("NumberValue")
571
mana.Name="Mana"
572
mana.Parent=Stats
573
mana.Value=0
574
local boss=Instance.new("BoolValue")
575
boss.Name="Boss"
576
boss.Parent=Stats
577
boss.Value=true
578
local alive=Instance.new("BoolValue")
579
alive.Name="Alive"
580
alive.Parent=Character
581
alive.Value=true
582
local btarget=Instance.new("ObjectValue")
583
btarget.Name="Target"
584
btarget.Parent=Stats
585
btarget.Value=nil
586
local passive1=Instance.new("NumberValue",Decrease)
587
passive1.Name="DecreaseAtk"
588
passive1.Value=-.4
589
local passive2=Instance.new("NumberValue",Decrease)
590
passive2.Name="DecreaseDef"
591
passive2.Value=-.1
592
local passive3=Instance.new("NumberValue",Decrease)
593
passive3.Name="DecreaseMvmt"
594
passive3.Value=.1
595
596
so = function(id,par,vol,pit) 
597
local sou = Instance.new("Sound",par or workspace)
598
sou.Volume=1.5
599
sou.Pitch=pit or 1
600
sou.SoundId="http://www.roblox.com/asset/?id="..id
601
--swait() 
602
sou:play() 
603
game:GetService("Debris"):AddItem(sou,6)
604
end
605
606
local function CFrameFromTopBack(at, top, back)
607
local right = top:Cross(back)
608
return CFrame.new(at.x, at.y, at.z,
609
right.x, top.x, back.x,
610
right.y, top.y, back.y,
611
right.z, top.z, back.z)
612
end
613
614
function Triangle(a, b, c)
615
local edg1 = (c-a):Dot((b-a).unit)
616
local edg2 = (a-b):Dot((c-b).unit)
617
local edg3 = (b-c):Dot((a-c).unit)
618
if edg1 <= (b-a).magnitude and edg1 >= 0 then
619
a, b, c = a, b, c
620
elseif edg2 <= (c-b).magnitude and edg2 >= 0 then
621
a, b, c = b, c, a
622
elseif edg3 <= (a-c).magnitude and edg3 >= 0 then
623
a, b, c = c, a, b
624
else 
625
assert(false, "unreachable")
626
end
627
628
local len1 = (c-a):Dot((b-a).unit)
629
local len2 = (b-a).magnitude - len1
630
local width = (a + (b-a).unit*len1 - c).magnitude
631
632
local maincf = CFrameFromTopBack(a, (b-a):Cross(c-b).unit, -(b-a).unit)
633
634
local list = {}
635
636
if len1 > 0.01 then
637
local w1 = Instance.new('WedgePart', m)
638
w1.Name = "Triangle"
639
game:GetService("Debris"):AddItem(w1,5)
640
w1.Material = "SmoothPlastic"
641
w1.FormFactor = 'Custom'
642
w1.BrickColor = BrickColor.new("Teal")
643
w1.Transparency = 0
644
w1.Reflectance = 0
645
w1.Material = "SmoothPlastic"
646
w1.CanCollide = false
647
NoOutline(w1)
648
local sz = Vector3.new(0.2, width, len1)
649
w1.Size = sz
650
local sp = Instance.new("SpecialMesh",w1)
651
sp.MeshType = "Wedge"
652
sp.Scale = Vector3.new(0,1,1) * sz/w1.Size
653
w1:BreakJoints()
654
w1.Anchored = true
655
w1.Parent = workspace
656
w1.Transparency = 0.7
657
table.insert(Effects,{w1,"Disappear",.05})
658
w1.CFrame = maincf*CFrame.Angles(math.pi,0,math.pi/2)*CFrame.new(0,width/2,len1/2)
659
table.insert(list,w1)
660
end
661
662
if len2 > 0.01 then
663
local w2 = Instance.new('WedgePart', m)
664
w2.Name = "Triangle"
665
game:GetService("Debris"):AddItem(w2,5)
666
w2.Material = "SmoothPlastic"
667
w2.FormFactor = 'Custom'
668
w2.BrickColor = BrickColor.new("Teal")
669
w2.Transparency = 0
670
w2.Reflectance = 0
671
w2.Material = "SmoothPlastic"
672
w2.CanCollide = false
673
NoOutline(w2)
674
local sz = Vector3.new(0.2, width, len2)
675
w2.Size = sz
676
local sp = Instance.new("SpecialMesh",w2)
677
sp.MeshType = "Wedge"
678
sp.Scale = Vector3.new(0,1,1) * sz/w2.Size
679
w2:BreakJoints()
680
w2.Anchored = true
681
w2.Parent = workspace
682
w2.Transparency = 0.7
683
table.insert(Effects,{w2,"Disappear",.05})
684
w2.CFrame = maincf*CFrame.Angles(math.pi,math.pi,-math.pi/2)*CFrame.new(0,width/2,-len1 - len2/2)
685
table.insert(list,w2)
686
end
687
return unpack(list)
688
end
689
690
function MagicBlock(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay,Type)
691
local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(.2,.2,.2))
692
prt.Anchored=true
693
prt.CFrame=cframe
694
msh=mesh("BlockMesh",prt,"","",vt(0,0,0),vt(x1,y1,z1))
695
game:GetService("Debris"):AddItem(prt,3)
696
if Type==1 or Type==nil then
697
table.insert(Effects,{prt,"Block1",delay,x3,y3,z3,msh})
698
elseif Type==2 then
699
table.insert(Effects,{prt,"Block2",delay,x3,y3,z3,msh})
700
end
701
end
702
703
function MagicCircle(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay)
704
local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(.2,.2,.2))
705
prt.Anchored=true
706
prt.CFrame=cframe
707
local msh=mesh("SpecialMesh",prt,"Sphere","nil",vt(0,0,0),vt(x1,y1,z1))
708
game:GetService("Debris"):AddItem(prt,3)
709
table.insert(Effects,{prt,"Cylinder",delay,x3,y3,z3,msh})
710
end
711
712
function MagicCircle2(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay)
713
local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(.2,.2,.2))
714
prt.Anchored=true
715
prt.CFrame=cframe
716
local msh=mesh("SpecialMesh",prt,"Sphere","nil",vt(0,0,0),vt(x1,y1,z1))
717
game:GetService("Debris"):AddItem(prt,3)
718
table.insert(Effects,{prt,"Cylinder2",delay,x3,y3,z3,msh})
719
end
720
721
function MagicRing(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay)
722
local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5))
723
prt.Anchored=true
724
prt.CFrame=cframe*cf(x2,y2,z2)
725
local msh=mesh("SpecialMesh",prt,"FileMesh","http://www.roblox.com/asset/?id=3270017",vt(0,0,0),vt(x1,y1,z1))
726
game:GetService("Debris"):AddItem(prt,3)
727
table.insert(Effects,{prt,"Cylinder",delay,x3,y3,z3,msh})
728
end
729
730
function MagicCylinder(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay)
731
local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(.2,.2,.2))
732
prt.Anchored=true
733
prt.CFrame=cframe
734
local msh=mesh("CylinderMesh",prt,"","",vt(0,0,0),vt(x1,y1,z1))
735
game:GetService("Debris"):AddItem(prt,3)
736
table.insert(Effects,{prt,"Cylinder",delay,x3,y3,z3,msh})
737
end
738
739
function MagicCylinder3(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay)
740
local prt=part(3,Character,0,0,brickcolor,"Effect",vt(.2,.2,.2))
741
prt.Anchored=true
742
prt.CFrame=cframe
743
local msh=mesh("SpecialMesh",prt,"Head","nil",vt(0,0,0),vt(x1,y1,z1))
744
game:GetService("Debris"):AddItem(prt,3)
745
table.insert(Effects,{prt,"Cylinder2",delay,x3,y3,z3,msh})
746
end
747
748
function MagicHead(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay)
749
local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(.2,.2,.2))
750
prt.Anchored=true
751
prt.CFrame=cframe
752
local msh=mesh("SpecialMesh",prt,"Head","nil",vt(0,0,0),vt(x1,y1,z1))
753
game:GetService("Debris"):AddItem(prt,3)
754
table.insert(Effects,{prt,"Cylinder",delay,x3,y3,z3,msh})
755
end
756
757
function ClangEffect(brickcolor,cframe,duration,decrease,size,power)
758
local prt=part(3,workspace,0,1,brickcolor,"Effect",vt(.2,.2,.2))
759
prt.Anchored=true
760
prt.CFrame=cframe
761
local msh=mesh("BlockMesh",prt,"","",vt(0,0,0),vt(5,5,5))
762
game:GetService("Debris"):AddItem(prt,3)
763
table.insert(Effects,{prt,"CylinderClang",duration,decrease,size,power,prt.CFrame,nil})
764
end
765
766
function MagicWave(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay)
767
local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(.2,.2,.2))
768
prt.Anchored=true
769
prt.CFrame=cframe
770
local msh=mesh("SpecialMesh",prt,"FileMesh","http://www.roblox.com/asset/?id=20329976",vt(0,0,0),vt(x1,y1,z1))
771
game:GetService("Debris"):AddItem(prt,3)
772
table.insert(Effects,{prt,"Cylinder",delay,x3,y3,z3,msh})
773
end
774
775
--[[local BodGy=Instance.new("BodyGyro")
776
BodGy.maxTorque=Vector3.new(0,4e+005,0)
777
BodGy.P=2000
778
BodGy.D=100
779
BodGy.Name="SiegmundGyro"
780
CF=RootPart.CFrame
781
BodGy.Parent=RootPart
782
BodGy.cframe=CF]]
783
784
--[[Neck.C0=euler(0,0,0)*cf(0,3,0)*euler(0,.6,0)*euler(-.2,0,0)
785
RootJoint.C0=cf(0,-2,0)*euler(0,.6,0)
786
RW.C0=cf(4.5,1.5,0)*euler(-.4,0,.5)*euler(0,0,0)
787
RW.C1=cf(0,1.5,0)*euler(0,0,0)
788
LW.C0=cf(-4.5,1.5,0)*euler(.2,0,-.5)
789
LW.C1=cf(0,1.5,0)*euler(0,0,0)
790
RH.C0=cf(1.5,-3,0)*euler(0,-.6,0)*euler(0,0,.1)
791
RH.C1=cf(0,3,0)*euler(0,0,0)
792
LH.C0=cf(-1.5,-3,0)*euler(0,.6,0)*euler(.1,0,0)
793
LH.C1=cf(0,3,0)*euler(0,0,0)]]
794
795
--[[RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(3,0,0.5),.3)
796
LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(0,0,-1.2),.3)
797
Torso.Neck.C0=clerp(Torso.Neck.C0,necko*euler(0.4,0,0),.3)
798
RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,-1)*euler(0,0,0),.3)
799
RH.C0=clerp(RH.C0,cf(1,-1,0)*euler(-1.2,1.57,0),.3)
800
LH.C0=clerp(LH.C0,cf(-1.1,-.5,-0.5)*euler(-0.2,-1.3,0),.3)]]
801
function StartAnim()
802
attack=true
803
--workspace.CurrentCamera.CameraSubject=Head
804
Neck.C0=necko*euler(-0.4,0,0)
805
RootJoint.C0=euler(.2,0,0)
806
RW.C0=cf(1.5,0.5,0)*euler(-.3,0,0.2)
807
RW.C1=cf(0,0.5,0)*euler(0,0,0)
808
LW.C0=cf(-1.5,0.5,0)*euler(-.3,0,-0.2)
809
LW.C1=cf(0,0.5,0)*euler(0,0,0)
810
RH.C0=cf(.5,-1,0)*euler(0.4,1.57,0)
811
LH.C0=cf(-.5,-1,0)*euler(-0.2,-1.57,0)
812
hitfloor,posfloor=rayCast(RootPart.Position,(CFrame.new(RootPart.Position,RootPart.Position - Vector3.new(0,1,0))).lookVector,10,Character)
813
while hitfloor==nil do
814
swait()
815
end
816
print("endderp")
817
so("http://roblox.com/asset/?id=157878578",Torso,1,0.8) 
818
so("http://roblox.com/asset/?id=2760979",Torso,1,0.4) 
819
MagicWave(BrickColor.new("Medium stone grey"),cf(Torso.Position)*cf(0,-1,0),1,1,1,1.5,1,1.5,0.05)
820
--MagniDamage(Torso,15,6,8,math.random(20,40),"Knockdown2",Torso,0,1,math.random(8,10),nil,nil,true)
821
for i=0,1,0.05 do
822
swait()
823
Neck.C0=clerp(Neck.C0,necko*euler(-.4,0,0),.3)
824
RootJoint.C0=clerp(RootJoint.C0,cf(0,1,0)*euler(0,0,0),.3)
825
RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(0,0,1.2),.3)
826
LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(0,0,-1.2),.3)
827
RH.C0=clerp(RH.C0,cf(.5,-1,0)*euler(-1.2,1.57,0),.3)
828
LH.C0=clerp(LH.C0,cf(-.6,-.5,-0.5)*euler(-0.2,-1.3,0),.3)
829
end
830
attack=false
831
end
832
--[[RW.C0=cf(1.5,0.5,0)*euler(0,0,1.2)
833
LW.C0=cf(-1.5,0.5,0)*euler(0,0,-1.2)
834
Neck.C0=necko*euler(-.4,0,0)
835
RootJoint.C0=cf(0,1,0)*euler(0,0,0)
836
RH.C0=cf(1,-1,0)*euler(-1.2,1.57,0)
837
LH.C0=cf(-1.1,-.5,-0.5)*euler(-0.2,-1.3,0)]]
838
839
local BodGy=Instance.new("BodyGyro")
840
BodGy.maxTorque=Vector3.new(0,4e+005,0)
841
BodGy.P=2000
842
BodGy.D=100
843
BodGy.Name="SthomasGyro"
844
CF=RootPart.CFrame
845
BodGy.Parent=RootPart
846
BodGy.cframe=CF
847
848
wait()
849
print("Sthomas spawned.")
850
851
function StunAnim()
852
attack=true
853
Stunned.Value=true
854
showDamage(Character,"Stunned","Interrupt")
855
local dec=Instance.new("NumberValue",Decrease)
856
dec.Name="DecreaseMvmt"
857
dec.Value=10
858
for i=0,1,0.3 do
859
swait()
860
Neck.C0=clerp(Neck.C0,necko*euler(-.2,.5,0),.2)
861
RootJoint.C0=clerp(RootJoint.C0,euler(-.2,3,0),.2)
862
RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(-.2,0,1.3),.2)
863
RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.2)
864
LW.C0=clerp(LW.C0,cf(-1.2,0.5,-.4)*euler(1,0,.4)*euler(0,-.1,0),.2)
865
LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.2)
866
RH.C0=clerp(RH.C0,cf(.5,-.6,0)*euler(0,1.57,0)*euler(-.5,0,.3),.25)
867
LH.C0=clerp(LH.C0,cf(-.5,-.8,0)*euler(0,-1.57,0)*euler(-.2,0,0),.25)
868
end
869
for i=0,1,0.3 do
870
swait()
871
Neck.C0=clerp(Neck.C0,necko*euler(-.3,.5,0),.2)
872
RootJoint.C0=clerp(RootJoint.C0,cf(0,0,-.5)*euler(-.8,3,0),.2)
873
RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(-.8,0,1.3),.2)
874
RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.2)
875
LW.C0=clerp(LW.C0,cf(-1.2,0.5,-.4)*euler(1.2,0,.8)*euler(0,-.1,0),.2)
876
LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.2)
877
RH.C0=clerp(RH.C0,cf(.5,-.6,0)*euler(0,1.57,0)*euler(-.5,0,.6),.25)
878
LH.C0=clerp(LH.C0,cf(-.5,-.8,0)*euler(0,-1.57,0)*euler(.1,0,.7),.25)
879
end
880
for i=0,1,0.3 do
881
swait()
882
Neck.C0=clerp(Neck.C0,necko*euler(-.3,-1,0),.2)
883
RootJoint.C0=clerp(RootJoint.C0,cf(0,0,-2)*euler(-1.57,3,0),.2)
884
RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(-.8,0,1.3),.2)
885
RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.2)
886
LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(1.2,0,-.8)*euler(0,-.1,0),.2)
887
LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.2)
888
RH.C0=clerp(RH.C0,cf(.5,-.6,0)*euler(0,1.57,0)*euler(-.2,0,.6),.25)
889
LH.C0=clerp(LH.C0,cf(-.5,-.8,0)*euler(0,-1.57,0)*euler(-.1,0,.3),.25)
890
end
891
local gairost=Instance.new("BodyGyro") 
892
gairost.Parent=RootPart
893
gairost.maxTorque=Vector3.new(4e+005,0,4e+005)*math.huge 
894
gairost.P=20e+003 
895
gairost.cframe=cf(0,0,0)
896
for i=0,1,0.1 do
897
swait()
898
Neck.C0=clerp(Neck.C0,necko*euler(0,-1.57,0),.3)
899
RootJoint.C0=clerp(RootJoint.C0,cf(0,0,-2.5)*euler(-1.57,3.14,0),.3)
900
RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(-1.57,0,1.5)*euler(.2,0,0),.3)
901
RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
902
LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(1.5,0,-1.57)*euler(0,0,0),.3)
903
LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
904
RH.C0=clerp(RH.C0,cf(.5,-1,0)*euler(0,1.57,0)*euler(-.3,.5,0),.3)
905
LH.C0=clerp(LH.C0,cf(-.5,-1,0)*euler(0,-1.57,0)*euler(-.1,.2,0),.3)
906
end
907
for i=1,200 do
908
swait()
909
gairost.cframe=RootPart.CFrame
910
end
911
for i=0,1,0.2 do
912
swait()
913
Stun.Value=0
914
gairost.cframe=RootPart.CFrame
915
Neck.C0=clerp(Neck.C0,necko*euler(0,.2,0),.3)
916
RootJoint.C0=clerp(RootJoint.C0,cf(0,0,-2)*euler(-1,4,0),.3)
917
RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(-1.57,0,1)*euler(.2,-1,0),.3)
918
RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
919
LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(1.2,0,.2)*euler(0,0,0),.3)
920
LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
921
RH.C0=clerp(RH.C0,cf(.5,-1,0)*euler(0,1.57,0)*euler(-.3,.5,.4),.3)
922
LH.C0=clerp(LH.C0,cf(-.5,-1,-1)*euler(0,-1.57,0)*euler(-.1,.2,1),.3)
923
end
924
gairost.Parent=nil
925
dec.Parent=nil
926
Stun.Value=0
927
Stunned.Value=false
928
attack=false
929
for i=1,10 do
930
swait()
931
Stun.Value=0
932
end
933
end
934
935
function PunchSlam()
936
attack=true
937
for i=0,1,0.1 do
938
swait()
939
Neck.C0=clerp(Neck.C0,necko*euler(0,-.5,0)*euler(-.2,0,0),.3)
940
RootJoint.C0=clerp(RootJoint.C0,euler(0,-.5,0)*euler(.1,0,0)*cf(0,.2,0),.3)
941
RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(.2,0,.8)*euler(0,0,0),.3)
942
RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
943
LW.C0=clerp(LW.C0,cf(-1.3,0.5,-.2)*euler(1.4,0,.5)*euler(0,0,0),.3)
944
LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
945
RH.C0=clerp(RH.C0,cf(.6,-.9,-.2)*euler(0,1.57,0)*euler(0,-.5,-.05),.3)
946
LH.C0=clerp(LH.C0,cf(-.6,-.8,-.2)*euler(0,-1.57,0)*euler(0,0,.4),.3)
947
end
948
Torso.Velocity=RootPart.CFrame.lookVector*move*3
949
so("169445092",LeftArm,1,1.2)
950
for i=0,1,0.1 do
951
swait()
952
MagniDamage(LeftArm,2,8,10,0,"Knockdown2",RootPart,.2,2,math.random(6,7),nil,nil)
953
--MagniDamage(LeftArm,2,6,8,0,"Normal",RootPart,.3,1,math.random(6,7),nil,nil)
954
Neck.C0=clerp(Neck.C0,necko*euler(0,.5,0)*euler(-.1,0,0),.3)
955
RootJoint.C0=clerp(RootJoint.C0,euler(0,.5,0)*euler(.2,0,0)*cf(0,.2,1),.3)
956
RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(-.5,0,1)*euler(0,0,0),.3)
957
RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
958
--LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(1.7,0,.2)*euler(0,0,0),.3)
959
LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
960
RH.C0=clerp(RH.C0,cf(.6,-.9,-.2)*euler(0,1.57,0)*euler(0,.4,-.3),.3)
961
LH.C0=clerp(LH.C0,cf(-.6,-.9,-.2)*euler(0,-1.57,0)*euler(0,.5,0),.3)
962
if i<.3 then
963
LW.C0=clerp(LW.C0,cf(-1.3,0.5,-.2)*euler(1.7,0,-.2)*euler(0,0,0),.3)
964
else
965
LW.C0=clerp(LW.C0,cf(-1.2,0.5,-.2)*euler(1.7,0,.1)*euler(0,0,0),.3)
966
end
967
end
968
if RecentEnemy.Value~=nil then
969
Torso.Velocity=vt(0,0,0)
970
target,distance=findNearestTorso(Torso.Position)
971
if target~=nil then
972
BodGy.cframe=cf(Torso.Position,target.Position)
973
end
974
Torso.Velocity=RootPart.CFrame.lookVector*move*3
975
refd=part(3,workspace,0,1,BrickColor.new("Black"),"Reference",vt())
976
refd.Anchored=true
977
game:GetService("Debris"):AddItem(refd,5)
978
so("169445092",RightArm,1,1.2)
979
for i=0,1,0.1 do
980
swait()
981
refd.CFrame=cf(posfloor)
982
MagniDamage(LeftArm,4,10,12,math.random(30,35),"Knockdown2",refd,.3,1,math.random(3,4),nil,nil)
983
Neck.C0=clerp(Neck.C0,necko*euler(0,-1.57,0),.3)
984
RootJoint.C0=clerp(RootJoint.C0,cf(0,0,.2)*euler(0,-1.57,0),.3)
985
if i<.6 then
986
RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(0,0,1.57)*euler(0,3.14,0),.5)
987
else
988
RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(0,0,1.57)*euler(0,3.14,-1.2)*euler(-.5,0,0),.2)
989
end
990
RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
991
LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(0,0,-1.57)*euler(0,0,1),.3)
992
LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
993
RH.C0=clerp(RH.C0,cf(.5,-1,.2)*euler(0,1.57,0)*euler(.2,-1.57,0),.2)
994
LH.C0=clerp(LH.C0,cf(-.5,-1,-.2)*euler(0,-1.57,0)*euler(-.4,-1.57,0),.2)
995
end
996
refd.Parent=nil
997
--swait(100)
998
end
999
attack=false
1000
end
1001
1002
function SweepCut()
1003
attack=true
1004
for i=0,1,0.1 do
1005
swait()
1006
Neck.C0=clerp(Neck.C0,necko*euler(0,1.3,0)*euler(-.5,0,0),.3)
1007
RootJoint.C0=clerp(RootJoint.C0,euler(0,1.3,0)*euler(-.5,0,0)*cf(0,.4,0),.3)
1008
RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(0,0,.5)*euler(0,0,0),.3)
1009
RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
1010
LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(0,0,-1)*euler(0,0,0),.3)
1011
LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
1012
RH.C0=clerp(RH.C0,cf(.6,-.7,-.4)*euler(0,1.57,0)*euler(-.5,0,0),.3)
1013
LH.C0=clerp(LH.C0,cf(-.3,-.4,-.7)*euler(0,-1.57,0)*euler(0,0,-.1)*euler(-.7,0,0),.3)
1014
end
1015
Torso.Velocity=RootPart.CFrame.lookVector*move*5
1016
so("169445073",LeftLeg,1,1.2)
1017
for i=0,1,0.1 do
1018
swait()
1019
MagniDamage(LeftLeg,2,7,9,0,"Knockdown2",RootPart,.2,2,math.random(6,7),nil,nil)
1020
Neck.C0=clerp(Neck.C0,necko*euler(0,1,0)*euler(-.5,0,0),.3)
1021
RootJoint.C0=clerp(RootJoint.C0,euler(0,1.3,0)*euler(-1,0,0)*cf(0,1.2,0),.3)
1022
RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(.8,0,.3)*euler(0,0,0),.3)
1023
RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
1024
LW.C0=clerp(LW.C0,cf(-1,0.5,-.5)*euler(1.5,0,1)*euler(0,0,0),.3)
1025
LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
1026
RH.C0=clerp(RH.C0,cf(.6,-.7,-.8)*euler(0,1.57,0)*euler(-.3,0,-1.2),.3)
1027
LH.C0=clerp(LH.C0,cf(-.5,-.8,-.2)*euler(0,-1.57,0)*euler(0,0,-.1)*euler(-.5,0,0),.3)
1028
end
1029
Torso.Velocity=vt(0,0,0)
1030
if RecentEnemy.Value~=nil then
1031
target,distance=findNearestTorso(Torso.Position)
1032
if target~=nil then
1033
BodGy.cframe=cf(Torso.Position,target.Position)
1034
end
1035
Torso.Velocity=RootPart.CFrame.lookVector*move*3
1036
refd=part(3,workspace,0,1,BrickColor.new("Black"),"Reference",vt())
1037
refd.Anchored=true
1038
game:GetService("Debris"):AddItem(refd,5)
1039
so("169445092",RightArm,1,1)
1040
for i=0,1,0.2 do
1041
swait()
1042
refd.CFrame=cf(posfloor)
1043
MagniDamage(RightArm,4,10,12,math.random(40,45),"Knockdown2",refd,.3,1,math.random(3,4),nil,nil)
1044
--MagniDamage(LeftArm,4,6,8,math.random(30,35),"Knockdown2",refd,.5,1,math.random(3,4),nil,nil)
1045
--[[Neck.C0=clerp(Neck.C0,necko*euler(0,-1.57,0),.3)
1046
RootJoint.C0=clerp(RootJoint.C0,cf(0,0,.2)*euler(0,-1.57,0),.3)
1047
if i<.6 then
1048
RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(0,0,1.57)*euler(0,3.14,0),.5)
1049
else
1050
RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(0,0,1.57)*euler(0,3.14,-1.2)*euler(-.5,0,0),.2)
1051
end
1052
RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
1053
LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(0,0,-1.57)*euler(0,0,1),.3)
1054
LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
1055
RH.C0=clerp(RH.C0,cf(.5,-1,.2)*euler(0,1.57,0)*euler(.2,-1.57,0),.2)
1056
LH.C0=clerp(LH.C0,cf(-.5,-1,-.2)*euler(0,-1.57,0)*euler(-.4,-1.57,0),.2)]]
1057
Neck.C0=clerp(Neck.C0,necko*euler(0,.1,0)*euler(0,0,0),.4)
1058
RootJoint.C0=clerp(RootJoint.C0,euler(0,-.5,0)*euler(0,0,0)*cf(0,.6,0),.4)
1059
RW.C0=clerp(RW.C0,cf(1,0.5,-.5)*euler(1.8,0,-.8)*euler(0,0,0),.4)
1060
RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.4)
1061
LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(-.5,0,-.7)*euler(0,0,0),.4)
1062
LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.4)
1063
RH.C0=clerp(RH.C0,cf(.5,-.5,0)*euler(0,1.57,0)*euler(-.2,0,0),.4)
1064
LH.C0=clerp(LH.C0,cf(-.5,-.5,0)*euler(0,-1.57,0)*euler(-.2,0,0),.4)
1065
end
1066
for i=0,1,0.1 do
1067
swait()
1068
MagniDamage(RightArm,4,10,12,math.random(40,45),"Knockdown2",refd,.3,1,math.random(3,4),nil,nil)
1069
Torso.Velocity=vt(0,60,0)
1070
Neck.C0=clerp(Neck.C0,necko*euler(0,.1,0)*euler(0,0,0),.3)
1071
RootJoint.C0=clerp(RootJoint.C0,euler(0,0,0)*euler(0,0,0)*cf(0,0,0),.3)
1072
RootJoint.C1=RootJoint.C1*euler(0,.5,0)
1073
RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(2.5,0,-.2)*euler(0,0,0),.3)
1074
RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
1075
LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(-.5,0,-1)*euler(0,0,0),.3)
1076
LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
1077
RH.C0=clerp(RH.C0,cf(.5,-.5,0)*euler(0,1.57,0)*euler(-.2,0,-.2),.3)
1078
LH.C0=clerp(LH.C0,cf(-.5,-.5,0)*euler(0,-1.57,0)*euler(-.2,0,.2),.3)
1079
end
1080
refd.Parent=nil
1081
RootJoint.C1=cf(0,0,0)
1082
end
1083
--swait(100)
1084
attack=false
1085
end
1086
1087
function MultiKick()
1088
attack=true
1089
for i=0,1,0.1 do
1090
swait()
1091
Neck.C0=clerp(Neck.C0,necko*euler(.1,.7,0)*euler(0,0,0),.3)
1092
RootJoint.C0=clerp(RootJoint.C0,euler(.1,.8,0)*euler(0,0,0)*cf(0,.6,0),.3)
1093
RW.C0=clerp(RW.C0,cf(1.3,0.4,.3)*euler(.4,0,.4)*euler(0,-.5,0),.3)
1094
RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
1095
LW.C0=clerp(LW.C0,cf(-1.3,0.5,-.2)*euler(1,0,.2)*euler(0,1,0),.3)
1096
LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
1097
RH.C0=clerp(RH.C0,cf(.7,-.7,-.5)*euler(0,1.57,0)*euler(0,-.3,-.6)*euler(.05,0,0),.3)
1098
LH.C0=clerp(LH.C0,cf(-.6,-.6,-.8)*euler(0,-1.57,0)*euler(0,.2,-.4)*euler(.2,0,0),.3)
1099
end
1100
Look=RootPart.CFrame.lookVector*move*2
1101
local n=8
1102
for i=0,1,0.04 do
1103
swait()
1104
n=n+1
1105
if n>=8 then
1106
n=0
1107
so("169445073",LeftLeg,1,1.2)
1108
end
1109
Torso.Velocity=Look
1110
MagniDamage(LeftLeg,2,5,7,math.random(5,10),"Knockdown2",RootPart,.2,2,math.random(4,5),nil,nil)
1111
Neck.C0=clerp(Neck.C0,necko*euler(-.1,0,0)*euler(0,0,0),.3)
1112
RootJoint.C0=clerp(RootJoint.C0,euler(0,0,0)*euler(0,0,0)*cf(0,0,0),.3)
1113
RootJoint.C1=RootJoint.C1*euler(0,.6,0)
1114
RW.C0=clerp(RW.C0,cf(1,0.4,.5)*euler(1.2,0,.4)*euler(0,0,0),.3)
1115
RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
1116
LW.C0=clerp(LW.C0,cf(-1,0.4,.5)*euler(1.2,0,-.4)*euler(0,0,0),.3)
1117
LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
1118
RH.C0=clerp(RH.C0,cf(.7,-.5,-.7)*euler(0,1.57,0)*euler(0,-.3,-1)*euler(0,0,0),.3)
1119
LH.C0=clerp(LH.C0,cf(-.6,-.6,-.5)*euler(0,-1.57,0)*euler(0,.2,-1.5)*euler(.2,0,0),.3)
1120
end
1121
if RecentEnemy.Value~=nil then
1122
RecentEnemy.Value=nil
1123
target,distance=findNearestTorso(Torso.Position)
1124
if target~=nil then
1125
RootPart.CFrame=cf(RootPart.Position,target.Position)
1126
end
1127
Look=RootPart.CFrame.lookVector*move
1128
for i=0,1,0.04 do
1129
swait()
1130
n=n+1
1131
if n>=8 then
1132
n=0
1133
so("169445073",LeftLeg,1,1.2)
1134
end
1135
Torso.Velocity=Look
1136
MagniDamage(LeftLeg,2,5,7,math.random(5,10),"Knockdown2",RootPart,.2,2,math.random(4,5),nil,nil)
1137
Neck.C0=clerp(Neck.C0,necko*euler(-.1,0,0)*euler(0,0,0),.3)
1138
RootJoint.C0=clerp(RootJoint.C0,euler(0,0,0)*euler(0,0,0)*cf(0,0,0),.3)
1139
RootJoint.C1=RootJoint.C1*euler(0,.6,0)
1140
RW.C0=clerp(RW.C0,cf(1,0.4,.5)*euler(1.2,0,.4)*euler(0,0,0),.3)
1141
RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
1142
LW.C0=clerp(LW.C0,cf(-1,0.4,.5)*euler(1.2,0,-.4)*euler(0,0,0),.3)
1143
LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
1144
RH.C0=clerp(RH.C0,cf(.7,-.5,-.7)*euler(0,1.57,0)*euler(0,-.3,-1)*euler(0,0,0),.3)
1145
LH.C0=clerp(LH.C0,cf(-.6,-.6,-.5)*euler(0,-1.57,0)*euler(0,.2,-1.5)*euler(.2,0,0),.3)
1146
end
1147
Torso.Velocity=vt(0,0,0)
1148
end
1149
RootJoint.C1=cf(0,0,0)
1150
attack=false
1151
end
1152
1153
function JumpKick()
1154
attack=true
1155
for i=0,1,0.1 do
1156
swait()
1157
Neck.C0=clerp(Neck.C0,necko*euler(-.4,0,0),.3)
1158
RootJoint.C0=clerp(RootJoint.C0,cf(0,1,0)*euler(0,0,0),.3)
1159
RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(0,0,1.2),.3)
1160
LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(0,0,-1.2),.3)
1161
RH.C0=clerp(RH.C0,cf(.5,-1,0)*euler(-1.2,1.57,0),.3)
1162
LH.C0=clerp(LH.C0,cf(-.6,-.5,-0.5)*euler(-0.2,-1.3,0),.3)
1163
end
1164
Torso.Velocity=vt(0,100,0)
1165
jump=true
1166
local dec=Instance.new("NumberValue",Decrease)
1167
dec.Name="DecreaseMvmt"
1168
dec.Value=-.4
1169
for i=0,1,0.05 do
1170
swait()
1171
Neck.C0=clerp(Neck.C0,necko*euler(-.1,0,0)*euler(0,0,0),.2)
1172
RootJoint.C0=clerp(RootJoint.C0,euler(0,0,0)*euler(0,0,0)*cf(0,4,-3),.2)
1173
RootJoint.C1=RootJoint.C1*euler(-.32,0,0)
1174
RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(-.2,0,1)*euler(0,0,0),.2)
1175
RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.2)
1176
LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(-.2,0,-1)*euler(0,0,0),.2)
1177
LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.2)
1178
RH.C0=clerp(RH.C0,cf(.7,-.5,-.7)*euler(0,1.57,0)*euler(0,-.3,-1)*euler(0,0,0),.2)
1179
LH.C0=clerp(LH.C0,cf(-.6,-.6,-.5)*euler(0,-1.57,0)*euler(0,.2,-1.8)*euler(.2,0,0),.2)
1180
end
1181
while hitfloor==nil do
1182
swait()
1183
MagniDamage(LeftLeg,5,8,10,math.random(15,25),"Knockdown2",RootPart,.2,2,math.random(8,10),nil,nil)
1184
MagniDamage(RightLeg,5,8,10,math.random(15,25),"Knockdown2",RootPart,.2,2,math.random(8,10),nil,nil)
1185
end
1186
jump=false
1187
dec.Parent=nil
1188
RootJoint.C1=cf(0,0,0)
1189
attack=false
1190
end
1191
1192
function EnergyBlam()
1193
attack=true
1194
for i=0,1,0.1 do
1195
swait()
1196
Neck.C0=clerp(Neck.C0,necko*euler(0,-1,0)*euler(-.2,0,0),.3)
1197
RootJoint.C0=clerp(RootJoint.C0,euler(0,-1,0)*cf(0,.4,0),.3)
1198
RW.C0=clerp(RW.C0,cf(1.3,0.5,-.2)*euler(1.4,0,-.5)*euler(0,0,0),.3)
1199
RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
1200
LW.C0=clerp(LW.C0,cf(-1.3,0.5,-.2)*euler(1.4,0,.5)*euler(0,0,0),.3)
1201
LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
1202
RH.C0=clerp(RH.C0,cf(.7,-.8,-.4)*euler(0,1.57,0)*euler(0,.5,-.1),.3)
1203
LH.C0=clerp(LH.C0,cf(-.4,-.9,0)*euler(0,-1.57,0)*euler(0,-1,.2),.3)
1204
end
1205
so("2101137",Torso,1,1) 
1206
for i=0,1,0.05 do
1207
swait()
1208
MagicCircle(BrickColor.new("Bright blue"),Torso.CFrame*cf(0,0,-2),1,1,1,1,1,1,.1)
1209
MagicCircle(BrickColor.new("White"),Torso.CFrame*cf(0,0,-2),1,1,1,.5,.5,.5,.1)
1210
end
1211
for i=0,1,0.1 do
1212
swait()
1213
MagicCircle(BrickColor.new("Bright blue"),Torso.CFrame*cf(0,.5,-2),1,1,1,1,1,1,.1)
1214
MagicCircle(BrickColor.new("White"),Torso.CFrame*cf(0,.5,-2),1,1,1,.5,.5,.5,.1)
1215
Neck.C0=clerp(Neck.C0,necko*euler(0,0,0)*euler(0,0,0),.3)
1216
RootJoint.C0=clerp(RootJoint.C0,euler(0,0,0)*cf(0,.4,0),.3)
1217
RW.C0=clerp(RW.C0,cf(1,0.5,-.5)*euler(1.5,0,-.5)*euler(0,0,0),.3)
1218
RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
1219
LW.C0=clerp(LW.C0,cf(-1,0.5,-.5)*euler(1.5,0,.5)*euler(0,0,0),.3)
1220
LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
1221
RH.C0=clerp(RH.C0,cf(.7,-.8,-.4)*euler(0,1.57,0)*euler(0,0,-.1),.3)
1222
LH.C0=clerp(LH.C0,cf(-.4,-.9,0)*euler(0,-1.57,0)*euler(0,0,.2),.3)
1223
end
1224
ref=part(3,workspace,0,1,BrickColor.new("Black"),"Reference",vt())
1225
ref.Anchored=false
1226
--ref.CFrame=cf(head.Position)
1227
local rwld=weld(Torso,Torso,ref,cf(0,.5,-2.5))
1228
game:GetService("Debris"):AddItem(ref,10)
1229
ref2=part(3,workspace,0,1,BrickColor.new("Black"),"Reference",vt())
1230
ref2.Anchored=false
1231
--ref.CFrame=cf(head.Position)
1232
game:GetService("Debris"):AddItem(ref2,10)
1233
local tehCF=nil
1234
--[[target,distance=findNearestTorso(Torso.Position)
1235
if target~=nil then]]
1236
tehCF=cf(ref.Position,Mouse.Hit.p)
1237
--end
1238
nuh=5
1239
for i=0,1,0.05 do
1240
swait()
1241
nuh=nuh+1
1242
if nuh>=5 then
1243
nuh=0
1244
so("169380505",ref2,1,1.5) 
1245
end
1246
--[[target,distance=findNearestTorso(Torso.Position)
1247
if target~=nil then]]
1248
hit,pos=rayCast(ref.Position,tehCF.lookVector,100,Character)
1249
local mag=(ref.Position-pos).magnitude 
1250
MagicCylinder3(BrickColor.new("White"),CFrame.new((ref.Position+pos)/2,pos)*angles(1.57,0,0),6,mag*5,6,2,1,2,0.1)
1251
MagicCircle2(BrickColor.new("White"),cf(pos),10,10,10,10,10,10,.1)
1252
ref2.CFrame=cf(pos)
1253
MagniDamage(ref2,10,12,16,0,"Normal",ref2,.2,1,math.random(2,4),nil,nil,true)
1254
--end
1255
end
1256
ref.Parent=nil
1257
ref2.Parent=nil
1258
attack=false
1259
end
1260
1261
function DecreaseStat(Model,Stat,Amount,Duration)
1262
if Model:findFirstChild("Stats")~=nil then
1263
if Model.Stats[Stat]~=nil then
1264
Model.Stats[Stat].Value=Model.Stats[Stat].Value-Amount
1265
d=Instance.new("NumberValue",Model.Stats.Decrease)
1266
game:GetService("Debris"):AddItem(d,40)
1267
if Stat=="Damage" then
1268
d.Name="DecreaseAtk"
1269
elseif Stat=="Defense" then
1270
d.Name="DecreaseDef"
1271
elseif Stat=="Movement" then
1272
d.Name="DecreaseMvmt"
1273
end
1274
if Model:findFirstChild("Torso")~=nil then
1275
display=""
1276
if Stat=="Damage" then
1277
if Amount>0 then
1278
display="-Damage"
1279
else
1280
display="+Damage"
1281
end
1282
elseif Stat=="Defense" then
1283
if Amount>0 then
1284
display="-Defense"
1285
else
1286
display="+Defense"
1287
end
1288
elseif Stat=="Movement" then
1289
if Amount>0 then
1290
display="-Movement"
1291
else
1292
display="+Movement"
1293
end
1294
end
1295
showDamage(Model,display,"Debuff")
1296
end
1297
d.Value=Amount
1298
table.insert(Effects,{Model,"DecreaseStat",Stat,Amount,Duration,d})
1299
end
1300
end
1301
end
1302
1303
function rayCast(Pos, Dir, Max, Ignore)  -- Origin Position , Direction, MaxDistance , IgnoreDescendants
1304
return game:service("Workspace"):FindPartOnRay(Ray.new(Pos, Dir.unit * (Max or 999.999)), Ignore) 
1305
end 
1306
1307
--[[function findNearestTorso(pos)
1308
	local list = game.Workspace:children()
1309
	local torso = nil
1310
	local dist = 1000
1311
	local temp = nil
1312
	local human = nil
1313
	local temp2 = nil
1314
	for x = 1, #list do
1315
		temp2 = list[x]
1316
		if (temp2.className == "Model") and (temp2.Name~=bName) then
1317
			temp = temp2:findFirstChild("Torso")
1318
			human = temp2:findFirstChild("Humanoid")
1319
			if (temp ~= nil) and (human ~= nil) and (human.Health > 0) then
1320
				if btarget.Value==nil then
1321
				if (temp.Position - pos).magnitude < dist then
1322
					local dohit=true
1323
					if temp2:findFirstChild("Stats")~=nil then if temp2.Stats:findFirstChild("Boss")~=nil then if temp2.Stats.Boss.Value==true then dohit=false end end end
1324
					if temp2:findFirstChild("Alive")==nil then dohit=false end
1325
					if dohit==true then
1326
					torso = temp
1327
					dist = (temp.Position - pos).magnitude
1328
					end
1329
				end
1330
				else
1331
				if btarget.Value.Parent~=nil then
1332
				if btarget.Value:findFirstChild("Torso")~=nil then
1333
				if btarget.Value:findFirstChild("Humanoid")~=nil then
1334
				if btarget.Value.Humanoid.Health<=0 then
1335
				btarget.Value=nil
1336
				end
1337
				end
1338
				if btarget.Value~=nil then
1339
				torso=btarget.Value.Torso
1340
				dist = (torso.Position - pos).magnitude
1341
				end
1342
				end
1343
				else
1344
				btarget.Value=nil
1345
				end
1346
				end
1347
			end
1348
		end
1349
	end
1350
	return torso,dist
1351
end]]
1352
findNearestTorso = function(pos)
1353
	local list = (game.Workspace:children())
1354
	local torso = nil
1355
	local dist = 1000
1356
	local temp, human, temp2 = nil, nil, nil
1357
	for x = 1, #list do
1358
		temp2 = list[x]
1359
		if temp2.className == "Model" and temp2.Name ~= Character.Name then
1360
			temp = temp2:findFirstChild("Torso")
1361
			human = temp2:findFirstChild("Humanoid")
1362
			if temp ~= nil and human ~= nil and human.Health > 0 and (temp.Position - pos).magnitude < dist then
1363
				local dohit = true
1364
				if dohit == true then
1365
					torso = temp
1366
					dist = (temp.Position - pos).magnitude
1367
				end
1368
			end
1369
		end
1370
	end
1371
	return torso, dist
1372
end
1373
function findRandomTorso(pos)
1374
	local list = game.Workspace:children()
1375
	local torso = nil
1376
	local dist = 1000
1377
	local temp = nil
1378
	local human = nil
1379
	local temp2 = nil
1380
	local list2 = {}
1381
	for x = 1, #list do
1382
		temp2 = list[x]
1383
		if (temp2.className == "Model") and (temp2.Name~="Vanta") then
1384
			temp = temp2:findFirstChild("Torso")
1385
			human = temp2:findFirstChild("Humanoid")
1386
			if (temp ~= nil) and (human ~= nil) and (human.Health > 0) then
1387
				if pos.magnitude < dist then
1388
					torso = temp
1389
					table.insert(list2,temp)
1390
				end
1391
			end
1392
		end
1393
	end
1394
	if #list2>0 then
1395
	rand=math.random(1,#list2)
1396
	return list2[rand],dist
1397
	else
1398
	return nil,dist
1399
	end
1400
end
1401
1402
Damagefunc=function(hit,minim,maxim,knockback,Type,Property,Delay,KnockbackType,incstun,stagger,staghit,ranged,DecreaseState,DecreaseAmount,Duration,Sound)
1403
if hit.Parent==nil then
1404
return
1405
end
1406
h=hit.Parent:FindFirstChild("Humanoid")
1407
for _,v in pairs(hit.Parent:children()) do
1408
if v:IsA("Humanoid") then
1409
h=v
1410
end
1411
end
1412
if hit.Parent.Parent:FindFirstChild("Torso")~=nil then
1413
h=hit.Parent.Parent:FindFirstChild("Humanoid")
1414
end
1415
if hit.Parent.className=="Hat" then
1416
hit=hit.Parent.Parent:findFirstChild("Head")
1417
end
1418
if h~=nil and hit.Parent.Name~=Character.Name and hit.Parent:FindFirstChild("Torso")~=nil then
1419
if hit.Parent:findFirstChild("DebounceHit")~=nil then if hit.Parent.DebounceHit.Value==true then return end end
1420
if hit.Parent:findFirstChild("Stats")~=nil then if hit.Parent.Stats:findFirstChild("Boss")~=nil then if hit.Parent.Stats.Boss.Value==true then return end end end
1421
RecentEnemy.Value=hit.Parent
1422
game:GetService("Debris"):AddItem(c,.5)
1423
minim=minim*Atk.Value
1424
maxim=maxim*Atk.Value
1425
Damage=0
1426
if minim==maxim or minim>maxim then
1427
Damage=maxim
1428
else
1429
Damage=math.random(minim,maxim)
1430
end
1431
blocked=false
1432
enblock=nil
1433
Stats=hit.Parent:findFirstChild("Stats")
1434
if Stats~=nil then
1435
enblock=Stats:findFirstChild("Block")
1436
if enblock~=nil then
1437
if enblock.Value==true then
1438
blocked=true
1439
end
1440
end
1441
if Stats:findFirstChild("Defense")~=nil then
1442
Damage=Damage/(Stats.Defense.Value)
1443
if Damage<=3 and (ranged==false or ranged==nil) and blocked~=true then
1444
hitnum=math.random(1,3)
1445
if hitnum==1 then so("169380525",hit,1,math.random(80,120)/100)
1446
elseif hitnum==2 then so("169380538",hit,1,math.random(80,120)/100)
1447
elseif hitnum==3 then so("169380528",hit,1,math.random(80,120)/100)
1448
end
1449
--[[if hitnum==1 then so("199149321",hit,1,1)
1450
elseif hitnum==2 then so("199149338",hit,1,1)
1451
elseif hitnum==3 then so("199149367",hit,1,1)
1452
elseif hitnum==4 then so("199149409",hit,1,1)
1453
elseif hitnum==5 then so("199149452",hit,1,1)
1454
end]]
1455
elseif ranged==false or ranged==nil and blocked~=true then
1456
hitnum=math.random(1,3)
1457
if hitnum==1 then so("169380525",hit,1,math.random(80,120)/100)
1458
elseif hitnum==2 then so("169380538",hit,1,math.random(80,120)/100)
1459
elseif hitnum==3 then so("169380528",hit,1,math.random(80,120)/100)
1460
end
1461
--[[if hitnum==1 then so("199149137",hit,1,1)
1462
elseif hitnum==2 then so("199149186",hit,1,1)
1463
elseif hitnum==3 then so("199149221",hit,1,1)
1464
elseif hitnum==4 then so("199149235",hit,1,1)
1465
elseif hitnum==5 then so("199149269",hit,1,1)
1466
elseif hitnum==6 then so("199149297",hit,1,1)
1467
end]]
1468
end
1469
end
1470
if Stats:findFirstChild("Stun")~=nil then
1471
if blocked==true then
1472
incstun=math.floor(incstun/2)
1473
end
1474
Stats.Stun.Value=Stats.Stun.Value+incstun
1475
end
1476
if Stats:findFirstChild("Stagger")~=nil then
1477
if stagger==true then
1478
Stats.Stagger.Value=true
1479
end
1480
end
1481
end
1482
if blocked==true then
1483
showDamage(hit.Parent,"Block","Damage")
1484
hitnum=math.random(1,2)
1485
if hitnum==1 then so("199148933",hit,1,1)
1486
elseif hitnum==2 then so("199148947",hit,1,1)
1487
end
1488
enblock.Value=false
1489
else
1490
Damage=math.floor(Damage)
1491
h.Health=h.Health-Damage
1492
--[[coroutine.resume(coroutine.create(function(Hum,Dam)
1493
damageFunc:InvokeServer(Hum,Dam)
1494
end),h,Damage)]]
1495
showDamage(hit.Parent,Damage,"Damage")
1496
if DecreaseState~=nil then
1497
if DecreaseState=="Shatter" then
1498
DecreaseStat(hit.Parent,"Movement",DecreaseAmount,Duration)
1499
DecreaseStat(hit.Parent,"Damage",DecreaseAmount,Duration)
1500
else
1501
DecreaseStat(hit.Parent,DecreaseState,DecreaseAmount,Duration)
1502
end
1503
end
1504
if Type=="Knockdown" then
1505
hum=hit.Parent.Humanoid
1506
hum.PlatformStand=true
1507
coroutine.resume(coroutine.create(function(HHumanoid)
1508
swait(1)
1509
HHumanoid.PlatformStand=false
1510
end),hum)
1511
local angle=(hit.Position-(Property.Position+Vector3.new(0,0,0))).unit
1512
--hit.CFrame=cf(hit.Position,Vector3.new(angle.x,hit.Position.y,angle.z))*CFrame.fromEulerAnglesXYZ(math.pi/4,0,0)
1513
local bodvol=Instance.new("BodyVelocity")
1514
bodvol.velocity=angle*knockback
1515
bodvol.P=5000
1516
bodvol.maxForce=Vector3.new(8e+003, 8e+003, 8e+003)
1517
bodvol.Parent=hit
1518
rl=Instance.new("BodyAngularVelocity")
1519
rl.P=3000
1520
rl.maxTorque=Vector3.new(500000,500000,500000)*50000000000000
1521
rl.angularvelocity=Vector3.new(math.random(-10,10),math.random(-10,10),math.random(-10,10))
1522
rl.Parent=hit
1523
game:GetService("Debris"):AddItem(bodvol,.5)
1524
game:GetService("Debris"):AddItem(rl,.5)
1525
elseif Type=="Shatter" then
1526
for i=1,10 do
1527
BreakEffect(BrickColor.new("Cyan"),hit.CFrame,math.random(20,80)/100,math.random(2,10),math.random(20,80)/100)
1528
end
1529
elseif Type=="Knockdown2" then
1530
hum=hit.Parent.Humanoid
1531
local angle=(hit.Position-(Property.Position+Vector3.new(0,0,0))).unit
1532
local bodvol=Instance.new("BodyVelocity")
1533
bodvol.velocity=angle*knockback
1534
bodvol.P=5000
1535
bodvol.maxForce=Vector3.new(8e+003, 8e+003, 8e+003)
1536
bodvol.Parent=hit
1537
game:GetService("Debris"):AddItem(bodvol,.5)
1538
elseif Type=="Normal" then
1539
vp=Instance.new("BodyVelocity")
1540
vp.P=500
1541
vp.maxForce=Vector3.new(math.huge,0,math.huge)
1542
if KnockbackType==1 then
1543
vp.velocity=Property.CFrame.lookVector*knockback+Property.Velocity/1.05
1544
elseif KnockbackType==2 then
1545
vp.velocity=Property.CFrame.lookVector*knockback
1546
end
1547
game:GetService("Debris"):AddItem(vp,.5)
1548
if knockback>0 then
1549
vp.Parent=hit.Parent.Torso
1550
end
1551
end
1552
end
1553
debounce=Instance.new("BoolValue")
1554
debounce.Name="DebounceHit"
1555
debounce.Parent=hit.Parent
1556
debounce.Value=true
1557
game:GetService("Debris"):AddItem(debounce,Delay)
1558
CRIT=false
1559
end
1560
end
1561
1562
showDamage=function(Char,Dealt,Type)
1563
m=Instance.new("Model")
1564
m.Name="Effect"
1565
c=Instance.new("Part")
1566
c.Transparency=1
1567
c.Name="Head"
1568
c.TopSurface=0
1569
c.BottomSurface=0
1570
c.formFactor="Plate"
1571
c.Size=Vector3.new(1,.4,1)
1572
b=Instance.new("BillboardGui",c)
1573
b.Size=UDim2.new(5,0,5,0)
1574
b.AlwaysOnTop=true
1575
damgui=gui("TextLabel",b,tostring(Dealt),1,Color3.new(0,0,0),UDim2.new(0,0,0,0),UDim2.new(1,0,1,0))
1576
if Type=="Damage" then
1577
damgui.Font="SourceSans"
1578
if Dealt=="Block" then
1579
damgui.TextColor3=BrickColor.new("Bright blue").Color
1580
elseif Dealt<3 then
1581
damgui.TextColor3=BrickColor.new("White").Color
1582
elseif Dealt>=3 and Dealt<20 then
1583
damgui.TextColor3=BrickColor.new("Bright yellow").Color
1584
else
1585
damgui.TextColor3=BrickColor.new("Really red").Color
1586
damgui.Font="SourceSansBold"
1587
end
1588
elseif Type=="Debuff" then
1589
damgui.TextColor3=BrickColor.new("White").Color
1590
elseif Type=="Interrupt" then
1591
damgui.TextColor3=BrickColor.new("New Yeller").Color
1592
end
1593
--damgui.FontSize="Size48"
1594
damgui.TextScaled=true
1595
ms=Instance.new("CylinderMesh")
1596
ms.Scale=Vector3.new(.8,.8,.8)
1597
ms.Parent=c
1598
c.Reflectance=0
1599
Instance.new("BodyGyro").Parent=c
1600
c.Parent=m
1601
if Char:findFirstChild("Head")~=nil then
1602
c.CFrame=cf(Char["Head"].CFrame.p+Vector3.new(math.random(-100,100)/100,3,math.random(-100,100)/100))
1603
elseif Char.Parent:findFirstChild("Head")~=nil then
1604
c.CFrame=cf(Char.Parent["Head"].CFrame.p+Vector3.new(math.random(-100,100)/100,3,math.random(-100,100)/100))
1605
end
1606
f=Instance.new("BodyPosition")
1607
f.P=2000
1608
f.D=100
1609
f.maxForce=Vector3.new(math.huge,math.huge,math.huge)
1610
if Type=="Damage" then
1611
f.position=c.Position+Vector3.new(0,3,0)
1612
elseif Type=="Debuff" or Type=="Interrupt" then
1613
f.position=c.Position+Vector3.new(0,5,0)
1614
end
1615
f.Parent=c
1616
game:GetService("Debris"):AddItem(m,5)
1617
table.insert(Effects,{m,"showDamage",damgui,f,10,1,15,50,100})
1618
c.CanCollide=false
1619
m.Parent=workspace
1620
c.CanCollide=false
1621
end
1622
1623
function MagniDamage(Part,magni,minim,maxim,knockback,Type,Property,Delay,KnockbackType,incstun,stagger,staghit,ranged,DecreaseState,DecreaseAmount,Duration)
1624
for _,c in pairs(workspace:children()) do
1625
local hum=c:findFirstChild("Humanoid")
1626
if hum~=nil then
1627
local head=nil
1628
for _,d in pairs(c:children()) do
1629
--if d.Name=="Torso" or d.Name=="Head" or d.Name=="HumanoidRootPart" or d.Name=="HitPart" then
1630
--[[if d.className=="Model" and ranged~=true then
1631
head=d:findFirstChild("Hitbox")
1632
if d.Parent==Character then break end
1633
if head~=nil then
1634
local targ=head.Position-Part.Position
1635
local mag=targ.magnitude
1636
if mag<=magni then 
1637
ref=part(3,workspace,0,1,BrickColor.new("Black"),"Reference",vt())
1638
ref.Anchored=true
1639
ref.CFrame=cf(head.Position)
1640
game:GetService("Debris"):AddItem(ref,1)
1641
hitnum=math.random(1,5)
1642
if hitnum==1 then so("199148971",ref,1,1)
1643
elseif hitnum==2 then so("199149025",ref,1,1)
1644
elseif hitnum==3 then so("199149072",ref,1,1)
1645
elseif hitnum==4 then so("199149109",ref,1,1)
1646
elseif hitnum==5 then so("199149119",ref,1,1)
1647
end
1648
StaggerHit.Value=true
1649
end
1650
end
1651
end]]
1652
if d.className=="Part" then
1653
head=d
1654
if head~=nil then
1655
local targ=head.Position-Part.Position
1656
local mag=targ.magnitude
1657
if mag<=magni and c.Name~=Character then 
1658
if stun==nil then
1659
stun=math.random(5,10)
1660
end
1661
local Rang=nil
1662
if Ranged==false then
1663
Rang=true
1664
end
1665
local stag=nil
1666
if shbash==true then
1667
stag=true
1668
end
1669
Damagefunc(head,minim,maxim,knockback,Type,Property,Delay,KnockbackType,incstun,stagger,staghit,ranged,DecreaseState,DecreaseAmount,Duration)
1670
--Damagefunc(hit,minim,maxim,knockback,Type,Property,Delay,KnockbackType,incstun,stagger,staghit,DecreaseState,DecreaseAmount,Duration)
1671
end
1672
end
1673
end
1674
end
1675
end
1676
end
1677
end
1678
local hold = false
1679
function onKeyDown(key)
1680
if attack==false then
1681
if key=="z" then
1682
PunchSlam()
1683
elseif key=="x" then
1684
SweepCut()
1685
elseif key=="c" then
1686
MultiKick()
1687
elseif key=="v" then
1688
JumpKick()
1689
elseif key == "b" then
1690
EnergyBlam()
1691
--[[elseif key == "n" then
1692
GrandeurDash()
1693
elseif key == "m" then
1694
DeathImpact()
1695
elseif key == "f" then
1696
Jump()]]
1697
elseif key=="0" and hold == false then
1698
hold = true
1699
run.Parent=Decrease
1700
end
1701
end
1702
end
1703
function onKeyUp(key)
1704
if attack==false then
1705
if key=="0" and hold == true then
1706
hold = false
1707
run.Parent=nil
1708
end
1709
end
1710
end
1711
Mouse.KeyDown:connect(onKeyDown)
1712
Mouse.KeyUp:connect(onKeyUp)
1713
local stunnum=0
1714
local animnum=0
1715
local idle=1
1716
local animlimit=5
1717
local target,distance=nil,nil
1718
local attacking=false
1719
local stunanim=false
1720
while Humanoid.Health>0 do
1721
swait()
1722
--[[print(target)
1723
print(distance)]]
1724
hitbox2.Parent=hitbox.Parent
1725
hitbox2.Size=hitbox.Size
1726
hitbox2.CFrame=hitboxCF
1727
--[[for _,c in pairs(Character:children()) do
1728
for _,v in pairs(c:children()) do
1729
if v.className=="BodyGyro" or v.className=="BodyPosition" or v.className=="BodyVelocity" or v.className=="BodyAngularVelocity" then
1730
if v.Name~="SiegmundGyro" and v.Name~="SiegmundPos" then
1731
print("dai")
1732
v.Parent=nil
1733
end
1734
end
1735
end
1736
end]]
1737
coroutine.resume(coroutine.create(function()
1738
if start==false then
1739
start=true
1740
StartAnim()
1741
end
1742
end))
1743
if attack==false then
1744
BodGy.cframe=cf(Torso.Position,Mouse.Hit.p)
1745
end
1746
target,distance=findNearestTorso(Torso.Position)
1747
--[[if target~=nil then
1748
if attack==false then
1749
BodGy.cframe=cf(Torso.Position,target.Position)
1750
end
1751
numb1=RootPart.Position.y
1752
numb2=target.Position.y
1753
if numb2-numb1>=5 or numb2-numb1<=-5 then
1754
if distance<=30 then
1755
if attack==false then
1756
attackrand=math.random(1,20)
1757
if attackrand==1 then
1758
coroutine.resume(coroutine.create(function()
1759
RecentEnemy.Value=nil
1760
JumpKick()
1761
end))
1762
end
1763
end
1764
end
1765
end
1766
if distance>30 then --far range
1767
Humanoid:MoveTo(target.Position)
1768
run.Parent=Decrease
1769
if attack==false then
1770
attackrand=math.random(1,70)
1771
if attackrand==1 then
1772
coroutine.resume(coroutine.create(function()
1773
RecentEnemy.Value=nil
1774
EnergyBlam()
1775
--[[d=math.random(1,3)
1776
if d==1 then
1777
PunchSlam()
1778
elseif d==2 then
1779
SweepCut()
1780
elseif d==3 then
1781
MultiKick()
1782
end
1783
end))
1784
--[[coroutine.resume(coroutine.create(function()
1785
buffdef.Parent=Decrease
1786
atk=0
1787
if stompcooldown<=0 then
1788
atk=3
1789
else
1790
atk=math.random(1,2)
1791
end
1792
if atk==1 then
1793
Jump()
1794
elseif atk==2 then
1795
GrandeurDash()
1796
elseif atk==3 then
1797
DeathImpact()
1798
end
1799
buffdef.Parent=nil
1800
end))
1801
end
1802
end
1803
elseif distance<=30 and distance>=5 then --mid range
1804
move=distance*3
1805
Humanoid:MoveTo(target.Position)
1806
run.Parent=nil
1807
if attack==false then
1808
attackrand=math.random(1,20)
1809
if attackrand==1 then
1810
coroutine.resume(coroutine.create(function()
1811
RecentEnemy.Value=nil
1812
d=math.random(1,3)
1813
if d==1 then
1814
PunchSlam()
1815
elseif d==2 then
1816
SweepCut()
1817
elseif d==3 then
1818
MultiKick()
1819
end
1820
end))
1821
--[[coroutine.resume(coroutine.create(function()
1822
buffdef.Parent=Decrease
1823
atk=0
1824
if stompcooldown<=0 then
1825
atk=3
1826
else
1827
atk=math.random(1,2)
1828
end
1829
if atk==1 then
1830
HeavySlam()
1831
elseif atk==2 then
1832
GrandeurDash()
1833
elseif atk==3 then
1834
DeathImpact()
1835
end
1836
buffdef.Parent=nil
1837
end))
1838
end
1839
end
1840
else --close range
1841
move=10
1842
Humanoid:MoveTo(RootPart.Position)
1843
run.Parent=nil
1844
--run.Parent=nil
1845
if attack==false then
1846
attackrand=math.random(1,20)
1847
if attackrand==1 then
1848
coroutine.resume(coroutine.create(function()
1849
RecentEnemy.Value=nil
1850
d=math.random(1,3)
1851
if d==1 then
1852
PunchSlam()
1853
elseif d==2 then
1854
SweepCut()
1855
elseif d==3 then
1856
MultiKick()
1857
end
1858
end))
1859
--[[coroutine.resume(coroutine.create(function()
1860
buffdef.Parent=Decrease
1861
HeavyCombo("Stun")
1862
buffdef.Parent=nil
1863
end))
1864
end
1865
end
1866
end
1867
end]]
1868
if Mvmt.Value<0 or Stun.Value>=100 or attack==true then
1869
Humanoid.WalkSpeed=0
1870
if jump==true then
1871
Humanoid.WalkSpeed=16*Mvmt.Value
1872
end
1873
else
1874
Humanoid.WalkSpeed=16*Mvmt.Value
1875
end
1876
if Stun.Value>=100 and stunanim==false then
1877
coroutine.resume(coroutine.create(function()
1878
stunanim=true
1879
while attack==true do
1880
swait()
1881
end
1882
StunAnim()
1883
Stun.Value=0
1884
stunanim=false
1885
end))
1886
end
1887
local stunnum2=80
1888
if stunnum>=stunnum2 then
1889
if Stun.Value>0 then
1890
Stun.Value=Stun.Value-1
1891
end
1892
stunnum=0
1893
end
1894
stunnum=stunnum+1
1895
local torvel=(RootPart.Velocity*Vector3.new(1,0,1)).magnitude 
1896
local velderp=RootPart.Velocity.y
1897
hitfloor,posfloor=rayCast(RootPart.Position,(CFrame.new(RootPart.Position,RootPart.Position - Vector3.new(0,1,0))).lookVector,10,Character)
1898
for _,c in pairs(Decrease:children()) do
1899
if c:findFirstChild("Duration")~=nil then
1900
c.Duration.Value=c.Duration.Value-1
1901
if c.Duration.Value<=0 then
1902
c.Parent=nil
1903
end
1904
end
1905
if c.Name=="DecreaseAtk" then
1906
decreaseatk=decreaseatk+c.Value
1907
elseif c.Name=="DecreaseDef" then
1908
decreasedef=decreasedef+c.Value
1909
elseif c.Name=="DecreaseMvmt" then
1910
decreasemvmt=decreasemvmt+c.Value
1911
end
1912
end
1913
Atk.Value=1-decreaseatk
1914
if Atk.Value<=0 then
1915
Atk.Value=0
1916
end
1917
Def.Value=1-decreasedef
1918
if Def.Value<=0 then
1919
Def.Value=0.01
1920
end
1921
Mvmt.Value=1-decreasemvmt
1922
if Mvmt.Value<=0 then
1923
Mvmt.Value=0
1924
end
1925
decreaseatk=0
1926
decreasedef=0
1927
decreasemvmt=0
1928
AtkVal=Atk.Value*100
1929
AtkVal=math.floor(AtkVal)
1930
AtkVal=AtkVal/100
1931
DefVal=Def.Value*100
1932
DefVal=math.floor(DefVal)
1933
DefVal=DefVal/100
1934
MvmtVal=Mvmt.Value*100
1935
MvmtVal=math.floor(MvmtVal)
1936
MvmtVal=MvmtVal/100
1937
if MvmtVal<=0 then
1938
MvmtVal=0
1939
end
1940
animnum=animnum+1
1941
if animnum>=animlimit*5 then
1942
idle=1
1943
animnum=0
1944
elseif animnum>=animlimit*4 then
1945
idle=1
1946
animnum=0
1947
elseif animnum>=animlimit*3 then
1948
idle=4
1949
elseif animnum>=animlimit*2 then
1950
idle=3
1951
elseif animnum>=animlimit*1 then
1952
idle=2
1953
end
1954
if RootPart.Velocity.y > 1 and hitfloor==nil then 
1955
Anim="Jump"
1956
if attack==false then
1957
Neck.C0=clerp(Neck.C0,necko*euler(.1,0,0),.3)
1958
RootJoint.C0=clerp(RootJoint.C0,euler(-.1,0,0),.3)
1959
RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(-.5,0,1),.3)
1960
RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
1961
LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(-.5,0,-1),.3)
1962
LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
1963
RH.C0=clerp(RH.C0,cf(.5,-1,-.3)*euler(-0.5,1.57,0)*euler(-.2,0,0),.2)
1964
LH.C0=clerp(LH.C0,cf(-.5,-1,-.3)*euler(-0.5,-1.57,0)*euler(-.2,0,0),.2)
1965
end
1966
elseif RootPart.Velocity.y < -1 and hitfloor==nil then 
1967
Anim="Fall"
1968
if attack==false then
1969
Neck.C0=clerp(Neck.C0,necko*euler(-.4,0,0),.3)
1970
RootJoint.C0=clerp(RootJoint.C0,euler(.2,0,0),.3)
1971
RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(-.3,0,0.2),.3)
1972
RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
1973
LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(-.3,0,-0.2),.3)
1974
LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
1975
RH.C0=clerp(RH.C0,cf(.5,-1,0)*euler(0.4,1.57,0),.2)
1976
LH.C0=clerp(LH.C0,cf(-.5,-1,0)*euler(-0.2,-1.57,0),.2)
1977
end
1978
elseif torvel<1 and hitfloor~=nil then
1979
Anim="Idle"
1980
animlimit=15
1981
if attack==false then
1982
if idle==1 or idle==2 then
1983
Neck.C0=clerp(Neck.C0,necko*euler(0,.5,0)*euler(0,0,0),.1)
1984
RootJoint.C0=clerp(RootJoint.C0,euler(0,.5,0)*cf(0,.4,0),.1)
1985
RW.C0=clerp(RW.C0,cf(1.3,0.4,.3)*euler(1,0,.2)*euler(0,-.5,0),.1)
1986
RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.1)
1987
LW.C0=clerp(LW.C0,cf(-1.3,0.5,-.2)*euler(1.4,0,.5)*euler(0,1,0),.1)
1988
LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.1)
1989
RH.C0=clerp(RH.C0,cf(.6,-.9,0)*euler(0,1.57,0)*euler(0,-.1,-.05),.1)
1990
LH.C0=clerp(LH.C0,cf(-.7,-.8,-.4)*euler(0,-1.57,0)*euler(0,.5,.1),.1)
1991
else
1992
Neck.C0=clerp(Neck.C0,necko*euler(.1,.5,0)*euler(0,0,0),.1)
1993
RootJoint.C0=clerp(RootJoint.C0,euler(.1,.5,0)*euler(0,0,0)*cf(0,.6,0),.1)
1994
RW.C0=clerp(RW.C0,cf(1.3,0.4,.3)*euler(.8,0,.4)*euler(0,-.5,0),.1)
1995
RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.1)
1996
LW.C0=clerp(LW.C0,cf(-1.3,0.5,-.2)*euler(1.6,0,.2)*euler(0,1,0),.1)
1997
LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.1)
1998
RH.C0=clerp(RH.C0,cf(.7,-.7,-.5)*euler(0,1.57,0)*euler(0,-.1,-.2)*euler(.05,0,0),.1)
1999
LH.C0=clerp(LH.C0,cf(-.6,-.6,-.8)*euler(0,-1.57,0)*euler(0,.5,.2)*euler(-.1,0,0),.1)
2000
end
2001
end
2002
elseif torvel>2 and torvel<20 and hitfloor~=nil then
2003
Anim="Walk"
2004
animlimit=10
2005
if attack==false then
2006
if idle==1 or idle==2 then
2007
RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.1)
2008
LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(-1.4,0,-.1)*euler(0,0,0),.1)
2009
LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.1)
2010
RH.C0=clerp(RH.C0,cf(.5,-1,0)*euler(0,1.57,0)*euler(0,0,-.5),.1)
2011
if idle==1 then
2012
Neck.C0=clerp(Neck.C0,necko*euler(.05,0,0)*euler(0,0,0),.1)
2013
RootJoint.C0=clerp(RootJoint.C0,euler(0,0,0)*cf(0,.1,0),.1)
2014
RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(1,0,0)*euler(0,0,0),.1)
2015
LH.C0=clerp(LH.C0,cf(-.5,-1,0)*euler(0,-1.57,0)*euler(0,0,-1.2),.1)
2016
elseif idle==2 then
2017
Neck.C0=clerp(Neck.C0,necko*euler(0,0,0)*euler(0,0,0),.1)
2018
RootJoint.C0=clerp(RootJoint.C0,euler(.2,0,0)*cf(0,.2,0),.1)
2019
RW.C0=clerp(RW.C0,cf(1.3,0.5,-.5)*euler(1.2,0,-.5)*euler(0,0,0),.1)
2020
LH.C0=clerp(LH.C0,cf(-.5,-.9,-.3)*euler(0,-1.57,0)*euler(0,0,0),.1)
2021
end
2022
else
2023
RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(-1.4,0,.1)*euler(0,0,0),.1)
2024
RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.1)
2025
LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.1)
2026
LH.C0=clerp(LH.C0,cf(-.5,-1,0)*euler(0,-1.57,0)*euler(0,0,.5),.1)
2027
if idle==3 then
2028
Neck.C0=clerp(Neck.C0,necko*euler(.05,0,0)*euler(0,0,0),.1)
2029
RootJoint.C0=clerp(RootJoint.C0,euler(0,0,0)*cf(0,.1,0),.1)
2030
LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(1,0,0)*euler(0,0,0),.1)
2031
RH.C0=clerp(RH.C0,cf(.5,-1,0)*euler(0,1.57,0)*euler(0,0,1.2),.1)
2032
elseif idle==4 then
2033
Neck.C0=clerp(Neck.C0,necko*euler(0,0,0)*euler(0,0,0),.1)
2034
RootJoint.C0=clerp(RootJoint.C0,euler(.2,0,0)*cf(0,.2,0),.1)
2035
LW.C0=clerp(LW.C0,cf(-1.3,0.5,-.5)*euler(1.2,0,.5)*euler(0,0,0),.1)
2036
RH.C0=clerp(RH.C0,cf(.5,-.9,-.3)*euler(0,1.57,0)*euler(0,0,0),.1)
2037
end
2038
end
2039
end
2040
elseif torvel>=20 and hitfloor~=nil then
2041
Anim="Run"
2042
animlimit=10
2043
if attack==false then
2044
if idle==1 or idle==2 then
2045
Neck.C0=clerp(Neck.C0,necko*euler(.2,0,0)*euler(0,0,0),.2)
2046
RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.2)
2047
LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.2)
2048
RH.C0=clerp(RH.C0,cf(.5,-1,0)*euler(0,1.57,0)*euler(-.2,0,-.8),.2)
2049
if idle==1 then
2050
RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(-1,0,.5)*euler(0,0,0),.2)
2051
LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(-1,0,-.5)*euler(0,0,0),.2)
2052
RootJoint.C0=clerp(RootJoint.C0,euler(.4,0,0)*cf(0,.3,0),.2)
2053
LH.C0=clerp(LH.C0,cf(-.5,-1,0)*euler(0,-1.57,0)*euler(0,0,-1.5),.2)
2054
elseif idle==2 then
2055
RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(-1.2,0,.3)*euler(0,0,0),.2)
2056
LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(-1.2,0,-.3)*euler(0,0,0),.2)
2057
RootJoint.C0=clerp(RootJoint.C0,euler(.5,0,0)*cf(0,.4,0),.1)
2058
LH.C0=clerp(LH.C0,cf(-.5,-.6,-.5)*euler(0,-1.57,0)*euler(0,0,-.5),.1)
2059
end
2060
else
2061
Neck.C0=clerp(Neck.C0,necko*euler(.2,0,0)*euler(0,0,0),.2)
2062
RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.2)
2063
LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.2)
2064
LH.C0=clerp(LH.C0,cf(-.5,-1,0)*euler(0,-1.57,0)*euler(-.2,0,.8),.2)
2065
if idle==3 then
2066
RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(-1,0,.5)*euler(0,0,0),.2)
2067
LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(-1,0,-.5)*euler(0,0,0),.2)
2068
RootJoint.C0=clerp(RootJoint.C0,euler(.4,0,0)*cf(0,.3,0),.2)
2069
RH.C0=clerp(RH.C0,cf(.5,-1,0)*euler(0,1.57,0)*euler(0,0,1.5),.2)
2070
elseif idle==4 then
2071
RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(-1.2,0,.3)*euler(0,0,0),.2)
2072
LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(-1.2,0,-.3)*euler(0,0,0),.2)
2073
RootJoint.C0=clerp(RootJoint.C0,euler(.5,0,0)*cf(0,.4,0),.1)
2074
RH.C0=clerp(RH.C0,cf(.5,-.6,-.5)*euler(0,1.57,0)*euler(0,0,.5),.1)
2075
end
2076
end
2077
end
2078
end
2079
if #Effects>0 then
2080
--table.insert(Effects,{prt,"Block1",delay})
2081
for e=1,#Effects do
2082
if Effects[e]~=nil then
2083
--for j=1,#Effects[e] do
2084
local Thing=Effects[e]
2085
if Thing~=nil then
2086
local Part=Thing[1]
2087
local Mode=Thing[2]
2088
local Delay=Thing[3]
2089
local IncX=Thing[4]
2090
local IncY=Thing[5]
2091
local IncZ=Thing[6]
2092
if Thing[2]=="DecreaseStat" then
2093
--table.insert(Effects,{Model,"DecreaseStat",Stat,Amount,Duration,d})
2094
Thing[5]=Thing[5]-1
2095
if Thing[5]<=0 then
2096
if Thing[1]:findFirstChild("Stats")~=nil then
2097
if Thing[1].Stats:findFirstChild("Decrease")~=nil then
2098
--Thing[1].Stats[Thing[3]].Value=Thing[1].Stats[Thing[3]].Value+Thing[4]
2099
end
2100
end
2101
Thing[6].Parent=nil
2102
table.remove(Effects,e)
2103
end
2104
end
2105
if Thing[2]=="CylinderClang" then
2106
if Thing[3]<=1 then
2107
Thing[1].CFrame=Thing[1].CFrame*CFrame.new(0,2.5*Thing[5],0)*CFrame.fromEulerAnglesXYZ(Thing[6],0,0) 
2108
Thing[7]=Thing[1].CFrame
2109
effect("New Yeller",0,Thing[8],Thing[7])
2110
Thing[8]=Thing[7]
2111
Thing[3]=Thing[3]+Thing[4]
2112
else
2113
Part.Parent=nil
2114
table.remove(Effects,e)
2115
end
2116
end
2117
if Thing[2]=="showDamage" then
2118
if Thing[6]<Thing[5] then
2119
Thing[6]=Thing[6]+1
2120
elseif Thing[6]<Thing[7] then
2121
Thing[4].position=Thing[4].position+vt(0,-.2,0)
2122
Thing[6]=Thing[6]+1
2123
elseif Thing[6]<Thing[8] then
2124
Thing[6]=Thing[6]+1
2125
elseif Thing[6]<Thing[9] then
2126
Thing[6]=Thing[6]+1
2127
Thing[4].position=Thing[4].position+vt(0,.2,0)
2128
Thing[3].TextStrokeTransparency=Thing[3].TextStrokeTransparency+.1
2129
Thing[3].TextTransparency=Thing[3].TextTransparency+.1
2130
else
2131
Thing[1].Parent=nil
2132
table.remove(Effects,e)
2133
end
2134
end
2135
if Thing[2]~="DecreaseStat" and Thing[2]~="showDamage" then
2136
if Thing[1].Transparency<=1 then
2137
if Thing[2]=="Block1" then
2138
Thing[1].CFrame=Thing[1].CFrame*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50))
2139
Mesh=Thing[7]
2140
Mesh.Scale=Mesh.Scale+vt(Thing[4],Thing[5],Thing[6])
2141
Thing[1].Transparency=Thing[1].Transparency+Thing[3]
2142
elseif Thing[2]=="Block2" then
2143
Thing[1].CFrame=Thing[1].CFrame
2144
Mesh=Thing[7]
2145
Mesh.Scale=Mesh.Scale+vt(Thing[4],Thing[5],Thing[6])
2146
Thing[1].Transparency=Thing[1].Transparency+Thing[3]
2147
elseif Thing[2]=="Cylinder" then
2148
Mesh=Thing[7]
2149
Mesh.Scale=Mesh.Scale+vt(Thing[4],Thing[5],Thing[6])
2150
Thing[1].Transparency=Thing[1].Transparency+Thing[3]
2151
elseif Thing[2]=="Cylinder2" then
2152
Mesh=Thing[7]
2153
Mesh.Scale=Mesh.Scale+vt(Thing[4],Thing[5],Thing[6])
2154
Thing[1].Transparency=Thing[1].Transparency+Thing[3]
2155
if Thing[1].Transparency>=.5 then
2156
Thing[1].BrickColor=BrickColor.new("Bright blue")
2157
end
2158
elseif Thing[2]=="Blood" then
2159
Mesh=Thing[7]
2160
Thing[1].CFrame=Thing[1].CFrame*cf(0,.5,0)
2161
Mesh.Scale=Mesh.Scale+vt(Thing[4],Thing[5],Thing[6])
2162
Thing[1].Transparency=Thing[1].Transparency+Thing[3]
2163
elseif Thing[2]=="Elec" then
2164
Mesh=Thing[7]
2165
Mesh.Scale=Mesh.Scale+vt(Thing[7],Thing[8],Thing[9])
2166
Thing[1].Transparency=Thing[1].Transparency+Thing[3]
2167
elseif Thing[2]=="Disappear" then
2168
Thing[1].Transparency=Thing[1].Transparency+Thing[3]
2169
end
2170
else
2171
table.remove(Effects,e)
2172
Thing[1].Parent=nil
2173
end
2174
end
2175
end
2176
--end
2177
end
2178
end
2179
end
2180
end