Zueru1

mc lan novamente

Aug 18th, 2017
36
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.71 KB | None | 0 0
  1. wait(0.25)
  2. local q = nil
  3. local e = nil
  4. local a = nil
  5. local b = nil
  6. local ply = game.Players.LocalPlayer
  7. local char = ply.Character
  8. local mouse = ply:GetMouse()
  9. local bp = Instance.new("BodyPosition",char.Torso)
  10. local bg = Instance.new("BodyGyro",char.Torso)
  11. local bgdest = Vector3.new()
  12. local pfvalue = Instance.new("BoolValue",char)
  13. local gas = nil
  14. local numqe = 0
  15. local numq = 0
  16. local nume = 0
  17. local nums = 0
  18. local weightless = nil
  19. bg.maxTorque = Vector3.new(0,0,0)
  20. bp.maxForce = Vector3.new(0,0,0)
  21. bp.P = 1500
  22. mouse.KeyDown:connect(function(key)
  23. if key == "q" and not q and mouse.Target then
  24. if (mouse.Hit.p - char.Torso.Position).magnitude < 200 then
  25. pfvalue.Value = true
  26. a = mouse.Hit.p
  27. q = Instance.new("SelectionPointLasso",char)
  28. q.Color = BrickColor.new("Really black")
  29. q.Point = mouse.Hit.p
  30. q.Humanoid = char.Humanoid
  31. if char.Torso:FindFirstChild("Smoke") then
  32. game:GetService("Debris"):AddItem(char.Torso.Smoke,0)
  33. end
  34. if not weightless then
  35. weightless = Instance.new("BodyPosition",char.Head)
  36. weightless.maxForce = Vector3.new(0,10000,0)
  37. weightless.position = Vector3.new(0,1000,0)
  38. coroutine.resume(coroutine.create(function()
  39. local current = weightless
  40. wait(0.25)
  41. if current == weightless then
  42. weightless.maxForce = Vector3.new(0,5000,0)
  43. end
  44. end))
  45. end
  46. end
  47. elseif key == "e" and not e and mouse.Target then
  48. if (mouse.Hit.p - char.Torso.Position).magnitude < 200 then
  49. pfvalue.Value = true
  50. b = mouse.Hit.p
  51. e = Instance.new("SelectionPointLasso",char)
  52. e.Color = BrickColor.new("Really black")
  53. e.Point = mouse.Hit.p
  54. e.Humanoid = char.Humanoid
  55. if char.Torso:FindFirstChild("Smoke") then
  56. game:GetService("Debris"):AddItem(char.Torso.Smoke,0)
  57. end
  58. if not weightless then
  59. weightless = Instance.new("BodyPosition",char.Head)
  60. weightless.maxForce = Vector3.new(0,10000,0)
  61. weightless.position = Vector3.new(0,1000,0)
  62. coroutine.resume(coroutine.create(function()
  63. local current = weightless
  64. wait(0.25)
  65. if current == weightless then
  66. weightless.maxForce = Vector3.new(0,5000,0)
  67. end
  68. end))
  69. end
  70. end
  71. elseif key == " " and (q or e) then
  72. if q then
  73. game:GetService("Debris"):AddItem(q,0)
  74. end
  75. if e then
  76. game:GetService("Debris"):AddItem(e,0)
  77. end
  78. q,e = nil, nil
  79. bgdest = char.Torso.Position + (char.Torso.CFrame.lookVector * 125)
  80. gas = Instance.new("Smoke",char.Torso)
  81. gas.Size = 0.1
  82. gas.Opacity = 0.25
  83. if not weightless then
  84. weightless = Instance.new("BodyPosition",char.Head)
  85. weightless.maxForce = Vector3.new(0,10000,0)
  86. weightless.position = Vector3.new(0,1000,0)
  87. coroutine.resume(coroutine.create(function()
  88. local current = weightless
  89. wait(0.25)
  90. if current == weightless then
  91. weightless.maxForce = Vector3.new(0,5000,0)
  92. end
  93. end))
  94. end
  95. end
  96. end)
  97. mouse.KeyUp:connect(function(key)
  98. if key == "q" and q then
  99. if not e then
  100. pfvalue.Value = false
  101. end
  102. game:GetService("Debris"):AddItem(q,0)
  103. q = nil
  104. a = nil
  105. if weightless then
  106. game:GetService("Debris"):AddItem(weightless,0)
  107. weightless = nil
  108. end
  109. elseif key == "e" and e then
  110. if not q then
  111. pfvalue.Value = false
  112. end
  113. game:GetService("Debris"):AddItem(e,0)
  114. e = nil
  115. b = nil
  116. if weightless then
  117. game:GetService("Debris"):AddItem(weightless,0)
  118. weightless = nil
  119. end
  120. end
  121. end)
  122. pfvalue.Changed:connect(function()
  123. if pfvalue.Value == false then
  124. char.Humanoid.PlatformStand = false
  125. char["Left Leg"].CanCollide = false
  126. char["Right Leg"].CanCollide = false
  127. char["Left Arm"].CanCollide = false
  128. char["Right Arm"].CanCollide = false
  129. else
  130. char.Humanoid.PlatformStand = true
  131. char["Left Leg"].CanCollide = true
  132. char["Right Leg"].CanCollide = true
  133. char["Left Arm"].CanCollide = false
  134. char["Right Arm"].CanCollide = false
  135. end
  136. end)
  137. function grapple()
  138. wait()
  139. local pos = char.Torso.Position
  140. if q and e then
  141. local tab = {a.x,a.y,a.z,b.x,b.y,b.z}
  142. local x = {}
  143. numqe = numqe + 1
  144. local num = numqe
  145. for i = 1,3 do
  146. table.insert(x,(tab[i] + tab[i+3])/2)
  147. end
  148. bp.position = Vector3.new(unpack(x))
  149. bp.D = 10
  150. bp.maxForce = Vector3.new(4500 * (math.abs(pos.x-bgdest.x)/200) + 3000,4500 * (math.abs(pos.y-bgdest.y)/200) + 3000,4500 * (math.abs(pos.z-bgdest.z)/200) + 3000)
  151. wait(1)
  152. if num == numqe then
  153. bp.D = 0
  154. end
  155. elseif q then
  156. numq = numq + 1
  157. local num = numq
  158. bp.position = a
  159. bp.D = 10
  160. bp.maxForce = Vector3.new(4000 * (math.abs(pos.x-bgdest.x)/200) + 3000,4500 * (math.abs(pos.y-bgdest.y)/200) + 3000,4500 * (math.abs(pos.z-bgdest.z)/200) + 3000)
  161. bgdest = a
  162. bg.maxTorque = Vector3.new(5000,5000,5000)
  163. wait(1)
  164. if num == numq then
  165. bp.D = 0
  166. end
  167. elseif e then
  168. nume = nume + 1
  169. local num = nume
  170. bp.position = b
  171. bp.D = 10
  172. bp.maxForce = Vector3.new(4000 * (math.abs(pos.x-bgdest.x)/200) + 3000,4500 * (math.abs(pos.y-bgdest.y)/200) + 3000,4500 * (math.abs(pos.z-bgdest.z)/200) + 3000)
  173. bgdest = b
  174. bg.maxTorque = Vector3.new(5000,5000,5000)
  175. wait(1)
  176. if num == nume then
  177. bp.D = 0
  178. end
  179. elseif char.Torso:FindFirstChild("Smoke") then
  180. nums = nums + 1
  181. num = nums
  182. bp.position = bgdest
  183. bp.D = 10
  184. bp.maxForce = Vector3.new(4000 * (math.abs(pos.x-bgdest.x)/200) + 2000,4500 * (math.abs(pos.y-bgdest.y)/200) + 2000,4500 * (math.abs(pos.z-bgdest.z)/200) + 2000)
  185. bg.maxTorque = Vector3.new(6000,6000,6000)
  186. wait(1)
  187. if num == nums then
  188. bp.D = 0
  189. end
  190. else
  191. bp.maxForce = Vector3.new(0,0,0)
  192. bg.maxTorque = Vector3.new(0,0,0)
  193. end
  194. end
  195. mouse.KeyDown:connect(grapple)
  196. mouse.KeyUp:connect(grapple)
  197. while wait() do
  198. bg.cframe = CFrame.new(char.Torso.Position,bgdest)
  199. end
Add Comment
Please, Sign In to add comment