View difference between Paste ID: RRYQ4evn and FFJZcSR8
SHOW: | | - or go back to the newest paste.
1
-- This script has been converted to FE by iPxter
2
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 | Translated to FE by iPxter")
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-
sound = Instance.new("Sound",game.Players.LocalPlayer.Character.Torso)
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-
MIDI.Parent = game.Players.LocalPlayer.PlayerGui
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").rayangamingNL
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
88
-- Objects
89
MIDI = Instance.new("ScreenGui")
90
Frame = Instance.new("Frame")
91
ID = Instance.new("TextBox")
92
Play = Instance.new("TextButton")
93
Dark = Instance.new("TextButton")
94
Bright = Instance.new("TextButton")
95
Stop = Instance.new("TextButton")
96
Hide = Instance.new("TextButton")
97
Set = Instance.new("TextButton")
98
BColor = Instance.new("TextBox")
99
Random = Instance.new("TextButton")
100
Material = Instance.new("TextBox")
101
Trans = Instance.new("TextBox")
102
sound = Instance.new("Sound",game.Players.rayangamingNL.Character.Torso)
103
sound.Volume = 4
104
sound.Looped = true
105
BVal = "Deep orange"
106
MVal = "Neon"
107
TVal = 0
108
Active = false
109
110
-- Properties
111
112
MIDI.Name = "MIDI"
113
MIDI.Parent = game.Players.rayangamingNL.PlayerGui
114
115
Frame.Parent = MIDI
116
Frame.Active = true
117
Frame.BackgroundColor3 = Color3.new(0, 0, 0)
118
Frame.BackgroundTransparency = 0.5799999833107
119
Frame.BorderSizePixel = 0
120
Frame.Draggable = true
121
Frame.Position = UDim2.new(0, 300, 0, 50)
122
Frame.Size = UDim2.new(0, 310, 0, 200)
123
124
ID.Name = "ID"
125
ID.Parent = Frame
126
ID.BackgroundColor3 = Color3.new(1, 1, 1)
127
ID.BorderSizePixel = 0
128
ID.Position = UDim2.new(0, 100, 0, 10)
129
ID.Size = UDim2.new(0, 120, 0, 30)
130
ID.Font = Enum.Font.Arcade
131
ID.FontSize = Enum.FontSize.Size18
132
ID.Text = "639837244"
133
ID.TextColor3 = Color3.new(0, 0, 0)
134
ID.TextSize = 18
135
136
Material.Name = "Material"
137
Material.Parent = Frame
138
Material.BackgroundColor3 = Color3.new(1, 1, 1)
139
Material.BorderSizePixel = 0
140
Material.Position = UDim2.new(0, 210, 0, 95)
141
Material.Size = UDim2.new(0, 90, 0, 15)
142
Material.Font = Enum.Font.Arcade
143
Material.FontSize = Enum.FontSize.Size14
144
Material.Text = "Neon"
145
Material.TextSize = 14
146
147
Trans.Name = "Trans"
148
Trans.Parent = Frame
149
Trans.BackgroundColor3 = Color3.new(1, 1, 1)
150
Trans.BorderSizePixel = 0
151
Trans.Position = UDim2.new(0, 210, 0, 75)
152
Trans.Size = UDim2.new(0, 90, 0, 15)
153
Trans.Font = Enum.Font.Arcade
154
Trans.FontSize = Enum.FontSize.Size14
155
Trans.Text = "Transparency"
156
Trans.TextSize = 14
157
158
Set.Name = "Set"
159
Set.Parent = Frame
160
Set.BackgroundColor3 = Color3.new(1, 1, 1)
161
Set.BorderSizePixel = 0
162
Set.Position = UDim2.new(0, 210, 0, 135)
163
Set.Size = UDim2.new(0, 90, 0, 15)
164
Set.Font = Enum.Font.Arcade
165
Set.FontSize = Enum.FontSize.Size14
166
Set.Text = "Set"
167
Set.TextSize = 14
168
Set.MouseButton1Down:connect(function()
169
	if Active == true then
170
		Active = false
171
	end
172
	BVal = tostring(BColor.Text)
173
	TVal = tonumber(Trans.Text)
174
	MVal = tostring(Material.Text)
175
end)
176
177
BColor.Name = "BColor"
178
BColor.Parent = Frame
179
BColor.BackgroundColor3 = Color3.new(1, 1, 1)
180
BColor.BorderSizePixel = 0
181
BColor.Position = UDim2.new(0, 210, 0, 115)
182
BColor.Size = UDim2.new(0, 90, 0, 15)
183
BColor.Font = Enum.Font.Arcade
184
BColor.FontSize = Enum.FontSize.Size14
185
BColor.Text = "Lime Green"
186
BColor.TextSize = 14
187
188
Random.Name = "Random"
189
Random.Parent = Frame
190
Random.BackgroundColor3 = Color3.new(1, 1, 1)
191
Random.BorderSizePixel = 0
192-
	for i,v in pairs(game.Players.LocalPlayer.Character:GetChildren()) do
192+
193
Random.Size = UDim2.new(0, 90, 0, 30)
194
Random.Font = Enum.Font.Arcade
195
Random.FontSize = Enum.FontSize.Size14
196
Random.Text = "Random"
197
Random.TextSize = 14
198
Random.MouseButton1Down:connect(function()
199
	if Active == false then
200-
plyr = game.Players.LocalPlayer
200+
201
	end
202
end)
203-
mouse = game.Players.LocalPlayer:GetMouse()
203+
204
Play.Name = "Play"
205
Play.Parent = Frame
206
Play.BackgroundColor3 = Color3.new(1, 1, 1)
207
Play.BorderSizePixel = 0
208
Play.Position = UDim2.new(0, 10, 0, 160)
209
Play.Size = UDim2.new(0, 90, 0, 30)
210
Play.Font = Enum.Font.Arcade
211
Play.FontSize = Enum.FontSize.Size14
212
Play.Text = "Play"
213
Play.TextSize = 14
214
Play.MouseButton1Down:connect(function()
215
	sound.TimePosition = 0
216
	sound.Playing = true
217
	sound.SoundId = "rbxassetid://"..tonumber(ID.Text)
218
end)
219
220
Dark.Name = "Dark"
221
Dark.Parent = Frame
222
Dark.BackgroundColor3 = Color3.new(1, 1, 1)
223
Dark.BorderSizePixel = 0
224
Dark.Position = UDim2.new(0, 10, 0, 120)
225
Dark.Size = UDim2.new(0, 90, 0, 30)
226
Dark.Font = Enum.Font.Arcade
227
Dark.FontSize = Enum.FontSize.Size14
228
Dark.Text = "Dark"
229
Dark.TextSize = 14
230
Dark.MouseButton1Down:connect(function()
231
	game.Lighting.TimeOfDay = 0
232
	game.Lighting.GlobalShadows = false
233
	game.Lighting.Ambient = Color3.new(0,0,0)
234
	game.Lighting.Brightness = 0
235
end)
236
237
Bright.Name = "Bright"
238
Bright.Parent = Frame
239
Bright.BackgroundColor3 = Color3.new(1, 1, 1)
240
Bright.BorderSizePixel = 0
241
Bright.Position = UDim2.new(0, 110, 0, 120)
242
Bright.Size = UDim2.new(0, 90, 0, 30)
243
Bright.Font = Enum.Font.Arcade
244
Bright.FontSize = Enum.FontSize.Size14
245
Bright.Text = "Bright"
246
Bright.TextSize = 14
247
Bright.MouseButton1Down:connect(function()
248
	game.Lighting.TimeOfDay = 12
249
	game.Lighting.GlobalShadows = true
250
	game.Lighting.Ambient = Color3.fromRGB(10,10,10)
251
	game.Lighting.Brightness = 1
252
end)
253
254
Stop.Name = "Stop"
255
Stop.Parent = Frame
256
Stop.BackgroundColor3 = Color3.new(1, 1, 1)
257
Stop.BorderSizePixel = 0
258
Stop.Position = UDim2.new(0, 110, 0, 160)
259
Stop.Size = UDim2.new(0, 90, 0, 30)
260
Stop.Font = Enum.Font.Arcade
261
Stop.FontSize = Enum.FontSize.Size14
262
Stop.Text = "Stop"
263
Stop.TextSize = 14
264
Stop.MouseButton1Down:connect(function()
265
	sound.Playing = false
266
end)
267
268
Hide.Name = "Hide"
269
Hide.Parent = Frame
270
Hide.BackgroundColor3 = Color3.new(1, 1, 1)
271
Hide.BorderSizePixel = 0
272
Hide.Position = UDim2.new(0, 210, 0, 160)
273
Hide.Size = UDim2.new(0, 90, 0, 30)
274
Hide.Font = Enum.Font.Arcade
275
Hide.FontSize = Enum.FontSize.Size14
276
Hide.Text = "Clear"
277
Hide.TextSize = 14
278
Hide.MouseButton1Down:connect(function()
279
	for i,v in pairs(game.Players.rayangamingNL.Character:GetChildren()) do
280
		if v.Name == "location" then
281
			v:Remove()
282
		end
283
	end
284
end)
285
286
--- Made By Pugz AKA (PugLover77) 
287
plyr = game.Players.rayangamingNL
288-
for i,v in pairs(game.Players.LocalPlayer.Character:GetChildren()) do
288+
289
RunService = game:service'RunService'
290
local draw2 = false
291
local colorA = 1
292
local lastPos
293
 
294
tool = Instance.new("HopperBin", plyr.Backpack)
295
tool.Name = "Draw"
296
 
297
 
298
 
299
mouse = plyr:GetMouse()
300
 
301
 
302
               function draw(obj) -- 
303
    local lastPos = obj.CFrame.p
304
    coroutine.wrap(function()
305
        while wait() do
306
        if draw2 then
307
        while draw2 do
308
            wait()
309
            objC = obj:Clone()
310
             objC.Parent = c
311
            objC.Anchored = true
312
            local distance = (lastPos- obj.CFrame.p).magnitude
313
            objC.Size = Vector3.new(.1,.1,distance)
314
            objC.CFrame = CFrame.new(lastPos,obj.Position)*CFrame.new(0,0,-distance/2)
315
            lastPos = obj.CFrame.p
316
        end
317
        else
318
                break
319
        end
320
        end
321
    end)()
322
                end
323
 
324
tool.Selected:connect(function(mouse)
325
       
326
        mouse.Button1Down:connect(function(mouse)
327
	draw2 = true
328
                part = Instance.new("Part", c)
329
mesh = Instance.new("BlockMesh",part)
330
		Li = Instance.new("PointLight",part)
331
		Li.Range = 8
332
		Li.Color = part.Color
333
                part.Name = "location"
334
           
335
                part.BottomSurface = 0
336
                part.Material = MVal
337
                part.TopSurface = 0
338
                part.Size = Vector3.new()
339
                part.Transparency = TVal
340
                if Active == true then
341
					part.Color = Color3.new(math.random(), math.random(), math.random())
342
				elseif Active == false then
343
					part.BrickColor = BrickColor.new(BVal)
344
				end
345
		Li.Color = part.Color
346
                part.FormFactor = "Custom"
347
                part.Size = Vector3.new(0.01, 0.01, 0.01)
348
                part.Anchored = true
349
                part.Locked = true
350
                coroutine.wrap(function()
351
                while part ~= nil do
352
                part.CFrame = CFrame.new(plyr:GetMouse().Hit.p.x,plyr:GetMouse().Hit.p.y,plyr:GetMouse().Hit.p.z)
353
                wait()
354
                end
355
                end)()
356
				wait()    
357
                draw(part)
358
				wait()
359
        end)
360
        mouse.Button1Up:connect(function(mouse)
361
	draw2 = false
362
               
363
        end)
364
                       
365
end)
366
x = 60
367
game:GetService("RunService").Stepped:connect(function()
368
	n = sound.PlaybackLoudness
369
	if n > 500 then
370
		x = 100
371
	elseif n < 500 then
372
		x = 110
373
	end
374
for i,v in pairs(game.Players.rayangamingNL.Character:GetChildren()) do
375
	if v.Name == "location" then
376
		v.Mesh.Scale = Vector3.new(n / x, n / x, n / x)
377
		v.PointLight.Range = n / 50
378
	end
379
end
380
end)