Advertisement
redrobloc

fog script

May 5th, 2021
333
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.56 KB | None | 0 0
  1. --Air's Scripts--
  2. --This script was made by Stickmasterluke, but I made the script a little
  3. --less raw, to help complete newbies at scripting. (No offense). I barely
  4. --made ANY changes to the script, 85% of the credit goes to Stick.
  5. --Don't call me a noob for "st33ling h15 scr1pt fr00b", because I'm not.
  6.  
  7. ----------------------------------------------------------------------------------------------
  8.  
  9. --Don't change ANYTHING unless you're directed to, or you know what you're doing.
  10.  
  11.  
  12. --Below, are coordinates. Change them to fit your place perfectly.
  13. --The coordinates now (512, 100, 512) are perfect for a regular baseplate.
  14. --If your place is smaller/bigger, THAN change them. If not, don't touch.
  15.  
  16.  
  17. x=1000 --Change 512 to the needed coordinate. This is X coordinate
  18.  
  19. y=1000 --Change 100 to the needed coordinate. This is Y coordinate
  20.  
  21. z=1000 --Change 512 to the needed coordinate. This is Z coordinate
  22.  
  23. increments=16 --Don't touch this.
  24.  
  25. clarity=.7 --Change .8 to the transparency of the fog. 10 is invisible, and 0 is completely solid.
  26.  
  27.  
  28. ---------------------------------------------------------------------------------------------
  29.  
  30. --Don't touch ANYTHING below, unless you totally know what you're doing.
  31.  
  32. ---------------------------------------------------------------------------------------------
  33.  
  34.  
  35. gw=game.Workspace
  36. local check=gw:FindFirstChild("Fog")
  37. if check then
  38. check.Parent=nil
  39. end
  40. fog=Instance.new("Part")
  41. fog.Transparency=clarity
  42. fog.Anchored=true
  43. fog.CanCollide=false
  44. fog.formFactor="Symmetric"
  45. fog.Shape="Block"
  46. fog.TopSurface="Smooth"
  47. fog.BottomSurface="Smooth"
  48. fog.Size=Vector3.new(1,1,1)
  49. fog.BrickColor=BrickColor.new("Medium stone grey")
  50. local mesh=Instance.new("SpecialMesh")
  51. mesh.Name="Mesh"
  52. mesh.MeshType="Brick"
  53. mesh.Scale=Vector3.new(1,1,1)
  54. mesh.Parent=fog
  55. foggroup=Instance.new("Model")
  56. foggroup.Name="Fog"
  57. for i=1, x/increments do
  58. newfog=fog:clone()
  59. newfog.CFrame=CFrame.new(Vector3.new((x/-2)+.05+(increments*i),(y/2)+.05,.05))
  60. newfog.Parent=foggroup
  61. newfog.Mesh.Scale=Vector3.new(0,y,z)
  62. end
  63. for i=1, y/increments do
  64. newfog=fog:clone()
  65. newfog.CFrame=CFrame.new(Vector3.new(.05,(increments*i)+.05,.05))
  66. newfog.Parent=foggroup
  67. newfog.Mesh.Scale=Vector3.new(x,0,z)
  68. end
  69. for i=1, z/increments do
  70. newfog=fog:clone()
  71. newfog.CFrame=CFrame.new(Vector3.new(.05,(y/2)+.05,(z/-2)+.05+(increments*i)))
  72. newfog.Parent=foggroup
  73. newfog.Mesh.Scale=Vector3.new(x,y,0)
  74. end
  75. foggroup.Parent=gw
  76.  
  77. -----------------------------------------------------------------------------------------------------
  78.  
  79. --Air--
  80.  
  81.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement