View difference between Paste ID: 78MVbnUM and vqhziQi6
SHOW: | | - or go back to the newest paste.
1-
--written by kent911t =D
1+
2
3
FakeHeartbeat=Instance.new('BindableEvent',script)
4
FakeHeartbeat.Name='Heartbeat'
5
script:WaitForChild("Heartbeat")
6
frame = 1/60
7
tf = 0
8
allowframeloss = false
9
tossremainder = false
10
flastframe = tick()
11
script.Heartbeat:Fire()
12
game:GetService("RunService").Heartbeat:connect(function(s, p)
13
  tf = tf + s
14
  if frame <= tf then
15
    if allowframeloss then
16
      script.Heartbeat:Fire()
17
      flastframe = tick()
18
    else
19
      for i = 1, math.floor(tf / frame) do
20
        script.Heartbeat:Fire()
21
      end
22
      flastframe = tick()
23
    end
24
    if tossremainder then
25
      tf = 0
26
    else
27
      tf = tf - frame * math.floor(tf / frame)
28
    end
29
  end
30
end)
31
32
swait = function(t)
33
  if t == nil then
34
    t = 1/60
35
  else
36
    if t == 0 then
37
      t = 1/60
38
    end
39
  end
40
  local s = 0
41
  local stime = tick()
42
  for i_ = 1, t * 60 do
43
    FakeHeartbeat.Event:wait(0)
44
  end
45
  return tick() - stime, workspace.DistributedGameTime
46
end
47
48
local ScreenGui = Instance.new("ScreenGui")
49
local TextBox = Instance.new("TextBox")
50
local TextButton = Instance.new("TextButton")
51
52
ScreenGui.Parent = game.Players.LocalPlayer.PlayerGui
53
54
TextBox.Parent = ScreenGui
55
TextBox.BackgroundColor3 = Color3.new(0,0.0978764,0)
56-
TextBox.BackgroundColor3 = Color3.new(0.529412, 0.529412, 0.529412)
56+
57
TextBox.Size = UDim2.new(0, 200, 0, 50)
58
TextBox.Font = Enum.Font.Cartoon
59-
TextBox.Font = Enum.Font.SciFi
59+
60
TextBox.Text = "ID Here"
61
TextBox.TextColor = BrickColor.new("Institutional white")
62
63
TextButton.Parent = TextBox
64
TextButton.BackgroundColor3 = Color3.new(1, 0, 0.0156863)
65
TextButton.Position = UDim2.new(0, 200, 0, 0)
66-
TextButton.Font = Enum.Font.SciFi
66+
67
TextButton.Font = Enum.Font.Cartoon
68-
TextButton.Text = "OK"
68+
69
TextButton.Text = "Play"
70
71
-------------------------
72
73
a=Instance.new("Part", game.Players.LocalPlayer.Character)
74
a.Name = "Visualizer"
75
a.Anchored = false
76
a.CanCollide = false
77-
a.BrickColor = BrickColor.new("Really red")
77+
78-
a.Material = "Neon"
78+
a.BrickColor = BrickColor.new("Really black")
79
a.Material = "Glass"
80
a.Transparency = 0.5
81
b = Instance.new("SpecialMesh")
82
b.MeshType = "Sphere"
83
b.Parent = a
84
85
we = Instance.new("Weld")
86
we.Part0 = a
87-
we.C0 = CFrame.new(-2.5, -3, 5)*CFrame.fromEulerAnglesXYZ(0, -90, 0)
87+
88
we.C0 = CFrame.new(-1.6, -3, 5)*CFrame.fromEulerAnglesXYZ(0, -90, 0)
89
we.Parent = a
90
91
c=Instance.new("Part", game.Players.LocalPlayer.Character)
92
c.Name = "Visualizer2"
93
c.Anchored = false
94
c.CanCollide = false
95-
c.BrickColor = BrickColor.new("White")
95+
96
c.BrickColor = BrickColor.new("Really red")
97
c.Material = "Neon"
98
c.Transparency = 0
99
d = Instance.new("SpecialMesh")
100
d.MeshType = "Sphere"
101
d.Parent = c
102
103
we2 = Instance.new("Weld")
104
we2.Part0 = c
105-
we2.C0 = CFrame.new(-2.5, -3, 5)*CFrame.fromEulerAnglesXYZ(0, -90, 0)
105+
106
we2.C0 = CFrame.new(-1.6, -3, 5)*CFrame.fromEulerAnglesXYZ(0, -90, 0)
107
we2.Parent = c
108
109
model2 = Instance.new("Model", game.Players.LocalPlayer.Character)
110
model2.Name = "Rings"
111
112
local ri = Instance.new("Part", model2)
113
	ri.Name = "Wave"
114-
	ri.Transparency = 0
114+
115
	ri.Transparency = 0.5
116
	ri.Material = "Glass"
117
	ri.Size = Vector3.new(0, 0, 0)
118
	ri.CanCollide = false
119
	ri.Rotation = Vector3.new(90, 0, 0)
120
	ri.BrickColor = BrickColor.new("Really black")
121
	local mesh4 = Instance.new("SpecialMesh")
122
	mesh4.MeshType = "FileMesh"
123
	mesh4.MeshId = "http://www.roblox.com/asset/?id=3270017"
124
	mesh4.Parent = ri
125
	
126
local ri2 = Instance.new("Part", model2)
127-
	ri2.Transparency = 0
127+
128
	ri2.Anchored = true
129
	ri2.Transparency = 0.5
130
	ri.Material = "Glass"
131-
	ri2.BrickColor = BrickColor.new("Really black")
131+
132
	ri2.CanCollide = false
133
	ri2.Rotation = Vector3.new(90, 0, 0)
134
	ri2.BrickColor = BrickColor.new("Really red")
135
	local mesh5 = Instance.new("SpecialMesh")
136
	mesh5.MeshType = "FileMesh"
137
	mesh5.MeshId = "http://www.roblox.com/asset/?id=3270017"
138
	mesh5.Parent = ri2
139
140
for _, v in pairs(model2:GetChildren()) do
141
	local newPos = Instance.new("BodyPosition") -- making a BodyPosition to put in each ring so that the rings will stay in the right place
142
	newPos.Parent = v
143
	newPos.position = a.Position
144
	newPos.maxForce = Vector3.new(math.huge,math.huge,math.huge)
145
	local newSpin = Instance.new("BodyAngularVelocity") -- this is to make the rings spin
146
	newSpin.Parent = v
147
	local spinPower = 10000
148
	newSpin.maxTorque = Vector3.new(spinPower,spinPower,spinPower)
149
	newSpin.angularvelocity = Vector3.new(math.random(0,200)/100,math.random(0,200)/100,math.random(0,200)/100) -- making thier spin random
150
	v.CFrame = v.CFrame * CFrame.Angles(math.random(1,360),math.random(1,360),math.random(1,360)) -- starting the ring at a random rotation
151
	v.Anchored = false -- unanchoring the ring after it is set up so that it can now spin
152
end
153
154
wave = function()
155
	if doingwave == false then
156
	doingwave = true
157-
	ioe.Transparency = 0
157+
158
	ioe.Name = "Wave"
159
	ioe.Anchored = true
160
	ioe.Transparency = 0.5
161-
	ioe.BrickColor = BrickColor.new("Really black")
161+
	ioe.Material = "Neon"
162
	ioe.Size = Vector3.new(0, 0, 0)
163
	ioe.CanCollide = false
164-
	mesh.MeshId = "http://www.roblox.com/asset/?id=3270017"
164+
165
	ioe.BrickColor = BrickColor.new("Really red")
166
	local mesh = Instance.new("SpecialMesh")
167
	mesh.MeshType = "FileMesh"
168
	mesh.MeshId = "http://www.roblox.com/asset/?id=24388358"
169
	mesh.Parent = ioe
170
	mesh.Scale = Vector3.new(1.1, 1.1, 1.1)
171-
			mesh.Scale = mesh.Scale + Vector3.new(mesh.Scale.x / 3, mesh.Scale.y / 3, 0.5)
171+
172
		for i = 1, 10 do
173
			swait()
174
			ioe.Position = a.Position
175
			mesh.Scale = mesh.Scale + Vector3.new(mesh.Scale.x / 3, mesh.Scale.y / 3, 3)
176
			ioe.Transparency = ioe.Transparency + 0.01
177
		end
178
		ioe:Destroy()
179
		doingwave = false
180
	end))
181
	else
182
	return
183
	end
184
end
185
186
function onClicked()
187
local id = TextBox.Text
188
if a:FindFirstChild("Sound") then
189
	a.Sound:Destroy()
190
end
191
local sou = Instance.new("Sound", a)
192
sou.Looped = true
193
sou.Pitch = 1
194
sou.Volume = 1
195
sou.SoundId = ("http://www.roblox.com/asset/?id="..id)
196
wait()
197
sou:Play()
198
end 
199
TextButton.MouseButton1Down:connect(onClicked)
200
201
coroutine.resume(coroutine.create(function()
202
	game:GetService("RunService").RenderStepped:connect(function()
203
		if a:FindFirstChild("Sound") ~= nil then
204
		local soundvolume = a.Sound.PlaybackLoudness
205
		b.Scale = Vector3.new(soundvolume / 20, soundvolume / 20, soundvolume / 20)
206
		d.Scale = Vector3.new(soundvolume / 60, soundvolume / 60, soundvolume / 60)
207
		mesh5.Scale = Vector3.new(soundvolume / 120, soundvolume / 120, 0.5)
208
		mesh4.Scale = Vector3.new(soundvolume / 120, soundvolume / 120, 0.5)
209
		ri.Transparency = 0
210
		ri2.Transparency = 0
211
		ri.Position = a.Position
212
		ri2.Position = a.Position
213
		if soundvolume < 150 then
214
			a.BrickColor = BrickColor.new("Black")
215
			c.BrickColor = BrickColor.new("White")
216
		elseif soundvolume >= 500 and soundvolume <= 750 then
217
			a.BrickColor = BrickColor.new("White")
218
			c.BrickColor = BrickColor.new("Black")
219
			wave()
220
			elseif soundvolume > 750 then
221
			a.BrickColor = BrickColor.random()
222
			c.BrickColor = BrickColor.new("White")
223
			elseif soundvolume <= 500 and soundvolume >= 150 then
224
			a.BrickColor = BrickColor.new("Really red")
225
			c.BrickColor = BrickColor.new("White")
226
		end
227
		else
228
			b.Scale = Vector3.new(0.01, 0.01, 0.01)
229
			d.Scale = Vector3.new(0.01, 0.01, 0.01)
230
			ri.Transparency = 1
231
			ri2.Transparency = 1
232
		end
233
	end)
234
end))