brianops1

SafeCrackSim

Aug 5th, 2019
3,696
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 19.61 KB | None | 0 0
  1. --[[
  2. ~ Description ~
  3.  
  4. This is a pretty basic autofarm :P works well though
  5. --------------------------------
  6. ~ Game ~
  7.  
  8. https://www.roblox.com/games/3155411734/NEW-Safe-Cracking-Simulator#!/game-instances
  9. --------------------------------
  10. ~ Credit ~
  11.  
  12. Gui - brianops1
  13.  
  14. Scripter(s) - brianops1
  15. --]]
  16.  
  17. _G.KEY = "LeftAlt" -- for the tp to mouse keybind
  18. _G.KEY1 = "H" -- for the Noclip keybind
  19.  
  20. function define()
  21. plr = game:GetService('Players').LocalPlayer
  22. Root = plr.Character.HumanoidRootPart
  23. UIS = game:GetService("UserInputService")
  24. mouse = plr:GetMouse()
  25. end
  26. print('loading')
  27. repeat
  28.     wait()
  29. until pcall(define)
  30. local ScreenGui = Instance.new("ScreenGui")
  31. local MainFrame = Instance.new("Frame")
  32. local PreBuilt = Instance.new("Frame")
  33. local EB1 = Instance.new("TextButton")
  34. local Toplabel = Instance.new("TextLabel")
  35. local EB2 = Instance.new("TextButton")
  36. local EB3 = Instance.new("TextButton")
  37. local EB4 = Instance.new("TextButton")
  38. local EB5 = Instance.new("TextButton")
  39. local EB6 = Instance.new("TextButton")
  40. local Bottomlabel = Instance.new("TextLabel")
  41. local Game = Instance.new("TextLabel")
  42. local Minimize = Instance.new("TextButton")
  43. local Close = Instance.new("TextButton")
  44. local Credits = Instance.new("TextLabel")
  45. local B1 = Instance.new("TextButton")
  46. local B2 = Instance.new("TextButton")
  47. local B5 = Instance.new("TextButton")
  48. local B8 = Instance.new("TextButton")
  49. local B6 = Instance.new("TextButton")
  50. local B4 = Instance.new("TextButton")
  51. local B7 = Instance.new("TextButton")
  52. local B3 = Instance.new("TextButton")
  53. local BuiltInButton = Instance.new("TextButton")
  54. local Background = Instance.new("ImageLabel")
  55. ---------------------Gui Variables----------------------
  56. ScreenGui.Parent = game.CoreGui
  57. MainFrame.Name = "MainFrame"
  58. MainFrame.Parent = ScreenGui
  59. MainFrame.BackgroundColor3 = Color3.new(1, 1, 1)
  60. MainFrame.BorderColor3 = Color3.new(1, 0.835294, 0.172549)
  61. MainFrame.BorderSizePixel = 2
  62. MainFrame.Position = UDim2.new(0, 270, 0, 101)
  63. MainFrame.Size = UDim2.new(0, 278, 0, 279)
  64. MainFrame.Selectable = true
  65. MainFrame.Active = true
  66. MainFrame.Draggable = true
  67. PreBuilt.Name = "PreBuilt"
  68. PreBuilt.Parent = MainFrame
  69. PreBuilt.BackgroundColor3 = Color3.new(0.972549, 0.764706, 0.129412)
  70. PreBuilt.BorderSizePixel = 0
  71. PreBuilt.Position = UDim2.new(0, 287, 0, 17)
  72. PreBuilt.Size = UDim2.new(0, 186, 0, 246)
  73. PreBuilt.Visible = false
  74. EB1.Name = "EB1"
  75. EB1.Parent = PreBuilt
  76. EB1.BackgroundColor3 = Color3.new(1, 1, 1)
  77. EB1.BackgroundTransparency = 0.30000001192093
  78. EB1.BorderSizePixel = 0
  79. EB1.Position = UDim2.new(0, 0, 0.117886186, 0)
  80. EB1.Size = UDim2.new(0, 186, 0, 25)
  81. EB1.Font = Enum.Font.SourceSans
  82. EB1.Text = ""
  83. EB1.TextColor3 = Color3.new(0, 0, 0)
  84. EB1.TextSize = 13
  85. Toplabel.Name = "Toplabel"
  86. Toplabel.Parent = PreBuilt
  87. Toplabel.BackgroundColor3 = Color3.new(1, 1, 1)
  88. Toplabel.BackgroundTransparency = 0.20000000298023
  89. Toplabel.BorderSizePixel = 0
  90. Toplabel.Position = UDim2.new(0, 0, -0.008130081, 0)
  91. Toplabel.Size = UDim2.new(0, 186, 0, 25)
  92. Toplabel.Font = Enum.Font.SourceSans
  93. Toplabel.Text = "Built In Scripts"
  94. Toplabel.TextColor3 = Color3.new(0, 0, 0)
  95. Toplabel.TextSize = 14
  96. Toplabel.TextWrapped = true
  97. EB2.Name = "EB2"
  98. EB2.Parent = PreBuilt
  99. EB2.BackgroundColor3 = Color3.new(1, 1, 1)
  100. EB2.BackgroundTransparency = 0.30000001192093
  101. EB2.BorderSizePixel = 0
  102. EB2.Position = UDim2.new(0, 0, 0.243902445, 0)
  103. EB2.Size = UDim2.new(0, 186, 0, 25)
  104. EB2.Font = Enum.Font.SourceSans
  105. EB2.Text = ""
  106. EB2.TextColor3 = Color3.new(0, 0, 0)
  107. EB2.TextSize = 13
  108. EB3.Name = "EB3"
  109. EB3.Parent = PreBuilt
  110. EB3.BackgroundColor3 = Color3.new(1, 1, 1)
  111. EB3.BackgroundTransparency = 0.30000001192093
  112. EB3.BorderSizePixel = 0
  113. EB3.Position = UDim2.new(0, 0, 0, 91)
  114. EB3.Size = UDim2.new(0, 186, 0, 25)
  115. EB3.Font = Enum.Font.SourceSans
  116. EB3.Text = ""
  117. EB3.TextColor3 = Color3.new(0, 0, 0)
  118. EB3.TextSize = 13
  119. EB4.Name = "EB4"
  120. EB4.Parent = PreBuilt
  121. EB4.BackgroundColor3 = Color3.new(1, 1, 1)
  122. EB4.BackgroundTransparency = 0.30000001192093
  123. EB4.BorderSizePixel = 0
  124. EB4.Position = UDim2.new(0, 0, 0.495934963, 0)
  125. EB4.Size = UDim2.new(0, 186, 0, 25)
  126. EB4.Font = Enum.Font.SourceSans
  127. EB4.Text = ""
  128. EB4.TextColor3 = Color3.new(0, 0, 0)
  129. EB4.TextSize = 13
  130. EB5.Name = "EB5"
  131. EB5.Parent = PreBuilt
  132. EB5.BackgroundColor3 = Color3.new(1, 1, 1)
  133. EB5.BackgroundTransparency = 0.30000001192093
  134. EB5.BorderSizePixel = 0
  135. EB5.Position = UDim2.new(0, 0, 0, 153)
  136. EB5.Size = UDim2.new(0, 186, 0, 25)
  137. EB5.Font = Enum.Font.SourceSans
  138. EB5.Text = ""
  139. EB5.TextColor3 = Color3.new(0, 0, 0)
  140. EB5.TextSize = 13
  141. EB6.Name = "EB6"
  142. EB6.Parent = PreBuilt
  143. EB6.BackgroundColor3 = Color3.new(1, 1, 1)
  144. EB6.BackgroundTransparency = 0.30000001192093
  145. EB6.BorderSizePixel = 0
  146. EB6.Position = UDim2.new(0, 0, 0.747967541, 0)
  147. EB6.Size = UDim2.new(0, 186, 0, 25)
  148. EB6.Font = Enum.Font.SourceSans
  149. EB6.Text = ""
  150. EB6.TextColor3 = Color3.new(0, 0, 0)
  151. EB6.TextSize = 13
  152. Bottomlabel.Name = "Bottomlabel"
  153. Bottomlabel.Parent = PreBuilt
  154. Bottomlabel.BackgroundColor3 = Color3.new(1, 1, 1)
  155. Bottomlabel.BackgroundTransparency = 0.20000000298023
  156. Bottomlabel.BorderSizePixel = 0
  157. Bottomlabel.Position = UDim2.new(0, 0, 0.898373961, 0)
  158. Bottomlabel.Size = UDim2.new(0, 186, 0, 25)
  159. Bottomlabel.Font = Enum.Font.SourceSans
  160. Bottomlabel.Text = "Good Scripts to have eh?"
  161. Bottomlabel.TextColor3 = Color3.new(0, 0, 0)
  162. Bottomlabel.TextSize = 13
  163. Game.Name = "Game"
  164. Game.Parent = MainFrame
  165. Game.BackgroundColor3 = Color3.new(1, 1, 1)
  166. Game.BackgroundTransparency = 0.20000000298023
  167. Game.BorderColor3 = Color3.new(1, 1, 1)
  168. Game.BorderSizePixel = 0
  169. Game.Position = UDim2.new(0, 0,0, -2)
  170. Game.Size = UDim2.new(0, 227, 0, 25)
  171. Game.ZIndex = 2
  172. Game.Font = Enum.Font.SourceSans
  173. Game.Text = "Game Name Is Supposed to Be Here"
  174. Game.TextColor3 = Color3.new(0, 0, 0)
  175. Game.TextSize = 13
  176. Game.TextWrapped = true
  177. Minimize.Name = "Minimize"
  178. Minimize.Parent = MainFrame
  179. Minimize.BackgroundColor3 = Color3.new(1, 1, 1)
  180. Minimize.BackgroundTransparency = 0.20000000298023
  181. Minimize.BorderSizePixel = 0
  182. Minimize.Position = UDim2.new(0, 227,0, -2)
  183. Minimize.Size = UDim2.new(0, 25, 0, 25)
  184. Minimize.ZIndex = 2
  185. Minimize.Font = Enum.Font.SourceSans
  186. Minimize.Text = "-"
  187. Minimize.TextColor3 = Color3.new(0, 0, 0)
  188. Minimize.TextSize = 24
  189. Close.Name = "Close"
  190. Close.Parent = MainFrame
  191. Close.BackgroundColor3 = Color3.new(1, 1, 1)
  192. Close.BackgroundTransparency = 0.20000000298023
  193. Close.BorderSizePixel = 0
  194. Close.Position = UDim2.new(0, 251, 0, -2)
  195. Close.Size = UDim2.new(0, 28, 0, 25)
  196. Close.ZIndex = 2
  197. Close.Font = Enum.Font.SourceSans
  198. Close.Text = "x"
  199. Close.TextColor3 = Color3.new(0, 0, 0)
  200. Close.TextSize = 16
  201. Credits.Name = "Credits"
  202. Credits.Parent = MainFrame
  203. Credits.BackgroundColor3 = Color3.new(1, 1, 1)
  204. Credits.BackgroundTransparency = 0.20000000298023
  205. Credits.BorderColor3 = Color3.new(1, 1, 1)
  206. Credits.BorderSizePixel = 0
  207. Credits.Position = UDim2.new(-0.00359712238, 0, 0.9048931, 0)
  208. Credits.Size = UDim2.new(0, 278, 0, 28)
  209. Credits.ZIndex = 2
  210. Credits.Font = Enum.Font.SourceSans
  211. Credits.Text = "Gui ~ brianops1 | Scripter(s) ~ "
  212. Credits.TextColor3 = Color3.new(0, 0, 0)
  213. Credits.TextSize = 13
  214. Credits.TextWrapped = true
  215. B1.Name = "B1"
  216. B1.Parent = MainFrame
  217. B1.BackgroundColor3 = Color3.new(1, 1, 1)
  218. B1.BackgroundTransparency = 0.20000000298023
  219. B1.BorderColor3 = Color3.new(1, 1, 1)
  220. B1.Position = UDim2.new(0.0242086351, 0, 0.218306571, 0)
  221. B1.Size = UDim2.new(0, 125, 0, 40)
  222. B1.ZIndex = 2
  223. B1.Font = Enum.Font.SourceSans
  224. B1.Text = ""
  225. B1.TextColor3 = Color3.new(0, 0, 0)
  226. B1.TextSize = 13
  227. B1.TextWrapped = true
  228. B2.Name = "B2"
  229. B2.Parent = MainFrame
  230. B2.BackgroundColor3 = Color3.new(1, 1, 1)
  231. B2.BackgroundTransparency = 0.20000000298023
  232. B2.BorderColor3 = Color3.new(1, 1, 1)
  233. B2.Position = UDim2.new(0, 144, 0, 60)
  234. B2.Size = UDim2.new(0, 125, 0, 41)
  235. B2.ZIndex = 2
  236. B2.Font = Enum.Font.SourceSans
  237. B2.Text = ""
  238. B2.TextColor3 = Color3.new(0, 0, 0)
  239. B2.TextSize = 13
  240. B2.TextWrapped = true
  241. B5.Name = "B5"
  242. B5.Parent = MainFrame
  243. B5.BackgroundColor3 = Color3.new(1, 1, 1)
  244. B5.BackgroundTransparency = 0.20000000298023
  245. B5.BorderColor3 = Color3.new(1, 1, 1)
  246. B5.Position = UDim2.new(0.0251798555, 0, 0.559432089, 0)
  247. B5.Size = UDim2.new(0, 125, 0, 40)
  248. B5.ZIndex = 2
  249. B5.Font = Enum.Font.SourceSans
  250. B5.Text = ""
  251. B5.TextColor3 = Color3.new(0, 0, 0)
  252. B5.TextSize = 13
  253. B5.TextWrapped = true
  254. B8.Name = "B8"
  255. B8.Parent = MainFrame
  256. B8.BackgroundColor3 = Color3.new(1, 1, 1)
  257. B8.BackgroundTransparency = 0.20000000298023
  258. B8.BorderColor3 = Color3.new(1, 1, 1)
  259. B8.Position = UDim2.new(0, 144, 0, 204)
  260. B8.Size = UDim2.new(0, 125, 0, 40)
  261. B8.ZIndex = 2
  262. B8.Font = Enum.Font.SourceSans
  263. B8.Text = ""
  264. B8.TextColor3 = Color3.new(0, 0, 0)
  265. B8.TextSize = 13
  266. B8.TextWrapped = true
  267. B6.Name = "B6"
  268. B6.Parent = MainFrame
  269. B6.BackgroundColor3 = Color3.new(1, 1, 1)
  270. B6.BackgroundTransparency = 0.20000000298023
  271. B6.BorderColor3 = Color3.new(1, 1, 1)
  272. B6.Position = UDim2.new(0.517985642, 0, 0.557863712, 0)
  273. B6.Size = UDim2.new(0, 125, 0, 40)
  274. B6.ZIndex = 2
  275. B6.Font = Enum.Font.SourceSans
  276. B6.Text = ""
  277. B6.TextColor3 = Color3.new(0, 0, 0)
  278. B6.TextSize = 13
  279. B6.TextWrapped = true
  280. B4.Name = "B4"
  281. B4.Parent = MainFrame
  282. B4.BackgroundColor3 = Color3.new(1, 1, 1)
  283. B4.BackgroundTransparency = 0.20000000298023
  284. B4.BorderColor3 = Color3.new(1, 1, 1)
  285. B4.Position = UDim2.new(0, 144, 0, 109)
  286. B4.Size = UDim2.new(0, 125, 0, 40)
  287. B4.ZIndex = 2
  288. B4.Font = Enum.Font.SourceSans
  289. B4.Text = ""
  290. B4.TextColor3 = Color3.new(0, 0, 0)
  291. B4.TextSize = 13
  292. B4.TextWrapped = true
  293. B7.Name = "B7"
  294. B7.Parent = MainFrame
  295. B7.BackgroundColor3 = Color3.new(1, 1, 1)
  296. B7.BackgroundTransparency = 0.20000000298023
  297. B7.BorderColor3 = Color3.new(1, 1, 1)
  298. B7.Position = UDim2.new(0.0251798555, 0, 0.731607914, 0)
  299. B7.Size = UDim2.new(0, 125, 0, 40)
  300. B7.ZIndex = 2
  301. B7.Font = Enum.Font.SourceSans
  302. B7.Text = ""
  303. B7.TextColor3 = Color3.new(0, 0, 0)
  304. B7.TextSize = 13
  305. B7.TextWrapped = true
  306. B3.Name = "B3"
  307. B3.Parent = MainFrame
  308. B3.BackgroundColor3 = Color3.new(1, 1, 1)
  309. B3.BackgroundTransparency = 0.20000000298023
  310. B3.BorderColor3 = Color3.new(1, 1, 1)
  311. B3.Position = UDim2.new(0.0251798555, 0, 0.392196536, 0)
  312. B3.Size = UDim2.new(0, 125, 0, 40)
  313. B3.ZIndex = 2
  314. B3.Font = Enum.Font.SourceSans
  315. B3.Text = ""
  316. B3.TextColor3 = Color3.new(0, 0, 0)
  317. B3.TextSize = 13
  318. B3.TextWrapped = true
  319. BuiltInButton.Name = "BuiltInButton"
  320. BuiltInButton.Parent = MainFrame
  321. BuiltInButton.BackgroundColor3 = Color3.new(1, 1, 1)
  322. BuiltInButton.BackgroundTransparency = 0.20000000298023
  323. BuiltInButton.BorderSizePixel = 0
  324. BuiltInButton.Position = UDim2.new(0.0242086723, 0, 0.112921163, 0)
  325. BuiltInButton.Size = UDim2.new(0, 262, 0, 22)
  326. BuiltInButton.ZIndex = 2
  327. BuiltInButton.Font = Enum.Font.SourceSans
  328. BuiltInButton.Text = "Toggle Built-In Gui Scripts"
  329. BuiltInButton.TextColor3 = Color3.new(0, 0, 0)
  330. BuiltInButton.TextSize = 13
  331. BuiltInButton.TextWrapped = true
  332. Background.Name = "Background"
  333. Background.Parent = MainFrame
  334. Background.BackgroundColor3 = Color3.new(1, 1, 1)
  335. Background.BorderSizePixel = 0
  336. Background.LayoutOrder = 1
  337. Background.Size = UDim2.new(0, 277, 0, 281)
  338. Background.Image = "rbxassetid://325122566"
  339. B1.BorderSizePixel = 0
  340. B2.BorderSizePixel = 0
  341. B3.BorderSizePixel = 0
  342. B4.BorderSizePixel = 0
  343. B5.BorderSizePixel = 0
  344. B6.BorderSizePixel = 0
  345. B7.BorderSizePixel = 0
  346. B8.BorderSizePixel = 0
  347. _G.noclip = false
  348. ------------------PreBuilt Scripts-----------------------
  349. EB1.Text = "Dex"
  350. EB2.Text = "R2S"
  351. EB3.Text = "Noclip (Default H)"
  352. EB4.Text = "Tp to mouse (Default LeftAlt)"
  353. EB5.Text = "Print/Copy Vector3 position"
  354. EB6.Text = "Baseplate (click again to tp back)"
  355.  
  356. EB1.MouseButton1Click:connect(function()
  357.     loadstring(game:GetObjects('rbxassetid://2180084478')[1].Source)()
  358. end)
  359. EB2.MouseButton1Click:connect(function()
  360.     loadstring(game:HttpGet(('https://pastebin.com/raw/PvBGZZdH'),true))()
  361. end)
  362. EB3.MouseButton1Click:connect(function()
  363.     UIS.InputBegan:connect(function(Input)
  364.         plr = game:GetService('Players').LocalPlayer
  365.         UIS = game:GetService("UserInputService")
  366.         mouse = plr:GetMouse()
  367.         local KeyCode = Input.KeyCode
  368.         if KeyCode == Enum.KeyCode[_G.KEY1] and _G.noclip == false then
  369.             _G.noclip = true
  370.             while _G.noclip do
  371.                 plr.Character.Humanoid:ChangeState(11)
  372.                 game:GetService('RunService').Stepped:wait()
  373.             end
  374.         elseif KeyCode == Enum.KeyCode[_G.KEY1] and _G.noclip then
  375.             _G.noclip = false
  376.         end
  377.     end)
  378. end)
  379. EB4.MouseButton1Click:connect(function()
  380.     UIS.InputBegan:connect(function(Input)
  381.         plr = game:GetService('Players').LocalPlayer
  382.         UIS = game:GetService("UserInputService")
  383.         mouse = plr:GetMouse()
  384.         local KeyCode = Input.KeyCode
  385.         if KeyCode == Enum.KeyCode[_G.KEY] then
  386.             local hum = plr.Character.HumanoidRootPart
  387.             if mouse.Target then
  388.                 hum.CFrame = CFrame.new(mouse.Hit.x, mouse.Hit.y + 4, mouse.Hit.z)
  389.             end
  390.         end
  391.     end)
  392. end)
  393. EB5.MouseButton1Click:connect(function()
  394.     x = loc(Root.CFrame.x)
  395.     y = loc(Root.CFrame.y)
  396.     z = loc(Root.CFrame.z)
  397.     print('-----------------')
  398.     print('Your x value is '.. x)
  399.     print('Your y value is '.. y)
  400.     print('Your z value is '.. z)
  401.     pcall(copy,x,y,z)
  402. end)
  403. EB6.MouseButton1Click:connect(function()
  404.     local check = game.Workspace:FindFirstChild("BRIAN'S PLATFORM")
  405.     if check then
  406.         Root.CFrame = _G.StartingPosition
  407.         check:Destroy()
  408.     else
  409.         _G.StartingPosition = Root.CFrame
  410.         local P = Instance.new("Part", workspace)
  411.         P.Anchored = true
  412.         P.CFrame = Root.CFrame * CFrame.new(0, 5500, 0)
  413.         P.Name = "BRIAN'S PLATFORM"
  414.         P.Size = Vector3.new(80, 1, 80)
  415.         Root.CFrame = P.CFrame * CFrame.new(0,5,0)
  416.     end
  417. end)
  418.  
  419. ---------------------Functions---------------------------
  420. function VarOff()
  421.     _G.on1 = 0
  422.     _G.on2 = 0
  423.     _G.on3 = 0
  424.     _G.on4 = 0
  425.     _G.on5 = 0
  426.     _G.on6 = 0
  427.     _G.on7 = 0
  428.     _G.on8 = 0
  429. end
  430. function loc(cframe)
  431.     local location = string.find(cframe, ".", 1, true)
  432.     if location == nil then
  433.         return cframe
  434.     end
  435.     return string.sub(cframe, 1, location + 1)
  436. end
  437. function copy(x,y,z)
  438.     setclipboard(x .. ", " .. y .. ", " .. z)
  439. end
  440. VarOff()
  441. m = 0
  442. Minimize.MouseButton1Click:connect(function()
  443.     if m == 0 then
  444.         m = 1
  445.         opennn = PreBuilt.Visible
  446.         B1.Visible = false
  447.         B2.Visible = false
  448.         B3.Visible = false
  449.         B4.Visible = false
  450.         B5.Visible = false
  451.         B6.Visible = false
  452.         B7.Visible = false
  453.         B8.Visible = false
  454.         BuiltInButton.Visible = false
  455.         Credits.Visible = false
  456.         PreBuilt.Visible = false
  457.         Background.Size = UDim2.new(0,278,0,25)
  458.         MainFrame.Size = UDim2.new(0,278,0,25)
  459.     else
  460.         m = 0
  461.         B1.Visible = true
  462.         B2.Visible = true
  463.         B3.Visible = true
  464.         B4.Visible = true
  465.         B5.Visible = true
  466.         B6.Visible = true
  467.         B7.Visible = true
  468.         B8.Visible = true
  469.         BuiltInButton.Visible = true
  470.         Credits.Visible = true
  471.         PreBuilt.Visible = opennn
  472.         Background.Size = UDim2.new(0,278,0,281)
  473.         MainFrame.Size = UDim2.new(0,278,0,279)
  474.     end
  475. end)
  476. Close.MouseButton1Click:connect(function()
  477.     VarOff()
  478.     ScreenGui:Destroy()
  479. end)
  480. builtin = 0
  481. BuiltInButton.MouseButton1Click:connect(function()
  482.     if builtin == 0 then
  483.         builtin = 1
  484.         PreBuilt.Visible = true
  485.     else
  486.         builtin = 0
  487.         PreBuilt.Visible = false
  488.     end
  489. end)
  490. function ON(button)
  491.     if button.Name == "B1" then
  492.         _G.on1 = 1
  493.     elseif button.Name == "B2" then
  494.         _G.on2 = 1
  495.     elseif button.Name == "B3" then
  496.         _G.on3 = 1
  497.     elseif button.Name == "B4" then
  498.         _G.on4 = 1
  499.     elseif button.Name == "B5" then
  500.         _G.on5 = 1
  501.     elseif button.Name == "B6" then
  502.         _G.on6 = 1
  503.     elseif button.Name == "B7" then
  504.         _G.on7 = 1
  505.     elseif button.Name == "B8" then
  506.         _G.on8 = 1
  507.     end
  508.     button.BorderSizePixel = 2
  509.     button.BorderColor3 = Color3.fromRGB(0, 0, 0)
  510. end
  511. function OFF(button)
  512.     if button.Name == "B1" then
  513.         _G.on1 = 0
  514.     elseif button.Name == "B2" then
  515.         _G.on2 = 0
  516.     elseif button.Name == "B3" then
  517.         _G.on3 = 0
  518.     elseif button.Name == "B4" then
  519.         _G.on4 = 0
  520.     elseif button.Name == "B5" then
  521.         _G.on5 = 0
  522.     elseif button.Name == "B6" then
  523.         _G.on6 = 0
  524.     elseif button.Name == "B7" then
  525.         _G.on7 = 0
  526.     elseif button.Name == "B8" then
  527.         _G.on8 = 0
  528.     end
  529.     button.BorderSizePixel = 0
  530.     button.BorderColor3 = Color3.fromRGB(255, 255, 255)
  531. end
  532.  
  533. function Check(obj,obj2)
  534.     if obj and obj2 and (obj:FindFirstChildOfClass("Part").Position - obj2.Position).Magnitude > 5 and obj:FindFirstChildOfClass("Part").Position.Y < 60 then
  535.         obj2.CFrame = obj:FindFirstChildOfClass("Part").CFrame * CFrame.new(0,2,0)
  536.         local tbl_main =
  537.         {
  538.             obj
  539.         }
  540.         game:GetService("ReplicatedStorage").Events.SafeSelected:FireServer(unpack(tbl_main))
  541.     end
  542. end
  543.  
  544. ---------------------Main Code---------------------------
  545.  
  546. Game.Text = "Safe Sim" -- Game name here
  547.  
  548. Credits.Text = Credits.Text .. "brianops1" --Scripter(s) name(s) here
  549.  
  550.  
  551. B1.Text = "Main Autofarm" --Script Names go here
  552. B2.Text = "Tp to shop"
  553. B3.Text = ""
  554. B4.Text = ""
  555. B5.Text = ""
  556. B6.Text = ""
  557. B7.Text = ""
  558. B8.Text = ""
  559.  
  560.  
  561.  
  562. B1.MouseButton1Click:connect(function()
  563.     if _G.on1 == 1 then
  564.         OFF(B1)
  565.     else
  566.         ON(B1)
  567.         game:GetService('RunService').Stepped:wait()
  568.         while _G.on1 == 1 do
  569.             wait()
  570.             local plr = game.Players.LocalPlayer
  571.             local root = plr.Character.HumanoidRootPart
  572.             local stage = "Stage"..plr.leaderstats.Stage.Value
  573.             for i,v in pairs(game:GetService("Workspace").Miscellaneous.Rewards.Dropped:GetChildren()) do
  574.                 if v and root and v:IsA("MeshPart") or v:IsA("Part")  then
  575.                     v.CFrame = root.CFrame
  576.                 end
  577.             end
  578.             for i,box in pairs(game:GetService("Workspace").Safes[stage]:GetChildren()) do
  579.                 if box and not box.Destroyed.Value and root and _G.on1 == 1 then
  580.                     local plr = game.Players.LocalPlayer
  581.                     local root = plr.Character.HumanoidRootPart
  582.                     while not box.Destroyed.Value and _G.on1 == 1 do
  583.                         Check(box,root)
  584.                         wait()
  585.                         local tbl_main =
  586.                         {
  587.                               "hit"
  588.                         }
  589.                         game:GetService("ReplicatedStorage").Events.Interact:FireServer(unpack(tbl_main))
  590.                     end
  591.                     for i,v in pairs(game:GetService("Workspace").Miscellaneous.Rewards.Dropped:GetChildren()) do
  592.                         if v and root and v:IsA("MeshPart") or v:IsA("Part") then
  593.                             v.CFrame = root.CFrame
  594.                         end
  595.                     end
  596.                     wait(.2)
  597.                     break
  598.                 end
  599.             end
  600.         end
  601.         OFF(B1)
  602.     end
  603. end)
  604.  
  605. B2.MouseButton1Click:connect(function()
  606.     if _G.on2 == 1 then
  607.         OFF(B2)
  608.     else
  609.         ON(B2)
  610.         game:GetService('RunService').Stepped:wait()
  611.         local plr = game.Players.LocalPlayer
  612.         local root = plr.Character.HumanoidRootPart
  613.         root.CFrame = CFrame.new(334.3, 57.2, -1434.5)
  614.         OFF(B2)
  615.     end
  616. end)
  617.  
  618. B3.MouseButton1Click:connect(function()
  619.     if _G.on3 == 1 then
  620.         OFF(B3)
  621.     else
  622.         ON(B3)
  623.         game:GetService('RunService').Stepped:wait()
  624.         --code
  625.         OFF(B3)
  626.     end
  627. end)
  628.  
  629. B4.MouseButton1Click:connect(function()
  630.     if _G.on4 == 1 then
  631.         OFF(B4)
  632.     else
  633.         ON(B4)
  634.         game:GetService('RunService').Stepped:wait()
  635.         --code
  636.         OFF(B4)
  637.     end
  638. end)
  639.  
  640. B5.MouseButton1Click:connect(function()
  641.     if _G.on5 == 1 then
  642.         OFF(B5)
  643.     else
  644.         ON(B5)
  645.         game:GetService('RunService').Stepped:wait()
  646.         --code
  647.         OFF(B5)
  648.     end
  649. end)
  650.  
  651. B6.MouseButton1Click:connect(function()
  652.     if _G.on6 == 1 then
  653.         OFF(B6)
  654.     else
  655.         ON(B6)
  656.         game:GetService('RunService').Stepped:wait()
  657.         --code
  658.         OFF(B6)
  659.     end
  660. end)
  661.  
  662. B7.MouseButton1Click:connect(function()
  663.     if _G.on7 == 1 then
  664.         OFF(B7)
  665.     else
  666.         ON(B7)
  667.         game:GetService('RunService').Stepped:wait()
  668.         --code
  669.         OFF(B7)
  670.     end
  671. end)
  672.  
  673. B8.MouseButton1Click:connect(function()
  674.     if _G.on8 == 1 then
  675.         OFF(B8)
  676.     else
  677.         ON(B8)
  678.         game:GetService('RunService').Stepped:wait()
  679.         --Code
  680.         OFF(B8)
  681.     end
  682. end)
  683.  
  684.  
  685. print('loaded')
Add Comment
Please, Sign In to add comment