Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Made by Borny2007
- -- Deletes chunks of explosives made by exploiters in Mortem Metallum
- -- Improves FPS (not internet lag though)
- -- loadstring(game:HttpGet('https://pastebin.com/raw/WidpvVB6'))()
- print("optimizing...")
- game:GetService("StarterGui"):SetCore("SendNotification", {
- Title = "Optimizing...";
- Text = "Made by Borny2007";
- Icon = nil;
- Duration = 5;
- })
- -- check for sh1t and then delete every x seconds cyclically
- -- default is 5
- local t1 = 5
- -- while deleting sh1t, delete it at x second rate
- -- default is 0.0005
- local t2 = 0.0005
- -- everything exploiters can dupe in terms of objects
- local expl = {"waterflask", "bombprop", "molotovprop", "supplycrate"}
- local fl = game.Workspace.Explosions:GetChildren()
- local fn = game.Workspace.BloodFolder:GetChildren()
- local md = game.Workspace.CurrentMap.Map.Model:GetChildren()
- -- kill yourself
- local function has_value(tab, val)
- for index, value in ipairs(tab) do
- if value == val then
- return true
- end
- end
- return false
- end
- -- destroy all explosive objects rendered
- local function destroyExplosiveObjects()
- local i = 0
- for _, v in pairs(fl) do
- i = i + 1
- if has_value(expl, v.Name:lower()) then
- print("destroyed expl_object " .. v.Name:lower() .. " [object " .. i .. "]")
- v:Destroy()
- end
- wait(t2)
- end
- return i
- end
- -- destroy explosive particle emitting objects
- -- i have no fuck1ng clue if this works anymore
- local function destroyParticleObjects()
- local l = 0
- for _, v in pairs(md) do
- l = l + 1
- if v.Name == "Fire" then
- print("destroyed pe_object " .. v.Name:lower() .. " [object " .. l .. "]")
- v:Destroy()
- end
- wait(t2)
- end
- return l
- end
- -- runs both functions concurrently using coroutines every 5 seconds by default
- local function main()
- local co1 = coroutine.create(destroyExplosiveObjects)
- local co2 = coroutine.create(destroyParticleObjects)
- local function resume(co)
- local success, result = coroutine.resume(co)
- if not success then
- print("coroutine error: " .. tostring(result))
- do break end -- equivalent of "continue" keyword in Python
- end
- end
- while true do
- resume(co1)
- resume(co2)
- wait(t1)
- end
- end
- main()
- --[[
- old function that i forgot to do lol, should delete shit like blood pools not blood particles
- but i dont play mortem metallum anymore so i dont really care anymore
- also you can just turn off blood in settings, r!etard
- local k = 0
- for _, v in pairs(fn) do
- k = k + 1
- if has_value(expl, v.Name:lower()) then
- print("destroyed bp_object [object " .. k .. "]")
- v:Destroy()
- end
- wait(0.0005)
- end
- --]]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement