Advertisement
Guest User

Untitled

a guest
Nov 14th, 2019
158
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.97 KB | None | 0 0
  1. local DFTimer = Instance.new("ScreenGui")
  2. local DFTimer_2 = Instance.new("TextLabel")
  3. local Info = Instance.new("TextLabel")
  4.  
  5. DFTimer.Name = "DFTimer"
  6. DFTimer.Parent = game:WaitForChild("CoreGui")
  7. DFTimer.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
  8.  
  9. DFTimer_2.Name = "DFTimer"
  10. DFTimer_2.Parent = DFTimer
  11. DFTimer_2.BackgroundColor3 = Color3.new(1, 1, 1)
  12. DFTimer_2.BackgroundTransparency = 1
  13. DFTimer_2.Position = UDim2.new(0.442708313, 0, 0.02715756, 0)
  14. DFTimer_2.Size = UDim2.new(0.114583336, 0, 0.0751689225, 0)
  15. DFTimer_2.Font = Enum.Font.Fantasy
  16. DFTimer_2.Text = "00 : 00"
  17. DFTimer_2.TextColor3 = Color3.new(1, 1, 1)
  18. DFTimer_2.TextScaled = true
  19. DFTimer_2.TextSize = 14
  20. DFTimer_2.TextStrokeTransparency = 0
  21. DFTimer_2.TextWrapped = true
  22.  
  23. Info.Name = "Info"
  24. Info.Parent = DFTimer
  25. Info.BackgroundColor3 = Color3.new(1, 1, 1)
  26. Info.BackgroundTransparency = 1
  27. Info.Position = UDim2.new(0.435381532, 0, 0.102096133, 0)
  28. Info.Size = UDim2.new(0.129236907, 0, 0.0406173207, 0)
  29. Info.Font = Enum.Font.Fantasy
  30. Info.Text = "This timer calculates how much time it will take for the next DF to spawn."
  31. Info.TextColor3 = Color3.new(1, 1, 1)
  32. Info.TextScaled = true
  33. Info.TextSize = 14
  34. Info.TextStrokeTransparency = 0
  35. Info.TextWrapped = true
  36.  
  37. local TimeUntilNextDF
  38.  
  39. for i,v in pairs(game.Workspace:GetChildren()) do
  40. if v:IsA("Tool") and string.match(v.Name,"no mi") then
  41. local checked = Instance.new("IntValue",child)
  42. checked.Name = "Checked"
  43. end
  44. end
  45.  
  46. game.Workspace.ChildAdded:Connect(function(child)
  47. if child:IsA("Tool") and string.match(child.Name,"no mi") and not child:FindFirstChild("Checked") then
  48. TimeUntilNextDF = os.time() + (60*45)
  49. local checked = Instance.new("IntValue",child)
  50. checked.Name = "Checked"
  51. end
  52. end)
  53.  
  54. spawn(function()
  55. while wait(0.25) do
  56. local Time = os.time()
  57. if TimeUntilNextDF ~= nil and (TimeUntilNextDF - Time) >= 0 then
  58. local seconds = TimeUntilNextDF - Time
  59. DFTimer_2.Text = string.format("%02d:%02d",seconds/60%60, seconds%60)
  60. end
  61. end
  62. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement