View difference between Paste ID: 6xSDpqpX and yxfG5wJp
SHOW: | | - or go back to the newest paste.
1
if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
2
local Player,Mouse,mouse,UserInputService,ContextActionService = owner
3
local RealPlayer = Player
4
do print("FE Compatibility code by Mokiros")local a=RealPlayer;script.Parent=a.Character;local b=Instance.new("RemoteEvent")b.Name="UserInput_Event"local function c()local d={_fakeEvent=true,Functions={},Connect=function(self,e)table.insert(self.Functions,e)end}d.connect=d.Connect;return d end;local f={Target=nil,Hit=CFrame.new(),KeyUp=c(),KeyDown=c(),Button1Up=c(),Button1Down=c(),Button2Up=c(),Button2Down=c()}local g={InputBegan=c(),InputEnded=c()}local CAS={Actions={},BindAction=function(self,h,i,j,...)CAS.Actions[h]=i and{Name=h,Function=i,Keys={...}}or nil end}CAS.UnbindAction=CAS.BindAction;local function k(self,l,...)local d=f[l]if d and d._fakeEvent then for m,e in pairs(d.Functions)do e(...)end end end;f.TrigEvent=k;g.TrigEvent=k;b.OnServerEvent:Connect(function(n,o)if n~=a then return end;f.Target=o.Target;f.Hit=o.Hit;if not o.isMouse then local p=o.UserInputState==Enum.UserInputState.Begin;if o.UserInputType==Enum.UserInputType.MouseButton1 then return f:TrigEvent(p and"Button1Down"or"Button1Up")end;if o.UserInputType==Enum.UserInputType.MouseButton2 then return f:TrigEvent(p and"Button2Down"or"Button2Up")end;for m,d in pairs(CAS.Actions)do for m,q in pairs(d.Keys)do if q==o.KeyCode then d.Function(d.Name,o.UserInputState,o)end end end;f:TrigEvent(p and"KeyDown"or"KeyUp",o.KeyCode.Name:lower())g:TrigEvent(p and"InputBegan"or"InputEnded",o,false)end end)b.Parent=NLS([==[local a=game:GetService("Players").LocalPlayer;local b=script:WaitForChild("UserInput_Event")local c=a:GetMouse()local d=game:GetService("UserInputService")local e=function(f,g)if g then return end;b:FireServer({KeyCode=f.KeyCode,UserInputType=f.UserInputType,UserInputState=f.UserInputState,Hit=c.Hit,Target=c.Target})end;d.InputBegan:Connect(e)d.InputEnded:Connect(e)local h,i;while wait(1/30)do if h~=c.Hit or i~=c.Target then h,i=c.Hit,c.Target;b:FireServer({isMouse=true,Target=i,Hit=h})end end]==],Player.Character)local r=game;local s={__index=function(self,q)local t=rawget(self,"_RealService")if t then return typeof(t[q])=="function"and function(m,...)return t[q](t,...)end or t[q]end end,__newindex=function(self,q,u)local t=rawget(self,"_RealService")if t then t[q]=u end end}local function v(d,w)d._RealService=typeof(w)=="string"and r:GetService(w)or w;return setmetatable(d,s)end;local x={GetService=function(self,t)return rawget(self,t)or r:GetService(t)end,Players=v({LocalPlayer=v({GetMouse=function(self)return f end},Player)},"Players"),UserInputService=v(g,"UserInputService"),ContextActionService=v(CAS,"ContextActionService"),RunService=v({_btrs={},RenderStepped=r:GetService("RunService").Heartbeat,BindToRenderStep=function(self,h,m,i)self._btrs[h]=self.Heartbeat:Connect(i)end,UnbindFromRenderStep=function(self,h)self._btrs[h]:Disconnect()end},"RunService")}rawset(x.Players,"localPlayer",x.Players.LocalPlayer)x.service=x.GetService;v(x,game)game,owner=x,x.Players.LocalPlayer end
5
6
-- Made by Zuu_Roku w/ Help from Cass!
7
-- Venge is ok happy? But nebby is better /e dab
8
9
print("Made by Zuu_Roku, Thanks Cass for Cloud CLerp.")
10
11
print("Rain Cloud Visualizer (Update 1.2 I guess) Commands:")
12
13
print("!play (ID) [Changes song]")
14
15
print("!pitch (#) [normal pitch is '10'][THIS IS FIXED AAAAAAAAAAAAAAAAAA, Sound.Pitch was Depreciated and never knew, hence why it never worked]")
16
17
print("!snow / !rain [Changes Weather]")
18
19
print("!rate (#) [Changes amount of particles]")
20
21
print("Click for a Lightning bolt!")
22
23
24
25
local Player = game.Players.LocalPlayer
26
27
local Character = Player.Character
28
29
local maus = Player:GetMouse()
30
31
local H = Character["Head"]
32
33
local multiplier = 4
34
35
local ltdb = false
36
37
local Cloud = Instance.new('Part',Character)
38
39
Cloud.Size = Vector3.new(1,1,1)
40
41
Cloud.Anchored = true
42
43
Cloud.CanCollide = false
44
45
Cloud.Transparency = 0
46
47
48
49
local CloudMesh = Instance.new('SpecialMesh',Cloud)
50
51
CloudMesh.Scale = Vector3.new(5,1,5)
52
53
CloudMesh.MeshId = "http://www.roblox.com/asset/?id=1095708"
54
55
CloudMesh.Offset = Vector3.new(0,1,0)
56
57
58
local loudness = 0
59
60
61
62
local S = Instance.new('Sound',Cloud)
63
64
S.SoundId = "rbxassetid://170020261"
65
66
S.Looped = true
67
68
S.Volume = 8
69
70
S.PlaybackSpeed = 1
71
72
S.MaxDistance = 100
73
74
S:Play()
75
76
77
local Volume = 5
78
79
80
81
local Rain = Instance.new('ParticleEmitter',Cloud)
82
83
Rain.Color = ColorSequence.new(Color3.new(1,1,1),Color3.fromRGB(175,255,255))
84
85
Rain.Size = NumberSequence.new(.5)
86
87
Rain.Texture = "http://www.roblox.com/asset/?id=241876428"
88
89
Rain.Transparency = NumberSequence.new(0,.6)
90
91
Rain.Acceleration = Vector3.new(0,-150,0)
92
93
Rain.Lifetime = NumberRange.new(5,10)
94
95
Rain.Rate = 100
96
97
98
99
local Shade = Instance.new('PointLight',Cloud)
100
101
Shade.Range = 10
102
103
Shade.Color = Color3.fromRGB(50,50,50)
104
105
Shade.Enabled = true
106
107
Shade.Shadows = true
108
109
110
111
local rad = math.rad
112
113
local sin = math.sin
114
115
local tan = math.tan
116
117
local cos = math.cos
118
119
Player.Chatted:connect(function(m)
120
121
	if m:match("!play%s%d+") then
122
123
		S:Stop()
124
125
		S.SoundId = "rbxassetid://"..m:match("!play%s(%d+)")
126
127
		S:Play()
128
129
	elseif m:match("!volume%s%d+") then
130
131
		S.Volume = m:match("!volume%s(%d+)")
132
133
		Volume = m:match("!volume%s(%d+)")
134
135
	elseif m:match("!pitch%s%d+") then
136
137
		S.PlaybackSpeed = m:match("!pitch%s(%d+)")/10
138
139
	elseif m:match("!snow") then
140
141
		Rain.Texture = "http://www.roblox.com/asset/?id=605668174"
142
143
		Rain.Acceleration = Vector3.new(0,-10,0)
144
145
		Rain.Lifetime = NumberRange.new(15,20)
146
147
		Rain.Size = NumberSequence.new(.2)
148
149
	elseif m:match("!rain") then
150
151
		Rain.Texture = "http://www.roblox.com/asset/?id=241876428"
152
153
		Rain.Acceleration = Vector3.new(0,-150,0)
154
155
		Rain.Lifetime = NumberRange.new(5,10)
156
157
		Rain.Size = NumberSequence.new(.5)
158
159
	elseif m:match("!rate%s%d+") then
160
161
		multiplier = m:match("!rate%s(%d+)")
162
163
	elseif m:match("!rr") then
164
165
		print(Rain.Rate)
166
167
	elseif m:match("!pbs") then
168
	
169
		print(S.PlaybackSpeed)
170
171
	elseif m:match("!rot") then
172
173
		print(Cloud.Rotation)
174
175
	end
176
end)
177
178
179
180
function Weld(x,y)
181
182
	local w = Instance.new("Weld")
183
184
	w.Part0 = x
185
186
	w.Part1 = y
187
188
	w.Name = tostring(y.Name).."_Weld"
189
190
	w.Parent = x
191
192
	return w
193
194
end
195
196
197
198
function Clerp(start,destination,increment)
199
200
    local function slerp(a,b,c)return (1-c)*a+(c*b)end
201
202
    local c1 = {start.X,start.Y,start.Z,start:toEulerAnglesXYZ()}
203
204
    local c2 = {destination.X,destination.Y,destination.Z,destination:toEulerAnglesXYZ()}
205
206
    for i,v in pairs(c1)do c1[i] = slerp(v,c2[i],increment)end
207
208
    return CFrame.new(c1[1],c1[2],c1[3])*CFrame.Angles(c1[4],c1[5],c1[6])
209
210
end
211
212
213
214
DrawLightning = function(Start,End,Times,Offset,Color,Thickness)
215
216
if Start.y>End.y then
217
218
local magz = (Start - End).magnitude 
219
220
local curpos = Start 
221
222
local trz = {-Offset,Offset}
223
224
for i=1,Times do 
225
226
local li = Instance.new("Part",workspace) 
227
228
li.TopSurface =10 
229
230
li.BottomSurface = 10 
231
232
li.Anchored = true  
233
234
li.Transparency = 0 
235
236
li.BrickColor = Color
237
238
li.formFactor = "Custom" 
239
240
li.CanCollide = false 
241
242
li.Size = Vector3.new(Thickness,Thickness,magz/Times) 
243
244
local lt=Instance.new("SpotLight",li)
245
246
lt.Range=16
247
248
lt.Brightness=5
249
250
lt.Shadows=true
251
252
lt.Angle=45
253
254
lt.Face="Top"
255
256
lt.Color=li.BrickColor.Color
257
258
local ofz = Vector3.new(trz[math.random(1,2)],trz[math.random(1,2)],trz[math.random(1,2)]) 
259
260
local trolpos = CFrame.new(curpos,End)*CFrame.new(0,0,magz/Times).p+ofz
261
262
if Times == i then 
263
264
local magz2 = (curpos - End).magnitude 
265
266
li.Size = Vector3.new(Thickness,Thickness,magz2)
267
268
li.CFrame = CFrame.new(curpos,End)*CFrame.new(0,0,-magz2/2)
269
270
else
271
272
li.CFrame = CFrame.new(curpos,trolpos)*CFrame.new(0,0,magz/Times/2)
273
274
end
275
276
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)
277
278
end
279
280
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
281
282
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
283
284
end
285
286
end
287
288
289
290
maus.Button1Down:connect(function()
291
292
if ltdb==false then
293
294
ltdb=true
295
296
DrawLightning(Cloud.CFrame.p,maus.Hit.p,5,.5,BrickColor.new("New Yeller"),.2)
297
298
wait()
299
300
ltdb=false
301
302
end
303
304
end)
305
306
local Spinny = 0
307
308
local NoU = 0
309
310
while true do
311
	
312
	Rain.Rate = (S.PlaybackLoudness + 1) * multiplier/5
313
314
	game:GetService('RunService').RenderStepped:wait()
315
316
	local HP = H.CFrame.p
317
318
	local sizer = S.PlaybackLoudness/55 + 5
319
	
320
	Cloud.Size = Vector3.new(sizer,1,sizer)
321
	
322
	Shade.Range = sizer
323
324
	CloudMesh.Scale = Vector3.new(sizer,5,sizer)
325
326
	Cloud.CFrame = Clerp(Cloud.CFrame, CFrame.new(HP + Vector3.new(0,4,0))*CFrame.Angles(0,rad(90),0), .1)
327
328
	Cloud.BrickColor = BrickColor.new(Color3.fromRGB(255 - S.PlaybackLoudness/2, 255-S.PlaybackLoudness/2, 255-S.PlaybackLoudness/2))
329
end