SHOW:
|
|
- or go back to the newest paste.
1 | - | -- Made by Zuu_Roku w/ Help from Cass! |
1 | + | if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end |
2 | - | -- Venge is ok happy? But nebby is better /e dab |
2 | + | local Player,Mouse,mouse,UserInputService,ContextActionService = owner |
3 | do | |
4 | - | print("Made by Zuu_Roku, Thanks Cass for Cloud CLerp.") |
4 | + | print("FE Compatibility code by Mokiros") |
5 | script.Parent = Player.Character | |
6 | - | print("Rain Cloud Visualizer (Update 1.2 I guess) Commands:") |
6 | + | |
7 | --RemoteEvent for communicating | |
8 | - | print("!play (ID) [Changes song]") |
8 | + | local Event = Instance.new("RemoteEvent") |
9 | Event.Name = "UserInput_Event" | |
10 | - | print("!pitch (#) [normal pitch is '10'][THIS IS FIXED AAAAAAAAAAAAAAAAAA, Sound.Pitch was Depreciated and never knew, hence why it never worked]") |
10 | + | |
11 | --Fake event to make stuff like Mouse.KeyDown work | |
12 | - | print("!snow / !rain [Changes Weather]") |
12 | + | local function fakeEvent() |
13 | local t = {_fakeEvent=true,Connect=function(self,f)self.Function=f end} | |
14 | - | print("!rate (#) [Changes amount of particles]") |
14 | + | t.connect = t.Connect |
15 | return t | |
16 | - | print("Click for a Lightning bolt!") |
16 | + | |
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 Player = game.Players.LocalPlayer |
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 | - | local maus = Player:GetMouse() |
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 | - | CloudMesh.MeshId = "http://www.roblox.com/asset/?id=1095708" |
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 | - | S.SoundId = "rbxassetid://170020261" |
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 | ||
84 | print("Made by xdielivex.") | |
85 | ||
86 | print("xdielivex's sound loader") | |
87 | ||
88 | print("play (ID) [Changes song]") | |
89 | ||
90 | print("pitch (#) [normal pitch is '10'][THIS IS FIXED AAAAAAAAAAAAAAAAAA, Sound.Pitch was Depreciated and never knew, hence why it never worked]") | |
91 | ||
92 | ||
93 | ||
94 | local Player = owner | |
95 | ||
96 | local Character = Player.Character | |
97 | ||
98 | local H = Character["Head"] | |
99 | ||
100 | local multiplier = 4 | |
101 | ||
102 | local ltdb = false | |
103 | ||
104 | local Cloud = Instance.new('Part',Character) | |
105 | ||
106 | Cloud.Size = Vector3.new(1,1,1) | |
107 | ||
108 | Cloud.Anchored = true | |
109 | ||
110 | Cloud.CanCollide = false | |
111 | ||
112 | Cloud.Transparency = 0 | |
113 | ||
114 | ||
115 | ||
116 | - | if m:match("!play%s%d+") then |
116 | + | |
117 | ||
118 | CloudMesh.Scale = Vector3.new(5,1,5) | |
119 | ||
120 | - | S.SoundId = "rbxassetid://"..m:match("!play%s(%d+)") |
120 | + | CloudMesh.MeshId = "http://www.roblox.com/asset/?id=0" |
121 | ||
122 | CloudMesh.Offset = Vector3.new(0,1,0) | |
123 | ||
124 | - | elseif m:match("!volume%s%d+") then |
124 | + | |
125 | local loudness = 0 | |
126 | - | S.Volume = m:match("!volume%s(%d+)") |
126 | + | |
127 | ||
128 | - | Volume = m:match("!volume%s(%d+)") |
128 | + | |
129 | local S = Instance.new('Sound',Cloud) | |
130 | - | elseif m:match("!pitch%s%d+") then |
130 | + | |
131 | S.SoundId = "rbxassetid://0" | |
132 | - | S.PlaybackSpeed = m:match("!pitch%s(%d+)")/10 |
132 | + | |
133 | S.Looped = true | |
134 | - | elseif m:match("!snow") then |
134 | + | |
135 | S.Volume = 8 | |
136 | ||
137 | S.PlaybackSpeed = 1 | |
138 | ||
139 | S.MaxDistance = 100 | |
140 | ||
141 | S:Play() | |
142 | ||
143 | ||
144 | - | elseif m:match("!rain") then |
144 | + | |
145 | ||
146 | ||
147 | ||
148 | local Rain = Instance.new('ParticleEmitter',Cloud) | |
149 | ||
150 | Rain.Color = ColorSequence.new(Color3.new(1,1,1),Color3.fromRGB(175,255,255)) | |
151 | ||
152 | Rain.Size = NumberSequence.new(.5) | |
153 | ||
154 | - | elseif m:match("!rate%s%d+") then |
154 | + | |
155 | ||
156 | - | multiplier = m:match("!rate%s(%d+)") |
156 | + | |
157 | ||
158 | - | elseif m:match("!rr") then |
158 | + | |
159 | ||
160 | Rain.Lifetime = NumberRange.new(5,10) | |
161 | ||
162 | - | elseif m:match("!pbs") then |
162 | + | |
163 | ||
164 | ||
165 | ||
166 | - | elseif m:match("!rot") then |
166 | + | |
167 | ||
168 | Shade.Range = 10 | |
169 | ||
170 | Shade.Color = Color3.fromRGB(50,50,50) | |
171 | ||
172 | Shade.Enabled = true | |
173 | ||
174 | Shade.Shadows = true | |
175 | ||
176 | ||
177 | ||
178 | local rad = math.rad | |
179 | ||
180 | local sin = math.sin | |
181 | ||
182 | local tan = math.tan | |
183 | ||
184 | local cos = math.cos | |
185 | ||
186 | Player.Chatted:connect(function(m) | |
187 | ||
188 | if m:match("play%s%d+") then | |
189 | ||
190 | S:Stop() | |
191 | ||
192 | S.SoundId = "rbxassetid://"..m:match("play%s(%d+)") | |
193 | ||
194 | S:Play() | |
195 | ||
196 | elseif m:match("volume%s%d+") then | |
197 | ||
198 | S.Volume = m:match("volume%s(%d+)") | |
199 | ||
200 | Volume = m:match("volume%s(%d+)") | |
201 | ||
202 | elseif m:match("pitch%s%d+") then | |
203 | ||
204 | S.PlaybackSpeed = m:match("pitch%s(%d+)")/10 | |
205 | ||
206 | elseif m:match("snow") then | |
207 | ||
208 | Rain.Texture = "http://www.roblox.com/asset/?id=605668174" | |
209 | ||
210 | Rain.Acceleration = Vector3.new(0,-10,0) | |
211 | ||
212 | Rain.Lifetime = NumberRange.new(15,20) | |
213 | ||
214 | Rain.Size = NumberSequence.new(.2) | |
215 | ||
216 | elseif m:match("rain") then | |
217 | ||
218 | Rain.Texture = "http://www.roblox.com/asset/?id=241876428" | |
219 | ||
220 | Rain.Acceleration = Vector3.new(0,-150,0) | |
221 | ||
222 | Rain.Lifetime = NumberRange.new(5,10) | |
223 | ||
224 | Rain.Size = NumberSequence.new(.5) | |
225 | ||
226 | elseif m:match("rate%s%d+") then | |
227 | ||
228 | multiplier = m:match("rate%s(%d+)") | |
229 | ||
230 | elseif m:match("rr") then | |
231 | ||
232 | print(Rain.Rate) | |
233 | ||
234 | elseif m:match("pbs") then | |
235 | ||
236 | print(S.PlaybackSpeed) | |
237 | ||
238 | elseif m:match("rot") then | |
239 | ||
240 | print(Cloud.Rotation) | |
241 | ||
242 | end | |
243 | end) | |
244 | ||
245 | ||
246 | ||
247 | function Weld(x,y) | |
248 | ||
249 | local w = Instance.new("Weld") | |
250 | ||
251 | w.Part0 = x | |
252 | ||
253 | w.Part1 = y | |
254 | ||
255 | w.Name = tostring(y.Name).."_Weld" | |
256 | ||
257 | w.Parent = x | |
258 | ||
259 | return w | |
260 | ||
261 | end | |
262 | ||
263 | ||
264 | ||
265 | function Clerp(start,destination,increment) | |
266 | ||
267 | local function slerp(a,b,c)return (1-c)*a+(c*b)end | |
268 | ||
269 | local c1 = {start.X,start.Y,start.Z,start:toEulerAnglesXYZ()} | |
270 | ||
271 | local c2 = {destination.X,destination.Y,destination.Z,destination:toEulerAnglesXYZ()} | |
272 | ||
273 | for i,v in pairs(c1)do c1[i] = slerp(v,c2[i],increment)end | |
274 | ||
275 | return CFrame.new(c1[1],c1[2],c1[3])*CFrame.Angles(c1[4],c1[5],c1[6]) | |
276 | ||
277 | end | |
278 | ||
279 | ||
280 | ||
281 | DrawLightning = function(Start,End,Times,Offset,Color,Thickness) | |
282 | ||
283 | if Start.y>End.y then | |
284 | ||
285 | - | maus.Button1Down:connect(function() |
285 | + | |
286 | ||
287 | local curpos = Start | |
288 | ||
289 | local trz = {-Offset,Offset} | |
290 | ||
291 | - | DrawLightning(Cloud.CFrame.p,maus.Hit.p,5,.5,BrickColor.new("New Yeller"),.2) |
291 | + | |
292 | ||
293 | local li = Instance.new("Part",workspace) | |
294 | ||
295 | li.TopSurface =10 | |
296 | ||
297 | li.BottomSurface = 10 | |
298 | ||
299 | li.Anchored = true | |
300 | ||
301 | li.Transparency = 0 | |
302 | ||
303 | li.BrickColor = Color | |
304 | ||
305 | li.formFactor = "Custom" | |
306 | ||
307 | li.CanCollide = false | |
308 | ||
309 | li.Size = Vector3.new(Thickness,Thickness,magz/Times) | |
310 | ||
311 | local lt=Instance.new("SpotLight",li) | |
312 | ||
313 | lt.Range=16 | |
314 | ||
315 | lt.Brightness=5 | |
316 | ||
317 | lt.Shadows=true | |
318 | ||
319 | lt.Angle=45 | |
320 | ||
321 | lt.Face="Top" | |
322 | ||
323 | lt.Color=li.BrickColor.Color | |
324 | ||
325 | local ofz = Vector3.new(trz[math.random(1,2)],trz[math.random(1,2)],trz[math.random(1,2)]) | |
326 | ||
327 | local trolpos = CFrame.new(curpos,End)*CFrame.new(0,0,magz/Times).p+ofz | |
328 | ||
329 | if Times == i then | |
330 | ||
331 | local magz2 = (curpos - End).magnitude | |
332 | ||
333 | li.Size = Vector3.new(Thickness,Thickness,magz2) | |
334 | ||
335 | li.CFrame = CFrame.new(curpos,End)*CFrame.new(0,0,-magz2/2) | |
336 | ||
337 | else | |
338 | ||
339 | li.CFrame = CFrame.new(curpos,trolpos)*CFrame.new(0,0,magz/Times/2) | |
340 | ||
341 | end | |
342 | ||
343 | curpos = li.CFrame*CFrame.new(0,0,magz/Times/2).p Spawn(function() for i=1,5 do wait() li.Transparency = li.Transparency+.2 end li:Destroy() end) | |
344 | ||
345 | end | |
346 | ||
347 | for i,x in pairs(workspace:GetChildren()) do if x:IsA'Model' and x:findFirstChild('Head') and x~=Character and x.Name~="Zuu_Roku" then | |
348 | ||
349 | for a,v in pairs(x:GetChildren()) do if v:IsA'Humanoid' then if (x.Head.CFrame.p-End).magnitude<10 then x:BreakJoints() end end end end end | |
350 | ||
351 | end | |
352 | ||
353 | end | |
354 | ||
355 | ||
356 | ||
357 | Mouse.Button1Down:connect(function() | |
358 | ||
359 | if ltdb==false then | |
360 | ||
361 | ltdb=true | |
362 | ||
363 | DrawLightning(Cloud.CFrame.p,Mouse.Hit.p,5,.5,BrickColor.new("New Yeller"),.2) | |
364 | ||
365 | wait() | |
366 | ||
367 | ltdb=false | |
368 | ||
369 | end | |
370 | ||
371 | end) | |
372 | ||
373 | local Spinny = 0 | |
374 | ||
375 | local NoU = 0 | |
376 | ||
377 | while true do | |
378 | ||
379 | Rain.Rate = (S.PlaybackLoudness + 1) * multiplier/5 | |
380 | ||
381 | game:GetService('RunService').RenderStepped:wait() | |
382 | ||
383 | local HP = H.CFrame.p | |
384 | ||
385 | local sizer = S.PlaybackLoudness/55 + 5 | |
386 | ||
387 | Cloud.Size = Vector3.new(sizer,1,sizer) | |
388 | ||
389 | Shade.Range = sizer | |
390 | ||
391 | CloudMesh.Scale = Vector3.new(sizer,5,sizer) | |
392 | ||
393 | Cloud.CFrame = Clerp(Cloud.CFrame, CFrame.new(HP + Vector3.new(0,4,0))*CFrame.Angles(0,rad(90),0), .1) | |
394 | ||
395 | Cloud.BrickColor = BrickColor.new(Color3.fromRGB(255 - S.PlaybackLoudness/2, 255-S.PlaybackLoudness/2, 255-S.PlaybackLoudness/2)) | |
396 | end |