SHOW:
|
|
- or go back to the newest paste.
1 | ||
2 | if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end | |
3 | local Player,game,owner = owner,game | |
4 | local RealPlayer = Player | |
5 | do | |
6 | print("FE Compatibility code by Mokiros, Edited by StarzoZero") | |
7 | local rp = RealPlayer | |
8 | script.Parent = rp.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,Functions={},Connect=function(self,f)table.insert(self.Functions,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(),Button2Up=fakeEvent(),Button2Down=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 then | |
34 | for _,f in pairs(t.Functions) do | |
35 | f(...) | |
36 | end | |
37 | end | |
38 | end | |
39 | m.TrigEvent = te | |
40 | UIS.TrigEvent = te | |
41 | ||
42 | Event.OnServerEvent:Connect(function(plr,io) | |
43 | if plr~=rp then return end | |
44 | m.Target = io.Target | |
45 | m.Hit = io.Hit | |
46 | if not io.isMouse then | |
47 | local b = io.UserInputState == Enum.UserInputState.Begin | |
48 | if io.UserInputType == Enum.UserInputType.MouseButton1 then | |
49 | return m:TrigEvent(b and "Button1Down" or "Button1Up") | |
50 | end | |
51 | if io.UserInputType == Enum.UserInputType.MouseButton2 then | |
52 | return m:TrigEvent(b and "Button2Down" or "Button2Up") | |
53 | end | |
54 | for _,t in pairs(CAS.Actions) do | |
55 | for _,k in pairs(t.Keys) do | |
56 | if k==io.KeyCode then | |
57 | t.Function(t.Name,io.UserInputState,io) | |
58 | end | |
59 | end | |
60 | end | |
61 | m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower()) | |
62 | UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false) | |
63 | end | |
64 | end) | |
65 | Event.Parent = NLS([==[ | |
66 | local Player = game:GetService("Players").LocalPlayer | |
67 | local Event = script:WaitForChild("UserInput_Event") | |
68 | local Mouse = Player:GetMouse() | |
69 | local UIS = game:GetService("UserInputService") | |
70 | local input = function(io,a) | |
71 | if a then return end | |
72 | --Since InputObject is a client-side instance, we create and pass table instead | |
73 | Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState,Hit=Mouse.Hit,Target=Mouse.Target}) | |
74 | end | |
75 | UIS.InputBegan:Connect(input) | |
76 | UIS.InputEnded:Connect(input) | |
77 | local h,t | |
78 | --Give the server mouse data 30 times every second, but only if the values changed | |
79 | --If player is not moving their mouse, client won't fire events | |
80 | while wait(1/30) do | |
81 | if h~=Mouse.Hit or t~=Mouse.Target then | |
82 | h,t=Mouse.Hit,Mouse.Target | |
83 | Event:FireServer({isMouse=true,Target=t,Hit=h}) | |
84 | end | |
85 | end]==],Player.Character) | |
86 | ||
87 | ----Sandboxed game object that allows the usage of client-side methods and services | |
88 | --Real game object | |
89 | local _rg = game | |
90 | ||
91 | --Metatable for fake service | |
92 | local fsmt = { | |
93 | __index = function(self,k) | |
94 | local s = rawget(self,"_RealService") | |
95 | if s then | |
96 | return typeof(s[k])=="function" | |
97 | and function(_,...)return s[k](s,...)end or s[k] | |
98 | end | |
99 | end, | |
100 | __newindex = function(self,k,v) | |
101 | local s = rawget(self,"_RealService") | |
102 | if s then s[k]=v end | |
103 | end | |
104 | } | |
105 | local function FakeService(t,RealService) | |
106 | t._RealService = typeof(RealService)=="string" and _rg:GetService(RealService) or RealService | |
107 | return setmetatable(t,fsmt) | |
108 | end | |
109 | ||
110 | --Fake game object | |
111 | local g = { | |
112 | GetService = function(self,s) | |
113 | return rawget(self,s) or _rg:GetService(s) | |
114 | end, | |
115 | Players = FakeService({ | |
116 | LocalPlayer = FakeService({GetMouse=function(self)return m end},Player) | |
117 | },"Players"), | |
118 | UserInputService = FakeService(UIS,"UserInputService"), | |
119 | ContextActionService = FakeService(CAS,"ContextActionService"), | |
120 | RunService = FakeService({ | |
121 | _btrs = {}, | |
122 | RenderStepped = _rg:GetService("RunService").Heartbeat, | |
123 | BindToRenderStep = function(self,name,_,fun) | |
124 | self._btrs[name] = self.Heartbeat:Connect(fun) | |
125 | end, | |
126 | UnbindFromRenderStep = function(self,name) | |
127 | self._btrs[name]:Disconnect() | |
128 | end, | |
129 | },"RunService") | |
130 | } | |
131 | rawset(g.Players,"localPlayer",g.Players.LocalPlayer) | |
132 | g.service = g.GetService | |
133 | FakeService(g,game) | |
134 | --Changing owner to fake player object to support owner:GetMouse() | |
135 | game,owner = g,g.Players.LocalPlayer | |
136 | end | |
137 | ||
138 | --Draw something, put your sound id in, and watch the light show!-- | |
139 | --Enjoy lads.-- | |
140 | Player=game:GetService("Players").LocalPlayer | |
141 | Character=Player.Character | |
142 | Character.Humanoid.Name = "noneofurbusiness" | |
143 | hum = Character.noneofurbusiness | |
144 | LeftArm=Character["Left Arm"] | |
145 | LeftLeg=Character["Left Leg"] | |
146 | RightArm=Character["Right Arm"] | |
147 | RightLeg=Character["Right Leg"] | |
148 | Root=Character["HumanoidRootPart"] | |
149 | Head=Character["Head"] | |
150 | Torso=Character["Torso"] | |
151 | Neck=Torso["Neck"] | |
152 | mouse = Player:GetMouse() | |
153 | removeuseless = game:GetService("Debris") | |
154 | soundIsPlaying = false | |
155 | number = 0 | |
156 | stop = false | |
157 | flatt = false | |
158 | standingg = true | |
159 | tf = 0 | |
160 | idrewsomething = false | |
161 | tab2={} | |
162 | tab={} | |
163 | blue = false | |
164 | red = true | |
165 | green = false | |
166 | drawingallowed = true | |
167 | MseGuide = true | |
168 | RunSrv = game:GetService("RunService") | |
169 | RenderStepped = game:GetService("RunService").RenderStepped | |
170 | ||
171 | local HEADLERP = Instance.new("ManualWeld") | |
172 | HEADLERP.Parent = Head | |
173 | HEADLERP.Part0 = Head | |
174 | HEADLERP.Part1 = Head | |
175 | HEADLERP.C0 = CFrame.new(0, -1.5, -0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)) | |
176 | ||
177 | OrgnC0 = Neck.C0 | |
178 | local movelimbs = coroutine.wrap(function() | |
179 | while RunSrv.RenderStepped:wait() do | |
180 | TrsoLV = Torso.CFrame.lookVector | |
181 | Dist = nil | |
182 | Diff = nil | |
183 | if not MseGuide then | |
184 | print("l") | |
185 | else | |
186 | local _, Point = Workspace:FindPartOnRay(Ray.new(Head.CFrame.p, mouse.Hit.lookVector), Workspace, false, true) | |
187 | Dist = (Head.CFrame.p-Point).magnitude | |
188 | Diff = Head.CFrame.Y-Point.Y | |
189 | local _, Point2 = Workspace:FindPartOnRay(Ray.new(LeftArm.CFrame.p, mouse.Hit.lookVector), Workspace, false, true) | |
190 | Dist2 = (LeftArm.CFrame.p-Point).magnitude | |
191 | Diff2 = LeftArm.CFrame.Y-Point.Y | |
192 | HEADLERP.C0 = CFrame.new(0, -1.5, -0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)) | |
193 | Neck.C0 = Neck.C0:lerp(OrgnC0*CFrame.Angles((math.tan(Diff/Dist)*1), 0, (((Head.CFrame.p-Point).Unit):Cross(Torso.CFrame.lookVector)).Y*1), .1) | |
194 | end | |
195 | end | |
196 | end) | |
197 | movelimbs() | |
198 | ||
199 | godmode = coroutine.wrap(function()---- so you don't get killed by fucking random things | |
200 | while true do | |
201 | hum.MaxHealth = math.huge | |
202 | wait(0.0000001) | |
203 | hum.Health = math.huge | |
204 | wait() | |
205 | end | |
206 | end) | |
207 | godmode() | |
208 | ff = Instance.new("ForceField", Character) | |
209 | ff.Visible = false | |
210 | ||
211 | coroutine.wrap(function() | |
212 | mouse.Button1Down:connect(function() | |
213 | if drawingallowed then | |
214 | fo = false | |
215 | while true do | |
216 | if fo then break end | |
217 | idrewsomething = true | |
218 | brick = Instance.new("Part",Character) | |
219 | brick.Anchored = true | |
220 | brick.Material = "Neon" | |
221 | brick.CanCollide = false | |
222 | brick.BrickColor = BrickColor.new("Really black") | |
223 | brick.Size = Vector3.new(1,1,1) | |
224 | brick.CFrame = CFrame.new(mouse.Hit.p) | |
225 | table.insert(tab2,brick) | |
226 | light = Instance.new("PointLight", brick) | |
227 | light.Color = brick.BrickColor.Color | |
228 | light.Range = 0 | |
229 | light.Enabled = true | |
230 | light.Shadows = true | |
231 | light.Brightness = 0 | |
232 | table.insert(tab,light) | |
233 | wait() | |
234 | end | |
235 | end | |
236 | end) | |
237 | end)() | |
238 | ||
239 | coroutine.wrap(function() | |
240 | mouse.Button1Up:connect(function() | |
241 | if drawingallowed then | |
242 | fo = true | |
243 | end | |
244 | end) | |
245 | end)() | |
246 | ||
247 | ---GUI--- | |
248 | ||
249 | screenGui = Instance.new("ScreenGui") | |
250 | screenGui.Parent = script.Parent | |
251 | ||
252 | frame = Instance.new("Frame") | |
253 | frame.Parent = screenGui | |
254 | frame.Position = UDim2.new(0, 8, 0, 225) | |
255 | frame.Size = UDim2.new(0, 250, 0, 200) | |
256 | frame.BackgroundColor3 = BrickColor.new("White").Color | |
257 | frame.BackgroundTransparency = .5 | |
258 | ||
259 | textButton = Instance.new("TextButton") | |
260 | textButton.Parent = screenGui | |
261 | textButton.Position = UDim2.new(0, 12, 0, 400) | |
262 | textButton.Size = UDim2.new(0, 50, 0, 10) | |
263 | textButton.BackgroundColor3 = BrickColor.new("Really red").Color | |
264 | textButton.Text = "Red" | |
265 | ||
266 | textButton.MouseButton1Down:connect(function() | |
267 | red = true | |
268 | green = false | |
269 | blue = false | |
270 | rainbow = false | |
271 | smooth = false | |
272 | end) | |
273 | ||
274 | textButton2 = Instance.new("TextButton") | |
275 | textButton2.Parent = screenGui | |
276 | textButton2.Position = UDim2.new(0, 75, 0, 400) | |
277 | textButton2.Size = UDim2.new(0, 50, 0, 10) | |
278 | textButton2.BackgroundColor3 = BrickColor.new("Really blue").Color | |
279 | textButton2.Text = "Blue" | |
280 | ||
281 | textButton2.MouseButton1Down:connect(function() | |
282 | red = false | |
283 | green = false | |
284 | blue = true | |
285 | rainbow = false | |
286 | smooth = false | |
287 | end) | |
288 | ||
289 | textButton3 = Instance.new("TextButton") | |
290 | textButton3.Parent = screenGui | |
291 | textButton3.Position = UDim2.new(0, 138, 0, 400) | |
292 | textButton3.Size = UDim2.new(0, 50, 0, 10) | |
293 | textButton3.BackgroundColor3 = BrickColor.new("Lime green").Color | |
294 | textButton3.Text = "Green" | |
295 | ||
296 | textButton3.MouseButton1Down:connect(function() | |
297 | red = false | |
298 | green = true | |
299 | blue = false | |
300 | rainbow = false | |
301 | smooth = false | |
302 | end) | |
303 | ||
304 | textButton4 = Instance.new("TextButton") | |
305 | textButton4.Parent = screenGui | |
306 | textButton4.Position = UDim2.new(0, 201, 0, 400) | |
307 | textButton4.Size = UDim2.new(0, 50, 0, 10) | |
308 | coroutine.wrap(function() | |
309 | while true do | |
310 | textButton4.BackgroundColor3 = BrickColor.Random().Color | |
311 | wait(.05) | |
312 | end | |
313 | end)() | |
314 | textButton4.Text = "Rainbow" | |
315 | ||
316 | textButton4.MouseButton1Down:connect(function() | |
317 | red = false | |
318 | green = false | |
319 | blue = false | |
320 | rainbow = true | |
321 | smooth = false | |
322 | end) | |
323 | ||
324 | textBox = Instance.new("TextBox") | |
325 | textBox.Parent = screenGui | |
326 | textBox.Position = UDim2.new(0, 58, 0, 280) | |
327 | textBox.Size = UDim2.new(0, 150, 0, 20) | |
328 | textBox.BackgroundColor3 = BrickColor.new("White").Color | |
329 | textBox.Text = "Type Sound Id here" | |
330 | ||
331 | form = Instance.new("TextButton") | |
332 | form.Parent = screenGui | |
333 | form.TextScaled = true | |
334 | form.Position = UDim2.new(0, 114, 0, 305) | |
335 | form.Size = UDim2.new(0, 40, 0, 20) | |
336 | form.BackgroundColor3 = BrickColor.new("White").Color | |
337 | form.Text = "Up" | |
338 | ||
339 | form.MouseButton1Down:connect(function() | |
340 | if standingg then | |
341 | standingg = false | |
342 | flatt = true | |
343 | form.Text = "Flat" | |
344 | elseif flatt then | |
345 | flatt = false | |
346 | standingg = true | |
347 | form.Text = "Up" | |
348 | end | |
349 | end) | |
350 | ||
351 | coroutine.wrap(function() | |
352 | while wait() do | |
353 | sid = textBox.Text | |
354 | end | |
355 | end)() | |
356 | ||
357 | playbutton = Instance.new("TextButton") | |
358 | playbutton.Parent = screenGui | |
359 | playbutton.Position = UDim2.new(0, 58, 0, 305) | |
360 | playbutton.Size = UDim2.new(0, 50, 0, 20) | |
361 | playbutton.BackgroundColor3 = BrickColor.new("White").Color | |
362 | playbutton.Text = "Play" | |
363 | ||
364 | playbutton.MouseButton1Down:connect(function() | |
365 | if not idrewsomething then return end | |
366 | if soundIsPlaying then | |
367 | sound1:Remove() | |
368 | sound1 = Instance.new("Sound", Character) | |
369 | sound1.Looped = true | |
370 | sound1.SoundId = "http://www.roblox.com/asset/?id=" .. sid | |
371 | sound1:Play() | |
372 | else | |
373 | soundIsPlaying = true | |
374 | vol.Text = 1 | |
375 | pitch.Text = 1 | |
376 | sound1 = Instance.new("Sound", Character) | |
377 | coroutine.wrap(function() | |
378 | while soundIsPlaying do | |
379 | wait() | |
380 | sound1.Volume = svol | |
381 | end | |
382 | end)() | |
383 | sound1.Looped = true | |
384 | coroutine.wrap(function() | |
385 | while soundIsPlaying do | |
386 | sound1.Pitch = pitchh | |
387 | wait() | |
388 | end | |
389 | end)() | |
390 | sound1.SoundId = "http://www.roblox.com/asset/?id=" .. sid | |
391 | sound1:Play() | |
392 | coroutine.wrap(function() | |
393 | while sound1.IsPlaying and soundIsPlaying do | |
394 | for i,v in pairs(tab) do | |
395 | v.Enabled = true | |
396 | v.Brightness = sound1.PlaybackLoudness/19 | |
397 | v.Range = sound1.PlaybackLoudness/15 | |
398 | if red then | |
399 | v.Color = Color3.new(sound1.PlaybackLoudness/200, 0,0) | |
400 | elseif blue then | |
401 | v.Color = Color3.new(0, 0,sound1.PlaybackLoudness/200) | |
402 | elseif green then | |
403 | v.Color = Color3.new(0, sound1.PlaybackLoudness/200,0) | |
404 | elseif rainbow then | |
405 | v.Color = brick.BrickColor.Color | |
406 | end | |
407 | end | |
408 | wait() | |
409 | end | |
410 | end)() | |
411 | while sound1.IsPlaying and soundIsPlaying do | |
412 | workspace.CurrentCamera.FieldOfView = 70 - sound1.PlaybackLoudness/100 | |
413 | bcol = brick.BrickColor | |
414 | for _,v in pairs(tab2) do | |
415 | if standingg then | |
416 | v.Size = Vector3.new(1, sound1.PlaybackLoudness/math.random(10,25), 1) | |
417 | elseif flatt then | |
418 | v.Size = Vector3.new(sound1.PlaybackLoudness/math.random(10,25), 1, 1) | |
419 | end | |
420 | if red then | |
421 | v.BrickColor = BrickColor.new(Color3.new(sound1.PlaybackLoudness/200, 0,0)) | |
422 | elseif blue then | |
423 | v.BrickColor = BrickColor.new(Color3.new(0,0,sound1.PlaybackLoudness/200)) | |
424 | elseif green then | |
425 | v.BrickColor = BrickColor.new(Color3.new(0,sound1.PlaybackLoudness/200,0)) | |
426 | elseif rainbow then | |
427 | v.BrickColor = BrickColor.Random() | |
428 | end | |
429 | end | |
430 | wait() | |
431 | end | |
432 | end | |
433 | end) | |
434 | ||
435 | local stopbutton = Instance.new("TextButton") | |
436 | stopbutton.Parent = screenGui | |
437 | stopbutton.Position = UDim2.new(0, 158, 0, 305) | |
438 | stopbutton.Size = UDim2.new(0, 50, 0, 20) | |
439 | stopbutton.BackgroundColor3 = BrickColor.new("White").Color | |
440 | stopbutton.Text = "Stop" | |
441 | ||
442 | vol = Instance.new("TextBox") | |
443 | vol.Parent = screenGui | |
444 | vol.Position = UDim2.new(0, 58, 0, 330) | |
445 | vol.Size = UDim2.new(0, 50, 0, 20) | |
446 | vol.BackgroundColor3 = BrickColor.new("White").Color | |
447 | vol.Text = "Volume" | |
448 | ||
449 | coroutine.wrap(function() | |
450 | while wait() do | |
451 | svol = vol.Text | |
452 | end | |
453 | end)() | |
454 | ||
455 | local remove = Instance.new("TextButton") | |
456 | remove.Parent = screenGui | |
457 | remove.Position = UDim2.new(0, 108, 0, 370) | |
458 | remove.Size = UDim2.new(0, 50, 0, 20) | |
459 | remove.BackgroundColor3 = BrickColor.new("White").Color | |
460 | remove.Text = "Clean" | |
461 | ||
462 | pitch = Instance.new("TextBox") | |
463 | pitch.Parent = screenGui | |
464 | pitch.Position = UDim2.new(0, 158, 0, 330) | |
465 | pitch.Size = UDim2.new(0, 50, 0, 20) | |
466 | pitch.BackgroundColor3 = BrickColor.new("White").Color | |
467 | pitch.Text = "Pitch" | |
468 | ||
469 | coroutine.wrap(function() | |
470 | while wait() do | |
471 | pitchh = pitch.Text | |
472 | end | |
473 | end)() | |
474 | ||
475 | pitchup = Instance.new("ImageButton") | |
476 | pitchup.Parent = screenGui | |
477 | pitchup.Position = UDim2.new(0, 131, 0, 327) | |
478 | pitchup.BackgroundTransparency = 1 | |
479 | pitchup.Size = UDim2.new(0, 25, 0, 25) | |
480 | pitchup.Image = "rbxassetid://29563813" | |
481 | ||
482 | pitchup.MouseButton1Down:connect(function() | |
483 | if soundIsPlaying then | |
484 | pitch.Text = pitch.Text + .1 | |
485 | end | |
486 | end) | |
487 | ||
488 | pitchdown = Instance.new("ImageButton") | |
489 | pitchdown.Parent = screenGui | |
490 | pitchdown.Rotation = 180 | |
491 | pitchdown.Position = UDim2.new(0, 211, 0, 327) | |
492 | pitchdown.BackgroundTransparency = 1 | |
493 | pitchdown.Size = UDim2.new(0, 25, 0, 25) | |
494 | pitchdown.Image = "rbxassetid://29563813" | |
495 | ||
496 | pitchdown.MouseButton1Down:connect(function() | |
497 | if soundIsPlaying then | |
498 | pitch.Text = pitch.Text - .1 | |
499 | end | |
500 | end) | |
501 | ||
502 | remove.MouseButton1Down:connect(function() | |
503 | if idrewsomething then | |
504 | if soundIsPlaying then | |
505 | soundIsPlaying = false | |
506 | workspace.CurrentCamera.FieldOfView = 70 | |
507 | woosh = Instance.new("Sound",Character) | |
508 | woosh.Volume = 2 | |
509 | woosh.SoundId = "rbxasstid://215402014" | |
510 | woosh:Play() | |
511 | sound1:Stop() | |
512 | pitch.Text = "Pitch" | |
513 | vol.Text = "Volume" | |
514 | removeuseless:AddItem(woosh,2) | |
515 | for _,v in pairs(tab2) do | |
516 | v:Remove() | |
517 | end | |
518 | idrewsomething = false | |
519 | elseif not soundIsPlaying then | |
520 | soundIsPlaying = false | |
521 | woosh = Instance.new("Sound",Character) | |
522 | woosh.Volume = 2 | |
523 | woosh.SoundId = "rbxasstid://215402014" | |
524 | woosh:Play() | |
525 | for _,v in pairs(tab2) do | |
526 | v:Remove() | |
527 | end | |
528 | idrewsomething = false | |
529 | end | |
530 | end | |
531 | end) | |
532 | ||
533 | local day = Instance.new("TextButton") | |
534 | day.Parent = screenGui | |
535 | day.Position = UDim2.new(0, 50, 0, 370) | |
536 | day.Size = UDim2.new(0, 50, 0, 20) | |
537 | day.BackgroundColor3 = BrickColor.new("Bright yellow").Color | |
538 | day.Text = "Day" | |
539 | ||
540 | day.MouseButton1Down:connect(function() | |
541 | daytime = true | |
542 | nighttime = false | |
543 | turnon = Instance.new("Sound",Character) | |
544 | turnon.SoundId = "rbxassetid://858896518" | |
545 | turnon.Volume = 1 | |
546 | turnon.Pitch = 1.05 | |
547 | turnon:Play() | |
548 | removeuseless:AddItem(turnon,2) | |
549 | coroutine.wrap(function() | |
550 | while daytime do | |
551 | game.Lighting.TimeOfDay = 12 | |
552 | game.Lighting.GlobalShadows = true | |
553 | game.Lighting.Ambient = Color3.fromRGB(10,10,10) | |
554 | game.Lighting.Brightness = 1 | |
555 | wait() | |
556 | end | |
557 | end)() | |
558 | end) | |
559 | ||
560 | local night = Instance.new("TextButton") | |
561 | night.Parent = screenGui | |
562 | night.Position = UDim2.new(0, 165, 0, 370) | |
563 | night.Size = UDim2.new(0, 50, 0, 20) | |
564 | night.BackgroundColor3 = BrickColor.new("Really black").Color | |
565 | night.TextColor = BrickColor.new("White") | |
566 | night.Text = "Night" | |
567 | ||
568 | night.MouseButton1Down:connect(function() | |
569 | daytime = false | |
570 | nighttime = true | |
571 | turnoff = Instance.new("Sound",Character) | |
572 | turnoff.SoundId = "rbxassetid://858896518" | |
573 | turnoff.Volume = 1 | |
574 | turnoff.Pitch = .9 | |
575 | turnoff:Play() | |
576 | removeuseless:AddItem(turnoff,2) | |
577 | coroutine.wrap(function() | |
578 | while nighttime do | |
579 | game.Lighting.TimeOfDay = 0 | |
580 | game.Lighting.GlobalShadows = false | |
581 | game.Lighting.Ambient = Color3.new(0,0,0) | |
582 | game.Lighting.Brightness = 0 | |
583 | wait() | |
584 | end | |
585 | end)() | |
586 | end) | |
587 | ||
588 | volumeup = Instance.new("ImageButton") | |
589 | volumeup.Parent = screenGui | |
590 | volumeup.Position = UDim2.new(0, 29, 0, 327) | |
591 | volumeup.BackgroundTransparency = 1 | |
592 | volumeup.Size = UDim2.new(0, 25, 0, 25) | |
593 | volumeup.Image = "rbxassetid://29563813" | |
594 | ||
595 | volumeup.MouseButton1Down:connect(function() | |
596 | if soundIsPlaying then | |
597 | vol.Text = vol.Text + 1 | |
598 | end | |
599 | end) | |
600 | ||
601 | volumedown = Instance.new("ImageButton") | |
602 | volumedown.Parent = screenGui | |
603 | volumedown.Rotation = 180 | |
604 | volumedown.Position = UDim2.new(0, 111, 0, 327) | |
605 | volumedown.BackgroundTransparency = 1 | |
606 | volumedown.Size = UDim2.new(0, 25, 0, 25) | |
607 | volumedown.Image = "rbxassetid://29563813" | |
608 | ||
609 | Supr14 = Instance.new("ImageLabel") | |
610 | Supr14.Parent = screenGui | |
611 | Supr14.Rotation = 0 | |
612 | Supr14.Position = UDim2.new(0, 13, 0, 222) | |
613 | Supr14.BackgroundTransparency = 1 | |
614 | Supr14.Size = UDim2.new(0, 240, 0, 60) | |
615 | Supr14.Image = "rbxassetid://1815697653" | |
616 | ||
617 | volumedown.MouseButton1Down:connect(function() | |
618 | if soundIsPlaying then | |
619 | vol.Text = vol.Text - 1 | |
620 | end | |
621 | end) | |
622 | ||
623 | stopbutton.MouseButton1Down:connect(function() | |
624 | if idrewsomething then | |
625 | if soundIsPlaying then | |
626 | sound1:Remove() | |
627 | soundIsPlaying = false | |
628 | workspace.CurrentCamera.FieldOfView = 70 | |
629 | pitch.Text = "Pitch" | |
630 | vol.Text = "Volume" | |
631 | for i,v in pairs(tab) do | |
632 | v.Enabled = false | |
633 | end | |
634 | for i = 1, 10 do | |
635 | for _,v in pairs(tab2) do | |
636 | v.BrickColor = BrickColor.new("Really black") | |
637 | v.Size = v.Size - Vector3.new(0,15,0) | |
638 | end | |
639 | wait() | |
640 | end | |
641 | end | |
642 | end | |
643 | end) | |
644 | ||
645 | print("Drawing visualiser!, Made by Supr14") |