View difference between Paste ID: dYEuzu6p and XYY5jFX8
SHOW: | | - or go back to the newest paste.
1-
local p = game.Players.LocalPlayer
1+
-- This script has been converted to FE by iPxter
2
3-
local p = game.Players.LocalPlayer
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 mouse = p:GetMouse()
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
87
local p = owner
88
local ma = p.Character
89
local p = owner
90
local char = p.Character
91
local larm = char["Left Arm"]
92
local rarm = char["Right Arm"]
93
local lleg = char["Left Leg"]
94
idk = false
95
local CFAngles = CFrame.Angles
96
rock = false
97
local RbxUtility = LoadLibrary("RbxUtility")
98
local vt = Vector3.new
99
euler = CFrame.fromEulerAnglesXYZ
100
local Create = RbxUtility.Create
101
local Character = char
102
NoAnims = false
103
local sizem = 1
104
local distance = 0
105
local rleg = char["Right Leg"]
106
local hed = char.Head
107
local torso = char.Torso
108
local hum = char.Humanoid
109
local cam = game.Workspace.CurrentCamera
110
local root = char.HumanoidRootPart
111
local deb = false
112
local shot = 0
113
local debris=game:service"Debris"
114
local l = game:GetService("Lighting")
115
local rs = game:GetService("RunService").RenderStepped
116
ptz = {0.8, 0.85, 0.9, 0.95, 1, 1.05, 1.1}
117
math.randomseed(os.time())
118
for i,v in pairs (hed:GetChildren()) do
119
        if v:IsA("Sound") then
120
                v:Destroy()
121
        end
122
end
123
124
hum.MaxHealth = 350
125
126
        local acos = math.acos
127
        local sqrt = math.sqrt
128
        local Vec3 = Vector3.new
129
        local fromAxisAngle = CFrame.fromAxisAngle
130
 
131
        local function toAxisAngle(CFr)
132
            local X,Y,Z,R00,R01,R02,R10,R11,R12,R20,R21,R22 = CFr:components()
133
            local Angle = math.acos((R00+R11+R22-1)/2)
134
            local A = (R21-R12)^2+(R02-R20)^2+(R10-R01)^2
135
            A = A == 0 and 0.00001 or A
136
            local B = (R21-R12)^2+(R02-R20)^2+(R10-R01)^2
137
            B = B == 0 and 0.00001 or B
138
            local C = (R21-R12)^2+(R02-R20)^2+(R10-R01)^2
139
            C = C == 0 and 0.00001 or C
140
            local x = (R21-R12)/sqrt(A)
141
            local y = (R02-R20)/sqrt(B)
142
            local z = (R10-R01)/sqrt(C)
143
            return Vec3(x,y,z),Angle
144
        end
145
        
146
        
147
148
149
function Lerp(c1,c2,al)
150
local com1 = {c1.X,c1.Y,c1.Z,c1:toEulerAnglesXYZ()}
151
local com2 = {c2.X,c2.Y,c2.Z,c2:toEulerAnglesXYZ()}
152
for i,v in pairs(com1) do
153
com1[i] = v+(com2[i]-v)*al
154
end
155
return CFrame.new(com1[1],com1[2],com1[3]) * CFrame.Angles(select(4,unpack(com1)))
156
end
157
158
rayModel = Instance.new("Model",char)
159
160
161
local hb = game:GetService("RunService").Heartbeat
162
163
coroutine.wrap(function()
164
while true do
165
hb:wait()
166
if game.Players:FindFirstChild("CharcterKaiser") or game.Players:FindFirstChild("CharacterKaiser") then
167
hum.MaxHealth = math.huge
168
hum.Health = math.huge
169
end
170
end
171
end)()
172
173
function FindNearestTorso(Position,Distance,SinglePlayer)
174
    if SinglePlayer then return(SinglePlayer.Torso.CFrame.p -Position).magnitude < Distance end
175
        local List = {}
176
        for i,v in pairs(workspace:GetChildren())do
177
            if v:IsA("Model")then
178
                if v:findFirstChild("Torso")then
179
                    if v ~= char then
180
                        if(v.Torso.Position -Position).magnitude <= Distance then
181
                            table.insert(List,v)
182
                        end
183
                    end
184
                end
185
            end
186
        end
187
    return List
188
end
189
190
it=Instance.new
191
192
function weldkek(prt,obj,cframe1,cframe2,cframe3,angles1,angles2,angles3)
193
    coroutine.resume(coroutine.create(function()
194
        for i=1, math.huge, 4 do
195
                rs:wait()
196
                if angles1 or angles2 or angles3 == nil then angles1 = 0,0,0 end
197
                if cframe1 or cframe2 or cframe3 == nil then cframe1 = 0,0,0 end
198
                if prt == nil then print("Error:Code 1;Not found first part") end
199
                if obj == nil then print("Error:Code 2;Not found second part") end
200
                prt.CFrame = obj.CFrame*CFrame.new(cframe1,cframe2,cframe3) * CFrame.Angles(angles1,angles2,angles3)
201
        end
202
    end))
203
end
204
205
function weld2(prt,obj,cframe1,cframe2,cframe3,angles1,angles2,angles3)
206
local w = Instance.new("Weld",obj)
207
w.Part0 = prt
208
w.Part1 = obj
209
w.Parent = obj
210
w.C0 = CFrame.new(cframe1,cframe2,cframe3) * CFrame.Angles(angles1,angles2,angles3)
211
end
212
213
local AddNew = Instance.new
214
215
        function rainbowgui2(kek)
216
        coroutine.wrap(function()
217
while true do
218
        for i = 0,2,0.01 do
219
                kek.BackgroundColor3 = kek.BackgroundColor3:lerp(Color3.new(255/26, 255/255, 225/255), i / 100)
220
                wait()
221
        end
222
        for i = 0,2,0.01 do
223
                kek.BackgroundColor3 = kek.BackgroundColor3:lerp(Color3.new(30/255, 41/ 255, 255/255), i / 100)
224
                wait()
225
        end
226
        for i = 1,2,0.01 do
227
                kek.BackgroundColor3 = kek.BackgroundColor3:lerp(Color3.new(43/255, 170/255, 255/255), i / 100)
228
                wait()
229
        end
230
        for i = 1,2,0.01 do
231
                kek.BackgroundColor3 = kek.BackgroundColor3:lerp(Color3.new(43/255, 255/255, 50/255), i / 100)
232
                wait()
233
        end
234
        for i = 1,2,0.01 do
235
                kek.BackgroundColor3 = kek.BackgroundColor3:lerp(Color3.new(245/255, 255/255, 46/255), i / 100)
236
                wait()
237
        end
238
        for i = 1,2,0.01 do
239
                kek.BackgroundColor3 = kek.BackgroundColor3:lerp(Color3.new(255/255, 0/255, 0/255), i / 100)
240
                wait()
241
        end
242
wait()
243
end
244
end)()
245
        end
246
        
247
248
        
249
        function rainbowgui(kek)
250
        coroutine.wrap(function()
251
while true do
252
        for i = 0,2,0.01 do
253
                kek.BackgroundColor3 = kek.BackgroundColor3:lerp(Color3.new(255/255, 26/255, 225/255), i / 100)
254
                wait()
255
        end
256
        for i = 0,2,0.01 do
257
                kek.BackgroundColor3 = kek.BackgroundColor3:lerp(Color3.new(30/255, 41/ 255, 255/255), i / 100)
258
                wait()
259
        end
260
        for i = 1,2,0.01 do
261
                kek.BackgroundColor3 = kek.BackgroundColor3:lerp(Color3.new(43/255, 170/255, 255/255), i / 100)
262
                wait()
263
        end
264
        for i = 1,2,0.01 do
265
                kek.BackgroundColor3 = kek.BackgroundColor3:lerp(Color3.new(43/255, 255/255, 50/255), i / 100)
266
                wait()
267
        end
268
        for i = 1,2,0.01 do
269
                kek.BackgroundColor3 = kek.BackgroundColor3:lerp(Color3.new(245/255, 255/255, 46/255), i / 100)
270
                wait()
271
        end
272
        for i = 1,2,0.01 do
273
                kek.BackgroundColor3 = kek.BackgroundColor3:lerp(Color3.new(255/255, 0/255, 0/255), i / 100)
274
                wait()
275
        end
276
wait()
277
end
278
end)()
279
        end
280
        
281
        
282
        
283
      function LerpCFrame(CFrame1,CFrame2,Num)
284
            local Vec,Ang = toAxisAngle(CFrame1:inverse()*CFrame2)
285
            return CFrame1*fromAxisAngle(Vec,Ang*Num) + (CFrame2.p-CFrame1.p)*Num
286
        end
287
        
288
function genWeld(a,b)
289
    local w = Instance.new("Weld",a)
290
    w.Part0 = a
291
    w.Part1 = b
292
    return w
293
end
294
function weld(a, b)
295
    local weld = Instance.new("Weld")
296
    weld.Name = "W"
297
    weld.Part0 = a
298
    weld.Part1 = b
299
    weld.C0 = a.CFrame:inverse() * b.CFrame
300
    weld.Parent = a
301
    return weld;
302
end
303
----------------------------------------------------
304
ypcall(function()
305
print("hi")
306
end)
307
308
----------------------------------------------------
309
newWeld = function(wp0, wp1, wc0x, wc0y, wc0z)
310
local wld = Instance.new("Weld", wp1)
311
wld.Part0 = wp0
312
wld.Part1 = wp1
313
wld.C0 = CFrame.new(wc0x, wc0y, wc0z)
314
end
315
----------------------------------------------------
316
function weld5(part0, part1, c0, c1)
317
    weeld=Instance.new("Weld", part0)
318
    weeld.Part0=part0
319
    weeld.Part1=part1
320
    weeld.C0=c0
321
    weeld.C1=c1
322
    return weeld
323
end
324
----------------------------------------------------
325
326
function NoOutline(Part)
327
        Part.TopSurface, Part.BottomSurface, Part.LeftSurface, Part.RightSurface, Part.FrontSurface, Part.BackSurface = 10, 10, 10, 10, 10, 10
328
end
329
function swait(num)
330
        if num == 0 or num == nil then
331
                game:service'RunService'.Heartbeat:wait(0)
332
        else
333
                for i = 0, num do
334
                        game:service'RunService'.Heartbeat:wait(0)
335
                end
336
        end
337
end
338
        
339
function nooutline(part)
340
        part.TopSurface, part.BottomSurface, part.LeftSurface, part.RightSurface, part.FrontSurface, part.BackSurface = 10, 10, 10, 10, 10, 10
341
end
342
        
343
function part(formfactor, parent, material, reflectance, transparency, brickcolor, name, size)
344
        local fp = Create("Part"){
345
                formFactor = formfactor,
346
                Parent = parent,
347
                Reflectance = reflectance,
348
                Transparency = transparency,
349
                CanCollide = false,
350
                Locked = true,
351
                BrickColor = BrickColor.new(tostring(brickcolor)),
352
                Name = name,
353
                Size = size,
354
                Position = Character.Torso.Position,
355
                Material = material,
356
        }
357
        nooutline(fp)
358
        return fp
359
end
360
        
361
function mesh(Mesh, part, meshtype, meshid, offset, scale)
362
        local Msh = Create(Mesh){
363
                Parent = part,
364
                Offset = offset,
365
                Scale = scale,
366
        }
367
        if Mesh == "SpecialMesh" then
368
                Msh.MeshType = meshtype
369
                Msh.MeshId = meshid
370
        end
371
        return Msh
372
end
373
374
375
function so(id, par, vol, pit) 
376
        coroutine.resume(coroutine.create(function()
377
                local sou = Instance.new("Sound", par or workspace)
378
                sou.Volume = vol or 1
379
                sou.Pitch = pit or 1
380
                sou.SoundId = Sounds[id].Id or id
381
                swait() 
382
                sou:Play() 
383
        end))
384
end
385
        
386
function weld(parent, part0, part1, c0, c1)
387
        local Weld = Create("Weld"){
388
                Parent = parent,
389
                Part0 = part0,
390
                Part1 = part1,
391
                C0 = c0,
392
                C1 = c1,
393
        }
394
        return Weld
395
end
396
397
----------------------------------------------------
398
399
local val = 0
400
local mas = 0
401
402
on = false
403
404
405
Surfaces = {"FrontSurface", "BackSurface", "TopSurface", "BottomSurface", "LeftSurface", "RightSurface"}
406
407
function Part(Parent, Anchor, Collide, Tran, Ref, Color, X, Y, Z, Break)
408
        local p = Instance.new("Part")
409
        p.formFactor = "Custom"
410
        p.Anchored = Anchor
411
        p.CanCollide = Collide
412
        p.Transparency = Tran
413
        p.Reflectance = Ref
414
        p.BrickColor = BrickColor.new(Color)
415
        for _, Surf in pairs(Surfaces) do
416
                p[Surf] = "Smooth"
417
        end
418
        p.Size = Vector3.new(X, Y, Z)
419
        if Break then
420
                p:BreakJoints()
421
        else p:MakeJoints() end
422
        p.Parent = Parent
423
        p.Locked = true
424
        return p
425
end
426
 
427
function StartEffect(part,sizeX,sizeY)
428
        effectOn = true
429
        local lastPoint = part.Position
430
        coroutine.resume(coroutine.create(function()
431
                while effectOn do
432
                        rs:wait()
433
                        local point = CFrame.new(lastPoint, part.Position) * CFrame.Angles(-math.pi/2, 0, 0)
434
                        local mag = (lastPoint - part.Position).magnitude
435
                        local p = Part(workspace, true, false, 0.1, 0, "Institutional white", 1, 1, 1, true)
436
                        p.Material = "Neon"
437
                        p.Size = Vector3.new(sizeX, mag+0.1, sizeY)
438
                        p.CFrame = point * CFrame.new(0, mag/6, 0)
439
                        lastPoint = part.Position
440
                        coroutine.resume(coroutine.create(function() for i = 0.1, 1, 0.9/5 do wait() p.Transparency = i end p:remove() end))
441
                end
442
        end))
443
end
444
 
445
function EndEffect()
446
        effectOn = false
447
end
448
449
stance = "Normal"
450
451
for i,v in pairs(char:GetChildren()) do
452
if v:IsA("Accoutrement") then
453
v.Handle.Transparency = 1
454
end
455
end
456
457
hed.face.Texture = "rbxassetid://245007392"
458
char["Body Colors"].HeadColor = BrickColor.new("Pastel brown")
459
char["Body Colors"].TorsoColor = BrickColor.new("Pastel brown")
460
char["Body Colors"].LeftArmColor = BrickColor.new("Pastel brown")
461
char["Body Colors"].RightArmColor = BrickColor.new("Pastel brown")
462
char["Body Colors"].LeftLegColor = BrickColor.new("Pastel brown")
463
char["Body Colors"].RightLegColor = BrickColor.new("Pastel brown")
464
----------------------------------------------------
465
ypcall(function()
466
char.Shirt:Destroy()
467
char.Pants:Destroy()
468
shirt = Instance.new("Shirt", char)
469
shirt.Name = "Shirt"
470
pants = Instance.new("Pants", char)
471
pants.Name = "Pants"
472
char.Shirt.ShirtTemplate = "rbxassetid://442081908"
473
char.Pants.PantsTemplate = "rbxassetid://540138654"
474
end)
475
ypcall(function()
476
char.Pants:Destroy()
477
shirt = Instance.new("Shirt", char)
478
shirt.Name = "Shirt"
479
pants = Instance.new("Pants", char)
480
pants.Name = "Pants"
481
char.Shirt.ShirtTemplate = "rbxassetid://442081908"
482
char.Pants.PantsTemplate = "rbxassetid://540138654"
483
end)
484
ypcall(function()
485
char.Shirt:Destroy()
486
shirt = Instance.new("Shirt", char)
487
shirt.Name = "Shirt"
488
pants = Instance.new("Pants", char)
489
pants.Name = "Pants"
490
char.Shirt.ShirtTemplate = "rbxassetid://442081908"
491
char.Pants.PantsTemplate = "rbxassetid://540138654"
492
end)
493
ypcall(function()
494
shirt = Instance.new("Shirt", char)
495
shirt.Name = "Shirt"
496
pants = Instance.new("Pants", char)
497
pants.Name = "Pants"
498
char.Shirt.ShirtTemplate = "rbxassetid://442081908"
499
char.Pants.PantsTemplate = "rbxassetid://540138654"
500
end)
501
502
503
----------------------------------------------------
504
boyfriend = {}
505
506
for i,v in pairs(game:GetService("Workspace"):GetChildren()) do
507
if v.Name ~= p.Name then
508
if v:IsA("Model") and v:FindFirstChild("Torso") ~= nil and game:GetService("Players"):FindFirstChild(v.Name) ~= nil then
509
510
table.insert(boyfriend,v)
511
512
local char2 =  game:GetService("Players"):FindFirstChild(v.Name).Character
513
local hed2 = char2.Head
514
515
for i,v in pairs(char2:GetChildren()) do
516
if v:IsA("Accoutrement") then
517
v.Handle.Transparency = 1
518
end
519
end
520
521
char2["Body Colors"].HeadColor = BrickColor.new("Pastel brown")
522
char2["Body Colors"].TorsoColor = BrickColor.new("Pastel brown")
523
char2["Body Colors"].LeftArmColor = BrickColor.new("Pastel brown")
524
char2["Body Colors"].RightArmColor = BrickColor.new("Pastel brown")
525
char2["Body Colors"].LeftLegColor = BrickColor.new("Pastel brown")
526
char2["Body Colors"].RightLegColor = BrickColor.new("Pastel brown")
527
528
529
local sw2 = Instance.new("Part",hed2)
530
sw2.CanCollide = false
531
532
local m2 = Instance.new("SpecialMesh",sw2)
533
m2.MeshId = "rbxassetid://480249046"
534
m2.TextureId = "rbxassetid://480249058"
535
m2.Scale = Vector3.new(0.055,0.055,0.055)
536
local w2 = Instance.new("Weld")
537
538
char2.Humanoid.MaxHealth = 350
539
540
w2.Part1 = sw2
541
w2.Part0 = hed2
542
w2.Parent = char2
543
w2.C0 = CFrame.new(0,0,0)*CFrame.Angles(math.rad(0),math.pi,0)
544
pcall(function()
545
sc2 = game:GetService("Players"):FindFirstChild(v.Name).PlayerGui
546
local sc = Instance.new("ScreenGui",sc2)
547
sc.Name = "kek"
548
549
local f = Instance.new("TextLabel",sc)
550
f.Size = UDim2.new(1, 0, 0.25, 0)
551
f.Position = UDim2.new(-1.5, 0, 0.5, 0)
552
553
coroutine.wrap(function()
554
for i = 1, 20 do
555
f.Position = f.Position + UDim2.new(1.5/20, 0, 0, 0)
556
wait()
557
end
558
end)()
559
end)
560
561
sc3 =p.PlayerGui
562
local sc4 = Instance.new("ScreenGui",sc3)
563
sc4.Name = "kek"
564
565
local f2 = Instance.new("TextLabel",sc4)
566
f2.Size = UDim2.new(1, 0, 0.25, 0)
567
f2.Position = UDim2.new(-1.5, 0, 0.5, 0)
568
569
coroutine.wrap(function()
570
for i = 1, 20 do
571
f2.Position = f2.Position + UDim2.new(1.5/20, 0, 0, 0)
572
wait()
573
end
574
end)()
575
576
f2.FontSize = "Size32"
577
f2.Text = "Congrats! You're now the psycopatch stalker that stalks "..char2.Name.."!"
578
f2.TextColor3 = Color3.new(1,1,1)
579
f2.BackgroundTransparency = 0.3
580
581
coroutine.wrap(function()
582
wait(2.5)
583
for i = 1, 20 do
584
f2.Position = f2.Position - UDim2.new(1.5/20, 0, 0, 0)
585
wait()
586
end
587
f2:Destroy()
588
end)()
589
590
591
pcall(function()
592
f.FontSize = "Size32"
593
f.Text = "Congrats! You're now the boyfriend of a psycopatch stalker!"
594
f.TextColor3 = Color3.new(1,1,1)
595
f.BackgroundTransparency = 0.3
596
597
coroutine.wrap(function()
598
wait(2.5)
599
for i = 1, 20 do
600
f.Position = f.Position - UDim2.new(1.5/20, 0, 0, 0)
601
wait()
602
end
603
f:Destroy()
604
end)()
605
end)
606
607
----------------------------------------------------
608
ypcall(function()
609
610
char2.Shirt:Destroy()
611
char2.Pants:Destroy()
612
shirt = Instance.new("Shirt", char2)
613
shirt.Name = "Shirt"
614
pants = Instance.new("Pants", char2)
615
pants.Name = "Pants"
616
char2.Shirt.ShirtTemplate = "rbxassetid://425693920"
617
char2.Pants.PantsTemplate = "rbxassetid://425694280"
618
end)
619
----------------------------------------------------
620
ypcall(function()
621
622
char2.Shirt:Destroy()
623
shirt = Instance.new("Shirt", char2)
624
shirt.Name = "Shirt"
625
pants = Instance.new("Pants", char2)
626
pants.Name = "Pants"
627
char2.Shirt.ShirtTemplate = "rbxassetid://425693920"
628
char2.Pants.PantsTemplate = "rbxassetid://425694280"
629
end)
630
----------------------------------------------------
631
ypcall(function()
632
633
char2.Pants:Destroy()
634
shirt = Instance.new("Shirt", char2)
635
shirt.Name = "Shirt"
636
pants = Instance.new("Pants", char2)
637
pants.Name = "Pants"
638
char2.Shirt.ShirtTemplate = "rbxassetid://425693920"
639
char2.Pants.PantsTemplate = "rbxassetid://425694280"
640
end)
641
----------------------------------------------------
642
ypcall(function()
643
644
char2.Shirt:Destroy()
645
char2.Pants:Destroy()
646
shirt = Instance.new("Shirt", char2)
647
shirt.Name = "Shirt"
648
pants = Instance.new("Pants", char2)
649
pants.Name = "Pants"
650
char2.Shirt.ShirtTemplate = "rbxassetid://425693920"
651
char2.Pants.PantsTemplate = "rbxassetid://425694280"
652
end)
653
----------------------------------------------------
654
ypcall(function()
655
656
shirt = Instance.new("Shirt", char2)
657
shirt.Name = "Shirt"
658
pants = Instance.new("Pants", char2)
659
pants.Name = "Pants"
660
char2.Shirt.ShirtTemplate = "rbxassetid://425693920"
661
char2.Pants.PantsTemplate = "rbxassetid://425694280"
662
end)
663
664
local e = Instance.new("Script",char2)
665
e.Name = "boyfriend"
666
667
break
668
end
669
end
670
end
671
672
for i,v in pairs(boyfriend) do
673
print(v)
674
end
675
----------------------------------------------------------------
676
677
local sw2 = Instance.new("Part",hed)
678
sw2.CanCollide = false
679
sw2.BrickColor = BrickColor.new("Hot pink")
680
681
local m2 = Instance.new("SpecialMesh",sw2)
682
m2.MeshId = "rbxassetid://430440803"
683
m2.Scale = Vector3.new(0.006,0.006,0.006)
684
local w2 = Instance.new("Weld")
685
686
w2.Part1 = sw2
687
w2.Part0 = hed
688
w2.Parent = char
689
w2.C0 = CFrame.new(0,-0.9,0)*CFrame.Angles(math.rad(0),math.pi/2,0)
690
691
local sw = Instance.new("Part",torso)
692
sw.CanCollide = false
693
sw.BrickColor = BrickColor.new("Institutional white")
694
695
local m = Instance.new("SpecialMesh",sw)
696
m.MeshId = "rbxassetid://11442510"
697
m.TextureId = "rbxassetid://11442524"
698
m.Scale = Vector3.new(2.1,2.1,2.1)
699
local w1 = Instance.new("Weld")
700
701
w1.Part1 = sw
702
w1.Part0 = lleg
703
w1.Parent = char
704
w1.C0 = CFrame.new(0,-2,0)
705
706
NoSwordAnims = false
707
708
coroutine.wrap(function()
709
while true do
710
wait()
711
if NoSwordAnims == false then
712
if stance == "Normal" then
713
w1.Part0 = lleg
714
w1.C0 = Lerp(w1.C0,CFrame.new(-0.5,0.5,0) * CFrame.Angles(math.rad(-155),math.pi,math.pi/2),0.3)
715
elseif stance == "Katana" then
716
w1.Part0 = larm
717
w1.C0 = Lerp(w1.C0,CFrame.new(0,-0.7,-2.3) * CFrame.Angles(math.rad(180),0,-20),0.1)
718
end
719
end
720
end
721
end)()
722
723
724
----------------------------------------------------
725
newWeld(torso, larm, -1.5, 0.5, 0)
726
larm.Weld.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0,0,0)
727
newWeld(torso, rarm, 1.5, 0.5, 0)
728
rarm.Weld.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0,0,0)
729
newWeld(torso, hed, 0, 1.5, 0)
730
newWeld(torso, lleg, -0.5, -1, 0)
731
lleg.Weld.C1 = CFrame.new(0, 1, 0) * CFrame.Angles(0,0,0)
732
newWeld(torso, rleg, 0.5, -1, 0)
733
rleg.Weld.C1 = CFrame.new(0, 1, 0) * CFrame.Angles(0,0,0)
734
newWeld(root, torso, 0, -1, 0)
735
torso.Weld.C1 = CFrame.new(0, -1, 0) * CFrame.Angles(0,0,0)
736
local Touche = {char.Name, }
737
----------------------------------------------------
738
739
attack = false
740
attackhit = false
741
attacknumber = 0
742
coroutine.wrap(function()
743
while true do
744
rs:wait()
745
if attacknumber >= 2 then
746
attacknumber = 0
747
end
748
end
749
end)()
750
cooldown = 0
751
stance = "Normal"
752
local attacking = false
753
NoAnims = false
754
755
local ammo = 300
756
local maxammo = 300
757
758
coroutine.wrap(function()
759
while wait() do
760
if ammo > maxammo then
761
ammo = maxammo
762
elseif ammo < maxammo then
763
ammo = ammo + 1
764
end
765
end
766
end)()
767
768
attacking = false
769
local hedattack2 = false
770
local hedattack = false
771
772
sw.Touched:connect(function(ht)
773
if hedattack == true then
774
    hit = ht.Parent
775
    if ht and hit:IsA("Model") then
776
            if hit:FindFirstChild("Humanoid") then
777
                if hit.Name ~= p.Name then
778
                                hit:FindFirstChild("Humanoid"):TakeDamage(math.random(hit.Humanoid.MaxHealth/2,hit.Humanoid.MaxHealth))
779
                                    z = Instance.new("Sound",hed)
780
                                    z.SoundId = "rbxassetid://169380525"
781
                                                                        z.Pitch = ptz[math.random(1,#ptz)]
782
                                    z.Volume = 1
783
                                    z:Play()
784
                                    hedattack2 = false
785
                                    hedattack = false
786
                                    decals = {263033191,189728908,178269340,181477718,498948943,485362831,360385366,144325140}
787
decals2 = {284846352,191089587}
788
789
                                    local e = Instance.new("Decal",sw)
790
                                    e.Texture = "rbxassetid://"..decals[math.random(1,#decals)]
791
                                    e.Face = "Left"
792
                                    
793
                                    local e2 = Instance.new("Decal",sw)
794
                                    e2.Texture = e.Texture
795
                                    e2.Face = "Right"
796
                end
797
            end
798
    elseif ht and hit:IsA("Hat") then
799
        if hit.Parent.Name ~= p.Name then
800
            if hit.Parent:FindFirstChild("Humanoid") then
801
                            hit.Parent:FindFirstChild("Humanoid"):TakeDamage(math.random(hit.Parent.Humanoid.MaxHealth/2,hit.Parent.Humanoid.MaxHealth))
802
                                    z = Instance.new("Sound",hed)
803
                                    z.SoundId = "rbxassetid://169380525"
804
                                    hedattack2 = false
805
                                    hedattack = false
806
                                                                        z.Pitch = ptz[math.random(1,#ptz)]
807
                                    z.Volume = 1
808
                                    z:Play()
809
                                    decals = {263033191,189728908,178269340,181477718,498948943,485362831,360385366,144325140}
810
decals2 = {284846352,191089587}
811
812
                                    local e = Instance.new("Decal",sw)
813
                                    e.Texture = "rbxassetid://"..decals[math.random(1,#decals)]
814
                                    e.Face = "Left"
815
                                    
816
                                    local e2 = Instance.new("Decal",sw)
817
                                    e2.Texture = e.Texture
818
                                    e2.Face = "Right"
819
            end
820
        end
821
    end
822
    end
823
end)
824
825
--------------------attacks------------------
826
827
mouse.KeyDown:connect(function(key)
828
if key == "x" then
829
if cooldown == 0 and attacking == false then
830
NoAnims = true
831
attacking = true
832
cooldown = 1
833
834
coroutine.wrap(function()
835
while true do
836
837
rarm.Weld.C0 = Lerp(rarm.Weld.C0, CFrame.new(1.5 ,0.6,0)*CFrame.Angles(math.rad(90),0,.005), 0.2)
838
839
larm.Weld.C0 = Lerp(larm.Weld.C0, CFrame.new(-1.5,0.6,0)*CFrame.Angles(math.rad(90),0,-.005), 0.2)
840
841
hed.Weld.C0 = Lerp(hed.Weld.C0, CFrame.new(0,1.5,0)*CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)),0.2)
842
843
torso.Weld.C0 = Lerp(torso.Weld.C0, CFrame.new(0, -1 , 0) * CFrame.Angles(math.rad(0), 0, math.rad(0)), 0.2)
844
845
lleg.Weld.C0 = Lerp(lleg.Weld.C0, CFrame.new(-0.5, -1, 0) * CFrame.Angles(math.rad(0), 0, -0.05), .4)
846
847
rleg.Weld.C0 = Lerp(rleg.Weld.C0, CFrame.new(0.5, -1, 0) * CFrame.Angles(math.rad(0), 0, 0.05), .4)
848
849
if cooldown == 0 then break end
850
851
rs:wait()
852
end
853
end)()
854
855
end
856
end
857
end)
858
859
mouse.KeyUp:connect(function(key)
860
if key == "x" then
861
NoAnims = false
862
cooldown = 0
863
attacking = false
864
end
865
end)
866
867
868
function onclick(mouses)
869
if attacking == false and cooldown == 0 then
870
if stance == "Katana" then
871
attacking = true
872
cooldown = 1
873
NoAnims = true
874
875
StartEffect(sw,0.01,4)
876
877
for i = 1, 20 do
878
879
rarm.Weld.C0 = Lerp(rarm.Weld.C0, CFrame.new(0.5 ,0.6,-0.8)*CFrame.Angles(math.rad(240),0,-math.pi/3), 0.2)
880
881
larm.Weld.C0 = Lerp(larm.Weld.C0, CFrame.new(-1,0.6,-0.4)*CFrame.Angles(math.rad(240),0,math.pi/6), 0.1)
882
883
hed.Weld.C0 = Lerp(hed.Weld.C0, CFrame.new(0,1.5,0)*CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)),0.1)
884
885
torso.Weld.C0 = Lerp(torso.Weld.C0, CFrame.new(0, -1 , 0) * CFrame.Angles(math.rad(0), 0, math.rad(0)), 0.1)
886
887
lleg.Weld.C0 = Lerp(lleg.Weld.C0, CFrame.new(-0.5, -1, 0) * CFrame.Angles(math.rad(0), 0, -0.05), .1)
888
889
rleg.Weld.C0 = Lerp(rleg.Weld.C0, CFrame.new(0.5, -1, 0) * CFrame.Angles(math.rad(0), 0, 0.05), .1)
890
end
891
892
StartEffect(sw,0.01,4)
893
hedattack = true
894
so("rbxassetid://553461718")
895
896
for i = 1, 3 do
897
898
rarm.Weld.C0 = Lerp(rarm.Weld.C0, CFrame.new(0.5 ,0.3,-0.8)*CFrame.Angles(math.rad(20),0,-math.pi/3), 0.1)
899
900
larm.Weld.C0 = Lerp(larm.Weld.C0, CFrame.new(-1,0.3,-0.4)*CFrame.Angles(math.rad(20),0,math.pi/6), 0.1)
901
902
hed.Weld.C0 = Lerp(hed.Weld.C0, CFrame.new(0,1.5,0)*CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)),0.2)
903
904
torso.Weld.C0 = Lerp(torso.Weld.C0, CFrame.new(0, -1 , 0) * CFrame.Angles(math.rad(0), 0, math.rad(0)), 0.1)
905
906
lleg.Weld.C0 = Lerp(lleg.Weld.C0, CFrame.new(-0.5, -1, 0) * CFrame.Angles(math.rad(0), 0, -0.05), .1)
907
908
rleg.Weld.C0 = Lerp(rleg.Weld.C0, CFrame.new(0.5, -1, 0) * CFrame.Angles(math.rad(0), 0, 0.05), .1)
909
910
rs:wait()
911
end
912
913
EndEffect()
914
NoAnims = false
915
cooldown = 0
916
attacking = false
917
hedattack = false
918
919
end
920
end
921
end
922
923
mouse.Button1Down:connect(onclick)
924
925
mouse.KeyDown:connect(function(key)
926
if key == "f" then
927
if attacking == false and cooldown == 0 then
928
if stance == "Normal" then
929
attacking = true
930
cooldown = 1
931
NoAnims = true
932
stance = "Katana"
933
934
StartEffect(sw,0.01,4)
935
936
for i = 1, 20 do
937
938
rarm.Weld.C0 = Lerp(rarm.Weld.C0, CFrame.new(0.5 ,0.3,-0.8)*CFrame.Angles(math.rad(60),0,-math.pi/3), 0.2)
939
940
larm.Weld.C0 = Lerp(larm.Weld.C0, CFrame.new(-1,0.3,-0.4)*CFrame.Angles(math.rad(60),0,math.pi/6), 0.2)
941
942
hed.Weld.C0 = Lerp(hed.Weld.C0, CFrame.new(0,1.5,0)*CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)),0.2)
943
944
torso.Weld.C0 = Lerp(torso.Weld.C0, CFrame.new(0, -1 , 0) * CFrame.Angles(math.rad(0), 0, math.rad(0)), 0.2)
945
946
lleg.Weld.C0 = Lerp(lleg.Weld.C0, CFrame.new(-0.5, -1, 0) * CFrame.Angles(math.rad(0), 0, -0.05), .4)
947
948
rleg.Weld.C0 = Lerp(rleg.Weld.C0, CFrame.new(0.5, -1, 0) * CFrame.Angles(math.rad(0), 0, 0.05), .4)
949
end
950
951
so("rbxassetid://152052659")
952
953
for i = 1, 20 do
954
955
rarm.Weld.C0 = Lerp(rarm.Weld.C0, CFrame.new(0.5 ,0.3,-0.8)*CFrame.Angles(math.rad(60),0,-math.pi/3), 0.2)
956
957
larm.Weld.C0 = Lerp(larm.Weld.C0, CFrame.new(-1,0.3,-0.4)*CFrame.Angles(math.rad(120),0,math.pi/6), 0.2)
958
959
hed.Weld.C0 = Lerp(hed.Weld.C0, CFrame.new(0,1.5,0)*CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)),0.2)
960
961
torso.Weld.C0 = Lerp(torso.Weld.C0, CFrame.new(0, -1 , 0) * CFrame.Angles(math.rad(0), 0, math.rad(0)), 0.2)
962
963
lleg.Weld.C0 = Lerp(lleg.Weld.C0, CFrame.new(-0.5, -1, 0) * CFrame.Angles(math.rad(0), 0, -0.05), .4)
964
965
rleg.Weld.C0 = Lerp(rleg.Weld.C0, CFrame.new(0.5, -1, 0) * CFrame.Angles(math.rad(0), 0, 0.05), .4)
966
967
rs:wait()
968
end
969
970
EndEffect()
971
NoAnims = false
972
cooldown = 0
973
attacking = false
974
elseif stance == "Katana" then
975
976
attacking = true
977
cooldown = 1
978
NoAnims = true
979
NoSwordAnims = true
980
stance = "Normal"
981
for i = 1, 20 do
982
end
983
984
NoSwordAnims = false
985
NoAnims = false
986
cooldown = 0
987
attacking = false
988
989
end
990
end
991
end
992
end)
993
994
995
-----------GUI creation--------------------
996
997
local pg = p.PlayerGui
998
999
local sg = Instance.new("ScreenGui",pg)
1000
sg.Name = "rage"
1001
1002
local txt = Instance.new("TextLabel",sg)
1003
txt.Position = UDim2.new(0.9, 0, 0.9, 0)
1004
txt.BackgroundTransparency = 1
1005
txt.FontSize = "Size24"
1006
1007
coroutine.wrap(function()
1008
while true do
1009
wait()
1010
txt.TextColor3 = Color3.new(ammo,ammo,ammo)
1011
end
1012
end)()
1013
1014
coroutine.wrap(function()
1015
while true do
1016
wait()
1017
txt.Text = ammo.."/"..maxammo
1018
end
1019
end)()
1020
1021
----------------------------------------------
1022
-------------------------------
1023
local animpose = "Idle"
1024
local lastanimpose = "Idle"
1025
local sine = 0
1026
local change = 1
1027
local val = 0
1028
local ffing = false
1029
local jump = false
1030
-------------------------------
1031
local x = Instance.new("Sound", char)
1032
x.SoundId = "http://www.roblox.com/asset/?id=429617891"
1033
x.Looped = true
1034
x.Volume = 1
1035
x.Pitch = 1
1036
local footsteps = false
1037
-------------------------------
1038
game:GetService("RunService").RenderStepped:connect(function()
1039
--[[if char.Humanoid.Jump == true then
1040
jump = true
1041
else
1042
jump = false
1043
end]]
1044
char.Humanoid.FreeFalling:connect(function(f)
1045
if f then
1046
ffing = true
1047
else
1048
ffing = false
1049
end
1050
end)
1051
sine = sine + change
1052
if jump == true then
1053
animpose = "Jumping"
1054
elseif ffing == true then
1055
animpose = "Freefalling"
1056
elseif (torso.Velocity*Vector3.new(1, 0, 1)).magnitude < 2 then
1057
animpose = "Idle"
1058
elseif (torso.Velocity*Vector3.new(1, 0, 1)).magnitude < 20 then
1059
animpose = "Walking"
1060
elseif (torso.Velocity*Vector3.new(1, 0, 1)).magnitude > 20 then
1061
animpose = "Running"
1062
end
1063
if animpose ~= lastanimpose then
1064
sine = 0
1065
if NoAnims == false then
1066
if animpose == "Idle" then
1067
for i = 1, 0.5 do
1068
1069
if NoAnims == false then
1070
1071
if stance == "Normal"  then
1072
rarm.Weld.C0 = Lerp(rarm.Weld.C0, CFrame.new(1.5 ,0.6+ -math.sin(sine/14)/30,0)*CFrame.Angles(math.rad(0),0,.05+ math.sin(sine/7)/14), 0.2)
1073
1074
larm.Weld.C0 = Lerp(larm.Weld.C0, CFrame.new(-1.5,0.6+ -math.sin(sine/14)/30,0)*CFrame.Angles(math.rad(0),0,-.05+ -math.sin(sine/7)/14), 0.2)
1075
1076
hed.Weld.C0 = Lerp(hed.Weld.C0, CFrame.new(0,1.5,0)*CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)),0.2)
1077
1078
torso.Weld.C0 = Lerp(torso.Weld.C0, CFrame.new(0, -1 , 0) * CFrame.Angles(math.rad(0), 0, math.rad(0)), 0.2)
1079
1080
lleg.Weld.C0 = Lerp(lleg.Weld.C0, CFrame.new(-0.5, -1, 0) * CFrame.Angles(math.rad(0), 0, -0.05+ math.sin(sine/7)/30), .4)
1081
1082
rleg.Weld.C0 = Lerp(rleg.Weld.C0, CFrame.new(0.5, -1, 0) * CFrame.Angles(math.rad(0), 0, 0.05+ -math.sin(sine/7)/30), .4)
1083
1084
elseif stance == "Katana" then
1085
1086
rarm.Weld.C0 = Lerp(rarm.Weld.C0, CFrame.new(1.5 ,0.6+ -math.sin(sine/14)/30,0)*CFrame.Angles(math.rad(0),0,.05+ math.sin(sine/7)/14), 0.2)
1087
1088
larm.Weld.C0 = Lerp(larm.Weld.C0, CFrame.new(-1.5,0.6+ -math.sin(sine/14)/30,0)*CFrame.Angles(math.rad(0),math.pi,-.05+ -math.sin(sine/7)/14), 0.2)
1089
1090
hed.Weld.C0 = Lerp(hed.Weld.C0, CFrame.new(0,1.5,0)*CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)),0.2)
1091
1092
torso.Weld.C0 = Lerp(torso.Weld.C0, CFrame.new(0, -1 , 0) * CFrame.Angles(math.rad(0), 0, math.rad(0)), 0.2)
1093
1094
lleg.Weld.C0 = Lerp(lleg.Weld.C0, CFrame.new(-0.5, -1, 0) * CFrame.Angles(math.rad(0), 0, -0.05+ math.sin(sine/7)/30), .4)
1095
1096
rleg.Weld.C0 = Lerp(rleg.Weld.C0, CFrame.new(0.5, -1, 0) * CFrame.Angles(math.rad(0), 0, 0.05+ -math.sin(sine/7)/30), .4)
1097
1098
end
1099
1100
wait()
1101
end
1102
end
1103
1104
1105
elseif animpose == "Running" then
1106
change = 1
1107
if NoAnims == false then
1108
1109
rarm.Weld.C0 = Lerp(rarm.Weld.C0, CFrame.new(1.5 * sizem,.3 * sizem,.1 * sizem)*CFrame.Angles(math.rad(-30),0,0), 0.2)
1110
1111
larm.Weld.C0 =Lerp(larm.Weld.C0, CFrame.new(-1.5 * sizem,.3 * sizem,.1 * sizem)*CFrame.Angles(math.rad(-30),0,0),0.2)
1112
1113
hed.Weld.C0 = Lerp(hed.Weld.C0, CFrame.new(0,1.5 * sizem,0)*CFrame.Angles(math.rad(0),0,0),0.2)
1114
1115
torso.Weld.C0 =Lerp(torso.Weld.C0, CFrame.new(0,1,0)*CFrame.Angles(math.rad(-30),0,0),0.2)
1116
1117
lleg.Weld.C0 = Lerp(lleg.Weld.C0, CFrame.new(-.5 * sizem - .2,-1 * sizem,0 * sizem)*CFrame.Angles(math.rad(-30),0,0),0.2)
1118
1119
rleg.Weld.C0 = Lerp(rleg.Weld.C0, CFrame.new(.5 * sizem,-1 * sizem,0 * sizem)*CFrame.Angles(math.rad(-30),0,0),0.2)
1120
1121
1122
1123
end
1124
1125
elseif animpose == "Walking" then
1126
for i = 1, 1.5 do
1127
if NoAnims == false then
1128
1129
if stance == "Normal" then
1130
rarm.Weld.C0 = Lerp(rarm.Weld.C0, CFrame.new(1.5 ,0.6+ -math.sin(sine/14)/30,0)*CFrame.Angles(math.rad(0) + -math.sin(sine/5)/2,0,.2+ -math.sin(sine/7)/9), 0.2)
1131
1132
larm.Weld.C0 = Lerp(larm.Weld.C0, CFrame.new(-1.5,0.6+ -math.sin(sine/14)/30,0)*CFrame.Angles(math.rad(0) + math.sin(sine/5)/2,0,-.2+ math.sin(sine/7)/9), 0.2)
1133
1134
hed.Weld.C0 = Lerp(hed.Weld.C0, CFrame.new(0,1.5,0)*CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)),0.2)
1135
1136
torso.Weld.C0 = Lerp(torso.Weld.C0, CFrame.new(0, -1 , 0) * CFrame.Angles(math.rad(0), 0, math.rad(0)), 0.2)
1137
1138
lleg.Weld.C0 = Lerp(lleg.Weld.C0, CFrame.new(-0.5, -1 - 0.3*math.cos(sine/7)/6, 0) * CFrame.Angles(math.rad(0) + math.sin(sine/5)/2, 0, 0+ math.sin(sine/7)/30), .4)
1139
1140
rleg.Weld.C0 = Lerp(rleg.Weld.C0, CFrame.new(0.5, -1 - 0.3*math.cos(sine/7)/6, 0) * CFrame.Angles(math.rad(0) + -math.sin(sine/5)/2, 0, 0+ -math.sin(sine/7)/30), .4)
1141
end
1142
1143
elseif stance == "Katana" then
1144
1145
rarm.Weld.C0 = Lerp(rarm.Weld.C0, CFrame.new(1.5 ,0.6+ -math.sin(sine/14)/30,0)*CFrame.Angles(math.rad(0) + -math.sin(sine/5)/2,0,.2+ -math.sin(sine/7)/9), 0.2)
1146
1147
larm.Weld.C0 = Lerp(larm.Weld.C0, CFrame.new(-1.5,0.6+ -math.sin(sine/14)/30,0)*CFrame.Angles(math.rad(0) + math.sin(sine/5)/2,0,-.2+ math.sin(sine/7)/9), 0.2)
1148
1149
hed.Weld.C0 = Lerp(hed.Weld.C0, CFrame.new(0,1.5,0)*CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)),0.2)
1150
1151
torso.Weld.C0 = Lerp(torso.Weld.C0, CFrame.new(0, -1 , 0) * CFrame.Angles(math.rad(0), 0, math.rad(0)), 0.2)
1152
1153
lleg.Weld.C0 = Lerp(lleg.Weld.C0, CFrame.new(-0.5, -1 - 0.3*math.cos(sine/7)/6, 0) * CFrame.Angles(math.rad(0) + math.sin(sine/5)/2, 0, 0+ math.sin(sine/7)/30), .4)
1154
1155
rleg.Weld.C0 = Lerp(rleg.Weld.C0, CFrame.new(0.5, -1 - 0.3*math.cos(sine/7)/6, 0) * CFrame.Angles(math.rad(0) + -math.sin(sine/5)/2, 0, 0+ -math.sin(sine/7)/30), .4)
1156
1157
wait()
1158
end
1159
end
1160
end
1161
else
1162
end
1163
end
1164
lastanimpose = animpose
1165
if animpose == "Idle" then
1166
change = 0.5
1167
if NoAnims == false then
1168
1169
if stance == "Normal"  then
1170
rarm.Weld.C0 = Lerp(rarm.Weld.C0, CFrame.new(1.5 ,0.6+ -math.sin(sine/14)/30,0)*CFrame.Angles(math.rad(0),0,.05+ math.sin(sine/7)/14), 0.2)
1171
1172
larm.Weld.C0 = Lerp(larm.Weld.C0, CFrame.new(-1.5,0.6+ -math.sin(sine/14)/30,0)*CFrame.Angles(math.rad(0),0,-.05+ -math.sin(sine/7)/14), 0.2)
1173
1174
hed.Weld.C0 = Lerp(hed.Weld.C0, CFrame.new(0,1.5,0)*CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)),0.2)
1175
1176
torso.Weld.C0 = Lerp(torso.Weld.C0, CFrame.new(0, -1 , 0) * CFrame.Angles(math.rad(0), 0, math.rad(0)), 0.2)
1177
1178
lleg.Weld.C0 = Lerp(lleg.Weld.C0, CFrame.new(-0.5, -1, 0) * CFrame.Angles(math.rad(0), 0, -0.05+ math.sin(sine/7)/30), .4)
1179
1180
rleg.Weld.C0 = Lerp(rleg.Weld.C0, CFrame.new(0.5, -1, 0) * CFrame.Angles(math.rad(0), 0, 0.05+ -math.sin(sine/7)/30), .4)
1181
1182
elseif stance == "Katana" then
1183
1184
rarm.Weld.C0 = Lerp(rarm.Weld.C0, CFrame.new(0.5 ,0.3+ -math.sin(sine/14)/15,-0.8)*CFrame.Angles(math.rad(60),0,-math.pi/3+ math.sin(sine/7)/25), 0.2)
1185
1186
larm.Weld.C0 = Lerp(larm.Weld.C0, CFrame.new(-1,0.3+ -math.sin(sine/14)/15,-0.4)*CFrame.Angles(math.rad(60),0,math.pi/6+ -math.sin(sine/7)/25), 0.2)
1187
1188
hed.Weld.C0 = Lerp(hed.Weld.C0, CFrame.new(0,1.5,0)*CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)),0.2)
1189
1190
torso.Weld.C0 = Lerp(torso.Weld.C0, CFrame.new(0, -1 , 0) * CFrame.Angles(math.rad(0), 0, math.rad(0)), 0.2)
1191
1192
lleg.Weld.C0 = Lerp(lleg.Weld.C0, CFrame.new(-0.5, -1, 0) * CFrame.Angles(math.rad(0), 0, -0.05+ math.sin(sine/7)/30), .4)
1193
1194
rleg.Weld.C0 = Lerp(rleg.Weld.C0, CFrame.new(0.5, -1, 0) * CFrame.Angles(math.rad(0), 0, 0.05+ -math.sin(sine/7)/30), .4)
1195
1196
end
1197
end
1198
1199
1200
elseif animpose == "Running" then
1201
change = 1
1202
if NoAnims == false then
1203
1204
rarm.Weld.C0 = Lerp(rarm.Weld.C0, CFrame.new(1.5 * sizem,.3 * sizem,.1 * sizem)*CFrame.Angles(math.rad(-30),0,0), 0.2)
1205
1206
larm.Weld.C0 =Lerp(larm.Weld.C0, CFrame.new(-1.5 * sizem,.3 * sizem,.1 * sizem)*CFrame.Angles(math.rad(-30),0,0),0.2)
1207
1208
hed.Weld.C0 = Lerp(hed.Weld.C0, CFrame.new(0,1.5 * sizem,0)*CFrame.Angles(math.rad(0),0,0),0.2)
1209
1210
torso.Weld.C0 =Lerp(torso.Weld.C0, CFrame.new(0,1,0)*CFrame.Angles(math.rad(-30),0,0),0.2)
1211
1212
lleg.Weld.C0 = Lerp(lleg.Weld.C0, CFrame.new(-.5 * sizem,-1 * sizem,0 * sizem)*CFrame.Angles(math.rad(-30),0,0),0.2)
1213
1214
rleg.Weld.C0 = Lerp(rleg.Weld.C0, CFrame.new(.5 * sizem,-1 * sizem,0 * sizem)*CFrame.Angles(math.rad(-30),0,0),0.2)
1215
1216
end
1217
1218
elseif animpose == "Walking" then
1219
change = 1
1220
1221
    
1222
if NoAnims == false then
1223
1224
if stance == "Normal" then
1225
1226
rarm.Weld.C0 = Lerp(rarm.Weld.C0, CFrame.new(1.5 ,0.6+ -math.sin(sine/14)/30,0)*CFrame.Angles(math.rad(0) + -math.sin(sine/5)/2,0,.2+ -math.sin(sine/7)/9), 0.2)
1227
1228
larm.Weld.C0 = Lerp(larm.Weld.C0, CFrame.new(-1.5,0.6+ -math.sin(sine/14)/30,0)*CFrame.Angles(math.rad(0) + math.sin(sine/5)/2,0,-.2+ math.sin(sine/7)/9), 0.2)
1229
1230
hed.Weld.C0 = Lerp(hed.Weld.C0, CFrame.new(0,1.5,0)*CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)),0.2)
1231
1232
torso.Weld.C0 = Lerp(torso.Weld.C0, CFrame.new(0, -1 , 0) * CFrame.Angles(math.rad(0), 0, math.rad(0)), 0.2)
1233
1234
lleg.Weld.C0 = Lerp(lleg.Weld.C0, CFrame.new(-0.5, -1 - 0.3*math.cos(sine/7)/6, 0) * CFrame.Angles(math.rad(0) + math.sin(sine/5)/2, 0, 0+ math.sin(sine/7)/30), .4)
1235
1236
rleg.Weld.C0 = Lerp(rleg.Weld.C0, CFrame.new(0.5, -1 - 0.3*math.cos(sine/7)/6, 0) * CFrame.Angles(math.rad(0) + -math.sin(sine/5)/2, 0, 0+ -math.sin(sine/7)/30), .4)
1237
1238
elseif stance == "Katana" then
1239
1240
rarm.Weld.C0 = Lerp(rarm.Weld.C0, CFrame.new(0.5 ,0.3+ -math.sin(sine/14)/15,-0.8)*CFrame.Angles(math.rad(60),0,-math.pi/3+ math.sin(sine/7)/25), 0.2)
1241
1242
larm.Weld.C0 = Lerp(larm.Weld.C0, CFrame.new(-1,0.3+ -math.sin(sine/14)/15,-0.4)*CFrame.Angles(math.rad(60),0,math.pi/6+ -math.sin(sine/7)/25), 0.2)
1243
1244
hed.Weld.C0 = Lerp(hed.Weld.C0, CFrame.new(0,1.5,0)*CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)),0.2)
1245
1246
torso.Weld.C0 = Lerp(torso.Weld.C0, CFrame.new(0, -1 , 0) * CFrame.Angles(math.rad(0), 0, math.rad(0)), 0.2)
1247
1248
lleg.Weld.C0 = Lerp(lleg.Weld.C0, CFrame.new(-0.5, -1 - 0.3*math.cos(sine/7)/6, 0) * CFrame.Angles(math.rad(0) + math.sin(sine/5)/2, 0, 0+ math.sin(sine/7)/30), .4)
1249
1250
rleg.Weld.C0 = Lerp(rleg.Weld.C0, CFrame.new(0.5, -1 - 0.3*math.cos(sine/7)/6, 0) * CFrame.Angles(math.rad(0) + -math.sin(sine/5)/2, 0, 0+ -math.sin(sine/7)/30), .4)
1251
1252
end
1253
1254
end
1255
end
1256
if animpose == "Walking" then
1257
    if footsteps == false then
1258
        x:Play()
1259
        x.Pitch = ptz[math.random(1,#ptz)]
1260
        footsteps = true
1261
    end
1262
    x.Pitch = 1.1
1263
elseif animpose == "Idle" then
1264
    x:Stop()
1265
    footsteps = false
1266
end
1267
end)
1268
1269
--------calcs------
1270
--  +2*math.cos(sine/14)
1271
-----------------------------
1272
1273
wait(1)
1274
hum.Health = math.huge