View difference between Paste ID: W896RRra and yxfG5wJp
SHOW: | | - or go back to the newest paste.
1
if game:GetService("RunService"):IsClient()then error("Please run as a server script. Use h/ instead of hl/.")end;print("FE Compatibility: by WaverlyCole");InternalData = {}
2
do
3
    script.Parent = owner.Character
4
    local Event = Instance.new("RemoteEvent");Event.Name = "UserInput"
5
    local function NewFakeEvent()
6
        local Bind = Instance.new("BindableEvent")
7
        local Fake;Fake = {Connections = {},
8
        fakeEvent=true;
9
        Connect=function(self,Func)
10
            Bind.Event:connect(Func)
11
            self.Connections[Bind] = true
12
            return setmetatable({Connected = true},{
13
            __index = function (self,Index)
14
                if Index:lower() == "disconnect" then
15
                    return function() Fake.Connections[Bind] = false;self.Connected = false end
16
                end
17
                return Fake[Index]
18
            end;
19
            __tostring = function() return "Connection" end;
20
        })
21
        end}
22
        Fake.connect = Fake.Connect;return Fake;
23
    end
24
    local Mouse = {Target=nil,Hit=CFrame.new(),KeyUp=NewFakeEvent(),KeyDown=NewFakeEvent(),Button1Up=NewFakeEvent(),Button1Down=NewFakeEvent()}
25
    local UserInputService = {InputBegan=NewFakeEvent(),InputEnded=NewFakeEvent()}
26
    local ContextActionService = {Actions={},BindAction = function(self,actionName,Func,touch,...)
27
        self.Actions[actionName] = Func and {Name=actionName,Function=Func,Keys={...}} or nil
28
    end};ContextActionService.UnBindAction = ContextActionService.BindAction
29
    local function TriggerEvent(self,Event,...)
30
        local Trigger = Mouse[Event]
31
        if Trigger and Trigger.fakeEvent and Trigger.Connections then
32
            for Connection,Active in pairs(Trigger.Connections) do if Active then Connection:Fire(...) end end
33
        end
34
    end
35
    Mouse.TrigEvent = TriggerEvent;UserInputService.TrigEvent = TriggerEvent
36
    Event.OnServerEvent:Connect(function(FiredBy,Input)
37
        if FiredBy.Name ~= owner.Name then return end
38
        if Input.MouseEvent then
39
            Mouse.Target = Input.Target;Mouse.Hit = Input.Hit
40
        else
41
            local Begin = Input.UserInputState == Enum.UserInputState.Begin
42
            if Input.UserInputType == Enum.UserInputType.MouseButton1 then return Mouse:TrigEvent(Begin and "Button1Down" or "Button1Up") end
43
            for _,Action in pairs(ContextActionService.Actions) do
44
                for _,Key in pairs(Action.Keys) do if Key==Input.KeyCode then Action.Function(Action.Name,Input.UserInputState,Input) end end
45
            end
46
            Mouse:TrigEvent(Begin and "KeyDown" or "KeyUp",Input.KeyCode.Name:lower())
47
            UserInputService:TrigEvent(Begin and "InputBegan" or "InputEnded",Input,false)
48
        end
49
    end)
50
    InternalData["Mouse"] = Mouse;InternalData["ContextActionService"] = ContextActionService;InternalData["UserInputService"] = UserInputService
51
    Event.Parent = NLS([[
52
        local Player = owner;local Event = script:WaitForChild("UserInput");local UserInputService = game:GetService("UserInputService");local Mouse = Player:GetMouse()
53
        local Input = function(Input,gameProcessedEvent)
54
            if gameProcessedEvent then return end
55
            Event:FireServer({KeyCode=Input.KeyCode,UserInputType=Input.UserInputType,UserInputState=Input.UserInputState})
56
        end
57
        UserInputService.InputBegan:Connect(Input);UserInputService.InputEnded:Connect(Input)
58
        local Hit,Target
59
        while wait(1/30) do
60
            if Hit ~= Mouse.Hit or Target ~= Mouse.Target then
61
                Hit,Target = Mouse.Hit,Mouse.Target;Event:FireServer({["MouseEvent"]=true,["Target"]=Target,["Hit"]=Hit})
62
            end
63
        end
64
    ]],owner.Character)
65
end
66
RealGame = game;game = setmetatable({},{
67
    __index = function (self,Index)
68
        local Sandbox = function (Thing)
69
            if Thing:IsA("Player") then
70
                local RealPlayer = Thing
71
                return setmetatable({},{
72
                    __index = function (self,Index)
73
                        local Type = type(RealPlayer[Index])
74
                        if Type == "function" then
75
                            if Index:lower() == "getmouse" or Index:lower() == "mouse" then
76
                                return function (self)return InternalData["Mouse"] end
77
                            end
78
                            return function (self,...)return RealPlayer[Index](RealPlayer,...) end
79
                        end
80
                        return RealPlayer[Index]
81
                    end;
82
                    __tostring = function(self) return RealPlayer.Name end
83
                })
84
            end
85
        end
86
        if RealGame[Index] then
87
            local Type = type(RealGame[Index])
88
            if Type == "function" then
89
                if Index:lower() == "getservice" or Index:lower() == "service" then
90
                    return function (self,Service)
91
                        local FakeServices = {
92
                            ["players"] = function()
93
                                return setmetatable({},{
94
                                    __index = function (self2,Index2)
95
                                        local RealService = RealGame:GetService(Service)
96
                                        local Type2 = type(Index2)
97
                                        if Type2 == "function" then
98
                                            return function (self,...) return RealService[Index2](RealService,...)end
99
                                        else
100
                                            if Index2:lower() == "localplayer" then return Sandbox(owner) end
101
                                            return RealService[Index2]
102
                                        end
103
                                    end;
104
                                    __tostring = function(self) return RealGame:GetService(Service).Name end
105
                                })
106
                            end;
107
                            ["contextactionservice"] = function() return InternalData["ContextActionService"] end;
108
                            ["userinputservice"] = function() return InternalData["UserInputService"] end;
109
                            ["runservice"] = function()
110
                                return setmetatable({},{
111
                                    __index = function(self2,Index2)
112
                                        local RealService = RealGame:GetService(Service)
113
                                        local Type2 = type(Index2)
114
                                        if Type2 == "function" then
115
                                            return function (self,...) return RealService[Index2](RealService,...) end
116
                                        else
117
                                            local RunServices = {
118
                                                ["bindtorenderstep"] = function() return function (self,Name,Priority,Function) return RealGame:GetService("RunService").Stepped:Connect(Function) end end;
119
                                                ["renderstepped"] = function() return RealService["Stepped"] end
120
                                            }
121
                                            if RunServices[Index2:lower()] then return RunServices[Index2:lower()]() end
122
                                            return RealService[Index2]
123
                                        end
124
                                    end
125
                                })
126
                            end
127
                        }
128
                        if FakeServices[Service:lower()] then return FakeServices[Service:lower()]() end
129
                        return RealGame:GetService(Service)
130
                    end
131
                end
132
                return function (self,...) return RealGame[Index](RealGame,...) end
133
            else
134
                if game:GetService(Index) then return game:GetService(Index) end
135
                return RealGame[Index]
136
            end
137
        end
138
        return nil
139
    end
140
});Game = game;owner = game:GetService("Players").LocalPlayer;script = Instance.new("Script");print("Complete! Running...")
141
 
142
-- Made by Zuu_Roku w/ Help from Cass!
143
-- Venge is ok happy? But nebby is better /e dab
144
145
print("Made by Zuu_Roku, Thanks Cass for Cloud CLerp.")
146
147
print("Rain Cloud Visualizer (Update 1.2 I guess) Commands:")
148
149
print("!play (ID) [Changes song]")
150
151
print("!pitch (#) [normal pitch is '10'][THIS IS FIXED AAAAAAAAAAAAAAAAAA, Sound.Pitch was Depreciated and never knew, hence why it never worked]")
152
153
print("!snow / !rain [Changes Weather]")
154
155
print("!rate (#) [Changes amount of particles]")
156
157
print("Click for a Lightning bolt!")
158
159
160
161
local Player = game.Players.LocalPlayer
162
163
local Character = Player.Character
164
165
local maus = Player:GetMouse()
166
167
local H = Character["Head"]
168
169
local multiplier = 4
170
171
local ltdb = false
172
173
local Cloud = Instance.new('Part',Character)
174
175
Cloud.Size = Vector3.new(1,1,1)
176
177
Cloud.Anchored = true
178
179
Cloud.CanCollide = false
180
181
Cloud.Transparency = 0
182
183
184
185
local CloudMesh = Instance.new('SpecialMesh',Cloud)
186
187
CloudMesh.Scale = Vector3.new(5,1,5)
188
189
CloudMesh.MeshId = "http://www.roblox.com/asset/?id=1095708"
190
191
CloudMesh.Offset = Vector3.new(0,1,0)
192
193
194
local loudness = 0
195
196
197
198
local S = Instance.new('Sound',Cloud)
199
200
S.SoundId = "rbxassetid://170020261"
201
202
S.Looped = true
203
204
S.Volume = 8
205
206
S.PlaybackSpeed = 1
207
208
S.MaxDistance = 100
209
210
S:Play()
211
212
213
local Volume = 5
214
215
216
217
local Rain = Instance.new('ParticleEmitter',Cloud)
218
219
Rain.Color = ColorSequence.new(Color3.new(1,1,1),Color3.fromRGB(175,255,255))
220
221
Rain.Size = NumberSequence.new(.5)
222
223
Rain.Texture = "http://www.roblox.com/asset/?id=241876428"
224
225
Rain.Transparency = NumberSequence.new(0,.6)
226
227
Rain.Acceleration = Vector3.new(0,-150,0)
228
229
Rain.Lifetime = NumberRange.new(5,10)
230
231
Rain.Rate = 100
232
233
234
235
local Shade = Instance.new('PointLight',Cloud)
236
237
Shade.Range = 10
238
239
Shade.Color = Color3.fromRGB(50,50,50)
240
241
Shade.Enabled = true
242
243
Shade.Shadows = true
244
245
246
247
local rad = math.rad
248
249
local sin = math.sin
250
251
local tan = math.tan
252
253
local cos = math.cos
254
255
Player.Chatted:connect(function(m)
256
257
	if m:match("!play%s%d+") then
258
259
		S:Stop()
260
261
		S.SoundId = "rbxassetid://"..m:match("!play%s(%d+)")
262
263
		S:Play()
264
265
	elseif m:match("!volume%s%d+") then
266
267
		S.Volume = m:match("!volume%s(%d+)")
268
269
		Volume = m:match("!volume%s(%d+)")
270
271
	elseif m:match("!pitch%s%d+") then
272
273
		S.PlaybackSpeed = m:match("!pitch%s(%d+)")/10
274
275
	elseif m:match("!snow") then
276
277
		Rain.Texture = "http://www.roblox.com/asset/?id=605668174"
278
279
		Rain.Acceleration = Vector3.new(0,-10,0)
280
281
		Rain.Lifetime = NumberRange.new(15,20)
282
283
		Rain.Size = NumberSequence.new(.2)
284
285
	elseif m:match("!rain") then
286
287
		Rain.Texture = "http://www.roblox.com/asset/?id=241876428"
288
289
		Rain.Acceleration = Vector3.new(0,-150,0)
290
291
		Rain.Lifetime = NumberRange.new(5,10)
292
293
		Rain.Size = NumberSequence.new(.5)
294
295
	elseif m:match("!rate%s%d+") then
296
297
		multiplier = m:match("!rate%s(%d+)")
298
299
	elseif m:match("!rr") then
300
301
		print(Rain.Rate)
302
303
	elseif m:match("!pbs") then
304
	
305
		print(S.PlaybackSpeed)
306
307
	elseif m:match("!rot") then
308
309
		print(Cloud.Rotation)
310
311
	end
312
end)
313
314
315
316
function Weld(x,y)
317
318
	local w = Instance.new("Weld")
319
320
	w.Part0 = x
321
322
	w.Part1 = y
323
324
	w.Name = tostring(y.Name).."_Weld"
325
326
	w.Parent = x
327
328
	return w
329
330
end
331
332
333
334
function Clerp(start,destination,increment)
335
336
    local function slerp(a,b,c)return (1-c)*a+(c*b)end
337
338
    local c1 = {start.X,start.Y,start.Z,start:toEulerAnglesXYZ()}
339
340
    local c2 = {destination.X,destination.Y,destination.Z,destination:toEulerAnglesXYZ()}
341
342
    for i,v in pairs(c1)do c1[i] = slerp(v,c2[i],increment)end
343
344
    return CFrame.new(c1[1],c1[2],c1[3])*CFrame.Angles(c1[4],c1[5],c1[6])
345
346
end
347
348
349
350
DrawLightning = function(Start,End,Times,Offset,Color,Thickness)
351
352
if Start.y>End.y then
353
354
local magz = (Start - End).magnitude 
355
356
local curpos = Start 
357
358
local trz = {-Offset,Offset}
359
360
for i=1,Times do 
361
362
local li = Instance.new("Part",workspace) 
363
364
li.TopSurface =10 
365
366
li.BottomSurface = 10 
367
368
li.Anchored = true  
369
370
li.Transparency = 0 
371
372
li.BrickColor = Color
373
374
li.formFactor = "Custom" 
375
376
li.CanCollide = false 
377
378
li.Size = Vector3.new(Thickness,Thickness,magz/Times) 
379
380
local lt=Instance.new("SpotLight",li)
381
382
lt.Range=16
383
384
lt.Brightness=5
385
386
lt.Shadows=true
387
388
lt.Angle=45
389
390
lt.Face="Top"
391
392
lt.Color=li.BrickColor.Color
393
394
local ofz = Vector3.new(trz[math.random(1,2)],trz[math.random(1,2)],trz[math.random(1,2)]) 
395
396
local trolpos = CFrame.new(curpos,End)*CFrame.new(0,0,magz/Times).p+ofz
397
398
if Times == i then 
399
400
local magz2 = (curpos - End).magnitude 
401
402
li.Size = Vector3.new(Thickness,Thickness,magz2)
403
404
li.CFrame = CFrame.new(curpos,End)*CFrame.new(0,0,-magz2/2)
405
406
else
407
408
li.CFrame = CFrame.new(curpos,trolpos)*CFrame.new(0,0,magz/Times/2)
409
410
end
411
412
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)
413
414
end
415
416
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
417
418
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
419
420
end
421
422
end
423
424
425
426
maus.Button1Down:connect(function()
427
428
if ltdb==false then
429
430
ltdb=true
431
432
DrawLightning(Cloud.CFrame.p,maus.Hit.p,5,.5,BrickColor.new("New Yeller"),.2)
433
434
wait()
435
436
ltdb=false
437
438
end
439
440
end)
441
442
local Spinny = 0
443
444
local NoU = 0
445
446
while true do
447
	
448
	Rain.Rate = (S.PlaybackLoudness + 1) * multiplier/5
449
450
	game:GetService('RunService').RenderStepped:wait()
451
452
	local HP = H.CFrame.p
453
454
	local sizer = S.PlaybackLoudness/55 + 5
455
	
456
	Cloud.Size = Vector3.new(sizer,1,sizer)
457
	
458
	Shade.Range = sizer
459
460
	CloudMesh.Scale = Vector3.new(sizer,5,sizer)
461
462
	Cloud.CFrame = Clerp(Cloud.CFrame, CFrame.new(HP + Vector3.new(0,4,0))*CFrame.Angles(0,rad(90),0), .1)
463
464
	Cloud.BrickColor = BrickColor.new(Color3.fromRGB(255 - S.PlaybackLoudness/2, 255-S.PlaybackLoudness/2, 255-S.PlaybackLoudness/2))
465
end