View difference between Paste ID: k9BTyq58 and gxN8pzgK
SHOW: | | - or go back to the newest paste.
1-
----- Idiot Script
1+
2-
-- Created by: GODZILLAGAMERZ13. 
2+
3-
--(THIS IS MY 1ST SCRIPT THAT'S NOT AN EDIT, A GUI, OR A CONVERTED SCRIPT!)
3+
4
5
local RealPlayer = Player
6
7
do
8
9
	print("FE Compatibility code V2 by Mokiros")
10
11
	local RealPlayer = RealPlayer
12
13
	script.Parent = RealPlayer.Character
14
15
16
17
	--Fake event to make stuff like Mouse.KeyDown work
18
19
	local Disconnect_Function = function(this)
20
21
		this[1].Functions[this[2]] = nil
22
23
	end
24
25
	local Disconnect_Metatable = {__index={disconnect=Disconnect_Function,Disconnect=Disconnect_Function}}
26
27
	local FakeEvent_Metatable = {__index={
28
29
		Connect = function(this,f)
30
31
			local i = tostring(math.random(0,10000))
32
33
			while this.Functions[i] do
34
35
				i = tostring(math.random(0,10000))
36
37
			end
38
39
			this.Functions[i] = f
40
41
			return setmetatable({this,i},Disconnect_Metatable)
42
43
		end
44
45
	}}
46
47
	FakeEvent_Metatable.__index.connect = FakeEvent_Metatable.__index.Connect
48
49
	local function fakeEvent()
50
51
		return setmetatable({Functions={}},FakeEvent_Metatable)
52
53
	end
54
55
56
57
	--Creating fake input objects with fake variables
58
59
    local FakeMouse = {Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent(),Button2Up=fakeEvent(),Button2Down=fakeEvent()}
60
61
    FakeMouse.keyUp = FakeMouse.KeyUp
62
63
    FakeMouse.keyDown = FakeMouse.KeyDown
64
65
	local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
66
67
	local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
68
69
		CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
70
71
	end}
72
73
	--Merged 2 functions into one by checking amount of arguments
74
75
	CAS.UnbindAction = CAS.BindAction
76
77
78
79
	--This function will trigger the events that have been :Connect()'ed
80
81
	local function TriggerEvent(self,ev,...)
82
83
		for _,f in pairs(self[ev].Functions) do
84
85
			f(...)
86
87
		end
88
89
	end
90
91
	FakeMouse.TriggerEvent = TriggerEvent
92
93
	UIS.TriggerEvent = TriggerEvent
94
95
96
97
	--Client communication
98
99
	local Event = Instance.new("RemoteEvent")
100
101
	Event.Name = "UserInput_Event"
102
103
	Event.OnServerEvent:Connect(function(plr,io)
104
105
	    if plr~=RealPlayer then return end
106
107
		FakeMouse.Target = io.Target
108
109
		FakeMouse.Hit = io.Hit
110
111
		if not io.isMouse then
112
113
			local b = io.UserInputState == Enum.UserInputState.Begin
114
115
			if io.UserInputType == Enum.UserInputType.MouseButton1 then
116
117
				return FakeMouse:TriggerEvent(b and "Button1Down" or "Button1Up")
118
119
			end
120
121
			if io.UserInputType == Enum.UserInputType.MouseButton2 then
122
123
				return FakeMouse:TriggerEvent(b and "Button2Down" or "Button2Up")
124
125
			end
126
127
			for _,t in pairs(CAS.Actions) do
128
129
				for _,k in pairs(t.Keys) do
130
131
					if k==io.KeyCode then
132
133
						t.Function(t.Name,io.UserInputState,io)
134
135
					end
136
137
				end
138
139
			end
140
141
			FakeMouse:TriggerEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
142
143
			UIS:TriggerEvent(b and "InputBegan" or "InputEnded",io,false)
144
145
	    end
146
147
	end)
148
149
	Event.Parent = NLS([==[local Event = script:WaitForChild("UserInput_Event")
150
151
	local Mouse = owner:GetMouse()
152
153
	local UIS = game:GetService("UserInputService")
154
155
	local input = function(io,RobloxHandled)
156
157
		if RobloxHandled then return end
158
159
		--Since InputObject is a client-side instance, we create and pass table instead
160
161
		Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState,Hit=Mouse.Hit,Target=Mouse.Target})
162
163
	end
164
165
	UIS.InputBegan:Connect(input)
166
167
	UIS.InputEnded:Connect(input)
168
169
170
171
	local h,t
172
173
	--Give the server mouse data every second frame, but only if the values changed
174
175
	--If player is not moving their mouse, client won't fire events
176
177
	local HB = game:GetService("RunService").Heartbeat
178
179
	while true do
180
181
		if h~=Mouse.Hit or t~=Mouse.Target then
182
183
			h,t=Mouse.Hit,Mouse.Target
184
185
			Event:FireServer({isMouse=true,Target=t,Hit=h})
186
187
		end
188
189
		--Wait 2 frames
190
191
		for i=1,2 do
192
193
			HB:Wait()
194
195
		end
196
197
	end]==],script)
198
199
200
201
	----Sandboxed game object that allows the usage of client-side methods and services
202
203
	--Real game object
204
205
	local RealGame = game
206
207
208
209
	--Metatable for fake service
210
211
	local FakeService_Metatable = {
212
213
		__index = function(self,k)
214
215
			local s = rawget(self,"_RealService")
216
217
			if s then
218
219
				return typeof(s[k])=="function"
220
221
				and function(_,...)return s[k](s,...)end or s[k]
222
223
			end
224
225
		end,
226
227
		__newindex = function(self,k,v)
228
229
			local s = rawget(self,"_RealService")
230
231
			if s then s[k]=v end
232
233
		end
234
235
	}
236
237
	local function FakeService(t,RealService)
238
239
		t._RealService = typeof(RealService)=="string" and RealGame:GetService(RealService) or RealService
240
241
		return setmetatable(t,FakeService_Metatable)
242
243
	end
244
245
246
247
	--Fake game object
248
249
	local FakeGame = {
250
251
		GetService = function(self,s)
252
253
			return rawget(self,s) or RealGame:GetService(s)
254
255
		end,
256
257
		Players = FakeService({
258
259
			LocalPlayer = FakeService({GetMouse=function(self)return FakeMouse end},Player)
260
261
		},"Players"),
262
263
		UserInputService = FakeService(UIS,"UserInputService"),
264
265
		ContextActionService = FakeService(CAS,"ContextActionService"),
266
267
		RunService = FakeService({
268
269
			_btrs = {},
270
271
			RenderStepped = RealGame:GetService("RunService").Heartbeat,
272
273
			BindToRenderStep = function(self,name,_,fun)
274
275
				self._btrs[name] = self.Heartbeat:Connect(fun)
276
277
			end,
278
279
			UnbindFromRenderStep = function(self,name)
280
281
				self._btrs[name]:Disconnect()
282
283
			end,
284
285
		},"RunService")
286
287
	}
288
289
	rawset(FakeGame.Players,"localPlayer",FakeGame.Players.LocalPlayer)
290
291
	FakeGame.service = FakeGame.GetService
292
293
	FakeService(FakeGame,game)
294
295
	--Changing owner to fake player object to support owner:GetMouse()
296
297
	game,owner = FakeGame,FakeGame.Players.LocalPlayer
298
299
end
300
301
302
print(" This time, this script was created by: GODZILLAGAMERZ13, not converted.
303
This script is dedicated to all the people on Pastebin who look at my stuff, GUIS, converted scripts, edits, and more!
304
Created by: GODZILLAGAMERZ13 on June 25, 2019"
305
local mouse = Player:GetMouse()
306
local char = game.Players.LocalPlayer.Character
307
local surface = Instance.new("BillboardGui", char)
308
local text = Instance.new("TextLabel", surface)
309
text.Scaled = true
310
text.FontSize = "Size24"
311
text.BackgroundTransparency = 1
312
surface.MaxDistance = 10
313
text.TextColor = Color3.new(0,0,0)
314
315
316
	v=Instance.new("Part")
317
	v.Name = "ColorBrick"
318
	v.Parent=plr.Character
319
	v.FormFactor="Symmetric"
320
	v.Anchored=true
321
	v.CanCollide=false
322
	v.BottomSurface="Smooth"
323
	v.TopSurface="Smooth"
324
	v.Size=Vector3.new(10,5,3)
325
	v.Transparency=1
326
	v.CFrame=char.Torso.CFrame
327
	v.BrickColor=BrickColor.new("Toothpaste")
328
	v.Transparency=1
329
	v.Shape="Block"
330
	text.Text = "Idiot"
331
332
333
for _, a in pairs(char:children()) do
334
if a:IsA'Accessory' then
335
a:Destroy()  --- Gets rid of hats.
336
elseif a:IsA'Part' then
337
a.BrickColor = BrickColor:Random()
338
339
if char.Shirt == nil then
340
Instance.new("Pants", char)
341
Instance.new("Shirt", char)
342
end
343
char.Shirt.ShirtTemplate = "http://www.roblox.com/asset/?id=144076357"
344
char.Pants.PantsTemplate = "http://www.roblox.com/asset/?id=144076759"
345
346
347
local sound = Instance.new("Sound", game.Character.Torso)
348
sound.SoundId = 276873987
349
sound.Volume = 10
350
351
352
353
354
mouse.KeyDown:connect(function(Press)
355
Press=Press:lower()
356
if Press=='t' then
357
	sound.SoundId = 594594778 -- Let it go parody
358
end)