Advertisement
squidingtin

Dead By Daylight Assest Swap Roblox

Feb 8th, 2020
1,827
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.82 KB | None | 0 0
  1. N = 0
  2. Age = 0 --Server Age
  3.  
  4. for i, v in pairs(game.Workspace:GetChildren()) do --Move all non-needed objects to terrian.
  5. MapThumbnail = v:FindFirstChild("MapThumbnail")
  6.     if v:IsA ("Model") or v:IsA ("Part") or v:IsA ("WedgePart") or v:IsA ("MeshPart") or v.Name == "Union" or v:IsA ("UnionOperation") and v.Parent == workspace then
  7.         if MapThumbnail == nil then
  8.         wait()
  9.             --print(v.Name)
  10.             v.Parent = workspace.Terrain
  11.             MapThumbnail = nil
  12.         else
  13.             print("The map is "..v.Name)
  14.             v.Name = "Game"
  15.             v.Parent = workspace.Camera
  16.     end
  17.     elseif v:IsA ("LocalScript") then --Its not needed as its all local
  18.         Age = Age +1
  19.         v:Destroy()
  20.     elseif v:IsA ("Script") then --Its not needed as its all local
  21.         v:Destroy()
  22.     end
  23. end
  24.  
  25. print("The server has been ran " ..Age.." Times")
  26.  
  27. for i, v in pairs(game.workspace.Camera.Game:GetChildren()) do
  28.     if v:IsA("Model") and v.Name == "ComputerTable" then --Set generator model.
  29.         N = N +1
  30.         BasePart = v.BasePart
  31.         S = v.Screen
  32.        
  33.             G = Instance.new("SpecialMesh")
  34.             G.Name = "DBD"
  35.             G.Parent = BasePart
  36.             G.Parent.Size = Vector3.new(4, 5, 4)
  37.             G.MeshId = "rbxassetid://4663242528"
  38.             G.MeshType = "FileMesh"
  39.             G.TextureId = "http://www.roblox.com/asset/?id=4663233506"
  40.             G.Scale = Vector3.new(0.15, 0.125, 0.15)
  41.             G.Offset = Vector3.new(0.25, 1.8, 0.5)
  42.             BasePart.Transparency = 0
  43.             v.Name = ("ComputerTable"..N)
  44.  
  45.             S.Transparency = 1
  46.             S.ErrorSound.SoundId = "rbxassetid://4663563894"
  47.             S.SoundTyping.SoundId = "rbxassetid://4663563799"
  48.             S.SoundWindowsPopUp.SoundId = "rbxassetid://4663628038"
  49.     for i, v in pairs(v:GetChildren()) do
  50.         if v.Name == "Screen" or v.Name == "BasePart" or v.Name == "ClearWall" or v.Name == "ComputerTrigger1" or v.Name == "ComputerTrigger2" or v.Name == "ComputerTrigger3" then
  51.             else
  52.                 v:Destroy()
  53.             end
  54.         end
  55.     end
  56. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement