Advertisement
borny2007

ROBLOX | Mortem Metallum Fix

Feb 24th, 2022 (edited)
1,337
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.84 KB | None | 0 0
  1. -- Made by Borny2007
  2. -- Deletes chunks of explosives made by exploiters in Mortem Metallum
  3. -- Improves FPS (not internet lag though)
  4. -- loadstring(game:HttpGet('https://pastebin.com/raw/WidpvVB6'))()
  5.  
  6. print("optimizing...")
  7.  
  8. game:GetService("StarterGui"):SetCore("SendNotification", {
  9.     Title = "Optimizing...";
  10.     Text = "Made by Borny2007";
  11.     Icon = nil;
  12.     Duration = 5;
  13. })
  14.  
  15. -- check for sh1t and then delete every x seconds cyclically
  16. -- default is 5
  17. local t1 = 5
  18.  
  19. -- while deleting sh1t, delete it at x second rate
  20. -- default is 0.0005
  21. local t2 = 0.0005
  22.  
  23. -- everything exploiters can dupe in terms of objects
  24. local expl = {"waterflask", "bombprop", "molotovprop", "supplycrate"}
  25.  
  26. local fl = game.Workspace.Explosions:GetChildren()
  27. local fn = game.Workspace.BloodFolder:GetChildren()
  28. local md = game.Workspace.CurrentMap.Map.Model:GetChildren()
  29.  
  30. -- kill yourself
  31. local function has_value(tab, val)
  32.     for index, value in ipairs(tab) do
  33.         if value == val then
  34.             return true
  35.         end
  36.     end
  37.     return false
  38. end
  39.  
  40. -- destroy all explosive objects rendered
  41. local function destroyExplosiveObjects()
  42.     local i = 0
  43.     for _, v in pairs(fl) do
  44.         i = i + 1
  45.         if has_value(expl, v.Name:lower()) then
  46.             print("destroyed expl_object " .. v.Name:lower() .. " [object " .. i .. "]")
  47.             v:Destroy()
  48.         end
  49.         wait(t2)
  50.     end
  51.     return i
  52. end
  53.  
  54. -- destroy explosive particle emitting objects
  55. -- i have no fuck1ng clue if this works anymore
  56. local function destroyParticleObjects()
  57.     local l = 0
  58.     for _, v in pairs(md) do
  59.         l = l + 1
  60.         if v.Name == "Fire" then
  61.             print("destroyed pe_object " .. v.Name:lower() .. " [object " .. l .. "]")
  62.             v:Destroy()
  63.         end
  64.         wait(t2)
  65.     end
  66.     return l
  67. end
  68.  
  69. -- runs both functions concurrently using coroutines every 5 seconds by default
  70. local function main()
  71.     local co1 = coroutine.create(destroyExplosiveObjects)
  72.     local co2 = coroutine.create(destroyParticleObjects)
  73.  
  74.     local function resume(co)
  75.         local success, result = coroutine.resume(co)
  76.         if not success then
  77.             print("coroutine error: " .. tostring(result))
  78.             do break end -- equivalent of "continue" keyword in Python
  79.         end
  80.     end
  81.  
  82.     while true do
  83.         resume(co1)
  84.         resume(co2)
  85.         wait(t1)
  86.     end
  87. end
  88.  
  89. main()
  90.  
  91. --[[
  92. old function that i forgot to do lol, should delete shit like blood pools not blood particles
  93. but i dont play mortem metallum anymore so i dont really care anymore
  94.  
  95. also you can just turn off blood in settings, r!etard
  96.  
  97. local k = 0
  98. for _, v in pairs(fn) do
  99.     k = k + 1
  100.     if has_value(expl, v.Name:lower()) then
  101.         print("destroyed bp_object [object " .. k .. "]")
  102.         v:Destroy()
  103.     end
  104.     wait(0.0005)
  105. end
  106. --]]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement