Advertisement
Guest User

Volleyball 4.2 by Sneaky

a guest
Jun 21st, 2022
4,790
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 15.02 KB | None | 0 0
  1. --[[
  2. Thank you for using Volleyball 4.2 by Sneaky! :D
  3. A couple of things to be aware of while using this GUI:
  4. - Execute the script in Spike Mode
  5. - Some elements of the GUI will only work while on a team, such as serving, spiking, and setting
  6. - Make sure to change the keybind settings below
  7. - This script is made for the Synapse X injector but may work for others
  8. - For detailed information on what each mode does, refer to the bottom of this script
  9. - Have fun :)
  10. --]]
  11.  
  12. -- Settings you can change:
  13. local setForward = "f" -- Your set forward keybind (DEFAULT: F)
  14. local setBackwards = "r" -- Your set backwards keybind (DEFAULT: R)
  15. local spikeMode = "random" -- "random" will aim randomly, "point" will aim where your mouse is
  16. local changeMode = "One" -- Your keybind that switches between block mode and spike mode (DEFAULT: One)
  17. local maxPower = "c" -- Your keybind that sets your max power (DEFAULT: C)
  18. local jump = "Space" -- Your keybind to jump (DEFAULT: Space)
  19. local sprintKey = "t" -- Your keybind to sprint (DEFAULT: T)
  20.  
  21. local dev = false
  22. local Volleyball42 = Instance.new("ScreenGui")
  23. local Main = Instance.new("Frame")
  24. local UICorner = Instance.new("UICorner")
  25. local TextLabel = Instance.new("TextLabel")
  26. local Setting = Instance.new("TextButton")
  27. local Serving = Instance.new("TextButton")
  28. local Receives = Instance.new("TextButton")
  29. local Power = Instance.new("TextButton")
  30. local Block = Instance.new("TextButton")
  31. local Destroy = Instance.new("TextButton")
  32.  
  33. Volleyball42.Name = "Volleyball42"
  34. Volleyball42.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
  35. Volleyball42.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
  36.  
  37. Main.Name = "Main"
  38. Main.Parent = Volleyball42
  39. Main.BackgroundColor3 = Color3.fromRGB(104, 104, 104)
  40. Main.Position = UDim2.new(0.428033143, 0, 0.309200615, 0)
  41. Main.Size = UDim2.new(0, 283, 0, 159)
  42. Main.Active = true
  43. Main.Draggable = true
  44.  
  45. UICorner.Parent = Main
  46.  
  47. TextLabel.Parent = Main
  48. TextLabel.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  49. TextLabel.BackgroundTransparency = 1.000
  50. TextLabel.Size = UDim2.new(0, 283, 0, 26)
  51. TextLabel.Font = Enum.Font.Oswald
  52. TextLabel.Text = "Volleyball 4.2 by Sneaky"
  53. TextLabel.TextColor3 = Color3.fromRGB(0, 0, 0)
  54. TextLabel.TextScaled = true
  55. TextLabel.TextSize = 14.000
  56. TextLabel.TextWrapped = true
  57.  
  58. Setting.Name = "Setting"
  59. Setting.Parent = Main
  60. Setting.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
  61. Setting.BackgroundTransparency = 0.400
  62. Setting.Position = UDim2.new(0.0494699515, 0, 0.207547188, 0)
  63. Setting.Size = UDim2.new(0, 121, 0, 34)
  64. Setting.Font = Enum.Font.SourceSans
  65. Setting.Text = "Setting"
  66. Setting.TextColor3 = Color3.fromRGB(255, 255, 255)
  67. Setting.TextScaled = true
  68. Setting.TextSize = 14.000
  69. Setting.TextWrapped = true
  70.  
  71. Serving.Name = "Serving"
  72. Serving.Parent = Main
  73. Serving.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
  74. Serving.BackgroundTransparency = 0.400
  75. Serving.Position = UDim2.new(0.0494699515, 0, 0.465408802, 0)
  76. Serving.Size = UDim2.new(0, 121, 0, 34)
  77. Serving.Font = Enum.Font.SourceSans
  78. Serving.Text = "Serving"
  79. Serving.TextColor3 = Color3.fromRGB(255, 255, 255)
  80. Serving.TextScaled = true
  81. Serving.TextSize = 14.000
  82. Serving.TextWrapped = true
  83.  
  84. Receives.Name = "Spiking"
  85. Receives.Parent = Main
  86. Receives.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
  87. Receives.BackgroundTransparency = 0.400
  88. Receives.Position = UDim2.new(0.0494699515, 0, 0.729559779, 0)
  89. Receives.Size = UDim2.new(0, 121, 0, 34)
  90. Receives.Font = Enum.Font.SourceSans
  91. Receives.Text = "Spiking"
  92. Receives.TextColor3 = Color3.fromRGB(255, 255, 255)
  93. Receives.TextScaled = true
  94. Receives.TextSize = 14.000
  95. Receives.TextWrapped = true
  96.  
  97. Power.Name = "Power"
  98. Power.Parent = Main
  99. Power.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
  100. Power.BackgroundTransparency = 0.400
  101. Power.Position = UDim2.new(0.526501775, 0, 0.207547188, 0)
  102. Power.Size = UDim2.new(0, 121, 0, 34)
  103. Power.Font = Enum.Font.SourceSans
  104. Power.Text = "Power"
  105. Power.TextColor3 = Color3.fromRGB(255, 255, 255)
  106. Power.TextScaled = true
  107. Power.TextSize = 14.000
  108. Power.TextWrapped = true
  109.  
  110. Block.Name = "Sprint"
  111. Block.Parent = Main
  112. Block.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
  113. Block.BackgroundTransparency = 0.400
  114. Block.Position = UDim2.new(0.526501775, 0, 0.465408802, 0)
  115. Block.Size = UDim2.new(0, 121, 0, 34)
  116. Block.Font = Enum.Font.SourceSans
  117. Block.Text = "Sprint"
  118. Block.TextColor3 = Color3.fromRGB(255, 255, 255)
  119. Block.TextScaled = true
  120. Block.TextSize = 14.000
  121. Block.TextWrapped = true
  122.  
  123. Destroy.Name = "Destroy"
  124. Destroy.Parent = Main
  125. Destroy.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
  126. Destroy.BackgroundTransparency = 0.400
  127. Destroy.Position = UDim2.new(0.526501775, 0, 0.729559779, 0)
  128. Destroy.Size = UDim2.new(0, 121, 0, 34)
  129. Destroy.Font = Enum.Font.SourceSans
  130. Destroy.Text = "Destroy"
  131. Destroy.TextColor3 = Color3.fromRGB(170, 0, 0)
  132. Destroy.TextScaled = true
  133. Destroy.TextSize = 14.000
  134. Destroy.TextWrapped = true
  135.  
  136. local UserInputService = game:GetService("UserInputService")
  137. local player = game.Players.LocalPlayer
  138. local setting
  139. local serving
  140. local spiking
  141. local power
  142. local block
  143. local sprint
  144.  
  145. for i, v in pairs(workspace:GetChildren()) do
  146. if v:IsA("Part") and not v:IsA("Camera") and v.Transparency == 1 and not v.Name == "Net" then
  147. v:Destroy()
  148. end
  149. end
  150.  
  151. if dev then print(1) end
  152.  
  153. local ui = player:WaitForChild("PlayerGui"):WaitForChild("Volleyball42")
  154.  
  155. local function lookAt(chr,target)
  156. if chr.PrimaryPart then
  157. local frame = CFrame.new(chr.PrimaryPart.Position, target.Position)
  158. chr:SetPrimaryPartCFrame(frame)
  159. end
  160. end
  161.  
  162. local function lookAway(chr,target)
  163. if chr.PrimaryPart then
  164. local frame = CFrame.new(chr.PrimaryPart.Position, target.Position)
  165. chr:SetPrimaryPartCFrame(frame)
  166. chr.HumanoidRootPart.CFrame *= CFrame.Angles(0, math.rad(180), 0)
  167. end
  168. end
  169.  
  170. local mouse = game.Players.LocalPlayer:GetMouse()
  171.  
  172. game.Players.LocalPlayer.CharacterAdded:connect(
  173. function(char)
  174. mouse.TargetFilter = char
  175. end
  176. )
  177.  
  178. for i, v in pairs(ui.Main:GetChildren()) do
  179. if v:IsA("TextButton") then
  180. v.Activated:Connect(function()
  181.  
  182. -- Destroy
  183. if v.Name == "Destroy" then
  184. if debug then print("Destroy") end
  185. ui:Destroy()
  186. end
  187.  
  188. -- Setting
  189. if v.Name == "Setting" then
  190. if debug then print("Setting") end
  191. if setting then
  192.  
  193. for i, v in pairs(workspace:GetChildren()) do
  194. if v.Name == "Left" or v.Name == "Right" then
  195. v:Destroy()
  196. end
  197. end
  198. ui:WaitForChild("Main").Setting.TextColor = BrickColor.new("White")
  199. setting = false
  200. return
  201. end
  202. ui:WaitForChild("Main").Setting.TextColor = BrickColor.new("Bright green")
  203. left = Instance.new("Part")
  204. right = Instance.new("Part")
  205. left.Name = "Left"
  206. right.Name = "Right"
  207. left.Position = Vector3.new(-23.789, 8, 0.007)
  208. right.Position = Vector3.new(23.783, 8, -0.006)
  209. left.Size = Vector3.new(1.607, 1, 2)
  210. right.Size = Vector3.new(1.607, 1, 2)
  211. left.CanCollide = false
  212. right.CanCollide = false
  213. left.Anchored = true
  214. right.Anchored = true
  215. left.Parent = workspace
  216. right.Parent = workspace
  217.  
  218. setting = true
  219. end
  220.  
  221. -- Serving
  222. if v.Name == "Serving" then
  223. if debug then print("Serving") end
  224. if serving then
  225.  
  226. for i, v in pairs(workspace:GetChildren()) do
  227. if v.Name == "RedRight" or v.Name == "RedLeft" then
  228. v:Destroy()
  229. end
  230. end
  231.  
  232. ui:WaitForChild("Main").Serving.TextColor = BrickColor.new("White")
  233. serving = false
  234. else
  235. redRCorner = Instance.new("Part")
  236. redLCorner = Instance.new("Part")
  237. bluRCorner = Instance.new("Part")
  238. bluLCorner = Instance.new("Part")
  239. redRCorner.Name = "RedRight"
  240. redLCorner.Name = "RedLeft"
  241. bluRCorner.Name = "RedRight"
  242. bluLCorner.Name = "RedLeft"
  243. redRCorner.Position = Vector3.new(23.479, 0.638, -47.059)
  244. redLCorner.Position = Vector3.new(-23.577, 0.633, -47.059)
  245. bluRCorner.Position = Vector3.new(-23.577, 0.633, 46.936)
  246. bluLCorner.Position = Vector3.new(23.483, 0.628, 46.936)
  247. redRCorner.Size = Vector3.new(1.048, 0.076, 1.07)
  248. redLCorner.Size = Vector3.new(1.048, 0.076, 1.07)
  249. bluRCorner.Size = Vector3.new(1.048, 0.076, 1.07)
  250. bluLCorner.Size = Vector3.new(1.048, 0.076, 1.07)
  251. redRCorner.Anchored = true
  252. redLCorner.Anchored = true
  253. bluRCorner.Anchored = true
  254. bluLCorner.Anchored = true
  255. redRCorner.CanCollide = false
  256. redLCorner.CanCollide = false
  257. bluRCorner.CanCollide = false
  258. bluRCorner.CanCollide = false
  259. redRCorner.Parent = workspace
  260. redLCorner.Parent = workspace
  261. bluRCorner.Parent = workspace
  262. bluLCorner.Parent = workspace
  263.  
  264. ui:WaitForChild("Main").Serving.TextColor = BrickColor.new("Bright green")
  265. serving = true
  266. end
  267. end
  268.  
  269. -- Spiking
  270. if v.Name == "Spiking" then
  271. if debug then print("Spiking") end
  272. if spiking then
  273.  
  274. for i, v in pairs(workspace:GetChildren()) do
  275. if v.Name == "RedSpike" or v.Name == "bluSpike" then
  276. v:Destroy()
  277. end
  278. end
  279.  
  280.  
  281. ui:WaitForChild("Main").Spiking.TextColor = BrickColor.new("White")
  282. spiking = false
  283. else
  284. redSpike = Instance.new("Part")
  285. redSpike.Name = "RedSpike"
  286. redSpike.Anchored = true
  287. redSpike.CanCollide = false
  288. redSpike.Position = Vector3.new(-0.009, 0.501, -23.927)
  289. redSpike.Size = Vector3.new(47.936, 0.001, 46.988)
  290. redSpike.Transparency = 1
  291. redSpike.Parent = workspace
  292. bluSpike = Instance.new("Part")
  293. bluSpike.Name = "RedSpike"
  294. bluSpike.Anchored = true
  295. bluSpike.CanCollide = false
  296. bluSpike.Position = Vector3.new(-0.009, 0.501, 23.984)
  297. bluSpike.Size = Vector3.new(47.936, 0.001, 46.988)
  298. bluSpike.Transparency = 1
  299. bluSpike.Parent = workspace
  300.  
  301.  
  302. ui:WaitForChild("Main").Spiking.TextColor = BrickColor.new("Bright green")
  303. spiking = true
  304. end
  305. end
  306.  
  307. -- Power
  308. if v.Name == "Power" then
  309. if power then
  310. ui:WaitForChild("Main").Power.TextColor = BrickColor.new("White")
  311. power = false
  312. else
  313. ui:WaitForChild("Main").Power.TextColor = BrickColor.new("Bright green")
  314. power = true
  315. end
  316. end
  317.  
  318. -- Sprint
  319. if v.Name == "Sprint" then
  320. if dev then print("Sprint") end
  321. if sprint then
  322. ui:WaitForChild("Main").Sprint.TextColor = BrickColor.new("White")
  323. sprint = false
  324. else
  325. ui:WaitForChild("Main").Sprint.TextColor = BrickColor.new("Bright green")
  326. sprint = true
  327. end
  328. end
  329.  
  330. end)
  331. end
  332. end
  333.  
  334.  
  335. -- inputs
  336. if dev then print("setting uis to be done") end
  337. UserInputService.InputBegan:Connect(function(input, event)
  338.  
  339. if input.KeyCode == Enum.KeyCode[jump] and power then
  340. local N=game:GetService("VirtualInputManager")
  341. N:SendKeyEvent(true,string.upper(maxPower),false,game)
  342. end
  343.  
  344.  
  345. if input.KeyCode == Enum.KeyCode[string.upper(setForward)] and setting then
  346. if player.TeamColor == BrickColor.new("Really blue") then
  347. lookAt(player.Character, left)
  348. else
  349. lookAt(player.Character, right)
  350. end
  351. end
  352.  
  353. if input.KeyCode == Enum.KeyCode[string.upper(setBackwards)] and setting then
  354. if player.TeamColor == BrickColor.new("Really red") then
  355. lookAway(player.Character, left)
  356. else
  357. lookAway(player.Character, right)
  358. end
  359. end
  360.  
  361. if input.KeyCode == Enum.KeyCode[jump] and serving then
  362. if debug then print("Jump") end
  363. if player.Character.UpperTorso.Position.Z > 40 and player.TeamColor == BrickColor.new("Really blue") then
  364.  
  365. local r = math.random(1, 2)
  366. if r == 1 then
  367. lookAt(player.Character, redRCorner)
  368. else
  369. lookAt(player.Character, redLCorner)
  370. end
  371.  
  372. elseif player.Character.UpperTorso.Position.Z < -40 and player.TeamColor == BrickColor.new("Really red") then
  373.  
  374. local r = math.random(1, 2)
  375. if r == 1 then
  376. lookAt(player.Character, bluRCorner)
  377. else
  378. lookAt(player.Character, bluLCorner)
  379. end
  380.  
  381.  
  382. else
  383. if debug then print("False") end
  384. end
  385. end
  386.  
  387. if input.KeyCode == Enum.KeyCode[jump] and spiking then
  388. if debug then print("Jump") end
  389.  
  390. if block == true then return end
  391.  
  392. if spikeMode == "random" or nil then
  393. local aimPart = Instance.new("Part")
  394. aimPart.Size = Vector3.new(0.318, 0.001, 0.472)
  395.  
  396.  
  397. if player.TeamColor == BrickColor.new("Really blue") and player.Character.UpperTorso.Position.Z < 40 then
  398.  
  399. local rP = Instance.new("Part")
  400. rP.Anchored = true
  401. rP.Transparency = 1
  402. local range = 20
  403. rP.Position = redSpike.Position + Vector3.new(math.random(-range,range),10,math.random(-range,range))
  404. rP.Parent = workspace
  405.  
  406. lookAt(player.Character, rP)
  407. rP:Destroy()
  408.  
  409. if debug then print("Random part made") end
  410. elseif player.TeamColor == BrickColor.new("Really red") and player.Character.UpperTorso.Position.Z > -40 then
  411.  
  412. local rP = Instance.new("Part")
  413. rP.Anchored = true
  414. rP.Transparency = 1
  415. local range = 20
  416. rP.Position = bluSpike.Position + Vector3.new(math.random(-range,range),10,math.random(-range,range))
  417. rP.Parent = workspace
  418.  
  419. lookAt(player.Character, rP)
  420. rP:Destroy()
  421. if debug then print("Random part made") end
  422. end
  423. end
  424.  
  425. if spikeMode == "point" then
  426.  
  427. if player.TeamColor == BrickColor.new("Really blue") and player.Character.UpperTorso.Position.Z < 40 then
  428. local p = Instance.new("Part")
  429. p.Anchored = true
  430. p.CanCollide = false
  431. p.CFrame = CFrame.new(mouse.Hit.X, 10, mouse.Hit.Z)
  432. p.Transparency = 1
  433. p.Parent = workspace
  434. lookAt(player.Character, p)
  435. elseif player.TeamColor == BrickColor.new("Really red") and player.Character.UpperTorso.Position.Z > -40 then
  436. local p = Instance.new("Part")
  437. p.Anchored = true
  438. p.CanCollide = false
  439. p.CFrame = CFrame.new(mouse.Hit.X, 10, mouse.Hit.Z)
  440. p.Transparency = 1
  441. p.Parent = workspace
  442. lookAt(player.Character, p)
  443. end
  444. end
  445. end
  446.  
  447. if input.KeyCode == Enum.KeyCode[changeMode] then
  448. if block then block = false else block = true end
  449. end
  450.  
  451. if input.KeyCode == Enum.KeyCode.W or input.KeyCode == Enum.KeyCode.A or input.KeyCode == Enum.KeyCode.S or input.KeyCode == Enum.KeyCode.D then
  452. if sprint then
  453. local N=game:GetService("VirtualInputManager")
  454. N:SendKeyEvent(true,string.upper(sprintKey),false,game)
  455. task.wait(0.1)
  456. N:SendKeyEvent(true,string.upper(sprintKey),false,game)
  457. task.wait(0.1)
  458. N:SendKeyEvent(true,string.upper(sprintKey),false,game)
  459. end
  460. end
  461.  
  462. end)
  463.  
  464. --[[
  465. Setting - The setting mode auto aims towards the antennas on both sides when you set the ball using your forward and backwards set key.
  466. Serving - The serving mode aims randomly at the two far corners of your opponents court, allowing you to alwasy hit the corners with precise accuracy.
  467. Spiking - The spiking mode has two modes, the random mode aims randomly anywhere on the opponents court while the point mode aims where your mouse is pointed.
  468. Power - The power mode automatically sets your power to the maximum amount when you jump.
  469. Sprint - The sprint mode automatically hits your sprint key when you move.
  470. I am pretty new at making scripts so if you have any suggestions please reach out to me, thank you for using! sneaky#0168
  471. ]]--
  472.  
  473.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement