-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSpinning-Donut.lua
More file actions
62 lines (50 loc) · 1.65 KB
/
Copy pathSpinning-Donut.lua
File metadata and controls
62 lines (50 loc) · 1.65 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
local a = 0
local b = 0
game:GetService('RunService').RenderStepped:Connect(function()
local z = {}
local screen = {}
for i = 1, 7040 do
z[i] = 0
end
for i = 1, 1760 do
screen[i] = " "
end
local j = 0
while j < 6.28 do
j = j + 0.07
local i = 0
while i < 6.28 do
i = i + 0.02
local sinA = math.sin(a)
local cosA = math.cos(a)
local cosB = math.cos(b)
local sinB = math.sin(b)
local sini = math.sin(i)
local cosi = math.cos(i)
local cosj = math.cos(j)
local sinj = math.sin(j)
local cosj2 = cosj + 2
local mess = 1 / (sini * cosj2 * sinA + sinj * cosA + 5)
local t = sini * cosj2 * cosA - sinj * sinA
local x = math.floor(40 + 30 * mess * (cosi * cosj2 * cosB - t * sinB))
local y = math.floor(12 + 15 * mess * (cosi * cosj2 * sinB + t * cosB))
local o = x + 80 * y
local N = math.floor(8 * ((sinj * sinA - sini * cosj * cosA) * cosB - sini * cosj * sinA - sinj * cosA - cosi * cosj * sinB))
if y > 0 and y < 22 and x > 0 and x < 80 and z[o] < mess then
z[o] = mess
screen[o] = string.sub('.,-~:;=!*#$@', math.max(N, 0) + 1, math.max(N, 0) + 1)
end
end
end
local output = {}
for index = 1, #screen do
table.insert(output, screen[index])
if index % 80 == 0 then
table.insert(output, '\n')
end
end
print(table.concat(output))
rconsoleprint(table.concat(output))
a += 0.04
b += 0.02
end)