Advertisement
cat568

Untitled

Mar 11th, 2019
199
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.18 KB | None | 0 0
  1.  
  2. --Converted with ttyyuu12345's model to script plugin v4
  3. function sandbox(var,func)
  4. local env = getfenv(func)
  5. local newenv = setmetatable({},{
  6. __index = function(self,k)
  7. if k=="script" then
  8. return var
  9. else
  10. return env[k]
  11. end
  12. end,
  13. })
  14. setfenv(func,newenv)
  15. return func
  16. end
  17. cors = {}
  18. mas = Instance.new("Model",game:GetService("Lighting"))
  19. Script0 = Instance.new("Script")
  20. NumberValue1 = Instance.new("NumberValue")
  21. NumberValue2 = Instance.new("NumberValue")
  22. NumberValue3 = Instance.new("NumberValue")
  23. Part4 = Instance.new("Part")
  24. Script0.Name = "PluginRainScript"
  25. Script0.Parent = mas
  26. table.insert(cors,sandbox(Script0,function()
  27. local rain = Instance.new("Model",workspace)rain.Name = "Rain"
  28. local size = script.Sizer.Value
  29. local amount = script.Amountr.Value
  30. local height = script.Heightr.Value
  31. local drop = script.Drop
  32. drop.Parent = game.ServerStorage
  33. while wait(1/5) do
  34. for i = 1,amount/5 do
  35. d = drop:Clone()
  36. d.Parent = rain
  37. d.CFrame = CFrame.new(math.random(-size,size)/2,height+math.random(200,250),math.random(-size,size)/2)
  38. d.Anchored = false
  39. d.Touched:connect(function()
  40. d:Destroy()
  41. end)
  42. end
  43. end
  44. end))
  45. NumberValue1.Name = "Amountr"
  46. NumberValue1.Parent = Script0
  47. NumberValue1.Value = 100
  48. NumberValue2.Name = "Sizer"
  49. NumberValue2.Parent = Script0
  50. NumberValue2.Value = 512
  51. NumberValue3.Name = "Heightr"
  52. NumberValue3.Parent = Script0
  53. NumberValue3.Value = 20
  54. Part4.Name = "Drop"
  55. Part4.Parent = Script0
  56. Part4.CFrame = CFrame.new(49.5, 1, 18.5, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  57. Part4.Position = Vector3.new(49.5, 1, 18.5)
  58. Part4.Color = Color3.new(0.0352941, 0.537255, 0.811765)
  59. Part4.Size = Vector3.new(1, 2, 1)
  60. Part4.Anchored = true
  61. Part4.BottomSurface = Enum.SurfaceType.Smooth
  62. Part4.BrickColor = BrickColor.new("Electric blue")
  63. Part4.CanCollide = false
  64. Part4.TopSurface = Enum.SurfaceType.Smooth
  65. Part4.brickColor = BrickColor.new("Electric blue")
  66. Part4.FormFactor = Enum.FormFactor.Symmetric
  67. Part4.formFactor = Enum.FormFactor.Symmetric
  68. for i,v in pairs(mas:GetChildren()) do
  69. v.Parent = workspace
  70. pcall(function() v:MakeJoints() end)
  71. end
  72. mas:Destroy()
  73. for i,v in pairs(cors) do
  74. spawn(function()
  75. pcall(v)
  76. end)
  77. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement