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