Advertisement
Acceleracer101

Bites The Dust V1

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