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