Advertisement
moathon

Bites The Dust script for Roblox

Apr 29th, 2019
3,258
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.44 KB | None | 0 0
  1. local tool = Instance.new("Tool",game.Workspace.firemomo45)
  2. tool.Name = "TimeRewind"
  3. local handle = Instance.new("Part",tool)
  4. handle.Name = "Handle"
  5. handle.Size = Vector3.new(1,1,1)
  6. local sound2 = Instance.new("Sound",handle)
  7. sound2.Name = "KQClick"
  8. sound2.SoundId = "rbxassetid://920181099"
  9. sound2.Volume = 1
  10. local sound3 = Instance.new("Sound",handle)
  11. sound3.Name = "Sound"
  12. sound3.SoundId = "rbxassetid://1409923811"
  13. local sparkles = Instance.new("ParticleEmitter",handle)
  14. local color1 = Color3.fromRGB(170,80,255)
  15. local color2 = Color3.fromRGB(170,0,255)
  16. sparkles.Name = "Aura"
  17. sparkles.Color = ColorSequence.new(color1,color2)
  18. sparkles.LightEmission = 0
  19. sparkles.LightInfluence = 0
  20. sparkles.Size = NumberSequence.new(30)
  21. sparkles.Texture = "rbxassetid://321556991"
  22. sparkles.Transparency = NumberSequence.new(.5)
  23. sparkles.Acceleration = Vector3.new(0,0,0)
  24. sparkles.LockedToPart = true
  25. sparkles.Drag = 2
  26. sparkles.Enabled = false
  27. sparkles.Lifetime = NumberRange.new(4)
  28. sparkles.Rate = 40
  29. sparkles.Rotation = NumberRange.new(0,0)
  30. sparkles.RotSpeed = NumberRange.new(180)
  31. sparkles.Speed = NumberRange.new(20)
  32. sparkles.SpreadAngle = Vector2.new(360,360)
  33. local mesh = Instance.new("SpecialMesh",handle)
  34. mesh.Name = "Mesh"
  35. mesh.MeshId = "http://www.roblox.com/asset/?id=28511792"
  36. mesh.Scale = Vector3.new(2,2,2)
  37. mesh.TextureId = "http://www.roblox.com/asset/?id=28511890"
  38. local sparkles2 = Instance.new("ParticleEmitter",handle)
  39. local color3 = Color3.fromRGB(255,255,255)
  40. sparkles2.Name = "Plasma"
  41. sparkles2.Color = ColorSequence.new(color3)
  42. sparkles2.LightEmission = 0
  43. sparkles2.LightInfluence = 1
  44. sparkles2.Size = NumberSequence.new(10)
  45. sparkles2.Texture = "rbxassetid://359293256"
  46. sparkles2.Transparency = NumberSequence.new(.5)
  47. sparkles2.ZOffset = -2
  48. sparkles2.Acceleration = Vector3.new(0,0,0)
  49. sparkles2.LockedToPart = true
  50. sparkles2.Drag = 2
  51. sparkles2.Enabled = false
  52. sparkles2.Lifetime = NumberRange.new(5)
  53. sparkles2.Rate = 20
  54. sparkles2.Rotation = NumberRange.new(360,360)
  55. sparkles2.RotSpeed = NumberRange.new(0)
  56. sparkles2.Speed = NumberRange.new(10)
  57. sparkles2.SpreadAngle = Vector2.new(360,360)
  58. local sparkles3 = Instance.new("ParticleEmitter",handle)
  59. sparkles2.Name = "Smoke"
  60. sparkles2.Color = ColorSequence.new(color3)
  61. sparkles2.LightEmission = 0
  62. sparkles2.LightInfluence = 1
  63. sparkles2.Size = NumberSequence.new(10)
  64. sparkles2.Texture = "rbxassetid://569507725"
  65. sparkles2.Transparency = NumberSequence.new(.5)
  66. sparkles2.ZOffset = -2
  67. sparkles2.Acceleration = Vector3.new(0,0,0)
  68. sparkles2.LockedToPart = true
  69. sparkles2.Drag = 2
  70. sparkles2.Enabled = false
  71. sparkles2.Lifetime = NumberRange.new(2)
  72. sparkles2.Rate = 20
  73. sparkles2.Rotation = NumberRange.new(0,0)
  74. sparkles2.RotSpeed = NumberRange.new(0)
  75. sparkles2.Speed = NumberRange.new(0)
  76. sparkles2.SpreadAngle = Vector2.new(360,360)
  77. local Billboard = Instance.new("BillboardGui",handle)
  78. Billboard.Name = "BillBoardGui"
  79. Billboard.Active = true
  80. Billboard.Enabled = false
  81. Billboard.Size = UDim2.new(5,0,2.5,0)
  82. Billboard.StudsOffset = Vector3.new(0,2,0)
  83. local Image = Instance.new("ImageLabel",Billboard)
  84. Image.Active = true
  85. Image.BackgroundTransparency = 1
  86. Image.Position = UDim2.new(0.1,0,0,0)
  87. Image.Size = UDim2.new(0.8,0,0.8,0)
  88. Image.Visible = true
  89. Image.ZIndex = 1
  90. Image.Image = "rbxassetid://1173143311"
  91. Image.ScaleType = 0
  92. local text = Instance.new("TextLabel",Image)
  93. text.Active = false
  94. text.BackgroundTransparency = 1
  95. text.Size = UDim2.new(1,0,1,0)
  96. text.Visible = true
  97. text.ZIndex = 1
  98. text.Text = "TIME SET"
  99. text.TextColor3 = Color3.fromRGB(255,0,0)
  100. text.TextScaled = true
  101. text.TextSize = 75
  102. text.TextXAlignment = 2
  103. text.TextYAlignment = 2
  104. wait()
  105. script.Parent = tool
  106. local Tool = script.Parent
  107. local Handle = Tool:WaitForChild('Handle')
  108. local sound = Handle:WaitForChild('Sound')
  109. local rewind ={}
  110. local oldvol ={}
  111. local foldar = Instance.new("Folder",game.ReplicatedStorage)
  112. local timelogged = false
  113. local function OnEquipped()
  114. if timelogged == false then
  115. foldar:ClearAllChildren()
  116. rewind = {}
  117. wait()
  118. Handle.KQClick:Play()
  119. Handle.BillBoardGui.Enabled = true
  120. print("Time Has Been Logged")
  121. local blah = game.Workspace:GetChildren()
  122. for i=1,#blah do
  123. if blah[i]:IsA("Terrain") == false then
  124. if blah[i] ~= nil then
  125. rewind[i] = blah[i]:Clone()
  126. for i=1,#rewind do
  127. if rewind[i]~=nil then
  128. rewind[i].Parent = foldar
  129. if rewind[i]:IsA("Sound") == true then
  130. if rewind[i].IsPlaying == true then
  131. oldvol[i]=rewind[i]
  132. oldvol[i]:Pause()
  133. end
  134. end
  135. end
  136. end
  137. end
  138. end
  139. end
  140. wait(1)
  141. Handle.BillBoardGui.Enabled = false
  142. end
  143. timelogged=true
  144. end
  145. local function OnActivated()
  146. Handle.Aura.Enabled = true
  147. Handle.Smoke.Enabled = true
  148. sound:Play()
  149. Handle.Anchored = true
  150. print("Returning to the past")
  151. wait(3)
  152. local yah = game.Workspace:GetChildren()
  153. local nah = foldar:GetChildren()
  154. for i=1,#yah do
  155. if yah[i]:IsA("Terrain") == false then
  156. if yah[i]~=Tool.Parent then
  157. yah[i]:Destroy()
  158. end
  159. end
  160. for i=1,#nah do
  161. nah[i].Parent = game.Workspace
  162. if nah[i]:IsA("Sound") == true then
  163. for i=1,#oldvol do
  164. print(oldvol[i].Name)
  165. oldvol[i]:Resume()
  166. end
  167. end
  168. end
  169. end
  170. Handle.Anchored = false
  171. Handle.Aura.Enabled = false
  172. Handle.Smoke.Enabled = false
  173. Handle.Plasma.Enabled = false
  174. timelogged = false
  175. Tool.Parent.Humanoid:UnequipTools()
  176. end
  177. local function OnUnequipped()
  178.  
  179. end
  180. Tool.Equipped:connect(OnEquipped)
  181. Tool.Activated:connect(OnActivated)
  182. Tool.Unequipped:connect(OnUnequipped)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement