View difference between Paste ID: ZYmVSctv and Ym48jmSe
SHOW: | | - or go back to the newest paste.
1
-- This script has been converted to FE by iPxter
2
3
4
if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
5
local Player,Mouse,mouse,UserInputService,ContextActionService = owner
6
do
7
	print("FE Compatibility code by Mokiros | Translated to FE by iPxter")
8
	script.Parent = Player.Character
9
10
	--RemoteEvent for communicating
11
	local Event = Instance.new("RemoteEvent")
12
	Event.Name = "UserInput_Event"
13
14
	--Fake event to make stuff like Mouse.KeyDown work
15
	local function fakeEvent()
16
		local t = {_fakeEvent=true,Connect=function(self,f)self.Function=f end}
17
		t.connect = t.Connect
18
		return t
19
	end
20
21
	--Creating fake input objects with fake variables
22
    local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
23
	local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
24
	local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
25
		CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
26
	end}
27
	--Merged 2 functions into one by checking amount of arguments
28
	CAS.UnbindAction = CAS.BindAction
29
30
	--This function will trigger the events that have been :Connect()'ed
31
	local function te(self,ev,...)
32
		local t = m[ev]
33
		if t and t._fakeEvent and t.Function then
34
			t.Function(...)
35
		end
36
	end
37
	m.TrigEvent = te
38
	UIS.TrigEvent = te
39
40
	Event.OnServerEvent:Connect(function(plr,io)
41
	    if plr~=Player then return end
42
		if io.isMouse then
43
			m.Target = io.Target
44
			m.Hit = io.Hit
45
		else
46
			local b = io.UserInputState == Enum.UserInputState.Begin
47
			if io.UserInputType == Enum.UserInputType.MouseButton1 then
48
				return m:TrigEvent(b and "Button1Down" or "Button1Up")
49
			end
50
			for _,t in pairs(CAS.Actions) do
51
				for _,k in pairs(t.Keys) do
52
					if k==io.KeyCode then
53
						t.Function(t.Name,io.UserInputState,io)
54
					end
55
				end
56
			end
57
			m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
58
			UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
59
	    end
60
	end)
61
	Event.Parent = NLS([==[
62
	local Player = game:GetService("Players").LocalPlayer
63
	local Event = script:WaitForChild("UserInput_Event")
64
65
	local UIS = game:GetService("UserInputService")
66
	local input = function(io,a)
67
		if a then return end
68
		--Since InputObject is a client-side instance, we create and pass table instead
69
		Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState})
70
	end
71
	UIS.InputBegan:Connect(input)
72
	UIS.InputEnded:Connect(input)
73
74
	local Mouse = Player:GetMouse()
75
	local h,t
76
	--Give the server mouse data 30 times every second, but only if the values changed
77
	--If player is not moving their mouse, client won't fire events
78
	while wait(1/30) do
79
		if h~=Mouse.Hit or t~=Mouse.Target then
80
			h,t=Mouse.Hit,Mouse.Target
81
			Event:FireServer({isMouse=true,Target=t,Hit=h})
82
		end
83
	end]==],Player.Character)
84
	Mouse,mouse,UserInputService,ContextActionService = m,m,UIS,CAS
85
end
86
local health = 500
87
local speed = 20
88
local damage = 20
89
90
local runDummyScript = function(f,scri)
91
local oldenv = getfenv(f)
92
local newenv = setmetatable({}, {
93
__index = function(_, k)
94
if k:lower() == 'script' then
95
return scri
96
else
97
return oldenv[k]
98
end
99
end
100
})
101
setfenv(f, newenv)
102
ypcall(function() f() end)
103
end
104
cors = {}
105
mas = Instance.new("Model",game:GetService("Lighting")) 
106
mas.Name = "CompiledModel"
107
o1 = Instance.new("Model")
108
o2 = Instance.new("Part")
109
o3 = Instance.new("Part")
110
o4 = Instance.new("Part")
111
o5 = Instance.new("Part")
112
o6 = Instance.new("Part")
113
o7 = Instance.new("Part")
114
o8 = Instance.new("Part")
115
o9 = Instance.new("Part")
116
o10 = Instance.new("Part")
117
o11 = Instance.new("Part")
118
o12 = Instance.new("Part")
119
o13 = Instance.new("Part")
120
o1.Name = "Saber"
121
o1.Parent = mas
122
o2.Name = "Handle"
123
o2.Parent = o1
124
o2.Material = Enum.Material.SmoothPlastic
125
o2.BrickColor = BrickColor.new("Dark stone grey")
126
o2.Position = Vector3.new(56, 5.11798573, 33.7409973)
127
o2.Rotation = Vector3.new(90.0000076, -90, 0)
128
o2.Anchored = true
129
o2.CanCollide = false
130
o2.Shape = Enum.PartType.Cylinder
131
o2.Size = Vector3.new(2, 0.5, 0.5)
132
o2.CFrame = CFrame.new(56, 5.11798573, 33.7409973, 1.50995831e-007, -1.50995774e-007, -1, -1, -1.50995817e-007, -1.50995803e-007, -1.50995788e-007, 1, -1.50995803e-007)
133
o2.BottomSurface = Enum.SurfaceType.Smooth
134
o2.TopSurface = Enum.SurfaceType.Smooth
135
o2.Color = Color3.new(0.388235, 0.372549, 0.384314)
136
o2.Position = Vector3.new(56, 5.11798573, 33.7409973)
137
o3.Parent = o1
138
o3.Material = Enum.Material.SmoothPlastic
139
o3.BrickColor = BrickColor.new("Smoky grey")
140
o3.Position = Vector3.new(56, 4.11000824, 33.7409973)
141
o3.Rotation = Vector3.new(90.0000076, -90, 0)
142
o3.Anchored = true
143
o3.CanCollide = false
144
o3.Shape = Enum.PartType.Cylinder
145
o3.Size = Vector3.new(0.200000003, 0.600000024, 0.600000024)
146
o3.CFrame = CFrame.new(56, 4.11000824, 33.7409973, 1.50995831e-007, -1.50995774e-007, -1, -1, -1.50995817e-007, -1.50995803e-007, -1.50995788e-007, 1, -1.50995803e-007)
147
o3.BottomSurface = Enum.SurfaceType.Smooth
148
o3.TopSurface = Enum.SurfaceType.Smooth
149
o3.Color = Color3.new(0.356863, 0.364706, 0.411765)
150
o3.Position = Vector3.new(56, 4.11000824, 33.7409973)
151
o4.Parent = o1
152
o4.Material = Enum.Material.SmoothPlastic
153
o4.BrickColor = BrickColor.new("Smoky grey")
154
o4.Position = Vector3.new(56, 6.01100636, 33.7409973)
155
o4.Rotation = Vector3.new(90.0000076, -90, 0)
156
o4.Anchored = true
157
o4.CanCollide = false
158
o4.Shape = Enum.PartType.Cylinder
159
o4.Size = Vector3.new(0.200000003, 0.600000024, 0.600000024)
160
o4.CFrame = CFrame.new(56, 6.01100636, 33.7409973, 1.50995831e-007, -1.50995774e-007, -1, -1, -1.50995817e-007, -1.50995803e-007, -1.50995788e-007, 1, -1.50995803e-007)
161
o4.BottomSurface = Enum.SurfaceType.Smooth
162
o4.TopSurface = Enum.SurfaceType.Smooth
163
o4.Color = Color3.new(0.356863, 0.364706, 0.411765)
164
o4.Position = Vector3.new(56, 6.01100636, 33.7409973)
165
o5.Parent = o1
166
o5.Material = Enum.Material.SmoothPlastic
167
o5.BrickColor = BrickColor.new("Really black")
168
o5.Position = Vector3.new(55.9981995, 6.02698612, 33.7367439)
169
o5.Rotation = Vector3.new(90, 90, 0)
170
o5.Anchored = true
171
o5.CanCollide = false
172
o5.Shape = Enum.PartType.Cylinder
173
o5.Size = Vector3.new(0.200000003, 0.400000006, 0.5)
174
o5.CFrame = CFrame.new(55.9981995, 6.02698612, 33.7367439, 0, 0, 1, 1, 0, 0, 0, 1, 0)
175
o5.BottomSurface = Enum.SurfaceType.Smooth
176
o5.TopSurface = Enum.SurfaceType.Smooth
177
o5.Color = Color3.new(0.0666667, 0.0666667, 0.0666667)
178
o5.Position = Vector3.new(55.9981995, 6.02698612, 33.7367439)
179
o6.Name = "Blade"
180
o6.Parent = o1
181
o6.Material = Enum.Material.Neon
182
o6.BrickColor = BrickColor.new("Really red")
183
o6.Transparency = 1
184
o6.Position = Vector3.new(55.9981995, 7.85400581, 33.7367439)
185
o6.Rotation = Vector3.new(90, 90, 0)
186
o6.Anchored = true
187
o6.CanCollide = false
188
o6.Shape = Enum.PartType.Cylinder
189
o6.Size = Vector3.new(3.5, 0.400000006, 0.5)
190
o6.CFrame = CFrame.new(55.9981995, 7.85400581, 33.7367439, 0, 0, 1, 1, 0, 0, 0, 1, 0)
191
o6.BottomSurface = Enum.SurfaceType.Smooth
192
o6.TopSurface = Enum.SurfaceType.Smooth
193
o6.Position = Vector3.new(55.9981995, 7.85400581, 33.7367439)
194
o7.Parent = o1
195
o7.Material = Enum.Material.SmoothPlastic
196
o7.BrickColor = BrickColor.new("Black")
197
o7.Position = Vector3.new(56, 4.34401417, 33.7409973)
198
o7.Rotation = Vector3.new(90.0000076, -90, 0)
199
o7.Anchored = true
200
o7.CanCollide = false
201
o7.Shape = Enum.PartType.Cylinder
202
o7.Size = Vector3.new(0.200000003, 0.550000012, 0.600000024)
203
o7.CFrame = CFrame.new(56, 4.34401417, 33.7409973, -4.37113883e-008, 0, -1, -1, -1.62920685e-007, 4.37113883e-008, -1.62920685e-007, 1, 7.12148964e-015)
204
o7.BottomSurface = Enum.SurfaceType.Smooth
205
o7.TopSurface = Enum.SurfaceType.Smooth
206
o7.Color = Color3.new(0.105882, 0.164706, 0.207843)
207
o7.Position = Vector3.new(56, 4.34401417, 33.7409973)
208
o8.Parent = o1
209
o8.Material = Enum.Material.SmoothPlastic
210
o8.BrickColor = BrickColor.new("Black")
211
o8.Position = Vector3.new(56, 4.74401188, 33.7409973)
212
o8.Rotation = Vector3.new(90.0000076, -90, 0)
213
o8.Anchored = true
214
o8.CanCollide = false
215
o8.Shape = Enum.PartType.Cylinder
216
o8.Size = Vector3.new(0.200000003, 0.550000012, 0.600000024)
217
o8.CFrame = CFrame.new(56, 4.74401188, 33.7409973, -4.37113883e-008, 0, -1, -1, -1.62920685e-007, 4.37113883e-008, -1.62920685e-007, 1, 7.12148964e-015)
218
o8.BottomSurface = Enum.SurfaceType.Smooth
219
o8.TopSurface = Enum.SurfaceType.Smooth
220
o8.Color = Color3.new(0.105882, 0.164706, 0.207843)
221
o8.Position = Vector3.new(56, 4.74401188, 33.7409973)
222
o9.Parent = o1
223
o9.Material = Enum.Material.SmoothPlastic
224
o9.BrickColor = BrickColor.new("Black")
225
o9.Position = Vector3.new(56, 5.08402443, 33.7409973)
226
o9.Rotation = Vector3.new(90.0000076, -90, 0)
227
o9.Anchored = true
228
o9.CanCollide = false
229
o9.Shape = Enum.PartType.Cylinder
230
o9.Size = Vector3.new(0.200000003, 0.550000012, 0.600000024)
231
o9.CFrame = CFrame.new(56, 5.08402443, 33.7409973, -4.37113883e-008, 0, -1, -1, -1.62920685e-007, 4.37113883e-008, -1.62920685e-007, 1, 7.12148964e-015)
232
o9.BottomSurface = Enum.SurfaceType.Smooth
233
o9.TopSurface = Enum.SurfaceType.Smooth
234
o9.Color = Color3.new(0.105882, 0.164706, 0.207843)
235
o9.Position = Vector3.new(56, 5.08402443, 33.7409973)
236
o10.Parent = o1
237
o10.Material = Enum.Material.SmoothPlastic
238
o10.BrickColor = BrickColor.new("Black")
239
o10.Position = Vector3.new(56, 5.41400814, 33.7409973)
240
o10.Rotation = Vector3.new(90.0000076, -90, 0)
241
o10.Anchored = true
242
o10.CanCollide = false
243
o10.Shape = Enum.PartType.Cylinder
244
o10.Size = Vector3.new(0.200000003, 0.550000012, 0.600000024)
245
o10.CFrame = CFrame.new(56, 5.41400814, 33.7409973, -4.37113883e-008, 0, -1, -1, -1.62920685e-007, 4.37113883e-008, -1.62920685e-007, 1, 7.12148964e-015)
246
o10.BottomSurface = Enum.SurfaceType.Smooth
247
o10.TopSurface = Enum.SurfaceType.Smooth
248
o10.Color = Color3.new(0.105882, 0.164706, 0.207843)
249
o10.Position = Vector3.new(56, 5.41400814, 33.7409973)
250
o11.Parent = o1
251
o11.Material = Enum.Material.SmoothPlastic
252
o11.BrickColor = BrickColor.new("Smoky grey")
253
o11.Position = Vector3.new(56.0248947, 5.70129061, 33.5617981)
254
o11.Anchored = true
255
o11.CanCollide = false
256
o11.Size = Vector3.new(0.300000012, 0.300000012, 0.200000003)
257
o11.CFrame = CFrame.new(56.0248947, 5.70129061, 33.5617981, 1, 0, 0, 0, 1, 0, 0, 0, 1)
258
o11.BottomSurface = Enum.SurfaceType.Smooth
259-
local Player = game.Players.LocalPlayer
259+
260
o11.Color = Color3.new(0.356863, 0.364706, 0.411765)
261-
local Mouse = Player:GetMouse()
261+
262
o12.Parent = o1
263
o12.Material = Enum.Material.SmoothPlastic
264
o12.BrickColor = BrickColor.new("Smoky grey")
265
o12.Position = Vector3.new(56, 5.70401382, 33.7409973)
266
o12.Rotation = Vector3.new(90.0000076, -90, 0)
267
o12.Anchored = true
268
o12.CanCollide = false
269
o12.Shape = Enum.PartType.Cylinder
270
o12.Size = Vector3.new(0.200000003, 0.550000012, 0.600000024)
271
o12.CFrame = CFrame.new(56, 5.70401382, 33.7409973, -4.37113883e-008, 0, -1, -1, -1.62920685e-007, 4.37113883e-008, -1.62920685e-007, 1, 7.12148964e-015)
272
o12.BottomSurface = Enum.SurfaceType.Smooth
273
o12.TopSurface = Enum.SurfaceType.Smooth
274
o12.Color = Color3.new(0.356863, 0.364706, 0.411765)
275
o12.Position = Vector3.new(56, 5.70401382, 33.7409973)
276
o13.Name = "Button"
277
o13.Parent = o1
278
o13.Material = Enum.Material.SmoothPlastic
279
o13.BrickColor = BrickColor.new("Really red")
280
o13.Position = Vector3.new(56.0299988, 5.69999981, 33.5109978)
281
o13.Rotation = Vector3.new(2.04905682e-005, -90, 0)
282
o13.Anchored = true
283
o13.CanCollide = false
284
o13.Shape = Enum.PartType.Cylinder
285
o13.Size = Vector3.new(0.200000003, 0.200000003, 0.200000003)
286
o13.CFrame = CFrame.new(56.0299988, 5.69999981, 33.5109978, -4.37113883e-008, 0, -1, -3.57627869e-007, 1, 1.56324098e-014, 1, 3.57627869e-007, -4.37113883e-008)
287
o13.BottomSurface = Enum.SurfaceType.Smooth
288
o13.TopSurface = Enum.SurfaceType.Smooth
289
o13.Color = Color3.new(1, 0, 0)
290
o13.Position = Vector3.new(56.0299988, 5.69999981, 33.5109978)
291
mas.Parent = workspace
292
mas:MakeJoints()
293
local mas1 = mas:GetChildren()
294
for i=1,#mas1 do
295
	mas1[i].Parent = workspace 
296
	ypcall(function() mas1[i]:MakeJoints() end)
297
end
298
mas:Destroy()
299
for i=1,#cors do
300
coroutine.resume(cors[i])
301
end
302
303
304
function indicate(part,damagevar)
305
local clonepart = Instance.new("Part", workspace)
306
clonepart.Size = Vector3.new(1,1,1)
307
clonepart.CanCollide = false
308
clonepart.Anchored = true
309
clonepart.CFrame = part.CFrame
310
clonepart.Transparency = 1
311
local base1 = Instance.new("BillboardGui", clonepart)
312
base1.Name = "damage"
313
base1.ExtentsOffset = Vector3.new(-0.1,2,0)
314
base1.Size = UDim2.new(1,0,1,0)
315
base1.Adornee = clonepart
316
local indicator = Instance.new("TextLabel", base1)
317
indicator.Text = "-"..math.floor(damagevar)
318
indicator.TextScaled = false
319
indicator.TextWrapped = false
320
indicator.TextColor3 = Color3.new(1,0,0)
321
indicator.TextScaled = true
322
indicator.FontSize = 7
323
indicator.Size = UDim2.new(1,0,1,0)
324
indicator.BackgroundTransparency = 1
325
local change = coroutine.wrap(function(thing,thing2)
326
	for i=1, 20 do
327
	thing.TextTransparency = thing.TextTransparency + 0.05
328
	thing2.ExtentsOffset = thing2.ExtentsOffset + Vector3.new(0,0.1,0)
329
	wait(0.0001)
330
	end
331
	indicator.Parent.Parent:Remove()
332
end)
333
change(indicator,base1)
334
end
335
336
---------------------------------------------------------------------------------------------------
337
338
339
340
local saber = o1
341
local handle = o1:FindFirstChild("Handle")
342
local blade = o1:FindFirstChild("Blade")
343
local button = o1:FindFirstChild("Button")
344
local Player = owner
345
o1.Parent = Player.Character
346
local hitter = false
347
local animstate = -1
348
local equipped = false
349
local keyframe = 0
350
local cooled = true
351
local cooled2 = true
352
local cooled3 = true
353
local cooled4 = true
354
local attacking = false
355
local hits = {}
356
local combo = 0
357
local qtarget = nil
358
local animating = false
359
local indexer = 0
360
local ready = true
361
local ready1 = true
362
local ready2 = true
363
364
Player.Character.Humanoid.MaxHealth = health
365
wait()
366
Player.Character.Humanoid.Health = Player.Character.Humanoid.MaxHealth
367
Player.Character.Humanoid.WalkSpeed = speed
368
369
if script.Parent ~= Player.Backpack then
370
script.Parent = Player.Backpack
371
end
372
local Character = Player.Character
373
Character.Animate:remove()
374
Character.Humanoid.Animator:remove()
375
376
for _,v in pairs (saber:GetChildren()) do
377
	if v.Name ~= "Handle" then
378
	local NewWeld = Instance.new("Weld")
379
	NewWeld.Part0  = handle
380
	NewWeld.Part1  = v
381
	NewWeld.C0     = CFrame.new()
382
	NewWeld.C1     = v.CFrame:toObjectSpace(handle.CFrame)
383
	if v.Name == "Blade" then
384
	NewWeld.Name = "BladeWeld"	
385
	end
386
	NewWeld.Parent = handle
387
	end
388
	wait()
389
end
390
for _,v in pairs (saber:GetChildren()) do
391
	v.Anchored = false
392
	wait()
393
end
394
395
handle.CFrame = Character:FindFirstChild("Right Arm").CFrame*CFrame.new(0,-1.2,-3)*CFrame.Angles(0,math.rad(270),math.rad(180))
396
397
local HandleWeld = Instance.new("Weld")
398
HandleWeld.Name = "HandleWeld"
399
HandleWeld.Part0  = Character:FindFirstChild("Right Arm")
400
HandleWeld.Part1  = handle
401
HandleWeld.C0     = CFrame.new(0,0,0)
402
HandleWeld.C1     = handle.CFrame:toObjectSpace(Character:FindFirstChild("Right Arm").CFrame)
403
HandleWeld.Parent = handle
404
405
numLerp=function(start,goal,alpha)
406
return(((goal-start)*alpha)+start);
407
end;
408
CFrameZero=function()
409
return CFrame.new(Vector3.new());
410
end;
411
local function a()
412
local t=tick();
413
local l=t%1*3;
414
local t=.5*math.pi*(l%1);
415
if l<1 then
416
return Color3.new(1,1-math.cos(t),1-math.sin(t));
417
elseif l<2 then
418
return Color3.new(1-math.sin(t),1,1-math.cos(t));
419
else
420
return Color3.new(1-math.cos(t),1-math.sin(t),1);
421
end;
422
end;
423
rad=function(value)
424
return math.rad(value);
425
end;
426
CFAngles=function(Vector)
427
return CFrame.Angles(rad(Vector.x),rad(Vector.y),rad(Vector.z));
428
end;
429
AnimStat={
430
lerpSpeed=.2;
431
lerpSpeed2=.35;
432
lerpTween=0;
433
}
434
Joints={
435
Character.HumanoidRootPart.RootJoint;
436
Character.Torso.Neck;
437
Character.Torso['Left Shoulder'];
438
Character.Torso['Right Shoulder'];
439
Character.Torso['Left Hip'];
440
Character.Torso['Right Hip'];
441
handle:FindFirstChild("HandleWeld")
442
}
443
local orig1 = Joints[1].C0
444
local orig2 = Joints[2].C0 
445
local orig3 = Joints[3].C0 
446
local orig4 = Joints[4].C0 
447
local orig5 = Joints[5].C0 
448
local orig6 = Joints[6].C0 
449
local orig7 = Joints[7].C0
450
JointTargets={
451
Character.HumanoidRootPart.RootJoint.C0;
452
Character.Torso.Neck.C0;
453
Character.Torso['Left Shoulder'].C0;
454
Character.Torso['Right Shoulder'].C0;
455
Character.Torso['Left Hip'].C0;
456
Character.Torso['Right Hip'].C0;
457
handle:FindFirstChild("HandleWeld").C0;
458
}
459
setJointCFrames=function(table)
460
for i=1,#table do
461
JointTargets[i]=table[i];
462
end
463
end
464
triWave=function(x)
465
local pi2=math.pi/2;
466
return math.abs((x/pi2)%4-2)-1;
467
end
468
setLerp=function(speed)
469
AnimStat.lerpSpeed=speed;
470
end;
471
setTween=function(tween)
472
AnimStat.lerpTween=tween;
473
end
474
local FPSLerp=AnimStat.lerpSpeed
475
476
local animator = coroutine.wrap(function()
477
while Player.Character do
478
	
479
if Player.Character.Humanoid.MoveDirection == Vector3.new(0,0,0) and not attacking and animstate ~= 0 then
480
ready = true
481
animstate = 0
482
keyframe = 0
483
elseif Player.Character.Humanoid.MoveDirection ~= Vector3.new(0,0,0) and not attacking and animstate ~= 1 then
484
ready = true
485
animstate = 1
486
keyframe = 0
487
end
488
489
if animstate == 0 and ready then
490
		
491
if keyframe == 0 then
492
ready = false
493
JointTargets={
494
orig1*CFrame.Angles(0,0,math.rad(15));
495
orig2*CFrame.Angles(0,0,math.rad(-15));
496
orig3*CFrame.Angles(math.rad(40),math.rad(65),0);
497
orig4*CFrame.Angles(math.rad(40),math.rad(85),math.rad(20));
498
orig5*CFrame.Angles(math.rad(-15),0,0);
499
orig6*CFrame.Angles(math.rad(-5),math.rad(-15),0);
500
Joints[7].C0;
501
}
502
local lerper = coroutine.wrap(function(rate)
503
for i=1, 10 do
504
for p=1,#Joints do
505
if animstate == 0 then
506
Joints[p].C0=Joints[p].C0:lerp(JointTargets[p],0.1*i)
507
end
508
end
509
wait(rate)
510
end
511
if animstate == 0 then
512
keyframe = 1
513
ready = true
514
end
515
end)
516
lerper(0.001)
517
elseif keyframe == 1 then
518
ready = false
519
JointTargets={
520
orig1*CFrame.new(0,0,0.05)*CFrame.Angles(0,0,math.rad(15));
521
orig2*CFrame.Angles(math.rad(3),0,math.rad(-15));
522
orig3*CFrame.Angles(math.rad(35),math.rad(60),0);
523
orig4*CFrame.Angles(math.rad(38),math.rad(83),math.rad(18));
524
orig5*CFrame.new(0,-0.05,-0.025)*CFrame.Angles(math.rad(-15),0,0);
525
orig6*CFrame.new(0,-0.05,-0.025)*CFrame.Angles(math.rad(-5),math.rad(-15),0);
526
Joints[7].C0;
527
}
528
529
if indexer + 1 <= 22 then
530
indexer = indexer + 1
531
for p=1,#Joints do
532
if animstate == 0 then
533
Joints[p].C0=Joints[p].C0:lerp(JointTargets[p],indexer/50)
534
end
535
end
536
537
ready = true
538
else
539
	indexer = 0
540
	keyframe = 2
541
	ready = true
542
end
543
elseif keyframe == 2 then
544
ready = false
545
JointTargets={
546
orig1*CFrame.Angles(0,0,math.rad(15));
547
orig2*CFrame.Angles(0,0,math.rad(-15));
548
orig3*CFrame.Angles(math.rad(40),math.rad(65),0);
549
orig4*CFrame.Angles(math.rad(40),math.rad(85),math.rad(20));
550
orig5*CFrame.Angles(math.rad(-15),0,0);
551
orig6*CFrame.Angles(math.rad(-5),math.rad(-15),0);
552
Joints[7].C0;
553
}
554
555
if indexer + 1 <= 22 then
556
indexer = indexer + 1
557
for p=1,#Joints do
558
if animstate == 0 then
559
Joints[p].C0=Joints[p].C0:lerp(JointTargets[p],indexer/50)
560
end
561
end
562
563
ready = true
564
else
565
	indexer = 0
566
	keyframe = 1
567
	ready = true
568
end
569
end
570
571
elseif animstate == 1 and ready then
572
573
if keyframe == 0 then
574
ready = false
575
JointTargets={
576
orig1;
577
orig2*CFrame.Angles(math.rad(15),0,0);
578
orig3*CFrame.Angles(math.rad(40),math.rad(65),0);
579
orig4*CFrame.Angles(math.rad(40),math.rad(-65),math.rad(90));
580
orig5*CFrame.Angles(0,0,math.rad(35));
581
orig6*CFrame.Angles(0,0,math.rad(35));
582
Joints[7].C0;
583
}
584
local lerper = coroutine.wrap(function(rate)
585
for i=1, 10 do
586
for p=1,#Joints do
587
if animstate == 1 then
588
Joints[p].C0=Joints[p].C0:lerp(JointTargets[p],0.1*i)
589
end
590
end
591
wait(rate)
592
end
593
if animstate == 1 then
594
keyframe = 1
595
ready = true
596
end
597
end)
598
lerper(0.001)
599
elseif keyframe == 1 then
600
ready = false
601
JointTargets={
602
orig1;
603
orig2*CFrame.Angles(math.rad(15),0,0);
604
orig3*CFrame.Angles(math.rad(40),math.rad(65),0);
605
orig4*CFrame.Angles(math.rad(40),math.rad(-65),math.rad(90));
606
orig5*CFrame.Angles(0,0,math.rad(-35));
607
orig6*CFrame.Angles(0,0,math.rad(-35));
608
Joints[7].C0;
609
}
610
local lerper = coroutine.wrap(function(rate)
611
for i=1, 10 do
612
for p=1,#Joints do
613
if animstate == 1 then
614
Joints[p].C0=Joints[p].C0:lerp(JointTargets[p],0.1*i)
615
end
616
end
617
wait(rate)
618
end
619
if animstate == 1 then
620
keyframe = 0
621
ready = true
622
end
623
end)
624
lerper(0.001)
625
end
626
627
elseif animstate == 2 and ready then
628
	
629
if combo == 1 then
630
if keyframe == 0 then
631
ready = false
632
cooled = false
633
animating = true
634
JointTargets={
635
orig1*CFrame.Angles(0,0,math.rad(45));
636
orig2*CFrame.Angles(0,0,math.rad(-25));
637
orig3*CFrame.Angles(math.rad(-35),0,0);
638
orig4*CFrame.Angles(math.rad(65),0,math.rad(155));
639
Joints[5].C0;
640
Joints[6].C0;
641
Joints[7].C0;
642
}
643
local lerper = coroutine.wrap(function(rate)
644
for i=1, 5 do
645
for p=1,#Joints do
646
if animstate == 2 then
647
Joints[p].C0=Joints[p].C0:lerp(JointTargets[p],0.2*i)
648
end
649
end
650
wait(rate)
651
end
652
ready = true
653
keyframe = 1
654
end)
655
lerper(0)
656
elseif keyframe == 1 then
657
ready = false
658
hitter = true
659
JointTargets={
660
orig1*CFrame.Angles(0,0,math.rad(85));
661
orig2*CFrame.Angles(0,0,math.rad(-65));
662
orig3*CFrame.Angles(math.rad(-35),0,0);
663
orig4*CFrame.Angles(math.rad(65),0,math.rad(65));
664
Joints[5].C0;
665
Joints[6].C0;
666
Joints[7].C0;
667
}
668
local lerper = coroutine.wrap(function(rate)
669
for i=1, 10 do
670
for p=1,#Joints do
671
if animstate == 2 then
672
Joints[p].C0=Joints[p].C0:lerp(JointTargets[p],0.1*i)
673
end
674
end
675
print(i)
676
wait(rate)
677
end
678
ready = true
679
hitter = false
680
attacking = false
681
animating = false
682
hits = {}
683
keyframe = 0
684
animstate = -1
685
local comboer = coroutine.wrap(function(limit)
686
cooled = true
687
wait(limit)
688
if animstate ~= 2 then
689
cooled = false
690
combo = 0
691
wait(0.35)
692
cooled = true
693
end
694
end)
695
comboer(0.3)
696
end)
697
lerper(0.0001)
698
end
699
700
elseif combo == 2 then
701
if keyframe == 0 then
702
ready = false
703
cooled = false
704
animating = true
705
JointTargets={
706
orig1*CFrame.Angles(0,0,math.rad(85));
707
orig2*CFrame.Angles(0,0,math.rad(-65));
708
orig3*CFrame.Angles(math.rad(-45),0,0);
709
orig4*CFrame.Angles(math.rad(-50),0,math.rad(55));
710
Joints[5].C0;
711
Joints[6].C0;
712
Joints[7].C0;
713
}
714
local lerper = coroutine.wrap(function(rate)
715
for i=1, 5 do
716
for p=1,#Joints do
717
if animstate == 2 then
718
Joints[p].C0=Joints[p].C0:lerp(JointTargets[p],0.2*i)
719
end
720
end
721
wait(rate)
722
end
723
ready = true
724
keyframe = 1
725
end)
726
lerper(0)
727
elseif keyframe == 1 then
728
ready = false
729
hitter = true
730
JointTargets={
731
orig1*CFrame.Angles(0,0,math.rad(15));
732
orig2*CFrame.Angles(0,0,math.rad(-5));
733
orig3*CFrame.Angles(math.rad(-35),0,0);
734
orig4*CFrame.Angles(math.rad(-65),0,math.rad(-55));
735
Joints[5].C0;
736
Joints[6].C0;
737
Joints[7].C0;
738
}
739
local lerper = coroutine.wrap(function(rate)
740
for i=1, 10 do
741
for p=1,#Joints do
742
if animstate == 2 then
743
Joints[p].C0=Joints[p].C0:lerp(JointTargets[p],0.1*i)
744
end
745
end
746
wait(rate)
747
end
748
ready = true
749
hitter = false
750
attacking = false
751
animating = false
752
hits = {}
753
keyframe = 0
754
animstate = -1
755
local comboer = coroutine.wrap(function(limit)
756
cooled = true
757
wait(limit)
758
if animstate ~= 2 then
759
cooled = false
760
combo = 0
761
wait(0.35)
762
cooled = true
763
end
764
end)
765
comboer(0.3)
766
end)
767
lerper(0.001)
768
end
769
770
elseif combo == 3 then
771
if keyframe == 0 then
772
ready = false
773
cooled = false
774
animating = true
775
JointTargets={
776
orig1*CFrame.Angles(0,0,math.rad(125));
777
orig2*CFrame.Angles(0,0,math.rad(-105));
778
orig3*CFrame.Angles(math.rad(-35),0,0);
779
orig4*CFrame.Angles(math.rad(-50),0,math.rad(55));
780
Joints[5].C0;
781
Joints[6].C0;
782
Joints[7].C0;
783
}
784
local lerper = coroutine.wrap(function(rate)
785
for i=1, 5 do
786
for p=1,#Joints do
787
if animstate == 2 then
788
Joints[p].C0=Joints[p].C0:lerp(JointTargets[p],0.2*i)
789
end
790
end
791
wait(rate)
792
end
793
ready = true
794
keyframe = 1
795
end)
796
lerper(0)
797
elseif keyframe == 1 then
798
ready = false
799
hitter = true
800
JointTargets={
801
orig1*CFrame.Angles(0,0,math.rad(-35));
802
orig2*CFrame.Angles(0,0,math.rad(-15));
803
orig3*CFrame.Angles(math.rad(-15),0,0);
804
orig4*CFrame.Angles(math.rad(65),0,math.rad(65));
805
Joints[5].C0;
806
Joints[6].C0;
807
Joints[7].C0;
808
}
809
local lerper = coroutine.wrap(function(rate)
810
for i=1, 10 do
811
for p=1,#Joints do
812
if animstate == 2 then
813
Joints[p].C0=Joints[p].C0:lerp(JointTargets[p],0.1*i)
814
end
815
end
816
print(i)
817
wait(rate)
818
end
819
JointTargets={
820
orig1*CFrame.Angles(0,0,math.rad(125));
821
orig2*CFrame.Angles(0,0,math.rad(-105));
822
orig3*CFrame.Angles(math.rad(-45),0,0);
823
orig4*CFrame.Angles(math.rad(65),0,math.rad(65));
824
Joints[5].C0;
825
Joints[6].C0;
826
Joints[7].C0;
827
}
828
local lerper2 = coroutine.wrap(function(rate2)
829
for o=1, 10 do
830
for y=1,#Joints do
831
Joints[y].C0=Joints[y].C0:lerp(JointTargets[y],0.1*o)
832
end
833
print(o)
834
wait(rate2)
835
end
836
ready = true
837
hitter = false
838
attacking = false
839
animating = false
840
hits = {}
841
keyframe = 0
842
animstate = -1
843
local comboer = coroutine.wrap(function()
844
combo = 0
845
wait(0.35)
846
cooled = true
847
end)
848
comboer()
849
end)
850
hits = {}
851
lerper2(0.00001)
852
end)
853
lerper(0.001)
854
end
855
856
end
857
858
elseif animstate == 3 and ready then
859
	
860
if keyframe == 0 then
861
Player.Character.Humanoid.WalkSpeed = 0
862
ready = false
863
cooled2 = false
864
animating = true
865
JointTargets={
866
orig1*CFrame.Angles(0,0,math.rad(-85));
867
orig2*CFrame.Angles(0,0,math.rad(85));
868
orig3*CFrame.Angles(math.rad(-90),math.rad(90),0);
869
orig4*CFrame.Angles(math.rad(-35),0,0);
870
Joints[5].C0;
871
Joints[6].C0;
872
Joints[7].C0;
873
}
874
local lerper = coroutine.wrap(function(rate)
875
for i=1, 10 do
876
for p=1,#Joints do
877
if animstate == 3 then
878
Joints[p].C0=Joints[p].C0:lerp(JointTargets[p],0.1*i)
879
end
880
end
881
wait(rate)
882
end
883
keyframe = 1
884
ready = true
885
end)
886
lerper(0.001)
887
elseif keyframe == 1 then
888
ready = false
889
local velocity = Instance.new("BodyVelocity",qtarget:FindFirstChild("Torso"))
890
velocity.Velocity = Vector3.new(0,1.5,0)
891
local lerper = coroutine.wrap(function(rate)
892
for i=1, 20 do
893
if animstate == 3 then
894
qtarget:FindFirstChild("Humanoid"):TakeDamage(damage*0.06)
895
indicate(qtarget:FindFirstChild("Head"),damage*0.06)
896
if i%2 == 0 then
897
local wave = Instance.new("Part", game.Workspace)
898
wave.FormFactor = 0
899
wave.Size = Vector3.new(5,5,1)
900
wave.Transparency = 0.6
901
wave.Anchored = true
902
wave.CanCollide = false
903
wave.CFrame = Player.Character.Torso.CFrame * CFrame.new(0,-2.75,0) * CFrame.Angles(0, -(3), 0)
904
wave.BrickColor = BrickColor.new("Institutional white")
905
local mesh = Instance.new("SpecialMesh", wave)
906
mesh.MeshType = 5
907
mesh.MeshId = "http://www.roblox.com/asset/?id=20329976"
908
mesh.Scale = Vector3.new(1,0.5,1)
909
local grow = coroutine.wrap(function(part)
910
game:GetService("Debris"):AddItem(part, 2)
911
for x = 1, 25 do
912
part.Mesh.Scale = part.Mesh.Scale + Vector3.new(0.5,0.25,0.5)
913
part.Transparency = part.Transparency + 0.02
914
wait()
915
end
916
part:Destroy()
917
end)
918
grow(wave)
919
end
920
end
921
wait(rate)
922
end
923
keyframe = 2
924
ready = true
925
velocity:remove()
926
end)
927
lerper(0.1)
928
elseif keyframe == 2 then
929
ready = false
930
attacking = false
931
animating = false
932
keyframe = 0
933
animstate = -1
934
local cooler = coroutine.wrap(function(limit)
935
wait(limit)
936
cooled2 = true
937
end)
938
cooler(8)
939
ready = true
940
Player.Character.Humanoid.WalkSpeed = speed
941
end
942
943
elseif animstate == 4 and ready then
944
	
945
if keyframe == 0 then
946
ready = false
947
cooled3 = false
948
animating = true
949
JointTargets={
950
orig1*CFrame.Angles(math.rad(15),0,0);
951
orig2*CFrame.Angles(math.rad(-15),0,0);
952
orig3*CFrame.Angles(math.rad(-10),0,math.rad(20));
953
orig4*CFrame.Angles(math.rad(-10),0,math.rad(-20));
954
orig5*CFrame.Angles(math.rad(-5),0,0);
955
orig6*CFrame.Angles(math.rad(-5),0,0);
956
Joints[7].C0
957
}
958
local lerper = coroutine.wrap(function(rate)
959
for i=1, 10 do
960
for p=1,#Joints do
961
if animstate == 4 then
962
Joints[p].C0=Joints[p].C0:lerp(JointTargets[p],0.1*i)
963
end
964
end
965
wait(rate)
966
end
967
keyframe = 1
968
ready = true
969
end)
970
lerper(0)
971
local wave = Instance.new("Part", game.Workspace)
972
wave.FormFactor = 0
973
wave.Size = Vector3.new(5,5,1)
974
wave.Transparency = 0.6
975
wave.Anchored = true
976
wave.CanCollide = false
977
wave.CFrame = Player.Character.HumanoidRootPart.CFrame * CFrame.new(0,0,1) * CFrame.Angles(math.rad(90), -(3), 0)
978
wave.BrickColor = BrickColor.new("Institutional white")
979
local mesh = Instance.new("SpecialMesh", wave)
980
mesh.MeshType = 5
981
mesh.MeshId = "http://www.roblox.com/asset/?id=20329976"
982
mesh.Scale = Vector3.new(1,0.5,1)
983
local grow = coroutine.wrap(function(part)
984
game:GetService("Debris"):AddItem(part, 2)
985
for x = 1, 25 do
986
part.Mesh.Scale = part.Mesh.Scale + Vector3.new(0.25,0.125,0.25)
987
part.Transparency = part.Transparency + 0.02
988
wait()
989
end
990
part:Destroy()
991
end)
992
grow(wave)
993
994
Player.Character.HumanoidRootPart.Velocity = Player.Character.HumanoidRootPart.CFrame.lookVector*200
995
996
elseif keyframe == 1 then
997
ready = false
998
local cooler = coroutine.wrap(function()
999
wait(2)
1000
cooled3 = true
1001
end)
1002
cooler()
1003
wait(0.01)
1004
ready = true
1005
attacking = false
1006
animating = false
1007
keyframe = 0
1008
animstate = -1
1009
end
1010
1011
elseif animstate == 5 and ready then
1012
	
1013
if keyframe == 0 then
1014
Player.Character.Humanoid.WalkSpeed = 0
1015
ready = false
1016
cooled4 = false
1017
animating = true
1018
JointTargets={
1019
orig1*CFrame.Angles(0,0,math.rad(-45));
1020
orig2*CFrame.Angles(0,0,math.rad(45));
1021
orig3*CFrame.Angles(math.rad(-45),math.rad(40),0);
1022
orig4*CFrame.new(0,-0.5,0.5)*CFrame.Angles(math.rad(-90),0,0);
1023
Joints[5].C0;
1024
Joints[6].C0;
1025
Joints[7].C0;
1026
}
1027
1028
local lerper = coroutine.wrap(function(rate)
1029
for i=1, 10 do
1030
for p=1,#Joints do
1031
if animstate == 5 then
1032
Joints[p].C0=Joints[p].C0:lerp(JointTargets[p],0.1*i)
1033
end
1034
end
1035
wait(rate)
1036
end
1037
keyframe = 1
1038
ready = true
1039
end)
1040
lerper(0.00001)
1041
elseif keyframe == 1 then
1042
ready = false
1043
JointTargets={
1044
orig1*CFrame.Angles(0,0,math.rad(90));
1045
orig2*CFrame.Angles(0,0,math.rad(-90));
1046
orig3*CFrame.Angles(math.rad(-25),0,0);
1047
orig4*CFrame.new(0,-0.25,0.5)*CFrame.Angles(math.rad(-90),0,0);
1048
Joints[5].C0;
1049
Joints[6].C0;
1050
Joints[7].C0;
1051
}
1052
1053
local lerper = coroutine.wrap(function(rate)
1054
for i=1, 10 do
1055
for p=1,#Joints do
1056
if animstate == 5 then
1057
Joints[p].C0=Joints[p].C0:lerp(JointTargets[p],0.1*i)
1058
end
1059
end
1060
wait(rate)
1061
end
1062
keyframe = 2
1063
ready = true
1064
end)
1065
lerper(0)
1066
elseif keyframe == 2 then
1067
ready = false
1068
local hitter2 = true
1069
local hits2 = {}
1070
local throwbox = Instance.new("Part",workspace)
1071
throwbox.Size = Vector3.new(1,9,1)
1072
throwbox.CanCollide = false
1073
throwbox.Anchored = false
1074
throwbox.Transparency = 1
1075
throwbox.CFrame = handle.CFrame*CFrame.Angles(0,0,math.rad(90))
1076
throwbox.Name = "hitbox"
1077
1078
throwbox.Touched:connect(function(hit)
1079
if hitter2 and hit ~= nil and hit.Parent ~= nil and hit.Parent:FindFirstChild("Humanoid") ~= nil then
1080
local humanoid = hit.Parent:findFirstChild("Humanoid")
1081
if humanoid ~= nil and humanoid ~= Character.Humanoid and Character.Humanoid ~= nil then
1082
local donthit = false
1083
for _,v in pairs (hits2) do
1084
if v == hit.Parent.Name then
1085
donthit = true
1086
end
1087
end
1088
if not donthit then		
1089
local sound = Instance.new("Sound", hit.Parent:FindFirstChild("Torso"))
1090
sound.SoundId = "rbxassetid://526719128"
1091
sound.Volume = 0.7
1092
sound.PlayOnRemove = true
1093
sound:Remove()
1094
humanoid:TakeDamage(damage)
1095
indicate(hit.Parent:FindFirstChild("Head"),damage)
1096
table.insert(hits2,hit.Parent.Name)				
1097
end
1098
end
1099
end
1100
end)
1101
1102
JointTargets={
1103
Joints[1].C0;
1104
Joints[2].C0;
1105
Joints[3].C0;
1106
Joints[4].C0;
1107
Joints[5].C0;
1108
Joints[6].C0;
1109
orig7*CFrame.new(0,-35,0)*CFrame.Angles(math.rad(180),0,0);
1110
}
1111
1112
local lerper = coroutine.wrap(function(rate)
1113
for i=1, 20 do
1114
for p=1,#Joints do
1115
if animstate == 5 then
1116
Joints[p].C0=Joints[p].C0:lerp(JointTargets[p],0.05*i)
1117
throwbox.CFrame = handle.CFrame*CFrame.Angles(0,0,math.rad(90))
1118
end
1119
end
1120
wait(rate)
1121
end
1122
hits2 = {}
1123
1124
JointTargets={
1125
Joints[1].C0;
1126
Joints[2].C0;
1127
Joints[3].C0;
1128
Joints[4].C0;
1129
Joints[5].C0;
1130
Joints[6].C0;
1131
orig7;
1132
}
1133
1134
local lerper2 = coroutine.wrap(function(rate2)
1135
for y=1, 20 do
1136
for o=1,#Joints do
1137
if animstate == 5 then
1138
Joints[o].C0=Joints[o].C0:lerp(JointTargets[o],0.05*y)
1139
throwbox.CFrame = handle.CFrame*CFrame.Angles(0,0,math.rad(90))
1140
end
1141
end
1142
wait(rate2)
1143
end
1144
ready = true
1145
hitter2 = false
1146
attacking = false
1147
animating = false
1148
hits2 = {}
1149
keyframe = 0
1150
animstate = -1
1151
throwbox:Remove()
1152
Player.Character.Humanoid.WalkSpeed = speed
1153
local cooler = coroutine.wrap(function()
1154
wait(10)
1155
cooled4 = true
1156
end)
1157
cooler()
1158
end)
1159
lerper2(0.001)
1160
end)
1161
lerper(0.001)
1162
end
1163
1164
elseif animstate == 6 and ready then
1165
	
1166
if keyframe == 0 then
1167
Player.Character.Humanoid.WalkSpeed = 0
1168
ready = false
1169
JointTargets={
1170
orig1*CFrame.Angles(0,0,math.rad(90));
1171
orig2*CFrame.Angles(0,0,math.rad(-90));
1172
orig3*CFrame.Angles(math.rad(-25),math.rad(-10),0);
1173
orig4*CFrame.new(0,-0.5,0.5)*CFrame.Angles(math.rad(-90),0,0);
1174
Joints[5].C0;
1175
Joints[6].C0;
1176
orig7*CFrame.Angles(0,math.rad(-90),0);
1177
}
1178
1179
local lerper = coroutine.wrap(function(rate)
1180
for i=1, 10 do
1181
for p=1,#Joints do
1182
if animstate == 6 then
1183
Joints[p].C0=Joints[p].C0:lerp(JointTargets[p],0.1*i)
1184
end
1185
end
1186
wait(rate)
1187
end
1188
keyframe = 1
1189
ready = true
1190
end)
1191
lerper(0)
1192
elseif keyframe == 1 then
1193
ready = false
1194
local bladeweld = handle:FindFirstChild("BladeWeld")
1195
if not equipped then
1196
bladeweld.C0 = bladeweld.C0*CFrame.new(Vector3.new(3.5,0,0))
1197
end
1198
local grower = coroutine.wrap(function()
1199
for i=1, 20 do
1200
	if not equipped then
1201
	if i == 10 then
1202
		blade.Transparency = blade.Transparency - 0.5
1203
	end
1204
	if i > 10 then
1205
	blade.Transparency = blade.Transparency - 0.05
1206
	end
1207
	bladeweld.C0 = bladeweld.C0*CFrame.new(Vector3.new(-(0.35/2),0,0))
1208
	else
1209
	blade.Transparency = blade.Transparency + 0.05
1210
	end
1211
	wait(0.001)
1212
end
1213
if not equipped then
1214
	equipped = true
1215
else
1216
	equipped = false
1217
end
1218
JointTargets={
1219
Joints[1].C0;
1220
Joints[2].C0;
1221
Joints[3].C0;
1222
Joints[4].C0;
1223
Joints[5].C0;
1224
Joints[6].C0;
1225
orig7;
1226
}
1227
1228
local lerper = coroutine.wrap(function(rate)
1229
for p=1,#Joints do
1230
Joints[p].C0=Joints[p].C0:lerp(JointTargets[p],1)
1231
end
1232
Player.Character.Humanoid.WalkSpeed = speed
1233
ready = true
1234
attacking = false
1235
animating = false
1236
animstate = -1
1237
keyframe = 0
1238
end)
1239
lerper()
1240
end)
1241
grower()
1242
end
1243
1244
end
1245
wait()
1246
end
1247
end)
1248
animator()
1249
1250
Mouse.KeyDown:connect(function(key) 
1251
if key == 'f' and not attacking and not animating then
1252
if not equipped then
1253
animating = true
1254
attacking = true
1255
button.BrickColor = BrickColor.new("Black")
1256
ready = true
1257
keyframe = 0
1258
animstate = 6
1259
elseif equipped then
1260
animating = true
1261
attacking = true
1262
button.BrickColor = BrickColor.new("Really red")
1263
ready = true
1264
keyframe = 0
1265
animstate = 6
1266
end
1267
elseif key=='e' and equipped and not animating and cooled and combo < 3 then
1268
print("epress")
1269
attacking = true
1270
ready = true
1271
animstate = 2
1272
keyframe = 0
1273
combo = combo + 1
1274
print(combo)
1275
elseif key=='q' and not animating and not attacking and cooled2 and Mouse.Target and Mouse.Target.Parent and Mouse.Target.Parent:FindFirstChild("Humanoid") and Mouse.Target.Parent ~= Player.Character and (Player.Character.Torso.Position-Mouse.Target.Parent:FindFirstChild("Torso").Position).magnitude <= 45 then
1276
print("qpress")
1277
attacking = true
1278
qtarget = Mouse.Target.Parent
1279
ready = true
1280
animstate = 3
1281
keyframe = 0
1282
elseif key=='r' and not animating and cooled3 then
1283
print("rpress")
1284
attacking = true
1285
ready = true
1286
animstate = 4
1287
keyframe = 0
1288
elseif key=='t' and not animating and cooled4 and equipped and not attacking then
1289
print("tpress")
1290
attacking = true
1291
ready = true
1292
animstate = 5
1293
keyframe = 0
1294
end
1295
end)
1296
1297
blade.Touched:connect(function(hit)
1298
if hitter and hit ~= nil and hit.Parent ~= nil and hit.Parent:FindFirstChild("Humanoid") ~= nil then
1299
local humanoid = hit.Parent:findFirstChild("Humanoid")
1300
if humanoid ~= nil and humanoid ~= Character.Humanoid and Character.Humanoid ~= nil then
1301
local donthit = false
1302
for _,v in pairs (hits) do
1303
if v == hit.Parent.Name then
1304
donthit = true
1305
end
1306
end
1307
if not donthit then		
1308
local sound = Instance.new("Sound", hit.Parent:FindFirstChild("Torso"))
1309
sound.SoundId = "rbxassetid://526719128"
1310
sound.Volume = 0.7
1311
sound.PlayOnRemove = true
1312
sound:Remove()
1313
humanoid:TakeDamage(damage)
1314
indicate(hit.Parent:FindFirstChild("Head"),damage)
1315
table.insert(hits,hit.Parent.Name)				
1316
end
1317
end
1318
end
1319
end)