Advertisement
Guest User

f

a guest
Feb 23rd, 2020
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.85 KB | None | 0 0
  1. -- Anti Lag, Synapse X Edition by iiDk
  2. local AntiLagbyiiDk = Instance.new("ScreenGui")
  3. local gameld = Instance.new("TextLabel")
  4. local final = Instance.new("TextLabel")
  5. local level = Instance.new("TextLabel")
  6. local switch = Instance.new("TextLabel")
  7. local load = Instance.new("NumberValue")
  8.  
  9. --Properties:
  10. load.Value = _G.loadTime
  11. load.Name = "LoadTime"
  12. load.Parent = AntiLagbyiiDk
  13.  
  14. AntiLagbyiiDk.Name = "Anti Lag by iiDk"
  15. AntiLagbyiiDk.Parent = game.Players.LocalPlayer.PlayerGui
  16. AntiLagbyiiDk.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
  17. AntiLagbyiiDk.ResetOnSpawn = false
  18.  
  19. gameld.Name = "game"
  20. gameld.Parent = AntiLagbyiiDk
  21. gameld.BackgroundColor3 = Color3.new(1, 1, 1)
  22. gameld.BackgroundTransparency = 1
  23. gameld.BorderSizePixel = 0
  24. gameld.Position = UDim2.new(0.68342644, 0, 0, 0)
  25. gameld.Size = UDim2.new(0, 340, 0, 50)
  26. gameld.Font = Enum.Font.SourceSansItalic
  27. gameld.Text = "Game: Unknown"
  28. gameld.TextColor3 = Color3.new(1, 1, 1)
  29. gameld.TextScaled = true
  30. gameld.TextSize = 14
  31. gameld.TextStrokeTransparency = 0
  32. gameld.TextWrapped = true
  33.  
  34. final.Name = "final"
  35. final.Parent = AntiLagbyiiDk
  36. final.BackgroundColor3 = Color3.new(1, 1, 1)
  37. final.BackgroundTransparency = 1
  38. final.BorderSizePixel = 0
  39. final.Position = UDim2.new(0.68342644, 0, 0.0788643509, 0)
  40. final.Size = UDim2.new(0, 340, 0, 50)
  41. final.Font = Enum.Font.SourceSansItalic
  42. final.Text = "Final Product: Unknown"
  43. final.TextColor3 = Color3.new(1, 1, 1)
  44. final.TextScaled = true
  45. final.TextSize = 14
  46. final.TextStrokeTransparency = 0
  47. final.TextWrapped = true
  48.  
  49. level.Name = "level"
  50. level.Parent = AntiLagbyiiDk
  51. level.BackgroundColor3 = Color3.new(1, 1, 1)
  52. level.BackgroundTransparency = 1
  53. level.BorderSizePixel = 0
  54. level.Position = UDim2.new(0.68342644, 0, 0.157728702, 0)
  55. level.Size = UDim2.new(0, 340, 0, 50)
  56. level.Font = Enum.Font.SourceSansItalic
  57. level.Text = "Lag Level: Unknown"
  58. level.TextColor3 = Color3.new(1, 1, 1)
  59. level.TextScaled = true
  60. level.TextSize = 14
  61. level.TextStrokeTransparency = 0
  62. level.TextWrapped = true
  63.  
  64. switch.Name = "switch"
  65. switch.Parent = AntiLagbyiiDk
  66. switch.BackgroundColor3 = Color3.new(1, 1, 1)
  67. switch.BackgroundTransparency = 1
  68. switch.BorderSizePixel = 0
  69. switch.Size = UDim2.new(0, 1074, 0, 634)
  70. switch.Visible = false
  71. switch.Font = Enum.Font.SourceSansItalic
  72. switch.Text = "Switching servers in 10 seconds! Save what you can."
  73. switch.TextColor3 = Color3.new(1, 0, 0.0156863)
  74. switch.TextScaled = true
  75. switch.TextSize = 14
  76. switch.TextStrokeColor3 = Color3.new(0.670588, 0, 0.00784314)
  77. switch.TextStrokeTransparency = 0
  78. switch.TextWrapped = true
  79.  
  80. -- Scripts:
  81.  
  82. local function PQKUI_fake_script() -- AntiLagbyiiDk.Script
  83. local script = Instance.new('Script', AntiLagbyiiDk)
  84.  
  85. --Load Game
  86. wait(script.Parent.LoadTime.Value)
  87. while true do
  88. -- Do not Change
  89. local place = game.GameId
  90. local TeleportService = game:GetService("TeleportService")
  91. -- Settings
  92. local default = "unknown" -- Default Lag Level
  93. local waittime = 1 -- Wait time for lag.
  94. -- Lag Finder
  95. local laglevel = default -- Lag Level, Tiny to Medium
  96. print("Game: "..place)
  97. local one = elapsedTime()
  98. wait()
  99. local two = elapsedTime()
  100. local final = two - one
  101. print(final)
  102. -- Lag Estimator
  103. if final > 0.03 then
  104. laglevel = "Tiny Lag"
  105. else
  106. if final > 0.06 then
  107. laglevel = "Small Lag"
  108. else
  109. if final > 0.09 then
  110. laglevel = "Medium Small Lag"
  111. else
  112. if final > 0.12 then
  113. laglevel = "Medium Lag"
  114. end
  115. end
  116. end
  117. end
  118. print(laglevel)
  119. -- Auto Game Switcher
  120. if final > 0.063 then
  121. print("Lag level too high, switching servers...")
  122. -- Switch Server script here
  123. script.Parent.switch.Visible = true
  124. wait(10)
  125. TeleportService:Teleport(place, owner)
  126. -- to here.
  127. else
  128. print("Lag level is fine.")
  129. end
  130. -- Edit GUI
  131. script.Parent.game.Text = "Game: "..place
  132. script.Parent.final.Text = "Final Product: "..final
  133. script.Parent.level.Text = "Lag Level: "..laglevel
  134. -- End
  135. laglevel = default
  136. wait(waittime)
  137. end
  138. end
  139. coroutine.wrap(PQKUI_fake_script)()
  140. local function SHXU_fake_script() -- AntiLagbyiiDk.LocalScript
  141. local script = Instance.new('LocalScript', AntiLagbyiiDk)
  142.  
  143. local first1 = elapsedTime()
  144. wait(script.Parent.LoadTime.Value)
  145. local first2 = elapsedTime()
  146. game.StarterGui:SetCore("SendNotification", {
  147. Title = "Anti Lag"; -- the title (ofc)
  148. Text = "Anti Lag loaded in "..first2 - first1.." seconds."; -- what the text says (ofc)
  149. Icon = ""; -- the image if u want.
  150. Duration = 5; -- how long the notification should in secounds
  151. })
  152. if (first2 - first1) > 0
  153. wait(1)
  154. game.StarterGui:SetCore("SendNotification", {
  155. Title = "Anti Lag"; -- the title (ofc)
  156. Text = "It took "..(first2 - first1) - script.Parent.LoadTime.Value.." seconds longer than it should've."; -- what the text says (ofc)
  157. Icon = ""; -- the image if u want.
  158. Duration = 5; -- how long the notification should in secounds
  159. })
  160. end
  161. coroutine.wrap(SHXU_fake_script)()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement