AlphaSploit

Soul staff

Mar 3rd, 2018
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 15.94 KB | None | 0 0
  1. local player = game.Players.LocalPlayer
  2. local character = player.Character
  3.  
  4. if (player.Backpack:FindFirstChild("Soul Staff") ~= nil) then
  5. player.Backpack["Soul Staff"].Parent = nil
  6. end
  7. if (character:FindFirstChild("Soul_Staff") ~= nil) then
  8. character.Soul_Staff.Parent = nil
  9. end
  10.  
  11. local RightShoulder = character.Torso["Right Shoulder"]
  12. local ShoulderWeld = nil
  13. local StaffWeld = nil
  14.  
  15. local debounce = false
  16. local debounce2 = false
  17.  
  18. local mode = "hurt"
  19. local orbWeld = {}
  20. local keys = {}
  21.  
  22. local thrown = false
  23. local hold = false
  24. local holdTime = 0
  25.  
  26. local tool = Instance.new("HopperBin", player.Backpack)
  27. tool.Name = "Soul Staff"
  28. tool.Parent = player.Backpack
  29. local model = Instance.new("Model",character)
  30. model.Name = "Soul_Staff"
  31.  
  32. function animateArm(boolean, c0, c1)
  33. if (boolean) then
  34. if (ShoulderWeld == nil) then
  35. ShoulderWeld = weld(character["Torso"],character["Right Arm"],CFrame.new())
  36. end
  37. RightShoulder.Part0 = nil
  38.  
  39. ShoulderWeld.C0 = c0
  40. ShoulderWeld.C1 = c1
  41. else
  42. RightShoulder.Part0 = character.Torso
  43. if (ShoulderWeld ~= nil) then
  44. ShoulderWeld.Parent = nil
  45. end
  46. ShoulderWeld = nil
  47. end
  48. end
  49.  
  50. function animateStaff(boolean, c0, c1)
  51. if (boolean) then
  52. StaffWeld.Part0 = character["Right Arm"]
  53. StaffWeld.Part1 = model:FindFirstChild("Handle")
  54. StaffWeld.C0 = c0
  55. StaffWeld.C1 = c1
  56. else
  57. StaffWeld.Part0 = character["Torso"]
  58. StaffWeld.Part1 = model:FindFirstChild("Handle")
  59. StaffWeld.C0 = CFrame.new(0,0,0.5)
  60. StaffWeld.C1 = CFrame.new()*CFrame.Angles(0, 0, math.pi/4)
  61. end
  62. end
  63.  
  64. function weld(p0, p1, cframe)
  65. local w = Instance.new("ManualWeld", p0)
  66. w.Part0 = p0
  67. w.Part1 = p1
  68. w.C0 = cframe
  69. return w
  70. end
  71.  
  72. function newPart(size, color, parent)
  73. local part = Instance.new("Part")
  74. part.Locked = true
  75. part.FormFactor = 3
  76. part.Size = size
  77. part.BrickColor = color
  78. part.BottomSurface = 0
  79. part.TopSurface = 0
  80. part.Anchored = false
  81. part.CanCollide = false
  82. part.Parent = parent
  83. return part
  84. end
  85.  
  86. function newCylMesh(parent)
  87. local mesh = Instance.new("CylinderMesh", parent)
  88. return parent
  89. end
  90.  
  91. function newSphereMesh(parent)
  92. local mesh = Instance.new("SpecialMesh",parent)
  93. mesh.MeshType = 3
  94. return parent
  95. end
  96.  
  97. function newIdMesh(id, size, parent)
  98. local mesh = Instance.new("SpecialMesh",parent)
  99. mesh.MeshType = 5
  100. mesh.Scale = size
  101. mesh.MeshId = "http://www.roblox.com/Asset/?id="..id
  102. return parent
  103. end
  104.  
  105. function addSoul(count)
  106. for i = 1, count do
  107. local p = newSphereMesh(newPart(Vector3.new(0.2,0.2,0.2),BrickColor.new(0,0,0),model))
  108. orbWeld[#orbWeld + 1] = weld(model:FindFirstChild("core"),p,CFrame.new(0,0,0))
  109. end
  110. end
  111.  
  112. function removeSoul(count)
  113. for i = 1, count do
  114. orbWeld[#orbWeld].Part1.Parent = nil
  115. orbWeld[#orbWeld] = nil
  116. end
  117. end
  118.  
  119. function getRadius(num)
  120. if (num < 16) then
  121. return 1
  122. else
  123. return num/16
  124. end
  125. end
  126.  
  127. local handle = newCylMesh(newPart(Vector3.new(0.2,6,0.2),BrickColor.new(1,1,1),model))
  128. handle.Name = "Handle"
  129.  
  130. weld(handle,newSphereMesh(newPart(Vector3.new(0.4,0.4,0.4),BrickColor.new(0,0,0),model)),CFrame.new(0,3,0))
  131. weld(handle,newCylMesh(newPart(Vector3.new(0.25,0.25,0.25),BrickColor.new(0,0,0),model)),CFrame.new(0,2.75,0))
  132. weld(handle,newIdMesh("3270017",Vector3.new(0.25,0.25,0.5),newPart(Vector3.new(0.2,0.2,0.2),BrickColor.new(1,1,1),model)),CFrame.new(0,2.85,0)*CFrame.Angles(math.pi/2,0,0))
  133. weld(handle,newIdMesh("3270017",Vector3.new(0.22,0.22,0.5),newPart(Vector3.new(0.2,0.2,0.2),BrickColor.new(1,1,1),model)),CFrame.new(0,2.6,0)*CFrame.Angles(math.pi/2,0,0))
  134. weld(handle,newSphereMesh(newPart(Vector3.new(0.4,0.4,0.4),BrickColor.new(0,0,0),model)),CFrame.new(0,-3,0))
  135. weld(handle,newCylMesh(newPart(Vector3.new(0.25,0.25,0.25),BrickColor.new(0,0,0),model)),CFrame.new(0,-2.75,0))
  136. weld(handle,newIdMesh("3270017",Vector3.new(0.25,0.25,0.5),newPart(Vector3.new(0.2,0.2,0.2),BrickColor.new(1,1,1),model)),CFrame.new(0,-2.85,0)*CFrame.Angles(math.pi/2,0,0))
  137. weld(handle,newIdMesh("3270017",Vector3.new(0.22,0.22,0.5),newPart(Vector3.new(0.2,0.2,0.2),BrickColor.new(1,1,1),model)),CFrame.new(0,-2.6,0)*CFrame.Angles(math.pi/2,0,0))
  138. weld(handle,newIdMesh("3270017",Vector3.new(0.25,0.25,0.5),newPart(Vector3.new(0.2,0.2,0.2),BrickColor.new(1,1,1),model)),CFrame.new(0,0.5,0)*CFrame.Angles(math.pi/2,0,0))
  139. weld(handle,newIdMesh("3270017",Vector3.new(0.25,0.25,0.5),newPart(Vector3.new(0.2,0.2,0.2),BrickColor.new(1,1,1),model)),CFrame.new(0,-0.5,0)*CFrame.Angles(math.pi/2,0,0))
  140. weld(handle,newIdMesh("3270017",Vector3.new(0.21,0.21,1),newPart(Vector3.new(0.2,0.2,0.2),BrickColor.new(0,0,0),model)),CFrame.new(0,-0.4,0)*CFrame.Angles(math.pi/2,0,0))
  141. weld(handle,newIdMesh("3270017",Vector3.new(0.21,0.21,1),newPart(Vector3.new(0.2,0.2,0.2),BrickColor.new(0,0,0),model)),CFrame.new(0,-0.3,0)*CFrame.Angles(math.pi/2,0,0))
  142. weld(handle,newIdMesh("3270017",Vector3.new(0.21,0.21,1),newPart(Vector3.new(0.2,0.2,0.2),BrickColor.new(0,0,0),model)),CFrame.new(0,-0.2,0)*CFrame.Angles(math.pi/2,0,0))
  143. weld(handle,newIdMesh("3270017",Vector3.new(0.21,0.21,1),newPart(Vector3.new(0.2,0.2,0.2),BrickColor.new(0,0,0),model)),CFrame.new(0,-0.1,0)*CFrame.Angles(math.pi/2,0,0))
  144. weld(handle,newIdMesh("3270017",Vector3.new(0.21,0.21,1),newPart(Vector3.new(0.2,0.2,0.2),BrickColor.new(0,0,0),model)),CFrame.new(0,0.0,0)*CFrame.Angles(math.pi/2,0,0))
  145. weld(handle,newIdMesh("3270017",Vector3.new(0.21,0.21,1),newPart(Vector3.new(0.2,0.2,0.2),BrickColor.new(0,0,0),model)),CFrame.new(0,0.1,0)*CFrame.Angles(math.pi/2,0,0))
  146. weld(handle,newIdMesh("3270017",Vector3.new(0.21,0.21,1),newPart(Vector3.new(0.2,0.2,0.2),BrickColor.new(0,0,0),model)),CFrame.new(0,0.2,0)*CFrame.Angles(math.pi/2,0,0))
  147. weld(handle,newIdMesh("3270017",Vector3.new(0.21,0.21,1),newPart(Vector3.new(0.2,0.2,0.2),BrickColor.new(0,0,0),model)),CFrame.new(0,0.3,0)*CFrame.Angles(math.pi/2,0,0))
  148. weld(handle,newIdMesh("3270017",Vector3.new(0.21,0.21,1),newPart(Vector3.new(0.2,0.2,0.2),BrickColor.new(0,0,0),model)),CFrame.new(0,0.4,0)*CFrame.Angles(math.pi/2,0,0))
  149.  
  150. local core = newPart(Vector3.new(0.2,0.2,0.2),BrickColor.new(0,0,0),model)
  151. core.Name = "core"
  152. core.Reflectance = 0.5
  153. core.Transparency = 0.25
  154. local coreWeld = weld(handle,newIdMesh("9756362",Vector3.new(0.5,0.5,0.5),core),CFrame.new(0,3.75,0))
  155. Instance.new("PointLight",core)
  156.  
  157. addSoul(8)
  158.  
  159. StaffWeld = weld(character["Torso"],handle,CFrame.new())
  160. animateArm(false, nil, nil)
  161. animateStaff(false, nil, nil)
  162.  
  163. function damage(char)
  164. if (char == nil) then return end
  165. if (char:FindFirstChild("Humanoid") ~= nil) then
  166. if (not char.Humanoid:isA("Humanoid")) then
  167. char.Parent = nil
  168. return
  169. end
  170. local humanoid = char.Humanoid
  171. if (humanoid.Health > 0 and humanoid.Health - (#orbWeld+1) <= 0) then
  172. --addSoul(1)
  173. end
  174. if (char:FindFirstChild("Bubble") ~= nil) then
  175. coroutine.resume(coroutine.create(function()
  176. if (humanoid ~= nil) then
  177. humanoid.WalkSpeed = -16
  178. end
  179. wait(5)
  180. if (humanoid ~= nil) then
  181. humanoid.WalkSpeed = 16
  182. end
  183. end))
  184. humanoid.PlatformStand = false
  185. char.Bubble.Parent = nil
  186. --addSoul(1)
  187. end
  188. humanoid.Health = humanoid.Health - (#orbWeld+1)
  189. end
  190. end
  191.  
  192. function damageDistance(char, distance)
  193. if (char == nil) then return end
  194. if (char:FindFirstChild("Torso") ~= nil) then
  195. local torso = char.Torso
  196. if ((core.Position - torso.Position).magnitude <= distance) then
  197. damage(char)
  198. end
  199. end
  200. end
  201.  
  202. function beam(start, position)
  203. coroutine.resume(coroutine.create(function()
  204. if (position == nil or start == nil) then return end
  205. local distance = (start-position).magnitude
  206. local p = newPart(Vector3.new(0.2,0.2,distance),BrickColor.new(0,0,0),model)
  207. p.Name = "beam012"
  208. p.Anchored = true
  209. p.Transparency = 0.25
  210. p.CFrame = CFrame.new((start + position)/2,start)
  211. for i = 0, 0.75, 0.1 do
  212. p.Transparency = 0.25+i
  213. wait(0.01)
  214. end
  215. p.Parent = nil
  216. end))
  217. end
  218.  
  219. tool.Selected:connect(function(mouse)
  220. if (not throw) then
  221. animateArm(true, CFrame.new(1.5,0.5,0), CFrame.new(0,0.5,0)*CFrame.Angles(-math.pi/2, 0, 0))
  222. animateStaff(true, CFrame.new(0,-1,0)*CFrame.Angles(math.pi + math.pi/2,0,0), CFrame.new())
  223. end
  224.  
  225. mouse.Button1Down:connect(function()
  226. local hit = mouse.Hit
  227. if (debounce) then
  228. return
  229. end
  230. debounce = true
  231. if (mode == "hurt") then
  232. beam(core.Position, hit.p)
  233. if (mouse.Target ~= nil) then
  234. if (mouse.Target.Name == "box") then
  235. mouse.Target.Parent = nil
  236. else
  237. damage(mouse.Target.Parent)
  238. end
  239. end
  240. elseif (mode == "throw") then
  241. animateArm(false, nil, nil)
  242. StaffWeld.Part0 = nil
  243. if (handle:FindFirstChild("BodyPosition") ~= nil) then
  244. handle:FindFirstChild("BodyPosition").Parent = nil
  245. end
  246. if (handle:FindFirstChild("BodyGyro") ~= nil) then
  247. handle:FindFirstChild("BodyGyro").Parent = nil
  248. end
  249. local bp = Instance.new("BodyPosition",handle)
  250. bp.maxForce = Vector3.new(100000,100000,100000)
  251. bp.position = handle.Position + Vector3.new(0,30,0)
  252. local bg = Instance.new("BodyGyro",handle)
  253. bg.cframe = CFrame.new(bp.position,hit.p)*CFrame.Angles(math.pi/2,0,0)
  254. wait(1)
  255. bp.position = hit.p + Vector3.new(0,2,0)
  256. wait(0.3)
  257. bg.cframe = CFrame.new(bp.position,hit.p)*CFrame.Angles(math.pi/2,0,0)
  258. throw = true
  259. elseif (mode == "build") then
  260. beam(core.Position, hit.p)
  261. local p = newPart(Vector3.new(4,4,4),BrickColor.new(0,0,0),Workspace)
  262. p.Name = "box"
  263. p.Anchored = true
  264. p.CanCollide = true
  265. p.Transparency = 0.5
  266. p.CFrame = hit*CFrame.Angles(math.random(0,math.pi*2),math.random(0,math.pi*2),math.random(0,math.pi*2))
  267. Instance.new("PointLight",p)
  268. elseif (mode == "bubble") then
  269. beam(core.Position, hit.p)
  270. if (#orbWeld > 0) then
  271. if (mouse.Target.Parent:FindFirstChild("Humanoid") ~= nil) then
  272. local humanoid = mouse.Target.Parent.Humanoid
  273. if (mouse.Target.Parent:FindFirstChild("Bubble") == nil) then
  274. if (mouse.Target.Parent:FindFirstChild("Torso") ~= nil) then
  275. local torso = mouse.Target.Parent.Torso
  276. local part = newPart(Vector3.new(8,8,8),BrickColor.new(0,0,0),mouse.Target.Parent)
  277. part.Name = "Bubble"
  278. part.Anchored = false
  279. part.CanCollide = true
  280. part.Shape = 0
  281. part.Transparency = 0.5
  282. part.CFrame = torso.CFrame
  283. Instance.new("PointLight",part)
  284. weld(torso,part,CFrame.new())
  285. humanoid.PlatformStand = true
  286. -- removeSoul(1)
  287. end
  288. else
  289. coroutine.resume(coroutine.create(function()
  290. if (humanoid ~= nil) then
  291. humanoid.WalkSpeed = -16
  292. end
  293. wait(5)
  294. if (humanoid ~= nil) then
  295. humanoid.WalkSpeed = 16
  296. end
  297. end))
  298. humanoid.PlatformStand = false
  299. mouse.Target.Parent.Bubble.Parent = nil
  300. --addSoul(1)
  301. end
  302. end
  303. end
  304. elseif (mode == "beam") then
  305. if (not hold and not throw) then
  306. animateStaff(true, CFrame.new(0,-1,0)*CFrame.Angles(math.pi,0,0), CFrame.new())
  307. hold = true
  308. holdTime = 0
  309. end
  310. elseif (mode == "portal") then
  311. handle.Anchored = true
  312. local p = newCylMesh(newPart(Vector3.new(1,0.25,1),BrickColor.new(0,0,0),model))
  313. p.Anchored = true
  314. p.CFrame = CFrame.new(handle.Position) + Vector3.new(0,-2,0)
  315. local c = p.CFrame
  316. for i=1,15,0.5 do
  317. p.Size = p.Size+Vector3.new(0.5,0,0.5)
  318. p.CFrame = c
  319. wait(0.01)
  320. end
  321. local p1 = newCylMesh(newPart(Vector3.new(1,0.25,1),BrickColor.new(0,0,0),model))
  322. p1.Anchored = true
  323. p1.CFrame = CFrame.new(hit.p)
  324. p1.CFrame = CFrame.new(hit.p)
  325. local c1 = p1.CFrame
  326. handle.Anchored = false
  327. for i,v in ipairs(game.Workspace:getChildren()) do
  328. if (v:FindFirstChild("Torso") ~= nil) then
  329. if ((core.Position - v.Torso.Position).magnitude <= 8) then
  330. coroutine.resume(coroutine.create(function()
  331. v.Torso.CFrame = CFrame.new(Vector3.new(v.Torso.Position.x,p.Position.y+3,v.Torso.Position.z),v.Torso.CFrame.lookVector)
  332. v.Torso.Anchored = true
  333. for i=0, 10 do
  334. v.Torso.CFrame = v.Torso.CFrame+Vector3.new(0,-1,0)
  335. wait(0.1)
  336. end
  337. v.Torso.CFrame = CFrame.new(v.Torso.Position - (p.Position - p1.Position),v.Torso.CFrame.lookVector) + Vector3.new(0,4,0)
  338. for i=0, 10 do
  339. v.Torso.CFrame = v.Torso.CFrame+Vector3.new(0,1,0)
  340. wait(0.1)
  341. end
  342. v.Torso.Anchored = false
  343. end))
  344. end
  345. end
  346. end
  347. for i=1,15,0.5 do
  348. p.Size = p.Size+Vector3.new(-0.5,0,-0.5)
  349. p1.Size = p1.Size+Vector3.new(0.5,0,0.5)
  350. p.CFrame = c
  351. p1.CFrame = c1
  352. wait(0.01)
  353. end
  354. p.Parent = nil
  355. wait(1)
  356. for i=1,15,1 do
  357. p1.Size = p1.Size+Vector3.new(-1,0,-1)
  358. p1.CFrame = c1
  359. wait(0.01)
  360. end
  361. p1.Parent = nil
  362. end
  363. debounce = false
  364. end)
  365.  
  366. mouse.Button1Up:connect(function()
  367. if (debounce2) then
  368. return
  369. end
  370. debounce2 = true
  371. if (mode == "beam") then
  372. if (hold and holdTime >= 10) then
  373. if (#orbWeld > 0) then
  374. local p = newSphereMesh(newPart(Vector3.new(4,4,4),BrickColor.new(0,0,0),Workspace))
  375. p.Name = "1"
  376. p.Transparency = 0.5
  377. local point = core.CFrame*CFrame.Angles(math.pi/2, 0, 0)
  378. p.CFrame = CFrame.new(core.Position + point.lookVector*4,core.Position)
  379. Instance.new("PointLight",p)
  380.  
  381. local bs = Instance.new("BodyVelocity",p)
  382. bs.velocity = point.lookVector*(2*holdTime)+Vector3.new(0,0.25,0)
  383. bs.maxForce = Vector3.new(100000,100000,100000)
  384.  
  385. p.Touched:connect(function(part)
  386. if (part.Name ~= "beam012") then
  387. if (p.Name == "3") then
  388. p.Parent = nil
  389. elseif (p.Name == "2") then
  390. p.Name = "3"
  391. elseif (p.Name == "1") then
  392. p.Name = "2"
  393. end
  394. part.Parent = nil
  395. end
  396. end)
  397.  
  398. coroutine.resume(coroutine.create(function()
  399. for i = 1, 5, 0.01 do
  400. if (p.Parent ~= nil) then
  401. beam(p.Position, p.Position+Vector3.new(math.random(-5,5),math.random(-5,5),math.random(-5,5)))
  402. end
  403. wait(0.01)
  404. end
  405. p.Parent = nil
  406. end))
  407.  
  408. wait(1)
  409. --removeSoul(2)
  410. end
  411. end
  412. hold = false
  413. holdTime = 0
  414. animateStaff(true, CFrame.new(0,-1,0)*CFrame.Angles(math.pi + math.pi/2,0,0), CFrame.new())
  415. end
  416. debounce2 = false
  417. end)
  418.  
  419. mouse.KeyDown:connect(function (key)
  420. keys[key] = true
  421. if (keys["z"]) then
  422. mode = "hurt"
  423. elseif (keys["x"]) then
  424. mode = "bubble"
  425. elseif (keys["q"]) then
  426. mode = "beam"
  427. elseif (keys["c"]) then
  428. mode = "drain"
  429. elseif (keys["v"]) then
  430. mode = "build"
  431. elseif (keys["e"]) then
  432. if (mode ~= "throw") then
  433. mode = "throw"
  434. else
  435. if (debounce) then return end
  436. debounce = true
  437. if (throw) then
  438. handle:FindFirstChild("BodyPosition").Parent = nil
  439. handle:FindFirstChild("BodyGyro").Parent = nil
  440. throw = false
  441. animateArm(true, CFrame.new(1.5,0.5,0), CFrame.new(0,0.5,0)*CFrame.Angles(-math.pi/2, 0, 0))
  442. animateStaff(true, CFrame.new(0,-1,0)*CFrame.Angles(math.pi + math.pi/2,0,0), CFrame.new())
  443. end
  444. debounce = false
  445. end
  446. elseif (keys["b"]) then
  447. if (debounce) then return end
  448. debounce = true
  449. if (throw) then
  450. local p = newCylMesh(newPart(Vector3.new(1,0.25,1),BrickColor.new(0,0,0),model))
  451. p.Anchored = true
  452. p.CFrame = CFrame.new(handle.Position) + Vector3.new(0,-2,0)
  453. local c = p.CFrame
  454. for i=1,30,0.5 do
  455. p.Size = p.Size+Vector3.new(0.5,0,0.5)
  456. p.CFrame = c
  457. wait(0.01)
  458. end
  459. for i,v in ipairs(game.Workspace:getChildren()) do
  460. if (v:FindFirstChild("Torso") ~= nil) then
  461. if ((core.Position - v.Torso.Position).magnitude <= 15) then
  462. coroutine.resume(coroutine.create(function()
  463. v.Torso.CFrame = CFrame.new(Vector3.new(v.Torso.Position.x,p.Position.y+3,v.Torso.Position.z),v.Torso.CFrame.lookVector)
  464. v.Torso.Anchored = true
  465. for i=0, 10 do
  466. v.Torso.CFrame = v.Torso.CFrame+Vector3.new(0,-1,0)
  467. wait(0.1)
  468. end
  469. v:BreakJoints()
  470. end))
  471. end
  472. end
  473. end
  474. for i=1,30,1 do
  475. p.Size = p.Size+Vector3.new(-1,0,-1)
  476. p.CFrame = c
  477. wait(0.01)
  478. end
  479. p.Parent = nil
  480. end
  481. debounce = false
  482. elseif (keys["f"]) then
  483. mode = "portal"
  484. end
  485. end)
  486. mouse.KeyUp:connect(function (key) keys[key] = false end)
  487. end)
  488.  
  489. tool.Deselected:connect(function()
  490. hold = false
  491. holdTime = 0
  492. if (not throw) then
  493. animateArm(false, nil, nil)
  494. animateStaff(false, nil, nil)
  495. end
  496. end)
  497.  
  498. local y = 0
  499. local x = 0
  500. game:getService("RunService").Stepped:connect(function()
  501. if (hold) then
  502. holdTime = holdTime+0.5
  503. if(holdTime >= 10) then
  504. beam(core.Position, core.Position+Vector3.new(math.random(-5,5),math.random(-5,5),math.random(-5,5)))
  505. end
  506. end
  507.  
  508. if (mode == "drain") then
  509. for q,v in pairs(Workspace:getChildren()) do
  510. if (v ~= character and math.random(1,10) == 1) then
  511. damageDistance(v, 10)
  512. end
  513. end
  514. beam(core.Position, core.Position+Vector3.new(math.random(-5,5),math.random(-5,5),math.random(-5,5)))
  515. end
  516.  
  517. coreWeld.C0 = CFrame.new(0,3.75,0)+Vector3.new(0,math.sin(y)/4,0)
  518.  
  519. for i,v in ipairs(orbWeld) do
  520. local radius = getRadius(#orbWeld)
  521.  
  522. local index = x + ((math.pi*2)/#orbWeld)*(i-1)
  523.  
  524. orbWeld[i].C0 = CFrame.new(radius*math.sin(index), 0, radius*math.cos(index))
  525. end
  526.  
  527. if (y < math.pi*2) then
  528. y = y + math.pi*2/128
  529. else
  530. y = math.pi*2/128
  531. end
  532.  
  533. if (x < math.pi*2) then
  534. x = x + math.pi*2/128
  535. else
  536. x = math.pi*2/128
  537. end
  538. end)
Add Comment
Please, Sign In to add comment