Advertisement
gray_alli28codesrbx

SkyWithASunBall Script

Dec 14th, 2017
279
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.87 KB | None | 0 0
  1. --[[ Pokeball Script by Dominical ]]--
  2. wait(.3)
  3. balls={}
  4. local player=game.Players.LocalPlayer
  5. local character=player.Character
  6. local tool=Instance.new("Tool",player.Backpack)
  7. tool.Name="Pokeball"
  8. handle = Instance.new("Part",tool)
  9. handle.FormFactor = Enum.FormFactor.Symmetric
  10. handle.Transparency = 1
  11. handle.TopSurface = Enum.SurfaceType.Smooth
  12. handle.Size = Vector3.new(1,1,1)
  13. handle.Name = "Handle"
  14. handle.CFrame = CFrame.new(10.295968055725,0.52928900718689,103.20822143555) * CFrame.Angles(1.5707963705063, 1.5707963705063, 0)
  15. handle.BrickColor = BrickColor.new("White")
  16. handle.Friction = 0.30000001192093
  17. handle.Shape = Enum.PartType.Ball
  18. handle.BottomSurface = Enum.SurfaceType.Smooth
  19. local sound=Instance.new("Sound",handle)
  20. sound.SoundId="http://www.roblox.com/asset?id=1220866142"
  21. sound.Volume=1
  22. decal = Instance.new("Decal",handle)
  23. decal.Face = Enum.NormalId.Bottom
  24. decal.Texture = "http://www.roblox.com/asset/?id=1220866142"
  25.  
  26. decal = Instance.new("Decal",handle)
  27. decal.Texture = "http://www.roblox.com/asset/?id=1220866142"
  28.  
  29. decal = Instance.new("Decal",handle)
  30. decal.Face = Enum.NormalId.Left
  31. decal.Texture = "http://www.roblox.com/asset/?id=1220866142"
  32.  
  33. decal = Instance.new("Decal",handle)
  34. decal.Face = Enum.NormalId.Back
  35. decal.Texture = "http://www.roblox.com/asset/?id=1220866142"
  36.  
  37. decal = Instance.new("Decal",handle)
  38. decal.Face = Enum.NormalId.Right
  39. decal.Texture = "http://www.roblox.com/asset/?id=1220866142"
  40.  
  41. decal = Instance.new("Decal",handle)
  42. decal.Face = Enum.NormalId.Top
  43. decal.Texture = "http://www.roblox.com/asset/?id=1220866142"
  44. function vanish()
  45. for i,v in pairs(handle:GetChildren()) do
  46. if v:IsA("Decal") then
  47. v.Transparency=1
  48. end
  49. end
  50. handle.Transparency=1
  51. end
  52. function unvanish()
  53. for i,v in pairs(handle:GetChildren()) do
  54. if v:IsA("Decal") then
  55. v.Transparency=0
  56. end
  57. end
  58. handle.Transparency=0
  59. end
  60. local equipped=false
  61. local enabled=true
  62. player.Chatted:connect(function(m)
  63. if m=="poke:clear:m" then
  64. for i,v in pairs(balls) do
  65. v:Destroy()
  66. table.remove(balls,i)
  67. end
  68. elseif m=="poke:clear:a" then
  69. for i,v in pairs(workspace:GetChildren()) do
  70. if v:IsA("Part") then
  71. if v.Name=="PokeEntity" then
  72. v:Destroy()
  73. end
  74. end
  75. end
  76. end
  77. end)
  78. tool.Equipped:connect(function() equipped=true end)
  79. tool.Unequipped:connect(function() equipped=false end)
  80. local mouse=player:GetMouse()
  81. local animation=Instance.new("Animation",character)
  82. animation.Name="ThrowA"
  83. animation.AnimationId="http://www.roblox.com/asset?id=1220866142"
  84. local animTrack=character.Humanoid:LoadAnimation(animation)
  85. mouse.Button1Down:connect(function()
  86. if equipped and enabled then
  87. --throw
  88.  
  89. local project=handle:Clone()
  90. animTrack:Play()
  91. vanish()
  92. sound:Play()
  93. wait(.5)
  94. project.Parent=workspace
  95. project.CFrame=CFrame.new(character.Torso.Position+character.Torso.CFrame.lookVector*5)
  96. enabled=false
  97. project.Velocity=mouse.Hit.lookVector*300
  98. project.Touched:connect(function(hit)
  99. if hit.Parent:findFirstChild("Humanoid") and hit.Parent:findFirstChild("Torso") then
  100.  
  101. for i,v in pairs(hit.Parent:GetChildren()) do
  102. if v:IsA("Part") then
  103. v.Anchored=true
  104. end
  105. end
  106. local ball=Instance.new("Part",workspace)
  107. ball.Shape="Ball"
  108. ball.Anchored=true
  109. ball.Name="PokeEntity"
  110. ball.BrickColor=BrickColor.new("Really red")
  111. ball.Transparency=0.5
  112. ball.Size=Vector3.new(10,10,10)
  113. ball.CFrame=CFrame.new(hit.Parent.Torso.Position)
  114. ball.TopSurface='Smooth'
  115. ball.BottomSurface='Smooth'
  116. table.insert(balls,ball)
  117. end
  118. local explosion=Instance.new("Explosion",workspace)
  119. explosion.BlastPressure=0
  120. explosion.BlastRadius=0
  121. explosion.DestroyJointRadiusPercent=0
  122. explosion.Position=project.Position
  123. explosion.ExplosionType='NoCraters'
  124. project:Destroy()
  125. end)
  126. wait(2)
  127. enabled=true
  128. unvanish()
  129. end
  130. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement