trixade

WizardTycoon2Player Gui

Jan 29th, 2022 (edited)
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 22.09 KB | None | 0 0
  1. -- Gui to Lua
  2. -- Version: 3.2
  3.  
  4. -- Instances:
  5.  
  6. local wizardHax = Instance.new("ScreenGui")
  7. local main = Instance.new("Frame")
  8. local title = Instance.new("TextLabel")
  9. local healthButton = Instance.new("TextButton")
  10. local funcButton = Instance.new("TextButton")
  11. local closeButton = Instance.new("TextButton")
  12. local healthGUI = Instance.new("Frame")
  13. local healthTitle = Instance.new("TextLabel")
  14. local targetBox = Instance.new("TextBox")
  15. local negateButton = Instance.new("TextButton")
  16. local numBox = Instance.new("TextBox")
  17. local errorTitle = Instance.new("TextLabel")
  18. local infoTarget = Instance.new("TextLabel")
  19. local infoNum = Instance.new("TextLabel")
  20. local addButton = Instance.new("TextButton")
  21. local setButton = Instance.new("TextButton")
  22. local closeButton_2 = Instance.new("TextButton")
  23. local funcGUI = Instance.new("Frame")
  24. local TextLabel = Instance.new("TextLabel")
  25. local closeButton_3 = Instance.new("TextButton")
  26. local funcButton1 = Instance.new("TextButton")
  27. local funcButton3 = Instance.new("TextButton")
  28. local funcButton6 = Instance.new("TextButton")
  29. local funcButton4 = Instance.new("TextButton")
  30. local funcButton9 = Instance.new("TextButton")
  31. local funcButton7 = Instance.new("TextButton")
  32. local funcButton2 = Instance.new("TextButton")
  33. local funcButton5 = Instance.new("TextButton")
  34. local funcButton8 = Instance.new("TextButton")
  35. local openButton = Instance.new("Frame")
  36. local openButton_2 = Instance.new("TextButton")
  37. local autoBuyStuff = false -- auto buy stuff in your team
  38. local autoGetMoney = false -- auto get money
  39. local players = game.Players
  40. local LocalPlayer = players.LocalPlayer
  41.  
  42. --Properties:
  43.  
  44. wizardHax.Name = "wizardHax"
  45. wizardHax.Parent = game.CoreGui
  46. wizardHax.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
  47.  
  48. main.Name = "main"
  49. main.Parent = wizardHax
  50. main.BackgroundColor3 = Color3.fromRGB(85, 255, 127)
  51. main.BorderColor3 = Color3.fromRGB(170, 170, 255)
  52. main.BorderSizePixel = 3
  53. main.Position = UDim2.new(0.37714687, 0, 0.535626471, 0)
  54. main.Size = UDim2.new(0, 347, 0, 163)
  55. main.Visible = false
  56. main.Draggable = true
  57. main.Active = true
  58.  
  59. title.Name = "title"
  60. title.Parent = main
  61. title.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  62. title.BackgroundTransparency = 1.000
  63. title.BorderSizePixel = 0
  64. title.Position = UDim2.new(0.239193082, 0, 0.0552147254, 0)
  65. title.Size = UDim2.new(0, 180, 0, 45)
  66. title.Font = Enum.Font.Fantasy
  67. title.Text = "wizardHaxs"
  68. title.TextColor3 = Color3.fromRGB(0, 100, 147)
  69. title.TextScaled = true
  70. title.TextSize = 14.000
  71. title.TextWrapped = true
  72.  
  73. healthButton.Name = "healthButton"
  74. healthButton.Parent = main
  75. healthButton.BackgroundColor3 = Color3.fromRGB(255, 219, 11)
  76. healthButton.BorderColor3 = Color3.fromRGB(0, 170, 255)
  77. healthButton.Position = UDim2.new(0.0547550432, 0, 0.589695632, 0)
  78. healthButton.Size = UDim2.new(0, 130, 0, 41)
  79. healthButton.Font = Enum.Font.SourceSans
  80. healthButton.Text = "Health editor"
  81. healthButton.TextColor3 = Color3.fromRGB(0, 0, 0)
  82. healthButton.TextSize = 14.000
  83. healthButton.MouseButton1Down:Connect(function()
  84.     healthGUI.Visible = not healthGUI.Visible
  85. end)
  86.  
  87. funcButton.Name = "funcButton"
  88. funcButton.Parent = main
  89. funcButton.BackgroundColor3 = Color3.fromRGB(255, 219, 11)
  90. funcButton.BorderColor3 = Color3.fromRGB(0, 170, 255)
  91. funcButton.Position = UDim2.new(0.570605218, 0, 0.589695692, 0)
  92. funcButton.Size = UDim2.new(0, 130, 0, 41)
  93. funcButton.Font = Enum.Font.SourceSans
  94. funcButton.Text = "Functions"
  95. funcButton.TextColor3 = Color3.fromRGB(0, 0, 0)
  96. funcButton.TextSize = 14.000
  97. funcButton.MouseButton1Down:Connect(function()
  98.     funcGUI.Visible = not funcGUI.Visible
  99. end)
  100.  
  101. closeButton.Name = "closeButton"
  102. closeButton.Parent = main
  103. closeButton.BackgroundColor3 = Color3.fromRGB(0, 255, 127)
  104. closeButton.BorderColor3 = Color3.fromRGB(0, 255, 127)
  105. closeButton.Position = UDim2.new(0.864185095, 0, 0.023779586, 0)
  106. closeButton.Size = UDim2.new(0, 41, 0, 41)
  107. closeButton.Font = Enum.Font.SourceSans
  108. closeButton.Text = "X"
  109. closeButton.TextColor3 = Color3.fromRGB(0, 0, 0)
  110. closeButton.TextScaled = true
  111. closeButton.TextSize = 14.000
  112. closeButton.TextWrapped = true
  113. closeButton.MouseButton1Down:Connect(function()
  114.     main.Visible = not main.Visible
  115.     openButton.Visible = not openButton.Visible
  116. end)
  117.  
  118. healthGUI.Name = "healthGUI"
  119. healthGUI.Parent = wizardHax
  120. healthGUI.BackgroundColor3 = Color3.fromRGB(255, 255, 127)
  121. healthGUI.Position = UDim2.new(0.144607827, 0, 0.175675675, 0)
  122. healthGUI.Size = UDim2.new(0, 502, 0, 234)
  123. healthGUI.Visible = false
  124. healthGUI.Draggable = true
  125. healthGUI.Active = true
  126.  
  127. healthTitle.Name = "healthTitle"
  128. healthTitle.Parent = healthGUI
  129. healthTitle.BackgroundColor3 = Color3.fromRGB(255, 255, 127)
  130. healthTitle.BackgroundTransparency = 1.000
  131. healthTitle.BorderColor3 = Color3.fromRGB(255, 255, 127)
  132. healthTitle.Position = UDim2.new(-0.000687420368, 0, -0.00215985253, 0)
  133. healthTitle.Size = UDim2.new(0, 203, 0, 40)
  134. healthTitle.Font = Enum.Font.SourceSans
  135. healthTitle.Text = "Health editor"
  136. healthTitle.TextColor3 = Color3.fromRGB(108, 108, 108)
  137. healthTitle.TextScaled = true
  138. healthTitle.TextSize = 14.000
  139. healthTitle.TextWrapped = true
  140.  
  141. targetBox.Name = "targetBox"
  142. targetBox.Parent = healthGUI
  143. targetBox.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  144. targetBox.Position = UDim2.new(0.0586269498, 0, 0.235597119, 0)
  145. targetBox.Size = UDim2.new(0, 303, 0, 33)
  146. targetBox.Font = Enum.Font.SourceSans
  147. targetBox.PlaceholderText = "Targets"
  148. targetBox.Text = ""
  149. targetBox.TextColor3 = Color3.fromRGB(0, 0, 0)
  150. targetBox.TextSize = 14.000
  151. targetBox.ClearTextOnFocus = false
  152.  
  153. negateButton.Name = "negateButton"
  154. negateButton.Parent = healthGUI
  155. negateButton.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  156. negateButton.Position = UDim2.new(0.419776827, 0, 0.745437801, 0)
  157. negateButton.Size = UDim2.new(0, 80, 0, 39)
  158. negateButton.Font = Enum.Font.SourceSans
  159. negateButton.Text = "Negate"
  160. negateButton.TextColor3 = Color3.fromRGB(0, 0, 0)
  161. negateButton.TextScaled = true
  162. negateButton.TextSize = 14.000
  163. negateButton.TextWrapped = true
  164. negateButton.MouseButton1Down:Connect(function()
  165.     if not tonumber(numBox.Text) then
  166.         return
  167.     end
  168.     local targets = getSelector(targetBox.Text)
  169.     for i,player in pairs(targets) do
  170.         print(player.Name)
  171.         local rb = player.Character.HumanoidRootPart
  172.         local pos = rb.CFrame
  173.         local vel = rb.Velocity
  174.         shootWand(pos.x+vel.x/3,pos.y+vel.y/3,pos.z+vel.z/3,tonumber(numBox.Text))
  175.     end
  176. end)
  177.  
  178. numBox.Name = "numBox"
  179. numBox.Parent = healthGUI
  180. numBox.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  181. numBox.Position = UDim2.new(0.706429899, 0, 0.235597134, 0)
  182. numBox.Size = UDim2.new(0, 114, 0, 33)
  183. numBox.Font = Enum.Font.SourceSans
  184. numBox.PlaceholderText = "Number"
  185. numBox.Text = ""
  186. numBox.TextColor3 = Color3.fromRGB(0, 0, 0)
  187. numBox.TextSize = 14.000
  188. numBox.ClearTextOnFocus = false
  189.  
  190. errorTitle.Name = "errorTitle"
  191. errorTitle.Parent = healthGUI
  192. errorTitle.BackgroundColor3 = Color3.fromRGB(255, 255, 127)
  193. errorTitle.BorderColor3 = Color3.fromRGB(77, 116, 116)
  194. errorTitle.Position = UDim2.new(0.219123438, 0, 0.487179488, 0)
  195. errorTitle.Size = UDim2.new(0, 270, 0, 37)
  196. errorTitle.Visible = false
  197. errorTitle.Font = Enum.Font.SourceSans
  198. errorTitle.Text = ""
  199. errorTitle.TextColor3 = Color3.fromRGB(255, 0, 0)
  200. errorTitle.TextSize = 14.000
  201. errorTitle.TextWrapped = true
  202.  
  203. infoTarget.Name = "infoTarget"
  204. infoTarget.Parent = healthGUI
  205. infoTarget.BackgroundColor3 = Color3.fromRGB(255, 255, 127)
  206. infoTarget.Position = UDim2.new(0.0231629014, 0, 0.423076928, 0)
  207. infoTarget.Size = UDim2.new(0, 84, 0, 68)
  208. infoTarget.Font = Enum.Font.SourceSans
  209. infoTarget.Text = "Put a comma after each name to add multiple targets"
  210. infoTarget.TextColor3 = Color3.fromRGB(0, 0, 0)
  211. infoTarget.TextSize = 14.000
  212. infoTarget.TextWrapped = true
  213.  
  214. infoNum.Name = "infoNum"
  215. infoNum.Parent = healthGUI
  216. infoNum.BackgroundColor3 = Color3.fromRGB(255, 255, 127)
  217. infoNum.Position = UDim2.new(0.784119129, 0, 0.427350432, 0)
  218. infoNum.Size = UDim2.new(0, 75, 0, 33)
  219. infoNum.Font = Enum.Font.SourceSans
  220. infoNum.Text = "Put inf to make infinite"
  221. infoNum.TextColor3 = Color3.fromRGB(0, 0, 0)
  222. infoNum.TextSize = 14.000
  223. infoNum.TextWrapped = true
  224.  
  225. addButton.Name = "addButton"
  226. addButton.Parent = healthGUI
  227. addButton.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  228. addButton.Position = UDim2.new(0.188701123, 0, 0.741164267, 0)
  229. addButton.Size = UDim2.new(0, 80, 0, 39)
  230. addButton.Font = Enum.Font.SourceSans
  231. addButton.Text = "Add"
  232. addButton.TextColor3 = Color3.fromRGB(0, 0, 0)
  233. addButton.TextScaled = true
  234. addButton.TextSize = 14.000
  235. addButton.TextWrapped = true
  236. addButton.MouseButton1Down:Connect(function()
  237.     if not tonumber(numBox.Text) then
  238.         return
  239.     end
  240.     local targets = getSelector(targetBox.Text)
  241.     for i,player in pairs(targets) do
  242.         print(player.Name)
  243.         local rb = player.Character.HumanoidRootPart
  244.         local pos = rb.CFrame
  245.         local vel = rb.Velocity
  246.         shootWand(pos.x+vel.x/3,pos.y+vel.y/3,pos.z+vel.z/3,-tonumber(numBox.Text))
  247.     end
  248. end)
  249.  
  250. setButton.Name = "setButton"
  251. setButton.Parent = healthGUI
  252. setButton.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  253. setButton.Position = UDim2.new(0.642884374, 0, 0.741164267, 0)
  254. setButton.Size = UDim2.new(0, 80, 0, 39)
  255. setButton.Font = Enum.Font.SourceSans
  256. setButton.Text = "Set"
  257. setButton.TextColor3 = Color3.fromRGB(0, 0, 0)
  258. setButton.TextScaled = true
  259. setButton.TextSize = 14.000
  260. setButton.TextWrapped = true
  261. setButton.MouseButton1Down:Connect(function()
  262.     if not tonumber(numBox.Text) then
  263.         return
  264.     end
  265.     local targets = getSelector(targetBox.Text)
  266.     for i,player in pairs(targets) do
  267.         print(player.Name)
  268.         local rb = player.Character.HumanoidRootPart
  269.         local pos = rb.CFrame
  270.         local vel = rb.Velocity
  271.         shootWand(pos.x+vel.x/3,pos.y+vel.y/3,pos.z+vel.z/3,-tonumber(numBox.Text)+player.Character.Humanoid.Health)
  272.     end
  273. end)
  274.  
  275. closeButton_2.Name = "closeButton"
  276. closeButton_2.Parent = healthGUI
  277. closeButton_2.BackgroundColor3 = Color3.fromRGB(255, 255, 127)
  278. closeButton_2.BorderColor3 = Color3.fromRGB(255, 255, 127)
  279. closeButton_2.Position = UDim2.new(0.901649058, 0, 0.0299145579, 0)
  280. closeButton_2.Size = UDim2.new(0, 41, 0, 41)
  281. closeButton_2.Font = Enum.Font.SourceSans
  282. closeButton_2.Text = "X"
  283. closeButton_2.TextColor3 = Color3.fromRGB(0, 0, 0)
  284. closeButton_2.TextScaled = true
  285. closeButton_2.TextSize = 14.000
  286. closeButton_2.TextWrapped = true
  287. closeButton_2.MouseButton1Down:Connect(function()
  288.     healthGUI.Visible = not healthGUI.Visible
  289. end)
  290.  
  291. funcGUI.Name = "funcGUI"
  292. funcGUI.Parent = wizardHax
  293. funcGUI.BackgroundColor3 = Color3.fromRGB(255, 180, 28)
  294. funcGUI.Position = UDim2.new(0.0849672928, 0, 0.583538115, 0)
  295. funcGUI.Size = UDim2.new(0, 291, 0, 187)
  296. funcGUI.Visible = false
  297. funcGUI.Draggable = true
  298. funcGUI.Active = true
  299.  
  300. TextLabel.Parent = funcGUI
  301. TextLabel.BackgroundColor3 = Color3.fromRGB(255, 180, 28)
  302. TextLabel.BorderColor3 = Color3.fromRGB(0, 0, 0)
  303. TextLabel.Size = UDim2.new(0, 64, 0, 33)
  304. TextLabel.Font = Enum.Font.SourceSans
  305. TextLabel.Text = "Functions"
  306. TextLabel.TextColor3 = Color3.fromRGB(0, 0, 0)
  307. TextLabel.TextSize = 14.000
  308.  
  309. closeButton_3.Name = "closeButton"
  310. closeButton_3.Parent = funcGUI
  311. closeButton_3.BackgroundColor3 = Color3.fromRGB(255, 180, 28)
  312. closeButton_3.BorderColor3 = Color3.fromRGB(255, 180, 28)
  313. closeButton_3.Position = UDim2.new(0.854735434, 0, 0.0352619998, 0)
  314. closeButton_3.Size = UDim2.new(0, 35, 0, 35)
  315. closeButton_3.Font = Enum.Font.SourceSans
  316. closeButton_3.Text = "X"
  317. closeButton_3.TextColor3 = Color3.fromRGB(0, 0, 0)
  318. closeButton_3.TextScaled = true
  319. closeButton_3.TextSize = 14.000
  320. closeButton_3.TextWrapped = true
  321. closeButton_3.MouseButton1Down:Connect(function()
  322.     funcGUI.Visible = not funcGUI.Visible
  323. end)
  324.  
  325. funcButton1.Name = "funcButton1"
  326. funcButton1.Parent = funcGUI
  327. funcButton1.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  328. funcButton1.Position = UDim2.new(0.0721649453, 0, 0.272727281, 0)
  329. funcButton1.Size = UDim2.new(0, 82, 0, 32)
  330. funcButton1.Font = Enum.Font.SourceSans
  331. funcButton1.Text = "Auto Get Money"
  332. funcButton1.TextColor3 = Color3.fromRGB(0, 0, 0)
  333. funcButton1.TextSize = 14.000
  334. funcButton1.MouseButton1Down:Connect(function()
  335.     autoGetMoney = not autoGetMoney
  336. end)
  337.  
  338. funcButton3.Name = "funcButton3"
  339. funcButton3.Parent = funcGUI
  340. funcButton3.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  341. funcButton3.Position = UDim2.new(0.646048129, 0, 0.272727281, 0)
  342. funcButton3.Size = UDim2.new(0, 82, 0, 32)
  343. funcButton3.Font = Enum.Font.SourceSans
  344. funcButton3.Text = "func 3"
  345. funcButton3.TextColor3 = Color3.fromRGB(0, 0, 0)
  346. funcButton3.TextSize = 14.000
  347.  
  348. funcButton6.Name = "funcButton6"
  349. funcButton6.Parent = funcGUI
  350. funcButton6.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  351. funcButton6.Position = UDim2.new(0.646048129, 0, 0.524064183, 0)
  352. funcButton6.Size = UDim2.new(0, 82, 0, 32)
  353. funcButton6.Font = Enum.Font.SourceSans
  354. funcButton6.Text = "func 6"
  355. funcButton6.TextColor3 = Color3.fromRGB(0, 0, 0)
  356. funcButton6.TextSize = 14.000
  357.  
  358. funcButton4.Name = "funcButton4"
  359. funcButton4.Parent = funcGUI
  360. funcButton4.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  361. funcButton4.Position = UDim2.new(0.0721649453, 0, 0.524064183, 0)
  362. funcButton4.Size = UDim2.new(0, 82, 0, 32)
  363. funcButton4.Font = Enum.Font.SourceSans
  364. funcButton4.Text = "func 4"
  365. funcButton4.TextColor3 = Color3.fromRGB(0, 0, 0)
  366. funcButton4.TextSize = 14.000
  367.  
  368. funcButton9.Name = "funcButton9"
  369. funcButton9.Parent = funcGUI
  370. funcButton9.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  371. funcButton9.Position = UDim2.new(0.646048129, 0, 0.770053446, 0)
  372. funcButton9.Size = UDim2.new(0, 82, 0, 32)
  373. funcButton9.Font = Enum.Font.SourceSans
  374. funcButton9.Text = "func 9"
  375. funcButton9.TextColor3 = Color3.fromRGB(0, 0, 0)
  376. funcButton9.TextSize = 14.000
  377.  
  378. funcButton7.Name = "funcButton7"
  379. funcButton7.Parent = funcGUI
  380. funcButton7.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  381. funcButton7.Position = UDim2.new(0.0721649453, 0, 0.770053446, 0)
  382. funcButton7.Size = UDim2.new(0, 82, 0, 32)
  383. funcButton7.Font = Enum.Font.SourceSans
  384. funcButton7.Text = "func 7"
  385. funcButton7.TextColor3 = Color3.fromRGB(0, 0, 0)
  386. funcButton7.TextSize = 14.000
  387.  
  388. funcButton2.Name = "funcButton2"
  389. funcButton2.Parent = funcGUI
  390. funcButton2.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  391. funcButton2.Position = UDim2.new(0.367697597, 0, 0.272727281, 0)
  392. funcButton2.Size = UDim2.new(0, 76, 0, 32)
  393. funcButton2.Font = Enum.Font.SourceSans
  394. funcButton2.Text = "Auto Buy Stuff"
  395. funcButton2.TextColor3 = Color3.fromRGB(0, 0, 0)
  396. funcButton2.TextSize = 14.000
  397. funcButton2.MouseButton1Down:Connect(function()
  398.     autoBuyStuff = not autoBuyStuff
  399. end)
  400.  
  401. funcButton5.Name = "funcButton5"
  402. funcButton5.Parent = funcGUI
  403. funcButton5.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  404. funcButton5.Position = UDim2.new(0.367697597, 0, 0.524064183, 0)
  405. funcButton5.Size = UDim2.new(0, 76, 0, 32)
  406. funcButton5.Font = Enum.Font.SourceSans
  407. funcButton5.Text = "func 5"
  408. funcButton5.TextColor3 = Color3.fromRGB(0, 0, 0)
  409. funcButton5.TextSize = 14.000
  410.  
  411. funcButton8.Name = "funcButton8"
  412. funcButton8.Parent = funcGUI
  413. funcButton8.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  414. funcButton8.Position = UDim2.new(0.367697597, 0, 0.770053506, 0)
  415. funcButton8.Size = UDim2.new(0, 76, 0, 32)
  416. funcButton8.Font = Enum.Font.SourceSans
  417. funcButton8.Text = "func 8"
  418. funcButton8.TextColor3 = Color3.fromRGB(0, 0, 0)
  419. funcButton8.TextSize = 14.000
  420.  
  421. openButton.Name = "openButton"
  422. openButton.Parent = wizardHax
  423. openButton.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  424. openButton.Position = UDim2.new(0.883169949, 0, 0.534398019, 0)
  425. openButton.Size = UDim2.new(0, 125, 0, 63)
  426. openButton.Draggable = true
  427. openButton.Active = true
  428.  
  429. openButton_2.Name = "openButton"
  430. openButton_2.Parent = openButton
  431. openButton_2.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  432. openButton_2.BorderColor3 = Color3.fromRGB(0, 0, 0)
  433. openButton_2.Position = UDim2.new(0.0795714334, 0, 0.158888876, 0)
  434. openButton_2.Size = UDim2.new(0, 105, 0, 41)
  435. openButton_2.Font = Enum.Font.SourceSans
  436. openButton_2.Text = "Open"
  437. openButton_2.TextColor3 = Color3.fromRGB(0, 0, 0)
  438. openButton_2.TextScaled = true
  439. openButton_2.TextSize = 14.000
  440. openButton_2.TextWrapped = true
  441. openButton_2.MouseButton1Down:Connect(function()
  442.     main.Visible = not main.Visible
  443.     openButton.Visible = not openButton.Visible
  444. end)
  445.  
  446. -- functions
  447.  
  448. spawn(function()
  449.     local players = game.Players
  450.     local localplayer = players.LocalPlayer
  451.     local team = localplayer.Team.Name
  452.     local kit = game.Workspace:FindFirstChild("berezaa's Tycoon Kit")
  453.     if not kit then
  454.         return
  455.     end
  456.     local RedTeam
  457.     local RedSecond
  458.     local owner
  459.     local Essentials
  460.     local buttons
  461.     local player
  462.     local giver
  463.     while not RedTeam do
  464.         if team ~= "For Hire" then
  465.             if team == "Blue" then
  466.                 RedTeam = kit:FindFirstChild("Pastel "..team)
  467.             elseif team == "Yellow" then
  468.                 RedTeam = kit:FindFirstChild("Cool "..team:lower())
  469.             else
  470.                 RedTeam = kit:FindFirstChild("Medium "..team:lower())
  471.             end
  472.         end
  473.         wait(1)
  474.         team = localplayer.Team.Name
  475.     end
  476.     if RedTeam[team.."First"].Gate.Head.Decal.Texture == 'http://www.roblox.com/Thumbs/Avatar.ashx?username='..localplayer.Name then
  477.         RedSecond = RedTeam[team.."First"]
  478.         owner = true
  479.     else
  480.         RedSecond = RedTeam[team.."Second"]
  481.     end
  482.     Essentials = RedTeam.Essentials
  483.     buttons = RedSecond.Buttons:GetChildren()
  484.     player = game.Players.LocalPlayer
  485.     if owner then
  486.         giver = Essentials.Giver
  487.     else
  488.         giver = Essentials.Giver2
  489.     end
  490.     -- auto buy stuff (it sucks it just tps everything to you and if you have enough money to buy it you buy it)
  491.     spawn(function()
  492.         while wait(1) do
  493.             if autoBuyStuff then
  494.                 local character = player.Character
  495.                 for i,button in pairs(buttons) do
  496.                     local head = button:FindFirstChild("Head")
  497.                     if head and character and character:FindFirstChild("HumanoidRootPart") then
  498.                         local orginalTransparency = head.Transparency
  499.                         if orginalTransparency ~= 1 then
  500.                             local originalpos = head.CFrame
  501.                             head.CanCollide = false
  502.                             head.Transparency = 1
  503.                             head.CFrame = character.HumanoidRootPart.CFrame
  504.                             wait(0.01)
  505.                             head.CFrame = originalpos
  506.                             head.Transparency = orginalTransparency
  507.                         end
  508.                     end
  509.                 end
  510.             end
  511.         end
  512.     end)
  513.     -- tp the collect money pad to you
  514.     spawn(function()
  515.         while wait(1) do
  516.             if autoGetMoney then
  517.                 local character = player.Character
  518.                 if character and character:FindFirstChild("HumanoidRootPart") then
  519.                     local originalpos = giver.CFrame
  520.                     giver.CanCollide = false
  521.                     giver.Transparency = 1
  522.                     giver.CFrame = character.HumanoidRootPart.CFrame
  523.                     wait(0.025)
  524.                     giver.CFrame = originalpos
  525.                     giver.Transparency = 0
  526.                     giver.CanCollide = true
  527.                 end
  528.             end
  529.         end
  530.     end)
  531. end)
  532. function shootWand(x,y,z,damage)
  533.     local character = LocalPlayer.Character
  534.     if character then
  535.         local wand = character:FindFirstChild("Wand")
  536.         if not wand then
  537.         wand = LocalPlayer.Backpack:FindFirstChild("Wand")
  538.             if wand then
  539.                 LocalPlayer.Character.Humanoid:EquipTool(wand)
  540.                 wait(0.05)
  541.                 wand = character:FindFirstChild("Wand")
  542.         spawn(function()
  543.             wait(0.1)
  544.             LocalPlayer.Character.Humanoid:UnequipTools(wand)
  545.         end)
  546.         else
  547.                 return
  548.         end
  549.         end
  550.     if not wand then
  551.         return
  552.         end
  553.         local tbl_main =
  554.         {
  555.               CFrame.new(x, y, z),
  556.               0,
  557.               0.1,
  558.               wand,
  559.               damage,
  560.               character
  561.         }
  562.         wand.Fire:FireServer(unpack(tbl_main))
  563.         wait(0.01)
  564.     end
  565. end
  566. function shootPlayer(_player,damage)
  567.     local character = LocalPlayer.Character
  568.     if character then
  569.         local wand = character:FindFirstChild("Wand")
  570.     local pos = _player.Character.HumanoidRootPart.CFrame
  571.     local vel = _player.Character.HumanoidRootPart.Velocity
  572.         if not wand then
  573.         wand = LocalPlayer.Backpack:FindFirstChild("Wand")
  574.             if wand then
  575.                 LocalPlayer.Character.Humanoid:EquipTool(wand)
  576.                 wait(0.05)
  577.                 wand = character:FindFirstChild("Wand")
  578.         spawn(function()
  579.             wait(0.1)
  580.             LocalPlayer.Character.Humanoid:UnequipTools(wand)
  581.         end)
  582.         else
  583.                 return
  584.         end
  585.         if not wand then
  586.             return
  587.             end
  588.         end
  589.         local tbl_main =
  590.         {
  591.               CFrame.new(pos.x+vel.x/5,pos.y+vel.y/5,pos.z+vel.z/5),
  592.               0,
  593.               0.1,
  594.               wand,
  595.               damage,
  596.               character
  597.         }
  598.         wand.Fire:FireServer(unpack(tbl_main))
  599.         wait(0.01)
  600.     end
  601. end
  602. function getSelector(text)
  603.     local selectors = {}
  604.     for i,selector in pairs(string.split(text,",")) do
  605.     if selector == "all" then
  606.        for i,player in pairs(players:GetChildren()) do
  607.                 if player.Character and player.Character:FindFirstChild("HumanoidRootPart") then
  608.                     selectors[table.getn(selectors)+1] = player
  609.                 end
  610.             end
  611.     else
  612.             for i,player in pairs(players:GetChildren()) do
  613.                 if startsWith(player.Name,selector) and player.Name ~= LocalPlayer.Name and player.Character and player.Character:FindFirstChild("HumanoidRootPart") then
  614.                     selectors[table.getn(selectors)+1] = player
  615.                 end
  616.             end
  617.     end
  618.     end
  619.     return selectors
  620. end
  621. function startsWith(text1,text2)
  622.     if string.lower(string.sub(text1,1,#text2)) == string.lower(text2) then
  623.         return true
  624.     end
  625. end
Add Comment
Please, Sign In to add comment