Advertisement
Guest User

op curve tool

a guest
Jun 24th, 2019
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 11.09 KB | None | 0 0
  1. local debris = game:service("Debris")
  2. Go = script.Parent.Parent.Kick
  3. Go1 = script.Parent.Parent.BKick
  4. Kick = false
  5. Go.Value = 0
  6. Go1.Value = 0
  7. script.Parent.Selected:connect(function(m)
  8. m.KeyDown:connect(function(key)
  9. if key:lower() == "f" then
  10. if Go.Value == 1 then return end
  11. if Go1.Value == 1 then return end
  12. Go.Value = 1
  13. if script.Parent.Parent.Parent.Character == nil then return end
  14. if script.Parent.Parent.Parent.Character:findFirstChild("Head") == nil then return end
  15. if script.Parent.Parent.Parent.Character:findFirstChild("Torso") == nil then return end
  16. if script.Parent.Parent.Parent.Character:findFirstChild("Right Leg") == nil then return end
  17. if script.Parent.Parent.Parent.Character:findFirstChild("Left Leg") == nil then return end
  18. if script.Parent.Parent.Parent.Character:findFirstChild("Right Arm") == nil then return end
  19. if script.Parent.Parent.Parent.Character:findFirstChild("Left Arm") == nil then return end
  20. Torso = script.Parent.Parent.Parent.Character.Torso
  21. RL = script.Parent.Parent.Parent.Character["Right Leg"]
  22. LA = script.Parent.Parent.Parent.Character["Left Arm"]
  23. RA = script.Parent.Parent.Parent.Character["Right Arm"]
  24. Hip = Torso["Right Hip"]
  25. HipUpdate(Hip, nil)
  26. CreateWeld("W", RL, Torso, RL)
  27. UpdateWeldC0("W", RL, CFrame.new(0.5,-1.5,1) * CFrame.fromEulerAnglesXYZ(-math.pi/4,-0.5,0))
  28. script.Parent.Parent.Speed.Value = "54"
  29. script.Parent.Parent.Angle.Value = Vector3.new(4.0000e+006, 1000, 4.0000e+006)
  30. script.Parent.Parent.Parent.PlayerGui.Start.PowerBar.Visible = true
  31. script.Parent.Parent.Parent.PlayerGui.Start.PowerBar.PB.Size = UDim2.new(-1, 20, 0, 8)
  32. wait(0.1)
  33. if Go1.Value == 1 then return end
  34. script.Parent.Parent.Speed.Value = "59"
  35. script.Parent.Parent.Angle.Value = Vector3.new(4.0000e+006, 1200, 4.0000e+006)
  36. script.Parent.Parent.Parent.PlayerGui.Start.PowerBar.PB.Size = UDim2.new(-1, 40, 0, 8)
  37. wait(0.1)
  38. if Go1.Value == 1 then return end
  39. script.Parent.Parent.Speed.Value = "64"
  40. script.Parent.Parent.Angle.Value = Vector3.new(4.0000e+006, 1400, 4.0000e+006)
  41. script.Parent.Parent.Parent.PlayerGui.Start.PowerBar.PB.Size = UDim2.new(-1, 60, 0, 8)
  42. wait(0.1)
  43. if Go1.Value == 1 then return end
  44. script.Parent.Parent.Speed.Value = "64"
  45. script.Parent.Parent.Angle.Value = Vector3.new(4.0000e+006, 1600, 4.0000e+006)
  46. script.Parent.Parent.Parent.PlayerGui.Start.PowerBar.PB.Size = UDim2.new(-1, 80, 0, 8)
  47. wait(0.1)
  48. if Go1.Value == 1 then return end
  49. script.Parent.Parent.Speed.Value = "69"
  50. script.Parent.Parent.Angle.Value = Vector3.new(4.0000e+006, 1800, 4.0000e+006)
  51. script.Parent.Parent.Parent.PlayerGui.Start.PowerBar.PB.Size = UDim2.new(-1, 100, 0, 8)
  52. wait(0.1)
  53. if Go1.Value == 1 then return end
  54. script.Parent.Parent.Speed.Value = "79"
  55. script.Parent.Parent.Angle.Value = Vector3.new(4.0000e+006, 2000, 4.0000e+006)
  56. script.Parent.Parent.Parent.PlayerGui.Start.PowerBar.PB.Size = UDim2.new(-1, 120, 0, 8)
  57. wait(0.1)
  58. if Go1.Value == 1 then return end
  59. script.Parent.Parent.Speed.Value = "84"
  60. script.Parent.Parent.Angle.Value = Vector3.new(4.0000e+006, 2500, 4.0000e+006)
  61. script.Parent.Parent.Parent.PlayerGui.Start.PowerBar.PB.Size = UDim2.new(-1, 150, 0, 8)
  62. end
  63. end)
  64. end)
  65.  
  66. script.Parent.Selected:connect(function(m)
  67. m.KeyUp:connect(function(key)
  68. if key:lower() == "f" then
  69. if Go1.Value == 1 then return end
  70. Go1.Value = 1
  71. if script.Parent.Parent.Parent.Character == nil then return end
  72. if script.Parent.Parent.Parent.Character:findFirstChild("Torso") == nil then return end
  73. if script.Parent.Parent.Parent.Character:findFirstChild("Right Leg") == nil then return end
  74. Kick = true
  75. LH = script.Parent.Parent.Parent.Character.Torso["Left Hip"]
  76. RH = script.Parent.Parent.Parent.Character.Torso["Right Hip"]
  77. LH.MaxVelocity = "0.1"
  78. RH.MaxVelocity = "0.1"
  79. script.Parent.Parent.Parent.Character.Torso.Friction = "1"
  80. UpdateWeldC0("W", RL, CFrame.new(0.5,-1.5,-1) * CFrame.fromEulerAnglesXYZ(math.pi/6,0,0))
  81. RL.Touched:connect(function(hit)
  82. if Kick == false then return end
  83. if hit.Locked == true or hit.Anchored == true then return end
  84. Kick = false
  85. F = Instance.new("BodyVelocity")
  86. F.Parent = hit
  87. OwnershipChange(hit)
  88. F.velocity = RL.CFrame.lookVector * script.Parent.Parent.Speed.Value
  89. F.maxForce = (script.Parent.Parent.Angle.Value)
  90. debris:AddItem(F,0.3)
  91. wait()
  92. AV = Instance.new("BodyForce")
  93. AV.Parent = hit
  94. AV.Force = (Torso.CFrame*CFrame.fromEulerAnglesXYZ(0,math.pi/2,0)).lookVector*(100+script.Parent.Parent.Speed.Value)
  95. debris:AddItem(AV,2)
  96. end)
  97. wait(0.7)
  98. script.Parent.Parent.Parent.PlayerGui.Start.PowerBar.Visible = false
  99. script.Parent.Parent.Speed.Value = "0"
  100. script.Parent.Parent.Angle.Value = Vector3.new(4.0000e+006, 300, 4.0000e+006)
  101. Kick = false
  102. RemoveWeld("W", RL)
  103. HipUpdate(Hip, RL)
  104. wait(0.2)
  105. Go.Value = 0
  106. Go1.Value = 0
  107. end
  108. end)
  109. end)
  110.  
  111. script.Parent.Selected:connect(function(m)
  112. m.KeyDown:connect(function(key)
  113. if key:lower() == "f" then
  114. if Go.Value == 1 then return end
  115. if Go1.Value == 1 then return end
  116. Go.Value = 1
  117. if script.Parent.Parent.Parent.Character == nil then return end
  118. if script.Parent.Parent.Parent.Character:findFirstChild("Head") == nil then return end
  119. if script.Parent.Parent.Parent.Character:findFirstChild("Torso") == nil then return end
  120. if script.Parent.Parent.Parent.Character:findFirstChild("Right Leg") == nil then return end
  121. if script.Parent.Parent.Parent.Character:findFirstChild("Left Leg") == nil then return end
  122. if script.Parent.Parent.Parent.Character:findFirstChild("Right Arm") == nil then return end
  123. if script.Parent.Parent.Parent.Character:findFirstChild("Left Arm") == nil then return end
  124. Torso = script.Parent.Parent.Parent.Character.Torso
  125. RL = script.Parent.Parent.Parent.Character["Left Leg"]
  126. LA = script.Parent.Parent.Parent.Character["Left Arm"]
  127. RA = script.Parent.Parent.Parent.Character["Right Arm"]
  128. Hip = Torso["Right Hip"]
  129. HipUpdate(Hip, nil)
  130. CreateWeld("W", RL, Torso, RL)
  131. UpdateWeldC0("W", RL, CFrame.new(0.5,-1.5,1) * CFrame.fromEulerAnglesXYZ(-math.pi/4,-0.5,0))
  132. script.Parent.Parent.Speed.Value = "60"
  133. script.Parent.Parent.Angle.Value = Vector3.new(4.0000e+006, 1000, 4.0000e+006)
  134. script.Parent.Parent.Parent.PlayerGui.Start.PowerBar.Visible = true
  135. script.Parent.Parent.Parent.PlayerGui.Start.PowerBar.PB.Size = UDim2.new(-1, 20, 0, 8)
  136. wait(0.1)
  137. if Go1.Value == 1 then return end
  138. script.Parent.Parent.Speed.Value = "60"
  139. script.Parent.Parent.Angle.Value = Vector3.new(4.0000e+006, 1200, 4.0000e+006)
  140. script.Parent.Parent.Parent.PlayerGui.Start.PowerBar.PB.Size = UDim2.new(-1, 40, 0, 8)
  141. wait(0.1)
  142. if Go1.Value == 1 then return end
  143. script.Parent.Parent.Speed.Value = "65"
  144. script.Parent.Parent.Angle.Value = Vector3.new(4.0000e+006, 1400, 4.0000e+006)
  145. script.Parent.Parent.Parent.PlayerGui.Start.PowerBar.PB.Size = UDim2.new(-1, 60, 0, 8)
  146. wait(0.1)
  147. if Go1.Value == 1 then return end
  148. script.Parent.Parent.Speed.Value = "65"
  149. script.Parent.Parent.Angle.Value = Vector3.new(4.0000e+006, 1600, 4.0000e+006)
  150. script.Parent.Parent.Parent.PlayerGui.Start.PowerBar.PB.Size = UDim2.new(-1, 80, 0, 8)
  151. wait(0.1)
  152. if Go1.Value == 1 then return end
  153. script.Parent.Parent.Speed.Value = "70"
  154. script.Parent.Parent.Angle.Value = Vector3.new(4.0000e+006, 1800, 4.0000e+006)
  155. script.Parent.Parent.Parent.PlayerGui.Start.PowerBar.PB.Size = UDim2.new(-1, 100, 0, 8)
  156. wait(0.1)
  157. if Go1.Value == 1 then return end
  158. script.Parent.Parent.Speed.Value = "80"
  159. script.Parent.Parent.Angle.Value = Vector3.new(4.0000e+006, 2000, 4.0000e+006)
  160. script.Parent.Parent.Parent.PlayerGui.Start.PowerBar.PB.Size = UDim2.new(-1, 120, 0, 8)
  161. wait(0.1)
  162. if Go1.Value == 1 then return end
  163. script.Parent.Parent.Speed.Value = "85"
  164. script.Parent.Parent.Angle.Value = Vector3.new(4.0000e+006, 2500, 4.0000e+006)
  165. script.Parent.Parent.Parent.PlayerGui.Start.PowerBar.PB.Size = UDim2.new(-1, 150, 0, 8)
  166. end
  167. end)
  168. end)
  169.  
  170. script.Parent.Selected:connect(function(m)
  171. m.KeyUp:connect(function(key)
  172. if key:lower() == "f" then
  173. if Go1.Value == 1 then return end
  174. Go1.Value = 1
  175. if script.Parent.Parent.Parent.Character == nil then return end
  176. if script.Parent.Parent.Parent.Character:findFirstChild("Torso") == nil then return end
  177. if script.Parent.Parent.Parent.Character:findFirstChild("Right Leg") == nil then return end
  178. Kick = true
  179. LH = script.Parent.Parent.Parent.Character.Torso["Left Hip"]
  180. RH = script.Parent.Parent.Parent.Character.Torso["Right Hip"]
  181. LH.MaxVelocity = "0.1"
  182. RH.MaxVelocity = "0.1"
  183. script.Parent.Parent.Parent.Character.Torso.Friction = "1"
  184. UpdateWeldC0("W", RL, CFrame.new(0.5,-1.5,-1) * CFrame.fromEulerAnglesXYZ(math.pi/6,0,0))
  185. RL.Touched:connect(function(hit)
  186. if Kick == false then return end
  187. if hit.Locked == true or hit.Anchored == true then return end
  188. Kick = false
  189. F = Instance.new("BodyVelocity")
  190. F.Parent = hit
  191. OwnershipChange(hit)
  192. F.velocity = RL.CFrame.lookVector * script.Parent.Parent.Speed.Value
  193. F.maxForce = (script.Parent.Parent.Angle.Value)
  194. debris:AddItem(F,0.3)
  195. wait()
  196. AV = Instance.new("BodyForce")
  197. AV.Parent = hit
  198. AV.Force = (Torso.CFrame*CFrame.fromEulerAnglesXYZ(0,-math.pi/2,0)).lookVector*(100+script.Parent.Parent.Speed.Value)
  199. debris:AddItem(AV,2)
  200. end)
  201. wait(0.7)
  202. script.Parent.Parent.Parent.PlayerGui.Start.PowerBar.Visible = false
  203. script.Parent.Parent.Speed.Value = "0"
  204. script.Parent.Parent.Angle.Value = Vector3.new(4.0000e+006, 300, 4.0000e+006)
  205. Kick = false
  206. RemoveWeld("W", RL)
  207. HipUpdate(Hip, RL)
  208. wait(0.2)
  209. Go.Value = 0
  210. Go1.Value = 0
  211. end
  212. end)
  213. end)
  214.  
  215. function CreateWeld(name, parent, part0, part1)
  216. game:GetService("ReplicatedStorage").Events.CreateWeld:FireServer(name, parent, part0, part1)
  217. local W = Instance.new("Weld")
  218. W.Name = name
  219. W.Parent = parent
  220. W.Part0 = part0
  221. W.Part1 = part1
  222. end
  223. ---
  224. function UpdateWeldC0(weldname, parent, c0)
  225. game:GetService("ReplicatedStorage").Events.UpdateWeld:FireServer(weldname, parent, c0)
  226. parent:FindFirstChild(weldname).C0 = c0
  227. end
  228. ---
  229. function RemoveWeld(name, parent)
  230. game:GetService("ReplicatedStorage").Events.RemoveWeld:FireServer(name, parent)
  231. for _,v in pairs (parent:GetChildren()) do
  232. if v:IsA("Weld") and v.Name == name then
  233. v:remove()
  234. end
  235. end
  236. end
  237. ---
  238. function HipUpdate(hip, part1)
  239. game:GetService("ReplicatedStorage").Events.UpdateHips:FireServer(hip, part1)
  240. hip.Part1 = part1
  241. end
  242. ---
  243. function Anchor(part, anchor_option)
  244. game:GetService("ReplicatedStorage").Events.Anchor:FireServer(part, anchor_option)
  245. part.Anchored = anchor_option
  246. end
  247. ---
  248. function Platform(part, anchor2_option)
  249. game:GetService("ReplicatedStorage").Events.Platform:FireServer(part, anchor2_option)
  250. part.PlatformStand = anchor2_option
  251. end
  252. ---
  253. function CFrameTorso(torso1, cframe_value)
  254. game:GetService("ReplicatedStorage").Events.TorsoCFrame:FireServer(torso1, cframe_value)
  255. torso1.CFrame = cframe_value
  256. end
  257. ---
  258. function FE_Attach(name, part0, part1, ball, c0, c1)
  259. game:GetService("ReplicatedStorage").Events.Attach:FireServer(name, part0, part1, ball, c0, c1)
  260. local W = Instance.new("Weld")
  261. W.Name = "Keep"
  262. W.Part0 = part0
  263. W.Part1 = part1
  264. W.Parent = part0
  265. W.C0 = c0
  266. W.C1 = c1
  267. end
  268. ---
  269. function ballPosChange(ball, newPos)
  270. game:GetService("ReplicatedStorage").Events.BallPosChange:FireServer(ball, newPos)
  271. ball.Position = newPos
  272. end
  273. ---
  274. function OwnershipChange(ball)
  275. game:GetService("ReplicatedStorage").Events.NetworkOwnership:FireServer(ball)
  276. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement