Advertisement
metilol

Untitled

May 5th, 2018
165
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.05 KB | None | 0 0
  1. while true do
  2. wait(100)
  3. local p = game.Players.LocalPlayer
  4. player = p
  5. local char = p.Character
  6. local mouse = p:GetMouse()
  7. local larm = char["Left Arm"]
  8. local rarm = char["Right Arm"]
  9. local lleg = char["Left Leg"]
  10. local rleg = char["Right Leg"]
  11. local hed = char.Head
  12. local torso = char.Torso
  13. local hum = char.Humanoid
  14. local cam = game.Workspace.CurrentCamera
  15. local root = char.HumanoidRootPart
  16. local deb = false
  17. local shot = 0
  18. local rs = game:GetService("RunService").RenderStepped
  19. local stanceToggle = "Landed"
  20. local animpose = "Landed"
  21. local lastanimpose = "Landed"
  22. math.randomseed(os.time())
  23.  
  24. for i, v in pairs(char:children()) do
  25. if v:IsA("Hat") then
  26. v:Destroy()
  27. end
  28. end
  29.  
  30. Debounces = {
  31. CanAttack = true,
  32. CanJoke = true,
  33. on = false,
  34. NoIdl = false,
  35. Slashing = false,
  36. Slashed = false,
  37. Reaping = false,
  38. Reaped = false,
  39. Invisible = false
  40. }
  41. local Touche = {
  42. char.Name
  43. }
  44. function Magik()
  45. Spawn(function()
  46. if Debounces.Invisible == false then
  47. local lerp = function(a, b, c)
  48. return a + (b - a) * c
  49. end
  50. local rndRange = function(rng)
  51. return math.random(-rng * 1000, rng * 1000) / 1000
  52. end
  53. local magik = Instance.new("Part", larm)
  54. local Colors = {
  55. "Really red",
  56. "Really black"
  57. }
  58. magik.Anchored = true
  59. magik.Locked = true
  60. magik.FormFactor = "Custom"
  61. magik.Size = Vector3.new(1.2, 1.2, 1.2)
  62. magik.TopSurface = "Smooth"
  63. magik.Transparency = 0
  64. magik.BottomSurface = "Smooth"
  65. magik.CanCollide = false
  66. magik.BrickColor = BrickColor.new(Colors[math.random(1, #Colors)])
  67. local mr = math.rad
  68. local rnx, rny, rnz = mr(rndRange(180)), mr(rndRange(180)), mr(rndRange(180))
  69. local cf = larm.CFrame * CFrame.new(0, -0.8, 0) * CFrame.Angles(rnx, rny, rnz)
  70. magik.CFrame = cf
  71. for i = 0, 1, 0.05 do
  72. local newTrans = lerp(0.5, 1, i)
  73. local ns = lerp(1, 1.2, i)
  74. magik.Transparency = newTrans
  75. magik.Size = Vector3.new(ns, ns, ns)
  76. magik.CFrame = cf
  77. rs:wait()
  78. end
  79. magik:Destroy()
  80. elseif Debounces.Invisible == true then
  81. wait()
  82. end
  83. end)
  84. end
  85. function Orb()
  86. local Head = char.Head
  87. local DistanceAway = 4
  88. local Speed = 2.4
  89. local YNum = 0
  90. local MaxY = 0.5
  91. local MinY = -0.5
  92. local Up = true
  93. local Colours = {
  94. {
  95. X = 0.1,
  96. Y = 0,
  97. Z = 0
  98. },
  99. {
  100. X = 0.6,
  101. Y = 0,
  102. Z = 0
  103. }
  104. }
  105. function Run(Func)
  106. local Ok, Err = coroutine.resume(coroutine.create(Func))
  107. if not Ok then
  108. print(Err)
  109. end
  110. end
  111. local Part = Instance.new("Part")
  112. Part.BrickColor = BrickColor.new("Really black")
  113. Part.FormFactor = "Custom"
  114. Part.Size = Vector3.new(1, 1, 1)
  115. Part.Archivable = true
  116. Part.CanCollide = false
  117. Part.Locked = true
  118. Part.Position = Head.Position
  119. Part.Anchored = true
  120. Part.Name = "Orb"
  121. Part.TopSurface = "Smooth"
  122. Part.BottomSurface = "Smooth"
  123. Part.Parent = char
  124. local Mesh = Instance.new("SpecialMesh", Part)
  125. Mesh.MeshId = "rbxassetid://1185246"
  126. Mesh.TextureId = "rbxassetid://230806497"
  127. Mesh.Scale = Part.Size * 1.5
  128. Mesh.VertexColor = Vector3.new(0, 0, 0)
  129. local Emitter = Instance.new("ParticleEmitter", Part)
  130. local color1 = Color3.new(1, 0, 0)
  131. local color2 = Color3.new(0, 0, 0)
  132. Emitter.Color = ColorSequence.new(color1, color2)
  133. Emitter.Size = NumberSequence.new(0.8)
  134. Emitter.Texture = "rbxassetid://243098098"
  135. Emitter.Lifetime = NumberRange.new(1)
  136. Emitter.Rate = 200
  137. Emitter.Rotation = NumberRange.new(720)
  138. Emitter.RotSpeed = NumberRange.new(140)
  139. Emitter.Speed = NumberRange.new(0)
  140. Run(function()
  141. local ColorNum = 2
  142. local Iter = 2
  143. local CurrentX = 0
  144. local CurrentY = 0
  145. local CurrentZ = 0
  146. for i = 1, math.huge / 0.05 do
  147. if Part.Parent ~= nil then
  148. local PrevColTab = Colours[ColorNum - 1] or Colours[#Colours]
  149. local ColTab = Colours[ColorNum]
  150. if tostring(CurrentX) ~= tostring(ColTab.X) then
  151. CurrentX = 0 < ColTab.X - PrevColTab.X and CurrentX + 0.01 or Iter <= 1.01 and 0.2 or CurrentX - 0.01
  152. end
  153. if tostring(CurrentY) ~= tostring(ColTab.Y) then
  154. CurrentY = 0 < ColTab.Y - PrevColTab.Y and CurrentY + 0.01 or Iter <= 1.01 and 0 or CurrentY - 0.01
  155. end
  156. if tostring(CurrentZ) ~= tostring(ColTab.Z) then
  157. CurrentZ = 0 < ColTab.Z - PrevColTab.Z and CurrentZ + 0.01 or Iter <= 1.01 and 0 or CurrentZ - 0.01
  158. end
  159. Mesh.VertexColor = Vector3.new(CurrentX, CurrentY, CurrentZ)
  160. if Iter < 1.01 or Iter > 2 then
  161. ColorNum = ColorNum == #Colours and 1 or ColorNum + 1
  162. Iter = 2
  163. else
  164. Iter = Iter - 0.01
  165. end
  166. game:GetService("RunService").RenderStepped:wait()
  167. else
  168. break
  169. end
  170. end
  171. end)
  172. Run(function()
  173. game:GetService("RunService").RenderStepped:connect(function()
  174. if char:findFirstChild("Torso") then
  175. local TorCF = char.Torso.CFrame
  176. local currentPos = Part.CFrame.p
  177. local X = math.sin(math.rad(360) + time() / Speed) * DistanceAway
  178. local Z = math.cos(math.rad(360) + time() / Speed) * DistanceAway / 2
  179. local Y = 0.002
  180. if YNum > MaxY then
  181. Up = false
  182. elseif YNum < MinY then
  183. Up = true
  184. end
  185. if Up == false then
  186. Y = -Y
  187. end
  188. YNum = YNum + Y
  189. local endPos = (TorCF * CFrame.new(X, 0, Z)).p
  190. local movePos = (endPos - currentPos) * 0.25
  191. currentPos = currentPos + movePos
  192. Part.CFrame = CFrame.new(currentPos + Vector3.new(0, YNum, 0), TorCF.p)
  193. end
  194. end)
  195. end)
  196. end
  197. Orb()
  198. function Singularity()
  199. pt = Instance.new("Part")
  200. pt.Parent = char
  201. pt.Name = "Singularity"
  202. pt.BrickColor = BrickColor.new("Really black")
  203. pt.Size = Vector3.new(1.8, 1, 1.8)
  204. ptmesh = Instance.new("CylinderMesh", pt)
  205. ptmesh.Scale = Vector3.new(1.8, 0.1, 1.8)
  206. ptweld = Instance.new("Weld", pt)
  207. ptweld.Part0 = larm
  208. ptweld.Part1 = pt
  209. ptweld.C0 = CFrame.new(0, -1, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0))
  210. ptweld.C1 = CFrame.new(0, 0, 0)
  211. local childList = {}
  212. local childSize = {}
  213. local massConstant = 1
  214. mass = 24000 * massConstant
  215. function cross(v1, v2)
  216. return Vector3.new(v1.y * v2.z - v2.y * v1.z, v1.z * v2.x - v1.x * v2.z, v1.x * v2.y - v2.x * v1.y)
  217. end
  218. local min = 0
  219. local max = 4
  220. while true do
  221. repeat
  222. wait()
  223. local n = 0
  224. while true do
  225. if n % 800 == 0 then
  226. wait()
  227. end
  228. n = n + 1
  229. local child = childList[n]
  230. if child ~= pt and child.Parent ~= char and child.Parent ~= char.Wings and child.Parent ~= char.Scythe and child.className == "Part" and child.Anchored == false then
  231. local relPos = pt.Position - child.Position
  232. if relPos.magnitude * 240 * massConstant < mass then
  233. child.RotVelocity = cross(child.CFrame.lookVector, relPos) * 20 / relPos.magnitude
  234. local canContinue = true
  235. if relPos.magnitude * 320 * massConstant < mass then
  236. local length = mass / (320 * relPos.magnitude * massConstant)
  237. if childSize[n].z * length > relPos.magnitude * 2 then
  238. mass = mass + child:GetMass()
  239. child:Remove()
  240. table.remove(childList, n)
  241. table.remove(childSize, n)
  242. canContinue = true
  243. n = n - 1
  244. else
  245. child.CanCollide = true
  246. end
  247. end
  248. motivator = child:FindFirstChild("Singularity")
  249. motivator = Instance.new("BodyPosition")
  250. motivator.Parent = child
  251. motivator.Name = "Singularity"
  252. motivator.position = pt.Position
  253. motivator.maxForce = Vector3.new(1, 1, 1) * mass * child:GetMass() / (relPos.magnitude * massConstant)
  254. end
  255. end
  256. end
  257. until n < #childList
  258. end
  259. end
  260. magik()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement