Advertisement
ScriptingGuy

Sugar Simulator Script

Mar 9th, 2020
356
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.79 KB | None | 0 0
  1. The Game Link : https://www.roblox.com/games/2846607892/Sugar-Simulator
  2. Discord Link : https://discordapp.com/channels/686554761901768721/686664520596324435
  3.  
  4. ---OP GUI
  5. local storage = game:GetService("ReplicatedStorage")
  6.  
  7. local player = game:GetService("Players").LocalPlayer
  8.  
  9. local character = player.Character
  10.  
  11. local playerGui = player:FindFirstChild("PlayerGui")
  12.  
  13. local mouse = player:GetMouse()
  14.  
  15. local realm = "Starter"
  16. local autoTp = false
  17. local autoClick = false
  18.  
  19. local teleportLocations = {}
  20. teleportLocations[1] = {"Shop1", 221, 30, -740}
  21. teleportLocations[2] = {"Sell", 515, 29, -134}
  22. teleportLocations[3] = {"Starter", 166, 30, -718}
  23. teleportLocations[4] = {"Candyland", 57, 30, 25}
  24. teleportLocations[5] = {"Beach", 775, 37, -742}
  25. teleportLocations[6] = {"Snowtime", -393, 30, -473}
  26. teleportLocations[7] = {"Forest", 527, 29, -151}
  27.  
  28. local realms = {}
  29. realms[1] = "Starter"
  30. realms[2] = "Candyland"
  31. realms[3] = "Beach"
  32. realms[4] = "Snowtime"
  33. realms[5] = "Forest"
  34.  
  35. local sells = {}
  36. sells["Starter"] = Vector3.new(180, 30, -757)
  37. sells["Candyland"] = Vector3.new(35, 30, 12)
  38. sells["Beach"] = Vector3.new(750, 37, -745)
  39. sells["Snowtime"] = Vector3.new(407, 30, -500)
  40. sells["Forest"] = Vector3.new(515, 29, -134)
  41.  
  42. for i, v in pairs(playerGui:GetChildren()) do
  43. if v.Name == "Cow's_Sugar_Simulator_Gui" then
  44. v:Destroy()
  45. end
  46. end
  47.  
  48. local screenGui = Instance.new("ScreenGui", playerGui)
  49. screenGui.Name = "Cow's_Sugar_Simulator_Gui"
  50.  
  51. function createGui()
  52. local frame = Instance.new("Frame", screenGui)
  53. frame.Size = UDim2.new(0, -150, 0, 0)
  54. frame.Position = UDim2.new(1, -5, 0.4, 0)
  55. frame.BackgroundTransparency = 1
  56.  
  57. local teleportButton = Instance.new("TextButton", frame)
  58. teleportButton.Size = UDim2.new(1, 0, 0, 36)
  59. teleportButton.Position = UDim2.new(0, 0, 0, 0)
  60. teleportButton.Text = "Teleports"
  61. teleportButton.Font = Enum.Font.SourceSansBold
  62. teleportButton.TextColor3 = Color3.fromRGB(255, 255, 255)
  63. teleportButton.BackgroundColor3 = Color3.fromRGB(50, 50, 50)
  64. teleportButton.TextScaled = true
  65.  
  66. local realmButton = Instance.new("TextButton", frame)
  67. realmButton.Size = UDim2.new(1, 0, 0, 36)
  68. realmButton.Position = UDim2.new(0, 0, 0, 41)
  69. realmButton.Text = "Realms"
  70. realmButton.Font = Enum.Font.SourceSansBold
  71. realmButton.TextColor3 = Color3.fromRGB(255, 255, 255)
  72. realmButton.BackgroundColor3 = Color3.fromRGB(50, 50, 50)
  73. realmButton.TextScaled = true
  74.  
  75. teleportButton.MouseButton1Click:Connect(function()
  76. if frame:FindFirstChild("realmGui") then
  77. realmButton.TextColor3 = Color3.fromRGB(255, 255, 255)
  78. frame:FindFirstChild("realmGui"):Destroy()
  79. end
  80. if frame:FindFirstChild("teleportGui") then
  81. teleportButton.TextColor3 = Color3.fromRGB(255, 255, 255)
  82. frame:FindFirstChild("teleportGui"):Destroy()
  83. else
  84. teleportButton.TextColor3 = Color3.fromRGB(125, 125, 125)
  85. createTeleportGui(frame)
  86. end
  87. end)
  88.  
  89. realmButton.MouseButton1Click:Connect(function()
  90. if frame:FindFirstChild("teleportGui") then
  91. teleportButton.TextColor3 = Color3.fromRGB(255, 255, 255)
  92. frame:FindFirstChild("teleportGui"):Destroy()
  93. end
  94. if frame:FindFirstChild("realmGui") then
  95. realmButton.TextColor3 = Color3.fromRGB(255, 255, 255)
  96. frame:FindFirstChild("realmGui"):Destroy()
  97. else
  98. realmButton.TextColor3 = Color3.fromRGB(125, 125, 125)
  99. createRealmGui(frame)
  100. end
  101. end)
  102.  
  103. local text = Instance.new("TextLabel", frame)
  104. text.Size = UDim2.new(0.75, 0, 0, 36)
  105. text.Position = UDim2.new(0, 0, 0, 82)
  106. text.Text = "Auto Farm"
  107. text.Font = Enum.Font.SourceSansBold
  108. text.TextColor3 = Color3.fromRGB(255, 255, 255)
  109. text.BackgroundColor3 = Color3.fromRGB(50, 50, 50)
  110. text.TextScaled = true
  111.  
  112. local status = Instance.new("TextButton", frame)
  113. status.Size = UDim2.new(0.25, -5, 0, 36)
  114. status.Position = UDim2.new(0.75, 5, 0, 82)
  115. status.Text = "Off"
  116. status.Font = Enum.Font.SourceSansBold
  117. status.TextColor3 = Color3.fromRGB(255, 0, 0)
  118. status.BackgroundColor3 = Color3.fromRGB(50, 50, 50)
  119. status.TextScaled = true
  120.  
  121. status.MouseButton1Click:Connect(function()
  122. if autoTp then
  123. autoTp = false
  124. status.Text = "Off"
  125. status.TextColor3 = Color3.fromRGB(255, 0, 0)
  126. else
  127. autoTp = true
  128. status.Text = "On"
  129. status.TextColor3 = Color3.fromRGB(0, 255, 0)
  130. autoTeleportFunc()
  131. end
  132. end)
  133.  
  134. local text = Instance.new("TextLabel", frame)
  135. text.Size = UDim2.new(0.75, 0, 0, 36)
  136. text.Position = UDim2.new(0, 0, 0, 123)
  137. text.Text = "Auto Click"
  138. text.Font = Enum.Font.SourceSansBold
  139. text.TextColor3 = Color3.fromRGB(255, 255, 255)
  140. text.BackgroundColor3 = Color3.fromRGB(50, 50, 50)
  141. text.TextScaled = true
  142.  
  143. local status = Instance.new("TextButton", frame)
  144. status.Size = UDim2.new(0.25, -5, 0, 36)
  145. status.Position = UDim2.new(0.75, 5, 0, 123)
  146. status.Text = "Off"
  147. status.Font = Enum.Font.SourceSansBold
  148. status.TextColor3 = Color3.fromRGB(255, 0, 0)
  149. status.BackgroundColor3 = Color3.fromRGB(50, 50, 50)
  150. status.TextScaled = true
  151.  
  152. status.MouseButton1Click:Connect(function()
  153. if autoClick then
  154. autoClick = false
  155. status.Text = "Off"
  156. status.TextColor3 = Color3.fromRGB(255, 0, 0)
  157. else
  158. autoClick = true
  159. status.Text = "On"
  160. status.TextColor3 = Color3.fromRGB(0, 255, 0)
  161. autoClickFunc()
  162. end
  163. end)
  164. end
  165. createGui()
  166.  
  167. function createTeleportGui(frame)
  168. local frame = Instance.new("Frame", frame)
  169. frame.Name = "teleportGui"
  170. frame.Size = frame.Parent.Size
  171. frame.Position = UDim2.new(0, -5, frame.Parent.Position.X.Scale, 0)
  172. frame.BackgroundTransparency = 1
  173.  
  174. for i, v in pairs(teleportLocations) do
  175. local text = Instance.new("TextButton", frame)
  176. text.Size = UDim2.new(1, 0, 0, 36)
  177. text.Position = UDim2.new(0, 0, 0, 41 * (i - 1))
  178. text.Text = teleportLocations[i][1]
  179. text.Font = Enum.Font.SourceSansBold
  180. text.TextColor3 = Color3.fromRGB(255, 255, 255)
  181. text.BackgroundColor3 = Color3.fromRGB(50, 50, 50)
  182. text.TextScaled = true
  183.  
  184. text.MouseButton1Click:Connect(function()
  185. character:MoveTo(Vector3.new(teleportLocations[i][2], teleportLocations[i][3], teleportLocations[i][4]))
  186. end)
  187. end
  188. end
  189.  
  190. function createRealmGui(frame)
  191. local frame = Instance.new("Frame", frame)
  192. frame.Name = "realmGui"
  193. frame.Size = frame.Parent.Size
  194. frame.Position = UDim2.new(0, -5, frame.Parent.Position.X.Scale, 0)
  195. frame.BackgroundTransparency = 1
  196.  
  197. for i, v in pairs(realms) do
  198. local text = Instance.new("TextButton", frame)
  199. text.Size = UDim2.new(1, 0, 0, 36)
  200. text.Position = UDim2.new(0, 0, 0, 41 * (i - 1))
  201. text.Text = realms[i]
  202. text.Font = Enum.Font.SourceSansBold
  203. if realms[i] ~= realm then
  204. text.TextColor3 = Color3.fromRGB(255, 255, 255)
  205. else
  206. text.TextColor3 = Color3.fromRGB(125, 125, 125)
  207. end
  208. text.BackgroundColor3 = Color3.fromRGB(50, 50, 50)
  209. text.TextScaled = true
  210.  
  211. text.MouseButton1Click:Connect(function()
  212. for i, v in pairs(text.Parent:GetChildren()) do
  213. v.TextColor3 = Color3.fromRGB(255, 255, 255)
  214. end
  215. text.TextColor3 = Color3.fromRGB(125, 125, 125)
  216. realm = realms[i]
  217. end)
  218. end
  219. end
  220.  
  221. local canClick = true
  222. function autoClickFunc()
  223. if autoClick and canClick then
  224. canClick = false
  225. game:GetService("ReplicatedStorage").Events.ScreenClick:FireServer()
  226. delay(1, function()
  227. canClick = true
  228. autoClickFunc()
  229. end)
  230. end
  231. end
  232.  
  233. local canTP = true
  234. function autoTeleportFunc()
  235. if autoTp and canTP then
  236. for i, v in pairs(workspace.Realms:FindFirstChild(realm).Candies:GetChildren()) do
  237. if not autoTp then
  238. return
  239. end
  240. canTP = false
  241. v.CanCollide = false
  242. v.CFrame = character.Head.CFrame
  243. if i%2 == 0 then
  244. wait()
  245. end
  246. canTP = true
  247. end
  248. if autoTp then
  249. autoTeleportFunc()
  250. end
  251. end
  252. end
  253.  
  254.  
  255.  
  256.  
  257. --shit rebirth script
  258.  
  259. --to use this shit rebirth script, just execute this with the auto click + auto farm script from above running.
  260. --once you start it no way to stop other than leaving the server :/
  261. --change the pets down below there to what you have, use a remote spy and equip a pet to get the event
  262.  
  263. --[[
  264. local player = game:GetService("Players").LocalPlayer
  265.  
  266. local character = player.Character
  267.  
  268. local gui = Instance.new("ScreenGui", player.PlayerGui)
  269.  
  270. local button = Instance.new("TextButton", gui)
  271. button.Size = UDim2.new(0, 200, 0, 50)
  272. button.Position = UDim2.new(0, 0, 0, 0)
  273. button.Text = "Sell"
  274.  
  275. button.MouseButton1Click:Connect(function()
  276. tp()
  277. end)
  278.  
  279. local button = Instance.new("TextButton", gui)
  280. button.Size = UDim2.new(0, 200, 0, 50)
  281. button.Position = UDim2.new(0, 0, 0, 50)
  282. button.Text = "Equip Pets"
  283.  
  284. button.MouseButton1Click:Connect(function()
  285. pets()
  286. end)
  287.  
  288. local button = Instance.new("TextButton", gui)
  289. button.Size = UDim2.new(0, 200, 0, 50)
  290. button.Position = UDim2.new(0, 0, 0, 100)
  291. button.Text = "15k"
  292.  
  293. button.MouseButton1Click:Connect(function()
  294. buy1()
  295. end)
  296.  
  297. local button = Instance.new("TextButton", gui)
  298. button.Size = UDim2.new(0, 200, 0, 50)
  299. button.Position = UDim2.new(0, 0, 0, 150)
  300. button.Text = "150k"
  301.  
  302. function tp()
  303. character:MoveTo(Vector3.new(515, 29, -134))
  304. end
  305.  
  306. function pets()
  307. game:GetService("ReplicatedStorage").Events.RemoteEvent:FireServer("Equip", { "Pets", "Unicorn", "Unicorn8" })
  308. game:GetService("ReplicatedStorage").Events.RemoteEvent:FireServer("Equip", { "Pets", "Unicorn", "Unicorn9" })
  309. game:GetService("ReplicatedStorage").Events.RemoteEvent:FireServer("Equip", { "Pets", "Unicorn", "Unicorn10" })
  310. game:GetService("ReplicatedStorage").Events.RemoteEvent:FireServer("Equip", { "Pets", "Zeus", "Zeus1" })
  311. end
  312.  
  313. function buy1()
  314. game:GetService("ReplicatedStorage").Events.RemoteEvent:FireServer("Buy", { "Fatness", "Chubby" })
  315. end
  316.  
  317. function buy2()
  318. game:GetService("ReplicatedStorage").Events.RemoteEvent:FireServer("Buy", { "Fatness", "Fat" })
  319. end
  320.  
  321. function rebirth()
  322. game:GetService("ReplicatedStorage").Events.RemoteEvent:FireServer("Rebirth")
  323. end
  324.  
  325.  
  326. function Tick()
  327. tp()
  328. pets()
  329. if player.leaderstats.Coins.Value >= 15000 then
  330. buy1()
  331. end
  332. if player.leaderstats.Coins.Value >= 150000 then
  333. buy2()
  334. end
  335. rebirth()
  336. delay(1, function()
  337. Tick()
  338. end)
  339. end
  340. Tick()
  341. ]]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement