View difference between Paste ID: QJz4jZyq and 7CnGr7cQ
SHOW: | | - or go back to the newest paste.
1
-- ARE YOU READY FOR A MIRACLE?
2
-- READY AS I CAN BE
3
-- ARE YOU READY // READY
4
-- [made by wulfbug9]
5
function rand(a)return (math.random()-.5)*2*a end
6
function q(f,arg)return coroutine.resume(coroutine.create(f),unpack(arg or {}))end
7
function Part(Name,Parent,Size,CFrame,Color,Trans,Anch,Can,Mat,Ref)
8
	local p = Instance.new("Part",Parent)p.Name = Name
9
	p.FormFactor = "Custom"p.Size = Size
10
	p.Anchored = Anch p.CFrame = CFrame
11
	p.BrickColor = BrickColor.new(Color)p.Transparency = Trans
12
	p.TopSurface = 0 p.CanCollide = Can
13
	p.BottomSurface = 0 p.Material = Mat
14
	p.Reflectance = Ref or 0;p:BreakJoints()
15
	p.Locked = true;return p
16
end
17
function Mesh(Parent,Type,Scale,ID,TID)
18
	local m = Instance.new("SpecialMesh",Parent)m.MeshType = Type
19
	m.Scale = Scale or Vector3.new(1,1,1)
20
	if ID then m.MeshId = ID end if TID then m.TextureId = TID end
21
	return m
22
end
23
function Weld(p1,p2,c0,c1)
24
	local w = Instance.new("Weld",p1)w.Part0 = p1;w.Part1 = p2
25
	w.C0,w.C1 = c0 or CFrame.new(),c1 or CFrame.new()
26
	return w
27
end
28
function cslerp(start,destination,increment)
29
	local function s(a,b,c)return (1-c)*a+(c*b)end
30
	local c1 = {start.X,start.Y,start.Z,start:toEulerAnglesXYZ()}
31
	local c2 = {destination.X,destination.Y,destination.Z,destination:toEulerAnglesXYZ()}
32
	for i,v in pairs(c1)do c1[i] = s(v,c2[i],increment)end
33
	return CFrame.new(c1[1],c1[2],c1[3])*CFrame.Angles(c1[4],c1[5],c1[6])
34
end
35
----------------------------------------------
36-
Song = "http://www.roblox.com/asset/?id=158635170"
36+
Song = "http://www.roblox.com/asset/?id=156923402"
37
for i=1,4 do game:service("ContentProvider"):Preload(Song)end
38
step = game:service("RunService").Stepped
39
Figures = {}
40
Sound = Instance.new("Sound",script)
41
Sound.SoundId = Song
42
Sound.Looped = true
43
c0ls = CFrame.new(-1,.5,0)
44
c0rs = CFrame.new(1,.5,0)
45
c1ls = CFrame.new(0.5,0.5,0)
46
c1rs = CFrame.new(-0.5,0.5,0)
47
----------------------------------------------
48
function NewFigure(Parent,TorCF)
49
	local M = Instance.new("Model",Parent)
50
	local T = Part("",M,Vector3.new(2,2,1),TorCF,"Bright red",0,true,true,"Plastic")
51
	local H = Part("",M,Vector3.new(1,1,1),TorCF*CFrame.new(0,1.5,0),"Brown",0,true,true,"Plastic")
52
	local HM = Mesh(H,"Head",Vector3.new(1.25,1.25,1.25))
53
	local LA = Part("",M,Vector3.new(1,2,1),TorCF*CFrame.new(1.5,0,0),"Brown",0,false,true,"Plastic")
54
	local RA = Part("",M,Vector3.new(1,2,1),TorCF*CFrame.new(-1.5,0,0),"Brown",0,false,true,"Plastic")
55
	local LL = Part("",M,Vector3.new(1,2,1),TorCF*CFrame.new(.5,-2,0),"Bright red",0,true,true,"Plastic")
56
	local RL = Part("",M,Vector3.new(1,2,1),TorCF*CFrame.new(-.5,-2,0),"Bright red",0,true,true,"Plastic")
57
	local LAW = Weld(T,LA,c0ls,c1ls)
58
	local RAW = Weld(T,RA,c0rs,c1rs)
59
	LAW.Changed:connect(function()LAW.Part1.CFrame = LAW.Part0.CFrame*LAW.C1*LAW.C0:inverse() end)
60
	RAW.Changed:connect(function()RAW.Part1.CFrame = RAW.Part0.CFrame*RAW.C1*RAW.C0:inverse() end)
61
	table.insert(Figures,
62
		{M,LAW,RAW}
63
	)
64
	return M
65
end
66
----------------------------------------------
67
pcall(function()workspace:FindFirstChild("AreYouReadyForAMiracle    "):Destroy()end)
68
script.Name = "AreYouReadyForAMiracle    "
69
Main = Instance.new("Model",script)
70
Main.Name = "AreYouReadyForAMiracle    "
71
Set1 = Instance.new("Model",Main)
72
Set1.Name = "Set_One"
73
Set1CFrame = CFrame.new(-50,1,0)
74
do
75
	pbase = Part("",Set1,Vector3.new(25,0,50),Set1CFrame,"Dark stone grey",0,true,true,"Brick")
76
	proof = Part("",Set1,Vector3.new(25,0,50),Set1CFrame*CFrame.new(0,25,0),"Dark stone grey",0,true,true,"Brick")
77
	p1 = Part("",Set1,Vector3.new(0,25,50),Set1CFrame*CFrame.new(-12.5,12.5,0),"Dark stone grey",0,true,true,"Brick")
78
	p2 = Part("",Set1,Vector3.new(25,25,0),Set1CFrame*CFrame.new(0,12.5,-25),"Dark stone grey",0,true,true,"Brick")
79
	p3 = Part("",Set1,Vector3.new(25,25,0),Set1CFrame*CFrame.new(0,12.5,25),"Dark stone grey",0,true,true,"Brick")
80
	f = Part("",Set1,Vector3.new(20,0.5,40),Set1CFrame,"Brown",0,true,true,"Wood")
81
	local x = 0
82
	for i=1,9 do
83
		p = Part("",Set1,Vector3.new(2.5,(i%2==0 and i-2)or i,40),Set1CFrame*CFrame.new(10-x,0,0),"Brown",0,true,true,"Wood")
84
		if i%2==0 then 
85
			for z=1,20,2 do NewFigure(Set1,p.CFrame*CFrame.new(0,p.Size.y/2+3,-20+z*2)*CFrame.Angles(0,math.pi/2,0))end
86
		end
87
		x = x + 2.5
88
	end
89
	lightp1 = Part("",Set1,Vector3.new(5,2,5),proof.CFrame*CFrame.new(0,-1,-10),"Black",0,true,true,"Plastic")
90
	lightp1m = Instance.new("CylinderMesh",lightp1)
91
	lightp2 = Part("",Set1,Vector3.new(4,2,4),proof.CFrame*CFrame.new(0,-1.1,-10),"Bright yellow",0,true,true,"Plastic")
92
	lightp2m = Instance.new("CylinderMesh",lightp2)
93
	light2p1 = Part("",Set1,Vector3.new(5,2,5),proof.CFrame*CFrame.new(0,-1,10),"Black",0,true,true,"Plastic")
94
	light2p1m = Instance.new("CylinderMesh",light2p1)
95
	light2p2 = Part("",Set1,Vector3.new(4,2,4),proof.CFrame*CFrame.new(0,-1.1,10),"Bright yellow",0,true,true,"Plastic")
96
	light2p2m = Instance.new("CylinderMesh",light2p2)
97
	light1 = Instance.new("SpotLight",lightp1)
98
	light1.Color = BrickColor.new("Bright yellow").Color
99
	light1.Face = "Bottom"
100
	light1.Angle = 270
101
	light1.Brightness = 20
102
	light2 = light1:Clone()
103
	light2.Parent = light2p1
104
end
105
----------------------------------------------
106
count = 0
107
angle = 0
108
counttime = 25
109
countspeed = .75
110
speed = .3
111
SongTime = 0
112
SongTick = tick()
113
Sound:Play()
114
step:connect(function()
115
	count = (count%counttime)+countspeed
116
	angle = math.pi*math.sin((math.pi*2)/counttime*count)
117
	if (tick()-SongTick)>=1 then SongTime = SongTime + 1 SongTick = tick() end
118
	if SongTime == 113 then print("Restarting!") Sound:Stop()SongTime = 0 SongTick = tick() Sound:Play() end
119
	for i,v in pairs(Figures)do
120
		local la = v[2]
121
		local ra = v[3]
122
		if SongTime < 10 then
123
			counttime = 25
124
			countspeed = 1.25
125
			la.C0 = cslerp(la.C0,c0ls*CFrame.new(.25,0.5,0)*CFrame.Angles(math.pi,0,angle*speed*.4),speed)
126
			ra.C0 = cslerp(ra.C0,c0rs*CFrame.new(-.25,0.5,0)*CFrame.Angles(math.pi,0,-angle*speed*.4),speed)
127
		elseif SongTime >= 10 and SongTime < 23 then
128
			counttime = 25
129
			countspeed = .75
130
			la.C0 = cslerp(la.C0,c0ls*CFrame.Angles(math.pi/2+angle*speed*.4,0,0),speed)
131
			ra.C0 = cslerp(ra.C0,c0rs*CFrame.Angles(-angle*speed*.2,0,0),speed)
132
		elseif SongTime >= 23 and SongTime < 27 then
133
			counttime = 25
134
			countspeed = .75
135
			la.C0 = cslerp(la.C0,c0ls*CFrame.Angles(math.pi+angle*speed*.4,0,0),speed)
136
			ra.C0 = cslerp(ra.C0,c0rs*CFrame.Angles(math.pi-angle*speed*.4,0,0),speed)
137
		elseif SongTime >= 27 and SongTime < 40 then
138
			counttime = 25
139
			countspeed = .75
140
			la.C0 = cslerp(la.C0,c0ls*CFrame.Angles(-angle*speed*.2,0,0),speed)
141
			ra.C0 = cslerp(ra.C0,c0rs*CFrame.Angles(math.pi/2+angle*speed*.4,0,0),speed)
142
		elseif SongTime >= 40 and SongTime < 44 then
143
			counttime = 25
144
			countspeed = .75
145
			la.C0 = cslerp(la.C0,c0ls*CFrame.Angles(math.pi+angle*speed*.4,0,0),speed)
146
			ra.C0 = cslerp(ra.C0,c0rs*CFrame.Angles(math.pi-angle*speed*.4,0,0),speed)
147
		elseif SongTime >= 44 and SongTime < 62 then
148
			counttime = 25
149
			countspeed = 1.25
150
			la.C0 = cslerp(la.C0,c0ls*CFrame.new(.25,0.5,0)*CFrame.Angles(math.pi,0,angle*speed*.4),speed)
151
			ra.C0 = cslerp(ra.C0,c0rs*CFrame.new(-.25,0.5,0)*CFrame.Angles(math.pi,0,-angle*speed*.4),speed)
152
		elseif SongTime >= 62 and SongTime < 70 then
153
			counttime = 25
154
			countspeed = .75
155
			la.C0 = cslerp(la.C0,c0ls*CFrame.Angles(math.pi/2+angle*speed*.4,0,0),speed)
156
			ra.C0 = cslerp(ra.C0,c0rs*CFrame.Angles(-angle*speed*.2,0,0),speed)
157
		elseif SongTime >= 70 and SongTime < 75 then
158
			counttime = 25
159
			countspeed = .75
160
			la.C0 = cslerp(la.C0,c0ls*CFrame.Angles(math.pi/2+angle*speed*.4,0,0),speed)
161
			ra.C0 = cslerp(ra.C0,c0rs*CFrame.Angles(math.pi/2+angle*speed*.2,0,0),speed)
162
		elseif SongTime >= 75 and SongTime < 96 then
163
			counttime = 25
164
			countspeed = 1.25
165
			la.C0 = cslerp(la.C0,c0ls*CFrame.new(.25,0.5,0)*CFrame.Angles(math.pi,0,angle*speed*.4),speed)
166
			ra.C0 = cslerp(ra.C0,c0rs*CFrame.new(-.25,0.5,0)*CFrame.Angles(math.pi,0,-angle*speed*.4),speed)
167
		elseif SongTime >= 96 and SongTime < 102 then
168
			counttime = 25
169
			countspeed = 1.25
170
			la.C0 = cslerp(la.C0,c0ls*CFrame.new(.25,0.5,0)*CFrame.Angles(math.pi,angle*speed*.4,0),speed)
171
			ra.C0 = cslerp(ra.C0,c0rs*CFrame.new(-.25,0.5,0)*CFrame.Angles(math.pi,-angle*speed*.4,0),speed)
172
		elseif SongTime >= 102 and SongTime < 113 then
173
			counttime = 25
174
			countspeed = 1.25
175
			la.C0 = cslerp(la.C0,c0ls*CFrame.new(.25,0.5,0)*CFrame.Angles(math.pi,0,angle*speed*.4),speed)
176
			ra.C0 = cslerp(ra.C0,c0rs*CFrame.new(-.25,0.5,0)*CFrame.Angles(math.pi,0,-angle*speed*.4),speed)
177
		end
178
	end
179
end)