Advertisement
Guest User

K E K

a guest
Jan 20th, 2018
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 7.16 KB | None | 0 0
  1. --By Rufus14
  2. -- Objects
  3. -- Edited By Unden. oWo
  4.  
  5. local ScreenGui = Instance.new("ScreenGui")
  6. local Frame = Instance.new("Frame")
  7. local TextButton = Instance.new("TextButton")
  8. local Frame_2 = Instance.new("Frame")
  9. local TextLabel = Instance.new("TextLabel")
  10. local TextBox = Instance.new("TextBox")
  11.  
  12. -- Properties
  13.  
  14. ScreenGui.Parent = game.Players.LocalPlayer.PlayerGui
  15.  
  16. Frame.Parent = ScreenGui
  17. Frame.BackgroundColor3 = Color3.new(0, 0, 0)
  18. Frame.Position = UDim2.new(0.107333057, 0, 0.827616811, 0)
  19. Frame.Size = UDim2.new(0, 464, 0, 132)
  20. Frame.Style = Enum.FrameStyle.RobloxSquare
  21.  
  22. TextButton.Parent = Frame
  23. TextButton.BackgroundColor3 = Color3.new(255, 255, 0)
  24. TextButton.Position = UDim2.new(0.0626480505, 0, 0.0956374705, 0)
  25. TextButton.Size = UDim2.new(0, 393, 0, 97)
  26. TextButton.Font = Enum.Font.Cartoon
  27. TextButton.FontSize = Enum.FontSize.Size14
  28. TextButton.Text = "START FUCKING THE TIMELINE"
  29. TextButton.TextScaled = true
  30. TextButton.TextSize = 14
  31. TextButton.TextWrapped = true
  32.  
  33. Frame_2.Parent = ScreenGui
  34. Frame_2.BackgroundColor3 = Color3.new(0, 0, 0)
  35. Frame_2.Position = UDim2.new(0.610014319, 0, 0.828125, 0)
  36. Frame_2.Size = UDim2.new(0, 280, 0, 132)
  37. Frame_2.Style = Enum.FrameStyle.RobloxSquare
  38.  
  39. TextLabel.Parent = Frame_2
  40. TextLabel.BackgroundColor3 = Color3.new(1, 1, 1)
  41. TextLabel.BackgroundTransparency = 1
  42. TextLabel.Position = UDim2.new(0.117857143, 0, -0.0588716492, 0)
  43. TextLabel.Size = UDim2.new(0, 200, 0, 50)
  44. TextLabel.Font = Enum.Font.Cartoon
  45. TextLabel.FontSize = Enum.FontSize.Size14
  46. TextLabel.Text = "Frames:"
  47. TextLabel.TextColor3 = Color3.new(1, 1, 1)
  48. TextLabel.TextScaled = true
  49. TextLabel.TextSize = 14
  50. TextLabel.TextWrapped = true
  51.  
  52. TextBox.Parent = Frame_2
  53. TextBox.BackgroundColor3 = Color3.new(1, 1, 1)
  54. TextBox.Position = UDim2.new(0.117857151, 0, 0.371212125, 0)
  55. TextBox.Size = UDim2.new(0, 200, 0, 72)
  56. TextBox.Font = Enum.Font.SourceSans
  57. TextBox.FontSize = Enum.FontSize.Size14
  58. TextBox.Text = "300"
  59. TextBox.TextScaled = true
  60. TextBox.TextSize = 14
  61. TextBox.TextWrapped = true
  62.  
  63. recording = false
  64. hastorecord = true
  65. tablenumber = 0
  66. timetable = {}
  67. function clicktherecordbutton()
  68.     if not recording and hastorecord then
  69.         recording = true
  70.         local frames = TextBox.Text
  71.         TextButton.Text = "TIMELINE FUCKERY IN PROGRESS..."
  72.         TextButton.BackgroundColor3 = Color3.new(255, 0, 0)
  73.         for i,v in pairs(workspace:GetChildren()) do
  74.             if v.ClassName == "Part" then
  75.                 if v.Anchored == true then
  76.                     local cfvall = Instance.new("BoolValue", v)
  77.                     cfvall.Name = "AnchoredValue"
  78.                 end
  79.             end
  80.         end
  81.         for i = 1,frames do
  82.             for i,v in pairs(workspace:GetChildren()) do
  83.                 if not game.Players:findFirstChild(v.Name) then
  84.                     for q,w in pairs(v:GetChildren()) do
  85.                         if w.ClassName == "Part" then
  86.                             local cfval = Instance.new("CFrameValue", w)
  87.                             cfval.Name = "PositionValue"
  88.                             cfval.Value = w.CFrame
  89.                             tablenumber = tablenumber + 1
  90.                         end
  91.                     end
  92.                 end
  93.             end
  94.             for i,v in pairs(game.Players:GetChildren()) do
  95.                 if v.Character then
  96.                     if v.Character:findFirstChild("Torso") then
  97.                         local cfval = Instance.new("CFrameValue", v.Character)
  98.                         cfval.Name = "PositionValue"
  99.                         cfval.Value = v.Character.Torso.CFrame
  100.                         tablenumber = tablenumber + 1
  101.                     elseif v.Character:findFirstChild("UpperTorso") then
  102.                         local cfval = Instance.new("CFrameValue", v.Character)
  103.                         cfval.Name = "PositionValue"
  104.                         cfval.Value = v.Character.UpperTorso.CFrame
  105.                         tablenumber = tablenumber + 1
  106.                     end
  107.                 end
  108.             end
  109.             for i,v in pairs(workspace:GetChildren()) do
  110.                 if v.ClassName == "Part" then
  111.                     local cfval = Instance.new("CFrameValue", v)
  112.                     cfval.Name = "PositionValue"
  113.                     cfval.Value = v.CFrame
  114.                     tablenumber = tablenumber + 1
  115.                 end
  116.             end
  117.             game:GetService("RunService").RenderStepped:wait()
  118.         end
  119.         TextButton.BackgroundColor3 = Color3.new(0, 255, 0)
  120.         TextButton.Text = "FUCKING UP THE TIMELINE!"
  121.         for i,v in pairs(game.Players:GetChildren()) do
  122.             if v.Character then
  123.                 if v.Character:findFirstChild("Torso") then
  124.                     v.Character["Torso"].Anchored = true
  125.                 elseif v.Character:findFirstChild("UpperTorso") then
  126.                     v.Character["UpperTorso"].Anchored = true
  127.                 end
  128.             end
  129.         end
  130.         for i,v in pairs(workspace:GetChildren()) do
  131.             if v.ClassName == "Part" then
  132.                 v.Anchored = true
  133.             end
  134.         end
  135.         for i = 1,frames do
  136.             for i,v in pairs(workspace:GetChildren()) do
  137.                 if not game.Players:findFirstChild(v.Name) then
  138.                     for q,w in pairs(v:GetChildren()) do
  139.                         if w:findFirstChild("PositionValue") then
  140.                             w.CFrame = w.PositionValue.Value
  141.                             w.PositionValue:destroy()
  142.                             tablenumber = tablenumber - 1
  143.                         end
  144.                     end
  145.                 end
  146.             end
  147.             for i,v in pairs(game.Players:GetChildren()) do
  148.                 if v.Character then
  149.                     if v.Character:findFirstChild("PositionValue") and v.Character:findFirstChild("Head") then
  150.                         v.Character["Head"].CFrame = v.Character.PositionValue.Value
  151.                         v.Character.PositionValue:destroy()
  152.                         tablenumber = tablenumber - 1
  153.                     elseif v.Character:findFirstChild("PositionValue") and v.Character:findFirstChild("UpperTorso") then
  154.                         v.Character["UpperTorso"].CFrame = v.Character.PositionValue.Value
  155.                         v.Character.PositionValue:destroy()
  156.                         tablenumber = tablenumber - 1
  157.                     end
  158.                 end
  159.             end
  160.             for i,v in pairs(workspace:GetChildren()) do
  161.                 if v:findFirstChild("PositionValue") and v.ClassName == "Part" then
  162.                     v.CFrame = v.PositionValue.Value
  163.                     v.PositionValue:destroy()
  164.                     tablenumber = tablenumber - 1
  165.                 end
  166.             end
  167.             game:GetService("RunService").RenderStepped:wait()
  168.         end
  169.         TextButton.BackgroundColor3 = Color3.new(0, 255, 0)
  170.         TextButton.Text = "Click to Record"
  171.         for i,v in pairs(workspace:GetChildren()) do
  172.             if not game.Players:findFirstChild(v.Name) then
  173.                 for q,w in pairs(v:GetChildren()) do
  174.                     if w.ClassName == "Part" then
  175.                         w.Anchored = false
  176.                     end
  177.                 end
  178.             end
  179.         end
  180.         for i,v in pairs(game.Players:GetChildren()) do
  181.             if v.Character then
  182.                 if v.Character:findFirstChild("Head") then
  183.                     v.Character["Head"].Anchored = false
  184.                 end
  185.                 if v.Character:findFirstChild("UpperTorso") then
  186.                     v.Character["UpperTorso"].Anchored = false
  187.                 end
  188.                 for q,w in pairs(v.Character:GetChildren()) do
  189.                     if w.Name == "PositionValue" then
  190.                         w:destroy()
  191.                     end
  192.                 end
  193.             end
  194.         end
  195.         for i,v in pairs(workspace:GetChildren()) do
  196.             if v.ClassName == "Part" then
  197.                 if v:findFirstChild("AnchoredValue") then
  198.                     v.Anchored = true
  199.                 else
  200.                     v.Anchored = false
  201.                 end
  202.                 v:MakeJoints()
  203.             end
  204.         end
  205.         for i,v in pairs(game.Players:GetChildren()) do
  206.             if v.Character then
  207.                 if v.Character:findFirstChild("Torso") then
  208.                     v.Character["Torso"].Anchored = false
  209.                 elseif v.Character:findFirstChild("UpperTorso") then
  210.                     v.Character["UpperTorso"].Anchored = false
  211.                 end
  212.             end
  213.         end
  214.         for i,v in pairs(workspace:GetChildren()) do
  215.             for q,w in pairs(v:GetChildren()) do
  216.                 if w.Name == "PositionValue" or w.Name == "AnchoredValue" then
  217.                     w:destroy()
  218.                 end
  219.             end
  220.         end
  221.         timetable = {}
  222.         tablenumber = 0
  223.         recording = false
  224.         hastorecord = true
  225.     end
  226. end
  227. TextButton.MouseButton1Click:connect(clicktherecordbutton)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement