vlatkovski

MilkTheWorld

Jan 28th, 2015
211
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.55 KB | None | 0 0
  1. --[[
  2.  
  3.     This was made around 6 months ago, I sucked at scripting back then.
  4.     Do whatever you want with it.
  5.  
  6. --]]
  7.  
  8. local function rgb(r,g,b) return Color3.new(r/255,g/255,b/255) end
  9.  
  10. local function stringRandom(int,mode)
  11.     math.randomseed(math.random(0,os.time()))
  12.     local String = ""
  13.     for i=1,int do
  14.         if mode == "char" then
  15.             String = String..string.char(math.random(65,122))
  16.         else
  17.             String = String..string.char(math.random(0,255))
  18.         end
  19.     end
  20.     return String
  21. end
  22.  
  23. local Settings = {
  24.     Tag_Value = stringRandom(50,"char");
  25.     ["BasePart"] = {
  26.         [01] = {Prop = "BrickColor",    Val = BrickColor.new("Light reddish violet")};
  27.         [02] = {Prop = "Material",      Val = Enum.Material.SmoothPlastic};
  28.         [03] = {Prop = "Reflectance",   Val = 0};
  29.         [04] = {Prop = "Transparency",  Val = 0};
  30.         [05] = {Prop = "Elasticity",    Val = 0.5};
  31.         [06] = {Prop = "Friction",      Val = 0.3};
  32.         [07] = {Prop = "FrontSurface",  Val = Enum.SurfaceType.Studs};
  33.         [08] = {Prop = "BackSurface",   Val = Enum.SurfaceType.Studs};
  34.         [09] = {Prop = "TopSurface",    Val = Enum.SurfaceType.Studs};
  35.         [10] = {Prop = "BottomSurface", Val = Enum.SurfaceType.Studs};
  36.         [11] = {Prop = "LeftSurface",   Val = Enum.SurfaceType.Studs};
  37.         [12] = {Prop = "RightSurface",  Val = Enum.SurfaceType.Studs};
  38.     };
  39.     ["Lighting"] = {
  40.         [01] = {Prop = "GlobalShadows",     Val = false};
  41.         [02] = {Prop = "Ambient",           Val = rgb(255, 162, 198)};
  42.         [03] = {Prop = "ColorShift_Bottom", Val = rgb(255, 162, 198)};
  43.         [04] = {Prop = "ColorShift_Top",    Val = rgb(255, 162, 198)};
  44.         [05] = {Prop = "OutdoorAmbient",    Val = rgb(255, 162, 198)};
  45.         [06] = {Prop = "ShadowColor",       Val = rgb(255, 162, 198)};
  46.     };
  47. };
  48.  
  49. local create = LoadLibrary("RbxUtility").Create
  50. local runService = game:GetService("RunService")
  51. local lighting = game:GetService("Lighting")
  52.  
  53. local function Milk(trg)
  54.     if trg:IsA("BasePart") then
  55.         pcall(coroutine.wrap(function()
  56.             local parent = trg.Parent
  57.             trg.Name = stringRandom(50)
  58.             trg.Locked = false
  59.             while wait() and parent:FindFirstChild(trg.Name) do
  60.                 for omg,hax in pairs(Settings.Lighting) do
  61.                     lighting[hax.Prop] = hax.Val
  62.                 end
  63.                 for omg,hax in pairs(Settings.BasePart) do
  64.                     trg[hax.Prop] = hax.Val
  65.                 end
  66.                 if trg.Parent then
  67.                     if not trg.Parent:IsA("Model") and not trg.Parent:FindFirstChild("Humanoid") then
  68.                         trg.CFrame  = trg.CFrame * CFrame.Angles(0,0,0.005)
  69.                     end
  70.                 end
  71.             end
  72.         end))
  73.     end
  74.     for i,v in pairs(trg:GetChildren()) do
  75.         Milk(v)
  76.     end
  77.     trg.ChildAdded:connect(function(c)
  78.         Milk(c)
  79.     end)
  80. end
  81.  
  82. Milk(workspace)
  83.  
  84. print("Tag Value:", Settings.Tag_Value)
Advertisement
Add Comment
Please, Sign In to add comment