View difference between Paste ID: LVKB0V90 and AC7Bm2RN
SHOW: | | - or go back to the newest paste.
1-
plr = game.Players.Darxiuss
1+
if game:GetService("RunService"):IsClient()then error("Please run as a server script. Use h/ instead of hl/.")end;print("FE Compatibility: by WaverlyCole");InternalData = {}
2
do
3
	script.Parent = owner.Character
4
	local Event = Instance.new("RemoteEvent");Event.Name = "UserInput"
5
	local function NewFakeEvent()
6
		local Bind = Instance.new("BindableEvent")
7
		local Fake;Fake = {Connections = {},
8
		fakeEvent=true;
9
		Connect=function(self,Func)
10
			Bind.Event:connect(Func)
11
			self.Connections[Bind] = true
12
			return setmetatable({Connected = true},{
13
			__index = function (self,Index)
14
				if Index:lower() == "disconnect" then
15
					return function() Fake.Connections[Bind] = false;self.Connected = false end
16
				end
17
				return Fake[Index]
18
			end;
19
			__tostring = function() return "Connection" end;
20
		})
21
		end}
22
		Fake.connect = Fake.Connect;return Fake;
23
	end
24
	local Mouse = {Target=nil,Hit=CFrame.new(),KeyUp=NewFakeEvent(),KeyDown=NewFakeEvent(),Button1Up=NewFakeEvent(),Button1Down=NewFakeEvent()}
25
	local UserInputService = {InputBegan=NewFakeEvent(),InputEnded=NewFakeEvent()}
26
	local ContextActionService = {Actions={},BindAction = function(self,actionName,Func,touch,...)
27
		self.Actions[actionName] = Func and {Name=actionName,Function=Func,Keys={...}} or nil
28
	end};ContextActionService.UnBindAction = ContextActionService.BindAction
29
	local function TriggerEvent(self,Event,...)
30
		local Trigger = Mouse[Event]
31
		if Trigger and Trigger.fakeEvent and Trigger.Connections then
32
			for Connection,Active in pairs(Trigger.Connections) do if Active then Connection:Fire(...) end end
33
		end
34
	end
35
	Mouse.TrigEvent = TriggerEvent;UserInputService.TrigEvent = TriggerEvent
36
	Event.OnServerEvent:Connect(function(FiredBy,Input)
37
		if FiredBy.Name ~= owner.Name then return end
38
		if Input.MouseEvent then
39
			Mouse.Target = Input.Target;Mouse.Hit = Input.Hit
40
		else
41
			local Begin = Input.UserInputState == Enum.UserInputState.Begin
42
			if Input.UserInputType == Enum.UserInputType.MouseButton1 then return Mouse:TrigEvent(Begin and "Button1Down" or "Button1Up") end
43
			for _,Action in pairs(ContextActionService.Actions) do
44
				for _,Key in pairs(Action.Keys) do if Key==Input.KeyCode then Action.Function(Action.Name,Input.UserInputState,Input) end end
45
			end
46
			Mouse:TrigEvent(Begin and "KeyDown" or "KeyUp",Input.KeyCode.Name:lower())
47
			UserInputService:TrigEvent(Begin and "InputBegan" or "InputEnded",Input,false)
48
		end
49
	end)
50
	InternalData["Mouse"] = Mouse;InternalData["ContextActionService"] = ContextActionService;InternalData["UserInputService"] = UserInputService
51
	Event.Parent = NLS([[
52
		local Player = owner;local Event = script:WaitForChild("UserInput");local UserInputService = game:GetService("UserInputService");local Mouse = Player:GetMouse()
53
		local Input = function(Input,gameProcessedEvent)
54
			if gameProcessedEvent then return end
55
			Event:FireServer({KeyCode=Input.KeyCode,UserInputType=Input.UserInputType,UserInputState=Input.UserInputState})
56
		end
57
		UserInputService.InputBegan:Connect(Input);UserInputService.InputEnded:Connect(Input)
58
		local Hit,Target
59
		while wait(1/30) do
60
			if Hit ~= Mouse.Hit or Target ~= Mouse.Target then
61
				Hit,Target = Mouse.Hit,Mouse.Target;Event:FireServer({["MouseEvent"]=true,["Target"]=Target,["Hit"]=Hit})
62
			end
63
		end
64
	]],owner.Character)
65
end
66
RealGame = game;game = setmetatable({},{
67
	__index = function (self,Index)
68
		local Sandbox = function (Thing)
69
			if Thing:IsA("Player") then
70
				local RealPlayer = Thing
71
				return setmetatable({},{
72
					__index = function (self,Index)
73
						local Type = type(RealPlayer[Index])
74
						if Type == "function" then
75
							if Index:lower() == "getmouse" or Index:lower() == "mouse" then
76
								return function (self)return InternalData["Mouse"] end
77
							end
78
							return function (self,...)return RealPlayer[Index](RealPlayer,...) end
79
						end
80
						return RealPlayer[Index]
81
					end;
82
					__tostring = function(self) return RealPlayer.Name end
83
				})
84
			end
85
		end
86
		if RealGame[Index] then
87
			local Type = type(RealGame[Index])
88
			if Type == "function" then
89
				if Index:lower() == "getservice" or Index:lower() == "service" then
90
					return function (self,Service)
91
						local FakeServices = {
92
							["players"] = function()
93
								return setmetatable({},{
94
									__index = function (self2,Index2)
95
										local RealService = RealGame:GetService(Service)
96
										local Type2 = type(Index2)
97
										if Type2 == "function" then
98
											return function (self,...) return RealService[Index2](RealService,...)end
99
										else
100
											if Index2:lower() == "localplayer" then return Sandbox(owner) end
101
											return RealService[Index2]
102
										end
103
									end;
104
									__tostring = function(self) return RealGame:GetService(Service).Name end
105
								})
106
							end;
107
							["contextactionservice"] = function() return InternalData["ContextActionService"] end;
108
							["userinputservice"] = function() return InternalData["UserInputService"] end;
109
							["runservice"] = function()
110
								return setmetatable({},{
111
									__index = function(self2,Index2)
112
										local RealService = RealGame:GetService(Service)
113
										local Type2 = type(Index2)
114
										if Type2 == "function" then
115
											return function (self,...) return RealService[Index2](RealService,...) end
116
										else
117
											local RunServices = {
118
												["bindtorenderstep"] = function() return function (self,Name,Priority,Function) return RealGame:GetService("RunService").Stepped:Connect(Function) end end;
119
												["renderstepped"] = function() return RealService["Stepped"] end
120
											}
121
											if RunServices[Index2:lower()] then return RunServices[Index2:lower()]() end
122
											return RealService[Index2]
123
										end
124
									end
125
								})
126
							end
127
						}
128
						if FakeServices[Service:lower()] then return FakeServices[Service:lower()]() end
129
						return RealGame:GetService(Service)
130
					end
131
				end
132
				return function (self,...) return RealGame[Index](RealGame,...) end
133
			else
134
				if game:GetService(Index) then return game:GetService(Index) end
135
				return RealGame[Index]
136
			end
137
		end
138
		return nil
139
	end
140
});Game = game;owner = game:GetService("Players").LocalPlayer;script = Instance.new("Script");print("Complete! Running...")
141
142
plr = game.Players.LocalPlayer
143
mouse = plr:GetMouse()
144
part = nil
145
bp = nil
146
particles = nil
147
function clerp(a,b,c,d)
148
	for i = 0,d,.01 do
149
		a.CFrame = CFrame.new(b:lerp(c,i))
150
		wait()
151
	end
152
end
153
function slerp(a2,b2,c2,d2)
154
	for i2 = 0,d2,.01 do
155
		a2.CFrame = CFrame.new(b2:lerp(c2,i2))
156
		wait()
157
	end
158
end
159
mouse.KeyDown:connect(function(key)
160
	if key == "e" and plr.Character.Parent == workspace then
161
		plr.Character.Parent = workspace.Camera
162
		plr.Character.Archivable = true
163
		Instance.new("ForceField",plr.Character).Visible = false
164
		for y,t in pairs(plr.Character:GetChildren()) do
165
			if t:IsA("Part") and t.Name ~= "HumanoidRootPart" then
166
				t.Transparency = 1
167
				if t.Name == "Head" and t:FindFirstChild("face") then
168
					t.face.Transparency = 1
169
				end
170
			elseif t:IsA("Accessory") and t:FindFirstChild("Handle") then
171
				t.Handle.Transparency = 1
172
			end
173
		end
174
	elseif key == "z" and plr.Character.Parent == workspace.Camera and part == nil then
175
		plr.Character.Torso.CFrame = CFrame.new(Vector3.new(mouse.hit.p.X,mouse.hit.p.Y+1.5,mouse.hit.p.Z),plr.Character.Torso.CFrame.p)
176
	elseif key == "x" and plr.Character.Parent == workspace.Camera and part == nil then
177
		if plr.Character.Torso.Anchored == true then
178
			for y,t in pairs(plr.Character:GetChildren()) do
179
				if t:IsA("Part") then
180
					t.Anchored = false
181
				end
182
			end
183
		else
184
			for y,t in pairs(plr.Character:GetChildren()) do
185
				if t:IsA("Part") then
186
					t.Anchored = true
187
				end
188
			end
189
		end
190
	elseif key == "c" and plr.Character.Parent == workspace.Camera and part ~= nil then
191
		local clone = part:Clone()
192
		clone.Parent = workspace
193
		clone.Anchored = false
194
		clone:ClearAllChildren()
195
		clone.CanCollide = true
196
		bp.Parent = clone
197
		particles.Parent = clone
198
		if part.Parent:FindFirstChildOfClass("Humanoid") then
199
			part.Parent:FindFirstChildOfClass("Humanoid").PlatformStand = false
200
		end
201
		part:Destroy()
202
		part = clone
203
	elseif key == "t" and plr.Character.Parent == workspace.Camera and part == nil then
204
		plr.Character.Parent = workspace
205
		plr.Character.Archivable = false
206
		plr.Character:FindFirstChildOfClass("ForceField"):Remove()
207
		for y,t in pairs(plr.Character:GetChildren()) do
208
			if t:IsA("Part") and t.Name ~= "HumanoidRootPart" then
209
				t.Transparency = 0
210
				if t.Name == "Head" and t:FindFirstChild("face") then
211
					t.face.Transparency = 0
212
				end
213
			elseif t:IsA("Accessory") and t:FindFirstChild("Handle") then
214
				t.Handle.Transparency = 0
215
			end
216
		end
217
	end
218
end)
219
mouse.Button1Down:connect(function()
220
	if plr.Character.Parent == workspace.Camera then
221
		if mouse ~= nil then
222
			if mouse.Target ~= nil then
223
				part = mouse.Target
224
				bp = Instance.new("BodyPosition",part)
225
				bp.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
226
				bp.Position = part.Position
227
				particles = Instance.new("ParticleEmitter",part)
228
				particles.Color = ColorSequence.new(Color3.new(0,0,0))
229
				particles.Size = NumberSequence.new(1)
230
				particles.Texture = "rbxassetid://292289455"
231
				particles.VelocitySpread = 360
232
				particles.Speed = NumberRange.new(0)
233
				particles.RotSpeed = NumberRange.new(0)
234
				particles.Rotation = NumberRange.new(0)
235
				particles.Rate = 250
236
				particles.Lifetime = NumberRange.new(.2,.4)
237
				particles.Transparency = NumberSequence.new({NumberSequenceKeypoint.new(0,1,0),NumberSequenceKeypoint.new(.12,.688,0),NumberSequenceKeypoint.new(.891,.887,0),NumberSequenceKeypoint.new(1,1,0)})
238
				dwn = true
239
			end
240
		end
241
		while dwn == true do 
242
			wait()	
243
			bp.Position = mouse.hit.p
244
			if part then
245
				if part.Parent:FindFirstChildOfClass("Humanoid") then
246
					part.Parent:FindFirstChildOfClass("Humanoid").PlatformStand = true
247
				end
248
			end
249
		end
250
	end
251
end)
252
mouse.Button1Up:connect(function()
253
	dwn = false
254
	if part then if part.Parent:FindFirstChildOfClass("Humanoid") then part.Parent:FindFirstChildOfClass("Humanoid").PlatformStand = false end part = nil end
255
	if bp then bp:Destroy() end
256
	if particles then particles:Destroy() end
257
end)
258
base = Instance.new("ScreenGui",plr.PlayerGui)
259
bbg = Instance.new("BillboardGui",plr.Character.Head)
260
bbg.Size = UDim2.new(0,200,0,50)
261
bbg.StudsOffset = Vector3.new(0,3,0)
262
bbgTl = Instance.new("TextLabel",bbg)
263
bbgTl.BackgroundTransparency = 1
264
bbgTl.Size = UDim2.new(10,0,1,0)
265
bbgTl.Position = UDim2.new(-4.5,0,0,0)
266
bbgTl.Font = "Code"
267
bbgTl.Text = " "
268
bbgTl.TextSize = 25
269
bbgTl.TextStrokeColor3 = Color3.new(1,1,1)
270
bbgTl.TextColor3 = Color3.new(0,0,0)
271
bbgTl.TextStrokeTransparency = 0
272
bbgTl.TextWrapped = true
273
plr.Chatted:connect(function(msg)
274
	bbgTl.Text = msg
275
	wait(5)
276
	if bbgTl.Text == msg then
277
		bbgTl.Text = " "
278
	end
279
end)
280
touchCounter = 0
281
while wait() do
282
	if plr.Character.Parent == workspace.Camera then
283
		local c = plr.Character:Clone()
284
		c:MakeJoints()
285
		for y,t in pairs(c:GetChildren()) do
286
			if t:IsA("Part") then
287
				t.CanCollide = false 
288
				t.Anchored = true 
289
				t.Transparency = .5
290
				t.TopSurface = "Smooth"
291
				t.BottomSurface = "Smooth"
292
				t.RightSurface = "Smooth"
293
				t.LeftSurface = "Smooth"
294
				t.FrontSurface = "Smooth"
295
				t.BackSurface = "Smooth"
296
				t.BrickColor = BrickColor.new("Really black")
297
				if t.Name == "Head" and t:FindFirstChild("face") then
298
					t.face:Remove()
299
				elseif t.Name == "Torso" and t:FindFirstChild("roblox") then
300
					t.roblox:Remove()
301
				elseif t.Name == "HumanoidRootPart" then
302
					t:Remove()
303
				end
304
			else 
305
				t:Remove()
306
			end
307
		end
308
		c.Parent = workspace
309
		game.Debris:AddItem(c,.05)
310
	end
311
end