BobMe

ballwithcoyotijump

Aug 18th, 2023
48
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 22.69 KB | None | 0 0
  1. wait(1)
  2. local remote = owner:FindFirstChild("littlebolgozoomzoom186723")
  3. script.Name = "erjghjrgfjghfjgjf"..tostring(math.random(11111111,99999999))
  4. if remote == nil then
  5. remote = Instance.new("RemoteEvent",owner)
  6. remote.Name = "littlebolgozoomzoom186723"
  7. end
  8. local serversounds = Instance.new("Part")
  9. serversounds.Name = "ServerSounds"
  10. serversounds.CanCollide = false
  11. serversounds.Massless = true
  12. serversounds.CanQuery = false
  13. serversounds.Transparency = 1
  14. serversounds.Size = Vector3.new(0.1,0.1,0.1)
  15. local ball = nil
  16. local roll1 = Instance.new("Sound",serversounds)
  17. roll1.SoundId = "rbxassetid://6560398360"
  18. roll1.Volume = 0
  19. roll1.PlaybackSpeed = 2
  20. roll1:Play()
  21. roll1.Looped = true
  22. roll1.Name = "BALLROLLYPOLLY"
  23.  
  24. local onground = false
  25.  
  26. remote.OnServerEvent:Connect(function(player,typ,data)
  27. if player == owner then
  28. if typ == "ready" then
  29. ball = Instance.new("Part",script)
  30. ball.Shape = Enum.PartType.Ball
  31. ball.Size = Vector3.new(1,1,1)
  32. ball.Material = Enum.Material.Foil
  33. ball.CFrame = CFrame.new(0,50,0)
  34. ball.Color = Color3.fromRGB(255,125,255)
  35. ball.Name = "sdjlkndsfjkgjsdf"..tostring(math.random(11111111,99999999))
  36. serversounds.CFrame = ball.CFrame
  37. serversounds.Parent = ball
  38. local weld = Instance.new("WeldConstraint",ball)
  39. weld.Part0 = ball
  40. weld.Part1 = serversounds
  41. local sound = Instance.new("Sound",ball)
  42. sound.SoundId = "rbxassetid://2852749304"
  43. if owner.UserId == 47202740 then
  44. ball.Color = Color3.fromRGB(14,105,171)
  45. elseif owner.UserId == 46767274 then
  46. ball.Color = Color3.fromRGB(255,155,255)
  47. elseif owner.UserId == 34629254 then
  48. ball.Color = Color3.fromRGB(255,55,255)
  49. else
  50. local countup = math.random(255,255*5)
  51. local r = math.random(0,255)
  52. countup = countup + 1
  53. math.randomseed(countup)
  54. local g = math.random(0,255)
  55. countup = countup + 1
  56. math.randomseed(countup)
  57. local b = math.random(0,255)
  58. ball.Color = Color3.fromRGB(r,g,b)
  59. end
  60.  
  61. --local tex = Instance.new("Texture",ball)
  62. --tex.Texture = "http://www.roblox.com/asset/?id=9844230455"
  63. --tex.StudsPerTileU = 0.8
  64. --tex.StudsPerTileV = 0.8
  65. --tex.Transparency = 0
  66. --tex.Face = Enum.NormalId.Top
  67. --local tex2 = tex:Clone()
  68. --tex2.Face = Enum.NormalId.Front
  69. --tex2.Parent = tex.Parent
  70. --local tex2 = tex:Clone()
  71. --tex2.Face = Enum.NormalId.Back
  72. --tex2.Parent = tex.Parent
  73. --local tex2 = tex:Clone()
  74. --tex2.Face = Enum.NormalId.Bottom
  75. --tex2.Parent = tex.Parent
  76. --local tex2 = tex:Clone()
  77. --tex2.Face = Enum.NormalId.Left
  78. --tex2.Parent = tex.Parent
  79. --local tex2 = tex:Clone()
  80. --tex2.Face = Enum.NormalId.Right
  81. --tex2.Parent = tex.Parent
  82. remote:FireClient(owner,"Ball",ball:GetFullName())
  83. coroutine.resume(coroutine.create(function()
  84. while wait() do
  85. ball:SetNetworkOwner(owner)
  86. end
  87. end))
  88. elseif typ == "JumpSound" then
  89. local a,b = pcall(function()
  90. local pit1 = data[1]
  91. local pit2 = data[2]
  92. local jumpsound1 = serversounds:FindFirstChild("JumpSound1")
  93. local jumpsound2 = serversounds:FindFirstChild("JumpSound2")
  94. if jumpsound1 == nil then
  95. jumpsound1 = Instance.new("Sound",serversounds)
  96. jumpsound1.Name = "JumpSound1"
  97. end
  98. if jumpsound2 == nil then
  99. jumpsound2 = Instance.new("Sound",serversounds)
  100. jumpsound2.Name = "JumpSound2"
  101. end
  102. jumpsound1.SoundId = "rbxassetid://180204586"
  103. jumpsound1.Volume = 1
  104. jumpsound1.PlaybackSpeed = pit1
  105. jumpsound2.SoundId = "rbxassetid://4560102662"
  106. jumpsound2.Volume = 1
  107. jumpsound2.PlaybackSpeed = pit2
  108. jumpsound1:Play()
  109. jumpsound2:Play()
  110. end)
  111. elseif typ == "SoftHit" then
  112. local sound = serversounds:FindFirstChild("SoftHitSound")
  113. if sound == nil then
  114. sound = Instance.new("Sound",serversounds)
  115. sound.Name = "SoftHitSound"
  116. end
  117. sound.SoundId = "rbxassetid://9120885468"
  118. sound.Volume = data[1]
  119. sound.PlaybackSpeed = data[2]
  120. sound:Play()
  121. elseif typ == "HardHit" then
  122. local sound = serversounds:FindFirstChild("HardHitSound1")
  123. if sound == nil then
  124. sound = Instance.new("Sound",serversounds)
  125. sound.Name = "HardHitSound1"
  126. end
  127. sound.SoundId = "rbxassetid://9119073573"
  128. sound.Volume = data[1][1]
  129. sound.PlaybackSpeed = data[1][2]
  130. sound:Play()
  131. local sound = serversounds:FindFirstChild("HardHitSound2")
  132. if sound == nil then
  133. sound = Instance.new("Sound",serversounds)
  134. sound.Name = "HardHitSound2"
  135. end
  136. sound.SoundId = "rbxassetid://9119911864"
  137. sound.Volume = data[2][1]
  138. sound.PlaybackSpeed = data[2][2]
  139. sound:Play()
  140. local sound = serversounds:FindFirstChild("HardHitSound3")
  141. if sound == nil then
  142. sound = Instance.new("Sound",serversounds)
  143. sound.Name = "HardHitSound3"
  144. end
  145. sound.SoundId = "rbxassetid://9120109021"
  146. sound.Volume = data[3][1]
  147. sound.PlaybackSpeed = data[3][2]
  148. sound:Play()
  149. local sound = serversounds:FindFirstChild("HardHitSound4")
  150. if sound == nil then
  151. sound = Instance.new("Sound",serversounds)
  152. sound.Name = "HardHitSound4"
  153. end
  154. sound.SoundId = "rbxassetid://9120885468"
  155. sound.Volume = data[4][1]
  156. sound.PlaybackSpeed = data[4][2]
  157. sound:Play()
  158. elseif typ == "InAir" then
  159. onground = false
  160. elseif typ == "OnGround" then
  161. onground = true
  162. end
  163. end
  164. end)
  165.  
  166. game:GetService("RunService").Heartbeat:Connect(function(num)
  167. if roll1 == nil or roll1.Parent ~= serversounds then
  168. local roll1 = serversounds:FindFirstChild("BALLROLLYPOLLY")
  169. if roll1 == nil then
  170. roll1 = Instance.new("Sound",serversounds)
  171. roll1.SoundId = "rbxassetid://6560398360"
  172. roll1.Volume = 0
  173. roll1.PlaybackSpeed = 2
  174. roll1:Play()
  175. roll1.Looped = true
  176. roll1.Name = "BALLROLLYPOLLY"
  177. end
  178. end
  179. if onground and ball ~= nil then
  180. local velocity = ball.AssemblyLinearVelocity
  181. local tv = Vector2.new(velocity.X,velocity.Z).Magnitude
  182. local volume = math.clamp(tv/15,0,1)
  183. local playbackspeed = math.clamp((1.01^tv),1,5)
  184. roll1.Volume = volume
  185. roll1.PlaybackSpeed = playbackspeed*2
  186. elseif not onground and ball ~= nil then
  187. roll1.Volume = 0
  188. end
  189. end)
  190.  
  191. local gui = Instance.new("ScreenGui",owner.PlayerGui)
  192. gui.ResetOnSpawn = false
  193. NLS([[wait(2)
  194. local cam = workspace.CurrentCamera
  195. local owner = game.Players.LocalPlayer
  196. local remote = owner:WaitForChild("littlebolgozoomzoom186723")
  197. remote:FireServer("ready")
  198. local ball = nil
  199. local lastjump = tick()
  200. local cotime = tick()
  201. local cancotime = tick()
  202. local h = false
  203.  
  204. local eventery = nil
  205. eventery = remote.OnClientEvent:Connect(function(typ,b)
  206. print(typ,b)
  207. if typ == "Ball" then
  208. ball = b
  209. end
  210. end)
  211. repeat wait() until ball ~= nil
  212. eventery:Disconnect()
  213. workspace.Gravity = 196.2/4
  214.  
  215. -- script begins
  216. local function getObjectFromFullName(str)
  217. local thing = game
  218. local spl = string.split(str,".")
  219. for i,v in pairs(spl) do
  220. local newthing = thing:FindFirstChild(v)
  221. if newthing ~= nil then
  222. thing = newthing
  223. else
  224. return nil
  225. end
  226. end
  227. return thing
  228. end
  229. ball = getObjectFromFullName(ball)
  230. ball.CustomPhysicalProperties = PhysicalProperties.new(ball.Material)
  231. cam.CameraSubject = ball
  232. ball.CFrame = CFrame.new(0,50,0)
  233. ball.ServerSounds:Destroy()
  234.  
  235. local w,s,a,d,space = false,false,false,false,false
  236. local jumping = false
  237. local uis = game:GetService("UserInputService")
  238. local random = math.random(900,1100)/1000
  239. local jumpsound1 = Instance.new("Sound",ball)
  240. jumpsound1.SoundId = "rbxassetid://180204586"
  241. jumpsound1.Volume = 1
  242. jumpsound1.PlaybackSpeed = random*4
  243. jumpsound1.Name = "JUMPSOUND1CLIENT"
  244. local jumpsound2 = Instance.new("Sound",ball)
  245. jumpsound2.SoundId = "rbxassetid://4560102662"
  246. jumpsound2.Volume = 1
  247. jumpsound2.PlaybackSpeed = random-0.3
  248. jumpsound2.Name = "JUMPSOUND2CLIENT"
  249.  
  250. local lightimpact = Instance.new("Sound",ball)
  251. lightimpact.SoundId = "rbxassetid://9120885468"
  252. lightimpact.Volume = 1
  253. lightimpact.PlaybackSpeed = 1.3
  254. lightimpact.Name = "LIGHTIMPACTCLIENT"
  255.  
  256. local heavyimpact1 = Instance.new("Sound",ball)
  257. heavyimpact1.SoundId = "rbxassetid://9119073573"
  258. heavyimpact1.Volume = 1
  259. heavyimpact1.PlaybackSpeed = 1
  260. heavyimpact1.Name = "HEAVYIMPACT1CLIENT"
  261. local heavyimpact2 = Instance.new("Sound",ball)
  262. heavyimpact2.SoundId = "rbxassetid://9119911864"
  263. heavyimpact2.Volume = 1
  264. heavyimpact2.PlaybackSpeed = 1
  265. heavyimpact2.Name = "HEAVYIMPACT2CLIENT"
  266. local heavyimpact3 = Instance.new("Sound",ball)
  267. heavyimpact3.SoundId = "rbxassetid://9120109021"
  268. heavyimpact3.Volume = 0.2
  269. heavyimpact3.PlaybackSpeed = 1
  270. heavyimpact3.Name = "HEAVYIMPACT3CLIENT"
  271. local heavyimpact4 = Instance.new("Sound",ball)
  272. heavyimpact4.SoundId = "rbxassetid://9120885468"
  273. heavyimpact4.Volume = 1
  274. heavyimpact4.PlaybackSpeed = 1
  275. heavyimpact4.Name = "HEAVYIMPACT4CLIENT"
  276.  
  277. local roll1 = Instance.new("Sound",ball)
  278. roll1.SoundId = "rbxassetid://6560398360"
  279. roll1.Volume = 0
  280. roll1.PlaybackSpeed = 2
  281. roll1.Looped = true
  282. roll1.Name = "ROLL1CLIENT"
  283. local roll2 = Instance.new("Sound",ball)
  284. roll2.SoundId = "rbxassetid://9112904857"
  285. roll2.Volume = 0
  286. roll2.PlaybackSpeed = 1.2
  287. roll2.Looped = true
  288. roll2.Name = "ROLL2CLIENT"
  289. roll1:Play()
  290. roll2:Play()
  291.  
  292.  
  293. uis.InputBegan:Connect(function(input,gamepro)
  294. if not gamepro then
  295. if input.UserInputType == Enum.UserInputType.Keyboard then
  296. if input.KeyCode == Enum.KeyCode.W then
  297. w = true
  298. elseif input.KeyCode == Enum.KeyCode.S then
  299. s = true
  300. elseif input.KeyCode == Enum.KeyCode.A then
  301. a = true
  302. elseif input.KeyCode == Enum.KeyCode.D then
  303. d = true
  304. elseif input.KeyCode == Enum.KeyCode.Space then
  305. space = true
  306. end
  307. end
  308. end
  309. end)
  310.  
  311. uis.InputEnded:Connect(function(input,gamepro)
  312. if not gamepro then
  313. if input.UserInputType == Enum.UserInputType.Keyboard then
  314. if input.KeyCode == Enum.KeyCode.W then
  315. w = false
  316. elseif input.KeyCode == Enum.KeyCode.S then
  317. s = false
  318. elseif input.KeyCode == Enum.KeyCode.A then
  319. a = false
  320. elseif input.KeyCode == Enum.KeyCode.D then
  321. d = false
  322. elseif input.KeyCode == Enum.KeyCode.Space then
  323. space = false
  324. end
  325. end
  326. end
  327. end)
  328. local park = Instance.new("Part",workspace)
  329. park.Anchored = true
  330. park.Size = Vector3.new(3,1,3)
  331. park.Transparency = 1
  332. park.CustomPhysicalProperties = PhysicalProperties.new(2.4030001163482666*1.25,1.5,0.5,1,1)
  333. local velocity = Vector3.new(0,0,0)
  334. local airborn = false
  335. local groundpart = nil
  336. local antispammer = false
  337.  
  338. ball.Touched:Connect(function(part)
  339. if not antispammer and part.CanCollide then
  340. local y = math.abs(velocity.Y)
  341. local horizontalvelocity = Vector2.new(velocity.X,velocity.Z).Magnitude
  342. local zoomer = 0
  343. if y > 10 and not airborn then
  344. antispammer = true
  345. zoomer = y
  346. elseif horizontalvelocity > 4 and not airborn and part ~= park and part ~= groundpart then
  347. antispammer = true
  348. zoomer = horizontalvelocity
  349. elseif airborn and horizontalvelocity > 4 and horizontalvelocity > y then
  350. antispammer = true
  351. zoomer = horizontalvelocity
  352. elseif airborn and y > 14 and y >= horizontalvelocity then
  353. antispammer = true
  354. zoomer = y
  355. end
  356.  
  357. if zoomer < 30 and zoomer ~= 0 then
  358. local ratio = zoomer/30
  359. if lightimpact == nil or lightimpact.Parent ~= ball then
  360. lightimpact = Instance.new("Sound",ball)
  361. lightimpact.SoundId = "rbxassetid://9120885468"
  362. lightimpact.Volume = 1
  363. lightimpact.PlaybackSpeed = 1.3
  364. lightimpact.Name = "LIGHTIMPACTCLIENT"
  365. end
  366. lightimpact.Volume = 1+ratio
  367. lightimpact.PlaybackSpeed = 1.3+(ratio/3)
  368. lightimpact:Play()
  369. remote:FireServer("SoftHit",{1+ratio,1.3+(ratio/3)})
  370. elseif zoomer ~= 0 then
  371. local ratio = math.clamp(zoomer/100,0,1)
  372. if heavyimpact1 == nil or heavyimpact1.Parent ~= ball then
  373. heavyimpact1 = Instance.new("Sound",ball)
  374. heavyimpact1.SoundId = "rbxassetid://9119073573"
  375. heavyimpact1.Volume = 1
  376. heavyimpact1.PlaybackSpeed = 1
  377. heavyimpact1.Name = "HEAVYIMPACT1CLIENT"
  378. end
  379. heavyimpact1.Volume = 1.25+(ratio/2)
  380. heavyimpact1.PlaybackSpeed = 1+(ratio/3)
  381. heavyimpact1:Play()
  382. if heavyimpact2 == nil or heavyimpact2.Parent ~= ball then
  383. heavyimpact2 = Instance.new("Sound",ball)
  384. heavyimpact2.SoundId = "rbxassetid://9119911864"
  385. heavyimpact2.Volume = 1
  386. heavyimpact2.PlaybackSpeed = 1
  387. heavyimpact2.Name = "HEAVYIMPACT2CLIENT"
  388. end
  389. heavyimpact2.Volume = 1.25+(ratio/2)
  390. heavyimpact2.PlaybackSpeed = 1+(ratio/3)
  391. heavyimpact2:Play()
  392. if heavyimpact3 == nil or heavyimpact3.Parent ~= ball then
  393. heavyimpact3 = Instance.new("Sound",ball)
  394. heavyimpact3.SoundId = "rbxassetid://9120109021"
  395. heavyimpact3.Volume = 0.2
  396. heavyimpact3.PlaybackSpeed = 1
  397. heavyimpact2.Name = "HEAVYIMPACT2CLIENT"
  398. end
  399. heavyimpact3.Volume = (1.25+(ratio/2))*0.2
  400. heavyimpact3.PlaybackSpeed = 1+(ratio/3)
  401. heavyimpact3:Play()
  402. if heavyimpact4 == nil or heavyimpact4.Parent ~= ball then
  403. heavyimpact4 = Instance.new("Sound",ball)
  404. heavyimpact4.SoundId = "rbxassetid://9120885468"
  405. heavyimpact4.Volume = 1
  406. heavyimpact4.PlaybackSpeed = 1
  407. heavyimpact4.Name = "HEAVYIMPACT4CLIENT"
  408. end
  409. heavyimpact4.Volume = 1.25+(ratio/2)
  410. heavyimpact4.PlaybackSpeed = 1+(ratio/3)
  411. heavyimpact4:Play()
  412. remote:FireServer("HardHit",{{1.25+(ratio/2),1+(ratio/3)},{1.25+(ratio/2),1+(ratio/3)},{(1.25+(ratio/2))*0.2,1+(ratio/3)},{1.25+(ratio/2),1+(ratio/3)}})
  413. end
  414. wait()
  415. antispammer = false
  416. end
  417. end)
  418.  
  419. --ball:ApplyAngularImpulse(ball.AssemblyAngularVelocity + Vector3.new(math.rad(360),0,0))
  420. local detectoruwu = false
  421. local run = game:GetService("RunService")
  422. run.RenderStepped:Connect(function(tim)
  423. if owner.Character ~= nil then
  424. local hum = owner.Character:FindFirstChild("Humanoid")
  425. if hum ~= nil then
  426. owner.Character.Humanoid.WalkSpeed = 0
  427. owner.Character.Humanoid.UseJumpPower = true
  428. owner.Character.Humanoid.JumpPower = 0
  429. end
  430. end
  431. ball.CustomPhysicalProperties = PhysicalProperties.new(2.4030001163482666*1.25,1.5,0.3,1,1)
  432. cam.CameraSubject = ball
  433. local fps = 1/tim
  434. local ratio = fps/60
  435.  
  436. local part = Instance.new("Part")
  437. local mass = 1--ball.AssemblyMass/10.06566333770752
  438. local rot = Vector3.new(0,0,0)
  439.  
  440. if w then
  441. part.CFrame = cam.CFrame
  442. part.Orientation = Vector3.new(0,part.Orientation.Y,0)
  443. local cf1 = part.CFrame
  444. local cf2 = cf1 * CFrame.new(0,0,-1*mass)
  445. rot = rot + (cf2.Position - cf1.Position)
  446. end
  447. if s then
  448. part.CFrame = cam.CFrame
  449. part.Orientation = Vector3.new(0,part.Orientation.Y,0)
  450. local cf1 = part.CFrame
  451. local cf2 = cf1 * CFrame.new(0,0,1*mass)
  452. rot = rot + (cf2.Position - cf1.Position)
  453. end
  454. if a then
  455. part.CFrame = cam.CFrame
  456. part.Orientation = Vector3.new(0,part.Orientation.Y,0)
  457. local cf1 = part.CFrame
  458. local cf2 = cf1 * CFrame.new(-1*mass,0,0)
  459. rot = rot + (cf2.Position - cf1.Position)
  460. end
  461. if d then
  462. part.CFrame = cam.CFrame
  463. part.Orientation = Vector3.new(0,part.Orientation.Y,0)
  464. local cf1 = part.CFrame
  465. local cf2 = cf1 * CFrame.new(1*mass,0,0)
  466. rot = rot + (cf2.Position - cf1.Position)
  467. end
  468. local ray = workspace:Raycast(ball.Position,Vector3.new(0,ball.Size.Y*-1*0.5-0.35,0))
  469. local ray2 = Ray.new(ball.Position, Vector3.new(0, -500, 0))
  470. local part1 = Instance.new("Part")
  471. local part2 = Instance.new('Part')
  472.  
  473. local function PointLocalVectorAt(objectSpaceVector, originPosition, lookAtPosition)
  474. return CFrame.new(originPosition, lookAtPosition)*CFrame.new(Vector3.new(), objectSpaceVector):inverse()
  475. end
  476.  
  477. local testDistance = 100
  478. local part, hit, surfaceNormal = workspace:FindPartOnRayWithIgnoreList(ray2, {ball,park})
  479.  
  480. local ySize = part2.Size.y
  481. local x, z = ball.Position.x, ball.Position.z
  482. local posn = hit + surfaceNormal*ySize/2
  483. local x0, y0, z0 = posn.X, posn.Y, posn.Z
  484. local y = -(surfaceNormal.x*(x - x0) + surfaceNormal.z*(z - z0))/surfaceNormal.y + y0
  485. local newPosition = Vector3.new(x, y, z)
  486. park.CFrame = PointLocalVectorAt(Vector3.new(0, 1, 0), newPosition, newPosition + surfaceNormal)
  487. park.CFrame = park.CFrame * CFrame.new(0,(park.Size.Y*-1-0.09),0)
  488. part1.CFrame = park.CFrame * CFrame.new(0,17,0)
  489. local maf = part1.Position-park.Position
  490. airborn = ray == nil
  491. if ray2 ~= nil then
  492. groundpart = part
  493. else
  494. groundpart = nil
  495. end
  496. if airborn and detectoruwu then
  497. detectoruwu = false
  498. remote:FireServer("InAir")
  499. elseif not airborn and not detectoruwu then
  500. detectoruwu = true
  501. remote:FireServer("OnGround")
  502. end
  503. if not airborn then
  504. cotime = tick()
  505. end
  506. if (((ray ~= nil) and ray.Instance.CanCollide) or (cotime+0.08333333333333333 > tick()) and tick() > cancotime) and space and ball.AssemblyLinearVelocity.Y > -17 and ball.AssemblyLinearVelocity.Y < 5 then
  507. if tick() > lastjump then
  508. lastjump = tick()+(0.15/2)
  509. cotime = tick()-2
  510. cancotime = tick()+0.5
  511. --JUMP
  512. --
  513. local random = math.random(900,1100)/1000
  514. if jumpsound1 == nil or jumpsound1.Parent ~= ball then
  515. jumpsound1 = Instance.new("Sound",ball)
  516. jumpsound1.SoundId = "rbxassetid://180204586"
  517. jumpsound1.Volume = 1
  518. jumpsound1.PlaybackSpeed = random*4
  519. jumpsound1.Name = "JUMPSOUND1CLIENT"
  520. end
  521. jumpsound1.SoundId = "rbxassetid://180204586"
  522. jumpsound1.Volume = 1
  523. jumpsound1.PlaybackSpeed = random*4
  524. if jumpsound2 == nil or jumpsound2.Parent ~= ball then
  525. jumpsound2 = Instance.new("Sound",ball)
  526. jumpsound2.SoundId = "rbxassetid://4560102662"
  527. jumpsound2.Volume = 1
  528. jumpsound2.PlaybackSpeed = random-0.3
  529. jumpsound2.Name = "JUMPSOUND2CLIENT"
  530. end
  531. jumpsound2.SoundId = "rbxassetid://4560102662"
  532. jumpsound2.Volume = 1
  533. jumpsound2.PlaybackSpeed = random-0.3
  534. jumpsound1:Play()
  535. jumpsound2:Play()
  536. remote:FireServer("JumpSound",{random*4,random-0.3})
  537. coroutine.resume(coroutine.create(function()
  538. wait()
  539. ball.AssemblyLinearVelocity = Vector3.new(ball.AssemblyLinearVelocity.X+maf.X,maf.Y,ball.AssemblyLinearVelocity.Z+maf.Z)
  540. end))
  541. end
  542. end
  543. if ball.AssemblyLinearVelocity.Y < -35 then
  544. lastjump = tick()+(0.15/2)
  545. ball.CustomPhysicalProperties = PhysicalProperties.new(2.4030001163482666*1.25,1.5,0.6,1,1)
  546. elseif ray ~= nil and ball.AssemblyLinearVelocity.Y == 0 then
  547. ball.CustomPhysicalProperties = PhysicalProperties.new(2.4030001163482666*1.25,1.5,2,1,1)
  548. end
  549. local ggg = math.max(1-(0.05 * tim/0.01666),0)
  550. ball:ApplyAngularImpulse(Vector3.new((rot.Z/3),0,((rot.X*-1)/3)) * Vector3.new(tim/0.01666,tim/0.01666,tim/0.01666))
  551. ball:ApplyImpulse(Vector3.new(((rot.X)/6),0,((rot.Z)/6)) * Vector3.new(tim/0.01666,tim/0.01666,tim/0.01666))
  552. if ray ~= nil then
  553. ball.AssemblyAngularVelocity = ball.AssemblyAngularVelocity * Vector3.new(ggg,ggg,ggg)
  554. else
  555. local ggg = math.max(1-(0.01 * tim/0.01666),0)
  556. ball.AssemblyAngularVelocity = ball.AssemblyAngularVelocity * Vector3.new(ggg,ggg,ggg)
  557. end
  558. velocity = ball.AssemblyLinearVelocity
  559. --ROLL
  560. if roll1 == nil or roll1.Parent ~= ball then
  561. roll1 = Instance.new("Sound",ball)
  562. roll1.SoundId = "rbxassetid://6560398360"
  563. roll1.Volume = 0
  564. roll1.PlaybackSpeed = 2
  565. roll1.Looped = true
  566. roll1.Name = "ROLL1CLIENT"
  567. roll1:Play()
  568. end
  569. if ray ~= nil then
  570. local tv = Vector2.new(velocity.X,velocity.Z).Magnitude
  571. local volume = math.clamp(tv/15,0,1)
  572. local playbackspeed = math.clamp((1.01^tv),1,5)
  573. roll1.Volume = volume
  574. roll1.PlaybackSpeed = playbackspeed*2
  575. --roll2.Volume = volume*0.2
  576. --roll2.PlaybackSpeed = playbackspeed*1.2
  577. else
  578. roll1.Volume = 0
  579. roll2.Volume = 0
  580. end
  581. end)
  582.  
  583. runService = game:GetService("RunService")
  584. userInputService = game:GetService("UserInputService")
  585. debs = game:GetService("Debris")
  586. deltaa = Vector2.new(0,0)
  587. zoom = 10
  588. sens = 0.0125
  589. scale = 1
  590. offset = Instance.new("CFrameValue")
  591. firstperson = false
  592. zoomed = false
  593. enabled = true
  594. bingleberry = true
  595. fromview = CFrame.Angles(0,0,0) -- ANGLES ONLY
  596. lockonpart = nil
  597. lockonpartdata = CFrame.new(0,0,0)
  598. camerax = 0
  599. cameray = 0
  600. cam = workspace.CurrentCamera
  601. able = false
  602. cam.CameraType = Enum.CameraType.Scriptable
  603.  
  604. function OnRenderStep()
  605. local delta = userInputService:GetMouseDelta()
  606. cam.CFrame = CFrame.new(0,0,0)
  607. cam.CFrame = CFrame.new(ball.Position + Vector3.new(0,ball.Size.Y/2,0))
  608. delta = Vector2.new((delta.X*sens),(delta.Y*sens))
  609. deltaa = delta*Vector2.new(-1,-1)
  610. camerax = camerax + deltaa.X
  611. cameray = cameray + deltaa.Y
  612. cam.CFrame = cam.CFrame * CFrame.Angles(0,camerax,0) * CFrame.Angles(cameray,0,0) * CFrame.new(0,0,(zoom * (scale/1)))
  613. end
  614.  
  615. runService.RenderStepped:Connect(function()
  616. OnRenderStep()
  617. end)
  618.  
  619. userInputService.InputBegan:Connect(function(input, gameProcessed)
  620. if input.UserInputType == Enum.UserInputType.MouseButton2 and not gameProcessed then
  621. userInputService.MouseBehavior = Enum.MouseBehavior.LockCurrentPosition
  622. end
  623. end)
  624. userInputService.InputEnded:Connect(function(input, gameProcessed)
  625. if input.UserInputType == Enum.UserInputType.MouseButton2 and not gameProcessed then
  626. userInputService.MouseBehavior = Enum.MouseBehavior.Default
  627. end
  628. end)
  629. userInputService.InputChanged:Connect(function(input, gameProcessed)
  630. if input.UserInputType == Enum.UserInputType.MouseWheel then
  631. if not zoomed then
  632. if zoom + (input.Position.Z * -1 * (zoom/7)) >= 0 then
  633. if true then
  634. zoom = zoom + input.Position.Z * -1 * (zoom/7)
  635. end
  636. end
  637. end
  638. end
  639. end)
  640.  
  641. while true do
  642. local player = owner
  643. local char = owner.Character
  644. local torso = char:FindFirstChild("HumanoidRootPart")
  645. local seleted = false
  646. local pos, gyro;
  647. local UserInputService = game:GetService("UserInputService")
  648. local dinosaur = Instance.new("HopperBin",owner.Backpack)
  649. dinosaur.Name = "Ball Fly"
  650.  
  651. dinosaur.Selected:connect(function(mouse)
  652. selected = true
  653. pos = Instance.new("BodyPosition", ball)
  654. pos.maxForce = Vector3.new(1,1,1) * 1e99
  655. pos.position = ball.Position
  656. local angle = CFrame.new()
  657. touchstart = UserInputService.TouchStarted:connect(function()
  658. button_up = false
  659. angle = CFrame.Angles(-math.rad(70),0,0)
  660. coroutine.resume(coroutine.create(function()
  661. while not button_up do
  662. pos.position = pos.position + (mouse.Hit.p - cam.CFrame.Position).unit * 10
  663. wait()
  664. end
  665. end))
  666. end)
  667. touchend = UserInputService.TouchEnded:connect(function()
  668. button_up = true
  669. angle = CFrame.new()
  670. end)
  671. mouse.Button1Down:connect(function()
  672. local button_up = false
  673. angle = CFrame.Angles(-math.rad(70),0,0)
  674. coroutine.resume(coroutine.create(function()
  675. while not button_up do
  676. pos.position = pos.position + (mouse.Hit.p - cam.CFrame.Position).unit * 10
  677. wait()
  678. end
  679. end))
  680. mouse.Button1Up:wait()
  681. button_up = true
  682. angle = CFrame.new()
  683. end)
  684. end)
  685. dinosaur.Deselected:connect(function()
  686. selected = false
  687. touchstart:disconnect()
  688. touchend:Disconnect()
  689. pos:Destroy()
  690. end)
  691. repeat wait(.1) until char == nil or char.Parent == nil or char ~= owner.Character
  692. if pos ~= nil then
  693. pos:Destroy()
  694. end
  695. end]],gui)
Add Comment
Please, Sign In to add comment