View difference between Paste ID: 8ZaTt40a and pqaVQa3T
SHOW: | | - or go back to the newest paste.
1
--Converted with ttyyuu12345's model to script plugin v4
2
--By Rufus14
3-
mouse = game.Players.LocalPlayer:GetMouse()
3+
4
if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
5
local Player,Mouse,mouse,UserInputService,ContextActionService = owner
6
do
7
	print("FE Compatibility code by Mokiros")
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
game.Players.LocalPlayer.Character.Humanoid.MaxHealth = math.huge
88
game.Players.LocalPlayer.Character.Humanoid.Health = math.huge
89
function sandbox(var,func)
90
	local env = getfenv(func)
91
	local newenv = setmetatable({},{
92
		__index = function(self,k)
93
			if k=="script" then
94
				return var
95
			else
96
				return env[k]
97
			end
98
		end,
99
	})
100
	setfenv(func,newenv)
101
	return func
102
end
103
cors = {}
104
mas = Instance.new("Model",game:GetService("Lighting"))
105
Part0 = Instance.new("Part")
106
SpecialMesh1 = Instance.new("SpecialMesh")
107
Part0.Name = "Gun"
108
Part0.Parent = mas
109
Part0.CanCollide = false
110
Part0.Size = Vector3.new(0.970000505, 2.46999931, 0.380000055)
111
Part0.CFrame = CFrame.new(-211.74501, 2.6168952, 37.920002, 1, 0, 0, 0, 1, 0, 0, 0, 1)
112
Part0.Position = Vector3.new(-211.74501, 2.6168952, 37.920002)
113
SpecialMesh1.Parent = Part0
114
SpecialMesh1.MeshId = "rbxassetid://505563629"
115
SpecialMesh1.Scale = Vector3.new(0.00499999989, 0.00499999989, 0.00499999989)
116
SpecialMesh1.TextureId = "rbxassetid://505563636"
117
SpecialMesh1.MeshType = Enum.MeshType.FileMesh
118
SpecialMesh1.Scale = Vector3.new(0.00499999989, 0.00499999989, 0.00499999989)
119
for i,v in pairs(mas:GetChildren()) do
120
	v.Parent = game:GetService("Players").LocalPlayer.Character
121
	pcall(function() v:MakeJoints() end)
122
end
123
mas:Destroy()
124
for i,v in pairs(cors) do
125
	spawn(function()
126
		pcall(v)
127
	end)
128
end
129
cankys = true
130
weld = Instance.new("Weld", Part0)
131
weld.Part0 = game.Players.LocalPlayer.Character["Left Arm"]
132
weld.Part1 = Part0
133
weld.C0 = CFrame.new(0.158004761, -1.63815379, -1.00455856, -5.79879307e-22, 9.29214533e-23, 1, -0.587791622, -0.809012473, -2.65673535e-22, 0.809012473, -0.587791622, 5.23747954e-22)
134
function killyourself(key)
135
	if cankys then
136
		cankys = false
137
		if game.Players.LocalPlayer.Character.Head:findFirstChild("face") then
138
			game.Players.LocalPlayer.Character.Head.face.Texture = "rbxassetid://1148787155"
139
		end
140
		local rhandweld = Instance.new("Weld", game.Players.LocalPlayer.Character.Torso)
141
		rhandweld.Part0 = game.Players.LocalPlayer.Character.Torso
142
		rhandweld.Part1 = game.Players.LocalPlayer.Character["Right Arm"]
143
		rhandweld.C0 = CFrame.new(1.5, 0, 0, 1, -1.6395192e-43, 0, -1.6395192e-43, 1, 0, 0, 0, 1)
144
		local lhandweld = Instance.new("Weld", game.Players.LocalPlayer.Character.Torso)
145
		lhandweld.Part0 = game.Players.LocalPlayer.Character.Torso
146
		lhandweld.Part1 = game.Players.LocalPlayer.Character["Left Arm"]
147
		lhandweld.C0 = CFrame.new(-1.5, 0, 0, 1, -1.6395192e-43, 0, -1.6395192e-43, 1, 0, 0, 0, 1)
148
		for i = 0,2 , 0.02 do
149
			weld.C0 = weld.C0:lerp(CFrame.new(0.720336914, -0.258590698, -0.514060974, 0.409927189, 0.572569966, -0.710018694, 0.0567400455, 0.760912359, 0.646370947, 0.910354853, -0.305250764, 0.279430419),i)
150
			lhandweld.C0 = lhandweld.C0:lerp(CFrame.new(-0.832244873, 0.405325174, -1.44667816, 0.719340205, -0.634600103, -0.28254649, -0.214658037, 0.183768019, -0.959245205, 0.660660148, 0.750674427, -0.00403028121),i)
151
			rhandweld.C0 = rhandweld.C0:lerp(CFrame.new(0.921920776, 0.294008493, -1.1861496, 0.88295126, 0.469464868, 6.12843053e-07, -0.0490720123, 0.0922940373, -0.994521856, -0.466893107, 0.878114343, 0.104528703),i)
152
			game:GetService("RunService").RenderStepped:wait()
153
		end
154
		script.Parent = nil
155
function ragdoll()
156
game.Players.LocalPlayer.Character.Archivable = true
157
clone = game.Players.LocalPlayer.Character:Clone()
158
clone.Parent = workspace
159
for i,v in pairs(clone:GetChildren()) do
160
	if v.ClassName == "Script" or v.ClassName == "LocalScript" then
161
		v:destroy()
162
	end
163
	for i,p in pairs(v:GetChildren()) do
164
	if p.ClassName == "Weld" or p.ClassName == "Motor6D" or p.ClassName == "BodyVelocity" then
165
		p:destroy()
166
	end
167
end
168
end
169
for i,t in pairs(game.Players.LocalPlayer.Character:GetChildren()) do
170
	if t.ClassName == "Accessory" or t.ClassName == "ForceField" then
171
		t:destroy()
172
	end
173
end
174
vel = Instance.new("BodyVelocity", clone.Torso)
175
vel.Velocity = clone.Torso.CFrame.lookVector * -5
176
vel.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
177
clone.Head.face.Texture = "http://www.roblox.com/asset/?id=305296807"
178
using = false
179
hit = Instance.new("Sound", clone.Torso)
180
hit.SoundId = "rbxassetid://260430060"
181
hit.Volume = 0
182
hit1 = Instance.new("Sound", clone.Torso)
183
hit1.SoundId = "rbxassetid://138087186"
184
hit1.Volume = 0
185
hit2 = Instance.new("Sound", clone.Torso)
186
hit2.SoundId = "rbxassetid://131237241"
187
hit2.Volume = 0
188
hit3 = Instance.new("Sound", clone.Torso)
189
hit3.SoundId = "rbxassetid://278062209"
190
hit3.Volume = 0
191
hit3.TimePosition = 0.33
192
ded = Instance.new("Sound", clone.Torso)
193
ded.SoundId = "rbxassetid://304679846"
194
ded.Volume = 10
195
local leftarm = clone:findFirstChild("Left Arm")
196
local rightrm = clone:findFirstChild("Right Arm")
197
local leftleg = clone:findFirstChild("Left Leg")
198
local rightleg = clone:findFirstChild("Right Leg")
199
local head = clone:findFirstChild("Head")
200
for i, g in pairs(game.Players.LocalPlayer.Character:GetChildren()) do
201
	if g.ClassName == "Part" then
202
		g:destroy()
203
	end
204
end
205
for i, h in pairs(game.Players.LocalPlayer.Character:GetChildren()) do
206
	if h.ClassName == "Accesory" then
207
		h:destroy()
208
	end
209
end
210
game.Workspace.CurrentCamera.CameraSubject = head
211
if head then
212
            local attachment = Instance.new("Attachment", clone.Head)
213
            attachment.Position = Vector3.new(0, -0.5, 0)
214
            attachment.Name = "lol"
215
            attachment.Visible = false
216
            clone.Torso.NeckAttachment.Visible = false
217
            clone.Torso.NeckAttachment.Position = clone.Torso.NeckAttachment.Position + Vector3.new(0,0,0)
218
            local ball = Instance.new("BallSocketConstraint", clone)
219
            ball.Attachment0 = clone.Torso.NeckAttachment
220
            ball.Attachment1 = attachment
221
			ball.LimitsEnabled = true
222
			ball.TwistLimitsEnabled = true
223
			ball.UpperAngle = 90
224
			ball.Restitution = 0.5
225
			ball.TwistUpperAngle = 90
226
			ball.TwistLowerAngle = -90
227
            local  collidepartofleftleg = Instance.new("Part", clone.Torso)
228
            collidepartofleftleg.Name = "Bone"
229
            collidepartofleftleg.Size = Vector3.new(0.7,0.7,0.7)
230
            collidepartofleftleg.Transparency = 1
231
            collidepartofleftleg:BreakJoints()
232
            local weeld = Instance.new("Weld", collidepartofleftleg)
233
            weeld.Part0 = collidepartofleftleg
234
            weeld.Part1 = clone["Head"]
235
        end
236
if leftleg ~= nil then
237
local glue = Instance.new("Glue", clone.Torso)
238
glue.Part0 = clone.Torso
239
glue.Part1 = leftleg
240
glue.Name = "Left leg"
241
local collider = Instance.new("Part", leftleg)
242
collider.Position = Vector3.new(0,999,0)
243
collider.Size = Vector3.new(1.5, 1, 1)
244
collider.Shape = "Cylinder"
245
local weld = Instance.new("Weld", collider)
246
weld.Part0 = leftleg
247
weld.Part1 = collider
248
weld.C0 = CFrame.new(0,-0.2,0) * CFrame.fromEulerAnglesXYZ(0, 0, math.pi/2)
249
collider.TopSurface = "Smooth"
250
collider.BottomSurface = "Smooth"
251
collider.formFactor = "Symmetric"
252
glue.C0 = CFrame.new(-0.5, -1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
253
glue.C1 = CFrame.new(-0, 1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
254
collider.Transparency = 1
255
end
256
------------
257
if rightleg ~= nil then
258
local glue1 = Instance.new("Glue", clone.Torso)
259
glue1.Part0 = clone.Torso
260
glue1.Part1 = rightleg
261
glue1.Name = "Right leg"
262
local collider1 = Instance.new("Part", rightleg)
263
collider1.Position = Vector3.new(0,999,0)
264
collider1.Size = Vector3.new(1.5, 1, 1)
265
collider1.Shape = "Cylinder"
266
local weld1 = Instance.new("Weld", collider1)
267
weld1.Part0 = rightleg
268
weld1.Part1 = collider1
269
weld1.C0 = CFrame.new(0,-0.2,0) * CFrame.fromEulerAnglesXYZ(0, 0, math.pi/2)
270
collider1.TopSurface = "Smooth"
271
collider1.BottomSurface = "Smooth"
272
collider1.formFactor = "Symmetric"
273
glue1.C0 = CFrame.new(0.5, -1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
274
glue1.C1 = CFrame.new(0, 1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
275
collider1.Transparency = 1
276
end
277
------------
278
if rightrm ~= nil then
279
local glue11 = Instance.new("Glue", clone.Torso)
280
glue11.Part0 = clone.Torso
281
glue11.Part1 = rightrm
282
glue11.Name = "Right shoulder"
283
local collider11 = Instance.new("Part", rightrm)
284
collider11.Position = Vector3.new(0,9999,0)
285
collider11.Size = Vector3.new(1.5,1,1)
286
collider11.Shape = "Cylinder"
287
local weld11 = Instance.new("Weld", collider11)
288
weld11.Part0 = rightrm
289
weld11.Part1 = collider11
290
weld11.C0 = CFrame.new(0,-0.2,0) * CFrame.fromEulerAnglesXYZ(0, 0, math.pi/2)
291
collider11.TopSurface = "Smooth"
292
collider11.BottomSurface = "Smooth"
293
collider11.formFactor = "Symmetric"
294
glue11.C0 = CFrame.new(1.5, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
295
glue11.C1 = CFrame.new(0, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
296
collider11.Transparency = 1
297
end
298
------------
299
if leftarm ~= nil then
300
local glue111 = Instance.new("Glue", clone.Torso)
301
glue111.Part0 = clone.Torso
302
glue111.Part1 = leftarm
303
glue111.Name = "Left shoulder"
304
local collider111 = Instance.new("Part", leftarm)
305
collider111.Position = Vector3.new(0,9999,0)
306
collider111.Size = Vector3.new(1.5,1,1)
307
collider111.Shape = "Cylinder"
308
local weld111 = Instance.new("Weld", collider111)
309
weld111.Part0 = leftarm
310
weld111.Part1 = collider111
311
weld111.C0 = CFrame.new(0,-0.2,0) * CFrame.fromEulerAnglesXYZ(0, 0, math.pi/2)
312
collider111.TopSurface = "Smooth"
313
collider111.BottomSurface = "Smooth"
314
collider111.formFactor = "Symmetric"
315
glue111.C0 = CFrame.new(-1.5, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
316
glue111.C1 = CFrame.new(0, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
317
collider111.Transparency = 1
318
----------------
319
sensoring = Instance.new("Part", clone.Torso)
320
sensoring.Size = Vector3.new(1.2,1.1,0.8)
321
sensoring.CanCollide = false
322
sensoring.Position = clone.Torso.Position
323
local welder = Instance.new("Weld", sensoring)
324
welder.Part0 = clone.Torso
325
welder.Part1 = sensoring
326
welder.C0 = welder.C0 * CFrame.new(0,0,1.05)
327
sensoring.Transparency = 1
328
-----------------
329
sensoring1 = Instance.new("Part", clone.Torso)
330
sensoring1.Size = Vector3.new(1.2,1.1,0.8)
331
sensoring1.CanCollide = false
332
sensoring1.Position = clone.Torso.Position
333
local welder1 = Instance.new("Weld", sensoring)
334
welder1.Part0 = clone.Torso
335
welder1.Part1 = sensoring1
336
welder1.C0 = welder1.C0 * CFrame.new(0,0,-1.05)
337
sensoring1.Transparency = 1
338
end
339
clone.Name = game.Players.LocalPlayer.Character.Name.." (Suicide)"
340
ded:Play()
341
vel:destroy()
342
wait(0.5)
343
local function touch()
344
	if not using then
345
		using = true
346
		local Math = math.random(1,4)
347
		if Math == 1 then
348
			hit:Play()
349
		end
350
		if Math == 2 then
351
			hit1:Play()
352
		end
353
		if Math == 3 then
354
			hit2:Play()
355
		end
356
		if Math == 4 then
357
			hit3:Play()
358
		end
359
		wait(0.1)
360
		using = false
361
	end
362
end
363
sensoring.Touched:connect(touch)
364
sensoring1.Touched:connect(touch)
365
while true do
366
	clone.Head.CanCollide = false
367
	game:GetService("RunService").Stepped:wait()
368
end
369
end
370
371
game.Players.LocalPlayer.Character.Humanoid.Died:connect(ragdoll)
372
373
--di ent
374
game.Players.LocalPlayer.Character.Humanoid.Health = 0
375
	end
376
end
377
mouse.Button1Down:connect(killyourself)