DanielTG

Untitled

Apr 7th, 2020
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.88 KB | None | 0 0
  1. local partsWithId = {}
  2. local awaitRef = {}
  3.  
  4. local root = {
  5. ID = 0;
  6. Type = "ScreenGui";
  7. Properties = {
  8. Name = "LoadScreen";
  9. ResetOnSpawn = false;
  10. };
  11. Children = {
  12. {
  13. ID = 1;
  14. Type = "Frame";
  15. Properties = {
  16. Name = "BackGround";
  17. Size = UDim2.new(1,0,1,0);
  18. ZIndex = 10;
  19. BorderSizePixel = 0;
  20. BackgroundColor3 = Color3.new(3/85,16/255,32/255);
  21. };
  22. Children = {
  23. {
  24. ID = 2;
  25. Type = "TextLabel";
  26. Properties = {
  27. FontSize = Enum.FontSize.Size60;
  28. BackgroundTransparency = 1;
  29. TextColor3 = Color3.new(83/255,142/255,254/255);
  30. TextSize = 60;
  31. Text = "Loading Skoot.XX...";
  32. TextWrapped = true;
  33. Size = UDim2.new(0,700,0,100);
  34. AnchorPoint = Vector2.new(0.5,1);
  35. Font = Enum.Font.Cartoon;
  36. Name = "Text";
  37. Position = UDim2.new(0.5,0,0.99000000953674,0);
  38. BackgroundColor3 = Color3.new(1,1,1);
  39. ZIndex = 10;
  40. TextScaled = true;
  41. TextWrap = true;
  42. };
  43. Children = {
  44. {
  45. ID = 3;
  46. Type = "LocalScript";
  47. Properties = {};
  48. Children = {};
  49. };
  50. };
  51. };
  52. {
  53. ID = 4;
  54. Type = "ImageLabel";
  55. Properties = {
  56. ImageColor3 = Color3.new(83/255,142/255,254/255);
  57. ScaleType = Enum.ScaleType.Fit;
  58. BackgroundTransparency = 1;
  59. AnchorPoint = Vector2.new(0.5,0.5);
  60. Image = "rbxassetid://1764649752";
  61. Name = "LoadIcon";
  62. Position = UDim2.new(0.5,0,0.40000000596046,0);
  63. Size = UDim2.new(0.40000000596046,0,0.40000000596046,0);
  64. ZIndex = 10;
  65. BorderSizePixel = 0;
  66. BackgroundColor3 = Color3.new(3/85,16/255,32/255);
  67. };
  68. Children = {
  69. {
  70. ID = 5;
  71. Type = "LocalScript";
  72. Properties = {};
  73. Children = {};
  74. };
  75. };
  76. };
  77. };
  78. };
  79. {
  80. ID = 6;
  81. Type = "LocalScript";
  82. Properties = {
  83. Name = "MainScript";
  84. };
  85. Children = {};
  86. };
  87. {
  88. ID = 7;
  89. Type = "Frame";
  90. Properties = {
  91. Name = "TopBar";
  92. Size = UDim2.new(1,0,0,-40);
  93. ZIndex = 10;
  94. BorderSizePixel = 0;
  95. BackgroundColor3 = Color3.new(3/85,16/255,32/255);
  96. };
  97. Children = {};
  98. };
  99. };
  100. };
  101.  
  102. local function Scan(item, parent)
  103. local obj = Instance.new(item.Type)
  104. if (item.ID) then
  105. local awaiting = awaitRef[item.ID]
  106. if (awaiting) then
  107. awaiting[1][awaiting[2]] = obj
  108. awaitRef[item.ID] = nil
  109. else
  110. partsWithId[item.ID] = obj
  111. end
  112. end
  113. for p,v in pairs(item.Properties) do
  114. if (type(v) == "string") then
  115. local id = tonumber(v:match("^_R:(%w+)_$"))
  116. if (id) then
  117. if (partsWithId[id]) then
  118. v = partsWithId[id]
  119. else
  120. awaitRef[id] = {obj, p}
  121. v = nil
  122. end
  123. end
  124. end
  125. obj[p] = v
  126. end
  127. for _,c in pairs(item.Children) do
  128. Scan(c, obj)
  129. end
  130. obj.Parent = parent
  131. return obj
  132. end
  133.  
  134. return function() return Scan(root, nil) end
Advertisement
Add Comment
Please, Sign In to add comment