View difference between Paste ID: 8JLg47YT and 20DNwCGA
SHOW: | | - or go back to the newest paste.
1
f game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
2
 
3
local Player,game,owner = owner,game
4
 
5
local RealPlayer = Player
6
 
7
do print("FE Compatibility code V3 by Desered_ROBLOX")local RealPlayer=RealPlayer;script.Parent=RealPlayer.Character;local a=function(b)b[1].f[b[2]]=nil end;local c={__index={disconnect=a,Disconnect=a}}local d={__index={Connect=function(b,e)local f=tostring(math.random(0,10000))while b.f[f]do f=tostring(math.random(0,10000))end;b.f[f]=e;return setmetatable({b,f},c)end}}d.__index.connect=d.__index.Connect;local function g()return setmetatable({f={}},d)end;local h={Hit=CFrame.new(),KeyUp=g(),KeyDown=g(),Button1Up=g(),Button1Down=g(),Button2Up=g(),Button2Down=g()}h.keyUp=h.KeyUp;h.keyDown=h.KeyDown;local i={InputBegan=g(),InputEnded=g()}local CAS={Actions={},BindAction=function(self,j,k,l,...)CAS.Actions[j]=k and{Name=j,Function=k,Keys={...}}or nil end}CAS.UnbindAction=CAS.BindAction;local function m(self,n,...)for o,e in pairs(self[n].f)do e(...)end end;h.T=m;i.T=m;local p=Instance.new("RemoteEvent")p.Name="UserInput_Event"p.OnServerEvent:Connect(function(q,r)if q~=RealPlayer then return end;h.Target=r.e;h.Hit=r.d;if not r.f then local s=r.c==Enum.UserInputState.Begin;if r.b==Enum.UserInputType.MouseButton1 then return h:T(s and"Button1Down"or"Button1Up")end;if r.b==Enum.UserInputType.MouseButton2 then return h:T(s and"Button2Down"or"Button2Up")end;for o,t in pairs(CAS.Actions)do for o,u in pairs(t.Keys)do if u==r.a then t.Function(t.Name,r.c,r)end end end;h:T(s and"KeyDown"or"KeyUp",r.a.Name:lower())i:T(s and"InputBegan"or"InputEnded",r,false)end end)p.Parent=NLS([==[local a=script:WaitForChild("UserInput_Event")local b=owner:GetMouse()local c=game:GetService("UserInputService")local d=function(e,f)if f then return end;a:FireServer({a=e.KeyCode,b=e.UserInputType,c=e.UserInputState,d=b.Hit,e=b.Target})end;c.InputBegan:Connect(d)c.InputEnded:Connect(d)local g,h;local i=game:GetService("RunService").Heartbeat;while true do if g~=b.Hit or h~=b.Target then g,h=b.Hit,b.Target;a:FireServer({f=1,Target=h,d=g})end;for j=1,2 do i:Wait()end end]==],script)local v=game;local w={__index=function(self,u)local x=rawget(self,"_RealService")if x then return typeof(x[u])=="function"and function(o,...)return x[u](x,...)end or x[u]end end,__newindex=function(self,u,y)local x=rawget(self,"_RealService")if x then x[u]=y end end}local function z(t,A)t._RealService=typeof(A)=="string"and v:GetService(A)or A;return setmetatable(t,w)end;local B={GetService=function(self,x)return rawget(self,x)or v:GetService(x)end,Players=z({LocalPlayer=z({GetMouse=function(self)return h end},Player)},"Players"),UserInputService=z(i,"UserInputService"),ContextActionService=z(CAS,"ContextActionService"),RunService=z({_btrs={},RenderStepped=v:GetService("RunService").Heartbeat,BindToRenderStep=function(self,j,o,k)self._btrs[j]=self.Heartbeat:Connect(k)end,UnbindFromRenderStep=function(self,j)self._btrs[j]:Disconnect()end},"RunService")}rawset(B.Players,"localPlayer",B.Players.LocalPlayer)B.service=B.GetService;z(B,game)game,owner=B,B.Players.LocalPlayer end
8
9
--By Rufus4
10
--Converted with ttyyuu12345's model to script plugin v4
11
function sandbox(var,func)
12
	local env = getfenv(func)
13
	local newenv = setmetatable({},{
14
		__index = function(self,k)
15
			if k=="script" then
16
				return var
17
			else
18
				return env[k]
19
			end
20
		end,
21
	})
22
	setfenv(func,newenv)
23
	return func
24
end
25
cors = {}
26
mas = Instance.new("Model",game:GetService("Lighting"))
27
Model0 = Instance.new("Model")
28
Part1 = Instance.new("Part")
29
Part2 = Instance.new("Part")
30
Part3 = Instance.new("Part")
31
Motor6D4 = Instance.new("Motor6D")
32
Motor6D5 = Instance.new("Motor6D")
33
Motor6D6 = Instance.new("Motor6D")
34
Motor6D7 = Instance.new("Motor6D")
35
Motor6D8 = Instance.new("Motor6D")
36
Part9 = Instance.new("Part")
37
Part10 = Instance.new("Part")
38
Part11 = Instance.new("Part")
39
SpecialMesh12 = Instance.new("SpecialMesh")
40
Weld13 = Instance.new("Weld")
41
Sound14 = Instance.new("Sound")
42
Sound15 = Instance.new("Sound")
43
Sound16 = Instance.new("Sound")
44
Sound17 = Instance.new("Sound")
45
Sound18 = Instance.new("Sound")
46
PointLight19 = Instance.new("PointLight")
47
Humanoid20 = Instance.new("Humanoid")
48
Script21 = Instance.new("Script")
49
Part22 = Instance.new("Part")
50
Motor6D23 = Instance.new("Motor6D")
51
Model24 = Instance.new("Model")
52
ScreenGui25 = Instance.new("ScreenGui")
53
Frame26 = Instance.new("Frame")
54
Part27 = Instance.new("Part")
55
Decal28 = Instance.new("Decal")
56
Model0.Name = "SCP-096"
57
Model0.Parent = mas
58
Part1.Name = "Left Arm"
59
Part1.Parent = Model0
60
Part1.CFrame = CFrame.new(-2.80085993, 4.50001383, -40.2011566, 1, 0, 0, 0, 1, -2.202814e-16, 0, -2.202814e-16, 1)
61
Part1.Position = Vector3.new(-2.80085993, 4.50001383, -40.2011566)
62
Part1.Color = Color3.new(0.905882, 0.905882, 0.92549)
63
Part1.Size = Vector3.new(1, 5, 1)
64
Part1.BottomSurface = Enum.SurfaceType.Smooth
65
Part1.BrickColor = BrickColor.new("Pearl")
66
Part1.TopSurface = Enum.SurfaceType.Smooth
67
Part1.brickColor = BrickColor.new("Pearl")
68
Part2.Name = "Right Arm"
69
Part2.Parent = Model0
70
Part2.CFrame = CFrame.new(-2.80085993, 4.50001383, -43.2011566, 1, 0, 0, 0, 1, -2.202814e-16, 0, -2.202814e-16, 1)
71
Part2.Position = Vector3.new(-2.80085993, 4.50001383, -43.2011566)
72
Part2.Color = Color3.new(0.905882, 0.905882, 0.92549)
73
Part2.Size = Vector3.new(1, 5, 1)
74
Part2.BottomSurface = Enum.SurfaceType.Smooth
75
Part2.BrickColor = BrickColor.new("Pearl")
76
Part2.TopSurface = Enum.SurfaceType.Smooth
77
Part2.brickColor = BrickColor.new("Pearl")
78
Part3.Name = "Torso"
79
Part3.Parent = Model0
80
Part3.CFrame = CFrame.new(-2.80085993, 5.50001383, -41.7011566, 1, 0, 0, 0, 1, -2.202814e-16, 0, -2.202814e-16, 1)
81
Part3.Position = Vector3.new(-2.80085993, 5.50001383, -41.7011566)
82
Part3.Color = Color3.new(0.356863, 0.364706, 0.411765)
83
Part3.Size = Vector3.new(1, 3, 2)
84
Part3.BottomSurface = Enum.SurfaceType.Smooth
85
Part3.BrickColor = BrickColor.new("Smoky grey")
86
Part3.TopSurface = Enum.SurfaceType.Smooth
87
Part3.brickColor = BrickColor.new("Smoky grey")
88
Motor6D4.Name = "Right Hip"
89
Motor6D4.Parent = Part3
90
Motor6D4.C0 = CFrame.new(0, -3.5, -0.5, 1, 0, 0, 0, 1, 0, 0, 0, 1)
91
Motor6D4.Part0 = Part3
92
Motor6D4.Part1 = Part9
93
Motor6D4.part1 = Part9
94
Motor6D5.Name = "Right Shoulder"
95
Motor6D5.Parent = Part3
96
Motor6D5.C0 = CFrame.new(0, -1, -1.5, 1, 0, 0, 0, 1, 0, 0, 0, 1)
97
Motor6D5.Part0 = Part3
98
Motor6D5.Part1 = Part2
99
Motor6D5.part1 = Part2
100
Motor6D6.Name = "Left Hip"
101
Motor6D6.Parent = Part3
102
Motor6D6.C0 = CFrame.new(0, -3.5, 0.5, 1, 0, 0, 0, 1, 0, 0, 0, 1)
103
Motor6D6.Part0 = Part3
104
Motor6D6.Part1 = Part10
105
Motor6D6.part1 = Part10
106
Motor6D7.Name = "Left Shoulder"
107
Motor6D7.Parent = Part3
108
Motor6D7.C0 = CFrame.new(0, -1, 1.5, 1, 0, 0, 0, 1, 0, 0, 0, 1)
109
Motor6D7.Part0 = Part3
110
Motor6D7.Part1 = Part1
111
Motor6D7.part1 = Part1
112
Motor6D8.Name = "Neck"
113
Motor6D8.Parent = Part3
114
Motor6D8.C0 = CFrame.new(0, 2, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
115
Motor6D8.Part0 = Part3
116
Motor6D8.Part1 = Part11
117
Motor6D8.part1 = Part11
118
Part9.Name = "Right Leg"
119
Part9.Parent = Model0
120
Part9.CFrame = CFrame.new(-2.80085993, 2.00001383, -42.2011566, 1, 0, 0, 0, 1, -2.202814e-16, 0, -2.202814e-16, 1)
121
Part9.Position = Vector3.new(-2.80085993, 2.00001383, -42.2011566)
122
Part9.Color = Color3.new(0.905882, 0.905882, 0.92549)
123
Part9.Size = Vector3.new(1, 4, 1)
124
Part9.BottomSurface = Enum.SurfaceType.Smooth
125
Part9.BrickColor = BrickColor.new("Pearl")
126
Part9.TopSurface = Enum.SurfaceType.Smooth
127
Part9.brickColor = BrickColor.new("Pearl")
128
Part10.Name = "Left Leg"
129
Part10.Parent = Model0
130
Part10.CFrame = CFrame.new(-2.80085993, 2.00001383, -41.2011566, 1, 0, 0, 0, 1, -2.202814e-16, 0, -2.202814e-16, 1)
131
Part10.Position = Vector3.new(-2.80085993, 2.00001383, -41.2011566)
132
Part10.Color = Color3.new(0.905882, 0.905882, 0.92549)
133
Part10.Size = Vector3.new(1, 4, 1)
134
Part10.BottomSurface = Enum.SurfaceType.Smooth
135
Part10.BrickColor = BrickColor.new("Pearl")
136
Part10.TopSurface = Enum.SurfaceType.Smooth
137
Part10.brickColor = BrickColor.new("Pearl")
138
Part11.Name = "Head"
139
Part11.Parent = Model0
140
Part11.CFrame = CFrame.new(-2.80085993, 7.50001383, -41.7011566, 1, 0, 0, 0, 1, -2.202814e-16, 0, -2.202814e-16, 1)
141
Part11.Position = Vector3.new(-2.80085993, 7.50001383, -41.7011566)
142
Part11.Color = Color3.new(0.905882, 0.905882, 0.92549)
143
Part11.Size = Vector3.new(1, 1, 2)
144
Part11.BottomSurface = Enum.SurfaceType.Smooth
145
Part11.BrickColor = BrickColor.new("Pearl")
146
Part11.TopSurface = Enum.SurfaceType.Smooth
147
Part11.brickColor = BrickColor.new("Pearl")
148
SpecialMesh12.Parent = Part11
149
SpecialMesh12.Scale = Vector3.new(1.20000005, 1.20000005, 1.20000005)
150
Weld13.Parent = Part11
151
Weld13.C0 = CFrame.new(-0.100000381, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
152
Weld13.Part0 = Part11
153
Weld13.Part1 = Part27
154
Weld13.part1 = Part27
155
Sound14.Name = "SCP-096 v0.8-0.9 Chasing Ambience(096_3)"
156
Sound14.Parent = Part11
157
Sound14.Looped = true
158
Sound14.MaxDistance = 500
159
Sound14.SoundId = "rbxassetid://261681311"
160
Sound14.Volume = 1
161
Sound15.Name = "SCP-096 (Idle) v0.2"
162
Sound15.Parent = Part11
163
Sound15.Looped = true
164
Sound15.MaxDistance = 50
165
Sound15.Playing = true
166
Sound15.SoundId = "rbxassetid://153698726"
167
Sound15.Volume = 1
168
Sound16.Name = "SCP-096 (Face Viewed)"
169
Sound16.Parent = Part11
170
Sound16.MaxDistance = 200
171
Sound16.SoundId = "rbxassetid://330944619"
172
Sound16.Volume = 1
173
Sound17.Name = "Guard attacked by SCP-096 (Old sound)"
174
Sound17.Parent = Part11
175
Sound17.MaxDistance = 100
176
Sound17.SoundId = "rbxassetid://948779227"
177
Sound17.Volume = 1
178
Sound18.Name = "SCP-096 Scream (raging)"
179
Sound18.Parent = Part11
180
Sound18.Looped = true
181
Sound18.MaxDistance = 100
182
Sound18.SoundId = "rbxassetid://343430735"
183
Sound18.Volume = 1
184
PointLight19.Parent = Part11
185
Humanoid20.Parent = Model0
186
Humanoid20.Health = 400
187
Humanoid20.LeftLeg = Part10
188
Humanoid20.MaxHealth = 400
189
Humanoid20.RightLeg = Part9
190
Humanoid20.Torso = Part22
191
Humanoid20.maxHealth = 400
192
Script21.Name = "SCP AI"
193
Script21.Parent = Model0
194
table.insert(cors,sandbox(Script21,function()
195
--Fully made by Rufus14 (with a little help from Weld Plugin by popomcnuggets)
196
--also script is commented so you can learn something
197
--animations are made with :lerp()
198
--you can convert the model to use it in script builder
199
local scp = script.Parent
200
local torso = scp.Torso
201
torso.CFrame = torso.CFrame * CFrame.fromEulerAnglesXYZ(0,math.pi/2*2,0)
202
local head = scp.Head
203
local leftarm = scp["Left Arm"]
204
local rightarm = scp["Right Arm"]
205
local leftleg = scp["Left Leg"]
206
local rightleg = scp["Right Leg"]
207
local scphumanoid = scp.Humanoid
208
local deathgui = scp["This is what player sees after death"].Death
209
local idlesound = head["SCP-096 (Idle) v0.2"]
210
local chasesound = head["SCP-096 v0.8-0.9 Chasing Ambience(096_3)"]
211
local ragesound = head["SCP-096 (Face Viewed)"]
212
local screamsound = head["SCP-096 Scream (raging)"]
213
local killsomeone = head["Guard attacked by SCP-096 (Old sound)"]
214
local face = scp.facepart.face
215
local heartbeat = game:GetService("RunService").Heartbeat
216
--Motor6D's
217
local neck = torso.Neck
218
local leftshoulder = torso["Left Shoulder"]
219
local rightshoulder = torso["Right Shoulder"]
220
local lefthip = torso["Left Hip"]
221
local righthip = torso["Right Hip"]
222
local root = scp.HumanoidRootPart.RootJoint
223
--
224
local sight = 5
225
local sitting = true
226
local running = false
227
local canchase = true
228
scphumanoid.WalkSpeed = 0
229
scphumanoid.JumpPower = 0
230
231
function ragdollkill(character)
232
	local victimshumanoid = character:findFirstChildOfClass("Humanoid")
233
	if not character:findFirstChild("UpperTorso") then
234
		character.Archivable = true
235
		local ragdoll = character:Clone()
236
		ragdoll:findFirstChildOfClass("Humanoid").Health = 0
237
		ragdoll:findFirstChildOfClass("Humanoid").PlatformStand = true
238
		if ragdoll:findFirstChild("Health") then
239
			if ragdoll:findFirstChild("Health").ClassName == "Script" then
240
				ragdoll:findFirstChild("Health").Disabled = true
241
			end
242
		end
243
		for i,v in pairs(character:GetChildren()) do
244
			if v.ClassName == "Part" or v.ClassName == "ForceField" or v.ClassName == "Accessory" or v.ClassName == "Hat" then
245
				v:destroy()
246
			end
247
		end
248
		for i,v in pairs(character:GetChildren()) do
249
			if v.ClassName == "Accessory" then
250
				local attachment1 = v.Handle:findFirstChildOfClass("Attachment")
251
				if attachment1 then
252
					for q,w in pairs(character:GetChildren()) do
253
						if w.ClassName == "Part" then
254
							local attachment2 = w:findFirstChild(attachment1.Name)
255
							if attachment2 then
256
								local hinge = Instance.new("HingeConstraint", v.Handle)
257
								hinge.Attachment0 = attachment1
258
								hinge.Attachment1 = attachment2
259
								hinge.LimitsEnabled = true
260
								hinge.LowerAngle = 0
261
								hinge.UpperAngle = 0
262
							end
263
						end
264
					end
265
				end
266
			end
267
		end
268
		ragdoll.Parent = workspace
269
		if ragdoll:findFirstChild("Right Arm") then
270
			local glue = Instance.new("Glue", ragdoll.Torso)
271
			glue.Part0 = ragdoll.Torso
272
			glue.Part1 = ragdoll:findFirstChild("Right Arm")
273
			glue.C0 = CFrame.new(1.5, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
274
			glue.C1 = CFrame.new(0, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
275
			local limbcollider = Instance.new("Part", ragdoll:findFirstChild("Right Arm"))
276
			limbcollider.Size = Vector3.new(1.4,1,1)
277
			limbcollider.Shape = "Cylinder"
278
			limbcollider.Transparency = 1
279
			limbcollider.Name = "LimbCollider"
280
			local limbcolliderweld = Instance.new("Weld", limbcollider)
281
			limbcolliderweld.Part0 = ragdoll:findFirstChild("Right Arm")
282
			limbcolliderweld.Part1 = limbcollider
283
			limbcolliderweld.C0 = CFrame.fromEulerAnglesXYZ(0,0,math.pi/2) * CFrame.new(-0.3,0,0)
284
		end
285
		if ragdoll:findFirstChild("Left Arm") then
286
			local glue = Instance.new("Glue", ragdoll.Torso)
287
			glue.Part0 = ragdoll.Torso
288
			glue.Part1 = ragdoll:findFirstChild("Left Arm")
289
			glue.C0 = CFrame.new(-1.5, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
290
			glue.C1 = CFrame.new(0, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
291
			local limbcollider = Instance.new("Part", ragdoll:findFirstChild("Left Arm"))
292
			limbcollider.Size = Vector3.new(1.4,1,1)
293
			limbcollider.Shape = "Cylinder"
294
			limbcollider.Name = "LimbCollider"
295
			limbcollider.Transparency = 1
296
			local limbcolliderweld = Instance.new("Weld", limbcollider)
297
			limbcolliderweld.Part0 = ragdoll:findFirstChild("Left Arm")
298
			limbcolliderweld.Part1 = limbcollider
299
			limbcolliderweld.C0 = CFrame.fromEulerAnglesXYZ(0,0,math.pi/2) * CFrame.new(-0.3,0,0)
300
		end
301
		if ragdoll:findFirstChild("Left Leg") then
302
			local glue = Instance.new("Glue", ragdoll.Torso)
303
			glue.Part0 = ragdoll.Torso
304
			glue.Part1 = ragdoll:findFirstChild("Left Leg")
305
			glue.C0 = CFrame.new(-0.5, -1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
306
			glue.C1 = CFrame.new(-0, 1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
307
			local limbcollider = Instance.new("Part", ragdoll:findFirstChild("Left Leg"))
308
			limbcollider.Size = Vector3.new(1.4,1,1)
309
			limbcollider.Shape = "Cylinder"
310
			limbcollider.Name = "LimbCollider"
311
			limbcollider.Transparency = 1
312
			local limbcolliderweld = Instance.new("Weld", limbcollider)
313
			limbcolliderweld.Part0 = ragdoll:findFirstChild("Left Leg")
314
			limbcolliderweld.Part1 = limbcollider
315
			limbcolliderweld.C0 = CFrame.fromEulerAnglesXYZ(0,0,math.pi/2) * CFrame.new(-0.3,0,0)
316
		end
317
		if ragdoll:findFirstChild("Right Leg") then
318
			local glue = Instance.new("Glue", ragdoll.Torso)
319
			glue.Part0 = ragdoll.Torso
320
			glue.Part1 = ragdoll:findFirstChild("Right Leg")
321
			glue.C0 = CFrame.new(0.5, -1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
322
			glue.C1 = CFrame.new(0, 1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
323
			local limbcollider = Instance.new("Part", ragdoll:findFirstChild("Right Leg"))
324
			limbcollider.Size = Vector3.new(1.4,1,1)
325
			limbcollider.Shape = "Cylinder"
326
			limbcollider.Name = "LimbCollider"
327
			limbcollider.Transparency = 1
328
			local limbcolliderweld = Instance.new("Weld", limbcollider)
329
			limbcolliderweld.Part0 = ragdoll:findFirstChild("Right Leg")
330
			limbcolliderweld.Part1 = limbcollider
331
			limbcolliderweld.C0 = CFrame.fromEulerAnglesXYZ(0,0,math.pi/2) * CFrame.new(-0.3,0,0)
332
		end
333
		if ragdoll:findFirstChild("Head") and ragdoll.Torso:findFirstChild("NeckAttachment") then
334
			local HeadAttachment = Instance.new("Attachment", ragdoll["Head"])
335
			HeadAttachment.Position = Vector3.new(0, -0.5, 0)
336
			local connection = Instance.new('HingeConstraint', ragdoll["Head"])
337
			connection.LimitsEnabled = true
338
			connection.Attachment0 = ragdoll.Torso.NeckAttachment
339
			connection.Attachment1 = HeadAttachment
340
			connection.UpperAngle = 60
341
			connection.LowerAngle = -60
342
		elseif ragdoll:findFirstChild("Head") and not ragdoll.Torso:findFirstChild("NeckAttachment") then
343
			local hedweld = Instance.new("Weld", ragdoll.Torso)
344
			hedweld.Part0 = ragdoll.Torso
345
			hedweld.Part1 = ragdoll.Head
346
			hedweld.C0 = CFrame.new(0,1.5,0)
347
		end
348
		game.Debris:AddItem(ragdoll, 60)
349
	elseif character:findFirstChild("UpperTorso") then
350
		character.Archivable = true
351
		local ragdoll = character:Clone()
352
		ragdoll:findFirstChildOfClass("Humanoid").Health = 0
353
		if ragdoll:findFirstChild("Health") then
354
			if ragdoll:findFirstChild("Health").ClassName == "Script" then
355
				ragdoll:findFirstChild("Health").Disabled = true
356
			end
357
		end
358
		for i,v in pairs(character:GetChildren()) do
359
			if v.ClassName == "Part" or v.ClassName == "ForceField" or v.ClassName == "Accessory" or v.ClassName == "Hat" or v.ClassName == "MeshPart" then
360
				v:destroy()
361
			end
362
		end
363
		for i,v in pairs(character:GetChildren()) do
364
			if v.ClassName == "Accessory" then
365
				local attachment1 = v.Handle:findFirstChildOfClass("Attachment")
366
				if attachment1 then
367
					for q,w in pairs(character:GetChildren()) do
368
						if w.ClassName == "Part" or w.ClassName == "MeshPart" then
369
							local attachment2 = w:findFirstChild(attachment1.Name)
370
							if attachment2 then
371
								local hinge = Instance.new("HingeConstraint", v.Handle)
372
								hinge.Attachment0 = attachment1
373
								hinge.Attachment1 = attachment2
374
								hinge.LimitsEnabled = true
375
								hinge.LowerAngle = 0
376
								hinge.UpperAngle = 0
377
							end
378
						end
379
					end
380
				end
381
			end
382
		end
383
		ragdoll.Parent = workspace
384
		local Humanoid = ragdoll:findFirstChildOfClass("Humanoid")
385
		Humanoid.PlatformStand = true
386
		local function makeballconnections(limb, attachementone, attachmenttwo, twistlower, twistupper)
387
			local connection = Instance.new('BallSocketConstraint', limb)
388
			connection.LimitsEnabled = true
389
			connection.Attachment0 = attachementone
390
			connection.Attachment1 = attachmenttwo
391
			connection.TwistLimitsEnabled = true
392
			connection.TwistLowerAngle = twistlower
393
			connection.TwistUpperAngle = twistupper
394
			local limbcollider = Instance.new("Part", limb)
395
			limbcollider.Size = Vector3.new(0.1,1,1)
396
			limbcollider.Shape = "Cylinder"
397
			limbcollider.Transparency = 1
398
			limbcollider:BreakJoints()
399
			local limbcolliderweld = Instance.new("Weld", limbcollider)
400
			limbcolliderweld.Part0 = limb
401
			limbcolliderweld.Part1 = limbcollider
402
			limbcolliderweld.C0 = CFrame.fromEulerAnglesXYZ(0,0,math.pi/2)
403
		end
404
		local function makehingeconnections(limb, attachementone, attachmenttwo, lower, upper)
405
			local connection = Instance.new('HingeConstraint', limb)
406
			connection.LimitsEnabled = true
407
			connection.Attachment0 = attachementone
408
			connection.Attachment1 = attachmenttwo
409
			connection.LimitsEnabled = true
410
			connection.LowerAngle = lower
411
			connection.UpperAngle = upper
412
			local limbcollider = Instance.new("Part", limb)
413
			limbcollider.Size = Vector3.new(0.1,1,1)
414
			limbcollider.Shape = "Cylinder"
415
			limbcollider.Transparency = 1
416
			limbcollider:BreakJoints()
417
			local limbcolliderweld = Instance.new("Weld", limbcollider)
418
			limbcolliderweld.Part0 = limb
419
			limbcolliderweld.Part1 = limbcollider
420
			limbcolliderweld.C0 = CFrame.fromEulerAnglesXYZ(0,0,math.pi/2)
421
		end
422
		local HeadAttachment = Instance.new("Attachment", Humanoid.Parent.Head)
423
		HeadAttachment.Position = Vector3.new(0, -0.5, 0)
424
		makehingeconnections(Humanoid.Parent.Head, HeadAttachment, ragdoll.UpperTorso.NeckAttachment, -50, 50)
425
		makehingeconnections(Humanoid.Parent.LowerTorso, Humanoid.Parent.LowerTorso.WaistRigAttachment, Humanoid.Parent.UpperTorso.WaistRigAttachment, -50, 50)
426
		makeballconnections(Humanoid.Parent.LeftUpperArm, Humanoid.Parent.LeftUpperArm.LeftShoulderRigAttachment, Humanoid.Parent.UpperTorso.LeftShoulderRigAttachment, -200, 200, 180)
427
		makehingeconnections(Humanoid.Parent.LeftLowerArm, Humanoid.Parent.LeftLowerArm.LeftElbowRigAttachment, Humanoid.Parent.LeftUpperArm.LeftElbowRigAttachment, 0, -60)
428
		makehingeconnections(Humanoid.Parent.LeftHand, Humanoid.Parent.LeftHand.LeftWristRigAttachment, Humanoid.Parent.LeftLowerArm.LeftWristRigAttachment, -20, 20)
429
		--
430
		makeballconnections(Humanoid.Parent.RightUpperArm, Humanoid.Parent.RightUpperArm.RightShoulderRigAttachment, Humanoid.Parent.UpperTorso.RightShoulderRigAttachment, -200, 200, 180)
431
		makehingeconnections(Humanoid.Parent.RightLowerArm, Humanoid.Parent.RightLowerArm.RightElbowRigAttachment, Humanoid.Parent.RightUpperArm.RightElbowRigAttachment, 0, -60)
432
		makehingeconnections(Humanoid.Parent.RightHand, Humanoid.Parent.RightHand.RightWristRigAttachment, Humanoid.Parent.RightLowerArm.RightWristRigAttachment, -20, 20)
433
		--
434
		makeballconnections(Humanoid.Parent.RightUpperLeg, Humanoid.Parent.RightUpperLeg.RightHipRigAttachment, Humanoid.Parent.LowerTorso.RightHipRigAttachment, -80, 80, 80)
435
		makehingeconnections(Humanoid.Parent.RightLowerLeg, Humanoid.Parent.RightLowerLeg.RightKneeRigAttachment, Humanoid.Parent.RightUpperLeg.RightKneeRigAttachment, 0, 60)
436
		makehingeconnections(Humanoid.Parent.RightFoot, Humanoid.Parent.RightFoot.RightAnkleRigAttachment, Humanoid.Parent.RightLowerLeg.RightAnkleRigAttachment, -20, 20)
437
		--
438
		makeballconnections(Humanoid.Parent.LeftUpperLeg, Humanoid.Parent.LeftUpperLeg.LeftHipRigAttachment, Humanoid.Parent.LowerTorso.LeftHipRigAttachment, -80, 80, 80)
439
		makehingeconnections(Humanoid.Parent.LeftLowerLeg, Humanoid.Parent.LeftLowerLeg.LeftKneeRigAttachment, Humanoid.Parent.LeftUpperLeg.LeftKneeRigAttachment, 0, 60)
440
		makehingeconnections(Humanoid.Parent.LeftFoot, Humanoid.Parent.LeftFoot.LeftAnkleRigAttachment, Humanoid.Parent.LeftLowerLeg.LeftAnkleRigAttachment, -20, 20)
441
		for i,v in pairs(Humanoid.Parent:GetChildren()) do
442
			if v.ClassName == "Accessory" then
443
				local attachment1 = v.Handle:findFirstChildOfClass("Attachment")
444
				if attachment1 then
445
					for q,w in pairs(Humanoid.Parent:GetChildren()) do
446
						if w.ClassName == "Part" then
447
							local attachment2 = w:findFirstChild(attachment1.Name)
448
							if attachment2 then
449
								local hinge = Instance.new("HingeConstraint", v.Handle)
450
								hinge.Attachment0 = attachment1
451
								hinge.Attachment1 = attachment2
452
								hinge.LimitsEnabled = true
453
								hinge.LowerAngle = 0
454
								hinge.UpperAngle = 0
455
							end
456
						end
457
					end
458
				end
459
			end
460
		end
461
		for i,v in pairs(ragdoll:GetChildren()) do
462
			for q,w in pairs(v:GetChildren()) do
463
				if w.ClassName == "Motor6D"--[[ and w.Name ~= "Neck"--]] then
464
					w:destroy()
465
				end
466
			end
467
		end
468
		if ragdoll:findFirstChild("HumanoidRootPart") then
469
			ragdoll.HumanoidRootPart.Anchored = true
470
			ragdoll.HumanoidRootPart.CanCollide = false
471
		end
472
		game.Debris:AddItem(ragdoll, 60)
473
	end
474
end
475
476
function chase(victim) --chase the player
477
	if canchase then
478
		canchase = false
479
		local raaaaaageeee = true
480
		sitting = false
481
		running = false
482
		local victimhead = victim.Head
483
		local victimhumanoid = victim:findFirstChildOfClass("Humanoid")
484
		idlesound:Stop()
485
		ragesound:Play()
486
		scphumanoid.WalkSpeed = 0
487
		scphumanoid.JumpPower = 0
488
		face.Texture = "http://www.roblox.com/asset/?id=168024772"
489
		local function spasm()
490
			while wait() do
491
				if raaaaaageeee then
492
					root.C0 = root.C0 * CFrame.new(math.random(-1,1)/50,math.random(-1,1)/50,math.random(-1,1)/50)
493
					rightshoulder.C0 = rightshoulder.C0 * CFrame.new(math.random(-1,1)/50,math.random(-1,1)/50,math.random(-1,1)/50)
494
					leftshoulder.C0 = leftshoulder.C0 * CFrame.new(math.random(-1,1)/50,math.random(-1,1)/50,math.random(-1,1)/50)
495
					lefthip.C0 = lefthip.C0 * CFrame.new(math.random(-1,1)/50,math.random(-1,1)/50,math.random(-1,1)/50)
496
					righthip.C0 = righthip.C0 * CFrame.new(math.random(-1,1)/50,math.random(-1,1)/50,math.random(-1,1)/50)
497
					neck.C0 = neck.C0 * CFrame.new(math.random(-1,1)/50,math.random(-1,1)/50,math.random(-1,1)/50)
498
					--
499
					root.C0 = root.C0 * CFrame.fromEulerAnglesXYZ(math.random(-1,1)/50,math.random(-1,1)/50,math.random(-1,1)/50)
500
					rightshoulder.C0 = rightshoulder.C0 * CFrame.fromEulerAnglesXYZ(math.random(-1,1)/50,math.random(-1,1)/50,math.random(-1,1)/50)
501
					leftshoulder.C0 = leftshoulder.C0 * CFrame.fromEulerAnglesXYZ(math.random(-1,1)/50,math.random(-1,1)/50,math.random(-1,1)/50)
502
					lefthip.C0 = lefthip.C0 * CFrame.fromEulerAnglesXYZ(math.random(-1,1)/50,math.random(-1,1)/50,math.random(-1,1)/50)
503
					righthip.C0 = righthip.C0 * CFrame.fromEulerAnglesXYZ(math.random(-1,1)/50,math.random(-1,1)/50,math.random(-1,1)/50)
504
					neck.C0 = neck.C0 * CFrame.fromEulerAnglesXYZ(math.random(-1,1)/50,math.random(-1,1)/50,math.random(-1,1)/50)
505
				end
506
			end
507
		end
508
		spawn(spasm)
509
		for i = 0,0.1 , 0.0005 do --animate him
510
			root.C0 = root.C0:lerp(CFrame.new(0, 0, 0, 0.98480773, 0.173648298, 0, -0.173648298, 0.98480773, 0, 0, 0, 1),i)
511
			rightshoulder.C0 = rightshoulder.C0:lerp(CFrame.new(-0.800001144, 0.642426491, -1.80661774, 1, 0, 0, 0, -0.642787874, 0.766044259, 0, -0.766044259, -0.642787814),i)
512
			leftshoulder.C0 = leftshoulder.C0:lerp(CFrame.new(-0.399999619, 0.675328255, 1.86571693, -1.1920929e-07, -1.49011612e-07, -0.99999994, -0.766044557, -0.642787516, 1.34110451e-07, -0.642787397, 0.766044497, -1.1920929e-07),i)
513
			lefthip.C0 = lefthip.C0:lerp(CFrame.new(0, -3.5, 0.5, 0.98480773, -0.173648298, 0, 0.173648298, 0.98480773, 0, 0, 0, 1),i)
514
			righthip.C0 = righthip.C0:lerp(CFrame.new(0, -3.5, -0.5, 0.98480773, -0.173648298, 0, 0.173648298, 0.98480773, 0, 0, 0, 1),i)
515
			neck.C0 = neck.C0:lerp(CFrame.new(-1.90734863e-06, 2, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),i)
516
			heartbeat:wait()
517
		end
518
		for i = 1,27 do --loop
519
			for i = 0.3,0.5 , 0.008 do --rage animation
520
				root.C0 = root.C0:lerp(CFrame.new(0, 0, 0, 0.98480773, 0.163175985, -0.0593911894, -0.173648253, 0.925416589, -0.336824059, -1.86264515e-08, 0.342020094, 0.939692616),i)
521
				rightshoulder.C0 = rightshoulder.C0:lerp(CFrame.new(-0.800001144, 0.642426491, -1.80661774, 1, 0, 0, 0, -0.642787874, 0.766044259, 0, -0.766044259, -0.642787814),i)
522
				leftshoulder.C0 = leftshoulder.C0:lerp(CFrame.new(-0.399999619, 0.675328255, 1.86571693, -1.1920929e-07, -1.49011612e-07, -0.99999994, -0.766044557, -0.642787516, 1.34110451e-07, -0.642787397, 0.766044497, -1.1920929e-07),i)
523
				lefthip.C0 = lefthip.C0:lerp(CFrame.new(-0.0297870636, -3.33106899, 1.07283974, 0.98480773, -0.163175955, -0.0593911335, 0.173648208, 0.925416708, 0.336823761, -2.60770321e-08, -0.342019826, 0.939692676),i)
524
				righthip.C0 = righthip.C0:lerp(CFrame.new(0.0281715393, -3.65976715, -0.26830864, 0.98480773, -0.171010181, -0.0301537365, 0.173648298, 0.969846249, 0.171010152, -2.60770321e-08, -0.173648313, 0.984807611),i)
525
				neck.C0 = neck.C0:lerp(CFrame.new(-1.90734863e-06, 2, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),i)
526
				heartbeat:wait()
527
			end
528
			for i = 0.3,0.5 , 0.008 do --rage animation
529
				root.C0 = root.C0:lerp(CFrame.new(0, 0, 0, 0.934456408, -0.351089597, -0.0593911372, 0.312324762, 0.888258278, -0.336824119, 0.171010107, 0.29619813, 0.939692616),i)
530
				rightshoulder.C0 = rightshoulder.C0:lerp(CFrame.new(-0.800001144, 0.642426491, -1.80661774, 1, 0, 0, 0, -0.642787874, 0.766044259, 0, -0.766044259, -0.642787814),i)
531
				leftshoulder.C0 = leftshoulder.C0:lerp(CFrame.new(-0.399999619, 0.675328255, 1.86571693, -1.1920929e-07, -1.49011612e-07, -0.99999994, -0.766044557, -0.642787516, 1.34110451e-07, -0.642787397, 0.766044497, -1.1920929e-07),i)
532
				lefthip.C0 = lefthip.C0:lerp(CFrame.new(-0.602340698, -3.0763092, 1.15816879, 0.934456408, 0.351089299, -0.0593911409, -0.312324613, 0.888258517, 0.336823583, 0.171009839, -0.296197772, 0.939692676),i)
533
				righthip.C0 = righthip.C0:lerp(CFrame.new(-0.773321152, -3.47119474, -0.0934143066, 0.938373566, 0.344305009, -0.0301536173, -0.334539622, 0.92673558, 0.17101036, 0.0868241563, -0.150384039, 0.98480773),i)
534
				neck.C0 = neck.C0:lerp(CFrame.new(-1.90734863e-06, 2, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),i)
535
				heartbeat:wait()
536
			end
537
			for i = 0.3,0.5 , 0.008 do --rage animation
538
				root.C0 = root.C0:lerp(CFrame.new(0, 0, 0, 0.934456408, -0.230774283, -0.271172374, 0.312324822, 0.896951497, 0.312939584, 0.171010077, -0.377122283, 0.910238624),i)
539
				rightshoulder.C0 = rightshoulder.C0:lerp(CFrame.new(-0.800001144, 0.642426491, -1.80661774, 1, 0, 0, 0, -0.642787874, 0.766044259, 0, -0.766044259, -0.642787814),i)
540
				leftshoulder.C0 = leftshoulder.C0:lerp(CFrame.new(-0.399999619, 0.675328255, 1.86571693, -1.1920929e-07, -1.49011612e-07, -0.99999994, -0.766044557, -0.642787516, 1.34110451e-07, -0.642787397, 0.766044497, -1.1920929e-07),i)
541
				lefthip.C0 = lefthip.C0:lerp(CFrame.new(-0.682954788, -3.65747166, 0.0301790237, 0.970848203, 0.216018811, 0.103873909, -0.186457753, 0.952938259, -0.239044309, -0.150623471, 0.212707579, 0.965436697),i)
542
				righthip.C0 = righthip.C0:lerp(CFrame.new(-0.934883118, -2.97838402, -1.17556, 0.949593663, 0.283100039, 0.13463366, -0.20653595, 0.88808161, -0.4106749, -0.235827699, 0.362167627, 0.901787043),i)
543
				neck.C0 = neck.C0:lerp(CFrame.new(-1.90734863e-06, 2, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),i)
544
				heartbeat:wait()
545
			end
546
		end
547
		raaaaaageeee = false
548
		for i = 0,1 , 0.03 do --scream animation
549
			root.C0 = root.C0:lerp(CFrame.new(0, 0, 0, 0.939692616, 0.342020154, 0, -0.342020154, 0.939692616, 0, 0, 0, 1),i)
550
			rightshoulder.C0 = rightshoulder.C0:lerp(CFrame.new(0, -0.124749184, -2.85422897, 1, 0, 0, 0, 0.766044497, -0.642787635, 0, 0.642787635, 0.766044438),i)
551
			leftshoulder.C0 = leftshoulder.C0:lerp(CFrame.new(0, -0.124749184, 2.85422897, 1, 0, 1.49011612e-08, 0, 0.766044378, 0.642787695, 0, -0.642787695, 0.766044378),i)
552
			lefthip.C0 = lefthip.C0:lerp(CFrame.new(0.751754761, -3.42638397, 0.5, 0.939692616, -0.342020154, 0, 0.342020154, 0.939692616, 0, 0, 0, 1),i)
553
			righthip.C0 = righthip.C0:lerp(CFrame.new(0.563816071, -3.29478741, -0.5, 0.939692616, -0.342020154, 0, 0.342020154, 0.939692616, 0, 0, 0, 1),i)
554
			neck.C0 = neck.C0:lerp(CFrame.new(0.446411133, 1.97320461, 0, 0.866025448, 0.499999881, 0, -0.499999881, 0.866025448, 0, 0, 0, 1),i)
555
			heartbeat:wait()
556
		end
557
		raaaaaageeee = true
558
		wait(1.5)
559
		chasesound:Play()
560
		running = true
561
		local chasethatplayer = true
562
		scphumanoid.WalkSpeed = 35
563
		scphumanoid.JumpPower = 50
564
		local function check() --check if scp is really close to the player
565
			while wait() do
566
				if not chasethatplayer then
567
					break
568
				end
569
				if (torso.Position - victimhead.Position).magnitude < 15 and chasethatplayer then --if player is closer to scp than 10 studs then kill
570
					chasethatplayer = false
571
					raaaaaageeee = false
572
					running = false
573
					for i = 0,0.9 , 0.05 do --scream animation
574
						root.C0 = root.C0:lerp(CFrame.new(-0.208377838, -1.18176937, 0, 0.173648149, -0.98480773, 0, 0.98480773, 0.173648149, -1.62028714e-25, -1.59567135e-25, -2.81359876e-26, 1) * CFrame.fromEulerAnglesXYZ(-math.pi/2,0,0),i)
575
						rightshoulder.C0 = rightshoulder.C0:lerp(CFrame.new(-1.20717955, 2.69089603, -1.5, -0.866025329, 0.49999994, -1.59567135e-25, -0.49999994, -0.866025329, -2.81359876e-26, 1.52257181e-25, -5.54170842e-26, 1),i)
576
						leftshoulder.C0 = leftshoulder.C0:lerp(CFrame.new(-1.20717955, 2.69089603, 1.5, -0.866025329, 0.49999994, -1.59567135e-25, -0.49999994, -0.866025329, -2.81359876e-26, 1.52257181e-25, -5.54170842e-26, 1),i)
577
						lefthip.C0 = lefthip.C0:lerp(CFrame.new(0.563815594, -3.29478741, 0.5, 0.939692497, -0.336824059, -0.0593910962, 0.342020094, 0.925416589, 0.163175702, -1.59567135e-25, -0.17364797, 0.984807789),i)
578
						righthip.C0 = righthip.C0:lerp(CFrame.new(0.563815594, -3.29478741, -0.5, 0.939692497, -0.342020094, -1.59567135e-25, 0.342020094, 0.939692497, -2.81359876e-26, -1.59567135e-25, 2.81359938e-26, 1),i)
579
						neck.C0 = neck.C0:lerp(CFrame.new(0.346410275, 2.19999981, 0, 0.49999994, 0.866025388, -1.59567135e-25, -0.866025388, 0.49999994, -2.81359876e-26, -5.5417078e-26, -1.52257181e-25, 1),i)
580
						heartbeat:wait()
581
					end
582
					face.Texture = "http://www.roblox.com/asset/?id=146142799"
583
					victim:BreakJoints()
584
					killsomeone:Play()
585
					chasesound:Stop()
586
					screamsound:Stop()
587
					sitting = true
588
					scphumanoid.WalkSpeed = 0
589
					scphumanoid.JumpPower = 0
590
					local function playidleandcanchase()
591
						wait(5.5)
592
						idlesound:Play()
593
						canchase = true
594
					end
595
					spawn(playidleandcanchase)
596
					if game.Players:findFirstChild(victim.Name) then
597
						local playergui = game.Players[victim.Name]:findFirstChildOfClass("PlayerGui")
598
						if playergui then
599
							local deathguiclone = deathgui:Clone()
600
							deathguiclone.Parent = playergui
601
							local function removegui()
602
								wait(5)
603
								if deathguiclone.Parent ~= nil then
604
									deathguiclone:destroy()
605
								end
606
							end
607
							spawn(removegui)
608
						end
609
					end
610
					ragdollkill(victim)
611
					break
612
				end
613
			end
614
		end
615
		local howmanymissed = 0
616
		local function chase()
617
			screamsound:Play()
618
			while wait() and chasethatplayer do
619
				if victimhumanoid.Health <= 0 then
620
					chasethatplayer = false
621
					raaaaaageeee = false
622
					idlesound:Play()
623
					running = false
624
					face.Texture = "http://www.roblox.com/asset/?id=146142799"
625
					chasesound:Stop()
626
					screamsound:Stop()
627
					sitting = true
628
					scphumanoid.WalkSpeed = 0
629
					scphumanoid.JumpPower = 0
630
					canchase = true
631
					break
632
				end
633
				local path = game:GetService("PathfindingService"):FindPathAsync(torso.Position, victimhead.Position) --find the path from scp's torso to victims head
634
				local waypoints = path:GetWaypoints() --get the every point of the path
635
				if path.Status == Enum.PathStatus.Success then
636
					for i,v in pairs(waypoints) do --for every point existing..
637
						if howmanymissed < 4 then
638
							local allow = 0
639
							scphumanoid:MoveTo(v.Position) --...walk to it
640
							while (torso.Position - v.Position).magnitude > 8 and allow < 20 do --if scp is further than 8 studs, keep walking to it
641
								allow = allow + 1 
642
								scphumanoid:MoveTo(v.Position)
643
								heartbeat:wait()
644
							end
645
							if allow == 20 then
646
								howmanymissed = howmanymissed + 1
647
							end
648
							if v.Action == Enum.PathWaypointAction.Jump then
649
								scphumanoid.Jump = true
650
							end
651
							scphumanoid.WalkToPoint = victimhead.Position
652
						end
653
					end
654
					howmanymissed = 0
655
					scphumanoid.WalkToPoint = victimhead.Position
656
				end
657
			end
658
		end
659
		spawn(check) --run that check function
660
		spawn(chase) --chase
661
	end
662
end
663
664
function dead()
665
	wait(5)
666
	script.Parent:Destroy()
667
end
668
scphumanoid.Died:connect(dead)
669
670
function check4ppl()
671
	while wait() do
672
		for i,v in pairs(workspace:GetChildren()) do --scans all the characters
673
			if v.ClassName == "Model" and v.Name ~= scp.Name and canchase then --if player is even spawned
674
				local victimhead = v:findFirstChild("Head") --finds head
675
				local humanoid = v:findFirstChildOfClass("Humanoid") --finds humanoid
676
				if humanoid and victimhead then --if script found humanoid and head
677
					if (victimhead.Position - head.Position).magnitude < sight and humanoid.Health > 0 then
678
						chase(v) --chase who
679
					end
680
				end
681
			end
682
		end
683
	end
684
end
685
686
spawn(check4ppl)
687
688
while heartbeat:wait() do --check animations and other things
689
	if running then --this is the walking animation
690
		for i = 0,0.75 , 0.05 do
691
			if running then
692
				rightshoulder.C0 = rightshoulder.C0:lerp(CFrame.new(-2.19622421, 2.27327061, -1.57830048, -0.351089299, 0.888258278, -0.296198368, -0.754010975, -0.455760926, -0.473021507, -0.55516088, 0.0572640449, 0.829769373),i)
693
				leftshoulder.C0 = leftshoulder.C0:lerp(CFrame.new(-2.31931305, 1.76000595, 1.52594185, -0.336824059, 0.903335214, 0.26558435, -0.820529103, -0.41995579, 0.387774497, 0.461824089, -0.0873079151, 0.882664025),i)
694
				lefthip.C0 = lefthip.C0:lerp(CFrame.new(1.21138191, -3.04071045, 0.5, 0.766044378, -0.642787695, 0, 0.642787695, 0.766044378, 0, 0, 0, 1),i)
695
				righthip.C0 = righthip.C0:lerp(CFrame.new(-2.25595284, -1.97990799, -0.5, 0.342020154, 0.939692616, 0, -0.939692616, 0.342020154, 0, 0, 0, 1),i)
696
				neck.C0 = neck.C0:lerp(CFrame.new(0.446409225, 1.97320557, 0, 0.866025448, 0.499999911, 0, -0.499999911, 0.866025448, 0, 0, 0, 1),i)
697
				root.C0 = root.C0:lerp(CFrame.new(0, 0, 0, 0.866025448, -0.499999911, 0, 0.499999911, 0.866025448, 0, 0, 0, 1) * CFrame.fromEulerAnglesXYZ(0,-math.pi/2,0) * CFrame.fromEulerAnglesXYZ(-0.5,0,0) * CFrame.fromEulerAnglesXYZ(0,0,0.5),i)
698
				heartbeat:wait()
699
			end
700
		end
701
		for i = 0,0.75 , 0.05 do
702
			if running then
703
				rightshoulder.C0 = rightshoulder.C0:lerp(CFrame.new( -2.27283096, 1.94459152, -1.79301262, -0.191510916, 0.935729742, -0.296198308, -0.821698189, -0.317904055, -0.473021477, -0.53678298, 0.15279679, 0.829769492),i)
704
				leftshoulder.C0 = leftshoulder.C0:lerp(CFrame.new(-2.07076645, 2.13161564, 1.51448631, -0.48856923, 0.831122816, 0.26558429, -0.735139072, -0.556058884, 0.387774587, 0.469968796, -0.00578667223, 0.882664025),i)
705
				lefthip.C0 = lefthip.C0:lerp(CFrame.new(-2.51899147, -1.46453857, 0.5, 0.173648268, 0.98480773, 0, -0.98480773, 0.173648268, 0, 0, 0, 1),i)
706
				righthip.C0 = righthip.C0:lerp(CFrame.new(1.8448391, -2.40829563, -0.5, 0.342020154, -0.939692557, 0, 0.939692557, 0.342020154, 0, 0, 0, 1),i)
707
				neck.C0 = neck.C0:lerp(CFrame.new(0.446409225, 1.97320557, 0, 0.866025448, 0.499999911, 0, -0.499999911, 0.866025448, 0, 0, 0, 1),i)
708
				root.C0 = root.C0:lerp(CFrame.new(0, 0, 0, 0.866025448, -0.499999911, 0, 0.499999911, 0.866025448, 0, 0, 0, 1) * CFrame.fromEulerAnglesXYZ(0,-math.pi/2,0) * CFrame.fromEulerAnglesXYZ(-0.5,0,0) * CFrame.fromEulerAnglesXYZ(0,0,0.5),i)
709
				heartbeat:wait()
710
			end
711
		end
712
	end
713
	if sitting then --this is the sitting animation
714
		for i = 0,0.15 , 0.002 do
715
			if sitting then
716
				root.C0 = root.C0:lerp(CFrame.new(0.277837753, -3.77569246, 0, 0.98480773, -0.173648298, 0, 0.173648298, 0.98480773, 0, 0, 0, 1),i)
717
				rightshoulder.C0 = rightshoulder.C0:lerp(CFrame.new(-1.53501892, 0.0072479248, -0.936183929, 0.499999881, 0.813797832, 0.296198159, -0.866025567, 0.469846159, 0.171010077, 5.96046448e-08, -0.342020154, 0.939692616),i)
718
				leftshoulder.C0 = leftshoulder.C0:lerp(CFrame.new(-1.73340797, 0.030960083, 1.0417347, 0.469846249, 0.742043018, -0.478138745, -0.866025567, 0.492403746, -0.0868242159, 0.171009973, 0.454874337, 0.873982251),i)
719
				lefthip.C0 = lefthip.C0:lerp(CFrame.new(-1.88126564, 0.0378093719, 0.5, 0.766044378, 0.642787695, 0, -0.642787695, 0.766044378, 0, 0, 0, 1),i)
720
				righthip.C0 = righthip.C0:lerp(CFrame.new(-1.77682304, 0.0369753838, -0.5, 0.766044378, 0.642787695, 0, -0.642787695, 0.766044378, 0, 0, 0, 1),i)
721
				neck.C0 = neck.C0:lerp(CFrame.new(-0.18793869, 1.93159628, 0, 0.939692616, -0.342020154, 0, 0.342020154, 0.939692616, 0, 0, 0, 1),i)
722
				heartbeat:wait()
723
			end
724
		end
725
		if sitting then
726
			wait(math.random(20,35))
727
		end
728
		for i = 0,0.15 , 0.002 do
729
			if sitting then
730
				root.C0 = root.C0:lerp(CFrame.new(0.549342155, -3.9154768, 0, 0.99999994, 2.98023224e-08, 0, -2.98023224e-08, 0.99999994, -1.62028714e-25, 4.82883198e-33, -1.62028702e-25, 1),i)
731
				rightshoulder.C0 = rightshoulder.C0:lerp(CFrame.new(0.246704102, 1.18243062, -1.44592857, -0.58682394, 0.492403716, 0.642787635, -0.642787457, -0.766044378, -2.80971442e-08, 0.492403954, -0.413175941, 0.766044259),i)
732
				leftshoulder.C0 = leftshoulder.C0:lerp(CFrame.new(-0.045042038, 1.23536623, 1.41781616, -0.68977493, 0.291755378, -0.662637949, -0.587524116, -0.760397375, 0.276786745, -0.4231143, 0.580236554, 0.695916593),i)
733
				lefthip.C0 = lefthip.C0:lerp(CFrame.new(-1.96706343, -0.110518813, 0.5, 0.766044319, 0.642787457, 4.82883198e-33, -0.642787457, 0.766044319, -1.62028702e-25, 1.04150039e-25, -1.24121187e-25, 1),i)
734
				righthip.C0 = righthip.C0:lerp(CFrame.new(-2.03226805, -0.104752898, -0.5, 0.766044378, 0.642787516, 4.82883198e-33, -0.642787516, 0.766044378, -1.62028702e-25, 1.04150051e-25, -1.24121199e-25, 1),i)
735
				neck.C0 = neck.C0:lerp(CFrame.new(-0.892820358, 1.94641006, 0, 0.866025269, -0.49999994, 4.82883198e-33, 0.49999994, 0.866025269, -1.62028702e-25, -8.10143448e-26, -1.40320975e-25, 1),i)
736
				heartbeat:wait()
737
			end
738
		end
739
		if sitting then
740
			wait(math.random(20,35))
741
		end
742
	end
743
end
744
745
746
end))
747
Part22.Name = "HumanoidRootPart"
748
Part22.Parent = Model0
749
Part22.CFrame = CFrame.new(-2.80085993, 5.50001383, -41.7011566, 1, 0, 0, 0, 1, -2.202814e-16, 0, -2.202814e-16, 1)
750
Part22.Position = Vector3.new(-2.80085993, 5.50001383, -41.7011566)
751
Part22.Color = Color3.new(0.905882, 0.905882, 0.92549)
752
Part22.Transparency = 1
753
Part22.Size = Vector3.new(1, 3, 2)
754
Part22.BottomSurface = Enum.SurfaceType.Smooth
755
Part22.BrickColor = BrickColor.new("Pearl")
756
Part22.TopSurface = Enum.SurfaceType.Smooth
757
Part22.brickColor = BrickColor.new("Pearl")
758
Motor6D23.Name = "RootJoint"
759
Motor6D23.Parent = Part22
760
Motor6D23.Part0 = Part22
761
Motor6D23.Part1 = Part3
762
Motor6D23.part1 = Part3
763
Model24.Name = "This is what player sees after death"
764
Model24.Parent = Model0
765
ScreenGui25.Name = "Death"
766
ScreenGui25.Parent = Model24
767
Frame26.Parent = ScreenGui25
768
Frame26.Size = UDim2.new(2, 0, 2, 0)
769
Frame26.BackgroundColor = BrickColor.new("Really black")
770
Frame26.BackgroundColor3 = Color3.new(0, 0, 0)
771
Part27.Name = "facepart"
772
Part27.Parent = Model0
773
Part27.CFrame = CFrame.new(-2.90086031, 7.50001383, -41.7011566, 1, 0, 0, 0, 1, -2.202814e-16, 0, -2.202814e-16, 1)
774
Part27.Position = Vector3.new(-2.90086031, 7.50001383, -41.7011566)
775
Part27.Transparency = 1
776
Part27.Size = Vector3.new(1, 1, 1)
777
Part27.BottomSurface = Enum.SurfaceType.Smooth
778
Part27.TopSurface = Enum.SurfaceType.Smooth
779
Decal28.Name = "face"
780
Decal28.Parent = Part27
781
Decal28.Texture = "http://www.roblox.com/asset/?id=146142799"
782
Decal28.Face = Enum.NormalId.Left
783
for i,v in pairs(mas:GetChildren()) do
784
	v.Parent = workspace
785
	pcall(function() v:MakeJoints() end)
786
end
787
mas:Destroy()
788
for i,v in pairs(cors) do
789
	spawn(function()
790
		pcall(v)
791
	end)
792
end