View difference between Paste ID: rrN2btu8 and 3PKJepDR
SHOW: | | - or go back to the newest paste.
1
--https://github.com/Mokiros/roblox-FE-compatibility
2
if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
3
local Player,Mouse,mouse,UserInputService,ContextActionService = owner
4
local RealPlayer = Player
5
do print("FE Compatibility code by Mokiros")local a=RealPlayer;script.Parent=a.Character;local b=Instance.new("RemoteEvent")b.Name="UserInput_Event"local function c()local d={_fakeEvent=true,Functions={},Connect=function(self,e)table.insert(self.Functions,e)end}d.connect=d.Connect;return d end;local f={Target=nil,Hit=CFrame.new(),KeyUp=c(),KeyDown=c(),Button1Up=c(),Button1Down=c(),Button2Up=c(),Button2Down=c()}local g={InputBegan=c(),InputEnded=c()}local CAS={Actions={},BindAction=function(self,h,i,j,...)CAS.Actions[h]=i and{Name=h,Function=i,Keys={...}}or nil end}CAS.UnbindAction=CAS.BindAction;local function k(self,l,...)local d=f[l]if d and d._fakeEvent then for m,e in pairs(d.Functions)do e(...)end end end;f.TrigEvent=k;g.TrigEvent=k;b.OnServerEvent:Connect(function(n,o)if n~=a then return end;f.Target=o.Target;f.Hit=o.Hit;if not o.isMouse then local p=o.UserInputState==Enum.UserInputState.Begin;if o.UserInputType==Enum.UserInputType.MouseButton1 then return f:TrigEvent(p and"Button1Down"or"Button1Up")end;if o.UserInputType==Enum.UserInputType.MouseButton2 then return f:TrigEvent(p and"Button2Down"or"Button2Up")end;for m,d in pairs(CAS.Actions)do for m,q in pairs(d.Keys)do if q==o.KeyCode then d.Function(d.Name,o.UserInputState,o)end end end;f:TrigEvent(p and"KeyDown"or"KeyUp",o.KeyCode.Name:lower())g:TrigEvent(p and"InputBegan"or"InputEnded",o,false)end end)b.Parent=NLS([==[local a=game:GetService("Players").LocalPlayer;local b=script:WaitForChild("UserInput_Event")local c=a:GetMouse()local d=game:GetService("UserInputService")local e=function(f,g)if g then return end;b:FireServer({KeyCode=f.KeyCode,UserInputType=f.UserInputType,UserInputState=f.UserInputState,Hit=c.Hit,Target=c.Target})end;d.InputBegan:Connect(e)d.InputEnded:Connect(e)local h,i;while wait(1/30)do if h~=c.Hit or i~=c.Target then h,i=c.Hit,c.Target;b:FireServer({isMouse=true,Target=i,Hit=h})end end]==],Player.Character)local r=game;local s={__index=function(self,q)local t=rawget(self,"_RealService")if t then return typeof(t[q])=="function"and function(m,...)return t[q](t,...)end or t[q]end end,__newindex=function(self,q,u)local t=rawget(self,"_RealService")if t then t[q]=u end end}local function v(d,w)d._RealService=typeof(w)=="string"and r:GetService(w)or w;return setmetatable(d,s)end;local x={GetService=function(self,t)return rawget(self,t)or r:GetService(t)end,Players=v({LocalPlayer=v({GetMouse=function(self)return f end},Player)},"Players"),UserInputService=v(g,"UserInputService"),ContextActionService=v(CAS,"ContextActionService"),RunService=v({_btrs={},RenderStepped=r:GetService("RunService").Heartbeat,BindToRenderStep=function(self,h,m,i)self._btrs[h]=self.Heartbeat:Connect(i)end,UnbindFromRenderStep=function(self,h)self._btrs[h]:Disconnect()end},"RunService")}rawset(x.Players,"localPlayer",x.Players.LocalPlayer)x.service=x.GetService;v(x,game)game,owner=x,x.Players.LocalPlayer end
6
7
8
--By Ruffles14
9
mouse = game.Players.LocalPlayer:GetMouse()
10
local rhandclone = game.Players.LocalPlayer.Character.Torso["Right Shoulder"]:Clone()
11
local rhandweld = Instance.new("Weld", game.Players.LocalPlayer.Character.Torso)
12
rhandweld.Part0 = game.Players.LocalPlayer.Character.Torso
13
rhandweld.Part1 = game.Players.LocalPlayer.Character["Right Arm"]
14
rhandweld.C0 = CFrame.new(1.5, 0, 0, 1, -1.6395192e-43, 0, -1.6395192e-43, 1, 0, 0, 0, 1)
15
local lhandclone = game.Players.LocalPlayer.Character.Torso["Left Shoulder"]:Clone()
16
local lhandweld = Instance.new("Weld", game.Players.LocalPlayer.Character.Torso)
17
lhandweld.Part0 = game.Players.LocalPlayer.Character.Torso
18
lhandweld.Part1 = game.Players.LocalPlayer.Character["Left Arm"]
19
lhandweld.C0 = CFrame.new(-1.5, 0, 0, 1, -1.6395192e-43, 0, -1.6395192e-43, 1, 0, 0, 0, 1)
20
local rootjointclone = game.Players.LocalPlayer.Character.HumanoidRootPart.RootJoint:Clone()
21
game.Players.LocalPlayer.Character.HumanoidRootPart.RootJoint:Remove()
22
local humanoidrootpart = Instance.new("Weld", game.Players.LocalPlayer.Character.Torso)
23
humanoidrootpart.Part0 = game.Players.LocalPlayer.Character.HumanoidRootPart
24
humanoidrootpart.Part1 = game.Players.LocalPlayer.Character.Torso
25
local heed = game.Players.LocalPlayer.Character.Torso["Neck"]:Clone()
26
local headweld = Instance.new("Weld", game.Players.LocalPlayer.Character.Torso)
27
headweld.Part0 = game.Players.LocalPlayer.Character.Torso
28
headweld.Part1 = game.Players.LocalPlayer.Character.Head
29
headweld.C0 = headweld.C0 * CFrame.new(0,1.5,0)
30
game.Players.LocalPlayer.Character.Torso.Neck:Remove()
31
using = false
32
--Converted with ttyyuu12345's model to script plugin v4
33
function sandbox(var,func)
34
	local env = getfenv(func)
35
	local newenv = setmetatable({},{
36
		__index = function(self,k)
37
			if k=="script" then
38
				return var
39
			else
40
				return env[k]
41
			end
42
		end,
43
	})
44
	setfenv(func,newenv)
45
	return func
46
end
47
cananimate = true
48
canhit = false
49-
cors = {}
49+
50-
mas = Instance.new("Model",game:GetService("Lighting"))
50+
51-
Part0 = Instance.new("Part")
51+
52-
SpecialMesh1 = Instance.new("SpecialMesh")
52+
53-
Part0.Parent = mas
53+
54-
Part0.Rotation = Vector3.new(-17.039999, 72.0800018, -73.7399979)
54+
55-
Part0.Size = Vector3.new(0.48999998, 2.96999931, 1.94999981)
55+
56-
Part0.CFrame = CFrame.new(1.99671245, 4.08856773, -0.616976917, 0.0861581191, 0.29545939, 0.95146209, -0.99592489, 0, 0.090184398, 0.0266458243, -0.955355108, 0.294255406)
56+
57-
Part0.BottomSurface = Enum.SurfaceType.Smooth
57+
58-
Part0.TopSurface = Enum.SurfaceType.Smooth
58+
59-
Part0.Position = Vector3.new(1.99671245, 4.08856773, -0.616976917)
59+
60-
Part0.Orientation = Vector3.new(-5.17000008, 72.8099976, -90)
60+
61-
Part0.CanCollide = false
61+
62-
SpecialMesh1.Parent = Part0
62+
63-
SpecialMesh1.MeshId = "rbxassetid://441572308"
63+
64-
SpecialMesh1.Scale = Vector3.new(0.0209999997, 0.0209999997, 0.0209999997)
64+
65-
SpecialMesh1.TextureId = "rbxassetid://441572332"
65+
66-
SpecialMesh1.MeshType = Enum.MeshType.FileMesh
66+
67-
SpecialMesh1.Scale = Vector3.new(0.0209999997, 0.0209999997, 0.0209999997)
67+
68-
for i,v in pairs(mas:GetChildren()) do
68+
69-
	v.Parent = game:GetService("Players").LocalPlayer.Character
69+
70-
	pcall(function() v:MakeJoints() end)
70+
71
					humanoid.Parent:BreakJoints()
72-
mas:Destroy()
72+
73-
for i,v in pairs(cors) do
73+
74-
	spawn(function()
74+
75-
		pcall(v)
75+
76-
	end)
76+
77
                    end
78-
Part0:BreakJoints()
78+
79
                        local constraint = Instance.new("BallSocketConstraint", humanoid.Parent)
80
                        constraint.Attachment0 = attachone
81-
local weld = Instance.new("Weld", game.Players.LocalPlayer.Character["Right Arm"])
81+
82-
weld.Part0 = game.Players.LocalPlayer.Character["Right Arm"]
82+
83-
weld.Part1 = Part0
83+
84-
weld.C0 = CFrame.new(0.0769970417, -1.17027426, -1.17937994, 0, 0, 1, -0.999999881, 0, 0, 0, -1, 0)
84+
85-
for i = 0,1 , 0.03 do
85+
86-
	headweld.C0 = headweld.C0:lerp(CFrame.new(0, 1.5, 0, 0.962374032, 0, 0.271727562, 0, 1, 0, -0.271727562, 0, 0.962374032),i)
86+
87-
	humanoidrootpart.C0 = humanoidrootpart.C0:lerp(CFrame.new(0, 0, 0, 0.955355227, 0, -0.295459419, 0, 1, 0, 0.295459419, 0, 0.955355227),i)
87+
88-
	lhandweld.C0 = lhandweld.C0:lerp(CFrame.new(-1.53559077, 0.0383267403, 0, 0.997264206, 0.0739177391, 0, -0.0739177391, 0.997264266, 0, 2.98023224e-08, 1.86264515e-09, 0.999999881),i)
88+
89-
	rhandweld.C0 = rhandweld.C0:lerp(CFrame.new(1.54305458, 0.047129631, 2.98023224e-08, 0.99592495, -0.0901843905, 0, 0.090184398, 0.995925009, 0, 0, 0, 0.999999881),i)
89+
90-
	game:GetService("RunService").RenderStepped:wait()
90+
91
                        constraint.Attachment1 = attachtwo
92
                        constraint.LimitsEnabled = true
93
                        constraint.LowerAngle = lowang
94
                        constraint.UpperAngle = upperang
95
                    end
96-
		for i = 0,1 , 0.045 do
96+
97-
			weld.C0 = weld.C0:lerp(CFrame.new(0.958130836, -0.815908253, -0.0419664383, 0.379335552, 0.92491132, -0.0253674984, -0.913223445, 0.378668189, 0.150445476, 0.148754537, -0.0339030921, 0.988292694),i)
97+
98-
			headweld.C0 = headweld.C0:lerp(CFrame.new(-4.65661287e-10, 1.49999952, 0, 0.601507425, -2.32830644e-10, 0.798867226, 3.0559022e-10, 1, 0, -0.798867226, -4.65661287e-10, 0.601507425),i)
98+
99-
			humanoidrootpart.C0 = humanoidrootpart.C0:lerp(CFrame.new(0, 0, 0, 0.63088727, -0.00573391188, -0.775853336, 0, 0.999972701, -0.00739025697, 0.775874496, 0.00466241874, 0.630870044),i)
99+
100-
			lhandweld.C0 = lhandweld.C0:lerp(CFrame.new(0.0363237262, 0.350219727, -1.1563791, 0.495106995, -0.857149601, 0.1419992, 0.110766649, -0.0998312235, -0.988819599, 0.861742377, 0.505300522, 0.0455164276),i)
100+
101-
			rhandweld.C0 = rhandweld.C0:lerp(CFrame.new(1.50056481, 0.516354084, -0.499166548, 0.995925009, -0.00520473719, 0.09003409, 0.0901844054, 0.0574772507, -0.994265079, -2.98023224e-08, 0.998333335, 0.057712432),i)
101+
102-
			game:GetService("RunService").RenderStepped:wait()
102+
103
                                        attach1 = w:findFirstChild(attach.Name) --finding attachment in head/uppertorso
104
                                    end
105-
		for i = 0,1 , 0.08 do
105+
106-
			weld.C0 = weld.C0:lerp(CFrame.new(0.968596578, -1.15575922, 0.178524971, 0.0531506836, 0.988890588, -0.13881819, -0.988834679, 0.0327400565, -0.145376131, -0.13921617, 0.144995078, 0.979589343),i)
106+
107-
			headweld.C0 = headweld.C0:lerp(CFrame.new(-0.0249017328, 1.48724031, 2.04332173e-06, 0.499998868, 0, -0.866026163, 0, 1, 0, 0.866026163, 0, 0.499998868),i)
107+
108-
			humanoidrootpart.C0 = humanoidrootpart.C0:lerp(CFrame.new(0, 0, 0, 0.305942208, 0, -0.952050149, 0, 1, 0, 0.952050149, 0, 0.305942208):inverse(),i)
108+
109-
			lhandweld.C0 = lhandweld.C0:lerp(CFrame.new(-1.07653618, 0.305679321, -0.818206966, 0.707105398, -0.707108259, 4.32133675e-07, 0.122787982, 0.122786887, -0.984807909, 0.696365714, 0.696363032, 0.173647687),i)
109+
110-
			rhandweld.C0 = rhandweld.C0:lerp(CFrame.new(0.74788636, 0.363031864, -0.7663396, 0.70710665, 0.707106948, -2.23517418e-08, -0.0616280138, 0.061627958, -0.99619478, -0.704416275, 0.704416037, 0.0871551335),i)
110+
111-
			game:GetService("RunService").RenderStepped:wait()
111+
112
                                    constraint.UpperAngle = 0
113
                                end
114
                            end
115
                        end
116
                    end
117
                    if humanoid.Parent:findFirstChild("Head") and humanoid.Parent:findFirstChild("UpperTorso") then
118
                                local attachment = Instance.new("Attachment", humanoid.Parent.Head)
119
                                attachment.Position = Vector3.new(0, -0.5, 0)
120
                                attachment.Name = "lol"
121
                                attachment.Visible = false
122
                                humanoid.Parent.UpperTorso.NeckAttachment.Visible = false
123
                                humanoid.Parent.UpperTorso.NeckAttachment.Position = humanoid.Parent.UpperTorso.NeckAttachment.Position + Vector3.new(0,0,0)
124
                                local ball = Instance.new("BallSocketConstraint", humanoid.Parent)
125
                                ball.Attachment0 = humanoid.Parent.UpperTorso.NeckAttachment
126
                                ball.Attachment1 = attachment
127
                                ball.LimitsEnabled = true
128
                                ball.TwistLimitsEnabled = true
129
                                ball.UpperAngle = 40
130
                                ball.Restitution = 0.5
131
                                ball.TwistUpperAngle = 40
132
                                ball.TwistLowerAngle = -40
133
                                local  collidepartofleftleg = Instance.new("Part", humanoid.Parent.UpperTorso)
134
                                collidepartofleftleg.Name = "Bone"
135
                                collidepartofleftleg.Size = Vector3.new(0.7,0.7,0.7)
136
                                collidepartofleftleg.Transparency = 1
137
                                collidepartofleftleg:BreakJoints()
138
                                local weeld = Instance.new("Weld", collidepartofleftleg)
139
                                weeld.Part0 = collidepartofleftleg
140
                                weeld.Part1 = humanoid.Parent["Head"]
141
                                if humanoid.Parent.Head:findFirstChild("Neck") then
142
                                    humanoid.Parent.Head.Neck:destroy()
143
                                end
144
                                if humanoid.Parent.Head:findFirstChild("face") then
145
                                    humanoid.Parent.Head.face.Texture = "http://www.roblox.com/asset/?id=810245460"
146
                                end
147
                    end
148
                    local LeftUpperLeg = humanoid.Parent:findFirstChild("LeftUpperLeg")
149
                    local LeftLowerLeg = humanoid.Parent:findFirstChild("LeftLowerLeg")
150
                    --
151
                    local RightUpperLeg = humanoid.Parent:findFirstChild("RightUpperLeg")
152
                    local RightLowerLeg = humanoid.Parent:findFirstChild("RightLowerLeg")
153
                    --
154
                    local RightUpperArm = humanoid.Parent:findFirstChild("RightUpperArm")
155
                    local RightLowerArm = humanoid.Parent:findFirstChild("RightLowerArm")
156
                    --
157
                    local LeftUpperArm = humanoid.Parent:findFirstChild("LeftUpperArm")
158
                    local LeftLowerArm = humanoid.Parent:findFirstChild("LeftLowerArm")
159
                    --Foot & Hands--
160
                   
161
                    local LeftFoot = humanoid.Parent:findFirstChild("LeftFoot")
162
                    local RightFoot = humanoid.Parent:findFirstChild("RightFoot")
163
                    --
164
                    local LeftHand = humanoid.Parent:findFirstChild("LeftHand")
165
                    local RightHand = humanoid.Parent:findFirstChild("RightHand")
166
                   
167
                    --END--
168
                    --TORSOS--
169
                   
170
                    local UpperTorso = humanoid.Parent:findFirstChild("UpperTorso")
171
                    local LowerTorso = humanoid.Parent:findFirstChild("LowerTorso")
172
                   
173
                    --END--
174
                    if LowerTorso then
175
                        if LeftUpperLeg then
176
                            makeballlimb(LowerTorso["LeftHipRigAttachment"], LeftUpperLeg["LeftHipRigAttachment"], 50,-50, 90)
177
                        end
178
                        if RightUpperLeg then
179
                            makeballlimb(LowerTorso["RightHipRigAttachment"], RightUpperLeg["RightHipRigAttachment"], 50,-50, 90)
180
                        end
181
                        if LeftLowerLeg then
182
                            makehingelimb(LeftUpperLeg["LeftKneeRigAttachment"], LeftLowerLeg["LeftKneeRigAttachment"], 0,-90)
183
                        end
184
                        if RightLowerLeg then
185
                            makehingelimb(RightUpperLeg["RightKneeRigAttachment"], RightLowerLeg["RightKneeRigAttachment"], 0,-90)
186
                        end
187
                        if LeftFoot then
188
                            makehingelimb(LeftLowerLeg["LeftAnkleRigAttachment"], LeftFoot["LeftAnkleRigAttachment"], 30, -30)
189
                        end
190
                        if RightFoot then
191
                            makehingelimb(RightLowerLeg["RightAnkleRigAttachment"], RightFoot["RightAnkleRigAttachment"], 30, -30)
192
                        end
193
                        if UpperTorso then
194
                            makehingelimb(UpperTorso["WaistRigAttachment"], LowerTorso["WaistRigAttachment"], 30, -30)
195
                        end
196
                    end
197
                    if UpperTorso then
198
						local vel = Instance.new("BodyVelocity", UpperTorso)
199
                        vel.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
200
                        vel.Velocity = game.Players.LocalPlayer.Character.Torso.CFrame.lookVector * 10
201
                        game.Debris:AddItem(vel, 0.1)
202
                        local hitsound = Instance.new("Sound", UpperTorso)
203
                        hitsound.SoundId = "http://www.roblox.com/asset/?id=148862502"                       
204
                        hitsound:Play()
205
                        hitsound.Volume = math.random(5,10)
206
                        local woosh = Instance.new("Sound",UpperTorso)
207
                        woosh.SoundId = "rbxassetid://147722227"
208
                        woosh:Play()
209
                        woosh.Volume = math.random(5,10)
210
                        local oof = Instance.new("Sound")   
211
                        local canhit = true
212
                        local hitval = 15
213
                        local uptor = humanoid.Parent.UpperTorso
214
                        if RightUpperArm then
215
                            makeballlimb(RightUpperArm["RightShoulderRigAttachment"], UpperTorso["RightShoulderRigAttachment"], 90,-50, 180)
216
                        end
217
                        if RightLowerArm then
218
                            makehingelimb(RightLowerArm["RightElbowRigAttachment"], RightUpperArm["RightElbowRigAttachment"], 0,-90)
219
                        end
220
                        if RightHand then
221
                            makehingelimb(RightHand["RightWristRigAttachment"], RightLowerArm["RightWristRigAttachment"], 30,30)
222
                        end
223
                        if LeftUpperArm then
224
                            makeballlimb(LeftUpperArm["LeftShoulderRigAttachment"], UpperTorso["LeftShoulderRigAttachment"], 90,-50, 180)
225
                        end
226
                        if LeftLowerArm then
227
                            makehingelimb(LeftLowerArm["LeftElbowRigAttachment"], LeftUpperArm["LeftElbowRigAttachment"], 0,-90)
228
                        end
229
                        if LeftHand then
230
                            makehingelimb(LeftHand["LeftWristRigAttachment"], LeftLowerArm["LeftWristRigAttachment"], 30,30)
231
                        end
232
                    end
233
			else
234
				humanoid.Parent.Archivable = true
235
				humanoid.PlatformStand = true
236
				local clone = humanoid.Parent:Clone()
237
				clone.Parent = workspace
238
				game.Debris:AddItem(clone, 60)
239
				for i,v in pairs(clone:GetChildren()) do
240
				    if v.ClassName == "Script" or v.ClassName == "LocalScript" then
241
				        v:Remove()
242
				    end
243
				    for i,p in pairs(v:GetChildren()) do
244
				    if p.ClassName == "Weld" or p.ClassName == "Motor6D" or p.ClassName == "BodyVelocity" then
245
				        p:Remove()
246
				    end
247
				end
248
				end
249
				for i,t in pairs(humanoid.Parent:GetChildren()) do
250
				    if t.ClassName == "Accessory" or t.ClassName == "ForceField" then
251
				        t:Remove()
252
				    end
253
				end
254
				local vel = Instance.new("BodyVelocity", clone.Torso)
255
                vel.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
256
                vel.Velocity = game.Players.LocalPlayer.Character.Torso.CFrame.lookVector * 15
257
                game.Debris:AddItem(vel, 0.1)
258
				local hitsound = Instance.new("Sound", clone.Torso)
259-
                        hitsound.SoundId = "http://www.roblox.com/asset/?id=148862502"
259+
260
                hitsound:Play()
261
                hitsound.Volume = math.random(5,10)
262
				vel = Instance.new("BodyVelocity", clone.Torso)
263
				vel.Velocity = clone.Torso.CFrame.lookVector * -5
264
				vel.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
265
				using = false
266
				hit = Instance.new("Sound", clone.Torso)
267
				hit.SoundId = "rbxassetid://260430060"
268
				hit.Volume = 0
269
				hit1 = Instance.new("Sound", clone.Torso)
270
				hit1.SoundId = "rbxassetid://138087186"
271
				hit1.Volume = 0
272
				hit2 = Instance.new("Sound", clone.Torso)
273
				hit2.SoundId = "rbxassetid://131237241"
274
				hit2.Volume = 0
275
				hit3 = Instance.new("Sound", clone.Torso)
276
				hit3.SoundId = "rbxassetid://278062209"
277
				hit3.Volume = 0
278
				hit3.TimePosition = 0.33
279
				ded = Instance.new("Sound", clone.Torso)
280
				ded.SoundId = "rbxassetid://540791978"
281
				ded.Volume = 0
282
				local leftarm = clone:findFirstChild("Left Arm")
283
				local rightrm = clone:findFirstChild("Right Arm")
284
				local leftleg = clone:findFirstChild("Left Leg")
285
				local rightleg = clone:findFirstChild("Right Leg")
286
				local head = clone:findFirstChild("Head")
287
				for i, g in pairs(humanoid.Parent:GetChildren()) do
288
				    if g.ClassName == "Part" then
289
				        g:destroy()
290
				    end
291
				end
292
				for i, h in pairs(humanoid.Parent:GetChildren()) do
293
				    if h.ClassName == "Accesory" then
294
				        h:destroy()
295
				    end
296
				end
297
				for z,x in pairs(clone:GetChildren()) do
298
                        if x.ClassName == "Accessory" then
299
                            local handle = x:findFirstChild("Handle")
300
                            if handle then
301
                                local attachment = handle:findFirstChildOfClass("Attachment")
302
                                if attachment then
303
                                    for q,w in pairs(clone:GetChildren()) do
304
                                        if w.Name == "Torso" or w.Name == "Head" then
305
                                            local anotherone = w:findFirstChild(attachment.Name)
306
                                            if attachment and anotherone then
307
                                                local constraint = Instance.new("HingeConstraint", clone) --making fake weld
308
                                                constraint.Attachment0 = attachment
309
                                                constraint.Attachment1 = anotherone
310
                                                constraint.LimitsEnabled = true
311
                                                constraint.LowerAngle = 0
312
                                                constraint.UpperAngle = 0
313
                                            end
314
                                        end
315
                                    end
316
                                end
317
                            end
318
                        end
319
                    end
320
				if head and clone.Torso:findFirstChild("NeckAttachment") then
321
				            local attachment = Instance.new("Attachment", clone.Head)
322
				            attachment.Position = Vector3.new(0, -0.5, 0)
323
				            attachment.Name = "lol"
324
				            attachment.Visible = false
325
				            clone.Torso.NeckAttachment.Visible = false
326
				            clone.Torso.NeckAttachment.Position = clone.Torso.NeckAttachment.Position + Vector3.new(0,0,0)
327
				            local ball = Instance.new("BallSocketConstraint", clone)
328
				            ball.Attachment0 = clone.Torso.NeckAttachment
329
				            ball.Attachment1 = attachment
330
				            ball.LimitsEnabled = true
331-
				ded.SoundId = "rbxassetid://418892870"
331+
332
				            ball.UpperAngle = 90
333
				            ball.Restitution = 0.5
334
				            ball.TwistUpperAngle = 90
335
				            ball.TwistLowerAngle = -90
336
				            local  collidepartofleftleg = Instance.new("Part", clone.Torso)
337
				            collidepartofleftleg.Name = "Bone"
338
				            collidepartofleftleg.Size = Vector3.new(0.7,0.7,0.7)
339
				            collidepartofleftleg.Transparency = 1
340
				            collidepartofleftleg:BreakJoints()
341
				            local weeld = Instance.new("Weld", collidepartofleftleg)
342
				            weeld.Part0 = collidepartofleftleg
343
				            weeld.Part1 = clone["Head"]
344
				        end
345
				if leftleg ~= nil then
346
				leftleg:BreakJoints()
347
				local glue = Instance.new("Glue", clone.Torso)
348
				glue.Part0 = clone.Torso
349
				glue.Part1 = leftleg
350
				glue.Name = "Left leg"
351
				local collider = Instance.new("Part", leftleg)
352
				collider.Position = Vector3.new(0,999,0)
353
				collider.Size = Vector3.new(1.5, 1, 1)
354
				collider.Shape = "Cylinder"
355
				local weld = Instance.new("Weld", collider)
356
				weld.Part0 = leftleg
357
				weld.Part1 = collider
358
				weld.C0 = CFrame.new(0,-0.2,0) * CFrame.fromEulerAnglesXYZ(0, 0, math.pi/2)
359
				collider.TopSurface = "Smooth"
360
				collider.BottomSurface = "Smooth"
361
				collider.formFactor = "Symmetric"
362
				glue.C0 = CFrame.new(-0.5, -1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
363
				glue.C1 = CFrame.new(-0, 1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
364
				collider.Transparency = 1
365
				end
366
				------------
367
				if rightleg ~= nil then
368
				rightleg:BreakJoints()
369
				local glue1 = Instance.new("Glue", clone.Torso)
370
				glue1.Part0 = clone.Torso
371
				glue1.Part1 = rightleg
372
				glue1.Name = "Right leg"
373
				local collider1 = Instance.new("Part", rightleg)
374
				collider1.Position = Vector3.new(0,999,0)
375
				collider1.Size = Vector3.new(1.5, 1, 1)
376
				collider1.Shape = "Cylinder"
377
				local weld1 = Instance.new("Weld", collider1)
378
				weld1.Part0 = rightleg
379
				weld1.Part1 = collider1
380
				weld1.C0 = CFrame.new(0,-0.2,0) * CFrame.fromEulerAnglesXYZ(0, 0, math.pi/2)
381
				collider1.TopSurface = "Smooth"
382
				collider1.BottomSurface = "Smooth"
383
				collider1.formFactor = "Symmetric"
384
				glue1.C0 = CFrame.new(0.5, -1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
385
				glue1.C1 = CFrame.new(0, 1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
386
				collider1.Transparency = 1
387
				end
388
				------------
389
				if rightrm ~= nil then
390
				rightrm:BreakJoints()
391
				rightrm.CFrame = clone.Torso.CFrame * CFrame.new(1.7,0,0)
392
				local glue11 = Instance.new("Glue", clone.Torso)
393
				glue11.Part0 = clone.Torso
394
				glue11.Part1 = rightrm
395
				glue11.Name = "Right shoulder"
396
				local collider11 = Instance.new("Part", rightrm)
397
				collider11.Position = Vector3.new(0,9999,0)
398
				collider11.Size = Vector3.new(1.5,1,1)
399
				collider11.Shape = "Cylinder"
400
				local weld11 = Instance.new("Weld", collider11)
401
				weld11.Part0 = rightrm
402
				weld11.Part1 = collider11
403
				weld11.C0 = CFrame.new(0,-0.2,0) * CFrame.fromEulerAnglesXYZ(0, 0, math.pi/2)
404
				collider11.TopSurface = "Smooth"
405
				collider11.BottomSurface = "Smooth"
406
				collider11.formFactor = "Symmetric"
407
				glue11.C0 = CFrame.new(1.5, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
408
				glue11.C1 = CFrame.new(0, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
409
				collider11.Transparency = 1
410
				end
411
				------------
412
				if leftarm ~= nil then
413
				leftarm.CFrame = clone.Torso.CFrame * CFrame.new(-1.7,0,0)
414
				leftarm:BreakJoints()
415
				local glue111 = Instance.new("Glue", clone.Torso)
416
				glue111.Part0 = clone.Torso
417
				glue111.Part1 = leftarm
418
				glue111.Name = "Left shoulder"
419
				local collider111 = Instance.new("Part", leftarm)
420
				collider111.Position = Vector3.new(0,9999,0)
421
				collider111.Size = Vector3.new(1.5,1,1)
422
				collider111.Shape = "Cylinder"
423
				local weld111 = Instance.new("Weld", collider111)
424
				weld111.Part0 = leftarm
425
				weld111.Part1 = collider111
426
				weld111.C0 = CFrame.new(0,-0.2,0) * CFrame.fromEulerAnglesXYZ(0, 0, math.pi/2)
427
				collider111.TopSurface = "Smooth"
428
				collider111.BottomSurface = "Smooth"
429
				collider111.formFactor = "Symmetric"
430
				glue111.C0 = CFrame.new(-1.5, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
431
				glue111.C1 = CFrame.new(0, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
432
				collider111.Transparency = 1
433
				----------------
434
				sensoring = Instance.new("Part", clone.Torso)
435
				sensoring.Size = Vector3.new(1.2,1.1,0.8)
436
				sensoring.CanCollide = false
437
				sensoring.Position = clone.Torso.Position
438
				local welder = Instance.new("Weld", sensoring)
439
				welder.Part0 = clone.Torso
440
				welder.Part1 = sensoring
441
				welder.C0 = welder.C0 * CFrame.new(0,0,1.05)
442
				sensoring.Transparency = 1
443
				-----------------
444
				sensoring1 = Instance.new("Part", clone.Torso)
445
				sensoring1.Size = Vector3.new(1.2,1.1,0.8)
446
				sensoring1.CanCollide = false
447
				sensoring1.Position = clone.Torso.Position
448
				local welder1 = Instance.new("Weld", sensoring)
449
				welder1.Part0 = clone.Torso
450
				welder1.Part1 = sensoring1
451
				welder1.C0 = welder1.C0 * CFrame.new(0,0,-1.05)
452
				sensoring1.Transparency = 1
453
				end
454
				clone.Name = humanoid.Parent.Name.." (DED)"
455
				ded.Playing = true
456
                wait(1)
457
                ded.Playing = false
458
				vel:destroy()
459
				wait(0.5)
460
				local function touch()
461
				    if not using then
462
				        using = true
463
				        local Math = math.random(1,4)
464
				        if Math == 1 then
465
				            hit:Play()
466
                            woosh:Play()
467
				        end
468
				        if Math == 2 then
469
				            hit1:Play()
470
                             woosh:Play()
471
				        end
472
				        if Math == 3 then
473
				            hit2:Play() 
474
                            woosh:Play()
475
				        end
476
				        if Math == 4 then
477
				            hit3:Play()
478
                            woosh:Play()
479
				        end
480
				        wait(0.1)
481
				        using = false
482
				    end
483
				end
484
				sensoring.Touched:connect(touch)
485
				sensoring1.Touched:connect(touch)
486
				while true do
487
					if clone:findFirstChild("Head") then
488
						clone.Head.CanCollide = false
489
				    end
490
				    game:GetService("RunService").Stepped:wait()
491
				end
492
			end
493
		end
494
	end
495
end
496
Part0.Touched:connect(hittie)
497
function ragdoll()
498
game.Players.LocalPlayer.Character.Archivable = true
499
clone = game.Players.LocalPlayer.Character:Clone()
500
clone.Parent = workspace
501
for i,v in pairs(clone:GetChildren()) do
502
	if v.ClassName == "Script" or v.ClassName == "LocalScript" then
503
		v:Remove()
504
	end
505-
				clone.Name = humanoid.Parent.Name.." (PANNED)"
505+
506-
				ded:Play()
506+
507
		p:Remove()
508
	end
509
end
510
end
511
for i,t in pairs(game.Players.LocalPlayer.Character:GetChildren()) do
512
	if t.ClassName == "Accessory" or t.ClassName == "ForceField" then
513
		t:Remove()
514
	end
515
end
516
vel = Instance.new("BodyVelocity", clone.Torso)
517
vel.Velocity = clone.Torso.CFrame.lookVector * -5
518
vel.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
519
clone.Head.face.Texture = "http://www.roblox.com/asset/?id=161061608"
520-
				            hit2:Play()
520+
521
hit = Instance.new("Sound", clone.Torso)
522
hit.SoundId = "rbxassetid://260430060"
523
hit.Volume = 0
524
hit1 = Instance.new("Sound", clone.Torso)
525
hit1.SoundId = "rbxassetid://138087186"
526
hit1.Volume = 0
527
hit2 = Instance.new("Sound", clone.Torso)
528
hit2.SoundId = "rbxassetid://131237241"
529
hit2.Volume = 0
530
hit3 = Instance.new("Sound", clone.Torso)
531
hit3.SoundId = "rbxassetid://278062209"
532
hit3.Volume = 0
533
hit3.TimePosition = 0.33
534
ded = Instance.new("Sound", clone.Torso)
535
ded.SoundId = "rbxassetid://337800380"
536
ded.Volume = 5
537
local leftarm = clone:findFirstChild("Left Arm")
538
local rightrm = clone:findFirstChild("Right Arm")
539
local leftleg = clone:findFirstChild("Left Leg")
540
local rightleg = clone:findFirstChild("Right Leg")
541
local head = clone:findFirstChild("Head")
542
for i, g in pairs(game.Players.LocalPlayer.Character:GetChildren()) do
543
	if g.ClassName == "Part" then
544
		g:destroy()
545
	end
546
end
547
for i, h in pairs(game.Players.LocalPlayer.Character:GetChildren()) do
548
	if h.ClassName == "Accesory" then
549
		h:destroy()
550
	end
551
end
552
game.Workspace.CurrentCamera.CameraSubject = head
553
if head then
554
            local attachment = Instance.new("Attachment", clone.Head)
555
            attachment.Position = Vector3.new(0, -0.5, 0)
556
            attachment.Name = "lol"
557
            attachment.Visible = false
558
            clone.Torso.NeckAttachment.Visible = false
559
            clone.Torso.NeckAttachment.Position = clone.Torso.NeckAttachment.Position + Vector3.new(0,0,0)
560
            local ball = Instance.new("BallSocketConstraint", clone)
561
            ball.Attachment0 = clone.Torso.NeckAttachment
562
            ball.Attachment1 = attachment
563
			ball.LimitsEnabled = true
564
			ball.TwistLimitsEnabled = true
565
			ball.UpperAngle = 90
566
			ball.Restitution = 0.5
567
			ball.TwistUpperAngle = 90
568
			ball.TwistLowerAngle = -90
569
            local  collidepartofleftleg = Instance.new("Part", clone.Torso)
570
            collidepartofleftleg.Name = "Bone"
571
            collidepartofleftleg.Size = Vector3.new(0.7,0.7,0.7)
572
            collidepartofleftleg.Transparency = 1
573
            collidepartofleftleg:BreakJoints()
574
            local weeld = Instance.new("Weld", collidepartofleftleg)
575
            weeld.Part0 = collidepartofleftleg
576
            weeld.Part1 = clone["Head"]
577
        end
578
if leftleg ~= nil then
579
local glue = Instance.new("Glue", clone.Torso)
580
glue.Part0 = clone.Torso
581
glue.Part1 = leftleg
582
glue.Name = "Left leg"
583
local collider = Instance.new("Part", leftleg)
584
collider.Position = Vector3.new(0,999,0)
585
collider.Size = Vector3.new(1.5, 1, 1)
586
collider.Shape = "Cylinder"
587
local weld = Instance.new("Weld", collider)
588
weld.Part0 = leftleg
589
weld.Part1 = collider
590
weld.C0 = CFrame.new(0,-0.2,0) * CFrame.fromEulerAnglesXYZ(0, 0, math.pi/2)
591
collider.TopSurface = "Smooth"
592
collider.BottomSurface = "Smooth"
593
collider.formFactor = "Symmetric"
594
glue.C0 = CFrame.new(-0.5, -1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
595
glue.C1 = CFrame.new(-0, 1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
596
collider.Transparency = 1
597
end
598
------------
599
if rightleg ~= nil then
600
local glue1 = Instance.new("Glue", clone.Torso)
601
glue1.Part0 = clone.Torso
602
glue1.Part1 = rightleg
603
glue1.Name = "Right leg"
604
local collider1 = Instance.new("Part", rightleg)
605
collider1.Position = Vector3.new(0,999,0)
606
collider1.Size = Vector3.new(1.5, 1, 1)
607
collider1.Shape = "Cylinder"
608
local weld1 = Instance.new("Weld", collider1)
609
weld1.Part0 = rightleg
610
weld1.Part1 = collider1
611
weld1.C0 = CFrame.new(0,-0.2,0) * CFrame.fromEulerAnglesXYZ(0, 0, math.pi/2)
612
collider1.TopSurface = "Smooth"
613
collider1.BottomSurface = "Smooth"
614
collider1.formFactor = "Symmetric"
615
glue1.C0 = CFrame.new(0.5, -1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
616
glue1.C1 = CFrame.new(0, 1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
617
collider1.Transparency = 1
618
end
619
------------
620
if rightrm ~= nil then
621
local glue11 = Instance.new("Glue", clone.Torso)
622
glue11.Part0 = clone.Torso
623
glue11.Part1 = rightrm
624
glue11.Name = "Right shoulder"
625
local collider11 = Instance.new("Part", rightrm)
626
collider11.Position = Vector3.new(0,9999,0)
627
collider11.Size = Vector3.new(1.5,1,1)
628
collider11.Shape = "Cylinder"
629
local weld11 = Instance.new("Weld", collider11)
630
weld11.Part0 = rightrm
631
weld11.Part1 = collider11
632
weld11.C0 = CFrame.new(0,-0.2,0) * CFrame.fromEulerAnglesXYZ(0, 0, math.pi/2)
633
collider11.TopSurface = "Smooth"
634
collider11.BottomSurface = "Smooth"
635
collider11.formFactor = "Symmetric"
636
glue11.C0 = CFrame.new(1.5, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
637
glue11.C1 = CFrame.new(0, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
638
collider11.Transparency = 1
639
end
640
------------
641
if leftarm ~= nil then
642
local glue111 = Instance.new("Glue", clone.Torso)
643
glue111.Part0 = clone.Torso
644
glue111.Part1 = leftarm
645
glue111.Name = "Left shoulder"
646
local collider111 = Instance.new("Part", leftarm)
647
collider111.Position = Vector3.new(0,9999,0)
648
collider111.Size = Vector3.new(1.5,1,1)
649
collider111.Shape = "Cylinder"
650
local weld111 = Instance.new("Weld", collider111)
651
weld111.Part0 = leftarm
652
weld111.Part1 = collider111
653
weld111.C0 = CFrame.new(0,-0.2,0) * CFrame.fromEulerAnglesXYZ(0, 0, math.pi/2)
654
collider111.TopSurface = "Smooth"
655
collider111.BottomSurface = "Smooth"
656
collider111.formFactor = "Symmetric"
657
glue111.C0 = CFrame.new(-1.5, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
658
glue111.C1 = CFrame.new(0, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
659
collider111.Transparency = 1
660
----------------
661
sensoring = Instance.new("Part", clone.Torso)
662
sensoring.Size = Vector3.new(1.2,1.1,0.8)
663
sensoring.CanCollide = false
664
sensoring.Position = clone.Torso.Position
665
local welder = Instance.new("Weld", sensoring)
666
welder.Part0 = clone.Torso
667
welder.Part1 = sensoring
668
welder.C0 = welder.C0 * CFrame.new(0,0,1.05)
669
sensoring.Transparency = 1
670
-----------------
671
sensoring1 = Instance.new("Part", clone.Torso)
672
sensoring1.Size = Vector3.new(1.2,1.1,0.8)
673
sensoring1.CanCollide = false
674
sensoring1.Position = clone.Torso.Position
675
local welder1 = Instance.new("Weld", sensoring)
676
welder1.Part0 = clone.Torso
677
welder1.Part1 = sensoring1
678
welder1.C0 = welder1.C0 * CFrame.new(0,0,-1.05)
679
sensoring1.Transparency = 1
680
end
681
clone.Name = game.Players.LocalPlayer.Character.Name.." (OOF'D)"
682
ded:Play()
683
vel:destroy()
684
wait(0.2)
685
game.Debris:AddItem(clone,60)
686
local function touch()
687
	if not using then
688
		using = true
689
		local Math = math.random(1,4)
690
		if Math == 1 then
691
			hit:Play()
692
		end
693
		if Math == 2 then
694
			hit1:Play()
695
		end
696
		if Math == 3 then
697
			hit2:Play()
698
		end
699
		if Math == 4 then
700
			hit3:Play()
701
		end
702
		wait(0.1)
703
		using = false
704
	end
705
end
706
sensoring.Touched:connect(touch)
707
sensoring1.Touched:connect(touch)
708
while true do
709
	clone.Head.CanCollide = false
710
	game:GetService("RunService").Stepped:wait()
711
end
712
end
713
714
game.Players.LocalPlayer.Character.Humanoid.Died:connect(ragdoll)
715
716
--di ent
717
while true do
718
	if cananimate then
719
		if game.Players.LocalPlayer.Character.Torso.Velocity.x < -0.5 or game.Players.LocalPlayer.Character.Torso.Velocity.x > 0.5 or game.Players.LocalPlayer.Character.Torso.Velocity.z < -0.5 or game.Players.LocalPlayer.Character.Torso.Velocity.z > 0.5 and cananimate then
720
			for i = 0.1,0.3 , 0.008 do
721
				if cananimate and game.Players.LocalPlayer.Character.Torso.Velocity.x < -0.5 or game.Players.LocalPlayer.Character.Torso.Velocity.x > 0.5 or game.Players.LocalPlayer.Character.Torso.Velocity.z < -0.5 or game.Players.LocalPlayer.Character.Torso.Velocity.z > 0.5 and cananimate then
722
					lhandweld.C0 = lhandweld.C0:lerp(CFrame.new(-1.53402293, 0.0594797134, 0.144087285, 0.997264206, 0.0707819909, 0.0213012099, -0.0739177391, 0.9549582, 0.287386209, 2.98023224e-08, -0.28817457, 0.957577825),i)
723
					rhandweld.C0 = rhandweld.C0:lerp(CFrame.new(1.54035091, 0.0769848824, -0.170524538, 0.99592495, -0.0847774297, 0.0307573378, 0.090184398, 0.936214805, -0.339659303, 0, 0.341049016, 0.940045416),i)
724
					game:GetService("RunService").Stepped:wait()
725
				end
726-
clone.Name = game.Players.LocalPlayer.Character.Name.." (DEAD)"
726+
727
			for i = 0.1,0.3 , 0.008 do
728
				if cananimate and game.Players.LocalPlayer.Character.Torso.Velocity.x < -0.5 or game.Players.LocalPlayer.Character.Torso.Velocity.x > 0.5 or game.Players.LocalPlayer.Character.Torso.Velocity.z < -0.5 or game.Players.LocalPlayer.Character.Torso.Velocity.z > 0.5 and cananimate then
729
					lhandweld.C0 = lhandweld.C0:lerp(CFrame.new(-1.53173375, 0.0903658867, -0.222393572, 0.997264206, 0.0662034005, -0.0328776538, -0.0739177391, 0.893185973, -0.443570435, 2.98023224e-08, 0.444787204, 0.895636141),i)
730
					rhandweld.C0 = rhandweld.C0:lerp(CFrame.new(1.54079688, 0.0720610619, 0.156226337, 0.99592495, -0.085669145, -0.0281783342, 0.090184398, 0.946062148, 0.311179608, 0, -0.312452823, 0.949932992),i)
731
					game:GetService("RunService").Stepped:wait()
732
				end
733
			end
734
		elseif game.Players.LocalPlayer.Character.Torso.Velocity.x > -0.5 or game.Players.LocalPlayer.Character.Torso.Velocity.x < 0.5 or game.Players.LocalPlayer.Character.Torso.Velocity.z > -0.5 or game.Players.LocalPlayer.Character.Torso.Velocity.z < 0.5 then
735
			for i = 0,1 , 0.1 do
736
				if cananimate and game.Players.LocalPlayer.Character.Torso.Velocity.x > -0.5 or game.Players.LocalPlayer.Character.Torso.Velocity.x < 0.5 or game.Players.LocalPlayer.Character.Torso.Velocity.z > -0.5 or game.Players.LocalPlayer.Character.Torso.Velocity.z < 0.5 and cananimate then
737
					weld.C0 = weld.C0:lerp(CFrame.new(0.0769970417, -1.17027426, -1.17937994, 0, 0, 1, -0.999999881, 0, 0, 0, -1, 0),i)
738
					headweld.C0 = headweld.C0:lerp(CFrame.new(0, 1.5, 0, 0.962374032, 0, 0.271727562, 0, 1, 0, -0.271727562, 0, 0.962374032),i)
739
					humanoidrootpart.C0 = humanoidrootpart.C0:lerp(CFrame.new(0, 0, 0, 0.955355227, 0, -0.295459419, 0, 1, 0, 0.295459419, 0, 0.955355227),i)
740
					lhandweld.C0 = lhandweld.C0:lerp(CFrame.new(-1.53559077, 0.0383267403, 0, 0.997264206, 0.0739177391, 0, -0.0739177391, 0.997264266, 0, 2.98023224e-08, 1.86264515e-09, 0.999999881),i)
741
					rhandweld.C0 = rhandweld.C0:lerp(CFrame.new(1.54305458, 0.047129631, 2.98023224e-08, 0.99592495, -0.0901843905, 0, 0.090184398, 0.995925009, 0, 0, 0, 0.999999881),i)
742
		            game:GetService("RunService").RenderStepped:wait()
743
				end
744
	        end
745
		end
746
	end
747
	wait()
748
end