Advertisement
Blueisim

Untitled

Sep 17th, 2016
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 24.70 KB | None | 0 0
  1. pl = "COOLBRAYDENNOOB"
  2. Player = Game:GetService("Players").LocalPlayer
  3. Character = Player.Character
  4. RightArm = Character["Right Arm"]
  5. RightShoulder = Character.Torso["Right Shoulder"]
  6. LeftArm = Character["Left Arm"]
  7. Torso = Character["Torso"]
  8. LeftLeg = Character["Left Leg"]
  9. RightLeg = Character["Right Leg"]
  10. Head = Character["Head"]
  11.  
  12. Workspace.COOLBRAYDENNOOB.Head.face.Texture = "http://www.roblox.com/asset/?id=17058440"
  13.  
  14. function CheckI(Item,Blacklist,Specific)
  15. for _,v in pairs(Item:children()) do
  16. if not Specific then
  17. if v:IsA(Blacklist) or v.Name:match(Blacklist) then
  18. v:Destroy()
  19. end
  20. else
  21. if v:IsA(Blacklist) or v.Name == Blacklist then
  22. v:Destroy()
  23. end
  24. end
  25. end
  26. end
  27.  
  28. CheckI(Character,"Hat")
  29. -------------------------------------
  30.  
  31. Part13 = Instance.new("Part", Character)
  32. Part13.TopSurface = 0
  33. Part13.BottomSurface = 0
  34. Part13.Transparency = 0
  35. Part13.FormFactor = "Custom"
  36. Part13.Size = Vector3.new(1, 1, 1)
  37. Part13.BrickColor = BrickColor.new("Really black")
  38. Part13.CanCollide = false
  39. Weld13 = Instance.new("Weld", Part13)
  40. Weld13.Part0 = Part13
  41. Weld13.Part1 = Head
  42. Weld13.C0 = CFrame.new(0, -0.8, 0)
  43. SHMesh = Instance.new("SpecialMesh")
  44. SHMesh.Parent = Part13
  45. SHMesh.Scale = Vector3.new(1, 1, 1)
  46. SHMesh.MeshId = "http://www.roblox.com/asset/?id=1028713"
  47. SHMesh.TextureId = "http://www.roblox.com/asset/?id=15726328"
  48.  
  49. Part135 = Instance.new("Part", Character)
  50. Part135.TopSurface = 0
  51. Part135.BottomSurface = 0
  52. Part135.Transparency = 1
  53. Part135.Reflectance = 0.8
  54. Part135.FormFactor = "Custom"
  55. Part135.Size = Vector3.new(1, 1, 1)
  56. Part135.BrickColor = BrickColor.new("White")
  57. Part135.CanCollide = false
  58. Weld13 = Instance.new("Weld", Part135)
  59. Weld13.Part0 = Part135
  60. Weld13.Part1 = Head
  61. Weld13.C0 = CFrame.new(0, -3, 0)
  62. SHMesh = Instance.new("SpecialMesh")
  63. SHMesh.Parent = Part135
  64. SHMesh.MeshType = "Sphere"
  65. x = Instance.new("PointLight",Part135)
  66. x.Range = 20
  67. x.Enabled = false
  68.  
  69.  
  70. Part = Instance.new("Part", Character)
  71. Part.TopSurface = 0
  72. Part.BottomSurface = 0
  73. Part.Transparency = 0
  74. Part.FormFactor = "Custom"
  75. Part.Size = Vector3.new(1, 2, 1)
  76. Part.BrickColor = BrickColor.new("Really black")
  77. Part.CanCollide = false
  78. Workspace.COOLBRAYDENNOOB["Right Leg"].Transparency = 1
  79. Weld = Instance.new("Weld", Part)
  80. Weld.Part0 = Part
  81. Weld.Part1 = RightLeg
  82. Weld.C0 = CFrame.new(0, 0, 0)
  83.  
  84. Part2 = Instance.new("Part", Character)
  85. Part2.TopSurface = 0
  86. Part2.BottomSurface = 0
  87. Part2.Transparency = 0
  88. Part2.FormFactor = "Custom"
  89. Part2.Size = Vector3.new(1, 2, 1)
  90. Part2.BrickColor = BrickColor.new("Really black")
  91. Part2.CanCollide = false
  92. Workspace.COOLBRAYDENNOOB["Left Leg"].Transparency = 1
  93. Weld2 = Instance.new("Weld", Part2)
  94. Weld2.Part0 = Part2
  95. Weld2.Part1 = LeftLeg
  96. Weld2.C0 = CFrame.new(0, 0, 0)
  97.  
  98. Part7 = Instance.new("Part", Character)
  99. Part7.TopSurface = 0
  100. Part7.BottomSurface = 0
  101. Part7.Transparency = 0
  102. Part7.FormFactor = "Custom"
  103. Part7.Size = Vector3.new(1, 1.7, 1)
  104. Part7.BrickColor = BrickColor.new("White")
  105. Part7.CanCollide = false
  106. Workspace.COOLBRAYDENNOOB["Right Arm"].Transparency = 1
  107. Weld7 = Instance.new("Weld", Part7)
  108. Weld7.Part0 = Part7
  109. Weld7.Part1 = RightArm
  110. Weld7.C0 = CFrame.new(0, 0.2, 0)
  111.  
  112. Part45 = Instance.new("Part", Character)
  113. Part45.TopSurface = 0
  114. Part45.BottomSurface = 0
  115. Part45.Transparency = 0
  116. Part45.FormFactor = "Custom"
  117. Part45.Size = Vector3.new(1.1, 1, 1.1)
  118. Part45.BrickColor = BrickColor.new("Really black")
  119. Part45.CanCollide = false
  120. Weld3 = Instance.new("Weld", Part45)
  121. Weld3.Part0 = Part45
  122. Weld3.Part1 = RightArm
  123. Weld3.C0 = CFrame.new(0, -0.5, 0)
  124.  
  125. Part8 = Instance.new("Part", Character)
  126. Part8.TopSurface = 0
  127. Part8.BottomSurface = 0
  128. Part8.Transparency = 0
  129. Part8.FormFactor = "Custom"
  130. Part8.Size = Vector3.new(1, 1.7, 1)
  131. Part8.BrickColor = BrickColor.new("White")
  132. Part8.CanCollide = false
  133. Workspace.COOLBRAYDENNOOB["Left Arm"].Transparency = 1
  134. Weld8 = Instance.new("Weld", Part8)
  135. Weld8.Part0 = Part8
  136. Weld8.Part1 = LeftArm
  137. Weld8.C0 = CFrame.new(0, 0.2, 0)
  138.  
  139. Part45 = Instance.new("Part", Character)
  140. Part45.TopSurface = 0
  141. Part45.BottomSurface = 0
  142. Part45.Transparency = 0
  143. Part45.FormFactor = "Custom"
  144. Part45.Size = Vector3.new(1.1, 1, 1.1)
  145. Part45.BrickColor = BrickColor.new("Really black")
  146. Part45.CanCollide = false
  147. Weld3 = Instance.new("Weld", Part45)
  148. Weld3.Part0 = Part45
  149. Weld3.Part1 = LeftArm
  150. Weld3.C0 = CFrame.new(0, -0.5, 0)
  151.  
  152. Part13 = Instance.new("Part", Character)
  153. Part13.TopSurface = 0
  154. Part13.BottomSurface = 0
  155. Part13.Transparency = 0
  156. Part13.FormFactor = "Custom"
  157. Part13.Size = Vector3.new(2, 2, 1)
  158. Part13.BrickColor = BrickColor.new("Really black")
  159. Part13.CanCollide = false
  160. Workspace.COOLBRAYDENNOOB["Torso"].Transparency = 1
  161. Weld13 = Instance.new("Weld", Part13)
  162. Weld13.Part0 = Part13
  163. Weld13.Part1 = Torso
  164. Weld13.C0 = CFrame.new(0, 0, 0)
  165.  
  166. Part123 = Instance.new("Part", Character)
  167. Part123.TopSurface = 0
  168. Part123.BottomSurface = 0
  169. Part123.Transparency = 0
  170. Part123.FormFactor = "Custom"
  171. Part123.Size = Vector3.new(1, 1, 1)
  172. Part123.BrickColor = BrickColor.new("White")
  173. Part123.CanCollide = false
  174. Weld13 = Instance.new("Weld", Part123)
  175. Weld13.Part0 = Part123
  176. Weld13.Part1 = Torso
  177. Weld13.C0 = CFrame.new(0, 0.5, -0.8)
  178. SHMesh = Instance.new("SpecialMesh")
  179. SHMesh.Parent = Part123
  180. SHMesh.Scale = Vector3.new(1.5, 1.5, 1.5)
  181. SHMesh.MeshId = "http://www.roblox.com/asset/?id=94820260"
  182. SHMesh.TextureId = "http://www.roblox.com/asset/?id=94820166"
  183.  
  184. sg = Instance.new("ScreenGui")
  185. sg.Parent = game.Players[pl].PlayerGui
  186. button1 = Instance.new("TextButton")
  187. button1.Parent = sg
  188. button1.Text = "Light-On"
  189. button1.Position = UDim2.new(0,0,0.1,0)
  190. button1.Size = UDim2.new(0.1,0,0.1,0)
  191. button1.MouseButton1Click:connect(function()
  192. x.Enabled = true
  193. Part135.Transparency = 0
  194. end)
  195. button2 = Instance.new("TextButton")
  196. button2.Parent = sg
  197. button2.Text = "Light-Off"
  198. button2.Position = UDim2.new(0,0,0.2,0)
  199. button2.Size = UDim2.new(0.1,0,0.1,0)
  200. button2.MouseButton1Click:connect(function()
  201. x.Enabled = false
  202. Part135.Transparency = 1
  203. end)
  204. button3 = Instance.new("TextButton")
  205. button3.Parent = sg
  206. button3.Text = "Slow - 10"
  207. button3.Position = UDim2.new(0,0,0.3,0)
  208. button3.Size = UDim2.new(0.1,0,0.1,0)
  209. button3.MouseButton1Click:connect(function()
  210. Workspace.COOLBRAYDENNOOB.Humanoid.WalkSpeed = Workspace.COOLBRAYDENNOOB.Humanoid.WalkSpeed - 10
  211. end)
  212. button4 = Instance.new("TextButton")
  213. button4.Parent = sg
  214. button4.Text = "Fast + 10"
  215. button4.Position = UDim2.new(0,0,0.4,0)
  216. button4.Size = UDim2.new(0.1,0,0.1,0)
  217. button4.MouseButton1Click:connect(function()
  218. Workspace.COOLBRAYDENNOOB.Humanoid.WalkSpeed = Workspace.COOLBRAYDENNOOB.Humanoid.WalkSpeed + 10
  219. end)
  220.  
  221. local h = Instance.new("HopperBin")
  222. h.Name = "Magic"
  223. local p = game.Players:findFirstChild(pl)
  224. if (p==nil) then return end
  225. h.Parent = p.Backpack
  226.  
  227. function fast1()
  228. Workspace.COOLBRAYDENNOOB.Humanoid.WalkSpeed = 100
  229. end
  230.  
  231. function fast2()
  232. Workspace.COOLBRAYDENNOOB.Humanoid.WalkSpeed = 20
  233. end
  234.  
  235.  
  236.  
  237. function onKey(key, mouse)
  238. if key then
  239. local key = key:lower()
  240. if (key=="q") then
  241. fast1()
  242. if (key=="e") then
  243. fast2()
  244. end
  245. end
  246. end
  247. end
  248. h.Selected:connect(function(mouse)
  249. mouse.KeyDown:connect(function(key) onKey(key, mouse) end)
  250. end)
  251.  
  252. --[[Soul Staff Made By malfact]]--
  253.  
  254.  
  255.  
  256. --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  257. local player = game.Players.LocalPlayer
  258. local character = player.Character
  259.  
  260. if (player.Backpack:FindFirstChild("Soul Staff") ~= nil) then
  261. player.Backpack["Soul Staff"].Parent = nil
  262. end
  263. if (character:FindFirstChild("Soul_Staff") ~= nil) then
  264. character.Soul_Staff.Parent = nil
  265. end
  266.  
  267. local RightShoulder = character.Torso["Right Shoulder"]
  268. local ShoulderWeld = nil
  269. local StaffWeld = nil
  270.  
  271. local debounce = false
  272. local debounce2 = false
  273.  
  274. local mode = "hurt"
  275. local orbWeld = {}
  276. local keys = {}
  277.  
  278. local thrown = false
  279. local hold = false
  280. local holdTime = 0
  281.  
  282. local tool = Instance.new("HopperBin", player.Backpack)
  283. tool.Name = "Soul Staff"
  284. tool.Parent = player.Backpack
  285. local model = Instance.new("Model",character)
  286. model.Name = "Soul_Staff"
  287.  
  288. function animateArm(boolean, c0, c1)
  289. if (boolean) then
  290. if (ShoulderWeld == nil) then
  291. ShoulderWeld = weld(character["Torso"],character["Right Arm"],CFrame.new())
  292. end
  293. RightShoulder.Part0 = nil
  294.  
  295. ShoulderWeld.C0 = c0
  296. ShoulderWeld.C1 = c1
  297. else
  298. RightShoulder.Part0 = character.Torso
  299. if (ShoulderWeld ~= nil) then
  300. ShoulderWeld.Parent = nil
  301. end
  302. ShoulderWeld = nil
  303. end
  304. end
  305.  
  306. function animateStaff(boolean, c0, c1)
  307. if (boolean) then
  308. StaffWeld.Part0 = character["Right Arm"]
  309. StaffWeld.Part1 = model:FindFirstChild("Handle")
  310. StaffWeld.C0 = c0
  311. StaffWeld.C1 = c1
  312. else
  313. StaffWeld.Part0 = character["Torso"]
  314. StaffWeld.Part1 = model:FindFirstChild("Handle")
  315. StaffWeld.C0 = CFrame.new(0,0,0.5)
  316. StaffWeld.C1 = CFrame.new()*CFrame.Angles(0, 0, math.pi/4)
  317. end
  318. end
  319.  
  320. function weld(p0, p1, cframe)
  321. local w = Instance.new("ManualWeld", p0)
  322. w.Part0 = p0
  323. w.Part1 = p1
  324. w.C0 = cframe
  325. return w
  326. end
  327.  
  328. function newPart(size, color, parent)
  329. local part = Instance.new("Part")
  330. part.Locked = true
  331. part.FormFactor = 3
  332. part.Size = size
  333. part.BrickColor = color
  334. part.BottomSurface = 0
  335. part.TopSurface = 0
  336. part.Anchored = false
  337. part.CanCollide = false
  338. part.Parent = parent
  339. return part
  340. end
  341.  
  342. function newCylMesh(parent)
  343. local mesh = Instance.new("CylinderMesh", parent)
  344. return parent
  345. end
  346.  
  347. function newSphereMesh(parent)
  348. local mesh = Instance.new("SpecialMesh",parent)
  349. mesh.MeshType = 3
  350. return parent
  351. end
  352.  
  353. function newIdMesh(id, size, parent)
  354. local mesh = Instance.new("SpecialMesh",parent)
  355. mesh.MeshType = 5
  356. mesh.Scale = size
  357. mesh.MeshId = "http://www.roblox.com/Asset/?id="..id
  358. return parent
  359. end
  360.  
  361. function addSoul(count)
  362. for i = 1, count do
  363. local p = newSphereMesh(newPart(Vector3.new(0.2,0.2,0.2),BrickColor.new(0,0,0),model))
  364. orbWeld[#orbWeld + 1] = weld(model:FindFirstChild("core"),p,CFrame.new(0,0,0))
  365. end
  366. end
  367.  
  368. function removeSoul(count)
  369. for i = 1, count do
  370. orbWeld[#orbWeld].Part1.Parent = nil
  371. orbWeld[#orbWeld] = nil
  372. end
  373. end
  374.  
  375. function getRadius(num)
  376. if (num < 16) then
  377. return 1
  378. else
  379. return num/16
  380. end
  381. end
  382.  
  383. local handle = newCylMesh(newPart(Vector3.new(0.2,6,0.2),BrickColor.new(1,1,1),model))
  384. handle.Name = "Handle"
  385.  
  386. weld(handle,newSphereMesh(newPart(Vector3.new(0.4,0.4,0.4),BrickColor.new(0,0,0),model)),CFrame.new(0,3,0))
  387. weld(handle,newCylMesh(newPart(Vector3.new(0.25,0.25,0.25),BrickColor.new(0,0,0),model)),CFrame.new(0,2.75,0))
  388. 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))
  389. 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))
  390. weld(handle,newSphereMesh(newPart(Vector3.new(0.4,0.4,0.4),BrickColor.new(0,0,0),model)),CFrame.new(0,-3,0))
  391. weld(handle,newCylMesh(newPart(Vector3.new(0.25,0.25,0.25),BrickColor.new(0,0,0),model)),CFrame.new(0,-2.75,0))
  392. 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))
  393. 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))
  394. 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))
  395. 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))
  396. 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))
  397. 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))
  398. 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))
  399. 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))
  400. 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))
  401. 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))
  402. 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))
  403. 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))
  404. 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))
  405.  
  406. local core = newPart(Vector3.new(0.2,0.2,0.2),BrickColor.new(0,0,0),model)
  407. core.Name = "core"
  408. core.Reflectance = 0.5
  409. core.Transparency = 0.25
  410. local coreWeld = weld(handle,newIdMesh("9756362",Vector3.new(0.5,0.5,0.5),core),CFrame.new(0,3.75,0))
  411. Instance.new("PointLight",core)
  412.  
  413. addSoul(8)
  414.  
  415. StaffWeld = weld(character["Torso"],handle,CFrame.new())
  416. animateArm(false, nil, nil)
  417. animateStaff(false, nil, nil)
  418.  
  419. function damage(char)
  420. if (char == nil) then return end
  421. if (char:FindFirstChild("Humanoid") ~= nil) then
  422. if (not char.Humanoid:isA("Humanoid")) then
  423. char.Parent = nil
  424. return
  425. end
  426. local humanoid = char.Humanoid
  427. if (humanoid.Health > 0 and humanoid.Health - (#orbWeld+1) <= 0) then
  428. --addSoul(1)
  429. end
  430. if (char:FindFirstChild("Bubble") ~= nil) then
  431. coroutine.resume(coroutine.create(function()
  432. if (humanoid ~= nil) then
  433. humanoid.WalkSpeed = -16
  434. end
  435. wait(5)
  436. if (humanoid ~= nil) then
  437. humanoid.WalkSpeed = 16
  438. end
  439. end))
  440. humanoid.PlatformStand = false
  441. char.Bubble.Parent = nil
  442. --addSoul(1)
  443. end
  444. humanoid.Health = humanoid.Health - (#orbWeld+1)
  445. end
  446. end
  447.  
  448. function damageDistance(char, distance)
  449. if (char == nil) then return end
  450. if (char:FindFirstChild("Torso") ~= nil) then
  451. local torso = char.Torso
  452. if ((core.Position - torso.Position).magnitude <= distance) then
  453. damage(char)
  454. end
  455. end
  456. end
  457.  
  458. function beam(start, position)
  459. coroutine.resume(coroutine.create(function()
  460. if (position == nil or start == nil) then return end
  461. local distance = (start-position).magnitude
  462. local p = newPart(Vector3.new(0.2,0.2,distance),BrickColor.new(0,0,0),model)
  463. p.Name = "beam012"
  464. p.Anchored = true
  465. p.Transparency = 0.25
  466. p.CFrame = CFrame.new((start + position)/2,start)
  467. for i = 0, 0.75, 0.1 do
  468. p.Transparency = 0.25+i
  469. wait(0.01)
  470. end
  471. p.Parent = nil
  472. end))
  473. end
  474.  
  475. tool.Selected:connect(function(mouse)
  476. if (not throw) then
  477. animateArm(true, CFrame.new(1.5,0.5,0), CFrame.new(0,0.5,0)*CFrame.Angles(-math.pi/2, 0, 0))
  478. animateStaff(true, CFrame.new(0,-1,0)*CFrame.Angles(math.pi + math.pi/2,0,0), CFrame.new())
  479. end
  480.  
  481. mouse.Button1Down:connect(function()
  482. local hit = mouse.Hit
  483. if (debounce) then
  484. return
  485. end
  486. debounce = true
  487. if (mode == "hurt") then
  488. beam(core.Position, hit.p)
  489. if (mouse.Target ~= nil) then
  490. if (mouse.Target.Name == "box") then
  491. mouse.Target.Parent = nil
  492. else
  493. damage(mouse.Target.Parent)
  494. end
  495. end
  496. elseif (mode == "throw") then
  497. animateArm(false, nil, nil)
  498. StaffWeld.Part0 = nil
  499. if (handle:FindFirstChild("BodyPosition") ~= nil) then
  500. handle:FindFirstChild("BodyPosition").Parent = nil
  501. end
  502. if (handle:FindFirstChild("BodyGyro") ~= nil) then
  503. handle:FindFirstChild("BodyGyro").Parent = nil
  504. end
  505. local bp = Instance.new("BodyPosition",handle)
  506. bp.maxForce = Vector3.new(100000,100000,100000)
  507. bp.position = handle.Position + Vector3.new(0,30,0)
  508. local bg = Instance.new("BodyGyro",handle)
  509. bg.cframe = CFrame.new(bp.position,hit.p)*CFrame.Angles(math.pi/2,0,0)
  510. wait(1)
  511. bp.position = hit.p + Vector3.new(0,2,0)
  512. wait(0.3)
  513. bg.cframe = CFrame.new(bp.position,hit.p)*CFrame.Angles(math.pi/2,0,0)
  514. throw = true
  515. elseif (mode == "build") then
  516. beam(core.Position, hit.p)
  517. local p = newPart(Vector3.new(4,4,4),BrickColor.new(0,0,0),Workspace)
  518. p.Name = "box"
  519. p.Anchored = true
  520. p.CanCollide = true
  521. p.Transparency = 0.5
  522. p.CFrame = hit*CFrame.Angles(math.random(0,math.pi*2),math.random(0,math.pi*2),math.random(0,math.pi*2))
  523. Instance.new("PointLight",p)
  524. elseif (mode == "bubble") then
  525. beam(core.Position, hit.p)
  526. if (#orbWeld > 0) then
  527. if (mouse.Target.Parent:FindFirstChild("Humanoid") ~= nil) then
  528. local humanoid = mouse.Target.Parent.Humanoid
  529. if (mouse.Target.Parent:FindFirstChild("Bubble") == nil) then
  530. if (mouse.Target.Parent:FindFirstChild("Torso") ~= nil) then
  531. local torso = mouse.Target.Parent.Torso
  532. local part = newPart(Vector3.new(8,8,8),BrickColor.new(0,0,0),mouse.Target.Parent)
  533. part.Name = "Bubble"
  534. part.Anchored = false
  535. part.CanCollide = true
  536. part.Shape = 0
  537. part.Transparency = 0.5
  538. part.CFrame = torso.CFrame
  539. Instance.new("PointLight",part)
  540. weld(torso,part,CFrame.new())
  541. humanoid.PlatformStand = true
  542. -- removeSoul(1)
  543. end
  544. else
  545. coroutine.resume(coroutine.create(function()
  546. if (humanoid ~= nil) then
  547. humanoid.WalkSpeed = -50
  548. end
  549. wait(5)
  550. if (humanoid ~= nil) then
  551. humanoid.WalkSpeed = 16
  552. end
  553. end))
  554. humanoid.PlatformStand = false
  555. mouse.Target.Parent.Bubble.Parent = nil
  556. --addSoul(1)
  557. end
  558. end
  559. end
  560. elseif (mode == "beam") then
  561. if (not hold and not throw) then
  562. animateStaff(true, CFrame.new(0,-1,0)*CFrame.Angles(math.pi,0,0), CFrame.new())
  563. hold = true
  564. holdTime = 0
  565. end
  566. elseif (mode == "portal") then
  567. handle.Anchored = true
  568. local p = newCylMesh(newPart(Vector3.new(1,0.25,1),BrickColor.new(0,0,0),model))
  569. p.Anchored = true
  570. p.CFrame = CFrame.new(handle.Position) + Vector3.new(0,-2,0)
  571. local c = p.CFrame
  572. for i=1,15,0.5 do
  573. p.Size = p.Size+Vector3.new(0.5,0,0.5)
  574. p.CFrame = c
  575. wait(0.01)
  576. end
  577. local p1 = newCylMesh(newPart(Vector3.new(1,0.25,1),BrickColor.new(0,0,0),model))
  578. p1.Anchored = true
  579. p1.CFrame = CFrame.new(hit.p)
  580. p1.CFrame = CFrame.new(hit.p)
  581. local c1 = p1.CFrame
  582. handle.Anchored = false
  583. for i,v in ipairs(game.Workspace:getChildren()) do
  584. if (v:FindFirstChild("Torso") ~= nil) then
  585. if ((core.Position - v.Torso.Position).magnitude <= 8) then
  586. coroutine.resume(coroutine.create(function()
  587. v.Torso.CFrame = CFrame.new(Vector3.new(v.Torso.Position.x,p.Position.y+3,v.Torso.Position.z),v.Torso.CFrame.lookVector)
  588. v.Torso.Anchored = true
  589. for i=0, 10 do
  590. v.Torso.CFrame = v.Torso.CFrame+Vector3.new(0,-1,0)
  591. wait(0.1)
  592. end
  593. v.Torso.CFrame = CFrame.new(v.Torso.Position - (p.Position - p1.Position),v.Torso.CFrame.lookVector) + Vector3.new(0,4,0)
  594. for i=0, 10 do
  595. v.Torso.CFrame = v.Torso.CFrame+Vector3.new(0,1,0)
  596. wait(0.1)
  597. end
  598. v.Torso.Anchored = false
  599. end))
  600. end
  601. end
  602. end
  603. for i=1,15,0.5 do
  604. p.Size = p.Size+Vector3.new(-0.5,0,-0.5)
  605. p1.Size = p1.Size+Vector3.new(0.5,0,0.5)
  606. p.CFrame = c
  607. p1.CFrame = c1
  608. wait(0.01)
  609. end
  610. p.Parent = nil
  611. wait(1)
  612. for i=1,15,1 do
  613. p1.Size = p1.Size+Vector3.new(-1,0,-1)
  614. p1.CFrame = c1
  615. wait(0.01)
  616. end
  617. p1.Parent = nil
  618. end
  619. debounce = false
  620. end)
  621.  
  622. mouse.Button1Up:connect(function()
  623. if (debounce2) then
  624. return
  625. end
  626. debounce2 = true
  627. if (mode == "beam") then
  628. if (hold and holdTime >= 10) then
  629. if (#orbWeld > 0) then
  630. local p = newSphereMesh(newPart(Vector3.new(4,4,4),BrickColor.new(0,0,0),Workspace))
  631. p.Name = "1"
  632. p.Transparency = 0.5
  633. local point = core.CFrame*CFrame.Angles(math.pi/2, 0, 0)
  634. p.CFrame = CFrame.new(core.Position + point.lookVector*4,core.Position)
  635. Instance.new("PointLight",p)
  636.  
  637. local bs = Instance.new("BodyVelocity",p)
  638. bs.velocity = point.lookVector*(2*holdTime)+Vector3.new(0,0.25,0)
  639. bs.maxForce = Vector3.new(100000,100000,100000)
  640.  
  641. p.Touched:connect(function(part)
  642. if (part.Name ~= "beam012") then
  643. if (p.Name == "3") then
  644. p.Parent = nil
  645. elseif (p.Name == "2") then
  646. p.Name = "3"
  647. elseif (p.Name == "1") then
  648. p.Name = "2"
  649. end
  650. part.Parent = nil
  651. end
  652. end)
  653.  
  654. coroutine.resume(coroutine.create(function()
  655. for i = 1, 5, 0.01 do
  656. if (p.Parent ~= nil) then
  657. beam(p.Position, p.Position+Vector3.new(math.random(-5,5),math.random(-5,5),math.random(-5,5)))
  658. end
  659. wait(0.01)
  660. end
  661. p.Parent = nil
  662. end))
  663.  
  664. wait(1)
  665. --removeSoul(2)
  666. end
  667. end
  668. hold = false
  669. holdTime = 0
  670. animateStaff(true, CFrame.new(0,-1,0)*CFrame.Angles(math.pi + math.pi/2,0,0), CFrame.new())
  671. end
  672. debounce2 = false
  673. end)
  674.  
  675. mouse.KeyDown:connect(function (key)
  676. keys[key] = true
  677. if (keys["z"]) then
  678. mode = "hurt"
  679. elseif (keys["x"]) then
  680. mode = "bubble"
  681. elseif (keys["q"]) then
  682. mode = "beam"
  683. elseif (keys["c"]) then
  684. mode = "drain"
  685. elseif (keys["v"]) then
  686. mode = "build"
  687. elseif (keys["e"]) then
  688. if (mode ~= "throw") then
  689. mode = "throw"
  690. else
  691. if (debounce) then return end
  692. debounce = true
  693. if (throw) then
  694. handle:FindFirstChild("BodyPosition").Parent = nil
  695. handle:FindFirstChild("BodyGyro").Parent = nil
  696. throw = false
  697. animateArm(true, CFrame.new(1.5,0.5,0), CFrame.new(0,0.5,0)*CFrame.Angles(-math.pi/2, 0, 0))
  698. animateStaff(true, CFrame.new(0,-1,0)*CFrame.Angles(math.pi + math.pi/2,0,0), CFrame.new())
  699. end
  700. debounce = false
  701. end
  702. elseif (keys["b"]) then
  703. if (debounce) then return end
  704. debounce = true
  705. if (throw) then
  706. local p = newCylMesh(newPart(Vector3.new(1,0.25,1),BrickColor.new(0,0,0),model))
  707. p.Anchored = true
  708. p.CFrame = CFrame.new(handle.Position) + Vector3.new(0,-2,0)
  709. local c = p.CFrame
  710. for i=1,30,0.5 do
  711. p.Size = p.Size+Vector3.new(0.5,0,0.5)
  712. p.CFrame = c
  713. wait(0.01)
  714. end
  715. for i,v in ipairs(game.Workspace:getChildren()) do
  716. if (v:FindFirstChild("Torso") ~= nil) then
  717. if ((core.Position - v.Torso.Position).magnitude <= 15) then
  718. coroutine.resume(coroutine.create(function()
  719. v.Torso.CFrame = CFrame.new(Vector3.new(v.Torso.Position.x,p.Position.y+3,v.Torso.Position.z),v.Torso.CFrame.lookVector)
  720. v.Torso.Anchored = true
  721. for i=0, 10 do
  722. v.Torso.CFrame = v.Torso.CFrame+Vector3.new(0,-1,0)
  723. wait(0.1)
  724. end
  725. v:BreakJoints()
  726. end))
  727. end
  728. end
  729. end
  730. for i=1,30,1 do
  731. p.Size = p.Size+Vector3.new(-1,0,-1)
  732. p.CFrame = c
  733. wait(0.01)
  734. end
  735. p.Parent = nil
  736. end
  737. debounce = false
  738. elseif (keys["f"]) then
  739. mode = "portal"
  740. end
  741. end)
  742. mouse.KeyUp:connect(function (key) keys[key] = false end)
  743. end)
  744.  
  745. tool.Deselected:connect(function()
  746. hold = false
  747. holdTime = 0
  748. if (not throw) then
  749. animateArm(false, nil, nil)
  750. animateStaff(false, nil, nil)
  751. end
  752. end)
  753.  
  754. local y = 0
  755. local x = 0
  756. game:getService("RunService").Stepped:connect(function()
  757. if (hold) then
  758. holdTime = holdTime+0.5
  759. if(holdTime >= 10) then
  760. beam(core.Position, core.Position+Vector3.new(math.random(-5,5),math.random(-5,5),math.random(-5,5)))
  761. end
  762. end
  763.  
  764. if (mode == "drain") then
  765. for q,v in pairs(Workspace:getChildren()) do
  766. if (v ~= character and math.random(1,10) == 1) then
  767. damageDistance(v, 10)
  768. end
  769. end
  770. beam(core.Position, core.Position+Vector3.new(math.random(-5,5),math.random(-5,5),math.random(-5,5)))
  771. end
  772.  
  773. coreWeld.C0 = CFrame.new(0,3.75,0)+Vector3.new(0,math.sin(y)/4,0)
  774.  
  775. for i,v in ipairs(orbWeld) do
  776. local radius = getRadius(#orbWeld)
  777.  
  778. local index = x + ((math.pi*2)/#orbWeld)*(i-1)
  779.  
  780. orbWeld[i].C0 = CFrame.new(radius*math.sin(index), 0, radius*math.cos(index))
  781. end
  782.  
  783. if (y < math.pi*2) then
  784. y = y + math.pi*2/128
  785. else
  786. y = math.pi*2/128
  787. end
  788.  
  789. if (x < math.pi*2) then
  790. x = x + math.pi*2/128
  791. else
  792. x = math.pi*2/128
  793. end
  794. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement