Advertisement
Guest User

Volleyball 4.2 by Sneaky

a guest
Jun 21st, 2022
3,851
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 15.20 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 dev then print("Destroy") end
  185. ui:Destroy()
  186. end
  187.  
  188. -- Setting
  189. if v.Name == "Setting" then
  190. if dev 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.Transparency = 1
  208. right.Transparency = 1
  209. left.Position = Vector3.new(-23.789, 8, 0.007)
  210. right.Position = Vector3.new(23.783, 8, -0.006)
  211. left.Size = Vector3.new(1.607, 1, 2)
  212. right.Size = Vector3.new(1.607, 1, 2)
  213. left.CanCollide = false
  214. right.CanCollide = false
  215. left.Anchored = true
  216. right.Anchored = true
  217. left.Parent = workspace
  218. right.Parent = workspace
  219.  
  220. setting = true
  221. end
  222.  
  223. -- Serving
  224. if v.Name == "Serving" then
  225. if debug then print("Serving") end
  226. if serving then
  227.  
  228. for i, v in pairs(workspace:GetChildren()) do
  229. if v.Name == "RedRight" or v.Name == "RedLeft" then
  230. v:Destroy()
  231. end
  232. end
  233.  
  234. ui:WaitForChild("Main").Serving.TextColor = BrickColor.new("White")
  235. serving = false
  236. else
  237. redRCorner = Instance.new("Part")
  238. redLCorner = Instance.new("Part")
  239. bluRCorner = Instance.new("Part")
  240. bluLCorner = Instance.new("Part")
  241. redRCorner.Name = "RedRight"
  242. redLCorner.Name = "RedLeft"
  243. bluRCorner.Name = "RedRight"
  244. bluLCorner.Name = "RedLeft"
  245. redRCorner.Position = Vector3.new(23.479, 0.638, -47.059)
  246. redLCorner.Position = Vector3.new(-23.577, 0.633, -47.059)
  247. bluRCorner.Position = Vector3.new(-23.577, 0.633, 46.936)
  248. bluLCorner.Position = Vector3.new(23.483, 0.628, 46.936)
  249. redRCorner.Size = Vector3.new(1.048, 0.076, 1.07)
  250. redLCorner.Size = Vector3.new(1.048, 0.076, 1.07)
  251. bluRCorner.Size = Vector3.new(1.048, 0.076, 1.07)
  252. bluLCorner.Size = Vector3.new(1.048, 0.076, 1.07)
  253. redRCorner.Anchored = true
  254. redLCorner.Anchored = true
  255. bluRCorner.Anchored = true
  256. bluLCorner.Anchored = true
  257. redRCorner.CanCollide = false
  258. redLCorner.CanCollide = false
  259. bluRCorner.CanCollide = false
  260. bluRCorner.CanCollide = false
  261. redRCorner.Transparency = 1
  262. redLCorner.Transparency = 1
  263. bluRCorner.Transparency = 1
  264. bluRCorner.Transparency = 1
  265. redRCorner.Parent = workspace
  266. redLCorner.Parent = workspace
  267. bluRCorner.Parent = workspace
  268. bluLCorner.Parent = workspace
  269.  
  270. ui:WaitForChild("Main").Serving.TextColor = BrickColor.new("Bright green")
  271. serving = true
  272. end
  273. end
  274.  
  275. -- Spiking
  276. if v.Name == "Spiking" then
  277. if debug then print("Spiking") end
  278. if spiking then
  279.  
  280. for i, v in pairs(workspace:GetChildren()) do
  281. if v.Name == "RedSpike" or v.Name == "bluSpike" then
  282. v:Destroy()
  283. end
  284. end
  285.  
  286.  
  287. ui:WaitForChild("Main").Spiking.TextColor = BrickColor.new("White")
  288. spiking = false
  289. else
  290. redSpike = Instance.new("Part")
  291. redSpike.Name = "RedSpike"
  292. redSpike.Anchored = true
  293. redSpike.CanCollide = false
  294. redSpike.Position = Vector3.new(-0.009, 0.501, -23.927)
  295. redSpike.Size = Vector3.new(47.936, 0.001, 46.988)
  296. redSpike.Transparency = 1
  297. redSpike.Parent = workspace
  298. bluSpike = Instance.new("Part")
  299. bluSpike.Name = "RedSpike"
  300. bluSpike.Anchored = true
  301. bluSpike.CanCollide = false
  302. bluSpike.Position = Vector3.new(-0.009, 0.501, 23.984)
  303. bluSpike.Size = Vector3.new(47.936, 0.001, 46.988)
  304. bluSpike.Transparency = 1
  305. bluSpike.Parent = workspace
  306.  
  307.  
  308. ui:WaitForChild("Main").Spiking.TextColor = BrickColor.new("Bright green")
  309. spiking = true
  310. end
  311. end
  312.  
  313. -- Power
  314. if v.Name == "Power" then
  315. if power then
  316. ui:WaitForChild("Main").Power.TextColor = BrickColor.new("White")
  317. power = false
  318. else
  319. ui:WaitForChild("Main").Power.TextColor = BrickColor.new("Bright green")
  320. power = true
  321. end
  322. end
  323.  
  324. -- Sprint
  325. if v.Name == "Sprint" then
  326. if dev then print("Sprint") end
  327. if sprint then
  328. ui:WaitForChild("Main").Sprint.TextColor = BrickColor.new("White")
  329. sprint = false
  330. else
  331. ui:WaitForChild("Main").Sprint.TextColor = BrickColor.new("Bright green")
  332. sprint = true
  333. end
  334. end
  335.  
  336. end)
  337. end
  338. end
  339.  
  340.  
  341. -- inputs
  342. if dev then print("setting uis to be done") end
  343. UserInputService.InputBegan:Connect(function(input, event)
  344.  
  345. if input.KeyCode == Enum.KeyCode[jump] and power then
  346. local N=game:GetService("VirtualInputManager")
  347. N:SendKeyEvent(true,string.upper(maxPower),false,game)
  348. end
  349.  
  350.  
  351. if input.KeyCode == Enum.KeyCode[string.upper(setForward)] and setting then
  352. if player.TeamColor == BrickColor.new("Really blue") then
  353. lookAt(player.Character, left)
  354. else
  355. lookAt(player.Character, right)
  356. end
  357. end
  358.  
  359. if input.KeyCode == Enum.KeyCode[string.upper(setBackwards)] and setting then
  360. if player.TeamColor == BrickColor.new("Really red") then
  361. lookAway(player.Character, left)
  362. else
  363. lookAway(player.Character, right)
  364. end
  365. end
  366.  
  367. if input.KeyCode == Enum.KeyCode[jump] and serving then
  368. if debug then print("Jump") end
  369. if player.Character.UpperTorso.Position.Z > 40 and player.TeamColor == BrickColor.new("Really blue") then
  370.  
  371. local r = math.random(1, 2)
  372. if r == 1 then
  373. lookAt(player.Character, redRCorner)
  374. else
  375. lookAt(player.Character, redLCorner)
  376. end
  377.  
  378. elseif player.Character.UpperTorso.Position.Z < -40 and player.TeamColor == BrickColor.new("Really red") then
  379.  
  380. local r = math.random(1, 2)
  381. if r == 1 then
  382. lookAt(player.Character, bluRCorner)
  383. else
  384. lookAt(player.Character, bluLCorner)
  385. end
  386.  
  387.  
  388. else
  389. if debug then print("False") end
  390. end
  391. end
  392.  
  393. if input.KeyCode == Enum.KeyCode[jump] and spiking then
  394. if debug then print("Jump") end
  395.  
  396. if block == true then return end
  397.  
  398. if spikeMode == "random" or nil then
  399. local aimPart = Instance.new("Part")
  400. aimPart.Size = Vector3.new(0.318, 0.001, 0.472)
  401.  
  402.  
  403. if player.TeamColor == BrickColor.new("Really blue") and player.Character.UpperTorso.Position.Z < 40 then
  404.  
  405. local rP = Instance.new("Part")
  406. rP.Anchored = true
  407. rP.Transparency = 1
  408. local range = 20
  409. rP.Position = redSpike.Position + Vector3.new(math.random(-range,range),10,math.random(-range,range))
  410. rP.Parent = workspace
  411.  
  412. lookAt(player.Character, rP)
  413. rP:Destroy()
  414.  
  415. if debug then print("Random part made") end
  416. elseif player.TeamColor == BrickColor.new("Really red") and player.Character.UpperTorso.Position.Z > -40 then
  417.  
  418. local rP = Instance.new("Part")
  419. rP.Anchored = true
  420. rP.Transparency = 1
  421. local range = 20
  422. rP.Position = bluSpike.Position + Vector3.new(math.random(-range,range),10,math.random(-range,range))
  423. rP.Parent = workspace
  424.  
  425. lookAt(player.Character, rP)
  426. rP:Destroy()
  427. if debug then print("Random part made") end
  428. end
  429. end
  430.  
  431. if spikeMode == "point" then
  432.  
  433. if player.TeamColor == BrickColor.new("Really blue") and player.Character.UpperTorso.Position.Z < 40 then
  434. local p = Instance.new("Part")
  435. p.Anchored = true
  436. p.CanCollide = false
  437. p.CFrame = CFrame.new(mouse.Hit.X, 10, mouse.Hit.Z)
  438. p.Transparency = 1
  439. p.Parent = workspace
  440. lookAt(player.Character, p)
  441. elseif player.TeamColor == BrickColor.new("Really red") and player.Character.UpperTorso.Position.Z > -40 then
  442. local p = Instance.new("Part")
  443. p.Anchored = true
  444. p.CanCollide = false
  445. p.CFrame = CFrame.new(mouse.Hit.X, 10, mouse.Hit.Z)
  446. p.Transparency = 1
  447. p.Parent = workspace
  448. lookAt(player.Character, p)
  449. end
  450. end
  451. end
  452.  
  453. if input.KeyCode == Enum.KeyCode[changeMode] then
  454. if block then block = false else block = true end
  455. end
  456.  
  457. 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
  458. if sprint then
  459. local N=game:GetService("VirtualInputManager")
  460. N:SendKeyEvent(true,string.upper(sprintKey),false,game)
  461. task.wait(0.1)
  462. N:SendKeyEvent(true,string.upper(sprintKey),false,game)
  463. task.wait(0.1)
  464. N:SendKeyEvent(true,string.upper(sprintKey),false,game)
  465. end
  466. end
  467.  
  468. end)
  469.  
  470. --[[
  471. Setting - The setting mode auto aims towards the antennas on both sides when you set the ball using your forward and backwards set key.
  472. 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.
  473. 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.
  474. Power - The power mode automatically sets your power to the maximum amount when you jump.
  475. Sprint - The sprint mode automatically hits your sprint key when you move.
  476. I am pretty new at making scripts so if you have any suggestions please reach out to me, thank you for using! sneaky#0168
  477. ]]--
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement