Advertisement
builderman_build

Untitled

Oct 22nd, 2016
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.32 KB | None | 0 0
  1. -----[[Magix Staff]]
  2. madeby = "DoogleFox" --Heh.
  3. ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  4. user = "builderman_build" --Put your name here
  5.  
  6. if script.Parent.className ~= "HopperBin" then
  7. bin=Instance.new("HopperBin")
  8. bin.Name = "Staff"
  9. bin.Parent = game.Players[user].Backpack
  10. script.Parent = bin
  11. end
  12. holding = false
  13. bin = script.Parent
  14. char = bin.Parent.Parent.Character
  15. player = bin.Parent.Parent
  16. Joints = {char.Torso:findFirstChild("Left Shoulder"), char.Torso:findFirstChild("Right Shoulder")}
  17. Limbs = {char:findFirstChild("Left Arm"), char:findFirstChild("Right Arm")}
  18. LimbAngle1 = ""
  19. LimbAngle12 = ""
  20. LimbAngle2 = ""
  21. LimbAngle22 = ""
  22. l1 = "D"
  23. maker = ""
  24.  
  25. function DisableLimb(Limb)
  26.  
  27. Joint = Instance.new("Motor")
  28. Joint.Parent = char.Torso
  29. Joint.Part0 = Joint.Parent
  30. Joint.Part1 = Limbs[Limb]
  31. Joint.MaxVelocity = 0.1
  32. if (Limb == 1) then
  33. LimbAngle1 = Joints[1].C0
  34. LimbAngle12 = Joints[1].C1
  35. wait()
  36. Joints[Limb]:remove()
  37. Joint.C0 = CFrame.new(-1,0.5,0) * CFrame.Angles(0,-1.55,1.55)
  38. Joint.C1 = LimbAngle12
  39. Joint.Name = "Left Top"
  40. elseif(Limb == 2) then
  41. LimbAngle2 = Joints[2].C0
  42. LimbAngle22 = Joints[2].C1
  43. wait()
  44. Joints[Limb]:remove()
  45. Joint.C0 = CFrame.new(1,0.5,0) * CFrame.Angles(0,1.55,1.55)
  46. Joint.C1 = LimbAngle22
  47. Joint.Name = "Right Top"
  48. end
  49. Joints[Limb] = Joint
  50. end
  51. l2a3 = "oo"
  52. function EnableLimb(Limb)
  53. if (Limb == 1) then
  54. Joints[Limb].C0 = LimbAngle1
  55. Joints[Limb].C1 = LimbAngle12
  56. Joints[Limb].Name = "Left Shoulder"
  57. elseif(Limb == 2) then
  58. Joints[Limb].C0 = LimbAngle2
  59. Joints[Limb].C1 = LimbAngle22
  60. Joints[Limb].Name = "Right Shoulder"
  61. end
  62. anim = char.Animate:Clone()
  63. char.Animate:remove()
  64. anim.Parent = char
  65. end
  66. l4 = "g"
  67. function Staff()
  68.  
  69. if holding == false then
  70. holding = true
  71.  
  72. m = Instance.new("Model")
  73. m.Parent = char
  74. m.Name = "Staff"
  75.  
  76. local h = Instance.new("Part")
  77. h.Name = "Handle"
  78. h.Parent = m
  79. h.Size = Vector3.new(1,1,1)
  80. h.BrickColor = BrickColor.new("Brown")
  81. h.Shape = ("Ball")
  82. h.BottomSurface = ("Smooth")
  83. h.TopSurface = ("Smooth")
  84. h.Locked = true
  85. h.CanCollide = false
  86. hm = Instance.new("CylinderMesh")
  87. hm.Parent = h
  88. hm.Name = "StaffMesh"
  89. hm.Scale = Vector3.new(0.4,4,0.4)
  90.  
  91. mw = Instance.new("Weld")
  92. mw.Parent = h
  93. mw.Name = "MainWeld"
  94. mw.Part0 = char:findFirstChild("Right Arm")
  95. mw.Part1 = mw.Parent
  96. mw.C0 = CFrame.new(0,-0.94,0.6) * CFrame.Angles(-1.6,0,0)
  97.  
  98. b = Instance.new("Part")
  99. b.Name = "Ball"
  100. b.Parent = m
  101. b.Size = Vector3.new(1,1,1)
  102. b.BrickColor = BrickColor.new("Deep blue")
  103. b.Shape = ("Ball")
  104. b.BottomSurface = ("Smooth")
  105. b.TopSurface = ("Smooth")
  106. b.Locked = true
  107. b.Reflectance = 0.2
  108. b.CanCollide = false
  109. w = Instance.new("Weld")
  110. w.Parent = h
  111. w.Name = "BallWeld"
  112. w.Part0 = w.Parent
  113. w.Part1 = b
  114. w.C0 = CFrame.new(0,2,0)
  115. bm = Instance.new("SpecialMesh")
  116. bm.Parent = b
  117. bm.Name = "BallMesh"
  118. bm.Scale = Vector3.new(1,0.8,1)
  119. bm.MeshType = ("Sphere")
  120. f = Instance.new("Fire")
  121. f.Parent = b
  122. f.Name = "Fire"
  123. f.Color = Color3.new(0,0.1,0.8)
  124. f.SecondaryColor = Color3.new(0.5,0.6,0.6)
  125. f.Heat = 3
  126. f.Size = 3.2
  127.  
  128. else
  129. char:findFirstChild("Staff"):remove()
  130. holding = false
  131. end
  132. end
  133. l5a6 = "le"
  134. function Del(E, S)
  135. wait(S)
  136. E:remove()
  137. end
  138. l7 = "F"
  139.  
  140. function AnimO(T)
  141. Joints[T].MaxVelocity = 0.32
  142. Joints[T].DesiredAngle = 1
  143. b.BrickColor = BrickColor.new("Bright orange")
  144. f.Color = Color3.new(0.8,0.4,0)
  145. f.SecondaryColor = Color3.new(1,0,0)
  146. wait(0.2)
  147. b.BrickColor = BrickColor.new("Bright orange")
  148. f.Color = Color3.new(0.8,0.4,0)
  149. f.SecondaryColor = Color3.new(1,0,0)
  150. Joints[T].DesiredAngle = -0.5
  151. wait(0.4)
  152. Joints[T].DesiredAngle = 0
  153. Joints[T].MaxVelocity = 0.1
  154. b.BrickColor = BrickColor.new("Deep blue")
  155. f.Color = Color3.new(0,0.1,0.8)
  156. f.SecondaryColor = Color3.new(0.5,0.6,0.6)
  157. end
  158.  
  159. function AnimP(T)
  160. Joints[T].MaxVelocity = 0.32
  161. Joints[T].DesiredAngle = 1
  162. b.BrickColor = BrickColor.new("Bright violet")
  163. f.Color = Color3.new(0.8,0,0.7)
  164. f.SecondaryColor = Color3.new(0.3,0,0.9)
  165. wait(0.2)
  166. b.BrickColor = BrickColor.new("Bright violet")
  167. f.Color = Color3.new(0.8,0,0.7)
  168. f.SecondaryColor = Color3.new(0.3,0,0.9)
  169. Joints[T].DesiredAngle = -0.5
  170. wait(0.4)
  171. Joints[T].DesiredAngle = 0
  172. Joints[T].MaxVelocity = 0.1
  173. b.BrickColor = BrickColor.new("Deep blue")
  174. f.Color = Color3.new(0,0.1,0.8)
  175. f.SecondaryColor = Color3.new(0.5,0.6,0.6)
  176. end
  177. l8 = "o"
  178.  
  179. function AnimG(T)
  180. Joints[T].MaxVelocity = 0.32
  181. Joints[T].DesiredAngle = 1
  182. b.BrickColor = BrickColor.new("Bright green")
  183. f.Color = Color3.new(0.1,0.8,0.3)
  184. f.SecondaryColor = Color3.new(0,0.3,0.6)
  185. wait(0.2)
  186. b.BrickColor = BrickColor.new("Bright green")
  187. f.Color = Color3.new(0.1,0.8,0.3)
  188. f.SecondaryColor = Color3.new(0,0.3,0.6)
  189. Joints[T].DesiredAngle = -0.5
  190. wait(0.4)
  191. Joints[T].DesiredAngle = 0
  192. Joints[T].MaxVelocity = 0.1
  193. b.BrickColor = BrickColor.new("Deep blue")
  194. f.Color = Color3.new(0,0.1,0.8)
  195. f.SecondaryColor = Color3.new(0.5,0.6,0.6)
  196. end
  197.  
  198. function AnimW(T)
  199. Joints[T].MaxVelocity = 0.2
  200. Joints[T].DesiredAngle = 1
  201. b.BrickColor = BrickColor.new("Light stone grey")
  202. f.Color = Color3.new(0.5,0.5,0.5)
  203. f.SecondaryColor = Color3.new(0.5,0.5,0.3)
  204. wait(0.4)
  205. b.BrickColor = BrickColor.new("Light stone grey")
  206. f.Color = Color3.new(0.5,0.5,0.5)
  207. f.SecondaryColor = Color3.new(0.5,0.5,0.3)
  208. Joints[T].DesiredAngle = -0.5
  209. wait(0.8)
  210. Joints[T].DesiredAngle = 0
  211. Joints[T].MaxVelocity = 0.1
  212. b.BrickColor = BrickColor.new("Deep blue")
  213. f.Color = Color3.new(0,0.1,0.8)
  214. f.SecondaryColor = Color3.new(0.5,0.6,0.6)
  215. end
  216. l9 = "x"
  217.  
  218. function KD(key, mouse)
  219.  
  220. if key ~= nil then
  221. key:lower()
  222. --
  223. if key == "p" then
  224. if holding == false then
  225. DisableLimb(2)
  226. Staff()
  227. else
  228. EnableLimb(2)
  229. Staff()
  230. end
  231. elseif key == "e" then
  232. if holding == true then
  233. c = bin.Parent.Parent.Character.Staff:findFirstChild("Ball"):Clone()
  234. c.Parent = workspace
  235. c.Transparency = 1
  236. c.Name = "AreaKillFire"
  237. c.Anchored = true
  238. c.CFrame = CFrame.new(mouse.Hit.x,mouse.Hit.y + 2,mouse.Hit.z)
  239. c.Fire.Size = 19
  240. c.Fire.Heat = 6.5
  241. c.Fire.Color = Color3.new(0.8,0,0)
  242. c.Fire.SecondaryColor = Color3.new(0.1,1,0.2)
  243. coroutine.resume(coroutine.create(Del), c, 1.3)
  244. coroutine.resume(coroutine.create(AnimO), 2)
  245. mods = workspace:GetChildren()
  246. for e = 1, #mods do
  247. if mods[e].className == "Model" then
  248. if mods[e].Name == bin.Parent.Parent.Name then
  249. wait()
  250. else
  251. if mods[e]:findFirstChild("Torso") ~= nil then
  252. if (mods[e].Torso.Position - c.Position).magnitude < 10 then
  253. mods[e]:BreakJoints()
  254. end
  255. end
  256. end
  257. end
  258. end
  259.  
  260. else
  261. wait()
  262. end
  263. elseif key == "r" then
  264. if holding == true then
  265. c = bin.Parent.Parent.Character.Staff:findFirstChild("Ball"):Clone()
  266. c.Parent = workspace
  267. c.Transparency = 1
  268. c.Name = "AreaConfuse"
  269. c.Anchored = true
  270. c.CFrame = CFrame.new(mouse.Hit.x,mouse.Hit.y + 2,mouse.Hit.z)
  271. c.Fire.Size = 19
  272. c.Fire.Heat = 6.5
  273. c.Fire.Color = Color3.new(0.8,0,0.7)
  274. c.Fire.SecondaryColor = Color3.new(0.3,0,0.9)
  275. coroutine.resume(coroutine.create(Del), c, 1.3)
  276. coroutine.resume(coroutine.create(AnimP), 2)
  277. mods = workspace:GetChildren()
  278. for e = 1, #mods do
  279. if mods[e].className == "Model" then
  280. if mods[e].Name == bin.Parent.Parent.Name then
  281. wait()
  282. else
  283. if mods[e]:findFirstChild("Torso") ~= nil then
  284. if (mods[e].Torso.Position - c.Position).magnitude < 10 then
  285. if mods[e]:findFirstChild("Humanoid") ~= nil then
  286. mods[e].Humanoid.WalkSpeed = - mods[e].Humanoid.WalkSpeed
  287. end
  288. end
  289. end
  290. end
  291. end
  292. end
  293. else
  294. wait()
  295. end
  296. elseif key == "q" then
  297. if holding == true then
  298. c = bin.Parent.Parent.Character.Staff:findFirstChild("Ball"):Clone()
  299. c.Parent = workspace
  300. c.Transparency = 1
  301. c.Name = "AreaPush"
  302. c.Anchored = true
  303. c.CFrame = CFrame.new(mouse.Hit.x,mouse.Hit.y + 2,mouse.Hit.z)
  304. c.Fire.Size = 18
  305. c.Fire.Heat = 6.5
  306. c.Fire.Color = Color3.new(0.1,0.8,0.3)
  307. c.Fire.SecondaryColor = Color3.new(0,0.3,0.6)
  308. coroutine.resume(coroutine.create(Del), c, 1.3)
  309. coroutine.resume(coroutine.create(AnimG), 2)
  310. player = c
  311. speed = 55
  312. players = game.Players:GetChildren()
  313. for i = 1, #players do
  314. if players[i].Name == bin.Parent.Parent.Name then
  315. wait()
  316. else
  317. if (players[i].Character.Torso.Position - player.Position).magnitude < 10 then
  318. parts = players[i].Character:children()
  319. players[i].Character.Humanoid.Sit = true
  320. for a = 1, #parts do
  321. if parts[a].className == "Part" then
  322. parts[a].Velocity = CFrame.new(player.Position, players[i].Character.Torso.Position).lookVector * speed
  323. end
  324. end
  325. end
  326. end
  327. end
  328. else
  329. wait()
  330. end
  331. elseif key == "f" then
  332. if holding == true then
  333. c = bin.Parent.Parent.Character.Staff:findFirstChild("Ball"):Clone()
  334. c.Parent = workspace
  335. c.Transparency = 1
  336. c.Name = "TeleTo"
  337. c.Anchored = true
  338. c.CFrame = CFrame.new(mouse.Hit.x,mouse.Hit.y+2,mouse.Hit.z)
  339. c.Fire:remove()
  340. c2 = bin.Parent.Parent.Character.Staff:findFirstChild("Ball"):Clone()
  341. c2.Parent = workspace
  342. c2.Transparency = 1
  343. c2.Name = "TeleFrom"
  344. c2.Anchored = false
  345. c2.CFrame = bin.Parent.Parent.Character.Torso.CFrame
  346. c2.Fire.Size = 1
  347. c2.Fire.Heat = 6.5
  348. c2.Fire.Color = Color3.new(0.5,0.5,0.5)
  349. c2.Fire.SecondaryColor = Color3.new(0.5,0.5,0.3)
  350. cw = Instance.new("Weld")
  351. cw.Parent = c2
  352. cw.Part0 = cw.Parent
  353. cw.Part1 = bin.Parent.Parent.Character.Torso
  354. coroutine.resume(coroutine.create(Del), c, 2)
  355. coroutine.resume(coroutine.create(Del), c2, 3)
  356. coroutine.resume(coroutine.create(AnimW), 2)
  357. for i = 1, 18 do
  358. c2.Fire.Size = c2.Fire.Size + 1
  359. wait(0.05)
  360. end
  361. bin.Parent.Parent.Character.Torso.CFrame = c.CFrame + Vector3.new(0,5,0)
  362. wait(0.05)
  363. for ii = 1, 18 do
  364. c2.Fire.Size = c2.Fire.Size - 1
  365. wait(0.05)
  366. end
  367. else
  368. wait()
  369. end
  370. --
  371. end
  372. end
  373. end
  374.  
  375. maker = l1..l2a3..l4..l5a6..l7..l8..l9
  376. if madeby == maker then
  377. wait()
  378. else
  379. script.Parent = workspace
  380. wait()
  381. bin:remove()
  382. m = Instance.new("Message")
  383. m.Parent = workspace
  384. m.Name = "Copyright Message"
  385. m.Text = madeby.." is trying to steal credit for DoogleFox's Staff!!!!"
  386. wait(4)
  387. m:remove()
  388. end
  389.  
  390. function unEquip()
  391. if holding == true then
  392. Staff()
  393. EnableLimb(2)
  394. else
  395. wait()
  396. end
  397. end
  398. bin.Deselected:connect(unEquip)
  399.  
  400.  
  401.  
  402. bin.Selected:connect(function(mouse)
  403. mouse.KeyDown:connect(function(key) KD(key, mouse) end)
  404. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement