View difference between Paste ID: nAUHBBpk and 21c6zBGp
SHOW: | | - or go back to the newest paste.
1
if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
2
local Player,Mouse,mouse,UserInputService,ContextActionService = owner
3
do
4
	print("FE Compatibility code by Mokiros | Translated to FE by iPxter")
5
	script.Parent = Player.Character
6
7
	--RemoteEvent for communicating
8
	local Event = Instance.new("RemoteEvent")
9
	Event.Name = "UserInput_Event"
10
11
	--Fake event to make stuff like Mouse.KeyDown work
12
	local function fakeEvent()
13
		local t = {_fakeEvent=true,Connect=function(self,f)self.Function=f end}
14
		t.connect = t.Connect
15
		return t
16
	end
17
18
	--Creating fake input objects with fake variables
19
    local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
20
	local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
21
	local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
22
		CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
23
	end}
24
	--Merged 2 functions into one by checking amount of arguments
25
	CAS.UnbindAction = CAS.BindAction
26
27
	--This function will trigger the events that have been :Connect()'ed
28
	local function te(self,ev,...)
29
		local t = m[ev]
30
		if t and t._fakeEvent and t.Function then
31
			t.Function(...)
32
		end
33
	end
34
	m.TrigEvent = te
35
	UIS.TrigEvent = te
36
37
	Event.OnServerEvent:Connect(function(plr,io)
38
	    if plr~=Player then return end
39
		if io.isMouse then
40
			m.Target = io.Target
41
			m.Hit = io.Hit
42
		else
43
			local b = io.UserInputState == Enum.UserInputState.Begin
44
			if io.UserInputType == Enum.UserInputType.MouseButton1 then
45
				return m:TrigEvent(b and "Button1Down" or "Button1Up")
46
			end
47
			for _,t in pairs(CAS.Actions) do
48
				for _,k in pairs(t.Keys) do
49
					if k==io.KeyCode then
50
						t.Function(t.Name,io.UserInputState,io)
51
					end
52
				end
53
			end
54
			m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
55
			UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
56
	    end
57
	end)
58
	Event.Parent = NLS([==[
59
	local Player = game:GetService("Players").LocalPlayer
60
	local Event = script:WaitForChild("UserInput_Event")
61
62
	local UIS = game:GetService("UserInputService")
63
	local input = function(io,a)
64
		if a then return end
65
		--Since InputObject is a client-side instance, we create and pass table instead
66
		Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState})
67
	end
68
	UIS.InputBegan:Connect(input)
69
	UIS.InputEnded:Connect(input)
70
71
	local Mouse = Player:GetMouse()
72
	local h,t
73
	--Give the server mouse data 30 times every second, but only if the values changed
74
	--If player is not moving their mouse, client won't fire events
75
	while wait(1/30) do
76
		if h~=Mouse.Hit or t~=Mouse.Target then
77
			h,t=Mouse.Hit,Mouse.Target
78
			Event:FireServer({isMouse=true,Target=t,Hit=h})
79
		end
80
	end]==],Player.Character)
81
	Mouse,mouse,UserInputService,ContextActionService = m,m,UIS,CAS
82
end
83
	function()
84
			local plr = game:GetService("Players").LocalPlayer
85
			local deb = false
86
87
			while not plr.Character do wait() end
88
			wait(0.1)
89
90
			warn("Timestop loaded. R to toggle time.")
91
92
			local tstab = {}
93
			local tsstab = {}
94
			local ignlist = {}
95
			local stab = {}
96
97
			function plrIgnore(char)
98
				for i,v in pairs(char:GetChildren()) do
99
					if #v:GetChildren() >= 1 then
100
						plrIgnore(v)
101
					end
102
					table.insert(ignlist,v)
103
				end
104
			end
105
106
			function timeStop(target)
107
				for i,v in pairs(target:GetChildren()) do
108
					if #v:GetChildren() >= 1 then
109
						timeStop(v)
110
					end
111
					local isinign = false
112
					for i,b in pairs(ignlist) do
113
						if b == v then
114
							isinign = true
115
						end
116
					end
117
					if isinign == false then
118
						if v:IsA("Part") or v:IsA("WedgePart") or v:IsA("UnionOperation") then
119
							if v.Anchored == false then
120
								table.insert(tstab,v)
121
								v.Anchored = true
122
							end
123
						end
124
						if v:IsA("Sound") then
125
			                                local isintab = false
126
			                                for i,b in pairs(stab) do
127
			                                        if v == b[1] then
128
			                                                isintab = true
129
			                                        end
130
			                                end
131
			                                if isintab == false then
132
							        table.insert(stab,{v,v.Pitch})
133
			                                end
134
						end
135
						--[[if v:IsA("Script") or v:IsA("LocalScript") then
136
							if v.Disabled == false then
137
								table.insert(tsstab,v)
138
								v.Disabled = true
139
							end
140
						end]]
141
					end
142
				end
143
				local isinign = false
144
				for i,b in pairs(ignlist) do
145
					if b == target then
146
						isinign = true
147
					end
148
				end
149
				if isinign == false then
150
					if target:IsA("Part") or target:IsA("WedgePart") or target:IsA("UnionOperation") then
151
						if target.Anchored == false then
152
							table.insert(tstab,target)
153
							target.Anchored = true
154
						end
155
					end
156
					if target:IsA("Sound") then
157
						table.insert(stab,{target,target.Pitch})
158
					end
159
				end
160
			end
161
162
			plr:GetMouse().KeyDown:connect(function(key)
163
				if key == "r" then
164
					if deb == true then
165
						deb = false
166
					else
167
						deb = true
168
						local cc = Instance.new("ColorCorrectionEffect",game:GetService("Lighting"))
169
						spawn(function()
170
							plr.Character.Humanoid.WalkSpeed = 0
171
							plr.Character.Humanoid.JumpPower = 0
172
							local p = Instance.new("Part",plr.Character)
173
							p.Transparency = 0.5
174
							p.BrickColor = BrickColor.new("Institutional white")
175
							p.Size = Vector3.new(0.2,0.2,0.2)
176
							p.Anchored = true
177
							p.CanCollide = false
178
							p.CFrame = plr.Character.Torso.CFrame
179
							local m = Instance.new("SpecialMesh",p)
180
							m.MeshType = Enum.MeshType.Sphere
181
							
182
							local r = 255
183
							local g = 255
184
							local b = 255
185
							local contrast = 0
186
							
187
							for i=1,50 do
188
								m.Scale = m.Scale + Vector3.new(50,50,50)
189
								p.Transparency = p.Transparency + 0.5/50
190
								r = r - ((255-42)/50)
191
								g = g - ((255-0)/50)
192
								b = b - ((255-255)/50)
193
								contrast = contrast - 2/50
194
								--cc.TintColor = Color3.fromRGB(r,g,b)
195
								cc.Contrast = contrast
196
								for i,v in pairs(stab) do
197
									v[1].Pitch = v[1].Pitch - (v[2]/50)
198
								end
199
								wait()
200
							end
201
							p:Destroy()
202
							plr.Character.Humanoid.WalkSpeed = 16
203
							plr.Character.Humanoid.JumpPower = 50
204
						end)
205
						
206
						local aNew = game:GetService("Workspace").ChildAdded:connect(function(c)
207
							timeStop(c)
208
						end)
209
						
210
						for i,v in pairs(ignlist) do
211
							table.remove(ignlist,1)
212
						end
213
						plrIgnore(plr.Character)
214
						timeStop(game:GetService("Workspace"))
215
						while deb ~= false do wait() end
216
						--spawn(function()
217
							local r = 42
218
							local g = 0
219
							local b = 255
220
							local contrast = -2
221
							for i=1,50 do
222
								r = r + ((255-42)/50)
223
								g = g + ((255-0)/50)
224
								b = b + ((255-255)/50)
225
								contrast = contrast + 2/50
226
								--cc.TintColor = Color3.fromRGB(r,g,b)
227
								cc.Contrast = contrast
228
								for i,v in pairs(stab) do
229
									v[1].Pitch = v[1].Pitch + (v[2]/50)
230
								end
231
								wait()
232
							end
233
							cc:Destroy()
234
						--end)
235
						for i,v in pairs(tstab) do
236
							v.Anchored = false
237
						end
238
						for i,v in pairs(tstab) do
239
							table.remove(tstab,1)
240
						end
241
						--table.foreach(stab,print)
242
						for i,v in pairs(stab) do
243
							table.remove(stab,1)
244
						end
245
						--print("---------")
246
						--table.foreach(stab,print)
247
						--[[for i,v in pairs(tsstab) do
248
							v.Disabled = false
249
						end
250
						for i,v in pairs(tsstab) do
251
							table.remove(tsstab,1)
252
						end]]
253
						aNew:disconnect()
254
						deb = false
255
					end
256
				end
257
			end)
258
		end
259
	},
260
	{
261
		"Egg",
262
		function()
263
			wait(3)
264
265
			local plr = game:GetService("Players").LocalPlayer
266
267
			while not plr.Character do wait() end
268
269
			local char,jtab,ceqpt,bsy,isaim,cd,drawf,state = plr.Character,{},false,false,false,false,false,"loading"
270
271
			local hdp = Instance.new("Part",script.Parent)
272
			hdp.Name = "HandlePart"
273
			hdp.Size = Vector3.new(0.2,0.2,0.2)
274
275
			local meshTab = {
276
				{"rbxassetid://705224299","rbxassetid://705224727",Vector3.new(0.4,0.4,0.4)},
277
				{"rbxassetid://705216303","rbxassetid://705216927",Vector3.new(1.8,1.8,1.8)},
278
				{"rbxassetid://705209239","rbxassetid://705209459",Vector3.new(0.8,0.8,0.8)},
279
				{"rbxassetid://705247407","rbxassetid://705246950",Vector3.new(1,1,1)},
280
				{"rbxassetid://705242967","rbxassetid://705243300",Vector3.new(0.44,0.44,0.44)},
281
				{"rbxassetid://705197095","rbxassetid://705197292",Vector3.new(1.25,1.25,1.25)},
282
				{"rbxassetid://676836968","rbxassetid://676837441",Vector3.new(0.5,0.5,0.5)},
283
				{"rbxassetid://698838167","rbxassetid://698838688",Vector3.new(1.6,1.6,1.6)},
284
				{"rbxassetid://698827858","rbxassetid://698828143",Vector3.new(1.4,1.4,1.5)},
285
				{"rbxassetid://705202806","rbxassetid://705207716",Vector3.new(1,1,1)},
286
				{"rbxassetid://676840078","rbxassetid://676839351",Vector3.new(1.2,1.2,1.2)},
287
				{"rbxassetid://717179708","rbxassetid://705199414",Vector3.new(1,0.95,1.05)},
288
				{"rbxassetid://724420662","rbxassetid://705195915",Vector3.new(0.8,0.8,0.8)},
289
				{"rbxassetid://676841945","rbxassetid://676842522",Vector3.new(1.7,1.7,1.8)},
290
				{"rbxassetid://705315624","rbxassetid://705315897",Vector3.new(0.4,0.4,0.4)},
291
				{"rbxassetid://698835993","rbxassetid://698836260",Vector3.new(1,1,1)},
292
				{"rbxassetid://698813624","rbxassetid://698813905",Vector3.new(1.6,1.6,1.6)},
293
				{"rbxassetid://706712283","rbxassetid://705202233",Vector3.new(2.1,2.1,2.1)},
294
				{"rbxassetid://705208513","rbxassetid://705208760",Vector3.new(1.05,1.05,1.05)},
295
				{"rbxassetid://676843975","rbxassetid://676844191",Vector3.new(1.6,1.6,1.6)},
296
				{"rbxassetid://676846031","rbxassetid://676846800",Vector3.new(0.6,0.6,0.6)},
297
				{"rbxassetid://676848204","rbxassetid://676848680",Vector3.new(0.5,0.5,0.5)},
298
				{"rbxassetid://705217565","rbxassetid://705218075",Vector3.new(1,1,1)},
299
				{"rbxassetid://698829950","rbxassetid://698830608",Vector3.new(0.5,0.5,0.5)},
300
				{"rbxassetid://705200619","rbxassetid://705200948",Vector3.new(2,2,2)},
301
				{"rbxassetid://698816291","rbxassetid://698816601",Vector3.new(0.45,0.45,0.45)},
302
				{"rbxassetid://705245424","rbxassetid://705245604",Vector3.new(1,1,1)},
303
				{"rbxassetid://698839252","rbxassetid://698839539",Vector3.new(1.5,1.55,1.55)},
304
				{"rbxassetid://676850168","rbxassetid://676850427",Vector3.new(1,1,1)},
305
				{"rbxassetid://698836963","rbxassetid://698837211",Vector3.new(2.3,2,2)},
306
				{"rbxassetid://705219281","rbxassetid://705219747",Vector3.new(1.7,1.7,1.7)},
307
				{"rbxassetid://698822829","rbxassetid://698823375",Vector3.new(1.5,1.5,1.5)},
308
				{"rbxassetid://698824115","rbxassetid://698824851",Vector3.new(2.4,2.4,2.4)},
309
				{"rbxassetid://698825712","rbxassetid://698825959",Vector3.new(1.5,1.5,1.5)},
310
				{"rbxassetid://676851481","rbxassetid://676851716",Vector3.new(1,1,1)},
311
				{"rbxassetid://676854360","rbxassetid://676854795",Vector3.new(0.55,0.55,0.55)},
312
				{"rbxassetid://676856626","rbxassetid://676856930",Vector3.new(0.6,0.6,0.6)},
313
				{"rbxassetid://676858618","rbxassetid://676858897",Vector3.new(1.4,1.4,1.4)},
314
				{"rbxassetid://698835348","rbxassetid://698831630",Vector3.new(1.8,1.8,1.8)},
315
				{"rbxassetid://676859903","rbxassetid://676860203",Vector3.new(1.2,1.2,1.2)},
316
				{"rbxassetid://698829304","rbxassetid://698828946",Vector3.new(1.3,1.3,1.3)},
317
				{"rbxassetid://698811815","rbxassetid://698812183",Vector3.new(1,1,1)},
318
				{"rbxassetid://705225654","rbxassetid://705228740",Vector3.new(1,1,1)}
319
			}
320
321
			local mlgTab = {
322
				"rbxassetid://566672836",
323
				"rbxassetid://306356119",
324
				"rbxassetid://10524802",
325
				"rbxassetid://166285971",
326
				"rbxassetid://217185480",
327
				"rbxassetid://198329363",
328
				"rbxassetid://286279066",
329
				"rbxassetid://175843771",
330
				"rbxassetid://165053954",
331
				"rbxassetid://603718340",
332
				"rbxassetid://133727996"
333
			}
334
335
			local msh = Instance.new("SpecialMesh",script.Parent.HandlePart)
336
			msh.MeshType = Enum.MeshType.FileMesh
337
			local rnd = math.random(1,#meshTab)
338
			msh.MeshId = meshTab[rnd][1]
339
			msh.TextureId = meshTab[rnd][2]
340
			msh.Scale = meshTab[rnd][3]/2
341
342
			local gyro = Instance.new("BodyGyro",char:WaitForChild("HumanoidRootPart"))
343
			gyro.MaxTorque = Vector3.new(0,0,0)
344
			gyro.D = 0
345
			gyro.P = 100000000
346
347
			print(script.Parent.Name.." Loaded.")
348
349
			plr:GetMouse().KeyDown:connect(function(key)
350
				if key == "f" then
351
					if ceqpt == false then
352
						ceqpt = true
353
						bsy = false
354
						
355
						spawn(function()
356
							for i=1,10 do
357
								script.Parent.HandlePart.Transparency = script.Parent.HandlePart.Transparency - 0.1
358
								wait()
359
							end
360
						end)
361
						local rnd = math.random(1,#meshTab)
362
						msh.MeshId = meshTab[rnd][1]
363
						msh.TextureId = meshTab[rnd][2]
364
						msh.Scale = meshTab[rnd][3]/2
365
						
366
						print("Saving old joints")
367
						for i,v in pairs(char.Torso:GetChildren()) do
368
							if v:IsA("Motor6D") and v.Name ~= "Neck" then
369
								print(v.Name.." saved!")
370
								table.insert(jtab,v)
371
							end
372
						end
373
						
374
						local aWeld = Instance.new("Weld",char["Right Arm"])
375
						aWeld.Name = "aWeld"
376
						aWeld.Part0 = script.Parent.HandlePart
377
						aWeld.Part1 = char["Right Arm"]
378
						aWeld.C0 = CFrame.new(0,0,1)*CFrame.Angles(math.rad(90),math.rad(0),math.rad(0))
379
						
380
						local bWeld = Instance.new("Weld",char["Torso"])
381
						bWeld.Name = "bWeld"
382
						bWeld.Part0 = char["Torso"]
383
						bWeld.Part1 = char["Right Arm"]
384
						bWeld.C0 = CFrame.new(1.5,0,0)*CFrame.Angles(math.rad(0),math.rad(0),math.rad(0))
385
						
386
						local cWeld = Instance.new("Weld",char["Torso"])
387
						cWeld.Name = "cWeld"
388
						cWeld.Part0 = char["Torso"]
389
						cWeld.Part1 = char["Left Arm"]
390
						cWeld.C0 = CFrame.new(-1.5,0,0)*CFrame.Angles(math.rad(0),math.rad(0),math.rad(0))
391
392
					else
393
394
						ceqpt = false
395
						spawn(function()
396
							for i=1,10 do
397
								script.Parent.HandlePart.Transparency = script.Parent.HandlePart.Transparency + 0.1
398
								wait()
399
							end
400
						end)
401
						for i,v in pairs(char.Torso:GetChildren()) do
402
							if v:IsA("Weld") or v:IsA("Motor6D") then
403
								if v.Name ~= "Neck" then
404
									v:Destroy()
405
								end
406
							end
407
						end
408
						for i,v in pairs(jtab) do
409
							v:Clone().Parent = char.Torso
410
						end
411
						for i,v in pairs(jtab) do
412
							table.remove(jtab,1)
413
						end
414
						
415
						char.HumanoidRootPart.RootJoint.C0 = CFrame.new(0,0,0)*CFrame.Angles(math.rad(-90),math.rad(0),math.rad(180))
416
						gyro.MaxTorque = Vector3.new(0,0,0)
417
						char.Torso.Neck.C0 = CFrame.new(0,1,0)*CFrame.Angles(math.rad(-90),math.rad(0),math.rad(180))
418
					end
419
			    end
420
			end)