Advertisement
astronaut32

apple of eden

Nov 5th, 2016
214
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.58 KB | None | 0 0
  1. --Apple of Eden
  2.  
  3. plr = game:service'Players'.LocalPlayer
  4. plrgui = plr.PlayerGui
  5. char = plr.Character
  6. humanoid = char:findFirstChild("Humanoid")
  7. torso = char:findFirstChild("Torso")
  8. head = char:findFirstChild("Head")
  9. ra = char:findFirstChild("Right Arm")
  10. la = char:findFirstChild("Left Arm")
  11. rs = torso:findFirstChild("Right Shoulder")
  12. ls = torso:findFirstChild("Left Shoulder")
  13. neck = torso:findFirstChild("Neck")
  14. rj = char:findFirstChild("HumanoidRootPart"):findFirstChild("RootJoint")
  15. rootpart = char:findFirstChild("HumanoidRootPart")
  16. camera = workspace.CurrentCamera
  17.  
  18. RS = game:service'RunService'
  19.  
  20. local tool = Instance.new('HopperBin', plr.Backpack)
  21. tool.Name = 'Apple of Eden'
  22.  
  23. local rm = Instance.new("Weld")
  24. rm.C0 = CFrame.new(1.5, 0.5, 0)
  25. rm.C1 = CFrame.new(0, 0.5, 0)
  26. rm.Part0 = torso
  27. rm.Part1 = ra
  28. rm.Name = 'Right Shoulder'
  29.  
  30. local lm = Instance.new("Weld")
  31. lm.C0 = CFrame.new(-1.35, 0.45, 0)
  32. lm.C1 = CFrame.new(0, 0, 0)
  33. lm.Part0 = torso
  34. lm.Part1 = la
  35. lm.Name = "Left Shoulder"
  36.  
  37. rsc0 = rm.C0
  38. lsc0 = lm.C0
  39.  
  40. local Apple = Instance.new'Model'
  41. Apple.Name = 'Apple of Eden'
  42. local handle = Instance.new('Part', Apple)
  43. handle.Shape = 'Ball'
  44. handle.FormFactor = 'Custom'
  45. handle.CanCollide = false
  46. handle.LeftSurface = 10
  47. handle.RightSurface = 10
  48. handle.FrontSurface = 10
  49. handle.BackSurface = 10
  50. handle.TopSurface = 10
  51. handle.BottomSurface = 10
  52. handle.Material = 'SmoothPlastic'
  53. Instance.new('PointLight', handle).Color = Color3.new(1,1,0)
  54. handle.Size = Vector3.new(1,1,1)
  55. local HandleWeld = Instance.new('Weld', handle)
  56. HandleWeld.Part0 = handle
  57. HandleWeld.Part1 = ra
  58. HandleWeld.C0 = CFrame.Angles(math.pi/2, 0, 0)
  59. HandleWeld.C1 = CFrame.new(-.25, -1.2, -.25)
  60.  
  61. local ring = handle:clone()
  62. ring.Shape = 'Block'
  63. ring.PointLight:remove()
  64. ring.Parent = Apple
  65. ring.FormFactor = 'Custom'
  66. ring.BrickColor = BrickColor.new('New Yeller')
  67. ring.Size = Vector3.new(1.025,.2,1.025)
  68. Instance.new('CylinderMesh', ring).Scale = Vector3.new(.9975, .5, .9975)
  69. local wld = Instance.new('Weld', handle)
  70. wld.Part0 = ring
  71. wld.Part1 = handle
  72.  
  73. local ring = ring:clone()
  74. ring.Parent = Apple
  75. ring.Size = Vector3.new(1,.2,1)
  76. Instance.new('CylinderMesh', ring).Scale = Vector3.new(.85, .5, .85)
  77. local wld = Instance.new('Weld', handle)
  78. wld.Part0 = ring
  79. wld.Part1 = handle
  80. wld.C0 = CFrame.Angles(0, 0, math.pi/2)
  81. wld.C1 = CFrame.new(.225, .045, 0)
  82.  
  83. local ring = ring:clone()
  84. ring.Parent = Apple
  85. ring.Size = Vector3.new(1,.2,1)
  86. Instance.new('CylinderMesh', ring).Scale = Vector3.new(.85, .5, .85)
  87. local wld = Instance.new('Weld', handle)
  88. wld.Part0 = ring
  89. wld.Part1 = handle
  90. wld.C0 = CFrame.Angles(0, 0, math.pi/2)
  91. wld.C1 = CFrame.new(-.225, .045, 0)
  92.  
  93. local RadiusEffect = Instance.new('Part')
  94. RadiusEffect.FormFactor = 'Custom'
  95. RadiusEffect.Size = Vector3.new(0,0,0)
  96. RadiusEffect.Transparency = .99
  97. RadiusEffect.Anchored = true
  98. RadiusEffect.CanCollide = false
  99.  
  100. local surfacegui = Instance.new('SurfaceGui', RadiusEffect)
  101. surfacegui.Face = 'Top'
  102. local image = Instance.new('ImageLabel', surfacegui)
  103. image.Size = UDim2.new(1,0,1,0)
  104. image.Image = "rbxassetid://166139049"
  105. image.BackgroundTransparency = 1
  106.  
  107. radius = .1
  108.  
  109. tool.Selected:connect(function(mouse)
  110. rs.Parent = nil
  111. rm.Parent = torso
  112. Apple.Parent = char
  113. for angle = 0, 70, 10 do
  114. rm.C0 = rsc0 * CFrame.Angles(math.rad(angle), 0, -math.rad(angle)/4)
  115. RS.RenderStepped:wait()
  116. end
  117.  
  118. mouse.Button1Down:connect(function()
  119. if debounce then return end
  120. debounce = true
  121. for angle = 0, 70, 5 do
  122. rm.C0 = rsc0 * CFrame.Angles(math.rad(70) + math.rad(angle)*1.2, 0, math.rad(angle)/3+(-math.rad(70)/4))
  123. RS.RenderStepped:wait()
  124. end
  125. radius = .1
  126. RadiusEffect.Parent = char
  127. while debounce do
  128. wait(0)
  129. radius = radius + .25
  130. if radius >= 20 then
  131. for angle = 70, 0, -5 do
  132. rm.C0 = rsc0 * CFrame.Angles(math.rad(70) + math.rad(angle)*1.2, 0, math.rad(angle)/3+(-math.rad(70)/4))
  133. RS.RenderStepped:wait()
  134. end
  135. RadiusEffect.Parent = nil
  136. debounce = false
  137. wait()
  138. for i,v in pairs(game:service'Players':players()) do
  139. if v.Character and v.Character:findFirstChild'Humanoid' then
  140. if v.Character ~= char then
  141. v.Character:findFirstChild'Humanoid'.WalkSpeed = 16
  142. wait()
  143. if v.Character.Head and (head.Position - v.Character.Head.Position).magnitude <= radius and v.Character:findFirstChild'Humanoid' and v ~= plr then
  144. v.Character:FindFirstChild'Humanoid'.Health = v.Character:FindFirstChild'Humanoid'.Health - math.random(21,27)
  145. coroutine.wrap(function()
  146. v.Character:findFirstChild'Humanoid'.WalkSpeed = -16
  147. wait(10)
  148. v.Character:findFirstChild'Humanoid'.WalkSpeed = 16
  149. end)()
  150. end
  151. end
  152. end
  153. end
  154. wait(.5)
  155. humanoid.WalkSpeed = 16
  156. wait(4.5)
  157. humanoid.Health = humanoid.Health + 50
  158. break
  159. end
  160.  
  161. RadiusEffect.Size = Vector3.new(radius,0,radius)
  162. RadiusEffect.CFrame = rootpart.CFrame * CFrame.new(0, -3, 0)
  163. for i,v in pairs(game:service'Players':players()) do
  164. if v.Character and v.Character:findFirstChild'Humanoid' then
  165. v.Character:findFirstChild'Humanoid'.WalkSpeed = 6
  166. end
  167. if v.Character and v.Character.Head and (head.Position - v.Character.Head.Position).magnitude <= radius and v.Character:findFirstChild'Humanoid' and v ~= plr then
  168. v.Character:FindFirstChild'Humanoid'.Health = v.Character:FindFirstChild'Humanoid'.Health - .45
  169. end
  170. end
  171. humanoid.Health = humanoid.Health - 1.25
  172. end
  173. end)
  174. mouse.Button1Up:connect(function()
  175. for angle = 70, 0, -5 do
  176. rm.C0 = rsc0 * CFrame.Angles(math.rad(70) + math.rad(angle)*1.2, 0, math.rad(angle)/3+(-math.rad(70)/4))
  177. RS.RenderStepped:wait()
  178. end
  179. RadiusEffect.Parent = nil
  180. debounce = false
  181. wait()
  182. for i,v in pairs(game:service'Players':players()) do
  183. if v.Character and v.Character:findFirstChild'Humanoid' then
  184. if v.Character ~= char then
  185. v.Character:findFirstChild'Humanoid'.WalkSpeed = 16
  186. wait()
  187. if v.Character.Head and (head.Position - v.Character.Head.Position).magnitude <= radius and v ~= plr then
  188. v.Character:FindFirstChild'Humanoid'.Health = v.Character:FindFirstChild'Humanoid'.Health - math.random(21,27)
  189. coroutine.wrap(function()
  190. v.Character:findFirstChild'Humanoid'.WalkSpeed = -16
  191. wait(10)
  192. v.Character:findFirstChild'Humanoid'.WalkSpeed = 16
  193. end)()
  194. end
  195. end
  196. end
  197. end
  198. wait(.5)
  199. humanoid.WalkSpeed = 16
  200. wait(4.5)
  201. humanoid.Health = humanoid.Health + 50
  202. end)
  203. end)
  204. tool.Deselected:connect(function()
  205. Apple.Parent = nil
  206. rm.Parent = nil
  207. rs.Parent = torso
  208. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement