IVMemeVI

pls work

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