-
Notifications
You must be signed in to change notification settings - Fork 21
/
Copy pathFEPen.lua
583 lines (550 loc) · 22 KB
/
FEPen.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
--[[
Hat to wear: https://www.roblox.com/catalog/4506945409/Corrupt-Demonic-Greatsword
]]--
loadstring(game:HttpGet("https://raw.githubusercontent.com/Tescalus/Pendulum-Hubs-Source/main/Reanimation.lua"))()
-----------------------------------------------------------------------------------
local plrs = game:GetService("Players")
local plr = plrs.LocalPlayer
local char = game.Workspace.non
local tweenserv = game:GetService("TweenService")
local lighting = game:GetService("Lighting")
local hum = char:FindFirstChildOfClass("Humanoid")
local mou = plr:GetMouse()
local tor = char:FindFirstChild("Torso") or char:FindFirstChild("UpperTorso")
local root = char:FindFirstChild("HumanoidRootPart")
local head = char:FindFirstChild("Head")
local face = head:FindFirstChildOfClass("Decal")
local larm = char:FindFirstChild("Left Arm") or char:FindFirstChild("LeftUpperArm")
local rarm = char:FindFirstChild("Right Arm") or char:FindFirstChild("RightUpperArm")
local rleg = char:FindFirstChild("Right Leg") or char:FindFirstChild("RightUpperLeg")
local lleg = char:FindFirstChild("Left Leg") or char:FindFirstChild("LeftUpperLeg")
local neck = tor:FindFirstChild("Neck")
local rootj = root:FindFirstChild("RootJoint")
local LS = tor:FindFirstChild("Left Shoulder")
local RS = tor:FindFirstChild("Right Shoulder")
local LH = tor:FindFirstChild("Left Hip")
local RH = tor:FindFirstChild("Right Hip")
local bp = plr:FindFirstChild("Backpack")
hum:ClearAllChildren()
char.Animate:remove()
local rootj0 = rootj.C0
local neck0 = neck.C0
local LS0 = LS.C0
local RS0 = RS.C0
local LH0 = LH.C0
local RH0 = RH.C0
local rootj1 = rootj.C1
local neck1 = neck.C1
local LS1 = LS.C1
local RS1 = RS.C1
local LH1 = LH.C1
local RH1 = RH.C1
-----------------------------------------------------------------------------------
local CFn = CFrame.new
local CFa = CFrame.Angles
local Rad = math.rad
local Sin = math.sin
local Cos = math.cos
local sine = 1
char.MeshPartAccessory.Handle.AccessoryWeld:Destroy()
local penp = char.MeshPartAccessory.Handle
local penpw = Instance.new("Weld", penp)
penpw.Part0 = rarm
penpw.Part1 = penp
penpw.C1 = CFn(0, -1, 0) * CFa(0, 0, Rad(180))
local penpw0 = penpw.C0
local penpw1 = penpw.C1
local penw = penpw
local penw0 = penw.C0
local penw1 = penw.C1
-----------------------------------------------------------------------------------
local ws = 16
local jp = 50
local out = false
local ouch = false
local hitok = false
local canattack = true
local stabstate = 1
local Stabbing = false
local Throwing = false
local rot = 1
local dmg = 5
-----------------------------------------------------------------------------------
ArtificialHB = Instance.new("BindableEvent", script)
ArtificialHB.Name = "Heartbeat"
script:WaitForChild("Heartbeat")
frame = 1 / 60
tf = 0
allowframeloss = false
tossremainder = false
lastframe = tick()
script.Heartbeat:Fire()
game:GetService("RunService").Heartbeat:connect(function(s, p)
tf = tf + s
if tf >= frame then
if allowframeloss then
script.Heartbeat:Fire()
lastframe = tick()
else
for i = 1, math.floor(tf / frame) do
script.Heartbeat:Fire()
end
lastframe = tick()
end
if tossremainder then
tf = 0
else
tf = tf - frame * math.floor(tf / frame)
end
end
end)
function swait(num)
if num == 0 or num == nil then
game:service("RunService").Stepped:wait(0)
else
for i = 0, num do
game:service("RunService").Stepped:wait(0)
end
end
end
function clerp(a, b, t)
return a:lerp(b, t)
end
function ToggleSharp()
if not button:FindFirstChild("Penclickit360") then
local clickso = Instance.new("Sound", button)
clickso.SoundId = "rbxassetid://537744814"
clickso.Name = "Penclickit360"
clickso.Volume = 5
clickso:Play()
else
local clickso = button:FindFirstChild("Penclickit360")
clickso:Play()
end
if out == false then
dmg = 30
out = true
else
dmg = 5
out = false
end
end
function Stab()
if stabstate == 1 and canattack == true then
Stabbing = true
canattack = false
stabstate = 2
hum.WalkSpeed = 35
hum.JumpPower = 7
hitok = true
penp.Touched:connect(function(hit)
if hitok == true and not hit:IsDescendantOf(char) and hit.Parent:FindFirstChildOfClass("Humanoid") then
hitok = false
local owdude = hit.Parent
local owhum = owdude:FindFirstChildOfClass("Humanoid")
if out == true then
local bloodsound = Instance.new("Sound", hit)
bloodsound.Volume = 10
bloodsound.SoundId = "rbxassetid://180083298"
bloodsound:Play()
game:GetService("Debris"):AddItem(bloodsound, 1)
local bloodsplash = Instance.new("ParticleEmitter", hit)
bloodsplash.Lifetime = NumberRange.new(0.7, 1)
bloodsplash.Speed = NumberRange.new(6)
bloodsplash.SpreadAngle = Vector2.new(-360, 360)
bloodsplash.Rate = 1000
bloodsplash.Size = NumberSequence.new({NumberSequenceKeypoint.new(0, 3), NumberSequenceKeypoint.new(1, 0)})
bloodsplash.Transparency = NumberSequence.new({NumberSequenceKeypoint.new(0, 0.2), NumberSequenceKeypoint.new(1, 1)})
bloodsplash.Color = ColorSequence.new({ColorSequenceKeypoint.new(0, Color3.fromRGB(255, 255, 255)), ColorSequenceKeypoint.new(1, Color3.fromRGB(0, 0, 0))})
bloodsplash.Texture = "rbxassetid://771221224"
game:GetService("Debris"):AddItem(bloodsplash, 1)
wait(0.25)
bloodsplash.Enabled = false
end
end
if hitok == true and not hit:IsDescendantOf(char) and hit.Parent.Parent:FindFirstChildOfClass("Humanoid") then
hitok = false
local owdude = hit.Parent.Parent
local owhum = owdude:FindFirstChildOfClass("Humanoid")
if out == true then
local bloodsound = Instance.new("Sound", hit)
bloodsound.Volume = 10
bloodsound.SoundId = "rbxassetid://180083298"
bloodsound:Play()
game:GetService("Debris"):AddItem(bloodsound, 1)
local bloodsplash = Instance.new("ParticleEmitter", hit)
bloodsplash.Lifetime = NumberRange.new(0.7, 1)
bloodsplash.Speed = NumberRange.new(6)
bloodsplash.SpreadAngle = Vector2.new(-360, 360)
bloodsplash.Rate = 1000
bloodsplash.Size = NumberSequence.new({NumberSequenceKeypoint.new(0, 3), NumberSequenceKeypoint.new(1, 0)})
bloodsplash.Transparency = NumberSequence.new({NumberSequenceKeypoint.new(0, 0.2), NumberSequenceKeypoint.new(1, 1)})
bloodsplash.Color = ColorSequence.new({ColorSequenceKeypoint.new(0, Color3.fromRGB(255, 255, 255)), ColorSequenceKeypoint.new(1, Color3.fromRGB(0, 0, 0))})
bloodsplash.Texture = "rbxassetid://771221224"
game:GetService("Debris"):AddItem(bloodsplash, 1)
wait(0.25)
bloodsplash.Enabled = false
end
end
end)
for i = 0,1,.15 do
penw.C1 = clerp(penw.C1, penw1 * CFa(0, Rad(-90), 0), i)
neck.C1 = clerp(neck.C1, neck1 * CFa(Rad(-2), 0, 0), i)
rootj.C1 = clerp(rootj.C1, rootj1 * CFn(0, 0, 0.025), i)
LS.C1 = clerp(LS.C1, LS1 * CFa(Rad(-30), 0, Rad(-40)), i)
RS.C1 = clerp(RS.C1, RS1 * CFa(Rad(-30), Rad(-30), Rad(-3)), i)
LH.C1 = clerp(LH.C1, LH1 * CFn(0, -0.025, 0) * CFa(Rad(5), Rad(-5), 0), i)
RH.C1 = clerp(RH.C1, RH1 * CFn(0, -0.025, 0) * CFa(Rad(5), Rad(5), 0), i)
LS.C0 = clerp(LS.C0, LS0, i)
RS.C0 = clerp(RS.C0, RS0 * CFa(0, 0, Rad(150)), i)
LH.C0 = clerp(LH.C0, LH0, i)
RH.C0 = clerp(RH.C0, RH0, i)
swait()
end
for i = 0,1,.15 do
penw.C1 = clerp(penw.C1, penw1 * CFa(0, Rad(-90), 0), i)
neck.C1 = clerp(neck.C1, neck1 * CFa(Rad(-2), 0, 0), i)
rootj.C1 = clerp(rootj.C1, rootj1 * CFn(0, 0, 0.025), i)
LS.C1 = clerp(LS.C1, LS1 * CFa(Rad(-30), 0, Rad(-40)), i)
RS.C1 = clerp(RS.C1, RS1 * CFa(Rad(20), Rad(-30), Rad(-3)), i)
LH.C1 = clerp(LH.C1, LH1 * CFn(0, -0.025, 0) * CFa(Rad(5), Rad(-5), 0), i)
RH.C1 = clerp(RH.C1, RH1 * CFn(0, -0.025, 0) * CFa(Rad(5), Rad(5), 0), i)
LS.C0 = clerp(LS.C0, LS0, i)
RS.C0 = clerp(RS.C0, RS0 * CFa(0, 0, Rad(20)), i)
LH.C0 = clerp(LH.C0, LH0, i)
RH.C0 = clerp(RH.C0, RH0, i)
swait()
end
hitok = false
hum.WalkSpeed = ws
hum.JumpPower = jp
canattack = true
Stabbing = false
elseif stabstate == 2 and canattack == true then
canattack = false
stabstate = 1
hum.WalkSpeed = 35
hum.JumpPower = 7
hitok = true
penp.Touched:connect(function(hit)
if hitok == true and not hit:IsDescendantOf(char) and hit.Parent:FindFirstChildOfClass("Humanoid") then
local owdude = hit.Parent
local owhum = owdude:FindFirstChildOfClass("Humanoid")
if out == true then
local bloodsound = Instance.new("Sound", hit)
bloodsound.Volume = 10
bloodsound.SoundId = "rbxassetid://180083298"
bloodsound:Play()
game:GetService("Debris"):AddItem(bloodsound, 1)
local bloodsplash = Instance.new("ParticleEmitter", hit)
bloodsplash.Lifetime = NumberRange.new(0.7, 1)
bloodsplash.Speed = NumberRange.new(6)
bloodsplash.SpreadAngle = Vector2.new(-360, 360)
bloodsplash.Rate = 1000
bloodsplash.Size = NumberSequence.new({NumberSequenceKeypoint.new(0, 3), NumberSequenceKeypoint.new(1, 0)})
bloodsplash.Transparency = NumberSequence.new({NumberSequenceKeypoint.new(0, 0.2), NumberSequenceKeypoint.new(1, 1)})
bloodsplash.Color = ColorSequence.new({ColorSequenceKeypoint.new(0, Color3.fromRGB(255, 255, 255)), ColorSequenceKeypoint.new(1, Color3.fromRGB(0, 0, 0))})
bloodsplash.Texture = "rbxassetid://771221224"
game:GetService("Debris"):AddItem(bloodsplash, 1)
wait(0.25)
bloodsplash.Enabled = false
end
end
if hitok == true and not hit:IsDescendantOf(char) and hit.Parent.Parent:FindFirstChildOfClass("Humanoid") then
hitok = false
local owdude = hit.Parent.Parent
local owhum = owdude:FindFirstChildOfClass("Humanoid")
if out == true then
local bloodsound = Instance.new("Sound", hit)
bloodsound.Volume = 10
bloodsound.SoundId = "rbxassetid://180083298"
bloodsound:Play()
game:GetService("Debris"):AddItem(bloodsound, 1)
local bloodsplash = Instance.new("ParticleEmitter", hit)
bloodsplash.Lifetime = NumberRange.new(0.7, 1)
bloodsplash.Speed = NumberRange.new(6)
bloodsplash.SpreadAngle = Vector2.new(-360, 360)
bloodsplash.Rate = 1000
bloodsplash.Size = NumberSequence.new({NumberSequenceKeypoint.new(0, 3), NumberSequenceKeypoint.new(1, 0)})
bloodsplash.Transparency = NumberSequence.new({NumberSequenceKeypoint.new(0, 0.2), NumberSequenceKeypoint.new(1, 1)})
bloodsplash.Color = ColorSequence.new({ColorSequenceKeypoint.new(0, Color3.fromRGB(255, 255, 255)), ColorSequenceKeypoint.new(1, Color3.fromRGB(0, 0, 0))})
bloodsplash.Texture = "rbxassetid://771221224"
game:GetService("Debris"):AddItem(bloodsplash, 1)
wait(0.25)
bloodsplash.Enabled = false
end
end
end)
for i = 0,1,.15 do
penw.C1 = clerp(penw.C1, penw1 * CFa(0, Rad(-90), 0), i)
neck.C1 = clerp(neck.C1, neck1 * CFa(Rad(-2), 0, 0), i)
rootj.C1 = clerp(rootj.C1, rootj1 * CFn(0, 0, 0.025), i)
LS.C1 = clerp(LS.C1, LS1 * CFa(Rad(-30), 0, Rad(-40)), i)
RS.C1 = clerp(RS.C1, RS1 * CFa(Rad(30), Rad(30), Rad(-3)), i)
LH.C1 = clerp(LH.C1, LH1 * CFn(0, -0.025, 0) * CFa(Rad(5), Rad(-5), 0), i)
RH.C1 = clerp(RH.C1, RH1 * CFn(0, -0.025, 0) * CFa(Rad(5), Rad(5), 0), i)
LS.C0 = clerp(LS.C0, LS0, i)
RS.C0 = clerp(RS.C0, RS0 * CFa(0, 0, Rad(150)), i)
LH.C0 = clerp(LH.C0, LH0, i)
RH.C0 = clerp(RH.C0, RH0, i)
swait()
end
for i = 0,1,.15 do
penw.C1 = clerp(penw.C1, penw1 * CFa(0, Rad(-90), 0), i)
neck.C1 = clerp(neck.C1, neck1 * CFa(Rad(-2), 0, 0), i)
rootj.C1 = clerp(rootj.C1, rootj1 * CFn(0, 0, 0.025), i)
LS.C1 = clerp(LS.C1, LS1 * CFa(Rad(-30), 0, Rad(-40)), i)
RS.C1 = clerp(RS.C1, RS1 * CFa(Rad(-20), Rad(30), Rad(-3)), i)
LH.C1 = clerp(LH.C1, LH1 * CFn(0, -0.025, 0) * CFa(Rad(5), Rad(-5), 0), i)
RH.C1 = clerp(RH.C1, RH1 * CFn(0, -0.025, 0) * CFa(Rad(5), Rad(5), 0), i)
LS.C0 = clerp(LS.C0, LS0, i)
RS.C0 = clerp(RS.C0, RS0 * CFa(0, 0, Rad(20)), i)
LH.C0 = clerp(LH.C0, LH0, i)
RH.C0 = clerp(RH.C0, RH0, i)
swait()
end
hitok = false
hum.WalkSpeed = ws
hum.JumpPower = jp
canattack = true
Stabbing = false
end
end
function Throw()
if canattack == true then
Throwing = true
canattack = false
hum.WalkSpeed = 35
hum.JumpPower = 7
ouch = true
for i = 0,1,.15 do
penw.C1 = clerp(penw.C1, penw1 * CFa(0, 0, Rad(-90)), i)
neck.C1 = clerp(neck.C1, neck1 * CFa(Rad(-2), 0, 0), i)
rootj.C1 = clerp(rootj.C1, rootj1 * CFn(0, 0, 0.025), i)
LS.C1 = clerp(LS.C1, LS1 * CFa(Rad(-30), 0, Rad(-40)), i)
RS.C1 = clerp(RS.C1, RS1 * CFa(0, Rad(-30), Rad(-3)), i)
LH.C1 = clerp(LH.C1, LH1 * CFn(0, -0.025, 0) * CFa(Rad(5), Rad(-5), 0), i)
RH.C1 = clerp(RH.C1, RH1 * CFn(0, -0.025, 0) * CFa(Rad(5), Rad(5), 0), i)
LS.C0 = clerp(LS.C0, LS0, i)
RS.C0 = clerp(RS.C0, RS0 * CFa(0, Rad(90), Rad(90)), i)
LH.C0 = clerp(LH.C0, LH0, i)
RH.C0 = clerp(RH.C0, RH0, i)
swait()
end
local throwpen = pen:Clone()
for i,v in pairs(throwpen:GetChildren()) do
if v:IsA("BasePart") and v.CanCollide == true then
v.CanCollide = false
end
end
throwpen.Parent = workspace
local throwbod = throwpen:FindFirstChild("body")
if throwbod:FindFirstChild("penWeld22") then
throwbod:FindFirstChild("penWeld22"):Destroy()
end
local throwbv = Instance.new("BodyVelocity", throwbod)
throwbv.Velocity = mou.Hit.lookVector * 100
throwbv.MaxForce = Vector3.new(100000000000000000, 100000000000000000, 100000000000000000)
throwbod.Touched:connect(function(hit)
if ouch == true and not hit:IsDescendantOf(char) then
ouch = false
throwpen:Destroy()
if hit.Parent:FindFirstChildOfClass("Humanoid") then
local throwhum = hit.Parent:FindFirstChildOfClass("Humanoid")
if out == true then
local bloodsound = Instance.new("Sound", hit)
bloodsound.Volume = 10
bloodsound.SoundId = "rbxassetid://180083286"
bloodsound:Play()
game:GetService("Debris"):AddItem(bloodsound, 1)
local bloodsplash = Instance.new("ParticleEmitter", hit)
bloodsplash.Lifetime = NumberRange.new(0.7, 1)
bloodsplash.Speed = NumberRange.new(6)
bloodsplash.SpreadAngle = Vector2.new(-360, 360)
bloodsplash.Rate = 1000
bloodsplash.Size = NumberSequence.new({NumberSequenceKeypoint.new(0, 3), NumberSequenceKeypoint.new(1, 0)})
bloodsplash.Transparency = NumberSequence.new({NumberSequenceKeypoint.new(0, 0.2), NumberSequenceKeypoint.new(1, 1)})
bloodsplash.Color = ColorSequence.new({ColorSequenceKeypoint.new(0, Color3.fromRGB(255, 255, 255)), ColorSequenceKeypoint.new(1, Color3.fromRGB(0, 0, 0))})
bloodsplash.Texture = "rbxassetid://771221224"
game:GetService("Debris"):AddItem(bloodsplash, 1)
wait(0.25)
bloodsplash.Enabled = false
end
end
if hit.Parent.Parent:FindFirstChildOfClass("Humanoid") then
local throwhum = hit.Parent.Parent:FindFirstChildOfClass("Humanoid")
if out == true then
local bloodsound = Instance.new("Sound", hit)
bloodsound.Volume = 10
bloodsound.SoundId = "rbxassetid://180083286"
bloodsound:Play()
game:GetService("Debris"):AddItem(bloodsound, 1)
local bloodsplash = Instance.new("ParticleEmitter", hit)
bloodsplash.Lifetime = NumberRange.new(0.7, 1)
bloodsplash.Speed = NumberRange.new(6)
bloodsplash.SpreadAngle = Vector2.new(-360, 360)
bloodsplash.Rate = 1000
bloodsplash.Size = NumberSequence.new({NumberSequenceKeypoint.new(0, 3), NumberSequenceKeypoint.new(1, 0)})
bloodsplash.Transparency = NumberSequence.new({NumberSequenceKeypoint.new(0, 0.2), NumberSequenceKeypoint.new(1, 1)})
bloodsplash.Color = ColorSequence.new({ColorSequenceKeypoint.new(0, Color3.fromRGB(255, 255, 255)), ColorSequenceKeypoint.new(1, Color3.fromRGB(0, 0, 0))})
bloodsplash.Texture = "rbxassetid://771221224"
game:GetService("Debris"):AddItem(bloodsplash, 1)
wait(0.25)
bloodsplash.Enabled = false
end
end
end
end)
for i,v in pairs(pen:GetChildren()) do
if v:IsA("BasePart") then
v.Transparency = 1
end
end
for i = 0,1,.1 do
penw.C1 = clerp(penw.C1, penw1 * CFa(0, 0, Rad(-90)), i)
neck.C1 = clerp(neck.C1, neck1 * CFa(Rad(-2), 0, 0), i)
rootj.C1 = clerp(rootj.C1, rootj1 * CFn(0, 0, 0.025) * CFa(Rad(-20), 0, 0), i)
LS.C1 = clerp(LS.C1, LS1 * CFa(Rad(-30), 0, Rad(-40)), i)
RS.C1 = clerp(RS.C1, RS1 * CFa(0, Rad(-30), Rad(-3)), i)
LH.C1 = clerp(LH.C1, LH1 * CFn(0, -0.025, 0) * CFa(Rad(5), Rad(-5), Rad(-20)), i)
RH.C1 = clerp(RH.C1, RH1 * CFn(0, -0.025, 0) * CFa(Rad(5), Rad(5), Rad(-20)), i)
LS.C0 = clerp(LS.C0, LS0, i)
RS.C0 = clerp(RS.C0, RS0 * CFa(0, Rad(-80), Rad(90)), i)
LH.C0 = clerp(LH.C0, LH0, i)
RH.C0 = clerp(RH.C0, RH0, i)
swait()
end
for i = 0,1,.1 do
penw.C1 = clerp(penw.C1, penw1 * CFa(0, 0, Rad(-90)), i)
neck.C1 = clerp(neck.C1, neck1 * CFa(Rad(-30), 0, 0), i)
rootj.C1 = clerp(rootj.C1, rootj1 * CFn(0, 0, 0.025) * CFa(0, 0, Rad(-30)), i)
LS.C1 = clerp(LS.C1, LS1 * CFa(Rad(-30), 0, Rad(-40)), i)
RS.C1 = clerp(RS.C1, RS1 * CFa(0, Rad(-30), Rad(-3)), i)
LH.C1 = clerp(LH.C1, LH1 * CFn(0, -0.025, 0) * CFa(Rad(5), Rad(35), 0), i)
RH.C1 = clerp(RH.C1, RH1 * CFn(0, -0.025, 0) * CFa(Rad(5), Rad(35), 0), i)
LS.C0 = clerp(LS.C0, LS0, i)
RS.C0 = clerp(RS.C0, RS0 * CFn(0, 0, -0.5) * CFa(0, Rad(90), Rad(30)), i)
LH.C0 = clerp(LH.C0, LH0, i)
RH.C0 = clerp(RH.C0, RH0, i)
swait()
end
for i,v in pairs(pen:GetChildren()) do
if v:IsA("BasePart") then
v.Transparency = 0
end
end
hum.WalkSpeed = ws
hum.JumpPower = jp
canattack = true
Throwing = false
end
end
-----------------------------------------------------------------------------------
function kdown(k)
if k == "e" then
ToggleSharp()
elseif k == "f" then
Throw()
end
end
mou.KeyDown:connect(kdown)
mou.Button1Down:connect(Stab)
-----------------------------------------------------------------------------------
coroutine.wrap(function()
while true do
swait()
sine = sine + 1
rot = rot + 25
if rot == 360 then
rot = 1
end
local torvel = (root.Velocity * Vector3.new(1, 0, 1)).magnitude
if Stabbing == true then
state = "Stabbing"
elseif Throwing == true then
state = "Throwing"
elseif 1 < root.Velocity.y then
state = "Jump"
elseif -1 > root.Velocity.y then
state = "Fall"
elseif torvel < 1 then
state = "Idle"
elseif tor.Velocity.magnitude < 50 then
state = "Walk"
end
if state == "Jump" then
penw.C1 = clerp(penw.C1, penw1 * CFa(0, Rad(-90), 0), 0.15)
neck.C1 = clerp(neck.C1, neck1 * CFa(Rad(-2), 0, 0), 0.15)
rootj.C1 = clerp(rootj.C1, rootj1 * CFa(Rad(-15), 0, 0), 0.15)
LS.C1 = clerp(LS.C1, LS1 * CFa(Rad(10), 0, 0), 0.15)
RS.C1 = clerp(RS.C1, RS1 * CFa(Rad(10), 0, 0), 0.15)
LH.C1 = clerp(LH.C1, LH1 * CFn(0, -0.2, 0) * CFa(Rad(2), 0, Rad(-15)), 0.15)
RH.C1 = clerp(RH.C1, RH1 * CFn(0, -0.5, 0) * CFa(Rad(2), 0, Rad(15)), 0.15)
LS.C0 = clerp(LS.C0, LS0, 0.15)
RS.C0 = clerp(RS.C0, RS0, 0.15)
LH.C0 = clerp(LH.C0, LH0 * CFn(-0.2, 0, 0), 0.15)
RH.C0 = clerp(RH.C0, RH0 * CFn(0.5, 0, 0), 0.15)
elseif state == "Fall" then
penw.C1 = clerp(penw.C1, penw1 * CFa(0, Rad(-90), 0), 0.15)
neck.C1 = clerp(neck.C1, neck1 * CFa(0, 0, 0), 0.15)
rootj.C1 = clerp(rootj.C1, rootj1 * CFa(Rad(15), 0, 0), 0.15)
LS.C1 = clerp(LS.C1, LS1 * CFa(Rad(35), 0, 0), 0.15)
RS.C1 = clerp(RS.C1, RS1 * CFa(Rad(35), 0, 0), 0.15)
LH.C1 = clerp(LH.C1, LH1 * CFn(0.2, -0.2, -0.1) * CFa(Rad(15), 0, Rad(10)), 0.15)
RH.C1 = clerp(RH.C1, RH1 * CFn(-0.2, -0.2, -0.1) * CFa(Rad(15), 0, Rad(-10)), 0.15)
LS.C0 = clerp(LS.C0, LS0, 0.15)
RS.C0 = clerp(RS.C0, RS0, 0.15)
LH.C0 = clerp(LH.C0, LH0 * CFa(0, 0, Rad(-20)), 0.15)
RH.C0 = clerp(RH.C0, RH0 * CFa(0, 0, Rad(20)), 0.15)
elseif state == "Idle" then
penw.C1 = clerp(penw.C1, penw1 * CFn(0, 0, 0.5) * CFa(0, 0, Rad(rot)), 0.15)
neck.C1 = clerp(neck.C1, neck1 * CFa(Rad(-2 * Cos(sine / 15)), 0, 0), 0.15)
rootj.C1 = clerp(rootj.C1, rootj1 * CFn(0, 0, 0.025 * Cos(sine / 15)), 0.15)
LS.C1 = clerp(LS.C1, LS1 * CFa(Rad(-30), 0, Rad(-40)), 0.15)
RS.C1 = clerp(RS.C1, RS1 * CFa(Rad(2), 0, Rad(-3 * Cos(sine / 15))), 0.15)
LH.C1 = clerp(LH.C1, LH1 * CFn(0, -0.025 * Cos(sine / 15), 0) * CFa(Rad(5), Rad(-5), 0), 0.15)
RH.C1 = clerp(RH.C1, RH1 * CFn(0, -0.025 * Cos(sine / 15), 0) * CFa(Rad(5), Rad(5), 0), 0.15)
LS.C0 = clerp(LS.C0, LS0, 0.15)
RS.C0 = clerp(RS.C0, RS0 * CFa(0, 0, Rad(80)), 0.15)
LH.C0 = clerp(LH.C0, LH0, 0.15)
RH.C0 = clerp(RH.C0, RH0, 0.15)
elseif state == "Walk" then
penw.C1 = clerp(penw.C1, penw1 * CFa(0, Rad(-90), 0), 0.15)
neck.C1 = clerp(neck.C1, neck1 * CFa(Rad(-5), 0, 0), 0.15)
rootj.C1 = clerp(rootj.C1, rootj1 * CFn(0, 0.1 * Cos(sine /3), 0.1 * Cos(sine /3)) * CFa(Rad(-5), 0, Rad(5 * Cos(sine / 6))), 0.15)
LS.C1 = clerp(LS.C1, LS1 * CFa(0, 0, Rad(-50 * Cos(sine / 6))), 0.15)
RS.C1 = clerp(RS.C1, RS1 * CFa(0, 0, Rad(-50 * Cos(sine / 6))), 0.15)
LH.C1 = clerp(LH.C1, LH1 * CFa(Rad(2), Rad(-5), Rad(50 * Cos(sine / 6))), 0.15)
RH.C1 = clerp(RH.C1, RH1 * CFa(Rad(2), Rad(5), Rad(50 * Cos(sine / 6))), 0.15)
LS.C0 = clerp(LS.C0, LS0, 0.15)
RS.C0 = clerp(RS.C0, RS0, 0.15)
LH.C0 = clerp(LH.C0, LH0, 0.15)
RH.C0 = clerp(RH.C0, RH0, 0.15)
end
end
end)()
coroutine.wrap(function()
while true do
wait(60)
local ssss1 = Instance.new("BodyPosition"); ssss1.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
ssss1.Parent = maybe.Handle
for _=1,10 do
ssss1.Position = cloness.Handle.CFrame.p
wait(0.1)
end
ssss1:Destroy()
asasdd:Destroy()
asasdd = Instance.new("BodyVelocity", maybe.Handle)
asasdd.MaxForce = Vector3.new(10000,10000,10000)
asasdd.Velocity = Vector3.new(math.huge,math.huge,math.huge)
end
end)()
local s = Instance.new("Sound")
s.Name = "Sound"
s.SoundId = "https://web.roblox.com/asset/?id=221057812"
s.Volume = 1
s.Looped = false
s.archivable = false
s.Parent = game.Workspace
wait(2)
s:play()