-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdieofdeath.lua
More file actions
197 lines (181 loc) · 8.22 KB
/
dieofdeath.lua
File metadata and controls
197 lines (181 loc) · 8.22 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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
local supportedThemes = {
-- songs that can be accessible in-game/lobbies
["30Seconds"] = "rbxassetid://91246553601263",
["ClairDeLune"] = "rbxassetid://1838457617",
["Lobby1"] = "rbxassetid://91647694123174",
["Lobby2"] = "rbxassetid://89718854407719",
["M.P."] = "rbxassetid://96983327609392",
["KillerResult"] = "rbxassetid://124281132717450",
["SurvivorResult"] = "rbxassetid://80187949598536",
["Settings"] = "rbxassetid://83909219922754",
["ShopTheme"] = "rbxassetid://71036119790058",
-- lms themes
["SHOWTIME"] = "rbxassetid://81002247465483", -- banana vs artful
["Careless"] = "rbxassetid://79377280659422", -- caretaker vs anyone
["Double Trouble"] = "rbxassetid://102327893551966", -- double trouble vs anyone
["Eternity"] = "rbxassetid://94531030690227", -- default lms
["A RETRO SOUL (NOW, SLOP!)"] = "rbxassetid://76946068570629", -- noliful lms
["OMEGAWARE FINAL STANDING"] = "rbxassetid://134000197680004", -- omegaware lms
["ONE BOUNCE"] = "rbxassetid://136759649269213", -- one bounce lms
["Vigilante Shootdown"] = "rbxassetid://93423414823200", -- gun vs killdroid
["Teapot Paradise"] = "rbxassetid://82014737665440", -- special map theme
["Y2K"] = "rbxassetid://78523210366533", -- double trouble badware vs anyone
-- map ambience
["baseplate"] = "rbxassetid://122155804007379",
["Double Trouble Ambience"] = "rbxassetid://75248402049273",
["SHATTERED"] = "rbxassetid://129396730268068", -- glasshouse ambience
["Grandma's Jingle"] = "rbxassetid://89529999706331", -- grandmay's backyard
["Moderation"] = "rbxassetid://89529999706331", -- hq ambience
["Teapot Paradise Calm"] = "rbxassetid://82972581074065",
["Teapot Paradise Rain"] = "rbxassetid://88065869357520",
["Temple"] = "rbxassetid://111346586169957",
-- killer chase themes
["Artful#SoRetro"] = "rbxassetid://139474601737512",
["ArtfulArtistry"] = "rbxassetid://82048676949740",
["ArtfulBuilder"] = "rbxassetid://100748505798987",
["ArtfulCementful"] = "rbxassetid://137090348188907",
["ArtfulDefault"] = "rbxassetid://93637727725003",
["ArtfulDevesto"] = "rbxassetid://133547261922555",
["ArtfulEvil Guy"] = "rbxassetid://80252820519483",
["ArtfulInnovationful"] = "rbxassetid://139474601737512",
["ArtfulKind Gal"] = "rbxassetid://80252820519483",
["ArtfulNoliful"] = "rbxassetid://137090348188907",
["ArtfulOrchestraful"] = "rbxassetid://115631945678431",
["ArtfulPaintful"] = "rbxassetid://93104022454983",
["ArtfulSeaful"] = "rbxassetid://96913972300277",
["ArtfulSwapful"] = "rbxassetid://76796742060601",
["ArtfulTixful"] = "rbxassetid://139464241319399",
["BadwareAngelware"] = "rbxassetid://90046518620252",
["BadwareAeroware"] = "rbxassetid://102247691564142",
["BadwareCookieware"] = "rbxassetid://138426266441950",
["BadwareDefault"] = "rbxassetid://127290329945558",
["BadwareDevilware"] = "rbxassetid://109053502183758",
["BadwareGoodware"] = "rbxassetid://139092952205901",
["BadwareLoveware"] = "rbxassetid://126121764810861",
["BadwareOMEGAWARE"] = "rbxassetid://133382297815081",
["BadwareRunicware"] = "rbxassetid://104183274577846",
["BadwareSpyware"] = "rbxassetid://124507876504661",
["BadwareWiperware"] = "rbxassetid://103141911887008",
["KilldroidAwesomeDroid"] = "rbxassetid://113462018866438",
["KilldroidDeathstar"] = "rbxassetid://83364378062445",
["KilldroidDefault"] = "rbxassetid://118222465008795",
["KilldroidEggdroid"] = "rbxassetid://120409767216981",
["KilldroidFuturistic"] = "rbxassetid://129277549166540",
["KilldroidJetdroid"] = "rbxassetid://129624810026330",
["KilldroidLivedroid"] = "rbxassetid://100167664222689",
["KilldroidMLGdroid"] = "rbxassetid://128312001602754",
["KilldroidPixeldroid"] = "rbxassetid://90169171112140",
["KilldroidTeadroid"] = "rbxassetid://114149034893434",
["KilldroidTurkeydroid"] = "rbxassetid://139841431654692",
["MR.O.B.Default"] = "rbxassetid://93672930469634",
["ParanoyDefault"] = "rbxassetid://127755610657824",
["PursuerAvoider"] = "rbxassetid://96604599225601",
["PursuerBling Pursuer"] = "rbxassetid://107515107689523",
["PursuerClassic"] = "rbxassetid://107289600740125",
["PursuerClawsguy"] = "rbxassetid://101548534337969",
["PursuerDefault"] = "rbxassetid://99704046049656",
["PursuerDerp"] = "rbxassetid://111561890915923",
["PursuerHardest Game"] = "rbxassetid://99453847192336",
["PursuerIQuot"] = "rbxassetid://139756997762217",
["PursuerMaze Guy"] = "rbxassetid://138340381558068",
["PursuerMeQuot"] = "rbxassetid://139756997762217",
["PursuerMISO"] = "rbxassetid://96674108041046",
["PursuerPhantasm"] = "rbxassetid://84330560390462",
["PursuerSeesaws"] = "rbxassetid://101548534337969",
["PursuerThe Stalker"] = "rbxassetid://84496741108175",
["PursuerYourself Pursuer"] = "rbxassetid://138554613279166",
["PursuerZombie"] = "rbxassetid://96464480695797",
["PursuerZombie_1"] = "rbxassetid://96464480695797",
["PursuerZombie_2"] = "rbxassetid://96464480695797"
}
local supportedThemesById = {}
for name, id in pairs(supportedThemes) do
supportedThemesById[id] = name
end
local function replaceSound(sound)
if not sound or not sound:IsA("Sound") or not sound.SoundId then return end
local themeName = supportedThemesById[sound.SoundId]
if not themeName then return end
print("[OST REPLACE | SUPPORTED] CURRENTLY PLAYING: " .. themeName)
local fileName = themeName .. ".mp3"
if isfile(fileName) then
print("[OST REPLACE | REPLACED] " .. themeName .. " → " .. fileName)
sound.SoundId = getcustomasset(fileName)
else
-- print("[OST REPLACE | INFO] Missing local file for: " .. fileName)
end
end
local function watchSound(sound)
if not sound:IsA("Sound") then return end
replaceSound(sound)
local conn = sound.Played:Connect(function()
replaceSound(sound)
end)
table.insert(_G.Connections.AllSounds, conn)
end
local function setupKillerListener(character)
task.spawn(function()
local animations = character:WaitForChild("Animations", 5)
if not animations then return end
local chaseTheme = animations:FindFirstChild("ChaseTheme")
if not chaseTheme then
chaseTheme = animations.ChildAdded:Wait()
end
if chaseTheme and chaseTheme:IsA("Sound") then
watchSound(chaseTheme)
end
end)
end
local function watchFolder(folder)
for _, v in ipairs(folder:GetDescendants()) do
if v:IsA("Sound") then
watchSound(v)
end
end
folder.DescendantAdded:Connect(function(obj)
if obj:IsA("Sound") then
watchSound(obj)
end
end)
end
if not _G.Connections then
print("[OST REPLACE | Info] Dropping into full reactive mode 🕶️ Everything gets scanned + replaced.")
_G.Connections = { AllSounds = {}, ChaseThemes = {} }
_G.Connections.Global = game.DescendantAdded:Connect(function(obj)
if obj:IsA("Sound") then
watchSound(obj)
end
end)
for _, s in ipairs(game:GetDescendants()) do
if s:IsA("Sound") then
watchSound(s)
end
end
local gameAssets = workspace:WaitForChild("GameAssets", 10)
if gameAssets then
watchFolder(gameAssets)
end
local killerFolder = gameAssets and gameAssets:FindFirstChild("Teams") and gameAssets.Teams:FindFirstChild("Killer")
if killerFolder then
for _, killer in ipairs(killerFolder:GetChildren()) do
setupKillerListener(killer)
end
_G.Connections.KillerFolder = killerFolder.ChildAdded:Connect(setupKillerListener)
end
print("[OST REPLACE | Status] Live monitoring started")
else
print("[OST REPLACE | Status] Stopping script...")
for _, t in pairs(_G.Connections) do
if typeof(t) == "RBXScriptConnection" then
t:Disconnect()
elseif type(t) == "table" then
for _, c in ipairs(t) do
if typeof(c) == "RBXScriptConnection" then
c:Disconnect()
end
end
end
end
_G.Connections = nil
print("[OST REPLACE | Status] All listeners cleared")
end